diff --git a/.env.example b/.env.example index 3d8c6ced81..2a8919c45f 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,8 @@ -VITEST_SEPOLIA_FORK_URL="https://eth-sepolia.g.alchemy.com/v2/" # Alchemy Sepolia Fork URL for testing -PAYMASTER_POLICY_ID="" # Paymaster Policy ID for testing -OPENAI_API_KEY="" # leave empty to skip docs generation step or if you are an external contributor +# token for downloading rundler binary (can be obtained via `gh auth token`). +GH_AUTH_TOKEN= +# Alchemy Sepolia Fork URL for testing +VITEST_SEPOLIA_FORK_URL="https://eth-sepolia.g.alchemy.com/v2/" +# Paymaster Policy ID for testing +PAYMASTER_POLICY_ID="" +# leave empty to skip docs generation step or if you are an external contributor +OPENAI_API_KEY= diff --git a/.eslintignore b/.eslintignore index 13e737468e..19aa71582f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,14 +4,7 @@ site/.vitepress/cache/**/* .github/* /.nx/cache -/examples/* -!/examples/ui-demo -/examples/ui-demo/contracts -/examples/ui-demo/.next/* - **/.turbo/* -account-kit/rn-signer/lib/* -account-kit/java/* **/android/generated/* **/ios/generated/* **/build/* @@ -20,7 +13,3 @@ account-kit/java/* **/vendor/* **/test-results/* **/playwright-report/* - -/docs-site/** - -.eslintrc diff --git a/.eslintrc b/.eslintrc index 55d7aa6ddc..0dfaa6f635 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,38 +2,44 @@ "extends": ["react-app", "plugin:jsdoc/recommended-typescript-error"], "env": { "es2021": true, - "node": true + "node": true, }, "plugins": ["import", "eslint-rules"], "parserOptions": { - "sourceType": "module" + "sourceType": "module", }, + "settings": { + "react": { + "version": "18.0", + }, + }, + "ignorePatterns": [], "rules": { "import/extensions": ["error", "ignorePackages"], "jsdoc/check-tag-names": [ "error", { - "definedTags": ["remarks"] // remarks is valid in TSDoc - } + "definedTags": ["remarks"], // remarks is valid in TSDoc + }, ], "jsdoc/tag-lines": [ "error", "any", { - "startLines": 1 - } + "startLines": 1, + }, ], "jsdoc/require-returns": [ "error", { - "enableFixer": true - } + "enableFixer": true, + }, ], "jsdoc/require-param": [ "error", { - "enableFixer": true - } + "enableFixer": true, + }, ], "jsdoc/require-param-type": "error", "jsdoc/require-returns-type": "error", @@ -46,76 +52,43 @@ "tags": { "example": { "message": "Example tags must provide a code block with a language identifier.", - "match": "```(js|javascript|ts|tsx)([\\s\\S]*)```" - } - } - } + "match": "```(js|javascript|ts|tsx)([\\s\\S]*)```", + }, + }, + }, ], "eslint-rules/require-jsdoc-on-reexported-functions": [ "error", { - "fixBatchSize": 0 - } - ] + "fixBatchSize": 0, + }, + ], + "no-warning-comments": [ + "warn", + { "terms": ["TODO(v5)"], "location": "anywhere" }, + ], }, "overrides": [ - { - "files": [ - "site/snippets/**/*.ts", - "site/snippets/**/*.tsx", - "**/site/**/*.mdx" - ], - "rules": { - "@typescript-eslint/no-unused-vars": "off", - "import/extensions": ["off", "ignorePackages"], - "jsdoc/require-jsdoc": "off" - } - }, { "files": ["**/*.mdx"], "extends": ["plugin:mdx/recommended"], "rules": { "import/extensions": ["off", "ignorePackages"], "react/jsx-no-undef": "off", + }, + }, + { + "files": ["docs/pages/reference/**/*.mdx"], + "rules": { "jsx-a11y/anchor-has-content": "off", - "jsx-a11y/anchor-is-valid": "off" - } + "jsx-a11y/anchor-is-valid": "off", + }, }, { - "files": ["account-kit/wallet-client/**/*.ts"], - "excludedFiles": ["account-kit/wallet-client/dist/**"], + "files": ["packages/**/*"], "rules": { - "@typescript-eslint/consistent-type-imports": [ - "error", - { - "fixStyle": "inline-type-imports" - } - ], - "@typescript-eslint/no-import-type-side-effects": "error", - // Typebox imports break React Native bundling, so we restrict imports from wallet-api-types to type-only. - "@typescript-eslint/no-restricted-imports": [ - "error", - { - "paths": [ - { - "name": "@alchemy/wallet-api-types", - "message": "Only type imports are allowed from @alchemy/wallet-api-types to prevent React Native bundle issues. Use 'import type' instead.", - "allowTypeImports": true - }, - { - "name": "@alchemy/wallet-api-types/rpc", - "message": "Only type imports are allowed from @alchemy/wallet-api-types/rpc to prevent React Native bundle issues. Use 'import type' instead.", - "allowTypeImports": true - }, - { - "name": "@alchemy/wallet-api-types/capabilities", - "message": "Only type imports are allowed from @alchemy/wallet-api-types/capabilities to prevent React Native bundle issues. Use 'import type' instead.", - "allowTypeImports": true - } - ] - } - ] - } - } - ] + "no-warning-comments": "off", + }, + }, + ], } diff --git a/.gitattributes b/.gitattributes index 7abb6ca8ab..150824d319 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,6 @@ .site/**/*/reference/**/*.md linguist-generated site/**/*/reference/**/*.mdx linguist-generated site/sidebar/**/*.ts linguist-generated -account-kit/smart-contracts/src/msca/plugins/**/plugin.ts linguist-generated - *.pbxproj -text # specific for windows script files *.bat text eol=crlf \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2f415beaa7..62c094c752 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,7 @@ # Pull Request Checklist - [ ] Did you add new tests and confirm existing tests pass? (`yarn test`) -- [ ] Did you update relevant docs? (docs are found in the `site` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)) +- [ ] Did you update relevant docs? (docs are found in the `docs` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)) - [ ] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [ ] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [ ] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g. `feat!: breaking change`) diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index ba544e57de..1762fc0f8c 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -146,6 +146,8 @@ jobs: API_KEY: ${{ secrets.API_KEY }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ vars.TURBO_TEAM }} + TEST_ALCHEMY_API_KEY: ${{ secrets.TEST_ALCHEMY_API_KEY }} + TEST_PAYMASTER_POLICY_ID: ${{ secrets.TEST_PAYMASTER_POLICY_ID }} steps: - name: "Checkout files" uses: actions/checkout@v3 @@ -180,7 +182,7 @@ jobs: with: repo: alchemyplatform/rundler platform: linux - tag: v0.8.2 + tag: v0.11.0 cache: enable - name: Build Libraries @@ -190,37 +192,7 @@ jobs: run: yarn build:libs - name: Unit Test - run: yarn test:ci + run: ./scripts/run-affected-tests.sh "${{ github.event.pull_request.base.ref }}" - name: Typecheck Test run: yarn test:typecheck - - build_ios: - name: Build iOS - runs-on: macos-14 - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - API_KEY: ${{ secrets.API_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ vars.TURBO_TEAM }} - steps: - - name: "Checkout files" - uses: actions/checkout@v3 - with: - token: ${{ secrets.ALCHEMY_BOT_PAT }} - fetch-depth: "0" - submodules: "recursive" - - - name: Setup - uses: ./.github/actions/setup - - - name: Install cocoapods - working-directory: account-kit/rn-signer/example/ios - run: | - pod install - env: - NO_FLIPPER: 1 - - - name: Build example for iOS - run: | - yarn turbo run build:ios diff --git a/.github/workflows/publish-v5-alpha.yml b/.github/workflows/publish-v5-alpha.yml index f38dac7ebf..f37b87807c 100644 --- a/.github/workflows/publish-v5-alpha.yml +++ b/.github/workflows/publish-v5-alpha.yml @@ -32,11 +32,11 @@ jobs: packages: write steps: - # Always checkout moldy/v5-base, regardless of which branch the workflow file lives on - - name: Checkout moldy/v5-base branch + # Always checkout v5.x.x, regardless of which branch the workflow file lives on + - name: Checkout v5.x.x branch uses: actions/checkout@v3 with: - ref: moldy/v5-base + ref: v5.x.x token: ${{ secrets.ALCHEMY_BOT_PAT }} fetch-depth: "0" submodules: "recursive" @@ -165,9 +165,9 @@ jobs: echo "has_changes=true" >> $GITHUB_ENV echo "new_version=$NEW_VERSION" >> $GITHUB_ENV - # Push commit and tags to moldy/v5-base - - name: Push Changes to moldy/v5-base + # Push commit and tags to v5.x.x + - name: Push Changes to v5.x.x if: ${{ inputs.publish && env.lerna_published == 'true' && env.has_changes == 'true' }} run: | - git push origin HEAD:moldy/v5-base --follow-tags - echo "Successfully pushed version ${{ env.new_version }} to moldy/v5-base" + git push origin HEAD:v5.x.x --follow-tags + echo "Successfully pushed version ${{ env.new_version }} to v5.x.x" diff --git a/.gitignore b/.gitignore index 02c8d395e4..74ccf61827 100644 --- a/.gitignore +++ b/.gitignore @@ -24,16 +24,10 @@ yarn-error.log lerna-debug.log .tool-versions -# example ignores -examples/contracts/**/out - -site/.vitepress/dist -site/.vitepress/cache -site/**/*.js - **/userop.json -vocs.config.tsx.timestamp-*.mjs +# TypeDoc generated media (source files copied for source links) +docs/pages/reference/_media bin **/.turbo @@ -41,69 +35,10 @@ bin # Turborepo .turbo -### React Native .gitignore -# OSX -# -.DS_Store - -# XDE -.expo/ - # VSCode .vscode/ jsconfig.json -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IJ -# -.classpath -.cxx -.gradle -.idea -.project -.settings -local.properties -android.iml - -# Cocoapods -# -example/ios/Pods - -# Ruby -example/vendor/ - -# node.js -# -node_modules/ -npm-debug.log -yarn-debug.log -yarn-error.log - -# BUCK -buck-out/ -\.buckd/ -android/app/libs -android/keystores/debug.keystore - # Yarn .yarn/* !.yarn/patches @@ -112,23 +47,6 @@ android/keystores/debug.keystore !.yarn/sdks !.yarn/versions -# Expo -.expo/ - -# Turborepo -.turbo/ - -# generated by bob -lib/ - -# React Native Codegen -**/ios/generated -**/android/generated - -Pods - -vendor - .claude/settings.local.json .lycheecache diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 34c5613307..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,24 +0,0 @@ -[submodule "examples/contracts/DAAppNFT/lib/openzeppelin-contracts"] - path = examples/contracts/DAAppNFT/lib/openzeppelin-contracts - url = https://github.com/openzeppelin/openzeppelin-contracts -[submodule "examples/contracts/DAAppNFT/lib/forge-std"] - path = examples/contracts/DAAppNFT/lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "examples/contracts/DAAppNFT/lib/ds-test"] - path = examples/contracts/DAAppNFT/lib/ds-test - url = https://github.com/dapphub/ds-test -[submodule "examples/contracts/DAAppNFT/lib/solmate"] - path = examples/contracts/DAAppNFT/lib/solmate - url = https://github.com/transmissions11/solmate -[submodule "examples/contracts/AccountKitToken/lib/forge-std"] - path = examples/contracts/AccountKitToken/lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "examples/contracts/AccountKitToken/lib/openzeppelin-contracts"] - path = examples/contracts/AccountKitToken/lib/openzeppelin-contracts - url = https://github.com/openzeppelin/openzeppelin-contracts -[submodule "examples/ui-demo/contracts/lib/openzeppelin-contracts"] - path = examples/ui-demo/contracts/lib/openzeppelin-contracts - url = https://github.com/OpenZeppelin/openzeppelin-contracts -[submodule "examples/ui-demo/contracts/lib/forge-std"] - path = examples/ui-demo/contracts/lib/forge-std - url = https://github.com/foundry-rs/forge-std diff --git a/.vitest/README.md b/.vitest/README.md index 392614614c..d530c1636e 100644 --- a/.vitest/README.md +++ b/.vitest/README.md @@ -1,6 +1,6 @@ # Vitest Testing Infrastructure -This directory contains the testing infrastructure for the aa-sdk project using Vitest. +This directory contains the testing infrastructure for this repo using Vitest. ## Prerequisites diff --git a/.vitest/package.json b/.vitest/package.json index 58ec2e0158..6adec90089 100644 --- a/.vitest/package.json +++ b/.vitest/package.json @@ -13,6 +13,6 @@ "viem": "^2.45.0" }, "dependencies": { - "@aa-sdk/core": "^4.0.0-alpha.8" + "@alchemy/common": "^0.0.0-alpha.17" } } diff --git a/.vitest/setupTests.ts b/.vitest/setupTests.ts index 78fa2cd68c..ce424c0c81 100644 --- a/.vitest/setupTests.ts +++ b/.vitest/setupTests.ts @@ -4,36 +4,61 @@ dotenv.config(); import fetch from "node-fetch"; import { setAutomine } from "viem/actions"; import { beforeAll } from "vitest"; -import { poolId } from "./src/constants.js"; -import { local060Instance, local070Instance } from "./src/instances.js"; +import { + poolId, + rundlerBinaryPath, + rundlerSignerAddresses, +} from "./src/constants.js"; +import { localInstance } from "./src/instances.js"; import { paymaster060 } from "./src/paymaster/paymaster060.js"; import { paymaster070 } from "./src/paymaster/paymaster070.js"; +import { paymaster080 } from "./src/paymaster/paymaster080.js"; +import { checkFoundryInstallation } from "./src/utils/checkFoundryInstallation.js"; // @ts-expect-error this does exist but ts is not liking it global.fetch = fetch; beforeAll(async () => { - const client060 = local060Instance.getClient(); - const client070 = local070Instance.getClient(); - await setAutomine(client060, true); - await setAutomine(client070, true); + const foundryCheck = checkFoundryInstallation(rundlerBinaryPath); + if (!foundryCheck.isInstalled) { + const baseMessage = ` + ❌ Foundry/Anvil is not properly installed or not in your PATH. + Please see the README in .vitest/ for installation instructions. + Error details: ${foundryCheck.error || "Unknown error"} + `; - await paymaster060.deployPaymasterContract(client060); - await paymaster070.deployPaymasterContract(client070); + throw new Error(baseMessage); + } + + const client = localInstance.getClient(); + await setAutomine(client, true); + + // The default Anvil accounts have 7702 delegations on Sepolia, which causes + // the entry point's `beneficiary.call{value}` to revert when the bundler + // uses them as builder accounts. Clear delegations by resetting their code. + await Promise.all( + rundlerSignerAddresses.map((addr) => + client.request({ + method: "hardhat_setCode" as any, + params: [addr, "0x"], + }), + ), + ); + + await paymaster060.deployPaymasterContract(client); + await paymaster070.deployPaymasterContract(client); + await paymaster080.deployPaymasterContract(client); + // TODO paymaster for v0.9 }, 60_000); afterEach(() => { onTestFailed(async () => { console.log(`Logs for failed test [${poolId()}]:`); - console.log(await local060Instance.getLogs("anvil")); - console.log(await local060Instance.getLogs("bundler")); - - console.log(await local070Instance.getLogs("anvil")); - console.log(await local070Instance.getLogs("bundler")); + console.log(await localInstance.getLogs("anvil")); + console.log(await localInstance.getLogs("bundler")); }); }); afterAll(async () => { - await local060Instance.restart(); - await local070Instance.restart(); + await localInstance.restart(); }); diff --git a/.vitest/src/accounts.ts b/.vitest/src/accounts.ts index af3a66762b..9ccf4e446a 100644 --- a/.vitest/src/accounts.ts +++ b/.vitest/src/accounts.ts @@ -1,33 +1,28 @@ -import type { - EntryPointAbi_v6, - EntryPointAbi_v7, - SmartAccountClient, - SmartContractAccount, -} from "@aa-sdk/core"; import { encodeFunctionData, getContract, - type Chain, type Client, type PublicClient, - type Transport, + type TestClient, } from "viem"; +import type { + entryPoint06Abi, + entryPoint07Abi, + SmartAccount, + BundlerClient, +} from "viem/account-abstraction"; import { setBalance } from "viem/actions"; -export async function resetBalance< - transport extends Transport = Transport, - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount = SmartContractAccount, ->( - client: SmartAccountClient, +export async function resetBalance( + client: BundlerClient, testClient: Client & { mode: "anvil" }, ) { - const ep = client.account.getEntryPoint(); + const ep = client.account.entryPoint; const entryPointContract = getContract({ abi: - ep.version === "0.6.0" - ? (ep.abi as typeof EntryPointAbi_v6) - : (ep.abi as typeof EntryPointAbi_v7), + ep.version === "0.6" + ? (ep.abi as typeof entryPoint06Abi) + : (ep.abi as typeof entryPoint07Abi), client: client as unknown as PublicClient, address: ep.address, }); @@ -37,22 +32,24 @@ export async function resetBalance< ]); if (balance > 0n) { - const { hash } = await client.sendUserOperation({ - uo: { - target: ep.address, - data: encodeFunctionData({ - abi: entryPointContract.abi, - functionName: "withdrawTo", - args: [client.account.address, balance], - }), - }, + const hash = await client.sendUserOperation({ + calls: [ + { + to: ep.address, + data: encodeFunctionData({ + abi: entryPointContract.abi, + functionName: "withdrawTo", + args: [client.account.address, balance], + }), + }, + ], account: client.account, }); - await client.waitForUserOperationTransaction({ hash }); + await client.waitForUserOperationReceipt({ hash }); } - await setBalance(testClient, { + await setBalance(testClient as TestClient, { address: client.account.address, value: 0n, }); diff --git a/.vitest/src/constants.ts b/.vitest/src/constants.ts index 16f291ff6b..b44f632921 100644 --- a/.vitest/src/constants.ts +++ b/.vitest/src/constants.ts @@ -28,3 +28,22 @@ export const accounts = { export const entrypoint060 = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"; export const entrypoint070 = "0x0000000071727De22E5E9d8BAf0edAc6f37da032"; +export const entrypoint080 = "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"; + +/** Default Anvil private keys used as rundler builder/signer accounts. */ +export const rundlerSignerKeys = [ + "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", + "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", + "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", + "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", + "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a", + "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba", + "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e", + "0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356", + "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97", + "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6", +] as const; + +export const rundlerSignerAddresses = rundlerSignerKeys.map( + (key) => privateKeyToAccount(key).address, +); diff --git a/.vitest/src/instances.ts b/.vitest/src/instances.ts index b275bdf4d8..f31c20d179 100644 --- a/.vitest/src/instances.ts +++ b/.vitest/src/instances.ts @@ -3,41 +3,35 @@ dotenv.config(); import getPort from "get-port"; import { createServer } from "prool"; -import { anvil } from "prool/instances"; -import { createClient, http, type Chain, type ClientConfig } from "viem"; +import { anvil, type AnvilParameters } from "prool/instances"; +import { + createClient, + http, + type Chain, + type ClientConfig, + custom, + type CustomTransport, + type Transport, +} from "viem"; import { localhost } from "viem/chains"; -import { split } from "../../aa-sdk/core/src/transport/split"; import { poolId, rundlerBinaryPath } from "./constants"; import { paymasterTransport } from "./paymaster/transport"; import { rundler } from "./rundler/instance"; -export const local060Instance = defineInstance({ +export const localInstance = defineInstance({ chain: localhost, - forkBlockNumber: 6381303, + forkBlockNumber: 10043061, forkUrl: process.env.VITEST_SEPOLIA_FORK_URL ?? "https://ethereum-sepolia-rpc.publicnode.com", - entryPointVersion: "0.6.0", - anvilPort: 8545, - bundlerPort: 8645, -}); - -export const local070Instance = defineInstance({ - chain: localhost, - forkBlockNumber: 8805588, - forkUrl: - process.env.VITEST_SEPOLIA_FORK_URL ?? - "https://ethereum-sepolia-rpc.publicnode.com", - entryPointVersion: "0.7.0", - anvilPort: 8345, - bundlerPort: 8445, + anvilPort: 18545, + bundlerPort: 18546, }); type DefineInstanceParams = { chain: Chain; forkUrl: string; forkBlockNumber?: number; - entryPointVersion: "0.6.0" | "0.7.0"; anvilPort: number; bundlerPort: number; useLocalRunningInstance?: boolean; @@ -56,11 +50,44 @@ const bundlerMethods = [ "rundler_maxPriorityFeePerGas", ]; +const split = (params: { + overrides: { + methods: string[]; + transport: Transport; + }[]; + fallback: Transport; +}): CustomTransport => { + const overrideMap = params.overrides.reduce((accum, curr) => { + curr.methods.forEach((method) => { + if (accum.has(method) && accum.get(method) !== curr.transport) { + throw new Error( + "A method cannot be handled by more than one transport", + ); + } + + accum.set(method, curr.transport); + }); + + return accum; + }, new Map()); + + return (opts) => + custom({ + request: async (args) => { + const transportOverride = overrideMap.get(args.method); + if (transportOverride != null) { + return transportOverride(opts).request(args); + } + + return params.fallback(opts).request(args); + }, + })(opts); +}; + function defineInstance(params: DefineInstanceParams) { const { anvilPort, bundlerPort, - entryPointVersion, forkUrl, forkBlockNumber, chain: chain_, @@ -137,6 +164,9 @@ function defineInstance(params: DefineInstanceParams) { forkUrl: forkUrl, forkBlockNumber, chainId: chain.id, + // "Prague" isn't an available option here since Anvil + // hasn't been updated for a while, but it works fine. + hardfork: "Prague" as AnvilParameters["hardfork"], }), port: anvilPort, }); @@ -146,9 +176,6 @@ function defineInstance(params: DefineInstanceParams) { rundler( { binary: rundlerBinaryPath, - // ...(entryPointVersion === "0.6.0" - // ? { disableEntryPointV0_7: true } - // : { disableEntryPointV0_6: true }), nodeHttp: `http://127.0.0.1:${anvilPort}/${key}`, rpc: { api: "eth,rundler,debug", diff --git a/.vitest/src/paymaster/base.ts b/.vitest/src/paymaster/base.ts index a19a277da8..a468a48633 100644 --- a/.vitest/src/paymaster/base.ts +++ b/.vitest/src/paymaster/base.ts @@ -1,4 +1,3 @@ -import { type UserOperationRequest } from "@aa-sdk/core"; import { concat, encodeAbiParameters, @@ -10,9 +9,11 @@ import { type Address, type Client, type Hex, + type RpcUserOperation, + type TestClient, } from "viem"; import { - getBytecode, + getCode, sendTransaction, setBalance, waitForTransactionReceipt, @@ -21,10 +22,10 @@ import { accounts, create2deployer } from "../constants"; import { ERC1967ProxyAbi } from "../Proxy"; import type { Paymaster } from "./types"; import type { VerifyingPaymaster060Abi } from "./VerifyingPaymaster060"; -import type { VerifyingPaymaster070Abi } from "./VerifyingPaymaster070"; +import { VerifyingPaymaster070Abi } from "./VerifyingPaymaster070"; type ToPaymasterArgs = { - entryPointVersion: "0.6.0" | "0.7.0"; + entryPointVersion: "0.6.0" | "0.7.0" | "0.8.0"; entryPointAddress: Address; abi: typeof VerifyingPaymaster060Abi | typeof VerifyingPaymaster070Abi; dummyData: Hex; @@ -33,7 +34,7 @@ type ToPaymasterArgs = { ) => { paymasterAndData: Hex } | { paymaster: Address; paymasterData: Hex }; getPaymasterData: ( self: Paymaster, - uo: UserOperationRequest, + uo: RpcUserOperation, client: Client & { mode: "anvil" }, ) => Promise< { paymasterAndData: Hex } | { paymaster: Address; paymasterData: Hex } @@ -51,6 +52,7 @@ export const toPaymaster = (args: ToPaymasterArgs): Paymaster => { const paymaster: Paymaster = { ...rest, + isV07Abi: abi === VerifyingPaymaster070Abi, getPaymasterData(uo, client) { return getPaymasterData_(paymaster, uo, client); }, @@ -59,7 +61,7 @@ export const toPaymaster = (args: ToPaymasterArgs): Paymaster => { }, async deployPaymasterContract(client) { // give the owner some ether - await setBalance(client, { + await setBalance(client as TestClient, { address: accounts.paymasterOwner.address, value: parseEther("10"), }); @@ -68,7 +70,7 @@ export const toPaymaster = (args: ToPaymasterArgs): Paymaster => { const { address: implAddress, calldata: implCalldata } = this.getPaymasterImplDetails(); - const paymasterImplBytecode = await getBytecode(client, { + const paymasterImplBytecode = await getCode(client, { address: implAddress, }); @@ -87,7 +89,7 @@ export const toPaymaster = (args: ToPaymasterArgs): Paymaster => { const { address: proxyAddress, calldata: proxyCalldata } = this.getPaymasterDetails(); - const proxyBytecode = await getBytecode(client, { + const proxyBytecode = await getCode(client, { address: proxyAddress, }); @@ -111,7 +113,7 @@ export const toPaymaster = (args: ToPaymasterArgs): Paymaster => { address: proxyAddress, }); - await setBalance(client, { + await setBalance(client as TestClient, { address: proxyAddress, value: parseEther("5"), }); @@ -138,7 +140,6 @@ export const toPaymaster = (args: ToPaymasterArgs): Paymaster => { abi: abi.abi, functionName: "initialize", args: [ - // for now this just deploy 0.6.0 entrypoint, // signer, owner, pauser accounts.paymasterOwner.address, diff --git a/.vitest/src/paymaster/paymaster060.ts b/.vitest/src/paymaster/paymaster060.ts index f65c9da0fe..d4f4f6ee8b 100644 --- a/.vitest/src/paymaster/paymaster060.ts +++ b/.vitest/src/paymaster/paymaster060.ts @@ -1,4 +1,4 @@ -import { concat, encodePacked, getContract, type Hex } from "viem"; +import { concat, encodePacked, getContract } from "viem"; import { accounts, entrypoint060 } from "../constants"; import { toPaymaster } from "./base"; import type { Paymaster } from "./types"; @@ -40,7 +40,7 @@ export const paymaster060: Paymaster = toPaymaster({ const paymasterAndData = encodePacked( ["address", "uint256", "bytes"], [address, expiry, signature], - ) as Hex; + ); return { paymasterAndData }; }, diff --git a/.vitest/src/paymaster/paymaster070.ts b/.vitest/src/paymaster/paymaster070.ts index 1be5c17584..b483d909e2 100644 --- a/.vitest/src/paymaster/paymaster070.ts +++ b/.vitest/src/paymaster/paymaster070.ts @@ -1,9 +1,11 @@ import { - deepHexlify, - resolveProperties, - type UserOperationRequest_v7, -} from "@aa-sdk/core"; -import { concat, encodeAbiParameters, keccak256, pad, toHex } from "viem"; + concat, + encodeAbiParameters, + keccak256, + pad, + toHex, + type RpcUserOperation, +} from "viem"; import { accounts, entrypoint070 } from "../constants"; import { toPaymaster } from "./base"; import type { Paymaster } from "./types"; @@ -22,12 +24,8 @@ export const paymaster070: Paymaster = toPaymaster({ return { paymaster: address, paymasterData: dummyData }; }, - async getPaymasterData(self, uo_, client) { + async getPaymasterData(self, uo: RpcUserOperation<"0.7">, client) { const { address } = self.getPaymasterDetails(); - const uo = deepHexlify( - // @ts-ignore - await resolveProperties(uo_), - ) as UserOperationRequest_v7; const validUntil = 0n; const validFrom = 0n; diff --git a/.vitest/src/paymaster/paymaster080.ts b/.vitest/src/paymaster/paymaster080.ts new file mode 100644 index 0000000000..2a8858ae06 --- /dev/null +++ b/.vitest/src/paymaster/paymaster080.ts @@ -0,0 +1,90 @@ +import { + concat, + encodeAbiParameters, + keccak256, + pad, + toHex, + type RpcUserOperation, +} from "viem"; +import { accounts, entrypoint080 } from "../constants"; +import { toPaymaster } from "./base"; +import type { Paymaster } from "./types"; +import { VerifyingPaymaster070Abi } from "./VerifyingPaymaster070"; + +export const paymaster080: Paymaster = toPaymaster({ + entryPointVersion: "0.8.0", + entryPointAddress: entrypoint080, + abi: VerifyingPaymaster070Abi, + dummyData: concat([ + "0xffffffffffffffffffffffff", + "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c", + ]), + getPaymasterStubData(self) { + const { address, dummyData } = self.getPaymasterDetails(); + + return { paymaster: address, paymasterData: dummyData }; + }, + async getPaymasterData(self, uo: RpcUserOperation<"0.7">, client) { + const { address } = self.getPaymasterDetails(); + + const validUntil = 0n; + const validFrom = 0n; + const expiryPacked = + (validUntil << BigInt(160)) | (validFrom << BigInt(160 + 48)); + + const encoding = keccak256( + encodeAbiParameters( + [ + { type: "address" }, + { type: "uint256" }, + { type: "bytes32" }, + { type: "bytes32" }, + { type: "bytes32" }, + { type: "uint256" }, + { type: "bytes32" }, + { type: "bytes32" }, + { type: "address" }, + { type: "uint" }, + { type: "uint256" }, + ], + [ + uo.sender, + BigInt(uo.nonce), + keccak256(uo.factory ? concat([uo.factory, uo.factoryData!]) : "0x"), + keccak256(uo.callData), + concat([ + pad(uo.verificationGasLimit, { dir: "left", size: 16 }), + pad(uo.callGasLimit, { dir: "left", size: 16 }), + ]), + BigInt(uo.preVerificationGas), + concat([ + pad(uo.maxPriorityFeePerGas, { dir: "left", size: 16 }), + pad(uo.maxFeePerGas, { dir: "left", size: 16 }), + ]), + concat([ + pad(uo.paymasterVerificationGasLimit ?? "0x0", { + dir: "left", + size: 16, + }), + pad(uo.paymasterPostOpGasLimit ?? "0x0", { dir: "left", size: 16 }), + ]), + entrypoint080, + BigInt(client.chain!.id), + expiryPacked, + ], + ), + ); + + const signature = await accounts.paymasterOwner.signMessage({ + message: { raw: encoding }, + }); + + const paymasterData = concat([ + toHex(validFrom, { size: 6 }), + toHex(validUntil, { size: 6 }), + signature, + ]); + + return { paymaster: address, paymasterData }; + }, +}); diff --git a/.vitest/src/paymaster/transport.ts b/.vitest/src/paymaster/transport.ts index 5a0317b5e0..a156efe5f7 100644 --- a/.vitest/src/paymaster/transport.ts +++ b/.vitest/src/paymaster/transport.ts @@ -1,85 +1,170 @@ -import { - type UserOperationRequest, - type UserOperationOverrides, - bigIntMultiply, - deepHexlify, -} from "@aa-sdk/core"; import { type Address, type Client, type Hex, + type RpcUserOperation, custom, hexToBigInt, toHex, + type StateOverride, + type UserOperation, + type EntryPointVersion, + type NoUndefined, } from "viem"; +import { + estimateUserOperationGas, + formatUserOperation, + type SmartAccount, +} from "viem/account-abstraction"; import { paymaster060 } from "./paymaster060"; import { paymaster070 } from "./paymaster070"; -import { estimateUserOperationGas } from "../../../aa-sdk/core/src/actions/bundler/estimateUserOperationGas"; +import { paymaster080 } from "./paymaster080"; +import { bigIntMultiply } from "@alchemy/common"; + +interface Multiplier { + multiplier: number; +} + +type UserOperationPaymasterOverrides< + TEntryPointVersion extends EntryPointVersion = EntryPointVersion, +> = TEntryPointVersion extends "0.6" + ? { + // paymasterData overrides to bypass paymaster middleware + paymasterAndData: Hex; + } + : TEntryPointVersion extends "0.7" + ? { + // paymasterData overrides to bypass paymaster middleware + // if set to '0x', all paymaster related fields are omitted from the user op request + paymasterData: Hex; + paymaster: Address; + paymasterVerificationGasLimit: + | NoUndefined["paymasterVerificationGasLimit"]> + | Multiplier; + paymasterPostOpGasLimit: + | NoUndefined["paymasterPostOpGasLimit"]> + | Multiplier; + } + : {}; + +type UserOperationOverrides< + TEntryPointVersion extends EntryPointVersion = EntryPointVersion, +> = Partial< + { + callGasLimit: + | UserOperation["callGasLimit"] + | Multiplier; + maxFeePerGas: + | UserOperation["maxFeePerGas"] + | Multiplier; + maxPriorityFeePerGas: + | UserOperation["maxPriorityFeePerGas"] + | Multiplier; + preVerificationGas: + | UserOperation["preVerificationGas"] + | Multiplier; + verificationGasLimit: + | UserOperation["verificationGasLimit"] + | Multiplier; + + /** + * The same state overrides for + * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method. + * An address-to-state mapping, where each entry specifies some state to be ephemerally overridden + * prior to executing the call. State overrides allow you to customize the network state for + * the purpose of the simulation, so this feature is useful when you need to estimate gas + * for user operation scenarios under conditions that aren’t currently present on the live network. + */ + stateOverride: StateOverride; + } & UserOperationPaymasterOverrides +> & + /** + * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce` + * It is useful when you want to use parallel nonces for user operations + * + * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include + * one user operation for your account in a bundle + */ + Partial< + | { + nonceKey: bigint; + nonce: never; + } + | { nonceKey: never; nonce: bigint } + >; export const paymasterTransport = ( client: Client & { mode: "anvil" }, - bundlerClient: Client & { mode: "bundler" }, + bundlerClient: Client & { + mode: "bundler"; + }, ) => custom({ request: async (args) => { if (args.method === "pm_getPaymasterStubData") { - const [, entrypoint] = args.params as [ - UserOperationRequest, + const [, entrypoint, , context] = args.params as [ + RpcUserOperation, Address, Hex, - Record, + { policyId?: string | string[] }, ]; + if (!context.policyId?.length) { + throw new Error("policyId is required for paymaster sponsorship"); + } + try { - if ( - entrypoint.toLowerCase() === - paymaster060.entryPointAddress.toLowerCase() - ) { - return paymaster060.getPaymasterStubData(); - } else { - return paymaster070.getPaymasterStubData(); - } + const paymaster = getPaymasterForAddress(entrypoint); + return paymaster.getPaymasterStubData(); } catch (e) { console.log(e); throw e; } } else if (args.method === "pm_getPaymasterData") { - const [uo, entrypoint] = args.params as [ - UserOperationRequest, + const [uo, entrypoint, , context] = args.params as [ + RpcUserOperation, Address, Hex, - Record, + { policyId?: string | string[] }, ]; + if (!context.policyId?.length) { + throw new Error("policyId is required for paymaster sponsorship"); + } + try { - if ( - entrypoint.toLowerCase() === - paymaster060.entryPointAddress.toLowerCase() - ) { - return paymaster060.getPaymasterData(uo, client); - } else { - return paymaster070.getPaymasterData(uo, client); - } + const paymaster = getPaymasterForAddress(entrypoint); + return paymaster.getPaymasterData(uo, client); } catch (e) { console.log(e); throw e; } } else if (args.method === "alchemy_requestGasAndPaymasterAndData") { try { - const [{ userOperation, entryPoint, overrides }] = args.params as [ - { - policyId: string; - entryPoint: Address; - dummySignature: Hex; - userOperation: UserOperationRequest; - overrides?: UserOperationOverrides; - }, - ]; - const isPMv7 = - entryPoint.toLowerCase() === - paymaster070.entryPointAddress.toLowerCase(); + // There's some bad type-casting happening here as of SDKv5, because viem and aa-sdk/core's concept of a + // RpcUserOperation is slightly different, but so far the only issue we've needed to patch is loading + // the dummy signature into the UO's signature. More may come up as we increase test coverage. + const [{ userOperation, entryPoint, dummySignature, overrides }] = + args.params as [ + { + policyId: string; + entryPoint: Address; + dummySignature: Hex; + userOperation: RpcUserOperation; + overrides?: UserOperationOverrides; + erc20Context?: { + tokenAddress: Address; + maxTokenAmount?: string; + }; + }, + ]; - let uo = { ...userOperation }; + const paymaster = getPaymasterForAddress(entryPoint); + + let uo: RpcUserOperation = { + ...userOperation, + signature: userOperation.signature ?? dummySignature, + }; const maxFeePerGas: Hex = toHex( bigIntMultiply( @@ -94,43 +179,48 @@ export const paymasterTransport = ( const maxPriorityFeePerGas = await bundlerClient.request<{ Parameters: []; - ReturnType: UserOperationRequest["maxPriorityFeePerGas"]; + ReturnType: RpcUserOperation["maxPriorityFeePerGas"]; }>({ method: "rundler_maxPriorityFeePerGas", params: [], }); - const stubData = isPMv7 - ? paymaster070.getPaymasterStubData() - : paymaster060.getPaymasterStubData(); + const stubData = paymaster.getPaymasterStubData(); + // RpcUserOperation is a discriminated union (v0.6 vs v0.7), so we need to assert + // when merging fields from different sources (stubData varies by version). uo = { ...uo, maxFeePerGas, maxPriorityFeePerGas, ...stubData, - }; + } as RpcUserOperation; - const gasEstimates = deepHexlify( - await estimateUserOperationGas(bundlerClient, { - request: uo, - entryPoint, - }), + const gasEstimatesRaw = await estimateUserOperationGas( + bundlerClient, + { + ...formatUserOperation(uo), + entryPointAddress: entryPoint, + }, + ); + const gasEstimates = Object.fromEntries( + Object.entries(gasEstimatesRaw).map(([k, v]) => [ + k, + typeof v === "bigint" ? toHex(v) : v, + ]), ); uo = { ...uo, ...gasEstimates, - ...(isPMv7 + ...(paymaster.isV07Abi ? { paymasterPostOpGasLimit: toHex(0), } : {}), - }; + } as RpcUserOperation; - const pmFields = isPMv7 - ? await paymaster070.getPaymasterData(uo, client) - : await paymaster060.getPaymasterData(uo, client); + const pmFields = await paymaster.getPaymasterData(uo, client); return { ...uo, @@ -146,3 +236,18 @@ export const paymasterTransport = ( throw new Error("Method not found"); }, }); + +const getPaymasterForAddress = (address: Address) => { + if (address.toLowerCase() === paymaster060.entryPointAddress.toLowerCase()) { + return paymaster060; + } else if ( + address.toLowerCase() === paymaster070.entryPointAddress.toLowerCase() + ) { + return paymaster070; + } else if ( + address.toLowerCase() === paymaster080.entryPointAddress.toLowerCase() + ) { + return paymaster080; + } + throw new Error(`Paymaster not found for address ${address}`); +}; diff --git a/.vitest/src/paymaster/types.ts b/.vitest/src/paymaster/types.ts index f8068f553c..1b10b10541 100644 --- a/.vitest/src/paymaster/types.ts +++ b/.vitest/src/paymaster/types.ts @@ -1,8 +1,7 @@ -import type { UserOperationRequest } from "@aa-sdk/core"; -import type { Address, Client, Hex } from "viem"; +import type { Address, Client, Hex, RpcUserOperation } from "viem"; export type Paymaster = { - entryPointVersion: "0.6.0" | "0.7.0"; + entryPointVersion: "0.6.0" | "0.7.0" | "0.8.0"; entryPointAddress: Address; getPaymasterStubData: () => | { @@ -10,7 +9,7 @@ export type Paymaster = { } | { paymaster: Address; paymasterData: Hex }; getPaymasterData: ( - uo: UserOperationRequest, + uo: RpcUserOperation, client: Client & { mode: "anvil" }, ) => Promise< { paymasterAndData: Hex } | { paymaster: Address; paymasterData: Hex } @@ -31,4 +30,5 @@ export type Paymaster = { bytecode: Hex; calldata: Hex; }; + isV07Abi: boolean; }; diff --git a/.vitest/src/rundler/binary.ts b/.vitest/src/rundler/binary.ts index 7a9c298f04..1703f4902d 100644 --- a/.vitest/src/rundler/binary.ts +++ b/.vitest/src/rundler/binary.ts @@ -22,7 +22,7 @@ export async function cleanupRundler(rundlerPath: string) { export async function downloadLatestRundlerRelease( filePath: string, - version = "v0.8.2", + version = "v0.11.0", ) { const repoUrl = "https://api.github.com/repos/alchemyplatform/rundler/releases"; @@ -30,7 +30,11 @@ export async function downloadLatestRundlerRelease( try { // Get the list of releases from GitHub API - const releasesResponse = await fetch(repoUrl); + const releasesResponse = await fetch(repoUrl, { + headers: process.env.GH_AUTH_TOKEN + ? { Authorization: `Bearer ${process.env.GH_AUTH_TOKEN}` } + : undefined, + }); if (!releasesResponse.ok) { throw new Error( `Failed to fetch releases: ${releasesResponse.statusText}`, @@ -95,6 +99,7 @@ export async function downloadLatestRundlerRelease( const tarStream = tar.extract({ cwd: extractPath, }); + // @ts-ignore - This has a type error, but has always worked fine? await streamPipeline(assetResponse.body, gunzipStream, tarStream); } catch (error) { throw new Error(`Failed to download the latest release. ${error}`); diff --git a/.vitest/src/rundler/instance.test.ts b/.vitest/src/rundler/instance.test.ts index e47cf6dc6d..a619551766 100644 --- a/.vitest/src/rundler/instance.test.ts +++ b/.vitest/src/rundler/instance.test.ts @@ -31,16 +31,15 @@ describe("instance: 'rundler'", async () => { method: "POST", }); expect(response.status).toBe(200); - expect(await response.json()).toMatchInlineSnapshot(` - { - "id": 0, - "jsonrpc": "2.0", - "result": [ - "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", - "0x0000000071727De22E5E9d8BAf0edAc6f37da032", - ], - } - `); + const supportedEps = (await response.json()).result.sort(); + expect(supportedEps).toEqual( + [ + "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", + "0x433709009B8330FDa32311DF1C2AFA402eD8D009", + "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108", + ].sort(), + ); await stop(); }); }); @@ -59,6 +58,8 @@ export const rundlerOptions = ({ privateKeys: [ "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", + "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", + "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", ], }, }); diff --git a/.vitest/src/rundler/instance.ts b/.vitest/src/rundler/instance.ts index b27d43f0c6..36ef17da68 100644 --- a/.vitest/src/rundler/instance.ts +++ b/.vitest/src/rundler/instance.ts @@ -2,6 +2,7 @@ import getPort from "get-port"; import { defineInstance } from "prool"; import { execa } from "prool/processes"; +import { rundlerSignerKeys } from "../constants"; import { toArgs } from "./toArgs"; export type RundlerParameters = { @@ -132,12 +133,6 @@ export type RundlerParameters = { */ mempoolConfigPath?: string; - /** - * Disables entry point version v0.6. - * @default false - */ - disableEntryPointV0_6?: boolean; - /** * The number of builder accounts to use for entry point version v0.6. * @@ -146,16 +141,28 @@ export type RundlerParameters = { numBuildersV0_6?: number; /** - * Disables entry point version v0.7. - * @default false + * The number of builder accounts to use for entry point version v0.7. + * @default 1 */ - disableEntryPointV0_7?: boolean; + numBuildersV0_7?: number; /** - * The number of builder accounts to use for entry point version v0.7. + * The number of builder accounts to use for entry point version v0.8. * @default 1 */ - numBuildersV0_7?: number; + numBuildersV0_8?: number; + + /** + * The number of builder accounts to use for entry point version v0.9. + * @default 1 + */ + numBuildersV0_9?: number; + + /** + * The entry points to enable. + * @default "v0.7" + */ + enabledEntryPoints?: ("v0.6" | "v0.7" | "v0.8" | "v0.9")[]; metrics?: { /** @@ -428,7 +435,7 @@ export type RundlerParameters = { export const rundler = defineInstance((parameters?: RundlerParameters) => { const { binary = "rundler", - logLevel = "debug", + logLevel = "info", chainId, ...args } = (parameters ?? {}) as RundlerParameters; @@ -450,22 +457,12 @@ export const rundler = defineInstance((parameters?: RundlerParameters) => { async start({ port = args.rpc?.port ?? 3000 }, options) { const args_ = { ...args, + enabledEntryPoints: ["v0.6", "v0.7", "v0.8", "v0.9"], builder: { ...args.builder, }, signer: { - privateKeys: args.signer?.privateKeys ?? [ - "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", - "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", - "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", - "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", - "0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a", - "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba", - "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e", - "0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356", - "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97", - "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6", - ], + privateKeys: args.signer?.privateKeys ?? [...rundlerSignerKeys], }, maxVerificationGas: args.maxVerificationGas ?? 10000000, network: args.network ?? "dev", diff --git a/.vitest/src/rundler/toArgs.ts b/.vitest/src/rundler/toArgs.ts index 305c554e8d..2ab7fee1d2 100644 --- a/.vitest/src/rundler/toArgs.ts +++ b/.vitest/src/rundler/toArgs.ts @@ -21,7 +21,7 @@ export function toArgs( return Object.entries(obj).flatMap(([key, value]) => { if (value === undefined) return []; - if (Array.isArray(value)) return [toFlagCase(key), value.join(",")]; + if (Array.isArray(value)) return [toFlagCase(key, "_"), value.join(",")]; if (typeof value === "object" && value !== null) { return Object.entries(value).flatMap(([subKey, subValue]) => { diff --git a/.vitest/src/utils/checkFoundryInstallation.ts b/.vitest/src/utils/checkFoundryInstallation.ts new file mode 100644 index 0000000000..fb1156b059 --- /dev/null +++ b/.vitest/src/utils/checkFoundryInstallation.ts @@ -0,0 +1,49 @@ +import { execSync } from "child_process"; + +export interface FoundryCheckResult { + isInstalled: boolean; + anvilVersion?: string; + rundlerBinaryPath?: string; + error?: string; +} + +export function checkFoundryInstallation( + rundlerBinary?: string, +): FoundryCheckResult { + try { + // Check anvil installation + const anvilVersion = execSync("anvil --version", { + encoding: "utf-8", + timeout: 5000, + stdio: ["ignore", "pipe", "ignore"], + }).trim(); + + // Check rundler binary if provided + let rundlerBinaryPath: string | undefined; + if (rundlerBinary) { + try { + execSync(`${rundlerBinary} --version`, { + encoding: "utf-8", + timeout: 5000, + stdio: ["ignore", "pipe", "ignore"], + }); + rundlerBinaryPath = rundlerBinary; + } catch { + // Rundler check failed but anvil is available + } + } + + return { + isInstalled: true, + anvilVersion, + rundlerBinaryPath, + }; + } catch (error) { + const errorMessage = error instanceof Error ? error.message : String(error); + + return { + isInstalled: false, + error: errorMessage, + }; + } +} diff --git a/.vitest/vitest.config.ts b/.vitest/vitest.config.ts index b00f6e88ad..51caa65628 100644 --- a/.vitest/vitest.config.ts +++ b/.vitest/vitest.config.ts @@ -8,7 +8,7 @@ export default mergeConfig( sharedConfig, defineProject({ test: { - name: "account-kit/testing", + name: "alchemy/sdk-testing", }, }), ); diff --git a/.vitest/vitest.e2e.config.ts b/.vitest/vitest.e2e.config.ts new file mode 100644 index 0000000000..8deb3ec26f --- /dev/null +++ b/.vitest/vitest.e2e.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from "vitest/config"; +import { join } from "node:path"; + +// Minimal vitest config for only running e2e tests, skipping the global setup defined in the main `vitest.config.ts`. +export default defineConfig({ + test: { + include: ["**/*.e2e.test.ts"], + globals: true, + alias: { + "~test": join(__dirname, "./src"), + }, + }, +}); diff --git a/LICENSE b/LICENSE index 78e04766d4..38f99ca357 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Alchemy Insights, Inc. +Copyright (c) 2026 Alchemy Insights, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 6e368e7fb6..eece8dbe92 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,21 @@ -# Smart Wallets +# Alchemy Smart Wallets SDK -Build zero friction sign up and transaction flows with smart accounts. Sign up with email, login with passkeys, transact with sponsored gas, and checkout in one click with transaction batching. +Build zero-friction sign-up and transaction flows with smart accounts. Sign up with email, login with passkeys, transact with sponsored gas, and checkout in one click with transaction batching. -This repo contains all of the packages that make up Smart Wallets as well as the core AA SDK that Smart Wallets is built on top of. These packages allow you to build your app on top of Account Abstraction, offering you everything from a fully integrated solution through React Components down to the low level clients and interfaces you need to have full control over development! +Built on top of [viem](https://viem.sh/) and the ERC-4337 standard, this SDK is modular at every layer and can be extended to fit your custom needs. -## @account-kit/\* +## Packages -Account Kit packages are all prefixed with `@account-kit` are broken down into the following packages: - -1. [`@account-kit/react`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/react) -1. [`@account-kit/core`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/core) -1. [`@account-kit/infra`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/infra) -1. [`@account-kit/signer`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/signer) -1. [`@account-kit/smart-contracts`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/smart-contracts) -1. [`@account-kit/privy-integration`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/privy-integration) - -## @aa-sdk/\* - -The `aa-sdk` is a type-safe and performant suite of TypeScript SDKs built on top of [viem](https://viem.sh/) to provide ergonomic methods for sending user operations, sponsoring gas, and deploying smart accounts. It handles all the complexity of ERC-4337 under the hood to make account abstraction simple. - -There are currently 2 SDKs that are part of the `aa-sdk` suite: - -1. [`@aa-sdk/core`](https://github.com/alchemyplatform/aa-sdk/tree/main/aa-sdk/core) -1. [`@aa-sdk/ethers`](https://github.com/alchemyplatform/aa-sdk/tree/main/aa-sdk/ethers) - -The core SDK also implements an EIP-1193 provider interface to easily plug into any popular dapp or wallet connect libraries such as RainbowKit, Wagmi, and Web3Modal. It also includes [`ethers.js`](https://docs.ethers.org/v5/) adapters to provide full support for `ethers.js`` apps. - -The `aa-sdk` is modular at every layer of the stack and can be easily extended to fit your custom needs. You can plug in any [smart account](https://www.alchemy.com/docs/wallets/smart-contracts/choosing-a-smart-account#bring-your-own-smart-account) implementation, [Signer](https://www.alchemy.com/docs/wallets/signer/what-is-a-signer), [Gas Manager API](https://www.alchemy.com/docs/wallets/transactions/sponsor-gas) and RPC Provider. +| Package | Description | +| ---------------------------------------------------- | -------------------------------------------------------------------------------------- | +| [`@alchemy/common`](packages/common) | Shared foundation: Alchemy transport, auth, chain registry, errors, and logging | +| [`@alchemy/aa-infra`](packages/aa-infra) | Bundler infrastructure: Rundler fee estimation and RPC types | +| [`@alchemy/smart-accounts`](packages/smart-accounts) | Smart account implementations: LightAccount, Modular Account v1/v2, and modules | +| [`@alchemy/wallet-apis`](packages/wallet-apis) | High-level Wallet API client: EIP-7702 smart wallets, signing, and transaction sending | ## Getting started -Check out this [quickstart guide](https://www.alchemy.com/docs/wallets/react/quickstart) to get started. +Check out the [quickstart guide](https://www.alchemy.com/docs/wallets/react/quickstart) to get started. ## Contributing diff --git a/aa-sdk/core/CHANGELOG.md b/aa-sdk/core/CHANGELOG.md deleted file mode 100644 index 2f41df5145..0000000000 --- a/aa-sdk/core/CHANGELOG.md +++ /dev/null @@ -1,1499 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -### Bug Fixes - -- use wallet apis to wait for call status in useSendUserOperation ([#2162](https://github.com/alchemyplatform/aa-sdk/issues/2162)) ([958378d](https://github.com/alchemyplatform/aa-sdk/commit/958378de001ecda7cb50b2aaacd8fc0e9e75d423)) - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -### Bug Fixes - -- reduce rpc calls when using 7702 ([#2155](https://github.com/alchemyplatform/aa-sdk/issues/2155)) ([280ee4b](https://github.com/alchemyplatform/aa-sdk/commit/280ee4bc5f71a3f57492424df526f4313ad5afb1)) - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- add signAuthorization method to WalletClientSigner ([#2128](https://github.com/alchemyplatform/aa-sdk/issues/2128)) ([fb8ea39](https://github.com/alchemyplatform/aa-sdk/commit/fb8ea3995b8a9fa04d9e4ecd4f154e6b68258633)) -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -### Bug Fixes - -- address race condition between preview env and link check ([#2082](https://github.com/alchemyplatform/aa-sdk/issues/2082)) ([72df7e6](https://github.com/alchemyplatform/aa-sdk/commit/72df7e628fbb7ce28ab66ddbab148171cbf00f84)) - -### Features - -- server signing ([#2043](https://github.com/alchemyplatform/aa-sdk/issues/2043)) ([8797f63](https://github.com/alchemyplatform/aa-sdk/commit/8797f6342a8934dbe57c5e029599d02d56ce8145)) - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -### Features - -- **flashblock:** add tag to eth_getUserOperationReceipt ([#2005](https://github.com/alchemyplatform/aa-sdk/issues/2005)) ([f099aea](https://github.com/alchemyplatform/aa-sdk/commit/f099aea0b5524d65604b5775002aded147b40f97)) - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -### Features - -- new hooks accept old client for account ([#1974](https://github.com/alchemyplatform/aa-sdk/issues/1974)) ([19d0365](https://github.com/alchemyplatform/aa-sdk/commit/19d036564bca2ea5adf912c3122e619cbf69fb5a)) - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -### Bug Fixes - -- respect retryCount on alchemy transport & in alchemy smart account client ([#1841](https://github.com/alchemyplatform/aa-sdk/issues/1841)) ([cba003f](https://github.com/alchemyplatform/aa-sdk/commit/cba003f897b26890cb9f6cf7e107444603751e53)) - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -### Bug Fixes - -- skip dummy 7702 auth if already delegated ([#1766](https://github.com/alchemyplatform/aa-sdk/issues/1766)) ([14187f8](https://github.com/alchemyplatform/aa-sdk/commit/14187f8b87224d8730da2919575ac753626461eb)) - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -### Bug Fixes - -- **middleware:** fix the 7677 middleware to use returned gas limits in pm_getPaymasterData ([146f548](https://github.com/alchemyplatform/aa-sdk/commit/146f548eb760caf91b987c1abe81a21cc7d1290f)) - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -### Features - -- adds webauthn session key support ([#1563](https://github.com/alchemyplatform/aa-sdk/issues/1563)) ([326d660](https://github.com/alchemyplatform/aa-sdk/commit/326d6605a2db8b9a23d81ac95df0374bd8a36572)), closes [#1639](https://github.com/alchemyplatform/aa-sdk/issues/1639) [#1663](https://github.com/alchemyplatform/aa-sdk/issues/1663) [#1654](https://github.com/alchemyplatform/aa-sdk/issues/1654) - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -### Features - -- adds webauthn account support ([#1678](https://github.com/alchemyplatform/aa-sdk/issues/1678)) ([d2f0101](https://github.com/alchemyplatform/aa-sdk/commit/d2f0101900bb1a984b7e9e3d5825363bd4a22f89)), closes [#1639](https://github.com/alchemyplatform/aa-sdk/issues/1639) [#1694](https://github.com/alchemyplatform/aa-sdk/issues/1694) -- allow nonce key overrides by default for non-deployed accounts ([#1683](https://github.com/alchemyplatform/aa-sdk/issues/1683)) ([0eb97cd](https://github.com/alchemyplatform/aa-sdk/commit/0eb97cd2bd264b81b31d29008f831b92b0d58f91)) - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -### Features - -- splitting signing methods into prepare and sign ([#1629](https://github.com/alchemyplatform/aa-sdk/issues/1629)) ([8bdb82d](https://github.com/alchemyplatform/aa-sdk/commit/8bdb82d2c563e4b4657a3403ea84dca3b61011d4)) - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -### Features - -- add uo err getter ([#1641](https://github.com/alchemyplatform/aa-sdk/issues/1641)) ([1e981b1](https://github.com/alchemyplatform/aa-sdk/commit/1e981b1a355f9c34a3b98761bd4a913acc3994d5)) - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -### Reverts - -- undo the retry logic because it's causing issues ([#1628](https://github.com/alchemyplatform/aa-sdk/issues/1628)) ([2da1d37](https://github.com/alchemyplatform/aa-sdk/commit/2da1d37609fae208013a6ffde13e6c1cc14dfa7b)) - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -### Bug Fixes - -- let outter transport dictate retries ([#1625](https://github.com/alchemyplatform/aa-sdk/issues/1625)) ([6d291bd](https://github.com/alchemyplatform/aa-sdk/commit/6d291bd83e09e0b4e98baf1608e9451d3fba792d)) - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Features - -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -### Features - -- support chain agnostic rpc url override ([#1613](https://github.com/alchemyplatform/aa-sdk/issues/1613)) ([6e4eee6](https://github.com/alchemyplatform/aa-sdk/commit/6e4eee668bf7c6c0f9aa4b43df67bd1e36b43d4f)) - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -### Bug Fixes - -- eip1193 compatible eth_signTypedData_v4 calls + ethers compatibility ([#1592](https://github.com/alchemyplatform/aa-sdk/issues/1592)) ([838a4fa](https://github.com/alchemyplatform/aa-sdk/commit/838a4fa5c94b78fd476f2c7ef8702ffc89c29cfa)) - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -### Bug Fixes - -- make eth_signTypedData_v4 compliant w/ EIP1193 ([#1444](https://github.com/alchemyplatform/aa-sdk/issues/1444)) ([#1445](https://github.com/alchemyplatform/aa-sdk/issues/1445)) ([301d3b7](https://github.com/alchemyplatform/aa-sdk/commit/301d3b7e824466fa5c23fef19cb4427afc562524)) - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -### Features - -- add erc20 to alchemyGasManagerMiddleware ([#1574](https://github.com/alchemyplatform/aa-sdk/issues/1574)) ([8a0ce97](https://github.com/alchemyplatform/aa-sdk/commit/8a0ce97d5464930a2c21db9aed9b7273d57c783f)) - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -### Features - -- add parsing utility, removing deferred action mode from accounts ([#1522](https://github.com/alchemyplatform/aa-sdk/issues/1522)) ([64fa835](https://github.com/alchemyplatform/aa-sdk/commit/64fa835b0976b19c7f822206549d905859155f09)) - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) -- permissions abstractions ([#1506](https://github.com/alchemyplatform/aa-sdk/issues/1506)) ([e9ced74](https://github.com/alchemyplatform/aa-sdk/commit/e9ced74ddaf501527f53e60ab48e7ad704e759f8)), closes [#1505](https://github.com/alchemyplatform/aa-sdk/issues/1505) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -### Bug Fixes - -- allow 0 value inputs for userop fields ([#1447](https://github.com/alchemyplatform/aa-sdk/issues/1447)) ([109a3ec](https://github.com/alchemyplatform/aa-sdk/commit/109a3ecd3963250af5b3df51953e1b44bb0b0c5b)) - -### Features - -- tracing added for imply and open telemetry ([#1424](https://github.com/alchemyplatform/aa-sdk/issues/1424)) ([1caf63b](https://github.com/alchemyplatform/aa-sdk/commit/1caf63bbe4150b7eb66ee7aef7ccf2e228336ba6)) - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -### Bug Fixes - -- eip1193 account address check [#1430](https://github.com/alchemyplatform/aa-sdk/issues/1430) ([#1493](https://github.com/alchemyplatform/aa-sdk/issues/1493)) ([05d0a63](https://github.com/alchemyplatform/aa-sdk/commit/05d0a632754fdc089a803cd8f2d967c0d6549982)) - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -### Features - -- add low-level deferred action support ([#1434](https://github.com/alchemyplatform/aa-sdk/issues/1434)) ([c3616c3](https://github.com/alchemyplatform/aa-sdk/commit/c3616c3ce3bf1a2277fcdb6ddb368f924c6c70aa)) - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -### Bug Fixes - -- personal_sign [#1427](https://github.com/alchemyplatform/aa-sdk/issues/1427) ([#1428](https://github.com/alchemyplatform/aa-sdk/issues/1428)) ([#1440](https://github.com/alchemyplatform/aa-sdk/issues/1440)) ([fc4b722](https://github.com/alchemyplatform/aa-sdk/commit/fc4b722e1e647d518385d3f68551926a2735774e)) - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -### Bug Fixes - -- pass eip7702auth fields to alchemyGasAndPaymasterAndDataMiddleware ([#1403](https://github.com/alchemyplatform/aa-sdk/issues/1403)) ([c12e1e4](https://github.com/alchemyplatform/aa-sdk/commit/c12e1e460e4dfb4a2e95fad27f446de255061e61)) - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Bug Fixes - -- **docs:** fix docs includes & region syntax ([#1407](https://github.com/alchemyplatform/aa-sdk/issues/1407)) ([1c1759b](https://github.com/alchemyplatform/aa-sdk/commit/1c1759bd610f60b25206f43d9d4ed3f1392111c8)) -- time range module tests ([#1379](https://github.com/alchemyplatform/aa-sdk/issues/1379)) ([65b4416](https://github.com/alchemyplatform/aa-sdk/commit/65b441665eafdc224b42862e8b3f748537ff4c8a)) - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -### Bug Fixes - -- remove unnecessary getTransaction call ([#1299](https://github.com/alchemyplatform/aa-sdk/issues/1299)) ([359669c](https://github.com/alchemyplatform/aa-sdk/commit/359669ce61946b1b715e2a5e235c5a14394172d9)) - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -### Features - -- add alchemy transport update for the mav2 account client ([#1271](https://github.com/alchemyplatform/aa-sdk/issues/1271)) ([71089c4](https://github.com/alchemyplatform/aa-sdk/commit/71089c45e9e04be87887c048405d2928dda0b7a5)) - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -### Bug Fixes - -- correctly trim implementation address ([#1261](https://github.com/alchemyplatform/aa-sdk/issues/1261)) ([5dae940](https://github.com/alchemyplatform/aa-sdk/commit/5dae940eee1c776b54804a9aac8d46fe51e89d19)) -- lost changes from other PRs ([#1259](https://github.com/alchemyplatform/aa-sdk/issues/1259)) ([6546664](https://github.com/alchemyplatform/aa-sdk/commit/6546664887a45e8b25745a3cac539cde9473e4bf)) - -### Features - -- basic ma v2 sdk integrations ([#1220](https://github.com/alchemyplatform/aa-sdk/issues/1220)) ([e513d84](https://github.com/alchemyplatform/aa-sdk/commit/e513d84406acb9dcc72d30a12dce4fbd15adeab8)), closes [#1221](https://github.com/alchemyplatform/aa-sdk/issues/1221) [#1223](https://github.com/alchemyplatform/aa-sdk/issues/1223) [#1232](https://github.com/alchemyplatform/aa-sdk/issues/1232) [#1233](https://github.com/alchemyplatform/aa-sdk/issues/1233) [#1246](https://github.com/alchemyplatform/aa-sdk/issues/1246) - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -### Bug Fixes - -- bigint multiply was sometimes generating floats ([#1135](https://github.com/alchemyplatform/aa-sdk/issues/1135)) ([217443f](https://github.com/alchemyplatform/aa-sdk/commit/217443f33a46e99e1712dcf368a582d4dc3ac2ef)) - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -**Note:** Version bump only for package @aa-sdk/core - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -### Features - -- add google auth components and demo support (extension of linnas pr) ([#1032](https://github.com/alchemyplatform/aa-sdk/issues/1032)) ([cb91914](https://github.com/alchemyplatform/aa-sdk/commit/cb91914c8da0a7c3e7519bf98bc55d2848062e9f)), closes [#1024](https://github.com/alchemyplatform/aa-sdk/issues/1024) [#1035](https://github.com/alchemyplatform/aa-sdk/issues/1035) [#1036](https://github.com/alchemyplatform/aa-sdk/issues/1036) - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -### Bug Fixes - -- **ui-components:** ensure the passkey prompt always shows up when qp is present ([#978](https://github.com/alchemyplatform/aa-sdk/issues/978)) ([81f1580](https://github.com/alchemyplatform/aa-sdk/commit/81f15806e704bcffca6435eccb293923ff64d0e9)) - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Bug Fixes - -- merge base into this ([e41b396](https://github.com/alchemyplatform/aa-sdk/commit/e41b396fdf331d2dd7d4e6b608b90dcab37f8386)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([02f2f16](https://github.com/alchemyplatform/aa-sdk/commit/02f2f1623803480b8dc496491d2232c6fe5c219c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([55e6632](https://github.com/alchemyplatform/aa-sdk/commit/55e663208aae63e6092cbf2335c58f1448bd0dc3)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([1385441](https://github.com/alchemyplatform/aa-sdk/commit/1385441095b559ef506d5b4ae429ada5cc84be0e)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add default arguments for erc7677 middleware ([#839](https://github.com/alchemyplatform/aa-sdk/issues/839)) ([848f316](https://github.com/alchemyplatform/aa-sdk/commit/848f3168d8b679215b841a45ff49735cd8ac37a7)) -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([4a30808](https://github.com/alchemyplatform/aa-sdk/commit/4a30808fb6df51a59be861dab523dbd45badf26a)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([a389f65](https://github.com/alchemyplatform/aa-sdk/commit/a389f656a6e4feb14e13ecfc84880e4e0d93d786)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([593e84c](https://github.com/alchemyplatform/aa-sdk/commit/593e84c027a697b757e3fd954564ff40cd1e11b0)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Bug Fixes - -- merge base into this ([f9a6b2d](https://github.com/alchemyplatform/aa-sdk/commit/f9a6b2d801b909146c0e10bb072369992163ea69)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([b643981](https://github.com/alchemyplatform/aa-sdk/commit/b643981e900d9cabf6e273b5f7e9e75cd0c32c7d)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cb9d92](https://github.com/alchemyplatform/aa-sdk/commit/9cb9d9283db899d5a2f632767993c04135eb1de8)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([cb59787](https://github.com/alchemyplatform/aa-sdk/commit/cb597879a01179a24b919650ba19c1bba0da6e1d)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add default arguments for erc7677 middleware ([#839](https://github.com/alchemyplatform/aa-sdk/issues/839)) ([aac2a4d](https://github.com/alchemyplatform/aa-sdk/commit/aac2a4dd50f5d4977b55c55c783538ea60b4f365)) -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([23bcd22](https://github.com/alchemyplatform/aa-sdk/commit/23bcd225b434b55061d72ea622bdba2e85237ec9)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([3cdea84](https://github.com/alchemyplatform/aa-sdk/commit/3cdea8457d0a1fabd63d6d318a7bd1f62883d5b4)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([45582b1](https://github.com/alchemyplatform/aa-sdk/commit/45582b14e7116903f9b91cdd4bf2bb04de14ffa4)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Bug Fixes - -- merge base into this ([1409772](https://github.com/alchemyplatform/aa-sdk/commit/140977220c6e9cd32820a64e573c2d8070e9b603)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([8ef751e](https://github.com/alchemyplatform/aa-sdk/commit/8ef751eab7a2357caaa6d5d63cbc1907e90c39cb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cf1b77](https://github.com/alchemyplatform/aa-sdk/commit/9cf1b77e2ac738996af258e38879173184805a1c)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([d5c90da](https://github.com/alchemyplatform/aa-sdk/commit/d5c90dafacaf4194050f3c9870be03d44dbdbfea)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add default arguments for erc7677 middleware ([#839](https://github.com/alchemyplatform/aa-sdk/issues/839)) ([5dccebd](https://github.com/alchemyplatform/aa-sdk/commit/5dccebd2e21439ee242c129dc9fdb4c8517b2b48)) -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([69ea495](https://github.com/alchemyplatform/aa-sdk/commit/69ea495765175da4c74cde31bcd089f6838cfeb4)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([e177533](https://github.com/alchemyplatform/aa-sdk/commit/e17753377757b4e75f289224fe7e1c4575875286)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c550465](https://github.com/alchemyplatform/aa-sdk/commit/c55046525d790001db4a9a305cade6f0d06ca90b)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Bug Fixes - -- merge base into this ([ea9ce2c](https://github.com/alchemyplatform/aa-sdk/commit/ea9ce2cabc407eec69aebe459446630142108f06)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([3060a05](https://github.com/alchemyplatform/aa-sdk/commit/3060a05e895e6d6fef363276665f0d3d06c161fb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([22b8183](https://github.com/alchemyplatform/aa-sdk/commit/22b8183ae297648d43594f59578163da6b0ae9bc)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([ae8a272](https://github.com/alchemyplatform/aa-sdk/commit/ae8a2720818ff1505a2424fce5ce154b90b74fd0)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add default arguments for erc7677 middleware ([#839](https://github.com/alchemyplatform/aa-sdk/issues/839)) ([2e382b6](https://github.com/alchemyplatform/aa-sdk/commit/2e382b661f6eea2c2cd1e24882bbcd64d356f128)) -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([1a7af53](https://github.com/alchemyplatform/aa-sdk/commit/1a7af533d82e60accc3428cbb699f263a0cef536)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([4102ae0](https://github.com/alchemyplatform/aa-sdk/commit/4102ae051a5a8ac03fb88f08adc8b3bca0f9737e)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([637bb95](https://github.com/alchemyplatform/aa-sdk/commit/637bb953d59bfd931652286dfc73497b0e0e288f)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -**Note:** Version bump only for package @aa-sdk/core - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([0601453](https://github.com/alchemyplatform/aa-sdk/commit/060145386572026905f5720866722c5a20c9d7db)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([b2b7cc6](https://github.com/alchemyplatform/aa-sdk/commit/b2b7cc680860f3d416d11b66d626e715fae4cf8b)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([dae2ad0](https://github.com/alchemyplatform/aa-sdk/commit/dae2ad08d863f9d25508e475903e042190aad56f)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([4c0b2f1](https://github.com/alchemyplatform/aa-sdk/commit/4c0b2f19a59272940b3fe40c610c06ad8c49d70e)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([9d81aaf](https://github.com/alchemyplatform/aa-sdk/commit/9d81aafe89b2dc49e2ab2c44556c81c3010c1fa2)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([c92a07f](https://github.com/alchemyplatform/aa-sdk/commit/c92a07fdb39d652fe5c95326d47a929b3b3278ed)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([082d363](https://github.com/alchemyplatform/aa-sdk/commit/082d363923684ae3bc45edf544c8536ff3c42379)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([d2f97c5](https://github.com/alchemyplatform/aa-sdk/commit/d2f97c56fdf63871296dd81b10cbc60b61b34d6c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([6c41e22](https://github.com/alchemyplatform/aa-sdk/commit/6c41e22233932ee98c6214f2ffdf3e8f928f880f)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c5465ee](https://github.com/alchemyplatform/aa-sdk/commit/c5465eee5c957afcb02d3e0d82c5821dd7819b5f)) -- add support for eth_accounts to provider ([#891](https://github.com/alchemyplatform/aa-sdk/issues/891)) ([d067879](https://github.com/alchemyplatform/aa-sdk/commit/d067879431403ce9acdc36841fd66deb2bfc7223)) -- fix state override parameter type ([#720](https://github.com/alchemyplatform/aa-sdk/issues/720)) ([6c9c720](https://github.com/alchemyplatform/aa-sdk/commit/6c9c7202d14010ab3afa02055ff5006924a4fba3)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -## [3.18.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.1...v3.18.2) (2024-06-05) - -**Note:** Version bump only for package @alchemy/aa-core - -## [3.18.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.0...v3.18.1) (2024-06-04) - -### Bug Fixes - -- fix paymaster override for multisig plugin ([#676](https://github.com/alchemyplatform/aa-sdk/issues/676)) ([6db5bfc](https://github.com/alchemyplatform/aa-sdk/commit/6db5bfc7d9003417354df36728323752542d7723)) - -# [3.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.2...v3.18.0) (2024-06-04) - -**Note:** Version bump only for package @alchemy/aa-core - -## [3.17.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.1...v3.17.2) (2024-05-31) - -### Reverts - -- undo vocs deploy ([#690](https://github.com/alchemyplatform/aa-sdk/issues/690)) ([c7cb350](https://github.com/alchemyplatform/aa-sdk/commit/c7cb350f9786fe10d03c62d61a8d2c9f21d4cdc0)) - -## [3.17.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.0...v3.17.1) (2024-05-31) - -**Note:** Version bump only for package @alchemy/aa-core - -# [3.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.15.0...v3.16.0) (2024-05-22) - -### Bug Fixes - -- **dropAndReplace:** use dummy signature in drop and replace ([#679](https://github.com/alchemyplatform/aa-sdk/issues/679)) ([2c235f1](https://github.com/alchemyplatform/aa-sdk/commit/2c235f12ddaa6685a5ce5d4b68305bb3c191073f)) - -## [3.12.3](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.2...v3.12.3) (2024-05-10) - -**Note:** Version bump only for package @alchemy/aa-core - -## [3.12.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.1...v3.12.2) (2024-05-09) - -### Bug Fixes - -- paymaster bypass wasn't working correctly ([9e6b927](https://github.com/alchemyplatform/aa-sdk/commit/9e6b9272fd990ea3edaa83ce579f25245dcfee5f)) - -## [3.12.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.0...v3.12.1) (2024-05-07) - -### Bug Fixes - -- replace fraxTestnet with fraxSepolia ([#642](https://github.com/alchemyplatform/aa-sdk/issues/642)) ([320a15d](https://github.com/alchemyplatform/aa-sdk/commit/320a15d049e9ad6125e9e4102a3fc1ebe8f0dd55)) - -# [3.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.1...v3.12.0) (2024-05-02) - -### Bug Fixes - -- don't set undefined estimates to 0n ([#641](https://github.com/alchemyplatform/aa-sdk/issues/641)) ([bff8d35](https://github.com/alchemyplatform/aa-sdk/commit/bff8d351a1587589799e515e7373fbcf01a3b6e9)) - -## [3.11.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.0...v3.11.1) (2024-04-30) - -### Bug Fixes - -- make multisig e2e tests pass ([#615](https://github.com/alchemyplatform/aa-sdk/issues/615)) ([08cf8d8](https://github.com/alchemyplatform/aa-sdk/commit/08cf8d81b3afd7b06c51a3b9fe6a0ee5a0a91d44)) -- when overriding paymaster set fields to 0x initially ([#635](https://github.com/alchemyplatform/aa-sdk/issues/635)) ([2a03c67](https://github.com/alchemyplatform/aa-sdk/commit/2a03c679720e408ff7a56b4c0e545bf2ae47f446)) - -# [3.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.10.0...v3.11.0) (2024-04-30) - -### Bug Fixes - -- waitForUserOperationTx parameters were incorrect ([#634](https://github.com/alchemyplatform/aa-sdk/issues/634)) ([8250c66](https://github.com/alchemyplatform/aa-sdk/commit/8250c660def2c3b8b920b3239d782d1999fd578e)) - -# [3.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0...v3.10.0) (2024-04-29) - -### Features - -- add frax and zora defaults ([#613](https://github.com/alchemyplatform/aa-sdk/issues/613)) ([4950a1d](https://github.com/alchemyplatform/aa-sdk/commit/4950a1df170abcae5a3cc5a32acdb972890d7810)) -- estimate user operation gas smart account client action and how to guide ([#603](https://github.com/alchemyplatform/aa-sdk/issues/603)) ([522a038](https://github.com/alchemyplatform/aa-sdk/commit/522a03864ea0e3f8f1e34b6900c3ca0241b534e8)) -- handle one off bypassing paymaster and data middleware case ([#606](https://github.com/alchemyplatform/aa-sdk/issues/606)) ([b5d8110](https://github.com/alchemyplatform/aa-sdk/commit/b5d8110f629937068d27e059ec89dfaa31ce9dd5)) -- remove generic entry point version specification requirement for better devex ([#607](https://github.com/alchemyplatform/aa-sdk/issues/607)) ([f3fb619](https://github.com/alchemyplatform/aa-sdk/commit/f3fb619e3cfb2c3a957a259788ae6ab1c530f3d5)) - -# [3.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0-alpha.4...v3.9.0) (2024-04-24) - -### Features - -- add split transport ([#590](https://github.com/alchemyplatform/aa-sdk/issues/590)) ([2d3687f](https://github.com/alchemyplatform/aa-sdk/commit/2d3687f2009a4d0ca7f0dc9fc6f8c420376a35a3)) - -## [3.8.2-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.1) (2024-04-18) - -### Bug Fixes - -- fix bugs found in entrypoint v7 during testing ([#578](https://github.com/alchemyplatform/aa-sdk/issues/578)) ([924bb45](https://github.com/alchemyplatform/aa-sdk/commit/924bb459de9bacbd5682de72fe3f016ac5e25cd3)) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) -- light account v2 entrypoint v7 and multi owner update ([#548](https://github.com/alchemyplatform/aa-sdk/issues/548)) ([5f2f5c9](https://github.com/alchemyplatform/aa-sdk/commit/5f2f5c963ecdeb8c7efadb6eda2f2e9e6187f636)) -- move signUserOperation middleware step out of asyncPipe ([#587](https://github.com/alchemyplatform/aa-sdk/issues/587)) ([2685d14](https://github.com/alchemyplatform/aa-sdk/commit/2685d14bd550eec3fbb2185f22feae7028d484c1)) -- paymaster middleware update per entrypoint v7 user operation ([#580](https://github.com/alchemyplatform/aa-sdk/issues/580)) ([399479a](https://github.com/alchemyplatform/aa-sdk/commit/399479a38d6eaf0ab6d4d46b38f9d0f5a773cbed)) - -## [3.8.2-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.0) (2024-04-17) - -### Bug Fixes - -- fix bugs found in entrypoint v7 during testing ([#578](https://github.com/alchemyplatform/aa-sdk/issues/578)) ([924bb45](https://github.com/alchemyplatform/aa-sdk/commit/924bb459de9bacbd5682de72fe3f016ac5e25cd3)) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) -- light account v2 entrypoint v7 and multi owner update ([#548](https://github.com/alchemyplatform/aa-sdk/issues/548)) ([5f2f5c9](https://github.com/alchemyplatform/aa-sdk/commit/5f2f5c963ecdeb8c7efadb6eda2f2e9e6187f636)) -- paymaster middleware update per entrypoint v7 user operation ([1709533](https://github.com/alchemyplatform/aa-sdk/commit/1709533ba9cd227e2c3c7c9cb848f921bde353f4)) - -## [3.8.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.0...v3.8.1) (2024-04-11) - -### Bug Fixes - -- add the signer header when using aa-alchemy ([#563](https://github.com/alchemyplatform/aa-sdk/issues/563)) ([7cfeaa6](https://github.com/alchemyplatform/aa-sdk/commit/7cfeaa6f093f929f59f1055fc16e07840bf487a0)) - -# [3.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.7.3...v3.8.0) (2024-04-10) - -### Bug Fixes - -- invalid user operation error mesages to correctly serialize bigint fields ([#557](https://github.com/alchemyplatform/aa-sdk/issues/557)) ([29c2fc6](https://github.com/alchemyplatform/aa-sdk/commit/29c2fc6e347aca5c3278b302f2b492a6f67f3d8e)) - -### Features - -- add alchemy accounts context ([#539](https://github.com/alchemyplatform/aa-sdk/issues/539)) ([f92469e](https://github.com/alchemyplatform/aa-sdk/commit/f92469ee3f1a5bc3e9f8fe72d6067de1f28e24dd)), closes [#561](https://github.com/alchemyplatform/aa-sdk/issues/561) -- **alchemy-signer:** emit events from the alchemy signer on state changes ([#523](https://github.com/alchemyplatform/aa-sdk/issues/523)) ([8880e6d](https://github.com/alchemyplatform/aa-sdk/commit/8880e6d5bb9c98524c726a841fab5019bd6f0049)) -- **multi-sig:** add multisig plugin ([#519](https://github.com/alchemyplatform/aa-sdk/issues/519)) ([0139ef6](https://github.com/alchemyplatform/aa-sdk/commit/0139ef6de9b593dbe239675485a531122da254c4)), closes [#536](https://github.com/alchemyplatform/aa-sdk/issues/536) - -## [3.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.6.0...v3.6.1) (2024-03-18) - -### Bug Fixes - -- **core:** fix stateoverrides passed to estimation userop gas ([#517](https://github.com/alchemyplatform/aa-sdk/issues/517)) ([2980a35](https://github.com/alchemyplatform/aa-sdk/commit/2980a35226b5e42e4f3aaa77fd53564a3486327b)) - -# [3.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.1...v3.6.0) (2024-03-18) - -### Features - -- add optional stateOverride parameter to eth_estimateUserOperationGas ([#513](https://github.com/alchemyplatform/aa-sdk/issues/513)) ([3e0b88a](https://github.com/alchemyplatform/aa-sdk/commit/3e0b88a5e8adf322e5f5f2c659f57d94bc2cc95c)) -- add polygon amoy default addresses ([#506](https://github.com/alchemyplatform/aa-sdk/issues/506)) ([34f273e](https://github.com/alchemyplatform/aa-sdk/commit/34f273e8b6d89c7c80f9de57e0331090602e776a)) - -## [3.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.0...v3.5.1) (2024-03-14) - -**Note:** Version bump only for package @alchemy/aa-core - -# [3.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.4.4...v3.5.0) (2024-03-14) - -### Features - -- **plugins:** make plugingen a cli tool ([#507](https://github.com/alchemyplatform/aa-sdk/issues/507)) ([53ba81d](https://github.com/alchemyplatform/aa-sdk/commit/53ba81d33422bb3f18134c1dd75e68d64f5cc3f0)) - -## [3.4.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.4.1...v3.4.2) (2024-03-08) - -**Note:** Version bump only for package @alchemy/aa-core - -# [3.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.3.0...v3.4.0) (2024-02-29) - -### Features - -- sign user op and send raw user op methods added to smart account client ([#486](https://github.com/alchemyplatform/aa-sdk/issues/486)) ([6518d12](https://github.com/alchemyplatform/aa-sdk/commit/6518d12190e9d48263e4776f288245b5a9940b36)) - -## [3.2.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.2.0...v3.2.1) (2024-02-27) - -### Bug Fixes - -- **actions:** drop and replace was not handling overrides ([#490](https://github.com/alchemyplatform/aa-sdk/issues/490)) ([83f5867](https://github.com/alchemyplatform/aa-sdk/commit/83f5867dd72e1daccba12cafd56d6aa070ef17f1)) - -## [3.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.1.0...v3.1.1) (2024-02-23) - -### Bug Fixes - -- custom headers fix ([#484](https://github.com/alchemyplatform/aa-sdk/issues/484)) ([5baacad](https://github.com/alchemyplatform/aa-sdk/commit/5baacad5e806b111eed86174408c78612b856523)) - -# [3.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.1...v3.1.0) (2024-02-23) - -**Note:** Version bump only for package @alchemy/aa-core - -## [3.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0...v3.0.1) (2024-02-21) - -### Bug Fixes - -- custom Alchemy-AA-Sdk-Version header fix ([#475](https://github.com/alchemyplatform/aa-sdk/issues/475)) ([bfb4361](https://github.com/alchemyplatform/aa-sdk/commit/bfb4361481a3b12e7d47096f558921a22aa214ee)) - -# [3.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.13...v3.0.0) (2024-02-21) - -### Features - -- add a nonce key override to support parallel nonces ([#462](https://github.com/alchemyplatform/aa-sdk/issues/462)) ([d48c586](https://github.com/alchemyplatform/aa-sdk/commit/d48c586665858c61e0d1d66e9bd4503f32e47db9)) - -# [3.0.0-alpha.13](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.12...v3.0.0-alpha.13) (2024-02-16) - -**Note:** Version bump only for package @alchemy/aa-core - -# [3.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.9...v3.0.0-alpha.10) (2024-02-14) - -**Note:** Version bump only for package @alchemy/aa-core - -# [3.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.8...v3.0.0-alpha.9) (2024-02-13) - -### Features - -- **amoy:** add amoy from viem update ([#448](https://github.com/alchemyplatform/aa-sdk/issues/448)) ([adae84a](https://github.com/alchemyplatform/aa-sdk/commit/adae84add30536676725dbc8805f3436c8ad395e)) - -# [3.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.4...v3.0.0-alpha.5) (2024-02-07) - -### Bug Fixes - -- **aa-core:** add back eip-1193 method handling to the client ([#425](https://github.com/alchemyplatform/aa-sdk/issues/425)) ([48b5943](https://github.com/alchemyplatform/aa-sdk/commit/48b594375d64fe832cfb06f1fb3a539da3c7b965)) - -# [3.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.3...v3.0.0-alpha.4) (2024-02-02) - -### Bug Fixes - -- alchemy package.json was incorrectly pointing to files ([#423](https://github.com/alchemyplatform/aa-sdk/issues/423)) ([5678def](https://github.com/alchemyplatform/aa-sdk/commit/5678defe4885f1b15724e0208a5813deea07ffa4)) -- some typos in code and change provider -> client in docs ([#422](https://github.com/alchemyplatform/aa-sdk/issues/422)) ([8533744](https://github.com/alchemyplatform/aa-sdk/commit/8533744bda28aff25b3b039d21827ed79a9d36b1)) - -# [3.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.2...v3.0.0-alpha.3) (2024-02-02) - -**Note:** Version bump only for package @alchemy/aa-core - -# [3.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.0...v3.0.0-alpha.1) (2024-01-31) - -### Bug Fixes - -- decorators should now correctly respect account hoisting ([86d884e](https://github.com/alchemyplatform/aa-sdk/commit/86d884ed6209d89c688dc4281400f7304b210caa)) - -# [3.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.3.1...v3.0.0-alpha.0) (2024-01-30) - -### Bug Fixes - -- add back the alchemy enhanced api actions to alchemy client ([75d1741](https://github.com/alchemyplatform/aa-sdk/commit/75d17411702a0bd8dbae17395af30f19875affb8)) -- allow for dynamic setting of the owner on owned accounts ([df333ee](https://github.com/alchemyplatform/aa-sdk/commit/df333eee355effa2f0c051945d283f0f7b3d0449)) - -### Code Refactoring - -- **aa-alchemy:** migrate aa-alchemy to new viem interfaces ([bf7b49d](https://github.com/alchemyplatform/aa-sdk/commit/bf7b49d631c4d8aaf19a61e98794abd89d87b8e9)) -- **aa-core:** complete migration to viem based approach in aa-core ([9bff625](https://github.com/alchemyplatform/aa-sdk/commit/9bff6250d57924e4b1f392601982b9029ed7cbab)) -- **aa-ethers:** refactor aa-ethers to use the viem client and accounts ([6cc2051](https://github.com/alchemyplatform/aa-sdk/commit/6cc20518bf90788f83ac3c9e579b0f4f4de518b1)) - -- refactor(aa-accounts)!: migrate aa-accounts to viem approach ([37a5b48](https://github.com/alchemyplatform/aa-sdk/commit/37a5b489bdd2527dca311787d5585f1dc3a5f05b)) - -### Features - -- hoist account signing methods ([5bcfac8](https://github.com/alchemyplatform/aa-sdk/commit/5bcfac8ddaca6b712d473cbad2cbbd0228827af5)) - -### BREAKING CHANGES - -- **aa-ethers:** aa-ethers has had some functionality removed and apis changed - -* inputs to the ProviderAdapter now require a SmartAccountClient -* with\* methods have been removed, middleware config now exists - on the SmartAccountClient -* the Account Signer has been updated to take a SmartContractAccount - as input - -- all interfaces now use the new smart account - client and smart account models that match viem more closely -- **aa-alchemy:** all of aa-alchemy now uses viem interfaces in aa-core -- **aa-core:** all interfaces have been migrated to use the new viem style clients and accounts - -## [2.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v2.3.0...v2.3.1) (2024-01-25) - -### Bug Fixes - -- fix the wrapped signer to work with undeployed accounts ([#381](https://github.com/alchemyplatform/aa-sdk/issues/381)) ([55a3a54](https://github.com/alchemyplatform/aa-sdk/commit/55a3a54b928b7f1f4996f331c6f1c9454a9ac3c8)) - -# [2.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.2.1...v2.3.0) (2024-01-24) - -### Bug Fixes - -- **buildUserOperationFromTx:** handle the case where no TX has fee fields set ([#378](https://github.com/alchemyplatform/aa-sdk/issues/378)) ([e9eaad1](https://github.com/alchemyplatform/aa-sdk/commit/e9eaad175f9ec14d45b62b2c5bcabb75ca47e74f)) - -## [2.2.1](https://github.com/alchemyplatform/aa-sdk/compare/v2.2.0...v2.2.1) (2024-01-23) - -### Bug Fixes - -- **base-provider:** address drop and replace rounding down errors ([#376](https://github.com/alchemyplatform/aa-sdk/issues/376)) ([33b7435](https://github.com/alchemyplatform/aa-sdk/commit/33b74359dedc68ed324697dc32f4f06def1fac59)) - -# [2.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.1.0...v2.2.0) (2024-01-22) - -### Features - -- add usePluginHook to demo app ([#357](https://github.com/alchemyplatform/aa-sdk/issues/357)) ([036b13b](https://github.com/alchemyplatform/aa-sdk/commit/036b13b250b1b3465dee000a6d5036ca060c2bb4)) - -# [2.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v1.2.4...v2.0.0) (2024-01-12) - -- feat!: update the LightAccount logic for 1271 signatures to match the on-chain impl ([bbe5060](https://github.com/alchemyplatform/aa-sdk/commit/bbe5060c01828e07d7f788485b14c04dacc6cb6f)) - -### Features - -- add upgrade functionality for light account to msca ([#298](https://github.com/alchemyplatform/aa-sdk/issues/298)) ([18f51d9](https://github.com/alchemyplatform/aa-sdk/commit/18f51d9f626b48390a54d88b7ac28c1f162e04f8)) -- update zod to allow custom viem chains in core ([#348](https://github.com/alchemyplatform/aa-sdk/issues/348)) ([291f73f](https://github.com/alchemyplatform/aa-sdk/commit/291f73f50e2e6fa382d269b8568b6255bcad4b0c)) - -### BREAKING CHANGES - -- default LightAccountFactory address has changed - -## 1.2.4 (2024-01-08) - -**Note:** Version bump only for package @alchemy/aa-core - -## 1.2.3 (2023-12-22) - -### Features - -- add stringToIndex util function for SmartAccount salt ([#329](https://github.com/alchemyplatform/aa-sdk/issues/329)) ([b34ef9a](https://github.com/alchemyplatform/aa-sdk/commit/b34ef9aa6727986e89a1461dec45955cac9d4365)) -- add prefix for aa-signers signer type ([#325](https://github.com/alchemyplatform/aa-sdk/issues/325)) ([f3b8cc1](https://github.com/alchemyplatform/aa-sdk/commit/f3b8cc1f0553bad51e4f95c3fd80f6aa0199cff2)) -- add terms page to glossary ([#336](https://github.com/alchemyplatform/aa-sdk/issues/336)) ([63b24ec](https://github.com/alchemyplatform/aa-sdk/commit/63b24ecdb3e5e656c173a1523a3e09478d4c074d)) -- add faq page to docs ([#335](https://github.com/alchemyplatform/aa-sdk/issues/335)) ([63092ce](https://github.com/alchemyplatform/aa-sdk/commit/63092ceb45341d422bd3f8c13ebcc539d9cc5001)) -- add aa-signer implementation for lit protocol ([#312](https://github.com/alchemyplatform/aa-sdk/issues/312)) ([b0f8dd5](https://github.com/alchemyplatform/aa-sdk/commit/b0f8dd538728f8a7dd4447da8c88a50179d61f95)) -- add aa-signer implementation for arcana auth ([#319](https://github.com/alchemyplatform/aa-sdk/issues/319)) ([c82dbf7](https://github.com/alchemyplatform/aa-sdk/commit/c82dbf7ad76791e81525740dfe8820bd234c2863)) -- add types to glossary ([#338](https://github.com/alchemyplatform/aa-sdk/issues/338)) ([28ad2b0](https://github.com/alchemyplatform/aa-sdk/commit/28ad2b015e5d0191f77cbdeeb3c071b7ec813fde)) - -## 1.2.2 (2023-12-13) - -### Bug Fixes - -- fix the named export for web3auth ([#330](https://github.com/alchemyplatform/aa-sdk/issues/330)) ([b340f11](https://github.com/alchemyplatform/aa-sdk/commit/b340f115e96ab068f70f8b5ff8316f4724b3ab6d)) - -## 1.2.1 (2023-12-12) - -### Features - -- allow passing raw call data to sendUserOperation ([#272](https://github.com/alchemyplatform/aa-sdk/issues/272) ([26b90b6](https://github.com/alchemyplatform/aa-sdk/commit/26b90b63a998b106130f3c671bb77f977becb45d))) -- add aa-signers package ([#228](https://github.com/alchemyplatform/aa-sdk/issues/228)) ([5fcd322](https://github.com/alchemyplatform/aa-sdk/commit/5fcd3222133205e5b3f86b456309584d848b1fb5)) -- add aa-signer implementation for magic ([#229](https://github.com/alchemyplatform/aa-sdk/issues/229)) ([860d177](https://github.com/alchemyplatform/aa-sdk/commit/860d17778f6ffc6140d07f2fce147eb8993ee985)) -- add aa-signer implementation for web3auth ([#247](https://github.com/alchemyplatform/aa-sdk/issues/247)) ([7d0492b](https://github.com/alchemyplatform/aa-sdk/commit/7d0492b3829b07d18c1488b7d7e0b129e40f7b4c)) -- add aa-signer implementation for turnkey ([#307](https://github.com/alchemyplatform/aa-sdk/issues/307)) ([4fa05e4](https://github.com/alchemyplatform/aa-sdk/commit/4fa05e4ada8c6558e3ce0bd35b157110baba47c9)) -- add aa-signer implementation for fireblocks ([#301](https://github.com/alchemyplatform/aa-sdk/issues/301)) ([40289e6](https://github.com/alchemyplatform/aa-sdk/commit/40289e6c656344ab0cd6c60e6dbc7c11d392d27e)) -- add aa-signer implementation for particle ([#304](https://github.com/alchemyplatform/aa-sdk/issues/304)) ([e049c2c](https://github.com/alchemyplatform/aa-sdk/commit/e049c2caa562089f62614549ac4e7b2c741f93fd)) -- add aa-signer implementation for portal ([#303](https://github.com/alchemyplatform/aa-sdk/issues/303)) ([eb8a0c3](https://github.com/alchemyplatform/aa-sdk/commit/eb8a0c356ba89701d9cc34921cf7812c23791655)) -- add aa-signer implementation for capsule ([#305](https://github.com/alchemyplatform/aa-sdk/issues/305)) ([9d89e99](https://github.com/alchemyplatform/aa-sdk/commit/9d89e99aea12fc4c13f5b4a680167d5687829bfe)) -- add improvements on provider for override user operation fee and gas ([#277](https://github.com/alchemyplatform/aa-sdk/issues/277)) ([258d80e](https://github.com/alchemyplatform/aa-sdk/commit/258d80e64d7aaa7de26f72375b9d58221c95311e)) -- support one-off percentage overrides for user operations ([#289](https://github.com/alchemyplatform/aa-sdk/issues/289)) ([dc979ff](https://github.com/alchemyplatform/aa-sdk/commit/dc979ff111f0a490b08adce9a913466706399afb)) -- add a convenience method to make creating an alchemy provider easier ([#206](https://github.com/alchemyplatform/aa-sdk/issues/206)) ([211b7e0](https://github.com/alchemyplatform/aa-sdk/commit/211b7e0e715b961520dc5baaa4f0d49b647fbd79)) -- add nani smart account implementation ([#306](https://github.com/alchemyplatform/aa-sdk/issues/306)) ([bf7566f](https://github.com/alchemyplatform/aa-sdk/commit/bf7566f2d62ab7ca4ee7fcb4a9df68308fbe5622)) -- improve zod validation parsing ([#299](https://github.com/alchemyplatform/aa-sdk/issues/299)) ([0763a82](https://github.com/alchemyplatform/aa-sdk/commit/0763a82d47f491513bdcf75716c83043f3dbd2be)) -- docs site re-formatting ([#300](https://github.com/alchemyplatform/aa-sdk/issues/300)) ([a1376c4](https://github.com/alchemyplatform/aa-sdk/commit/a1376c4ad38a62517092ebdd8c87557712c4aecc)) -- docs for Dfns Signer ([#313](https://github.com/alchemyplatform/aa-sdk/issues/313)) ([33141b0](https://github.com/alchemyplatform/aa-sdk/commit/33141b08759b89e2c10f56d95a1316098f67fb9c)) -- docs for Arcana Signer ([#318](https://github.com/alchemyplatform/aa-sdk/issues/318)) ([81711d6](https://github.com/alchemyplatform/aa-sdk/commit/81711d6565a089a15eba95bc54c55972b13457e8)) - -# 1.2.0 (2023-11-17) - -### Features - -- make alchemy-sdk an optional dependency on aa-alchemy ([#265](https://github.com/alchemyplatform/aa-sdk/issues/265)) ([a0088b3](https://github.com/alchemyplatform/aa-sdk/commit/a0088b3ecce191ece21f4082a73c4fcae0e2286c)) - -# 1.1.0 (2023-11-14) - -### Features - -- merge development into main for new minor release ([#251](https://github.com/alchemyplatform/aa-sdk/issues/251)) ([ab098ee](https://github.com/alchemyplatform/aa-sdk/commit/ab098ee9ec35e4b1b3c788046168874fb51e4783)) - -# [1.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.2.0...v1.0.0) (2023-11-10) - -### Features - -- aa-sdk with native arb sepolia support ([#231](https://github.com/alchemyplatform/aa-sdk/issues/231)) ([7580608](https://github.com/alchemyplatform/aa-sdk/commit/7580608623961155290a3010fb784a14aecd82af)) -- add support for overriding the initCode for an account ([#197](https://github.com/alchemyplatform/aa-sdk/issues/197)) ([a886853](https://github.com/alchemyplatform/aa-sdk/commit/a886853ce5628f7e252750f52d8ad8c38eeef0c0)) -- add zod runtime validation for base account ([#186](https://github.com/alchemyplatform/aa-sdk/issues/186)) ([ea85c96](https://github.com/alchemyplatform/aa-sdk/commit/ea85c961ee0140bf12151984324e4b2e7ed86d6a)) -- add zod runtime validation for simple account ([#189](https://github.com/alchemyplatform/aa-sdk/issues/189)) ([f14016f](https://github.com/alchemyplatform/aa-sdk/commit/f14016f38777f1e629c1aaaaf16f81881ee5d7c9)) -- **arb-sepolia:** add arb sepolia to defaults ([#216](https://github.com/alchemyplatform/aa-sdk/issues/216)) ([9229fb5](https://github.com/alchemyplatform/aa-sdk/commit/9229fb529c479ca72d305da9452ad1456be2bc6e)) -- choosing your signer, light account, modular account doc update ([#215](https://github.com/alchemyplatform/aa-sdk/issues/215)) ([f05b92d](https://github.com/alchemyplatform/aa-sdk/commit/f05b92d1ecd7465a495c97bea692d38e11c6c1ae)) -- remove AA_SDK_TESTS_SIGNER_TYPE constant exported from aa-core ([#232](https://github.com/alchemyplatform/aa-sdk/issues/232)) ([883c489](https://github.com/alchemyplatform/aa-sdk/commit/883c489b077d587b6c5b50c44d92b2a00f10e5ac)) -- **sepolia:** add min priority per bid ([#214](https://github.com/alchemyplatform/aa-sdk/issues/214)) ([075503e](https://github.com/alchemyplatform/aa-sdk/commit/075503e2b861c84838c115a7edb8e60ad38aec09)) -- use alchemy provider, light account for e2e tests ([#209](https://github.com/alchemyplatform/aa-sdk/issues/209)) ([124be68](https://github.com/alchemyplatform/aa-sdk/commit/124be68c5137a3511ec612e814265739e6909e75)) - -# 0.2.0 (2023-11-03) - -### Features - -- merge development into main for new version release ([#207](https://github.com/alchemyplatform/aa-sdk/issues/207)) ([f06fd2a](https://github.com/alchemyplatform/aa-sdk/commit/f06fd2adf5e4aaf90214435d32f9d566d8502099)) - -## 0.1.1 (2023-10-20) - -### Bug Fixes - -- bad deploy script again ([2da8de2](https://github.com/alchemyplatform/aa-sdk/commit/2da8de2f4feb4c82fd454050e66f6203b61bcc2c)) - -# [0.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.32...v0.1.0) (2023-10-10) - -### Bug Fixes - -- interface ISmartAccountProvider annotation ([#119](https://github.com/alchemyplatform/aa-sdk/issues/119)) ([603ef4e](https://github.com/alchemyplatform/aa-sdk/commit/603ef4ee9f3eae9ffd9dc798ae934f257ecfe409)) - -### Features - -- merge in all of the staged changes to the aa-sdk ([#120](https://github.com/alchemyplatform/aa-sdk/issues/120)) ([7a9effa](https://github.com/alchemyplatform/aa-sdk/commit/7a9effaa07c03a6a50c9cf856b5935e735adae3a)), closes [#1](https://github.com/alchemyplatform/aa-sdk/issues/1) [#2](https://github.com/alchemyplatform/aa-sdk/issues/2) [#3](https://github.com/alchemyplatform/aa-sdk/issues/3) [#7](https://github.com/alchemyplatform/aa-sdk/issues/7) [#8](https://github.com/alchemyplatform/aa-sdk/issues/8) [#9](https://github.com/alchemyplatform/aa-sdk/issues/9) - -# 0.1.0-alpha.32 (2023-09-18) - -### Bug Fixes - -- `baseGoerli` chainId in `chains.ts` ([#104](https://github.com/alchemyplatform/aa-sdk/issues/104)) ([2dda5dd](https://github.com/alchemyplatform/aa-sdk/commit/2dda5dd729124338ddf529c11bbf24afaea05dd4)) - -# 0.1.0-alpha.31 (2023-09-13) - -### Bug Fixes - -- remove all references to `SimpleSmartAccountOwner` ([#101](https://github.com/alchemyplatform/aa-sdk/issues/101)) ([a8f101d](https://github.com/alchemyplatform/aa-sdk/commit/a8f101dff7fbbd10598467ddaaa1c3c55f707e6d)) - -# 0.1.0-alpha.30 (2023-09-11) - -### Features - -- add base support to alchemy provider ([#100](https://github.com/alchemyplatform/aa-sdk/issues/100)) ([a5dc65c](https://github.com/alchemyplatform/aa-sdk/commit/a5dc65c4208614b935943ebdd8eececf3de03d29)) - -# 0.1.0-alpha.29 (2023-08-29) - -### Bug Fixes - -- **core:** add missing `null` return type of `eth_getUserOperation*` ([#93](https://github.com/alchemyplatform/aa-sdk/issues/93)) ([cba9a0c](https://github.com/alchemyplatform/aa-sdk/commit/cba9a0c79807612b37c9d8c300b494312c9bd752)) - -# 0.1.0-alpha.28 (2023-08-25) - -### Bug Fixes - -- pass overrides from tx to user op ([#88](https://github.com/alchemyplatform/aa-sdk/issues/88)) ([985cb99](https://github.com/alchemyplatform/aa-sdk/commit/985cb997691f5b251337ea0fbe6bd23e6b3fb455)) - -# 0.1.0-alpha.27 (2023-08-24) - -**Note:** Version bump only for package @alchemy/aa-core - -# 0.1.0-alpha.26 (2023-08-23) - -### Features - -- add utils for getting the intermediary UO struct ([#86](https://github.com/alchemyplatform/aa-sdk/issues/86)) ([0e1a701](https://github.com/alchemyplatform/aa-sdk/commit/0e1a70174c0eeff2eedce4379914cad75f0629b2)) - -# 0.1.0-alpha.25 (2023-08-17) - -### Features - -- add jwt support for Alchemy providers ([#81](https://github.com/alchemyplatform/aa-sdk/issues/81)) ([af85aa4](https://github.com/alchemyplatform/aa-sdk/commit/af85aa41441825ca6545e850cbc7e834879cf236)) - -# 0.1.0-alpha.24 (2023-08-16) - -### Features - -- add utils for verifying 6492 sigs and ensip-11 utils ([#80](https://github.com/alchemyplatform/aa-sdk/issues/80)) ([52231b6](https://github.com/alchemyplatform/aa-sdk/commit/52231b6b4a521ee0713c4d3d3126ac4e5d66f14c)) - -# 0.1.0-alpha.23 (2023-08-14) - -### Features - -- **alchemy:** modify fee defaults ([0a0a65c](https://github.com/alchemyplatform/aa-sdk/commit/0a0a65c03a6991a1c57473ae9e65c4b727d937e2)) - -# 0.1.0-alpha.22 (2023-08-11) - -**Note:** Version bump only for package @alchemy/aa-core - -# 0.1.0-alpha.21 (2023-08-08) - -### Features - -- allow overriding alchemy provider rpc url ([#70](https://github.com/alchemyplatform/aa-sdk/issues/70)) ([6b7c4b9](https://github.com/alchemyplatform/aa-sdk/commit/6b7c4b911b97dfcd1cfb00b2892548644fbe2fc6)) - -# 0.1.0-alpha.20 (2023-08-05) - -### Features - -- add signTypedData to providers ([#66](https://github.com/alchemyplatform/aa-sdk/issues/66)) ([e0a99f6](https://github.com/alchemyplatform/aa-sdk/commit/e0a99f694a6ed6e88b15d6cc73f99e74fd985667)) - -# 0.1.0-alpha.19 (2023-08-03) - -### Features - -- add event emitter to the provider so that we can listen to connected events in dapps ([#65](https://github.com/alchemyplatform/aa-sdk/issues/65)) ([35ee990](https://github.com/alchemyplatform/aa-sdk/commit/35ee990afa1c8be7c4685631af6654ac51b094cd)) - -# 0.1.0-alpha.18 (2023-07-28) - -**Note:** Version bump only for package @alchemy/aa-core - -# 0.1.0-alpha.17 (2023-07-19) - -### Features - -- add support for fetch options when creating public clients ([#59](https://github.com/alchemyplatform/aa-sdk/issues/59)) ([5028e7b](https://github.com/alchemyplatform/aa-sdk/commit/5028e7b21a208ad8f88e81d455c2c8e24d57d953)) - -# 0.1.0-alpha.16 (2023-07-06) - -### Bug Fixes - -- always import with file extension ([#48](https://github.com/alchemyplatform/aa-sdk/issues/48)) ([4776d74](https://github.com/alchemyplatform/aa-sdk/commit/4776d7476f8cb622416c8846afa9bc17d16b97a6)) - -# 0.1.0-alpha.15 (2023-07-05) - -### Features - -- kernel batch transactions and gas estimation fixes ([#39](https://github.com/alchemyplatform/aa-sdk/issues/39)) ([f2a3d3d](https://github.com/alchemyplatform/aa-sdk/commit/f2a3d3d093ddbe1b564c0242c28b67487554f1ba)) - -# 0.1.0-alpha.14 (2023-06-29) - -### Bug Fixes - -- npm 404 error ([f34f581](https://github.com/alchemyplatform/aa-sdk/commit/f34f581a0399a2e30f33161d8b4cc1d778122b1f)) - -# 0.1.0-alpha.13 (2023-06-29) - -### Bug Fixes - -- add github user details to publish script ([2b812d3](https://github.com/alchemyplatform/aa-sdk/commit/2b812d34c041e11ba7d4c11a72c26da8f8e7af21)) - -# [0.1.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.10...v0.1.0-alpha.11) (2023-06-26) - -### Features - -- add a logger and some debug statements ([#35](https://github.com/alchemyplatform/aa-sdk/issues/35)) ([faef24e](https://github.com/alchemyplatform/aa-sdk/commit/faef24e9060216b03b4c7f2413d7fde931046096)) - -# [0.1.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.10) (2023-06-26) - -### Bug Fixes - -- types changed when updating to latest viem ([0aec96d](https://github.com/alchemyplatform/aa-sdk/commit/0aec96d184b5bcc3787ce9123260cf287f27f037)) - -# [0.1.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.9) (2023-06-26) - -**Note:** Version bump only for package @alchemy/aa-core - -# [0.1.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.6...v0.1.0-alpha.7) (2023-06-20) - -**Note:** Version bump only for package @alchemy/aa-core - -# [0.1.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.4...v0.1.0-alpha.5) (2023-06-16) - -**Note:** Version bump only for package @alchemy/aa-core - -# [0.1.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.3...v0.1.0-alpha.4) (2023-06-14) - -### Features - -- expose more user op methods on the provider ([#25](https://github.com/alchemyplatform/aa-sdk/issues/25)) ([2f39460](https://github.com/alchemyplatform/aa-sdk/commit/2f3946063d78a4fe1a99078f8fd315d87b24a901)) - -# [0.1.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.1...v0.1.0-alpha.2) (2023-06-12) - -### Bug Fixes - -- arbitrum min fee per bid needs to be a 1/10th the default on other chains ([#17](https://github.com/alchemyplatform/aa-sdk/issues/17)) ([453ecec](https://github.com/alchemyplatform/aa-sdk/commit/453ececb22e1981b27ed0635e0c763aa73e1a36f)) -- import in core was still exporting deleted item ([4946408](https://github.com/alchemyplatform/aa-sdk/commit/4946408e757eab4e18a96d0a16839e92d78238d4)) -- inject version was not using double quotes ([b7a7700](https://github.com/alchemyplatform/aa-sdk/commit/b7a77005bc0b04904911285ee0a9d3b610a73b89)) - -### Features - -- add alchemy sub-package ([#22](https://github.com/alchemyplatform/aa-sdk/issues/22)) ([e7fc1aa](https://github.com/alchemyplatform/aa-sdk/commit/e7fc1aa93ebd57237009d3aa688d8c167f240aad)) -- integrate sdk and refactor onboarding ([#12](https://github.com/alchemyplatform/aa-sdk/issues/12)) ([7dd7c97](https://github.com/alchemyplatform/aa-sdk/commit/7dd7c97ad10936fec0c9171d93745a891674c409)) -- Support Arb Mainnet for Demo App ([#18](https://github.com/alchemyplatform/aa-sdk/issues/18)) ([6df907c](https://github.com/alchemyplatform/aa-sdk/commit/6df907cf8acb0fcf921b700a18d5bcb6d89c49f3)) - -# [0.1.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.0...v0.1.0-alpha.1) (2023-06-02) - -### Features - -- add support for the new alchemy paymaster endpoint ([#14](https://github.com/alchemyplatform/aa-sdk/issues/14)) ([3fac515](https://github.com/alchemyplatform/aa-sdk/commit/3fac5152075b07ab91dea393e366b667149a3e23)) - -# [0.1.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.2...v0.1.0-alpha.0) (2023-05-31) - -### Features - -- add support for batching transactions in a userop ([#7](https://github.com/alchemyplatform/aa-sdk/issues/7)) ([79d63a7](https://github.com/alchemyplatform/aa-sdk/commit/79d63a79d26d6501d74dbf90de6c9a1158d931de)) - -## [0.0.1-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.1...v0.0.1-alpha.2) (2023-05-23) - -**Note:** Version bump only for package @alchemy/aa-core - -## [0.0.1-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.0...v0.0.1-alpha.1) (2023-05-22) - -**Note:** Version bump only for package @alchemy/aa-core - -## 0.0.1-alpha.0 (2023-05-22) - -### Bug Fixes - -- rename folders and update readme to reference correct package names ([8bbcaf7](https://github.com/alchemyplatform/aa-sdk/commit/8bbcaf76d2a9a945b30ce09fd2928a4a5eefb4be)) - -## [0.0.1-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.1...v0.0.1-alpha.0) (2023-05-22) - -**Note:** Version bump only for package @alchemy/aa-core - -## [0.0.1-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.0...v0.0.1-alpha.1) (2023-05-22) - -**Note:** Version bump only for package @alchemy/aa-core - -## 0.0.1-alpha.0 (2023-05-22) - -### Bug Fixes - -- rename folders and update readme to reference correct package names ([8bbcaf7](https://github.com/alchemyplatform/aa-sdk/commit/8bbcaf76d2a9a945b30ce09fd2928a4a5eefb4be)) diff --git a/aa-sdk/core/README.md b/aa-sdk/core/README.md deleted file mode 100644 index 674f43dbac..0000000000 --- a/aa-sdk/core/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# `@aa-sdk/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`. - -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 `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 ergonomic utilities for building and submitting `User Operation`s. - -## Getting started - -To get started, first install the package: - -```bash [yarn] -yarn add @aa-sdk/core -``` - -```bash [npm] -npm i -s @aa-sdk/core -``` - -```bash [pnpm] -pnpm i @aa-sdk/core -``` - -## Usage - -You can create a provider like so: - -```typescript -import { createMultiOwnerModularAccount } from "@alchemy/aa-accounts"; -import { - LocalAccountSigner, - SmartAccountSigner, - createSmartAccountClient, - polygonMumbai, -} from "@aa-sdk/core"; -import { http } from "viem"; - -const chain = polygonMumbai; -const signer: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner( - "YOUR_OWNER_MNEMONIC", -); -const rpcTransport = http("https://polygon-mumbai.g.alchemy.com/v2/demo"); - -export const smartAccountClient = createSmartAccountClient({ - transport: rpcTransport, - chain, - account: await createMultiOwnerModularAccount({ - transport: rpcTransport, - chain, - signer, - }), -}); -``` diff --git a/aa-sdk/core/package.json b/aa-sdk/core/package.json deleted file mode 100644 index a1dd88c161..0000000000 --- a/aa-sdk/core/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@aa-sdk/core", - "license": "MIT", - "version": "4.84.1", - "description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts", - "author": "Alchemy", - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - }, - "./package.json": "./package.json" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest", - "test:run": "vitest run" - }, - "devDependencies": { - "dotenv": "^16.0.3", - "typescript-template": "*" - }, - "dependencies": { - "abitype": "^0.8.3", - "eventemitter3": "^5.0.1", - "zod": "^3.22.4" - }, - "peerDependencies": { - "viem": "^2.45.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d" -} diff --git a/aa-sdk/core/src/__tests__/utils.test.ts b/aa-sdk/core/src/__tests__/utils.test.ts deleted file mode 100644 index 29aabbab90..0000000000 --- a/aa-sdk/core/src/__tests__/utils.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { sepolia } from "viem/chains"; -import { getEntryPoint } from "../entrypoint/index.js"; -import { stringToIndex } from "../utils/index.js"; - -describe("Utils Tests", () => { - const chain = sepolia; - const entryPoint = getEntryPoint(chain); - - it("getUserOperationHash should correctly hash a request", () => { - expect( - entryPoint.getUserOperationHash({ - callData: - "0xb61d27f6000000000000000000000000b856dbd4fa1a79a46d426f537455e7d3e79ab7c4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", - callGasLimit: "0x2f6c", - initCode: "0x", - maxFeePerGas: "0x59682f1e", - maxPriorityFeePerGas: "0x59682f00", - nonce: "0x1f", - paymasterAndData: "0x", - preVerificationGas: "0xa890", - sender: "0xb856DBD4fA1A79a46D426f537455e7d3E79ab7c4", - signature: - "0xd16f93b584fbfdc03a5ee85914a1f29aa35c44fea5144c387ee1040a3c1678252bf323b7e9c3e9b4dfd91cca841fc522f4d3160a1e803f2bf14eb5fa037aae4a1b", - verificationGasLimit: "0x114c2", - }), - ).toMatchInlineSnapshot( - '"0xbb5560c1a3983429a6cdb244fa532fb4f2cf0de8ba9ccbf257bff93d069c76a3"', - ); - }); - - describe("bigint utils", () => { - it("produces an index value from a string", () => { - const index = stringToIndex("alice@example.com"); - - expect(index).toEqual( - 53219281434065493725260108619161294016101536485294536107629387514619165176826n, - ); - }); - }); -}); diff --git a/aa-sdk/core/src/abis/EntryPointAbi_v6.ts b/aa-sdk/core/src/abis/EntryPointAbi_v6.ts deleted file mode 100644 index a31242387a..0000000000 --- a/aa-sdk/core/src/abis/EntryPointAbi_v6.ts +++ /dev/null @@ -1,1309 +0,0 @@ -export const EntryPointAbi_v6 = [ - { - inputs: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "paid", - type: "uint256", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, - { - internalType: "bool", - name: "targetSuccess", - type: "bool", - }, - { - internalType: "bytes", - name: "targetResult", - type: "bytes", - }, - ], - name: "ExecutionResult", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "opIndex", - type: "uint256", - }, - { - internalType: "string", - name: "reason", - type: "string", - }, - ], - name: "FailedOp", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - ], - name: "SenderAddressResult", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "aggregator", - type: "address", - }, - ], - name: "SignatureValidationFailed", - type: "error", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "bool", - name: "sigFailed", - type: "bool", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, - { - internalType: "bytes", - name: "paymasterContext", - type: "bytes", - }, - ], - internalType: "struct IEntryPoint.ReturnInfo", - name: "returnInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "senderInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "factoryInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "paymasterInfo", - type: "tuple", - }, - ], - name: "ValidationResult", - type: "error", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "bool", - name: "sigFailed", - type: "bool", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, - { - internalType: "bytes", - name: "paymasterContext", - type: "bytes", - }, - ], - internalType: "struct IEntryPoint.ReturnInfo", - name: "returnInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "senderInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "factoryInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "paymasterInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "address", - name: "aggregator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "stakeInfo", - type: "tuple", - }, - ], - internalType: "struct IEntryPoint.AggregatorStakeInfo", - name: "aggregatorInfo", - type: "tuple", - }, - ], - name: "ValidationResultWithAggregation", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "factory", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "paymaster", - type: "address", - }, - ], - name: "AccountDeployed", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "BeforeExecution", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "totalDeposit", - type: "uint256", - }, - ], - name: "Deposited", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "aggregator", - type: "address", - }, - ], - name: "SignatureAggregatorChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "withdrawTime", - type: "uint256", - }, - ], - name: "StakeUnlocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "withdrawAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "StakeWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "paymaster", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - indexed: false, - internalType: "bool", - name: "success", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "actualGasCost", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "actualGasUsed", - type: "uint256", - }, - ], - name: "UserOperationEvent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "revertReason", - type: "bytes", - }, - ], - name: "UserOperationRevertReason", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "withdrawAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Withdrawn", - type: "event", - }, - { - inputs: [], - name: "SIG_VALIDATION_FAILED", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - ], - name: "_validateSenderAndPaymaster", - outputs: [], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint32", - name: "unstakeDelaySec", - type: "uint32", - }, - ], - name: "addStake", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "depositTo", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "deposits", - outputs: [ - { - internalType: "uint112", - name: "deposit", - type: "uint112", - }, - { - internalType: "bool", - name: "staked", - type: "bool", - }, - { - internalType: "uint112", - name: "stake", - type: "uint112", - }, - { - internalType: "uint32", - name: "unstakeDelaySec", - type: "uint32", - }, - { - internalType: "uint48", - name: "withdrawTime", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getDepositInfo", - outputs: [ - { - components: [ - { - internalType: "uint112", - name: "deposit", - type: "uint112", - }, - { - internalType: "bool", - name: "staked", - type: "bool", - }, - { - internalType: "uint112", - name: "stake", - type: "uint112", - }, - { - internalType: "uint32", - name: "unstakeDelaySec", - type: "uint32", - }, - { - internalType: "uint48", - name: "withdrawTime", - type: "uint48", - }, - ], - internalType: "struct IStakeManager.DepositInfo", - name: "info", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint192", - name: "key", - type: "uint192", - }, - ], - name: "getNonce", - outputs: [ - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - ], - name: "getSenderAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "userOp", - type: "tuple", - }, - ], - name: "getUserOpHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation[]", - name: "userOps", - type: "tuple[]", - }, - { - internalType: "contract IAggregator", - name: "aggregator", - type: "address", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct IEntryPoint.UserOpsPerAggregator[]", - name: "opsPerAggregator", - type: "tuple[]", - }, - { - internalType: "address payable", - name: "beneficiary", - type: "address", - }, - ], - name: "handleAggregatedOps", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation[]", - name: "ops", - type: "tuple[]", - }, - { - internalType: "address payable", - name: "beneficiary", - type: "address", - }, - ], - name: "handleOps", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint192", - name: "key", - type: "uint192", - }, - ], - name: "incrementNonce", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - components: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "address", - name: "paymaster", - type: "address", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - ], - internalType: "struct EntryPoint.MemoryUserOp", - name: "mUserOp", - type: "tuple", - }, - { - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "uint256", - name: "contextOffset", - type: "uint256", - }, - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - ], - internalType: "struct EntryPoint.UserOpInfo", - name: "opInfo", - type: "tuple", - }, - { - internalType: "bytes", - name: "context", - type: "bytes", - }, - ], - name: "innerHandleOp", - outputs: [ - { - internalType: "uint256", - name: "actualGasCost", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint192", - name: "", - type: "uint192", - }, - ], - name: "nonceSequenceNumber", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "op", - type: "tuple", - }, - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "targetCallData", - type: "bytes", - }, - ], - name: "simulateHandleOp", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "userOp", - type: "tuple", - }, - ], - name: "simulateValidation", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "withdrawAddress", - type: "address", - }, - ], - name: "withdrawStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "withdrawAddress", - type: "address", - }, - { - internalType: "uint256", - name: "withdrawAmount", - type: "uint256", - }, - ], - name: "withdrawTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; diff --git a/aa-sdk/core/src/abis/EntryPointAbi_v7.ts b/aa-sdk/core/src/abis/EntryPointAbi_v7.ts deleted file mode 100644 index caecfd68df..0000000000 --- a/aa-sdk/core/src/abis/EntryPointAbi_v7.ts +++ /dev/null @@ -1,658 +0,0 @@ -// https://etherscan.io/address/0x0000000071727de22e5e9d8baf0edac6f37da032 -export const EntryPointAbi_v7 = [ - { - inputs: [ - { internalType: "bool", name: "success", type: "bool" }, - { internalType: "bytes", name: "ret", type: "bytes" }, - ], - name: "DelegateAndRevert", - type: "error", - }, - { - inputs: [ - { internalType: "uint256", name: "opIndex", type: "uint256" }, - { internalType: "string", name: "reason", type: "string" }, - ], - name: "FailedOp", - type: "error", - }, - { - inputs: [ - { internalType: "uint256", name: "opIndex", type: "uint256" }, - { internalType: "string", name: "reason", type: "string" }, - { internalType: "bytes", name: "inner", type: "bytes" }, - ], - name: "FailedOpWithRevert", - type: "error", - }, - { - inputs: [{ internalType: "bytes", name: "returnData", type: "bytes" }], - name: "PostOpReverted", - type: "error", - }, - { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error" }, - { - inputs: [{ internalType: "address", name: "sender", type: "address" }], - name: "SenderAddressResult", - type: "error", - }, - { - inputs: [{ internalType: "address", name: "aggregator", type: "address" }], - name: "SignatureValidationFailed", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "factory", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "paymaster", - type: "address", - }, - ], - name: "AccountDeployed", - type: "event", - }, - { anonymous: false, inputs: [], name: "BeforeExecution", type: "event" }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "totalDeposit", - type: "uint256", - }, - ], - name: "Deposited", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "revertReason", - type: "bytes", - }, - ], - name: "PostOpRevertReason", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "aggregator", - type: "address", - }, - ], - name: "SignatureAggregatorChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "totalStaked", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - name: "StakeLocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "withdrawTime", - type: "uint256", - }, - ], - name: "StakeUnlocked", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "withdrawAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "StakeWithdrawn", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "paymaster", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { indexed: false, internalType: "bool", name: "success", type: "bool" }, - { - indexed: false, - internalType: "uint256", - name: "actualGasCost", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "actualGasUsed", - type: "uint256", - }, - ], - name: "UserOperationEvent", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - ], - name: "UserOperationPrefundTooLow", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "revertReason", - type: "bytes", - }, - ], - name: "UserOperationRevertReason", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "withdrawAddress", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Withdrawn", - type: "event", - }, - { - inputs: [ - { internalType: "uint32", name: "unstakeDelaySec", type: "uint32" }, - ], - name: "addStake", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "balanceOf", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "target", type: "address" }, - { internalType: "bytes", name: "data", type: "bytes" }, - ], - name: "delegateAndRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "depositTo", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "", type: "address" }], - name: "deposits", - outputs: [ - { internalType: "uint256", name: "deposit", type: "uint256" }, - { internalType: "bool", name: "staked", type: "bool" }, - { internalType: "uint112", name: "stake", type: "uint112" }, - { internalType: "uint32", name: "unstakeDelaySec", type: "uint32" }, - { internalType: "uint48", name: "withdrawTime", type: "uint48" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "getDepositInfo", - outputs: [ - { - components: [ - { internalType: "uint256", name: "deposit", type: "uint256" }, - { internalType: "bool", name: "staked", type: "bool" }, - { internalType: "uint112", name: "stake", type: "uint112" }, - { internalType: "uint32", name: "unstakeDelaySec", type: "uint32" }, - { internalType: "uint48", name: "withdrawTime", type: "uint48" }, - ], - internalType: "struct IStakeManager.DepositInfo", - name: "info", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "uint192", name: "key", type: "uint192" }, - ], - name: "getNonce", - outputs: [{ internalType: "uint256", name: "nonce", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "bytes", name: "initCode", type: "bytes" }], - name: "getSenderAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "uint256", name: "nonce", type: "uint256" }, - { internalType: "bytes", name: "initCode", type: "bytes" }, - { internalType: "bytes", name: "callData", type: "bytes" }, - { - internalType: "bytes32", - name: "accountGasLimits", - type: "bytes32", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { internalType: "bytes32", name: "gasFees", type: "bytes32" }, - { internalType: "bytes", name: "paymasterAndData", type: "bytes" }, - { internalType: "bytes", name: "signature", type: "bytes" }, - ], - internalType: "struct PackedUserOperation", - name: "userOp", - type: "tuple", - }, - ], - name: "getUserOpHash", - outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - components: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "uint256", name: "nonce", type: "uint256" }, - { internalType: "bytes", name: "initCode", type: "bytes" }, - { internalType: "bytes", name: "callData", type: "bytes" }, - { - internalType: "bytes32", - name: "accountGasLimits", - type: "bytes32", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { internalType: "bytes32", name: "gasFees", type: "bytes32" }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { internalType: "bytes", name: "signature", type: "bytes" }, - ], - internalType: "struct PackedUserOperation[]", - name: "userOps", - type: "tuple[]", - }, - { - internalType: "contract IAggregator", - name: "aggregator", - type: "address", - }, - { internalType: "bytes", name: "signature", type: "bytes" }, - ], - internalType: "struct IEntryPoint.UserOpsPerAggregator[]", - name: "opsPerAggregator", - type: "tuple[]", - }, - { internalType: "address payable", name: "beneficiary", type: "address" }, - ], - name: "handleAggregatedOps", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "uint256", name: "nonce", type: "uint256" }, - { internalType: "bytes", name: "initCode", type: "bytes" }, - { internalType: "bytes", name: "callData", type: "bytes" }, - { - internalType: "bytes32", - name: "accountGasLimits", - type: "bytes32", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { internalType: "bytes32", name: "gasFees", type: "bytes32" }, - { internalType: "bytes", name: "paymasterAndData", type: "bytes" }, - { internalType: "bytes", name: "signature", type: "bytes" }, - ], - internalType: "struct PackedUserOperation[]", - name: "ops", - type: "tuple[]", - }, - { internalType: "address payable", name: "beneficiary", type: "address" }, - ], - name: "handleOps", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "uint192", name: "key", type: "uint192" }], - name: "incrementNonce", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "bytes", name: "callData", type: "bytes" }, - { - components: [ - { - components: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "uint256", name: "nonce", type: "uint256" }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "paymasterVerificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "paymasterPostOpGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { internalType: "address", name: "paymaster", type: "address" }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - ], - internalType: "struct EntryPoint.MemoryUserOp", - name: "mUserOp", - type: "tuple", - }, - { internalType: "bytes32", name: "userOpHash", type: "bytes32" }, - { internalType: "uint256", name: "prefund", type: "uint256" }, - { internalType: "uint256", name: "contextOffset", type: "uint256" }, - { internalType: "uint256", name: "preOpGas", type: "uint256" }, - ], - internalType: "struct EntryPoint.UserOpInfo", - name: "opInfo", - type: "tuple", - }, - { internalType: "bytes", name: "context", type: "bytes" }, - ], - name: "innerHandleOp", - outputs: [ - { internalType: "uint256", name: "actualGasCost", type: "uint256" }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "", type: "address" }, - { internalType: "uint192", name: "", type: "uint192" }, - ], - name: "nonceSequenceNumber", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "unlockStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "withdrawAddress", - type: "address", - }, - ], - name: "withdrawStake", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "withdrawAddress", - type: "address", - }, - { internalType: "uint256", name: "withdrawAmount", type: "uint256" }, - ], - name: "withdrawTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { stateMutability: "payable", type: "receive" }, -] as const; diff --git a/aa-sdk/core/src/abis/SimpleAccountAbi_v6.ts b/aa-sdk/core/src/abis/SimpleAccountAbi_v6.ts deleted file mode 100644 index bf5a6cff43..0000000000 --- a/aa-sdk/core/src/abis/SimpleAccountAbi_v6.ts +++ /dev/null @@ -1,524 +0,0 @@ -export const SimpleAccountAbi_v6 = [ - { - inputs: [ - { - internalType: "contract IEntryPoint", - name: "anEntryPoint", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "previousAdmin", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "newAdmin", - type: "address", - }, - ], - name: "AdminChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "beacon", - type: "address", - }, - ], - name: "BeaconUpgraded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint8", - name: "version", - type: "uint8", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IEntryPoint", - name: "entryPoint", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "SimpleAccountInitialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "addDeposit", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "entryPoint", - outputs: [ - { - internalType: "contract IEntryPoint", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "dest", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "func", - type: "bytes", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "dest", - type: "address[]", - }, - { - internalType: "bytes[]", - name: "func", - type: "bytes[]", - }, - ], - name: "executeBatch", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDeposit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getNonce", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "anOwner", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "onERC1155BatchReceived", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "onERC1155Received", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "onERC721Received", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "tokensReceived", - outputs: [], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - ], - name: "upgradeTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "userOp", - type: "tuple", - }, - { - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "missingAccountFunds", - type: "uint256", - }, - ], - name: "validateUserOp", - outputs: [ - { - internalType: "uint256", - name: "validationData", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "withdrawAddress", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "withdrawDepositTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; diff --git a/aa-sdk/core/src/abis/SimpleAccountAbi_v7.ts b/aa-sdk/core/src/abis/SimpleAccountAbi_v7.ts deleted file mode 100644 index 82288f8352..0000000000 --- a/aa-sdk/core/src/abis/SimpleAccountAbi_v7.ts +++ /dev/null @@ -1,534 +0,0 @@ -export const SimpleAccountAbi_v7 = [ - { - inputs: [ - { - internalType: "contract IEntryPoint", - name: "anEntryPoint", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - ], - name: "AddressEmptyCode", - type: "error", - }, - { - inputs: [], - name: "ECDSAInvalidSignature", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "ECDSAInvalidSignatureLength", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "ECDSAInvalidSignatureS", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "ERC1967InvalidImplementation", - type: "error", - }, - { - inputs: [], - name: "ERC1967NonPayable", - type: "error", - }, - { - inputs: [], - name: "FailedInnerCall", - type: "error", - }, - { - inputs: [], - name: "InvalidInitialization", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", - }, - { - inputs: [], - name: "UUPSUnauthorizedCallContext", - type: "error", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "slot", - type: "bytes32", - }, - ], - name: "UUPSUnsupportedProxiableUUID", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, - ], - name: "Initialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IEntryPoint", - name: "entryPoint", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "SimpleAccountInitialized", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "implementation", - type: "address", - }, - ], - name: "Upgraded", - type: "event", - }, - { - inputs: [], - name: "UPGRADE_INTERFACE_VERSION", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "addDeposit", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [], - name: "entryPoint", - outputs: [ - { - internalType: "contract IEntryPoint", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "dest", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "func", - type: "bytes", - }, - ], - name: "execute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "dest", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "value", - type: "uint256[]", - }, - { - internalType: "bytes[]", - name: "func", - type: "bytes[]", - }, - ], - name: "executeBatch", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getDeposit", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getNonce", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "anOwner", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - { - internalType: "uint256[]", - name: "", - type: "uint256[]", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "onERC1155BatchReceived", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "onERC1155Received", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "onERC721Received", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proxiableUUID", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newImplementation", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "upgradeToAndCall", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "bytes32", - name: "accountGasLimits", - type: "bytes32", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "bytes32", - name: "gasFees", - type: "bytes32", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct PackedUserOperation", - name: "userOp", - type: "tuple", - }, - { - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "missingAccountFunds", - type: "uint256", - }, - ], - name: "validateUserOp", - outputs: [ - { - internalType: "uint256", - name: "validationData", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address payable", - name: "withdrawAddress", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "withdrawDepositTo", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -] as const; diff --git a/aa-sdk/core/src/abis/SimpleAccountFactoryAbi.ts b/aa-sdk/core/src/abis/SimpleAccountFactoryAbi.ts deleted file mode 100644 index 1e708628d4..0000000000 --- a/aa-sdk/core/src/abis/SimpleAccountFactoryAbi.ts +++ /dev/null @@ -1,74 +0,0 @@ -export const SimpleAccountFactoryAbi = [ - { - inputs: [ - { - internalType: "contract IEntryPoint", - name: "_entryPoint", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "accountImplementation", - outputs: [ - { - internalType: "contract SimpleAccount", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "salt", - type: "uint256", - }, - ], - name: "createAccount", - outputs: [ - { - internalType: "contract SimpleAccount", - name: "ret", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "salt", - type: "uint256", - }, - ], - name: "getAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; diff --git a/aa-sdk/core/src/account/smartContractAccount.ts b/aa-sdk/core/src/account/smartContractAccount.ts deleted file mode 100644 index 3ecfa9600a..0000000000 --- a/aa-sdk/core/src/account/smartContractAccount.ts +++ /dev/null @@ -1,557 +0,0 @@ -import { - getContract, - hexToBytes, - type Address, - type Chain, - type CustomSource, - type Hex, - type LocalAccount, - type PublicClient, - type SignableMessage, - type Transport, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { toAccount } from "viem/accounts"; -import { createBundlerClient } from "../client/bundlerClient.js"; -import type { - EntryPointDef, - EntryPointRegistryBase, - EntryPointVersion, -} from "../entrypoint/types.js"; -import { - BatchExecutionNotSupportedError, - FailedToGetStorageSlotError, - GetCounterFactualAddressError, - SignTransactionNotSupportedError, - UpgradesNotSupportedError, -} from "../errors/account.js"; -import { InvalidRpcUrlError } from "../errors/client.js"; -import { InvalidEntryPointError } from "../errors/entrypoint.js"; -import { Logger } from "../logger.js"; -import type { SmartAccountSigner } from "../signer/types.js"; -import { wrapSignatureWith6492 } from "../signer/utils.js"; -import type { NullAddress } from "../types.js"; -import type { IsUndefined, Never } from "../utils/types.js"; - -export type AccountOp = { - target: Address; - value?: bigint; - data: Hex | "0x"; -}; - -export enum DeploymentState { - UNDEFINED = "0x0", - NOT_DEPLOYED = "0x1", - DEPLOYED = "0x2", -} - -export type SignatureRequest = - | { - type: "personal_sign"; - data: SignableMessage; - } - | { - type: "eth_signTypedData_v4"; - data: TypedDataDefinition; - }; - -export type SigningMethods = { - prepareSign: (request: SignatureRequest) => Promise; - formatSign: (signature: Hex) => Promise; -}; - -export type GetEntryPointFromAccount< - TAccount extends SmartContractAccount | undefined, - TAccountOverride extends SmartContractAccount = SmartContractAccount, -> = - GetAccountParameter extends SmartContractAccount< - string, - infer TEntryPointVersion - > - ? TEntryPointVersion - : EntryPointVersion; - -export type GetAccountParameter< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TAccountOverride extends SmartContractAccount = SmartContractAccount, -> = - IsUndefined extends true - ? { account: TAccountOverride } - : { account?: TAccountOverride }; - -export type UpgradeToAndCallParams = { - upgradeToAddress: Address; - upgradeToInitData: Hex; -}; - -export type SmartContractAccountWithSigner< - Name extends string = string, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = SmartContractAccount & { - getSigner: () => TSigner; -}; - -/** - * Determines if the given SmartContractAccount has a signer associated with it. - * - * @example - * ```ts - * import { toSmartContractAccount } from "@aa-sdk/core"; - * - * const account = await toSmartContractAccount(...); - * - * console.log(isSmartAccountWithSigner(account)); // false: the base account does not have a publicly accessible signer - * ``` - * - * @param {SmartContractAccount} account The account to check. - * @returns {boolean} true if the account has a signer, otherwise false. - */ -export const isSmartAccountWithSigner = ( - account: SmartContractAccount, -): account is SmartContractAccountWithSigner => { - return "getSigner" in account; -}; - -export type SmartContractAccount< - Name extends string = string, - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = LocalAccount & { - source: Name; - getDummySignature: () => Hex | Promise; - encodeExecute: (tx: AccountOp) => Promise; - encodeBatchExecute: (txs: AccountOp[]) => 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; - getAccountNonce(nonceKey?: bigint): Promise; - getInitCode: () => Promise; - isAccountDeployed: () => Promise; - getFactoryAddress: () => Promise
; - getFactoryData: () => Promise; - getEntryPoint: () => EntryPointDef; - getImplementationAddress: () => Promise; -} & SigningMethods; - -export interface AccountEntryPointRegistry - extends EntryPointRegistryBase< - SmartContractAccount - > { - "0.6.0": SmartContractAccount; - "0.7.0": SmartContractAccount; -} - -export type ToSmartContractAccountParams< - Name extends string = string, - TTransport extends Transport = Transport, - TChain extends Chain = Chain, - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = { - source: Name; - transport: TTransport; - chain: TChain; - entryPoint: EntryPointDef; - accountAddress?: Address; - getAccountInitCode: () => Promise; - getDummySignature: () => Hex | Promise; - encodeExecute: (tx: AccountOp) => Promise; - encodeBatchExecute?: (txs: AccountOp[]) => Promise; - getNonce?: (nonceKey?: bigint) => Promise; - // if not provided, will default to just using signMessage over the Hex - signUserOperationHash?: (uoHash: Hex) => Promise; - encodeUpgradeToAndCall?: (params: UpgradeToAndCallParams) => Promise; - getImplementationAddress?: () => Promise; -} & Omit & - (SigningMethods | Never); - -/** - * Parses the factory address and factory calldata from the provided account initialization code (initCode). - * - * @example - * ```ts - * import { parseFactoryAddressFromAccountInitCode } from "@aa-sdk/core"; - * - * const [address, calldata] = parseFactoryAddressFromAccountInitCode("0xAddressCalldata"); - * ``` - * - * @param {Hex} initCode The initialization code from which to parse the factory address and calldata - * @returns {[Address, Hex]} A tuple containing the parsed factory address and factory calldata - */ -export const parseFactoryAddressFromAccountInitCode = ( - initCode: Hex, -): [Address, Hex] => { - const factoryAddress: Address = `0x${initCode.substring(2, 42)}`; - const factoryCalldata: Hex = `0x${initCode.substring(42)}`; - return [factoryAddress, factoryCalldata]; -}; - -export type GetAccountAddressParams = { - client: PublicClient; - entryPoint: EntryPointDef; - accountAddress?: Address; - getAccountInitCode: () => Promise; -}; - -/** - * Retrieves the account address. Uses a provided `accountAddress` if available; otherwise, it computes the address using the entry point contract and the initial code. - * - * @example - * ```ts - * import { getEntryPoint, getAccountAddress } from "@aa-sdk/core"; - * - * const accountAddress = await getAccountAddress({ - * client, - * entryPoint: getEntryPoint(chain), - * getAccountInitCode: async () => "0x{factoryAddress}{factoryCallData}", - * }); - * ``` - * - * @param {GetAccountAddressParams} params The configuration object - * @param {PublicClient} params.client A public client instance to interact with the blockchain - * @param {EntryPointDef} params.entryPoint The entry point definition which includes the address and ABI - * @param {Address} params.accountAddress Optional existing account address - * @param {() => Promise} params.getAccountInitCode A function that returns a Promise resolving to a Hex string representing the initial code of the account - * @returns {Promise
} A promise that resolves to the account address - */ -export const getAccountAddress = async ({ - client, - entryPoint, - accountAddress, - getAccountInitCode, -}: GetAccountAddressParams) => { - if (accountAddress) return accountAddress; - - const entryPointContract = getContract({ - address: entryPoint.address, - abi: entryPoint.abi, - client, - }); - - const initCode = await getAccountInitCode(); - Logger.verbose("[BaseSmartContractAccount](getAddress) initCode: ", initCode); - - try { - await entryPointContract.simulate.getSenderAddress([initCode]); - } catch (err: any) { - Logger.verbose( - "[BaseSmartContractAccount](getAddress) getSenderAddress err: ", - err, - ); - if (err.cause?.data?.errorName === "SenderAddressResult") { - Logger.verbose( - "[BaseSmartContractAccount](getAddress) entryPoint.getSenderAddress result:", - err.cause.data.args[0], - ); - - return err.cause.data.args[0] as Address; - } - - if (err.details === "Invalid URL") { - throw new InvalidRpcUrlError(); - } - } - - throw new GetCounterFactualAddressError(); -}; - -export async function toSmartContractAccount< - Name extends string = string, - TTransport extends Transport = Transport, - TChain extends Chain = Chain, - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->({ - transport, - chain, - entryPoint, - source, - accountAddress, - getAccountInitCode, - getNonce, - signMessage, - signTypedData, - encodeBatchExecute, - encodeExecute, - getDummySignature, - signUserOperationHash, - encodeUpgradeToAndCall, -}: ToSmartContractAccountParams< - Name, - TTransport, - TChain, - TEntryPointVersion ->): Promise>; - -/** - * Converts an account to a smart contract account and sets up various account-related methods using the provided parameters like transport, chain, entry point, and other utilities. - * - * @example - * ```ts - * import { http, type SignableMessage } from "viem"; - * import { sepolia } from "viem/chains"; - * - * const myAccount = await toSmartContractAccount({ - * /// REQUIRED PARAMS /// - * source: "MyAccount", - * transport: http("RPC_URL"), - * chain: sepolia, - * // The EntryPointDef that your account is com"patible with - * entryPoint: getEntryPoint(sepolia, { version: "0.6.0" }), - * // This should return a concatenation of your `factoryAddress` and the `callData` for your factory's create account method - * getAccountInitCode: async () => "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: async (uo) => "0xcalldata", - * signMessage: async ({ message }: { message: SignableMessage }) => "0x...", - * signTypedData: async (typedData) => "0x000", - * - * /// OPTIONAL PARAMS /// - * // if you already know your account's address, pass that in here to avoid generating a new counterfactual - * accountAddress: "0xaddressoverride", - * // if your account supports batching, this should take an array of UOs and return the calldata for calling your contract's batchExecute method - * encodeBatchExecute: async (uos) => "0x...", - * // if your contract expects a different signing scheme than the default signMessage scheme, you can override that here - * signUserOperationHash: async (hash) => "0x...", - * // allows you to define the calldata for upgrading your account - * encodeUpgradeToAndCall: async (params) => "0x...", - * }); - * ``` - * - * @param {ToSmartContractAccountParams} params the parameters required for converting to a smart contract account - * @param {Transport} params.transport the transport mechanism used for communication - * @param {Chain} params.chain the blockchain chain used in the account - * @param {EntryPoint} params.entryPoint the entry point of the smart contract - * @param {string} params.source the source identifier for the account - * @param {Address} [params.accountAddress] the address of the account - * @param {() => Promise} params.getAccountInitCode a function to get the initial state code of the account - * @param {(message: { message: SignableMessage }) => Promise} params.signMessage a function to sign a message - * @param {(typedDataDefinition: TypedDataDefinition) => Promise} params.signTypedData a function to sign typed data - * @param {(transactions: Transaction[]) => Hex} [params.encodeBatchExecute] a function to encode batch transactions - * @param {(tx: Transaction) => Hex} params.encodeExecute a function to encode a single transaction - * @param {() => Promise} params.getDummySignature a function to get a dummy signature - * @param {(uoHash: Hex) => Promise} [params.signUserOperationHash] a function to sign user operations - * @param {(implementationAddress: Address, implementationCallData: Hex) => Hex} [params.encodeUpgradeToAndCall] a function to encode upgrade call - * @returns {Promise} a promise that resolves to a SmartContractAccount object with methods and properties for interacting with the smart contract account - */ -export async function toSmartContractAccount( - params: ToSmartContractAccountParams, -): Promise { - const { - transport, - chain, - entryPoint, - source, - accountAddress, - getAccountInitCode, - signMessage, - signTypedData, - encodeExecute, - encodeBatchExecute, - getNonce, - getDummySignature, - signUserOperationHash, - encodeUpgradeToAndCall, - getImplementationAddress, - prepareSign: prepareSign_, - formatSign: formatSign_, - } = params; - - const client = createBundlerClient({ - // we set the retry count to 0 so that viem doesn't retry during - // getting the address. That call always reverts and without this - // viem will retry 3 times, making this call very slow - transport: (opts) => transport({ ...opts, chain, retryCount: 0 }), - chain, - }); - - const entryPointContract = getContract({ - address: entryPoint.address, - abi: entryPoint.abi, - client, - }); - - const accountAddress_ = await getAccountAddress({ - client, - entryPoint: entryPoint, - accountAddress, - getAccountInitCode, - }); - - let deploymentState = DeploymentState.UNDEFINED; - - const getInitCode = async () => { - if (deploymentState === DeploymentState.DEPLOYED) { - return "0x"; - } - const contractCode = await client.getCode({ - address: accountAddress_, - }); - - if ((contractCode?.length ?? 0) > 2) { - deploymentState = DeploymentState.DEPLOYED; - return "0x"; - } else { - deploymentState = DeploymentState.NOT_DEPLOYED; - } - - return getAccountInitCode(); - }; - - const signUserOperationHash_ = - signUserOperationHash ?? - (async (uoHash: Hex) => { - return signMessage({ message: { raw: hexToBytes(uoHash) } }); - }); - - const getFactoryAddress = async (): Promise
=> - parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[0]; - - const getFactoryData = async (): Promise => - parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[1]; - - const encodeUpgradeToAndCall_ = - encodeUpgradeToAndCall ?? - (() => { - throw new UpgradesNotSupportedError(source); - }); - - const isAccountDeployed = async () => { - const initCode = await getInitCode(); - return initCode === "0x"; - }; - - const getNonce_ = - getNonce ?? - (async (nonceKey = 0n): Promise => { - return entryPointContract.read.getNonce([ - accountAddress_, - nonceKey, - ]) as Promise; - }); - - const account = toAccount({ - address: accountAddress_, - signMessage, - signTypedData, - signTransaction: () => { - throw new SignTransactionNotSupportedError(); - }, - }); - - const create6492Signature = async (isDeployed: boolean, signature: Hex) => { - if (isDeployed) { - return signature; - } - - const [factoryAddress, factoryCalldata] = - parseFactoryAddressFromAccountInitCode(await getAccountInitCode()); - - return wrapSignatureWith6492({ - factoryAddress, - factoryCalldata, - signature, - }); - }; - - const signMessageWith6492 = async (message: { message: SignableMessage }) => { - const [isDeployed, signature] = await Promise.all([ - isAccountDeployed(), - account.signMessage(message), - ]); - - return create6492Signature(isDeployed, signature); - }; - - const signTypedDataWith6492 = async < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >( - typedDataDefinition: TypedDataDefinition, - ): Promise => { - const [isDeployed, signature] = await Promise.all([ - isAccountDeployed(), - account.signTypedData(typedDataDefinition), - ]); - - return create6492Signature(isDeployed, signature); - }; - - const getImplementationAddress_ = - getImplementationAddress ?? - (async () => { - const storage = await client.getStorageAt({ - address: account.address, - // This is the default slot for the implementation address for Proxies - slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", - }); - - if (storage == null) { - throw new FailedToGetStorageSlotError( - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", - "Proxy Implementation Address", - ); - } - - // The storage slot contains a full bytes32, but we want only the last 20 bytes. - // So, slice off the leading `0x` and the first 12 bytes (24 characters), leaving the last 20 bytes, then prefix with `0x`. - return `0x${storage.slice(26)}`; - }); - - if (entryPoint.version !== "0.6.0" && entryPoint.version !== "0.7.0") { - throw new InvalidEntryPointError(chain, entryPoint.version); - } - - if ((prepareSign_ && !formatSign_) || (!prepareSign_ && formatSign_)) { - throw new Error( - "Must implement both prepareSign and formatSign or neither", - ); - } - - const prepareSign = - prepareSign_ ?? - (() => { - throw new Error("prepareSign not implemented"); - }); - - const formatSign = - formatSign_ ?? - (() => { - throw new Error("formatSign not implemented"); - }); - - return { - ...account, - source, - // TODO: I think this should probably be signUserOperation instead - // and allow for generating the UO hash based on the EP version - signUserOperationHash: signUserOperationHash_, - getFactoryAddress, - getFactoryData, - encodeBatchExecute: - encodeBatchExecute ?? - (() => { - throw new BatchExecutionNotSupportedError(source); - }), - encodeExecute, - getDummySignature, - getInitCode, - encodeUpgradeToAndCall: encodeUpgradeToAndCall_, - getEntryPoint: () => entryPoint, - isAccountDeployed, - getAccountNonce: getNonce_, - signMessageWith6492, - signTypedDataWith6492, - getImplementationAddress: getImplementationAddress_, - prepareSign, - formatSign, - }; -} diff --git a/aa-sdk/core/src/actions/bundler/estimateUserOperationGas.ts b/aa-sdk/core/src/actions/bundler/estimateUserOperationGas.ts deleted file mode 100644 index bc65b88ff0..0000000000 --- a/aa-sdk/core/src/actions/bundler/estimateUserOperationGas.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Address, Chain, Client, StateOverride, Transport } from "viem"; -import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; -import type { EntryPointVersion } from "../../entrypoint/types"; -import type { - UserOperationEstimateGasResponse, - UserOperationRequest, -} from "../../types"; -import { serializeStateOverride } from "../../utils/stateOverride.js"; - -export const estimateUserOperationGas = async < - TClient extends Client, - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->( - client: TClient, - args: { - request: UserOperationRequest; - entryPoint: Address; - stateOverride?: StateOverride; - }, -): Promise> => { - return client.request({ - method: "eth_estimateUserOperationGas", - params: - args.stateOverride != null - ? [ - args.request, - args.entryPoint, - serializeStateOverride(args.stateOverride), - ] - : [args.request, args.entryPoint], - }); -}; diff --git a/aa-sdk/core/src/actions/bundler/getSupportedEntryPoints.ts b/aa-sdk/core/src/actions/bundler/getSupportedEntryPoints.ts deleted file mode 100644 index 097312dce0..0000000000 --- a/aa-sdk/core/src/actions/bundler/getSupportedEntryPoints.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Address, Chain, Client, Transport } from "viem"; -import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; - -export const getSupportedEntryPoints = async < - TClient extends Client, ->( - client: TClient, -): Promise => { - return client.request({ - method: "eth_supportedEntryPoints", - params: [], - }); -}; diff --git a/aa-sdk/core/src/actions/bundler/getUserOperationByHash.ts b/aa-sdk/core/src/actions/bundler/getUserOperationByHash.ts deleted file mode 100644 index 2d3be52ec4..0000000000 --- a/aa-sdk/core/src/actions/bundler/getUserOperationByHash.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Chain, Client, Hex, Transport } from "viem"; -import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; -import type { UserOperationResponse } from "../../types"; - -export const getUserOperationByHash = async < - TClient extends Client, ->( - client: TClient, - args: { - hash: Hex; - }, -): Promise => { - return client.request({ - method: "eth_getUserOperationByHash", - params: [args.hash], - }); -}; diff --git a/aa-sdk/core/src/actions/bundler/getUserOperationReceipt.ts b/aa-sdk/core/src/actions/bundler/getUserOperationReceipt.ts deleted file mode 100644 index 35cf49c344..0000000000 --- a/aa-sdk/core/src/actions/bundler/getUserOperationReceipt.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Chain, Client, Hex, Transport } from "viem"; -import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; -import type { UserOperationReceipt } from "../../types"; - -export const getUserOperationReceipt = async < - TClient extends Client, ->( - client: TClient, - args: { - hash: Hex; - tag: "pending" | "latest" | undefined; - }, -): Promise => { - if (args.tag === undefined) { - return client.request({ - method: "eth_getUserOperationReceipt", - params: [args.hash], - }); - } - return client.request({ - method: "eth_getUserOperationReceipt", - params: [args.hash, args.tag], - }); -}; diff --git a/aa-sdk/core/src/actions/bundler/sendRawUserOperation.ts b/aa-sdk/core/src/actions/bundler/sendRawUserOperation.ts deleted file mode 100644 index 823c60292c..0000000000 --- a/aa-sdk/core/src/actions/bundler/sendRawUserOperation.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Address, Chain, Client, Hex, Transport } from "viem"; -import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; -import type { EntryPointVersion } from "../../entrypoint/types"; -import type { UserOperationRequest } from "../../types"; - -export const sendRawUserOperation = async < - TClient extends Client, - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->( - client: TClient, - args: { - request: UserOperationRequest; - entryPoint: Address; - }, -): Promise => { - return client.request({ - method: "eth_sendUserOperation", - params: [args.request, args.entryPoint], - }); -}; diff --git a/aa-sdk/core/src/actions/smartAccount/buildUserOperation.ts b/aa-sdk/core/src/actions/smartAccount/buildUserOperation.ts deleted file mode 100644 index c23097f286..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/buildUserOperation.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { type Chain, type Client, type Transport } from "viem"; -import { - type GetEntryPointFromAccount, - type SmartContractAccount, -} from "../../account/smartContractAccount.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 { _initUserOperation } from "./internal/initUserOperation.js"; -import { _runMiddlewareStack } from "./internal/runMiddlewareStack.js"; -import type { - BuildUserOperationParameters, - UserOperationContext, -} from "./types"; -import { clientHeaderTrack } from "../../client/addBreadcrumb.js"; - -const USER_OPERATION_METHOD = "buildUserOperation"; -/** - * Builds a user operation using the provided client and operation parameters. Ensures that the account exists and the client is compatible. - * - * @example - * ```ts - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * // smart account client is already extended with buildUserOperation - * const client = createSmartAccountClient(...); - * const result = await client.buildUserOperation({ - * uo: { - * target: "0x...", - * data: "0x...", // or "0x", - * value: 0n, // optional - * }, - * account, // only required if the client above is not connected to an account - * }); - * ``` - * - * @param {Client} client_ the client instance used to build the user operation - * @param {BuildUserOperationParameters} args the parameters required to build the user operation, including account, overrides, and context - * @returns {Promise>} a promise that resolves to a `UserOperationStruct` object containing the built user operation details - */ -export async function buildUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client_: Client, - args: BuildUserOperationParameters, -): Promise> { - const client = clientHeaderTrack(client_, USER_OPERATION_METHOD); - const { account = client.account, overrides, context } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - USER_OPERATION_METHOD, - client, - ); - } - - return _initUserOperation(client, args).then((_uo) => - _runMiddlewareStack(client, { - uo: _uo, - overrides, - account, - context, - }), - ); -} diff --git a/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTx.ts b/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTx.ts deleted file mode 100644 index 8c0f5c4013..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTx.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { - type Chain, - type Client, - type SendTransactionParameters, - type Transport, -} from "viem"; -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount.js"; -import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; -import { AccountNotFoundError } from "../../errors/account.js"; -import { IncompatibleClientError } from "../../errors/client.js"; -import { TransactionMissingToParamError } from "../../errors/transaction.js"; -import type { - UserOperationOverrides, - UserOperationStruct, -} from "../../types.js"; -import { buildUserOperation } from "./buildUserOperation.js"; -import type { UserOperationContext } from "./types.js"; -import { clientHeaderTrack } from "../../index.js"; - -/** - * Performs `buildUserOperationFromTx` in batch and builds into a single, yet to be signed `UserOperation` (UO) struct. The output user operation struct will be filled with all gas fields (and paymaster data if a paymaster is used) based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, `maxPriorityFeePerGas`) computed using the configured `ClientMiddlewares` on the `SmartAccountClient` - * - * @example - * ```ts - * import type { RpcTransactionRequest } from "viem"; - * import { smartAccountClient } from "./smartAccountClient"; - * // [!code focus:99] - * // buildUserOperationFromTx converts a traditional Ethereum transaction and returns - * // the unsigned user operation struct after constructing the user operation struct - * // through the middleware pipeline - * const tx: RpcTransactionRequest = { - * from, // ignored - * to, - * data: encodeFunctionData({ - * abi: ContractABI.abi, - * functionName: "func", - * args: [arg1, arg2, ...], - * }), - * }; - * const uoStruct = await smartAccountClient.buildUserOperationFromTx(tx); - * - * // signUserOperation signs the above unsigned user operation struct built - * // using the account connected to the smart account client - * const request = await smartAccountClient.signUserOperation({ uoStruct }); - * - * // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts) - * // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the - * // EntryPoint contract pointed at by the entryPoint address parameter - * const entryPointAddress = client.account.getEntryPoint().address; - * const uoHash = await smartAccountClient.sendRawUserOperation({ request, entryPoint: entryPointAddress }); - * ``` - * - * @param {Client} client_ the smart account client to use for RPC requests - * @param {SendTransactionParameters} args the send tx parameters - * @param {UserOperationOverrides} overrides optional overrides to use for any of the fields - * @param {TContext} context if the smart account client requires additinoal context for building UOs - * @returns {Promise>} a Promise containing the built user operation - */ -export async function buildUserOperationFromTx< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TChainOverride extends Chain | undefined = Chain | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client_: Client, - args: SendTransactionParameters, - overrides?: UserOperationOverrides, - context?: TContext, -): Promise> { - const client = clientHeaderTrack(client_, "buildUserOperationFromTx"); - const { account = client.account, ...request } = args; - if (!account || typeof account === "string") { - throw new AccountNotFoundError(); - } - - if (!request.to) { - throw new TransactionMissingToParamError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "buildUserOperationFromTx", - client, - ); - } - - const _overrides = { - ...overrides, - maxFeePerGas: request.maxFeePerGas ? request.maxFeePerGas : undefined, - maxPriorityFeePerGas: request.maxPriorityFeePerGas - ? request.maxPriorityFeePerGas - : undefined, - } as UserOperationOverrides; - - return buildUserOperation(client, { - uo: { - target: request.to, - data: request.data ?? "0x", - value: request.value ? request.value : 0n, - }, - account: account as SmartContractAccount, - context, - overrides: _overrides, - }); -} diff --git a/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTxs.ts b/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTxs.ts deleted file mode 100644 index dae2a1f280..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTxs.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { fromHex, type Chain, type Client, type Transport } from "viem"; -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount"; -import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; -import { AccountNotFoundError } from "../../errors/account.js"; -import { IncompatibleClientError } from "../../errors/client.js"; -import { TransactionMissingToParamError } from "../../errors/transaction.js"; -import type { UserOperationOverrides } from "../../types"; -import { bigIntMax } from "../../utils/index.js"; -import { buildUserOperation } from "./buildUserOperation.js"; -import type { - BuildTransactionParameters, - BuildUserOperationFromTransactionsResult, - UserOperationContext, -} from "./types"; -import { clientHeaderTrack } from "../../index.js"; - -/** - * Performs `buildUserOperationFromTx` in batch and builds into a single, - * yet to be signed `UserOperation` (UO) struct. The output user operation struct - * will be filled with all gas fields (and paymaster data if a paymaster is used) - * based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, - * `maxPriorityFeePerGas`) computed using the configured ClientMiddlewares on the SmartAccountClient. - * - * @example - * ```ts - * import type { RpcTransactionRequest } from "viem"; - * import { smartAccountClient } from "./smartAccountClient"; - * - * const requests: RpcTransactionRequest[] = [ - * { - * from, // ignored - * to, - * data: encodeFunctionData({ - * abi: ContractABI.abi, - * functionName: "func", - * args: [arg1, arg2, ...], - * }), - * }, - * { - * from, // ignored - * to, - * data: encodeFunctionData({ - * abi: ContractABI.abi, - * functionName: "func", - * args: [arg1, arg2, ...], - * }), - * }, - * ]; - * const uoStruct = await smartAccountClient.buildUserOperationFromTxs({ - * requests, - * }); - * - * // signUserOperation signs the above unsigned user operation struct built - * // using the account connected to the smart account client - * const request = await smartAccountClient.signUserOperation({ uoStruct }); - * - * // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts) - * // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the - * // EntryPoint contract pointed at by the entryPoint address parameter - * const entryPointAddress = client.account.getEntryPoint().address; - * const uoHash = await smartAccountClient.sendRawUserOperation({ - * request, - * entryPoint: entryPointAddress, - * }); - * ``` - * - * @param {Client} client_ the smart account client to use to make RPC calls - * @param {BuildTransactionParameters} args an object containing the requests to build as well as, the account if not hoisted, the context, the overrides, and optionally a flag to enable signing of the UO via the underlying middleware - * @returns {Promise>} a Promise containing the built user operation - */ -export async function buildUserOperationFromTxs< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client_: Client, - args: BuildTransactionParameters, -): Promise> { - const client = clientHeaderTrack(client_, "buildUserOperationFromTxs"); - const { account = client.account, requests, overrides, context } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "buildUserOperationFromTxs", - client, - ); - } - - const batch = requests.map((request) => { - if (!request.to) { - throw new TransactionMissingToParamError(); - } - - return { - target: request.to, - data: request.data ?? "0x", - value: request.value ? fromHex(request.value, "bigint") : 0n, - }; - }); - - const mfpgOverridesInTx = () => - requests - .filter((x) => x.maxFeePerGas != null) - .map((x) => fromHex(x.maxFeePerGas!, "bigint")); - const maxFeePerGas = - overrides?.maxFeePerGas != null - ? overrides?.maxFeePerGas - : mfpgOverridesInTx().length > 0 - ? bigIntMax(...mfpgOverridesInTx()) - : undefined; - - const mpfpgOverridesInTx = () => - requests - .filter((x) => x.maxPriorityFeePerGas != null) - .map((x) => fromHex(x.maxPriorityFeePerGas!, "bigint")); - const maxPriorityFeePerGas = - overrides?.maxPriorityFeePerGas != null - ? overrides?.maxPriorityFeePerGas - : mpfpgOverridesInTx().length > 0 - ? bigIntMax(...mpfpgOverridesInTx()) - : undefined; - - const _overrides = { - maxFeePerGas, - maxPriorityFeePerGas, - } as UserOperationOverrides; - - const uoStruct = await buildUserOperation(client, { - uo: batch, - account, - context, - overrides: _overrides, - }); - - return { - uoStruct, - // TODO: in v4 major version update, remove these as below parameters are not needed - batch, - overrides: _overrides, - }; -} diff --git a/aa-sdk/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts b/aa-sdk/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts deleted file mode 100644 index a2da717416..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { Chain, Client, Transport } from "viem"; -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount.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 { buildUserOperation } from "./buildUserOperation.js"; -import type { - SendUserOperationParameters, - UserOperationContext, -} from "./types"; -import { clientHeaderTrack } from "../../index.js"; - -export type CheckGasSponsorshipEligibilityResult< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - eligible: boolean; - request?: UserOperationStruct; -}; - -/** - * This function verifies 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`, 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. - * - * @example - * ```ts - * import { smartAccountClient } from "./smartAccountClient"; - * // [!code focus:99] - * const { eligible } = await smartAccountClient.checkGasSponsorshipEligibility({ - * uo: { - * data: "0xCalldata", - * target: "0xTarget", - * value: 0n, - * }, - * }); - * - * console.log( - * `User Operation is ${ - * eligible ? "eligible" : "ineligible" - * } for gas sponsorship.` - * ); - * ``` - * - * @param {Client} client_ the smart account client to use for making RPC calls - * @param {SendUserOperationParameters} args containing the user operation, account, context, and overrides - * @returns {Promise>} a Promise containing a boolean indicating if the account is elgibile for sponsorship and the sponsored UO - */ -export function checkGasSponsorshipEligibility< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client_: Client, - args: SendUserOperationParameters, -): Promise> { - const client = clientHeaderTrack(client_, "checkGasSponsorshipEligibility"); - const { account = client.account, overrides, context } = args; - - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "checkGasSponsorshipEligibility", - client, - ); - } - - return buildUserOperation(client, { - uo: args.uo, - account, - overrides, - context, - }) - .then((userOperationStruct) => ({ - eligible: - account.getEntryPoint().version === "0.6.0" - ? (userOperationStruct as UserOperationStruct<"0.6.0">) - .paymasterAndData !== "0x" && - (userOperationStruct as UserOperationStruct<"0.6.0">) - .paymasterAndData !== null - : (userOperationStruct as UserOperationStruct<"0.7.0">) - .paymasterData !== "0x" && - (userOperationStruct as UserOperationStruct<"0.7.0">) - .paymasterData !== null, - request: userOperationStruct, - })) - .catch(() => ({ - eligible: false, - })); -} diff --git a/aa-sdk/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts b/aa-sdk/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts deleted file mode 100644 index 619b350856..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts +++ /dev/null @@ -1,136 +0,0 @@ -import type { Chain, Client, Transport } from "viem"; -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount"; -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, - UserOperationRequest, - UserOperationStruct, -} from "../../types"; -import { - bigIntMax, - bigIntMultiply, - resolveProperties, -} from "../../utils/index.js"; -import { _runMiddlewareStack } from "./internal/runMiddlewareStack.js"; -import { _sendUserOperation } from "./internal/sendUserOperation.js"; -import type { - DropAndReplaceUserOperationParameters, - UserOperationContext, -} from "./types"; -import { clientHeaderTrack } from "../../index.js"; - -/** - * Drops an existing user operation and replaces it with a new one while ensuring the appropriate fees and overrides are applied. - * - * @example - * ```ts - * import { - * createSmartAccountClient, - * } from "@aa-sdk/core"; - * - * // smart account client is already extended with dropAndReplaceUserOperation - * const client = createSmartAccountClient(...); - * const { request } = await client.sendUserOperation(...); - * const result = await client.dropAndReplaceUserOperation({ - * uoToDrop: request, - * account, // only required if the client above is not connected to an account - * }); - * ``` - * - * @param {Client} client_ The client instance with the transport, chain, and account information - * @param {DropAndReplaceUserOperationParameters} args The parameters required for dropping and replacing the user operation including the account, operation to drop, overrides, and context - * @returns {Promise>} A promise that resolves to the result of sending the new user operation - */ -export async function dropAndReplaceUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client_: Client, - args: DropAndReplaceUserOperationParameters, -): Promise> { - const client = clientHeaderTrack(client_, "dropAndReplaceUserOperation"); - const { account = client.account, uoToDrop, overrides, context } = args; - if (!account) { - throw new AccountNotFoundError(); - } - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "dropAndReplaceUserOperation", - client, - ); - } - - const entryPoint = account.getEntryPoint(); - - const uoToSubmit = ( - entryPoint.version === "0.6.0" - ? { - initCode: (uoToDrop as UserOperationRequest<"0.6.0">).initCode, - sender: (uoToDrop as UserOperationRequest<"0.6.0">).sender, - nonce: (uoToDrop as UserOperationRequest<"0.6.0">).nonce, - callData: (uoToDrop as UserOperationRequest<"0.6.0">).callData, - signature: await account.getDummySignature(), - } - : { - ...((uoToDrop as UserOperationRequest<"0.7.0">).factory && - (uoToDrop as UserOperationRequest<"0.7.0">).factoryData - ? { - factory: (uoToDrop as UserOperationRequest<"0.7.0">).factory, - factoryData: (uoToDrop as UserOperationRequest<"0.7.0">) - .factoryData, - } - : {}), - sender: (uoToDrop as UserOperationRequest<"0.7.0">).sender, - nonce: (uoToDrop as UserOperationRequest<"0.7.0">).nonce, - callData: (uoToDrop as UserOperationRequest<"0.7.0">).callData, - signature: await account.getDummySignature(), - } - ) as UserOperationStruct; - - // If the fee estimator is not the one estimating fees, then this won't work - // however, we have migrated to using erc7677middleware for alchemy paymaster flows - // and most of the other paymasters we've seen don't do fee estimation - const { maxFeePerGas, maxPriorityFeePerGas } = await resolveProperties( - await client.middleware.feeEstimator(uoToSubmit, { account, client }), - ); - - const _overrides = { - ...overrides, - maxFeePerGas: bigIntMax( - BigInt(maxFeePerGas ?? 0n), - bigIntMultiply(uoToDrop.maxFeePerGas, 1.1), - ), - maxPriorityFeePerGas: bigIntMax( - BigInt(maxPriorityFeePerGas ?? 0n), - bigIntMultiply(uoToDrop.maxPriorityFeePerGas, 1.1), - ), - } as UserOperationOverrides; - - const uoToSend = await _runMiddlewareStack(client, { - uo: uoToSubmit, - overrides: _overrides, - account, - }); - - return _sendUserOperation(client, { - uoStruct: uoToSend, - account, - context, - overrides: _overrides, - }); -} diff --git a/aa-sdk/core/src/actions/smartAccount/estimateUserOperationGas.ts b/aa-sdk/core/src/actions/smartAccount/estimateUserOperationGas.ts deleted file mode 100644 index 0026e1d04d..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/estimateUserOperationGas.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { Chain, Client, Transport } from "viem"; -import { - type GetEntryPointFromAccount, - type SmartContractAccount, -} from "../../account/smartContractAccount.js"; -import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; -import { AccountNotFoundError } from "../../errors/account.js"; -import { IncompatibleClientError } from "../../errors/client.js"; -import type { UserOperationEstimateGasResponse } from "../../types.js"; -import { deepHexlify, resolveProperties } from "../../utils/index.js"; -import { _initUserOperation } from "./internal/initUserOperation.js"; -import type { - SendUserOperationParameters, - UserOperationContext, -} from "./types.js"; -import { clientHeaderTrack } from "../../index.js"; -import { getUserOperationError } from "./getUserOperationError.js"; - -/** - * Description SmartAccountClientAction for estimating the gas cost of a user operation - * - * @async - * @template {Transport} TTransport - * @template {Chain | undefined} TChain - * @template {SmartContractAccount | undefined} TAccount - * @template {UserOperationContext | undefined} TContext - * @template {GetEntryPointFromAccount} TEntryPointVersion - * @param {Client} client_ smart account client - * @param {SendUserOperationParameters} args send user operation parameters - * @returns {Promise>}user operation gas estimate response - */ -export async function estimateUserOperationGas< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client_: Client, - args: SendUserOperationParameters, -): Promise> { - const client = clientHeaderTrack(client_, "estimateUserOperationGas"); - const { account = client.account, overrides } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "estimateUserOperationGas", - client, - ); - } - - return _initUserOperation(client, args).then(async (struct) => { - const request = deepHexlify(await resolveProperties(struct)); - try { - return await client.estimateUserOperationGas( - request, - account.getEntryPoint().address, - overrides?.stateOverride, - ); - } catch (err) { - getUserOperationError(client, request, account.getEntryPoint()); - throw err; - } - }); -} diff --git a/aa-sdk/core/src/actions/smartAccount/getAddress.ts b/aa-sdk/core/src/actions/smartAccount/getAddress.ts deleted file mode 100644 index c265d110f2..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/getAddress.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Address } from "abitype"; -import type { Chain, Client, Transport } from "viem"; -import type { - GetAccountParameter, - SmartContractAccount, -} from "../../account/smartContractAccount"; -import { AccountNotFoundError } from "../../errors/account.js"; - -export const getAddress: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: GetAccountParameter, -) => Address = (client, args) => { - const { account } = args ?? { account: client.account }; - if (!account) { - throw new AccountNotFoundError(); - } - - return account.address; -}; diff --git a/aa-sdk/core/src/actions/smartAccount/getUserOperationError.ts b/aa-sdk/core/src/actions/smartAccount/getUserOperationError.ts deleted file mode 100644 index 2c8274e492..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/getUserOperationError.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { - fromHex, - concat, - isAddress, - decodeErrorResult, - type Chain, - type Transport, -} from "viem"; -import { AccountNotFoundError } from "../../errors/account.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; -import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { UserOperationRequest } from "../../types.js"; -import type { EntryPointDef } from "../../index.js"; -import { deepHexlify } from "../../utils/index.js"; -import { - packAccountGasLimits, - packPaymasterData, -} from "../../entrypoint/0.7.js"; - -/** - * Retrieves the error message from an entrypoint for a User Operation. - * - * @param {Client} client the smart account client to use for RPC requests - * @param {UserOperationRequest} request the uo request to get the error for - * @param {EntryPointDef} entryPoint the entrypoint instance to send the uo to - * @returns {string} the error message from the entrypoint - */ -export async function getUserOperationError< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: BaseSmartAccountClient, - request: UserOperationRequest, - entryPoint: EntryPointDef, -) { - if (!client.account) { - throw new AccountNotFoundError(); - } - - const uo = deepHexlify(request); - - try { - switch (entryPoint.version) { - case "0.6.0": - // TODO - break; - case "0.7.0": - await client.simulateContract({ - address: entryPoint.address, - abi: entryPoint.abi, - functionName: "handleOps", - args: [ - [ - { - sender: client.account.address, - nonce: fromHex(uo.nonce, "bigint"), - initCode: - uo.factory && uo.factoryData - ? concat([uo.factory, uo.factoryData]) - : "0x", - callData: uo.callData, - accountGasLimits: packAccountGasLimits({ - verificationGasLimit: uo.verificationGasLimit, - callGasLimit: uo.callGasLimit, - }), - preVerificationGas: fromHex(uo.preVerificationGas, "bigint"), - gasFees: packAccountGasLimits({ - maxPriorityFeePerGas: uo.maxPriorityFeePerGas, - maxFeePerGas: uo.maxFeePerGas, - }), - paymasterAndData: - uo.paymaster && isAddress(uo.paymaster) - ? packPaymasterData({ - paymaster: uo.paymaster, - paymasterVerificationGasLimit: - uo.paymasterVerificationGasLimit, - paymasterPostOpGasLimit: uo.paymasterPostOpGasLimit, - paymasterData: uo.paymasterData, - }) - : "0x", - signature: uo.signature, - }, - ], - client.account.address, - ], - }); - } - } catch (err: any) { - if (err?.cause && err?.cause?.raw) { - try { - const { errorName, args } = decodeErrorResult({ - abi: entryPoint.abi, - data: err.cause.raw, - }); - console.error(`Failed with '${errorName}':`); - switch (errorName) { - case "FailedOpWithRevert": - case "FailedOp": - // TODO: if we pass in abi we could decode and print this too - const argsIdx = errorName === "FailedOp" ? 1 : 2; - console.error( - args && args[argsIdx] - ? `Smart contract account reverted with error: ${args[argsIdx]}` - : "No revert data from smart contract account", - ); - break; - default: - args && args.forEach((arg) => console.error(`\n${arg}`)); - } - return; - } catch (err) {} - } - console.error("Entrypoint reverted with error: "); - console.error(err); - } -} diff --git a/aa-sdk/core/src/actions/smartAccount/internal/initUserOperation.ts b/aa-sdk/core/src/actions/smartAccount/internal/initUserOperation.ts deleted file mode 100644 index 043fae3589..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/internal/initUserOperation.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { type Chain, type Transport, concatHex, toHex, zeroHash } from "viem"; -import { - isSmartAccountWithSigner, - type GetEntryPointFromAccount, - type SmartContractAccount, -} from "../../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../../client/smartAccountClient.js"; -import { AccountNotFoundError } from "../../../errors/account.js"; -import { ChainNotFoundError } from "../../../errors/client.js"; -import type { UserOperationStruct } from "../../../types.js"; -import { conditionalReturn, type Deferrable } from "../../../utils/index.js"; -import type { - BuildUserOperationParameters, - SendUserOperationParameters, - UserOperationContext, -} from "../types.js"; - -/** - * Description internal action function of SmartAccountClient for initializing - * a user operation for the sender account - * - * @template {Transport} TTransport - * @template {Chain | undefined} TChain - * @template {SmartContractAccount | undefined} TAccount - * @template {UserOperationContext | undefined} TContext - * @template {GetEntryPointFromAccount} TEntryPointVersion - * @param {BaseSmartAccountClient} client smart account client - * @param {SendUserOperationParameters | BuildUserOperationParameters} args send user operation parameters - * @returns {Promise>>} initialized user operation struct - */ -export async function _initUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client: BaseSmartAccountClient, - args: - | SendUserOperationParameters - | BuildUserOperationParameters, -): Promise>> { - const { account = client.account, uo, overrides } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!client.chain) { - throw new ChainNotFoundError(); - } - - const entryPoint = account.getEntryPoint(); - - const callData = Array.isArray(uo) - ? account.encodeBatchExecute(uo) - : typeof uo === "string" - ? uo - : account.encodeExecute(uo); - - const signature = account.getDummySignature(); - - const nonce = - overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey); - - const struct = - entryPoint.version === "0.6.0" - ? ({ - initCode: account.getInitCode(), - sender: account.address, - nonce, - callData, - signature, - } as Deferrable>) - : ({ - factory: conditionalReturn( - account.isAccountDeployed().then((deployed) => !deployed), - account.getFactoryAddress, - ), - factoryData: conditionalReturn( - account.isAccountDeployed().then((deployed) => !deployed), - account.getFactoryData, - ), - sender: account.address, - nonce, - callData, - signature, - } as Deferrable>); - - const is7702 = - account.source === "ModularAccountV2" && - isSmartAccountWithSigner(account) && - (await account.getSigner().getAddress()).toLowerCase() === - account.address.toLowerCase(); - - if (is7702) { - if (entryPoint.version !== "0.7.0") { - throw new Error("7702 is only compatible with EntryPoint v0.7.0"); - } - - const [implementationAddress, code = "0x", nonce] = await Promise.all([ - account.getImplementationAddress(), - client.getCode({ address: account.address }), - client.getTransactionCount({ address: account.address }), - ]); - - const isAlreadyDelegated = - code.toLowerCase() === - concatHex(["0xef0100", implementationAddress]).toLowerCase(); - - if (!isAlreadyDelegated) { - (struct as UserOperationStruct<"0.7.0">).eip7702Auth = { - chainId: toHex(client.chain.id), - nonce: toHex(nonce), - address: implementationAddress, - r: zeroHash, // aka `bytes32(0)` - s: zeroHash, - yParity: "0x0", - }; - } - } - - return struct; -} diff --git a/aa-sdk/core/src/actions/smartAccount/internal/runMiddlewareStack.ts b/aa-sdk/core/src/actions/smartAccount/internal/runMiddlewareStack.ts deleted file mode 100644 index 9758d9b226..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/internal/runMiddlewareStack.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { Chain, Transport } from "viem"; -import type { - GetAccountParameter, - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../../client/smartAccountClient"; -import { AccountNotFoundError } from "../../../errors/account.js"; -import { noopMiddleware } from "../../../middleware/noopMiddleware.js"; -import type { ClientMiddleware } from "../../../middleware/types"; -import type { - UserOperationOverridesParameter, - UserOperationStruct, -} from "../../../types"; -import { - bypassPaymasterAndData, - resolveProperties, - type Deferrable, -} from "../../../utils/index.js"; -import type { UserOperationContext } from "../types"; - -const asyncPipe = - (...fns: ((s: S, opts: Opts) => Promise)[]) => - async (s: S, opts: Opts) => { - let result = s; - for (const fn of fns) { - result = await fn(result, opts); - } - return result; - }; - -export async function _runMiddlewareStack< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client: BaseSmartAccountClient, - args: { - uo: Deferrable>; - context?: TContext; - } & GetAccountParameter & - UserOperationOverridesParameter, -): Promise> { - const { uo, overrides, account = client.account, context } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - const { - dummyPaymasterAndData, - paymasterAndData, - }: Pick< - ClientMiddleware, - "dummyPaymasterAndData" | "paymasterAndData" - > = bypassPaymasterAndData(overrides) - ? { - dummyPaymasterAndData: async (uo, { overrides }) => { - return { - ...uo, - ...("paymasterAndData" in overrides! - ? { paymasterAndData: overrides.paymasterAndData } - : "paymasterData" in overrides! && - "paymaster" in overrides && - overrides.paymasterData !== "0x" - ? { - paymasterData: overrides.paymasterData, - paymaster: overrides.paymaster, - } - : // At this point, nothing has run so no fields are set - // for 0.7 when not using a paymaster, all fields should be undefined - undefined), - }; - }, - paymasterAndData: noopMiddleware, - } - : { - dummyPaymasterAndData: client.middleware.dummyPaymasterAndData, - paymasterAndData: client.middleware.paymasterAndData, - }; - - const result = await asyncPipe( - dummyPaymasterAndData, - client.middleware.feeEstimator, - client.middleware.gasEstimator, - client.middleware.customMiddleware, - paymasterAndData, - client.middleware.userOperationSimulator, - )(uo, { overrides, feeOptions: client.feeOptions, account, client, context }); - - return resolveProperties< - UserOperationStruct> - >(result); -} diff --git a/aa-sdk/core/src/actions/smartAccount/internal/sendUserOperation.ts b/aa-sdk/core/src/actions/smartAccount/internal/sendUserOperation.ts deleted file mode 100644 index aba6a89784..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/internal/sendUserOperation.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { Chain, Transport } from "viem"; -import type { - GetAccountParameter, - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../../client/smartAccountClient"; -import type { SendUserOperationResult } from "../../../client/types"; -import { AccountNotFoundError } from "../../../errors/account.js"; -import { ChainNotFoundError } from "../../../errors/client.js"; -import type { - UserOperationOverrides, - UserOperationStruct, -} from "../../../types"; -import { signUserOperation } from "../signUserOperation.js"; -import type { GetContextParameter, UserOperationContext } from "../types"; -import { getUserOperationError } from "../getUserOperationError.js"; - -export async function _sendUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client: BaseSmartAccountClient, - args: { - uoStruct: UserOperationStruct; - overrides?: UserOperationOverrides; - } & GetAccountParameter & - GetContextParameter, -): Promise> { - const { account = client.account, uoStruct, context, overrides } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!client.chain) { - throw new ChainNotFoundError(); - } - - const entryPoint = account.getEntryPoint(); - const request = await signUserOperation(client, { - uoStruct, - account, - context, - overrides, - }); - - try { - return { - hash: await client.sendRawUserOperation(request, entryPoint.address), - request, - }; - } catch (err) { - getUserOperationError(client, request, entryPoint); - throw err; - } -} diff --git a/aa-sdk/core/src/actions/smartAccount/sendTransaction.ts b/aa-sdk/core/src/actions/smartAccount/sendTransaction.ts deleted file mode 100644 index db4c988c8c..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/sendTransaction.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { - Chain, - Client, - Hex, - SendTransactionParameters, - Transport, -} from "viem"; -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount.js"; -import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; -import { AccountNotFoundError } from "../../errors/account.js"; -import { IncompatibleClientError } from "../../errors/client.js"; -import { TransactionMissingToParamError } from "../../errors/transaction.js"; -import { WaitForUserOperationError } from "../../errors/useroperation.js"; -import type { UserOperationOverrides } from "../../types.js"; -import { buildUserOperationFromTx } from "./buildUserOperationFromTx.js"; -import { _sendUserOperation } from "./internal/sendUserOperation.js"; -import type { UserOperationContext } from "./types.js"; -import { waitForUserOperationTransaction } from "./waitForUserOperationTransacation.js"; -import { clientHeaderTrack } from "../../index.js"; - -/** - * Sends a transaction using the provided client, arguments, optional overrides, and context. - * This sends a UO and then waits for it to be mined - * - * @example - * ```ts - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * // smart account client is already extended with sendTransaction - * const client = createSmartAccountClient(...); - * const result = await client.sendTransaction({ - * to: "0x...", - * data: "0x...", // or "0x", - * value: 0n, // optional - * account, // only required if the client above is not connected to an account - * }); - * ``` - * - * @param {Client} client_ The client to send the transaction through - * @param {SendTransactionParameters} args The parameters required to send the transaction - * @param {UserOperationOverrides} [overrides] Optional overrides for the user operation - * @param {UserOperationContext} [context] Optional context for the user operation - * @returns {Promise} A promise that resolves to a hex string representing the transaction hash - */ -export async function sendTransaction< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TChainOverride extends Chain | undefined = Chain | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client_: Client, - args: SendTransactionParameters, - overrides?: UserOperationOverrides, - context?: TContext, -): Promise { - const client = clientHeaderTrack(client_, "estimateUserOperationGas"); - const { account = client.account } = args; - if (!account || typeof account === "string") { - throw new AccountNotFoundError(); - } - - if (!args.to) { - throw new TransactionMissingToParamError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "sendTransaction", - client, - ); - } - - const uoStruct = await buildUserOperationFromTx( - client, - args, - overrides, - context, - ); - - const { hash, request } = await _sendUserOperation(client, { - account: account as SmartContractAccount, - uoStruct, - context, - overrides, - }); - - return waitForUserOperationTransaction(client, { hash }).catch((e) => { - throw new WaitForUserOperationError(request, e); - }); -} diff --git a/aa-sdk/core/src/actions/smartAccount/sendTransactions.ts b/aa-sdk/core/src/actions/smartAccount/sendTransactions.ts deleted file mode 100644 index 7f7d1a4a5c..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/sendTransactions.ts +++ /dev/null @@ -1,78 +0,0 @@ -import type { Chain, Client, Hex, Transport } from "viem"; -import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; -import { AccountNotFoundError } from "../../errors/account.js"; -import { IncompatibleClientError } from "../../errors/client.js"; -import { WaitForUserOperationError } from "../../errors/useroperation.js"; -import { buildUserOperationFromTxs } from "./buildUserOperationFromTxs.js"; -import { _sendUserOperation } from "./internal/sendUserOperation.js"; -import type { SendTransactionsParameters, UserOperationContext } from "./types"; -import { waitForUserOperationTransaction } from "./waitForUserOperationTransacation.js"; -import { clientHeaderTrack } from "../../index.js"; - -/** - * Sends transactions using the provided client and transaction parameters. This function builds user operations from the transactions, sends them, and waits for the transaction to be mined. - * - * @example - * ```ts - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * // smart account client is already extended with sendTransactions - * const client = createSmartAccountClient(...); - * const result = await client.sendTransactions({ - * requests: [{ - * to: "0x...", - * data: "0x...", // or "0x", - * value: 0n, // optional - * }], - * account, // only required if the client above is not connected to an account - * }); - * ``` - * - * @param {Client} client_ The client used to send the transactions - * @param {SendTransactionsParameters} args The parameters for sending the transactions, including requests, overrides, account, and context - * @returns {Promise} A promise that resolves to the transaction hash of the sent transactions - */ -export async function sendTransactions< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = UserOperationContext, ->( - client_: Client, - args: SendTransactionsParameters, -): Promise { - const client = clientHeaderTrack(client_, "estimateUserOperationGas"); - const { requests, overrides, account = client.account, context } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "sendTransactions", - client, - ); - } - - const { uoStruct } = await buildUserOperationFromTxs(client, { - requests, - overrides, - account, - context, - }); - - const { hash, request } = await _sendUserOperation(client, { - account, - uoStruct, - context, - overrides, - }); - - return waitForUserOperationTransaction(client, { hash }).catch((e) => { - throw new WaitForUserOperationError(request, e); - }); -} diff --git a/aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts b/aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts deleted file mode 100644 index 08f1dd086c..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { Chain, Client, Transport } from "viem"; -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount.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, - UserOperationContext, -} from "./types.js"; -import { clientHeaderTrack } from "../../index.js"; - -/** - * Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline. - * - * @example - * ```ts - * import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core"; - * - * const account = await toSmartContractAccount(...); - * const result = await createSmartAccountClient(...).sendUserOperation({ - * uo: { - * target: "0x...", - * data: "0x...", // or "0x", - * value: 0n, // optional - * } - * }); - * ``` - * - * @param {Client} client_ the smart account client to use for RPC requests - * @param {SendUserOperationParameters} args contains the UO or batch to send, context, overrides, and account if not hoisted on the client - * @returns {Promise>} a Promise containing the result of the user operation - */ -export async function sendUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client_: Client, - args: SendUserOperationParameters, -): Promise> { - const client = clientHeaderTrack(client_, "sendUserOperation"); - const { account = client.account, context, overrides } = args; - - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "sendUserOperation", - client, - ); - } - - const uoStruct = await buildUserOperation(client, { - uo: args.uo, - account, - context, - overrides, - }); - - return _sendUserOperation(client, { - account, - uoStruct, - context, - overrides, - }); -} diff --git a/aa-sdk/core/src/actions/smartAccount/signMessage.ts b/aa-sdk/core/src/actions/smartAccount/signMessage.ts deleted file mode 100644 index 7c24530c65..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/signMessage.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Chain, Client, Hex, SignableMessage, Transport } from "viem"; -import type { - GetAccountParameter, - SmartContractAccount, -} from "../../account/smartContractAccount"; -import { AccountNotFoundError } from "../../errors/account.js"; - -export type SignMessageParameters< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { message: SignableMessage } & GetAccountParameter; - -export const signMessage: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: SignMessageParameters, -) => Promise = async (client, { account = client.account, message }) => { - if (!account) { - throw new AccountNotFoundError(); - } - return account.signMessageWith6492({ message }); -}; diff --git a/aa-sdk/core/src/actions/smartAccount/signTypedData.ts b/aa-sdk/core/src/actions/smartAccount/signTypedData.ts deleted file mode 100644 index 0a66923a2e..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/signTypedData.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { - Chain, - Client, - Hex, - Transport, - TypedData, - TypedDataDefinition, -} from "viem"; -import type { - GetAccountParameter, - SmartContractAccount, -} from "../../account/smartContractAccount"; -import { AccountNotFoundError } from "../../errors/account.js"; - -export type SignTypedDataParameters< - TTypedData extends TypedData | { [key: string]: unknown }, - TPrimaryType extends string = string, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { - typedData: TypedDataDefinition; -} & GetAccountParameter; - -export const signTypedData: < - const TTypedData extends TypedData | { [key: string]: unknown }, - TPrimaryType extends string = string, - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: SignTypedDataParameters, -) => Promise = async (client, { account = client.account, typedData }) => { - if (!account) { - throw new AccountNotFoundError(); - } - - return account.signTypedDataWith6492(typedData); -}; diff --git a/aa-sdk/core/src/actions/smartAccount/signUserOperation.ts b/aa-sdk/core/src/actions/smartAccount/signUserOperation.ts deleted file mode 100644 index 4f69f6559b..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/signUserOperation.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { Chain, Client, Transport } from "viem"; -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount"; -import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; -import { AccountNotFoundError } from "../../errors/account.js"; -import { - ChainNotFoundError, - IncompatibleClientError, -} from "../../errors/client.js"; -import type { UserOperationRequest } from "../../types"; -import { deepHexlify, resolveProperties } from "../../utils/index.js"; -import type { SignUserOperationParameters } from "./types"; - -export async function signUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client: Client, - args: SignUserOperationParameters, -): Promise> { - const { account = client.account, context } = args; - - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "signUserOperation", - client, - ); - } - - if (!client.chain) { - throw new ChainNotFoundError(); - } - - return await client.middleware - .signUserOperation(args.uoStruct, { - ...args, - account, - client, - context, - }) - .then(resolveProperties) - .then(deepHexlify); -} diff --git a/aa-sdk/core/src/actions/smartAccount/types.ts b/aa-sdk/core/src/actions/smartAccount/types.ts deleted file mode 100644 index 951ea8c3c2..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/types.ts +++ /dev/null @@ -1,148 +0,0 @@ -import type { Hex, RpcTransactionRequest } from "viem"; -import type { - GetAccountParameter, - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount"; -import type { UpgradeToData } from "../../client/types"; -import type { EntryPointVersion } from "../../entrypoint/types"; -import type { - BatchUserOperationCallData, - UserOperationCallData, - UserOperationOverridesParameter, - UserOperationRequest, - UserOperationStruct, -} from "../../types"; -import type { IsUndefined } from "../../utils"; - -export type UpgradeAccountParams< - TAccount extends SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - upgradeTo: UpgradeToData; - waitForTx?: boolean; -} & GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; - -export type SendUserOperationParameters< - TAccount extends SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - uo: UserOperationCallData | BatchUserOperationCallData; -} & GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; - -export type BuildUserOperationParameters< - TAccount extends SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = SendUserOperationParameters; - -export type SignUserOperationParameters< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = { - uoStruct: UserOperationStruct; -} & GetAccountParameter & - GetContextParameter; - -export type SendTransactionsParameters< - TAccount extends SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - requests: RpcTransactionRequest[]; -} & GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; - -export type BuildTransactionParameters< - TAccount extends SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = SendTransactionsParameters; - -export type DropAndReplaceUserOperationParameters< - TAccount extends SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - uoToDrop: UserOperationRequest; -} & GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; - -export type WaitForUserOperationTxParameters = { - hash: Hex; - /** - * The tag to use for the UO status. - */ - tag?: "pending" | "latest"; - /** - * Exponential backoff paramters that can be used to override - * the configuration on the client. If not provided, this method - * will use the paramters passed via the `opts` parameter on the - * smart account client. - */ - retries?: { - /** - * the base retry interval or delay between requests - */ - intervalMs: number; - /** - * the multiplier to exponentiate based on the number retries - * setting this to one will result in a linear backoff - */ - multiplier: number; - /** the maximum number of retries before failing */ - maxRetries: number; - }; -}; - -export type BuildUserOperationFromTransactionsResult< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = { - uoStruct: UserOperationStruct; - batch: BatchUserOperationCallData; -} & UserOperationOverridesParameter; - -export type UserOperationContext = Record; - -export type GetContextParameter< - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = - IsUndefined extends true - ? { - context?: TContext; - } - : { context: TContext }; diff --git a/aa-sdk/core/src/actions/smartAccount/upgradeAccount.ts b/aa-sdk/core/src/actions/smartAccount/upgradeAccount.ts deleted file mode 100644 index b7600adc81..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/upgradeAccount.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { Chain, Client, Hash, Transport } from "viem"; -import type { SmartContractAccount } from "../../account/smartContractAccount.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, UserOperationContext } from "./types.js"; -import { waitForUserOperationTransaction } from "./waitForUserOperationTransacation.js"; -import { clientHeaderTrack } from "../../index.js"; - -export const upgradeAccount: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client: Client, - args: UpgradeAccountParams, -) => Promise = async (client_, args) => { - const client = clientHeaderTrack(client_, "upgradeAccount"); - const { - account = client.account, - upgradeTo, - overrides, - waitForTx, - context, - } = args; - - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "upgradeAccount", - client, - ); - } - - const { implAddress: accountImplAddress, initializationData } = upgradeTo; - - const encodeUpgradeData = await account.encodeUpgradeToAndCall({ - upgradeToAddress: accountImplAddress, - upgradeToInitData: initializationData, - }); - - const result = await sendUserOperation(client, { - uo: { - target: account.address, - data: encodeUpgradeData, - }, - account, - overrides, - context, - }); - - let hash = result.hash; - if (waitForTx) { - hash = await waitForUserOperationTransaction(client, result); - } - - return hash; -}; diff --git a/aa-sdk/core/src/actions/smartAccount/waitForUserOperationTransacation.ts b/aa-sdk/core/src/actions/smartAccount/waitForUserOperationTransacation.ts deleted file mode 100644 index 9a1f60979c..0000000000 --- a/aa-sdk/core/src/actions/smartAccount/waitForUserOperationTransacation.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { Chain, Client, Hex, Transport } from "viem"; -import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; -import { IncompatibleClientError } from "../../errors/client.js"; -import { FailedToFindTransactionError } from "../../errors/transaction.js"; -import { Logger } from "../../logger.js"; -import type { WaitForUserOperationTxParameters } from "./types.js"; -import { clientHeaderTrack } from "../../index.js"; - -/** - * Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached. - * - * @example - * ```ts - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * // smart account client is already extended with waitForUserOperationTransaction - * const client = createSmartAccountClient(...); - * const result = await client.waitForUserOperationTransaction({ - * hash: "0x...", - * retries: {...} // optional param to configure the retry amounts - * }); - * ``` - * - * @param {Client} client_ The client instance used to interact with the blockchain - * @param {WaitForUserOperationTxParameters} args The parameters for the transaction to wait for - * @param {Hex} args.hash The transaction hash to wait for - * @param {string} args.tag The tag to use for the UO status. "pending" or "latest". Defaults to "latest". - * @param {WaitForUserOperationTxParameters["retries"]} [args.retries] Optional retry parameters - * @param {number} [args.retries.maxRetries] The maximum number of retry attempts - * @param {number} [args.retries.intervalMs] The interval in milliseconds between retries - * @param {number} [args.retries.multiplier] The multiplier for the interval between retries - * @returns {Promise} A promise that resolves to the transaction hash when the transaction is confirmed - */ -export const waitForUserOperationTransaction: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, ->( - client: Client, - args: WaitForUserOperationTxParameters, -) => Promise = async (client_, args) => { - const client = clientHeaderTrack(client_, "waitForUserOperationTransaction"); - if (!isBaseSmartAccountClient(client)) { - throw new IncompatibleClientError( - "BaseSmartAccountClient", - "waitForUserOperationTransaction", - client, - ); - } - - const { - hash, - retries = { - maxRetries: client.txMaxRetries, - intervalMs: client.txRetryIntervalMs, - multiplier: client.txRetryMultiplier, - }, - } = args; - - for (let i = 0; i < retries.maxRetries; i++) { - const txRetryIntervalWithJitterMs = - retries.intervalMs * Math.pow(retries.multiplier, i) + - Math.random() * 100; - - await new Promise((resolve) => - setTimeout(resolve, txRetryIntervalWithJitterMs), - ); - - const receipt = await client - .getUserOperationReceipt(hash as `0x${string}`, args.tag) - .catch((e) => { - Logger.error( - `[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash}: ${e}`, - ); - }); - - if (receipt) { - return receipt?.receipt.transactionHash; - } - } - - throw new FailedToFindTransactionError(hash); -}; diff --git a/aa-sdk/core/src/client/addBreadcrumb.ts b/aa-sdk/core/src/client/addBreadcrumb.ts deleted file mode 100644 index 11897e71d4..0000000000 --- a/aa-sdk/core/src/client/addBreadcrumb.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * The symbol that is used to add a breadcrumb to the headers. Is an optional - * function that is used to add a breadcrumb to the headers. - */ -export const ADD_BREADCRUMB = Symbol("addBreadcrumb"); - -function hasAddBreadcrumb( - a: A, -): a is A & { [ADD_BREADCRUMB]: (breadcrumb: string) => A } { - return ADD_BREADCRUMB in a; -} - -/** - * Add a crumb to the breadcrumb. - * - * @param {X} client Clients are somethings like viem, that we are adding breadcrumbs to, and could be owning the transport. Usually a alchemy client. - * @param {string} crumb The crumb to add to the breadcrumb - * @returns {Function} The updated client - */ -export function clientHeaderTrack(client: X, crumb: string): X { - if (hasAddBreadcrumb(client)) { - return client[ADD_BREADCRUMB](crumb); - } - return client; -} diff --git a/aa-sdk/core/src/client/bundlerClient.ts b/aa-sdk/core/src/client/bundlerClient.ts deleted file mode 100644 index 0b2a5329c1..0000000000 --- a/aa-sdk/core/src/client/bundlerClient.ts +++ /dev/null @@ -1,137 +0,0 @@ -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 { ChainNotFoundError } from "../errors/client.js"; -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 ->; - -/** - * Creates a bundler client from an existing public client with the provided transport and chain. - * - * @example - * ```ts - * import { createPublicClient } from "viem"; - * import { createBundlerClientFromExisting } from "@aa-sdk/core"; - * - * const publicClient = createPublicClient(...); - * const bundlerClient = createBundlerClientFromExisting(publicClient); - * ``` - * - * @param {PublicClient} client The existing public client to be extended with bundler actions - * @returns {BundlerClient} A bundler client that extends the functionality of the provided public client - */ -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 - * - * @param {PublicClientConfig & { type?: string }} args - configuration for the client - * @returns {BundlerClient} a PublicClient with methods for calling Bundler RPC methods - */ -export function createBundlerClient( - args: PublicClientConfig & { type?: string }, -): BundlerClient; - -/** - * Creates a Bundler Client using the provided configuration parameters, including chain and optional type. - * - * @example - * ```ts - * import { createBundlerClient } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * - * const client = createBundlerClient({ - * chain: sepolia, - * transport: http("RPC_URL"), - * }); - * ``` - * - * @param {PublicClientConfig & { type?: string }} args Configuration for creating the Bundler Client, including parameters for the chain, transport, and optional type - * @returns {BundlerClient} The created Bundler Client with extended public and bundler actions - */ -export function createBundlerClient( - args: PublicClientConfig & { type?: string }, -): BundlerClient { - if (!args.chain) { - throw new ChainNotFoundError(); - } - 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: fetchOptions_ } = resolvedTransport.value as { - fetchOptions: HttpTransportConfig["fetchOptions"]; - url: string; - }; - - const fetchOptions = fetchOptions_ ?? {}; - - if (url.toLowerCase().indexOf("alchemy") > -1) { - fetchOptions.headers = { - ...fetchOptions.headers, - "Alchemy-AA-Sdk-Version": VERSION, - }; - } - - return createClient({ - ...baseParameters, - transport: http(url, { - ...resolvedTransport.config, - fetchOptions, - }), - }); - } - - return createClient(baseParameters); - })(); - - return client.extend(publicActions).extend(bundlerActions); -} diff --git a/aa-sdk/core/src/client/decorators/bundlerClient.ts b/aa-sdk/core/src/client/decorators/bundlerClient.ts deleted file mode 100644 index 666c4c4a20..0000000000 --- a/aa-sdk/core/src/client/decorators/bundlerClient.ts +++ /dev/null @@ -1,143 +0,0 @@ -import type { - Address, - Chain, - Client, - Hash, - PublicRpcSchema, - RpcStateOverride, - StateOverride, - Transport, -} from "viem"; -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 { EntryPointVersion } from "../../entrypoint/types.js"; -import type { - UserOperationEstimateGasResponse, - UserOperationReceipt, - UserOperationRequest, - UserOperationResponse, -} from "../../types.js"; - -// Reference: https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace -export type BundlerRpcSchema = [ - { - Method: "eth_sendUserOperation"; - Parameters: [UserOperationRequest, Address]; - ReturnType: Hash; - }, - { - Method: "eth_estimateUserOperationGas"; - Parameters: [UserOperationRequest, Address, RpcStateOverride?]; - ReturnType: UserOperationEstimateGasResponse; - }, - { - Method: "eth_getUserOperationReceipt"; - Parameters: [Hash, ("pending" | "latest")?]; - ReturnType: UserOperationReceipt | null; - }, - { - Method: "eth_getUserOperationByHash"; - Parameters: [Hash]; - ReturnType: UserOperationResponse | null; - }, - { - Method: "eth_supportedEntryPoints"; - Parameters: []; - ReturnType: Address[]; - }, -]; - -export type BundlerActions = { - /** - * calls `eth_estimateUserOperationGas` and returns the result - * - * @param request - the UserOperationRequest to estimate gas for - * @param entryPoint - the entry point address the op will be sent to - * @param stateOverride - the state override to use for the estimation - * @returns the gas estimates for the given response - */ - estimateUserOperationGas< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, - >( - request: UserOperationRequest, - entryPoint: Address, - stateOverride?: StateOverride, - ): Promise>; - - /** - * calls `eth_sendUserOperation` and returns the hash of the sent UserOperation - * - * @param request - the UserOperationRequest to send - * @param entryPoint - the entry point address the op will be sent to - * @returns the hash of the sent UserOperation - */ - sendRawUserOperation< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, - >( - request: UserOperationRequest, - entryPoint: Address, - ): Promise; - - /** - * calls `eth_getUserOperationByHash` and returns the UserOperationResponse - * - * @param hash - the hash of the UserOperation to fetch - * @returns - the user operation if found or null - */ - getUserOperationByHash(hash: Hash): Promise; - - /** - * calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt - * - * @param hash - the hash of the UserOperation to get the receipt for - * @param tag - if client want to get receipt for different block tag. - * @returns - a user operation receipt or null if not found - */ - getUserOperationReceipt( - hash: Hash, - tag?: "pending" | "latest", - ): Promise; - - /** - * calls `eth_supportedEntryPoints` and returns the entry points the RPC supports - * - * @returns - an array of the entrypoint addresses supported - */ - getSupportedEntryPoints(): Promise; -}; - -/** - * A viem client decorator that provides Bundler specific actions. - * These actions include estimating gas for user operations, sending raw user operations, retrieving user operations by hash, getting supported entry points, and getting user operation receipts. - * - * NOTE: this is already added to the client returned from `createBundlerClient` - * - * @param {TClient} client The client instance that will be used to perform bundler actions - * @returns {BundlerActions} An object containing various bundler-related actions that can be executed using the provided client - */ -export const bundlerActions: < - TClient extends Client< - Transport, - Chain | undefined, - any, - [...PublicRpcSchema, ...BundlerRpcSchema] - >, ->( - client: TClient, -) => BundlerActions = (client) => ({ - estimateUserOperationGas: async (request, entryPoint, stateOverride) => - estimateUserOperationGas(client, { request, entryPoint, stateOverride }), - sendRawUserOperation: async (request, entryPoint) => - sendRawUserOperation(client, { request, entryPoint }), - getUserOperationByHash: async (hash) => - getUserOperationByHash(client, { hash }), - getSupportedEntryPoints: async () => getSupportedEntryPoints(client), - getUserOperationReceipt: async (hash, tag?) => - getUserOperationReceipt(client, { - hash, - tag, - }), -}); diff --git a/aa-sdk/core/src/client/decorators/smartAccountClient.ts b/aa-sdk/core/src/client/decorators/smartAccountClient.ts deleted file mode 100644 index acedd825bf..0000000000 --- a/aa-sdk/core/src/client/decorators/smartAccountClient.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { - type Address, - type Chain, - type Client, - type Hex, - type SendTransactionParameters, - type Transport, - type TypedData, -} from "viem"; -import type { - GetAccountParameter, - GetEntryPointFromAccount, - SmartContractAccount, -} from "../../account/smartContractAccount"; -import { buildUserOperation } from "../../actions/smartAccount/buildUserOperation.js"; -import { buildUserOperationFromTx } from "../../actions/smartAccount/buildUserOperationFromTx.js"; -import { buildUserOperationFromTxs } from "../../actions/smartAccount/buildUserOperationFromTxs.js"; -import { - checkGasSponsorshipEligibility, - type CheckGasSponsorshipEligibilityResult, -} from "../../actions/smartAccount/checkGasSponsorshipEligibility.js"; -import { dropAndReplaceUserOperation } from "../../actions/smartAccount/dropAndReplaceUserOperation.js"; -import { getAddress } from "../../actions/smartAccount/getAddress.js"; -import { sendTransaction } from "../../actions/smartAccount/sendTransaction.js"; -import { sendTransactions } from "../../actions/smartAccount/sendTransactions.js"; -import { sendUserOperation } from "../../actions/smartAccount/sendUserOperation.js"; -import { - signMessage, - type SignMessageParameters, -} from "../../actions/smartAccount/signMessage.js"; -import { - signTypedData, - type SignTypedDataParameters, -} from "../../actions/smartAccount/signTypedData.js"; -import { signUserOperation } from "../../actions/smartAccount/signUserOperation.js"; -import type { - BuildTransactionParameters, - BuildUserOperationFromTransactionsResult, - BuildUserOperationParameters, - DropAndReplaceUserOperationParameters, - SendTransactionsParameters, - SendUserOperationParameters, - SignUserOperationParameters, - UpgradeAccountParams, - UserOperationContext, - WaitForUserOperationTxParameters, -} from "../../actions/smartAccount/types"; -import { upgradeAccount } from "../../actions/smartAccount/upgradeAccount.js"; -import { waitForUserOperationTransaction } from "../../actions/smartAccount/waitForUserOperationTransacation.js"; -import type { - UserOperationOverrides, - UserOperationRequest, - UserOperationStruct, -} from "../../types"; -import type { IsUndefined } from "../../utils"; -import type { SendUserOperationResult } from "../types"; - -//#region SmartAccountClientActions -export type BaseSmartAccountClientActions< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - buildUserOperation: ( - args: BuildUserOperationParameters, - ) => Promise>; - buildUserOperationFromTx: ( - args: SendTransactionParameters, - overrides?: UserOperationOverrides, - context?: TContext, - ) => Promise>; - buildUserOperationFromTxs: ( - args: BuildTransactionParameters, - ) => Promise>; - checkGasSponsorshipEligibility: < - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, - >( - args: SendUserOperationParameters, - ) => Promise< - CheckGasSponsorshipEligibilityResult - >; - signUserOperation: ( - args: SignUserOperationParameters, - ) => Promise>; - dropAndReplaceUserOperation: ( - args: DropAndReplaceUserOperationParameters, - ) => Promise>; - // TODO: for v4 we should combine override and context into an `opts` parameter - // which wraps both of these properties so we can use GetContextParameter - sendTransaction: ( - args: SendTransactionParameters, - overrides?: UserOperationOverrides, - context?: TContext, - ) => Promise; - sendTransactions: ( - args: SendTransactionsParameters, - ) => Promise; - sendUserOperation: ( - args: SendUserOperationParameters< - TAccount, - TContext, - GetEntryPointFromAccount - >, - ) => Promise>; - waitForUserOperationTransaction: ( - args: WaitForUserOperationTxParameters, - ) => Promise; - upgradeAccount: ( - args: UpgradeAccountParams, - ) => Promise; - signMessage: (args: SignMessageParameters) => Promise; - signTypedData: < - const TTypedData extends TypedData | { [key: string]: unknown }, - TPrimaryType extends string = string, - >( - args: SignTypedDataParameters, - ) => Promise; -} & (IsUndefined extends false - ? { getAddress: () => Address } - : { - getAddress: (args: GetAccountParameter) => Address; - }); -// #endregion SmartAccountClientActions - -/** - * Provides a set of smart account client actions to decorate the provided client. These actions include building and signing user operations, sending transactions, and more. - * - * NOTE: this is already added to clients returned from `createSmartAccountClient` - * - * @param {Client} client The client to bind the smart account actions to - * @returns {BaseSmartAccountClientActions} An object containing various smart account client actions - */ -export const smartAccountClientActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client: Client, -) => BaseSmartAccountClientActions = (client) => ({ - buildUserOperation: (args) => buildUserOperation(client, args), - buildUserOperationFromTx: (args, overrides, context) => - buildUserOperationFromTx(client, args, overrides, context), - buildUserOperationFromTxs: (args) => buildUserOperationFromTxs(client, args), - checkGasSponsorshipEligibility: (args) => - checkGasSponsorshipEligibility(client, args), - signUserOperation: (args) => signUserOperation(client, args), - dropAndReplaceUserOperation: (args) => - dropAndReplaceUserOperation(client, args), - sendTransaction: (args, overrides, context) => - sendTransaction(client, args, overrides, context), - sendTransactions: (args) => sendTransactions(client, args), - sendUserOperation: (args) => sendUserOperation(client, args), - waitForUserOperationTransaction: (args) => - waitForUserOperationTransaction.bind(client)(client, args), - upgradeAccount: (args) => upgradeAccount(client, args), - getAddress: (args) => getAddress(client, args), - signMessage: (args) => signMessage(client, args), - signTypedData: (args) => signTypedData(client, args), -}); - -export const smartAccountClientMethodKeys = Object.keys( - // @ts-expect-error we just want to get the keys - smartAccountClientActions(undefined), -).reduce((accum, curr) => { - accum.add(curr); - return accum; -}, new Set()); diff --git a/aa-sdk/core/src/client/isSmartAccountClient.ts b/aa-sdk/core/src/client/isSmartAccountClient.ts deleted file mode 100644 index 2bf0803440..0000000000 --- a/aa-sdk/core/src/client/isSmartAccountClient.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { Chain, Client, Transport } from "viem"; -import type { SmartContractAccount } from "../account/smartContractAccount"; -import { smartAccountClientMethodKeys } from "./decorators/smartAccountClient.js"; -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} client a viem client - * @returns {boolean} true if the client is a SmartAccountClient - */ -export function isSmartAccountClient< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -): client is SmartAccountClient { - for (const key of smartAccountClientMethodKeys) { - if (!(key in client)) { - return false; - } - } - - return client && "middleware" in client; -} - -/** - * 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} client a viem client - * @returns {boolean} true if the account is a BaseSmartAccountClient - */ -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; -} diff --git a/aa-sdk/core/src/client/schema.ts b/aa-sdk/core/src/client/schema.ts deleted file mode 100644 index 600bc95769..0000000000 --- a/aa-sdk/core/src/client/schema.ts +++ /dev/null @@ -1,96 +0,0 @@ -import type { Transport } from "viem"; -import { z } from "zod"; - -import { BigNumberishRangeSchema, MultiplierSchema } from "../utils/index.js"; -import type { BundlerClient } from "./bundlerClient.js"; - -export const createPublicErc4337ClientSchema = < - TTransport extends Transport = Transport, ->() => - z.custom>((provider) => { - return ( - provider != null && - typeof provider === "object" && - "request" in provider && - "type" in provider && - "key" in provider && - "name" in provider - ); - }); - -// TODO: in v5 either remove this or simplify it (either way this should be moved out of aa-sdk/core) -export const ConnectionConfigSchema = z.intersection( - z.union([ - z.object({ - rpcUrl: z.never().optional(), - apiKey: z.string(), - jwt: z.never().optional(), - }), - z.object({ - rpcUrl: z.never().optional(), - apiKey: z.never().optional(), - jwt: z.string(), - }), - z.object({ - rpcUrl: z.string(), - apiKey: z.never().optional(), - jwt: z.never().optional(), - }), - z.object({ - rpcUrl: z.string(), - apiKey: z.never().optional(), - jwt: z.string(), - }), - ]), - z.object({ - chainAgnosticUrl: z.string().optional(), - }), -); - -export const UserOperationFeeOptionsFieldSchema = - BigNumberishRangeSchema.merge(MultiplierSchema).partial(); - -export const UserOperationFeeOptionsSchema_v6 = z - .object({ - maxFeePerGas: UserOperationFeeOptionsFieldSchema, - maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema, - callGasLimit: UserOperationFeeOptionsFieldSchema, - verificationGasLimit: UserOperationFeeOptionsFieldSchema, - preVerificationGas: UserOperationFeeOptionsFieldSchema, - }) - .partial() - .strict(); - -export const UserOperationFeeOptionsSchema_v7 = - UserOperationFeeOptionsSchema_v6.extend({ - paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema, - paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema, - }) - .partial() - .strict(); - -export const UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7; - -export const SmartAccountClientOptsSchema = z - .object({ - /** - * The maximum number of times to try fetching a transaction receipt before giving up (default: 5) - */ - txMaxRetries: z.number().min(0).optional().default(5), - - /** - * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000) - */ - txRetryIntervalMs: z.number().min(0).optional().default(2_000), - - /** - * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5) - */ - txRetryMultiplier: z.number().min(0).optional().default(1.5), - - /** - * Optional user operation fee options to be set globally at the provider level - */ - feeOptions: UserOperationFeeOptionsSchema.optional(), - }) - .strict(); diff --git a/aa-sdk/core/src/client/smartAccountClient.test.ts b/aa-sdk/core/src/client/smartAccountClient.test.ts deleted file mode 100644 index 32e2ddbaa9..0000000000 --- a/aa-sdk/core/src/client/smartAccountClient.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { custom, type Transaction } from "viem"; -import { polygonMumbai } from "viem/chains"; -import type { MockInstance } from "vitest"; -import * as receiptActions from "../actions/bundler/getUserOperationReceipt.js"; -import type { UserOperationReceipt } from "../types.js"; -import { - createDummySmartContractAccount, - createTestClient, -} from "../utils/testUtils.js"; -import { createSmartAccountClient } from "./smartAccountClient.js"; - -const chain = polygonMumbai; -const getUserOperationReceiptMock = vi.spyOn( - receiptActions, - "getUserOperationReceipt", -); - -vi.mock("viem", async (importOg) => { - const actual = await importOg(); - return { - ...actual, - publicActions: () => ({ - getTransaction: () => console.log("I've been mocked!"), - }), - }; -}); - -describe("SmartAccountClient Tests", async () => { - let retryMsDelays: number[] = []; - const publicClient = createTestClient(chain); - - const account = await createDummySmartContractAccount(publicClient); - - const accountClient = createSmartAccountClient({ - transport: custom({ - request: async ({ method }) => { - if (method === "eth_getTransactionByHash") { - return { - hash: "0xMOCK_TXN_HASH", - } as unknown as Transaction; - } - return; - }, - }), - chain, - account, - }); - - beforeEach(() => { - vi.useFakeTimers(); - vi.spyOn(global, "setTimeout").mockImplementation( - // @ts-ignore: Mock implementation doesn't need to return a Timeout. - (callback: () => void, ms) => { - if (ms != null) { - retryMsDelays.push(ms); - } - callback(); - }, - ); - vi.spyOn(global.Math, "random").mockImplementation(() => 0.5); - }); - - afterEach(() => { - vi.resetAllMocks(); - retryMsDelays = []; - }); - - it("should apply only the initial delay for waitForUserOperationTransaction", async () => { - givenGetUserOperationFailsNTimes(1); - await accountClient.waitForUserOperationTransaction({ - hash: "0xTHIS_IS_A_TEST", - }); - thenExpectRetriesToBe([2_050], 1, getUserOperationReceiptMock); - }); - - it("should retry twice with exponential delay for waitForUserOperationTransaction", async () => { - givenGetUserOperationFailsNTimes(2); - await accountClient.waitForUserOperationTransaction({ - hash: "0xTHIS_IS_A_TEST", - }); - thenExpectRetriesToBe([2_050, 3_050], 2, getUserOperationReceiptMock); - }); - - it("should retry thrice with exponential delay for waitForUserOperationTransaction", async () => { - givenGetUserOperationFailsNTimes(3); - await accountClient.waitForUserOperationTransaction({ - hash: "0xTHIS_IS_A_TEST", - }); - thenExpectRetriesToBe( - [2_050, 3_050, 4_550], - 3, - getUserOperationReceiptMock, - ); - }); - - const givenGetUserOperationFailsNTimes = (times: number) => { - for (let i = 0; i < times; i++) { - getUserOperationReceiptMock.mockImplementationOnce(() => { - if (i < times - 1) { - return Promise.reject("Failed request, must retry"); - } - - return Promise.resolve({ - receipt: { transactionHash: "0xMOCK_USER_OP_RECEIPT" }, - } as unknown as UserOperationReceipt); - }); - } - }; - - const thenExpectRetriesToBe = async ( - expectedRetryMsDelays: number[], - expectedMockCalls: number, - getUserOperationReceiptMock: MockInstance, - ) => { - expect(retryMsDelays).toEqual(expectedRetryMsDelays); - expect(getUserOperationReceiptMock).toHaveBeenCalledTimes( - expectedMockCalls, - ); - }; -}); diff --git a/aa-sdk/core/src/client/smartAccountClient.ts b/aa-sdk/core/src/client/smartAccountClient.ts deleted file mode 100644 index 16edafb232..0000000000 --- a/aa-sdk/core/src/client/smartAccountClient.ts +++ /dev/null @@ -1,375 +0,0 @@ -import { - custom, - type Chain, - type Client, - type ClientConfig, - type CustomTransport, - type FormattedTransactionRequest, - type PublicActions, - type PublicRpcSchema, - type RpcSchema, - type Transport, -} from "viem"; -import { z } from "zod"; -import type { SmartContractAccount } from "../account/smartContractAccount.js"; -import type { UserOperationContext } from "../actions/smartAccount/types.js"; -import { AccountNotFoundError } from "../errors/account.js"; -import { ChainNotFoundError } from "../errors/client.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 { - type BundlerActions, - type BundlerRpcSchema, -} from "./decorators/bundlerClient.js"; -import { - smartAccountClientActions, - type BaseSmartAccountClientActions, -} from "./decorators/smartAccountClient.js"; -import { SmartAccountClientOptsSchema } from "./schema.js"; -import type { ClientMiddlewareConfig } from "./types.js"; -import { ADD_BREADCRUMB } from "./addBreadcrumb.js"; - -type SmartAccountClientOpts = z.output; - -export type SmartAccountClientConfig< - transport extends Transport = Transport, - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = Prettify< - Pick< - ClientConfig, - | "cacheTime" - | "chain" - | "key" - | "name" - | "pollingInterval" - | "transport" - | "type" - > & { - account?: account; - opts?: z.input; - /** - * A function that adds a breadcrumb to the current context - * Note, most implementations will override the client with the default alchemy transport and this - * leads to the fact that a transport could be overwritten and not known until later. - * - * @param crumb A crumb, or span is telling that we are in a next step part of a multi step action - * @returns - */ - addBreadCrumb?: (crumb: string) => T; - } & ClientMiddlewareConfig ->; - -export type SmartAccountClientRpcSchema = [ - ...BundlerRpcSchema, - ...PublicRpcSchema, -]; - -export type SmartAccountClientActions< - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = BaseSmartAccountClientActions & - BundlerActions & - PublicActions; - -export type SmartAccountClient< - transport extends Transport = Transport, - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - actions extends Record = Record, - rpcSchema extends RpcSchema = SmartAccountClientRpcSchema, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = Prettify< - Client< - transport, - chain, - account, - rpcSchema, - actions & SmartAccountClientActions - > ->; - -export type BaseSmartAccountClient< - transport extends Transport = Transport, - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = Prettify< - Client< - transport, - chain, - account, - [...BundlerRpcSchema, ...PublicRpcSchema], - { - middleware: ClientMiddleware; - } & SmartAccountClientOpts & - BundlerActions & - PublicActions - > ->; - -export function createSmartAccountClient< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - config: SmartAccountClientConfig, -): SmartAccountClient; - -/** - * Creates a smart account client using the provided configuration. This client handles various Ethereum transactions and message signing operations. - * - * @example - * ```ts - * import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core"; - * import { http } from "viem"; - * import { sepolia } from "viem/chains"; - * - * const client = createSmartAccountClient({ - * chain: sepolia, - * transport: http("RPC_URL"), - * // optionally hoist the account - * account: toSmartContractAccount(...), - * }); - * ``` - * - * @param {SmartAccountClientConfig} config The configuration for creating the smart account client - * @returns {SmartAccountClient} A smart account client capable of handling transactions, message signing, and other operations on a smart account - */ -export function createSmartAccountClient( - config: SmartAccountClientConfig, -): SmartAccountClient { - const { - key = "account", - name = "account provider", - transport, - type = "SmartAccountClient", - addBreadCrumb, - ...params - } = config; - - const client: SmartAccountClient = createBundlerClient({ - ...params, - key, - name, - // we start out with this because the base methods for a SmartAccountClient - // require a smart account client, but once we have completed building everything - // we want to override this value with the one passed in by the extender - type: "SmartAccountClient", - // TODO: this needs to be tested - transport: (opts) => { - const rpcTransport = transport(opts); - - return custom( - { - name: "SmartAccountClientTransport", - async request({ method, params }) { - switch (method) { - case "eth_accounts": { - if (!client.account) { - throw new AccountNotFoundError(); - } - - return [client.account.address]; - } - case "eth_sendTransaction": - if (!client.account) { - throw new AccountNotFoundError(); - } - if (!client.chain) { - throw new ChainNotFoundError(); - } - const [tx] = params as [FormattedTransactionRequest]; - return client.sendTransaction({ - ...tx, - account: client.account, - chain: client.chain, - }); - case "eth_sign": - if (!client.account) { - throw new AccountNotFoundError(); - } - const [address, data] = params!; - if ( - address?.toLowerCase() !== - client.account.address.toLowerCase() - ) { - throw new Error( - "cannot sign for address that is not the current account", - ); - } - return client.signMessage({ - message: data, - account: client.account, - }); - case "personal_sign": { - if (!client.account) { - throw new AccountNotFoundError(); - } - const [data, address] = params!; - if ( - address?.toLowerCase() !== - client.account.address.toLowerCase() - ) { - throw new Error( - "cannot sign for address that is not the current account", - ); - } - return client.signMessage({ - message: data, - account: client.account, - }); - } - case "eth_signTypedData_v4": { - if (!client.account) { - throw new AccountNotFoundError(); - } - const [address, dataParams] = params!; - if ( - address?.toLowerCase() !== - client.account.address.toLowerCase() - ) { - throw new Error( - "cannot sign for address that is not the current account", - ); - } - try { - return client.signTypedData({ - account: client.account, - typedData: - typeof dataParams === "string" - ? JSON.parse(dataParams) - : dataParams, - }); - } catch { - throw new Error("invalid JSON data params"); - } - } - case "eth_chainId": - if (!opts.chain) { - throw new ChainNotFoundError(); - } - - return opts.chain.id; - default: - // TODO: there's probably a number of methods we just don't support, will need to test most of them out - // first let's get something working though - return rpcTransport.request( - { method, params }, - // Retry count must be 0 here in order to respect the retry - // count that is already specified on the underlying transport. - { retryCount: 0 }, - ); - } - }, - }, - // Retry count must be 0 here in order to respect the retry - // count that is already specified on the underlying transport. - { retryCount: 0 }, - )(opts); - }, - }) - .extend(() => { - const addBreadCrumbs = addBreadCrumb - ? { - [ADD_BREADCRUMB]: addBreadCrumb, - } - : {}; - return { - ...SmartAccountClientOptsSchema.parse(config.opts ?? {}), - ...addBreadCrumbs, - }; - }) - .extend(middlewareActions(config)) - .extend(smartAccountClientActions); - - return { ...client, type }; -} - -export function createSmartAccountClientFromExisting< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TClient extends BundlerClient = BundlerClient, - TActions extends SmartAccountClientActions< - TChain, - TAccount, - TContext - > = SmartAccountClientActions, - TRpcSchema extends SmartAccountClientRpcSchema = SmartAccountClientRpcSchema, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - config: Omit< - SmartAccountClientConfig, - "transport" | "chain" - > & { client: TClient }, -): SmartAccountClient< - CustomTransport, - TChain, - TAccount, - TActions, - TRpcSchema, - TContext ->; - -/** - * Creates a smart account client using an existing client and specific configuration. This function can be used to reuse a pre-existing BundlerClient while customizing other aspects of the smart account. - * - * @example - * ```ts - * import { - * createBundlerClient, - * createSmartAccountClientFromExisting, - * toSmartContractAccount - * } from "@aa-sdk/core"; - * - * const bundlerClient = createBundlerClient(...); - * const client = createSmartAccountClientFromExisting({ - * client, - * account: toSmartContractAccount(...), - * }) - * ``` - * - * @param {Omit & {client: BundlerClient}} config the configuration object which includes the client - * @returns {SmartAccountClient} A smart account client created from the existing BundlerClient - */ -export function createSmartAccountClientFromExisting( - config: Omit & { - client: BundlerClient; - }, -): SmartAccountClient { - return createSmartAccountClient({ - ...config, - chain: config.client.chain, - transport: custom(config.client), - }); -} diff --git a/aa-sdk/core/src/client/types.ts b/aa-sdk/core/src/client/types.ts deleted file mode 100644 index d8b211e6b2..0000000000 --- a/aa-sdk/core/src/client/types.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Address } from "abitype"; -import type { Hash, Hex } from "viem"; -import type { z } from "zod"; -import type { UserOperationContext } from "../actions/smartAccount/types.js"; -import type { EntryPointVersion } from "../entrypoint/types.js"; -import type { ClientMiddleware } from "../middleware/types.js"; -import type { UserOperationRequest } from "../types.js"; -import type { ConnectionConfigSchema } from "./schema.js"; - -export type ConnectorData = { - chainId?: Hex; -}; - -export type ConnectionConfig = z.input; - -export type SendUserOperationResult< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = { - hash: Hash; - request: UserOperationRequest; -}; - -export type UpgradeToData = { - implAddress: Address; - initializationData: Hex; -}; - -export type ClientMiddlewareConfig< - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = Partial>; diff --git a/aa-sdk/core/src/ens/utils.ts b/aa-sdk/core/src/ens/utils.ts deleted file mode 100644 index 3fe702bb56..0000000000 --- a/aa-sdk/core/src/ens/utils.ts +++ /dev/null @@ -1,81 +0,0 @@ -import * as chains from "viem/chains"; -import { mainnet, type Chain } from "viem/chains"; - -export const ChainsById: Map = new Map( - Object.values(chains).map((x) => [x.id, x]), -); - -/** - * Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains. - * - * @example - * ```ts - * import { convertChainIdToCoinType } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * - * const coinType = convertChainIdToCoinType(sepolia.id); - * ``` - * - * @param {number} chainId the blockchain chain ID that you want to convert to a coin type - * @returns {number} the corresponding coin type for the given chain ID - */ -export const convertChainIdToCoinType = (chainId: number): number => { - if (chainId === mainnet.id) { - // this comes from [ensip-9](https://docs.ens.domains/ens-improvement-proposals/ensip-9-multichain-address-resolution) - return 60; - } - - // this is using [ENSIP-11](https://docs.ens.domains/ens-improvement-proposals/ensip-11-evmchain-address-resolution) and assumes this is how mappings are stored for non mainnet chains - return (0x80000000 | chainId) >>> 0; -}; - -/** - * Converts a coin type to a chain ID based on predefined mappings. This function follows ENSIP-9 for coin type 60 and ENSIP-11 for other coin types. - * - * @example - * ```ts - * import { convertChainIdToCoinType, convertCoinTypeToChainId } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * - * const coinType = convertChainIdToCoinType(sepolia.id); - * const chainId = convertCoinTypeToChainId(coinType); - * ``` - * - * @param {number} coinType the coin type to be converted to a chain ID - * @returns {number} the corresponding chain ID - */ -export const convertCoinTypeToChainId = (coinType: number): number => { - if (coinType === 60) { - // this comes from [ensip-9](https://docs.ens.domains/ens-improvement-proposals/ensip-9-multichain-address-resolution) - return mainnet.id; - } - - // this is using [ENSIP-11](https://docs.ens.domains/ens-improvement-proposals/ensip-11-evmchain-address-resolution) and assumes this is how mappings are stored for non mainnet chains - return (0x7fffffff & coinType) >> 0; -}; - -/** - * Converts a coin type to its corresponding blockchain chain based on a predefined mapping. - * - * @example - * ```ts - * import { convertChainIdToCoinType, convertCoinTypeToChain } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * - * const coinType = convertChainIdToCoinType(sepolia.id); - * const chain = convertCoinTypeToChain(coinType); - * ``` - * - * @param {number} coinType The numerical identifier for the coin type - * @returns {Chain} The corresponding blockchain chain - * @throws {Error} If the coin type does not map to a supported chain - */ -export const convertCoinTypeToChain = (coinType: number): Chain => { - const chainId = convertCoinTypeToChainId(coinType); - const chain = ChainsById.get(chainId); - if (!chain) { - throw new Error("CoinType does not map to a supported chain"); - } - - return chain; -}; diff --git a/aa-sdk/core/src/entrypoint/0.6.ts b/aa-sdk/core/src/entrypoint/0.6.ts deleted file mode 100644 index cfafd2a861..0000000000 --- a/aa-sdk/core/src/entrypoint/0.6.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { - encodeAbiParameters, - hexToBigInt, - keccak256, - type Address, - type Chain, - type Hash, - type Hex, -} from "viem"; -import { EntryPointAbi_v6 } from "../abis/EntryPointAbi_v6.js"; -import type { UserOperationRequest } from "../types.js"; -import type { SupportedEntryPoint } from "./types.js"; - -const packUserOperation = (request: UserOperationRequest<"0.6.0">): Hex => { - const hashedInitCode = keccak256(request.initCode); - const hashedCallData = keccak256(request.callData); - const hashedPaymasterAndData = keccak256(request.paymasterAndData); - - return encodeAbiParameters( - [ - { type: "address" }, - { type: "uint256" }, - { type: "bytes32" }, - { type: "bytes32" }, - { type: "uint256" }, - { type: "uint256" }, - { type: "uint256" }, - { type: "uint256" }, - { type: "uint256" }, - { type: "bytes32" }, - ], - [ - request.sender as Address, - hexToBigInt(request.nonce), - hashedInitCode, - hashedCallData, - hexToBigInt(request.callGasLimit), - hexToBigInt(request.verificationGasLimit), - hexToBigInt(request.preVerificationGas), - hexToBigInt(request.maxFeePerGas), - hexToBigInt(request.maxPriorityFeePerGas), - hashedPaymasterAndData, - ], - ); -}; - -export default { - version: "0.6.0", - - address: { - default: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789", - }, - - abi: EntryPointAbi_v6, - - getUserOperationHash: ( - request: UserOperationRequest<"0.6.0">, - entryPointAddress: Address, - chainId: number, - ): Hash => { - const encoded = encodeAbiParameters( - [{ type: "bytes32" }, { type: "address" }, { type: "uint256" }], - [ - keccak256(packUserOperation(request)), - entryPointAddress, - BigInt(chainId), - ], - ); - - return keccak256(encoded); - }, - - packUserOperation, -} satisfies SupportedEntryPoint<"0.6.0", Chain, typeof EntryPointAbi_v6>; diff --git a/aa-sdk/core/src/entrypoint/0.7.ts b/aa-sdk/core/src/entrypoint/0.7.ts deleted file mode 100644 index 4180ea9cba..0000000000 --- a/aa-sdk/core/src/entrypoint/0.7.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { - concat, - encodeAbiParameters, - hexToBigInt, - isAddress, - keccak256, - pad, - type Address, - type Chain, - type Hash, - type Hex, -} from "viem"; -import { EntryPointAbi_v7 } from "../abis/EntryPointAbi_v7.js"; -import type { - UserOperationRequest, - UserOperationRequest_v7, -} from "../types.js"; -import type { SupportedEntryPoint } from "./types.js"; - -const packUserOperation = (request: UserOperationRequest<"0.7.0">): Hex => { - const initCode = - request.factory && request.factoryData - ? concat([request.factory, request.factoryData]) - : "0x"; - const accountGasLimits = packAccountGasLimits({ - verificationGasLimit: request.verificationGasLimit, - callGasLimit: request.callGasLimit, - }); - - const gasFees = packAccountGasLimits({ - maxPriorityFeePerGas: request.maxPriorityFeePerGas, - maxFeePerGas: request.maxFeePerGas, - }); - - const paymasterAndData = - request.paymaster && isAddress(request.paymaster) - ? packPaymasterData({ - paymaster: request.paymaster, - paymasterVerificationGasLimit: request.paymasterVerificationGasLimit, - paymasterPostOpGasLimit: request.paymasterPostOpGasLimit, - paymasterData: request.paymasterData, - }) - : "0x"; - - return encodeAbiParameters( - [ - { type: "address" }, - { type: "uint256" }, - { type: "bytes32" }, - { type: "bytes32" }, - { type: "bytes32" }, - { type: "uint256" }, - { type: "bytes32" }, - { type: "bytes32" }, - ], - [ - request.sender as Address, - hexToBigInt(request.nonce), - keccak256(initCode), - keccak256(request.callData), - accountGasLimits, - hexToBigInt(request.preVerificationGas), - gasFees, - keccak256(paymasterAndData), - ], - ); -}; - -export default { - version: "0.7.0", - - address: { - default: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", - }, - - abi: EntryPointAbi_v7, - - getUserOperationHash: ( - request: UserOperationRequest<"0.7.0">, - entryPointAddress: Address, - chainId: number, - ): Hash => { - const encoded = encodeAbiParameters( - [{ type: "bytes32" }, { type: "address" }, { type: "uint256" }], - [ - keccak256(packUserOperation(request)), - entryPointAddress, - BigInt(chainId), - ], - ); - - return keccak256(encoded); - }, - - packUserOperation, -} satisfies SupportedEntryPoint<"0.7.0", Chain, typeof EntryPointAbi_v7>; - -export function packAccountGasLimits( - data: - | Pick - | Pick, -): Hex { - return concat(Object.values(data).map((v) => pad(v, { size: 16 }))); -} - -export function packPaymasterData({ - paymaster, - paymasterVerificationGasLimit, - paymasterPostOpGasLimit, - paymasterData, -}: Pick< - UserOperationRequest_v7, - | "paymaster" - | "paymasterVerificationGasLimit" - | "paymasterPostOpGasLimit" - | "paymasterData" ->): Hex { - if ( - !paymaster || - !paymasterVerificationGasLimit || - !paymasterPostOpGasLimit || - !paymasterData - ) { - return "0x"; - } - return concat([ - paymaster, - pad(paymasterVerificationGasLimit, { size: 16 }), - pad(paymasterPostOpGasLimit, { size: 16 }), - paymasterData, - ]); -} - -export function unpackAccountGasLimits(accountGasLimits: string): { - verificationGasLimit: number; - callGasLimit: number; -} { - return { - verificationGasLimit: parseInt(accountGasLimits.slice(2, 34), 16), - callGasLimit: parseInt(accountGasLimits.slice(34), 16), - }; -} diff --git a/aa-sdk/core/src/entrypoint/index.ts b/aa-sdk/core/src/entrypoint/index.ts deleted file mode 100644 index b280a9f936..0000000000 --- a/aa-sdk/core/src/entrypoint/index.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { type Chain } from "viem"; -import { EntryPointNotFoundError } from "../errors/entrypoint.js"; -import EntryPoint_v6 from "./0.6.js"; -import EntryPoint_v7 from "./0.7.js"; -import type { - DefaultEntryPointVersion, - EntryPointDefRegistry, - EntryPointRegistry, - EntryPointVersion, - GetEntryPointOptions, -} from "./types.js"; - -export const defaultEntryPointVersion: DefaultEntryPointVersion = "0.6.0"; - -export const entryPointRegistry: EntryPointRegistry = { - "0.6.0": EntryPoint_v6, - "0.7.0": EntryPoint_v7, -}; - -/** - * Checks if the given value is a valid key of the EntryPointRegistry. - * - * @example - * ```ts - * import { isEntryPointVersion } from "@aa-sdk/core"; - * - * const valid = isEntryPointVersion("0.6.0"); - * const invalid = isEntryPointVersion("0.8.0"); - * ``` - * - * @param {*} value The value to be checked - * @returns {boolean} true if the value is a valid key of EntryPointRegistry, false otherwise - */ -export const isEntryPointVersion = ( - value: any, -): value is keyof EntryPointRegistry => { - return Object.keys(entryPointRegistry).includes(value); -}; - -export function getEntryPoint< - TEntryPointVersion extends EntryPointVersion = DefaultEntryPointVersion, - TChain extends Chain = Chain, ->( - chain: TChain, - options: GetEntryPointOptions, -): EntryPointDefRegistry[TEntryPointVersion]; - -export function getEntryPoint< - TEntryPointVersion extends - DefaultEntryPointVersion = DefaultEntryPointVersion, - TChain extends Chain = Chain, ->( - chain: TChain, - options?: GetEntryPointOptions, -): EntryPointDefRegistry[TEntryPointVersion]; - -export function getEntryPoint( - chain: TChain, - options?: GetEntryPointOptions, -): EntryPointDefRegistry[DefaultEntryPointVersion]; - -/** - * Retrieves the entry point definition for the specified chain and version, falling back to the default version if not provided. Throws an error if the entry point address cannot be found. - * - * @example - * ```ts - * import { getEntryPoint } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * - * const entryPoint060 = getEntryPoint(sepolia); - * const entryPoint070 = getEntryPoint(sepolia, { version: "0.7.0" }); - * ``` - * - * @param {Chain} chain The chain for which the entry point is being retrieved - * @param {GetEntryPointOptions} options Options containing the version and address overrides for the entry point - * @returns {EntryPointDefRegistry[EntryPointVersion]} The entry point definition for the specified chain and version - */ -export function getEntryPoint< - TEntryPointVersion extends EntryPointVersion, - TChain extends Chain = Chain, ->( - chain: TChain, - options: GetEntryPointOptions, -): EntryPointDefRegistry[EntryPointVersion] { - const { version = defaultEntryPointVersion, addressOverride } = options ?? { - version: defaultEntryPointVersion, - }; - - const entryPoint = entryPointRegistry[version ?? defaultEntryPointVersion]; - const address = - addressOverride ?? - entryPoint.address[chain.id] ?? - entryPoint.address.default; - if (!address) { - throw new EntryPointNotFoundError(chain, version); - } - - if (entryPoint.version === "0.6.0") { - return { - version: entryPoint.version, - address, - chain, - abi: entryPoint.abi, - getUserOperationHash: (r) => - entryPoint.getUserOperationHash(r, address, chain.id), - packUserOperation: entryPoint.packUserOperation, - }; - } else if (entryPoint.version === "0.7.0") { - return { - version: entryPoint.version, - address, - chain, - abi: entryPoint.abi, - getUserOperationHash: (r) => - entryPoint.getUserOperationHash(r, address, chain.id), - packUserOperation: entryPoint.packUserOperation, - }; - } - - throw new EntryPointNotFoundError(chain, version); -} diff --git a/aa-sdk/core/src/entrypoint/types.ts b/aa-sdk/core/src/entrypoint/types.ts deleted file mode 100644 index eae3f9d6b8..0000000000 --- a/aa-sdk/core/src/entrypoint/types.ts +++ /dev/null @@ -1,120 +0,0 @@ -import type { - Abi, - Account, - Address, - Chain, - GetContractParameters, - Hash, - Hex, - Transport, -} from "viem"; -import type { EntryPointAbi_v6 } from "../abis/EntryPointAbi_v6"; -import type { EntryPointAbi_v7 } from "../abis/EntryPointAbi_v7"; -import type { UserOperationRequest } from "../types"; -import type { EQ, IsOneOf, OneOf } from "../utils"; - -export interface EntryPointRegistryBase { - "0.6.0": T; - "0.7.0": T; -} -export type EntryPointVersion = keyof EntryPointRegistryBase; -export type DefaultEntryPointVersion = OneOf<"0.6.0", EntryPointVersion>; - -export type SupportedEntryPoint< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, - TChain extends Chain = Chain, - TAbi extends Abi | readonly unknown[] = Abi, -> = { - version: TEntryPointVersion; - address: Record; - abi: GetContractParameters["abi"]; - - /** - * Generates a hash for a UserOperation valid from entry point version 0.6 onwards - * - * @param request - the UserOperation to get the hash for - * @param entryPointAddress - the entry point address that will be used to execute the UserOperation - * @param chainId - the chain on which this UserOperation will be executed - * @returns the hash of the UserOperation - */ - getUserOperationHash: ( - request: UserOperationRequest, - entryPointAddress: Address, - chainId: number, - ) => Hash; - - /** - * Pack the user operation data into bytes for hashing for entry point version 0.6 onwards - * Reference: - * v6: https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOp.ts#L16-L61 - * v7: https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOp.ts#L28-L67 - * - * @param request - the UserOperation to get the hash for - * @returns the hash of the UserOperation - */ - packUserOperation: ( - userOperation: UserOperationRequest, - ) => Hex; -}; - -export interface EntryPointRegistry - extends EntryPointRegistryBase< - SupportedEntryPoint - > { - "0.6.0": SupportedEntryPoint<"0.6.0", TChain, typeof EntryPointAbi_v6>; - "0.7.0": SupportedEntryPoint<"0.7.0", TChain, typeof EntryPointAbi_v7>; -} - -export type EntryPointDef< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, - TChain extends Chain = Chain, - TAbi extends Abi | readonly unknown[] = Abi, -> = { - version: TEntryPointVersion; - address: Address; - chain: TChain; - abi: GetContractParameters["abi"]; - getUserOperationHash: ( - request: UserOperationRequest, - ) => Hex; - packUserOperation: ( - userOperation: UserOperationRequest, - ) => Hex; -}; - -export interface EntryPointDefRegistry - extends EntryPointRegistryBase< - EntryPointDef - > { - "0.6.0": EntryPointDef<"0.6.0", TChain, typeof EntryPointAbi_v6>; - "0.7.0": EntryPointDef<"0.7.0", TChain, typeof EntryPointAbi_v7>; -} - -export type GetEntryPointOptions< - TEntryPointVersion extends EntryPointVersion = DefaultEntryPointVersion, -> = - EQ extends true - ? - | { - addressOverride?: Address; - version?: OneOf; - } - | undefined - : { - addressOverride?: Address; - version: OneOf; - }; - -export type EntryPointParameter< - TEntryPointVersion extends EntryPointVersion, - TChain extends Chain = Chain, -> = - EQ extends true - ? { - entryPoint?: EntryPointDef; - } - : { - entryPoint: IsOneOf extends true - ? EntryPointDef - : never; - }; diff --git a/aa-sdk/core/src/errors/account.ts b/aa-sdk/core/src/errors/account.ts deleted file mode 100644 index 3ce79488f2..0000000000 --- a/aa-sdk/core/src/errors/account.ts +++ /dev/null @@ -1,195 +0,0 @@ -import type { Chain } from "viem"; -import type { EntryPointVersion } from "../entrypoint/types.js"; -import { BaseError } from "./base.js"; - -/** - * This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. - */ -export class AccountNotFoundError extends BaseError { - override name = "AccountNotFoundError"; - - // TODO: extend this further using docs path as well - - /** - * Constructor for initializing an error message indicating that an account could not be found to execute the specified action. - */ constructor() { - super("Could not find an Account to execute with this Action."); - } -} - -/** - * This error is thrown when an account is not a Modular Account V2 - */ - -export class NotAModularAccountV2Error extends BaseError { - override name = "NotAModularAccountV2Error"; - /** - * Constructor for initializing an error message indicating that the account is not a Modular Account V2. - */ - constructor() { - super("This is not a Modular Account V2 account."); - } -} - -/** - * Represents an error that is thrown when no default factory is defined for a specific account type on a given chain and entry point version. - * This error suggests providing an override via the `factoryAddress` parameter when creating an account. - */ -export class DefaultFactoryNotDefinedError extends BaseError { - override name = "DefaultFactoryNotDefinedError"; - - /** - * Constructs an error message indicating that no default factory was found for the given account type, chain, and entry point version. - * - * @param {string} accountType the type of account - * @param {Chain} chain the blockchain chain - * @param {EntryPointVersion} version the entry point version - */ - constructor(accountType: string, chain: Chain, version: EntryPointVersion) { - super( - [ - `No default factory for ${accountType} found on chain ${chain.name} for entrypoint version ${version}`, - "Supply an override via the `factoryAddress` parameter when creating an account", - ].join("\n"), - ); - } -} - -/** - * Custom error class for handling errors when getting a counterfactual address. This extends the `BaseError` class and provides a custom error message and name. - */ -export class GetCounterFactualAddressError extends BaseError { - override name = "GetCounterFactualAddressError"; - - /** - * Constructor for initializing an error message indicating the failure of fetching the counter-factual address. - */ constructor() { - super("getCounterFactualAddress failed"); - } -} - -/** - * An error class representing the condition where upgrades are not supported for a specific account type. This error extends the `BaseError` class and provides a custom error message based on the account type. - */ -export class UpgradesNotSupportedError extends BaseError { - override name = "UpgradesNotSupported"; - - /** - * Error constructor for indicating that upgrades are not supported by the given account type. - * - * @param {string} accountType The type of account that does not support upgrades - */ - constructor(accountType: string) { - super(`Upgrades are not supported by ${accountType}`); - } -} - -/** - * Error thrown when attempting to sign a transaction that is not supported by smart contracts. - */ -export class SignTransactionNotSupportedError extends BaseError { - override name = "SignTransactionNotSupported"; - - /** - * Throws an error indicating that signing a transaction is not supported by smart contracts. - * - - */ constructor() { - super(`SignTransaction is not supported by smart contracts`); - } -} - -/** - * Custom error class `FailedToGetStorageSlotError` which is used to signal a failure when attempting to retrieve a storage slot. This error includes the slot and slot descriptor in its message and inherits from `BaseError`. - */ -export class FailedToGetStorageSlotError extends BaseError { - override name = "FailedToGetStorageSlotError"; - - /** - * Custom error message constructor for failing to get a specific storage slot. - * - * @param {string} slot The storage slot that failed to be accessed or retrieved - * @param {string} slotDescriptor A description of the storage slot, for additional context in the error message - */ - constructor(slot: string, slotDescriptor: string) { - super(`Failed to get storage slot ${slot} (${slotDescriptor})`); - } -} - -/** - * Represents an error indicating that batch execution is not supported for a specific account type. - */ -export class BatchExecutionNotSupportedError extends BaseError { - override name = "BatchExecutionNotSupportedError"; - - /** - * Constructs an error message indicating that batch execution is not supported by the specified account type. - * - * @param {string} accountType the type of account that does not support batch execution - */ - constructor(accountType: string) { - super(`Batch execution is not supported by ${accountType}`); - } -} - -/** - * Represents an error that occurs when an account requires an owner to execute but none is provided. - */ -export class AccountRequiresOwnerError extends BaseError { - override name = "AccountRequiresOwnerError"; - - /** - * Constructs an error indicating that an account of the specified type requires an owner to execute. - * - * @param {string} accountType The type of account that requires an owner - */ - constructor(accountType: string) { - super(`Account of type ${accountType} requires an owner to execute`); - } -} - -/** - * Represents an error that occurs when an attempt is made to call `UpgradeToAndCall` on an account type that does not support it. Includes the account type in the error message. - */ -export class UpgradeToAndCallNotSupportedError extends BaseError { - override name = "UpgradeToAndCallNotSupportedError"; - - /** - * Constructs an error message indicating that `UpgradeToAndCall` is not supported by the specified account type. - * - * @param {string} accountType The type of account that does not support `UpgradeToAndCall` - */ - constructor(accountType: string) { - super(`UpgradeToAndCall is not supported by ${accountType}`); - } -} - -/** - * Represents an error thrown when an account type does not match the expected type. - */ -export class IncorrectAccountType extends BaseError { - override name = "IncorrectAccountTypeError"; - - /** - * Constructs an error object indicating that the expected account type does not match the actual account type. - * - * @param {string} expected the expected account type - * @param {string} actual the actual account type that was received - */ - constructor(expected: string, actual: string) { - super(`Expected account type ${expected}, got ${actual}`); - } -} - -/** - * Error class indicating that a smart account operation requires a signer. - */ -export class SmartAccountWithSignerRequiredError extends BaseError { - override name = "SmartAccountWithSignerRequiredError"; - - /** - * Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer. - */ constructor() { - super("Smart account requires a signer"); - } -} diff --git a/aa-sdk/core/src/errors/base.ts b/aa-sdk/core/src/errors/base.ts deleted file mode 100644 index 898a2e824d..0000000000 --- a/aa-sdk/core/src/errors/base.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { BaseError as ViemBaseError } from "viem"; -import { VERSION } from "../version.js"; - -type BaseErrorParameters = { - docsPath?: string; - docsSlug?: string; - metaMessages?: string[]; -} & ( - | { - cause?: never; - details?: string; - } - | { - cause: BaseError | Error; - details?: never; - } -); - -/** - * A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters. - * This is based on on viem's BaseError type (obviously from the import and extend) - * we want the errors here to point to our docs if we supply a docsPath though - */ -export class BaseError extends ViemBaseError { - override name = "AASDKError"; - override version = VERSION; - - constructor(shortMessage: string, args: BaseErrorParameters = {}) { - super(shortMessage, args); - - const docsPath = - args.cause instanceof BaseError - ? args.cause.docsPath || args.docsPath - : args.docsPath; - - this.message = [ - shortMessage || "An error occurred.", - "", - ...(args.metaMessages ? [...args.metaMessages, ""] : []), - ...(docsPath - ? [ - `Docs: https://www.alchemy.com/docs/wallets${docsPath}${ - args.docsSlug ? `#${args.docsSlug}` : "" - }`, - ] - : []), - ...(this.details ? [`Details: ${this.details}`] : []), - `Version: ${this.version}`, - ].join("\n"); - } -} diff --git a/aa-sdk/core/src/errors/client.ts b/aa-sdk/core/src/errors/client.ts deleted file mode 100644 index 8864bcd4da..0000000000 --- a/aa-sdk/core/src/errors/client.ts +++ /dev/null @@ -1,133 +0,0 @@ -import type { Client } from "viem"; -import { BaseError } from "./base.js"; - -/** - * Represents an error thrown when a client is not compatible with the expected client type for a specific method. The error message provides guidance on how to create a compatible client. - */ -export class IncompatibleClientError extends BaseError { - override name = "IncompatibleClientError"; - - /** - * Throws an error when the client type does not match the expected client type. - * - * @param {string} expectedClient The expected type of the client. - * @param {string} method The method that was called. - * @param {Client} client The client instance. - */ - constructor(expectedClient: string, method: string, client: Client) { - super( - [ - `Client of type (${client.type}) is not a ${expectedClient}.`, - `Create one with \`createSmartAccountClient\` first before using \`${method}\``, - ].join("\n"), - ); - } -} - -/** - * Represents an error that occurs when an invalid RPC URL is provided. This class extends the `BaseError` class and includes the invalid URL in the error message. - */ -export class InvalidRpcUrlError extends BaseError { - override name = "InvalidRpcUrlError"; - - /** - * Creates an instance of an error with a message indicating an invalid RPC URL. - * - * @param {string} [rpcUrl] The invalid RPC URL that caused the error - */ - constructor(rpcUrl?: string) { - super(`Invalid RPC URL ${rpcUrl}`); - } -} - -/** - * Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client. - */ -export class ChainNotFoundError extends BaseError { - override name = "ChainNotFoundError"; - - /** - * Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client. - */ - constructor() { - super("No chain supplied to the client"); - } -} - -/** - * Error class denoting that the provided entity id is invalid because it's too large. - */ -export class InvalidEntityIdError extends BaseError { - override name = "InvalidEntityIdError"; - - /** - * Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large. - * - * @param {number} entityId the invalid entityId used - */ - constructor(entityId: number) { - super( - `Entity ID used is ${entityId}, but must be less than or equal to uint32.max`, - ); - } -} - -/** - * Error class denoting that the nonce key is invalid because its too large. - */ -export class InvalidNonceKeyError extends BaseError { - override name = "InvalidNonceKeyError"; - - /** - * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid. - * - * @param {bigint} nonceKey the invalid nonceKey used - */ - constructor(nonceKey: bigint) { - super( - `Nonce key is ${nonceKey} but has to be less than or equal to 2**152`, - ); - } -} - -/** - * Error class denoting that the provided entity id is invalid because it's overriding the native entity id. - */ -export class EntityIdOverrideError extends BaseError { - override name = "EntityIdOverrideError"; - - /** - * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid. - */ - constructor() { - super(`EntityId of 0 is reserved for the owner and cannot be used`); - } -} - -/** - * Error class denoting that the provided ma v2 account mode is invalid. - */ -export class InvalidModularAccountV2Mode extends BaseError { - override name = "InvalidModularAccountV2Mode"; - - /** - * Initializes a new instance of the error message with a default message indicating that the provided ma v2 account mode is invalid. - */ - constructor() { - super(`The provided account mode is invalid for ModularAccount V2`); - } -} - -/** - * Error class denoting that the deferred action nonce used is invalid. - */ -export class InvalidDeferredActionNonce extends BaseError { - override name = "InvalidDeferredActionNonce"; - - /** - * Initializes a new instance of the error message with a default message indicating that the provided deferred action nonce is invalid. - */ - constructor() { - super(`The provided deferred action nonce is invalid`); - } -} diff --git a/aa-sdk/core/src/errors/entrypoint.ts b/aa-sdk/core/src/errors/entrypoint.ts deleted file mode 100644 index b7676f5982..0000000000 --- a/aa-sdk/core/src/errors/entrypoint.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { Chain } from "viem"; -import { BaseError } from "./base.js"; - -/** - * Represents an error thrown when an entry point is not found for a specific chain and entry point version. This error indicates that a default entry point does not exist for the given chain and version, and suggests providing an override. - */ -export class EntryPointNotFoundError extends BaseError { - override name = "EntryPointNotFoundError"; - - /** - * Constructs an error message indicating that no default entry point exists for the given chain and entry point version. - * - * @param {Chain} chain The blockchain network for which the entry point is being queried - * @param {any} entryPointVersion The version of the entry point for which no default exists - */ - constructor(chain: Chain, entryPointVersion: any) { - super( - [ - `No default entry point v${entryPointVersion} exists for ${chain.name}.`, - `Supply an override.`, - ].join("\n"), - ); - } -} - -/** - * Represents an error thrown when an invalid entry point version is encountered for a specific chain. This error extends the `BaseError` class. - */ -export class InvalidEntryPointError extends BaseError { - override name = "InvalidEntryPointError"; - - /** - * Constructs an error indicating an invalid entry point version for a specific chain. - * - * @param {Chain} chain The chain object containing information about the blockchain - * @param {any} entryPointVersion The entry point version that is invalid - */ - constructor(chain: Chain, entryPointVersion: any) { - super( - `Invalid entry point: unexpected version ${entryPointVersion} for ${chain.name}.`, - ); - } -} diff --git a/aa-sdk/core/src/errors/signer.ts b/aa-sdk/core/src/errors/signer.ts deleted file mode 100644 index deb2d5b724..0000000000 --- a/aa-sdk/core/src/errors/signer.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { BaseError } from "./base.js"; - -/** - * Represents an error thrown when an invalid signer type is provided to the SmartAccountSigner. - */ -export class InvalidSignerTypeError extends BaseError { - override name = "InvalidSignerTypeError"; - - /** - * Constructs an error message when an invalid signer type is passed to SmartAccountSigner. - * - * @param {string} [signerType] An optional parameter specifying the signer type. If not provided, a default error message will be used. - */ - constructor(signerType?: string) { - super( - [ - "Invalid signer type parameter passed to SmartAccountSigner.", - signerType ?? "A signerType must be provided.", - ].join("\n"), - ); - } -} diff --git a/aa-sdk/core/src/errors/transaction.ts b/aa-sdk/core/src/errors/transaction.ts deleted file mode 100644 index 1c99e4ded7..0000000000 --- a/aa-sdk/core/src/errors/transaction.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { Hex } from "viem"; -import { BaseError } from "./base.js"; - -/** - * Error thrown when a transaction is missing the `to` address parameter. This class extends the `BaseError` class. - */ -export class TransactionMissingToParamError extends BaseError { - override name = "TransactionMissingToParamError"; - - /** - * Throws an error indicating that a transaction is missing the `to` address in the request. - */ constructor() { - super("Transaction is missing `to` address set on request"); - } -} - -/** - * Represents an error that occurs when a transaction cannot be found for a given user operation. This error extends from `BaseError`. The `hash` of the transaction is provided to indicate which transaction could not be found. - */ -export class FailedToFindTransactionError extends BaseError { - override name = "FailedToFindTransactionError"; - - /** - * Constructs a new error message indicating a failure to find the transaction for the specified user operation hash. - * - * @param {Hex} hash The hexadecimal value representing the user operation hash. - */ - constructor(hash: Hex) { - super(`Failed to find transaction for user operation ${hash}`); - } -} diff --git a/aa-sdk/core/src/errors/useroperation.ts b/aa-sdk/core/src/errors/useroperation.ts deleted file mode 100644 index 9f659effd7..0000000000 --- a/aa-sdk/core/src/errors/useroperation.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { UserOperationRequest, UserOperationStruct } from "../types.js"; -import { BaseError } from "./base.js"; -// eslint-disable-next-line @typescript-eslint/no-unused-vars - -/** - * Thrown when a UserOperationStruct is not a valid request - * - * extends viem BaseError - */ -export class InvalidUserOperationError extends BaseError { - /** - * @inheritdoc - */ - override name = "InvalidUserOperationError"; - /** - * Creates an instance of InvalidUserOperationError. - * - * InvalidUserOperationError constructor - * - * @param {UserOperationStruct} uo the invalid user operation struct - */ - constructor(uo: UserOperationStruct) { - super( - `Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify( - uo, - (_key, value) => - typeof value === "bigint" - ? { - type: "bigint", - value: value.toString(), - } - : value, - 2, - )}`, - ); - } -} - -/** - * Error thrown when waiting for user operation request to be mined. - * - * Includes the internal error as well as the request that failed. This request - * can then be used with dropAndReplaceUserOperation to retry the operation. - */ -export class WaitForUserOperationError extends BaseError { - /** - * @param {UserOperationRequest} request the user operation request that failed - * @param {Error} error the underlying error that caused the failure - */ - constructor( - public request: UserOperationRequest, - error: Error, - ) { - super(`Failed to find User Operation: ${error.message}`); - } -} diff --git a/aa-sdk/core/src/index.ts b/aa-sdk/core/src/index.ts deleted file mode 100644 index 558662a75f..0000000000 --- a/aa-sdk/core/src/index.ts +++ /dev/null @@ -1,157 +0,0 @@ -export type { Abi } from "abitype"; -export type { Address, HttpTransport } from "viem"; - -export { EntryPointAbi_v6 } from "./abis/EntryPointAbi_v6.js"; -export { EntryPointAbi_v7 } from "./abis/EntryPointAbi_v7.js"; -export { SimpleAccountAbi_v6 } from "./abis/SimpleAccountAbi_v6.js"; -export { SimpleAccountAbi_v7 } from "./abis/SimpleAccountAbi_v7.js"; -export { SimpleAccountFactoryAbi } from "./abis/SimpleAccountFactoryAbi.js"; -export type * from "./account/smartContractAccount.js"; -export { - getAccountAddress, - isSmartAccountWithSigner, - 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/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 } from "./client/decorators/smartAccountClient.js"; -export { isSmartAccountClient } from "./client/isSmartAccountClient.js"; -export { - ConnectionConfigSchema, - SmartAccountClientOptsSchema, -} 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 { - defaultEntryPointVersion, - entryPointRegistry, - getEntryPoint, - isEntryPointVersion, -} from "./entrypoint/index.js"; -export type * from "./entrypoint/types.js"; -export { - AccountNotFoundError, - NotAModularAccountV2Error, - AccountRequiresOwnerError, - BatchExecutionNotSupportedError, - DefaultFactoryNotDefinedError, - FailedToGetStorageSlotError, - GetCounterFactualAddressError, - IncorrectAccountType, - SignTransactionNotSupportedError, - SmartAccountWithSignerRequiredError, - UpgradeToAndCallNotSupportedError, - UpgradesNotSupportedError, -} from "./errors/account.js"; -export { BaseError } from "./errors/base.js"; -export { - ChainNotFoundError, - IncompatibleClientError, - InvalidRpcUrlError, - InvalidEntityIdError, - InvalidNonceKeyError, - EntityIdOverrideError, - InvalidModularAccountV2Mode, - InvalidDeferredActionNonce, -} from "./errors/client.js"; -export { - EntryPointNotFoundError, - InvalidEntryPointError, -} from "./errors/entrypoint.js"; -export { InvalidSignerTypeError } from "./errors/signer.js"; -export { - FailedToFindTransactionError, - TransactionMissingToParamError, -} from "./errors/transaction.js"; -export { - InvalidUserOperationError, - WaitForUserOperationError, -} from "./errors/useroperation.js"; -export * from "./client/addBreadcrumb.js"; -export { LogLevel, Logger } from "./logger.js"; -export type * from "./middleware/types.js"; -export { middlewareActions } from "./middleware/actions.js"; -export { default7702UserOpSigner } from "./middleware/defaults/7702signer.js"; -export { default7702GasEstimator } from "./middleware/defaults/7702gasEstimator.js"; -export { webauthnGasEstimator } from "./middleware/defaults/webauthnGasEstimator.js"; -export { defaultFeeEstimator } from "./middleware/defaults/feeEstimator.js"; -export { defaultGasEstimator } from "./middleware/defaults/gasEstimator.js"; -export { defaultPaymasterAndData } from "./middleware/defaults/paymasterAndData.js"; -export { defaultUserOpSigner } from "./middleware/defaults/userOpSigner.js"; -export type * from "./middleware/erc7677middleware.js"; -export { erc7677Middleware } from "./middleware/erc7677middleware.js"; -export { noopMiddleware } from "./middleware/noopMiddleware.js"; -export type * from "./middleware/actions.js"; -export { LocalAccountSigner } from "./signer/local-account.js"; -export { SignerSchema, isSigner } from "./signer/schema.js"; -export type { - SmartAccountAuthenticator, - SmartAccountSigner, - AuthorizationRequest, -} from "./signer/types.js"; -export { wrapSignatureWith6492 } from "./signer/utils.js"; -export { WalletClientSigner } from "./signer/wallet-client.js"; -export { split, type SplitTransportParams } from "./transport/split.js"; -export type * from "./types.js"; -export type * from "./utils/index.js"; -export { - TraceHeader, - TRACE_HEADER_NAME, - TRACE_HEADER_STATE, -} from "./utils/traceHeader.js"; -export { - BigNumberishRangeSchema, - BigNumberishSchema, - ChainSchema, - HexSchema, - MultiplierSchema, - allEqual, - applyUserOpFeeOption, - applyUserOpOverride, - applyUserOpOverrideOrFeeOption, - asyncPipe, - bigIntMax, - bigIntMultiply, - bypassPaymasterAndData, - bypassPaymasterAndDataEmptyHex, - concatPaymasterAndData, - deepHexlify, - filterUndefined, - getDefaultUserOperationFeeOptions, - isBigNumberish, - isMultiplier, - isValidRequest, - parsePaymasterAndData, - pick, - resolveProperties, - takeBytes, - unpackSignRawMessageBytes, - toRecord, -} from "./utils/index.js"; -export { getUserOperationError } from "./actions/smartAccount/getUserOperationError.js"; diff --git a/aa-sdk/core/src/logger.ts b/aa-sdk/core/src/logger.ts deleted file mode 100644 index cf7f6d2d55..0000000000 --- a/aa-sdk/core/src/logger.ts +++ /dev/null @@ -1,149 +0,0 @@ -export enum LogLevel { - VERBOSE = 5, - DEBUG = 4, - INFO = 3, - WARN = 2, - ERROR = 1, - NONE = 0, -} - -/** - * Logger class provides static methods for logging at different levels such as error, warn, debug, info, and verbose. This class allows setting log levels and log filters to control the logging behavior. - */ -export class Logger { - static logLevel: LogLevel = LogLevel.INFO; - static logFilter?: string; - - /** - * Sets the log level for logging purposes. - * - * @example - * ```ts - * import { Logger, LogLevel } from "@aa-sdk/core"; - * Logger.setLogLevel(LogLevel.DEBUG); - * ``` - * - * @param {LogLevel} logLevel The desired log level - */ - static setLogLevel(logLevel: LogLevel) { - this.logLevel = logLevel; - } - - /** - * Sets the log filter pattern. - * - * @example - * ```ts - * import { Logger } from "@aa-sdk/core"; - * - * Logger.setLogFilter("error"); - * ``` - * - * @param {string} pattern The pattern to set as the log filter - */ - static setLogFilter(pattern: string) { - this.logFilter = pattern; - } - - /** - * Logs an error message to the console if the logging condition is met. - * - * @example - * ```ts - * import { Logger } from "@aa-sdk/core"; - * - * Logger.error("An error occurred while processing the request"); - * ``` - * - * @param {string} msg The primary error message to be logged - * @param {...any[]} args Additional arguments to be logged along with the error message - */ - static error(msg: string, ...args: any[]) { - if (!this.shouldLog(msg, LogLevel.ERROR)) return; - - console.error(msg, ...args); - } - - /** - * Logs a warning message if the logging conditions are met. - * - * @example - * ```ts - * import { Logger } from "@aa-sdk/core"; - * - * Logger.warn("Careful..."); - * ``` - * - * @param {string} msg The message to log as a warning - * @param {...any[]} args Additional parameters to log along with the message - */ - static warn(msg: string, ...args: any[]) { - if (!this.shouldLog(msg, LogLevel.WARN)) return; - - console.warn(msg, ...args); - } - - /** - * Logs a debug message to the console if the log level allows it. - * - * @example - * ```ts - * import { Logger } from "@aa-sdk/core"; - * - * Logger.debug("Something is happening"); - * ``` - * - * @param {string} msg The message to log - * @param {...any[]} args Additional arguments to pass to the console.debug method - */ - static debug(msg: string, ...args: any[]) { - if (!this.shouldLog(msg, LogLevel.DEBUG)) return; - - console.debug(msg, ...args); - } - - /** - * Logs an informational message to the console if the logging level is set to INFO. - * - * @example - * ```ts - * import { Logger } from "@aa-sdk/core"; - * - * Logger.info("Something is happening"); - * ``` - * - * @param {string} msg the message to log - * @param {...any[]} args additional arguments to log alongside the message - */ - static info(msg: string, ...args: any[]) { - if (!this.shouldLog(msg, LogLevel.INFO)) return; - - console.info(msg, ...args); - } - - /** - * Logs a message with additional arguments if the logging level permits it. - * - * @example - * ```ts - * import { Logger } from "@aa-sdk/core"; - * - * Logger.verbose("Something is happening"); - * ``` - * - * @param {string} msg The message to log - * @param {...any[]} args Additional arguments to be logged - */ - static verbose(msg: string, ...args: any[]) { - if (!this.shouldLog(msg, LogLevel.VERBOSE)) return; - - console.log(msg, ...args); - } - - private static shouldLog(msg: string, level: LogLevel) { - if (this.logLevel < level) return false; - if (this.logFilter && !msg.includes(this.logFilter)) return false; - - return true; - } -} diff --git a/aa-sdk/core/src/middleware/actions.ts b/aa-sdk/core/src/middleware/actions.ts deleted file mode 100644 index 54f1955030..0000000000 --- a/aa-sdk/core/src/middleware/actions.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { - type Chain, - type Client, - type PublicActions, - type PublicRpcSchema, - type Transport, -} from "viem"; -import type { SmartContractAccount } from "../account/smartContractAccount.js"; -import type { - BundlerActions, - BundlerRpcSchema, -} from "../client/decorators/bundlerClient.js"; -import type { ClientMiddlewareConfig } from "../client/types.js"; -import { defaultFeeEstimator } from "./defaults/feeEstimator.js"; -import { defaultGasEstimator } from "./defaults/gasEstimator.js"; -import { defaultPaymasterAndData } from "./defaults/paymasterAndData.js"; -import { defaultUserOpSigner } from "./defaults/userOpSigner.js"; -import { noopMiddleware } from "./noopMiddleware.js"; -import type { ClientMiddleware } from "./types.js"; - -/** - * Middleware client type - * - * @template {Transport} TTransport - * @template {Chain | undefined} TChain - * @template {SmartContractAccount | undefined} TAccount - */ -export type MiddlewareClient< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = Client< - TTransport, - TChain, - TAccount, - [...BundlerRpcSchema, ...PublicRpcSchema], - PublicActions & BundlerActions ->; - -/** - * function that takes in ClientMiddlewareConfig used during client initiation - * and returns the middleware actions object that the smart account client extends with - * - * @param {ClientMiddlewareConfig} overrides config used during client initiation for overriding default middlewares - * @returns {(client: MiddlewareClient) => { middleware: ClientMiddleware }} middleware actions object - */ -export const middlewareActions = - (overrides: ClientMiddlewareConfig) => - < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - >( - client: MiddlewareClient, - ): { middleware: ClientMiddleware } => ({ - middleware: { - customMiddleware: overrides.customMiddleware ?? noopMiddleware, - dummyPaymasterAndData: - overrides.dummyPaymasterAndData ?? defaultPaymasterAndData, - feeEstimator: overrides.feeEstimator ?? defaultFeeEstimator(client), - gasEstimator: overrides.gasEstimator ?? defaultGasEstimator(client), - paymasterAndData: overrides.paymasterAndData ?? defaultPaymasterAndData, - userOperationSimulator: - overrides.userOperationSimulator ?? noopMiddleware, - signUserOperation: overrides.signUserOperation ?? defaultUserOpSigner, - }, - }); diff --git a/aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts b/aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts deleted file mode 100644 index 16bb01e452..0000000000 --- a/aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { concatHex, numberToHex, zeroHash } from "viem"; -import { AccountNotFoundError } from "../../errors/account.js"; -import type { UserOperationStruct } from "../../types.js"; -import type { ClientMiddlewareFn } from "../types"; -import { defaultGasEstimator } from "./gasEstimator.js"; - -/** - * A middleware function to estimate the gas usage of a user operation when using an EIP-7702 delegated account. Has an optional custom gas estimator. - * This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. - * - * @deprecated The EIP-7702 auth is now set in initUserOperation instead. This middleware is no longer necessary. - * - * @param {ClientMiddlewareFn} gasEstimator Optional custom gas estimator function - * @returns {ClientMiddlewareFn} A function that takes user operation struct and parameters, estimates gas usage, and returns the user operation with gas limits. - */ -export const default7702GasEstimator: ( - gasEstimator?: ClientMiddlewareFn, -) => ClientMiddlewareFn = - (gasEstimator?: ClientMiddlewareFn) => async (struct, params) => { - const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client); - - const account = params.account ?? params.client.account; - if (!account) { - throw new AccountNotFoundError(); - } - - const entryPoint = account.getEntryPoint(); - if (entryPoint.version !== "0.7.0") { - throw new Error( - "This middleware is only compatible with EntryPoint v0.7.0", - ); - } - - const [implementationAddress, code = "0x"] = await Promise.all([ - account.getImplementationAddress(), - params.client.getCode({ address: params.account.address }), - ]); - - const isAlreadyDelegated = - code.toLowerCase() === concatHex(["0xef0100", implementationAddress]); - - if (!isAlreadyDelegated) { - (struct as UserOperationStruct<"0.7.0">).eip7702Auth = { - chainId: numberToHex(params.client.chain?.id ?? 0), - nonce: numberToHex( - await params.client.getTransactionCount({ - address: params.account.address, - }), - ), - address: implementationAddress, - r: zeroHash, // aka `bytes32(0)` - s: zeroHash, - yParity: "0x0", - }; - } - - return gasEstimator_(struct, params); - }; diff --git a/aa-sdk/core/src/middleware/defaults/7702signer.ts b/aa-sdk/core/src/middleware/defaults/7702signer.ts deleted file mode 100644 index 42c5792620..0000000000 --- a/aa-sdk/core/src/middleware/defaults/7702signer.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { toHex } from "viem"; -import { isSmartAccountWithSigner } from "../../account/smartContractAccount.js"; -import { AccountNotFoundError } from "../../errors/account.js"; -import { ChainNotFoundError } from "../../errors/client.js"; -import type { ClientMiddlewareFn } from "../types"; -import { defaultUserOpSigner } from "./userOpSigner.js"; - -/** - * Provides a default middleware function for signing user operations with a client account when using EIP-7702 delegated accounts. - * If the signer doesn't support `signAuthorization`, then this just runs the provided `signUserOperation` middleware. - * This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. - * - * @deprecated The EIP-7702 auth signature is now handled by the defaultUserOpSigner middleware. This middleware is no longer necessary. - * - * @param {ClientMiddlewareFn} [userOpSigner] Optional user operation signer function - * @returns {ClientMiddlewareFn} A middleware function that signs EIP-7702 authorization tuples if necessary, and also uses the provided or default user operation signer to generate the user op signature. - */ -export const default7702UserOpSigner: ( - userOpSigner?: ClientMiddlewareFn, -) => ClientMiddlewareFn = - (userOpSigner?: ClientMiddlewareFn) => async (struct, params) => { - const userOpSigner_ = userOpSigner ?? defaultUserOpSigner; - - const uo = await userOpSigner_( - { - ...struct, - // Strip out the dummy eip7702 fields. - eip7702Auth: undefined, - }, - params, - ); - - const account = params.account ?? params.client.account; - const { client } = params; - - if (!account || !isSmartAccountWithSigner(account)) { - throw new AccountNotFoundError(); - } - - const signer = account.getSigner(); - - if (!signer.signAuthorization) { - return uo; - } - - if (!client.chain) { - throw new ChainNotFoundError(); - } - - const code = (await client.getCode({ address: account.address })) ?? "0x"; - - const implAddress = await account.getImplementationAddress(); - - const expectedCode = "0xef0100" + implAddress.slice(2); - - if (code.toLowerCase() === expectedCode.toLowerCase()) { - // If the delegation already matches the expected, then we don't need to sign and include an authorization tuple. - return uo; - } - - const accountNonce = await params.client.getTransactionCount({ - address: account.address, - }); - - const authSignature = await signer.signAuthorization({ - chainId: client.chain.id, - contractAddress: implAddress, - nonce: accountNonce, - }); - - const { r, s } = authSignature; - - const yParity = authSignature.yParity ?? authSignature.v - 27n; - - return { - ...uo, - eip7702Auth: { - // deepHexlify doesn't encode number(0) correctly, it returns "0x" - chainId: toHex(client.chain.id), - nonce: toHex(accountNonce), - address: implAddress, - r, - s, - yParity: toHex(yParity), - }, - }; - }; diff --git a/aa-sdk/core/src/middleware/defaults/feeEstimator.ts b/aa-sdk/core/src/middleware/defaults/feeEstimator.ts deleted file mode 100644 index 7c3196e8b3..0000000000 --- a/aa-sdk/core/src/middleware/defaults/feeEstimator.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { BigNumberish } from "../../types"; -import { applyUserOpOverrideOrFeeOption } from "../../utils/index.js"; -import type { MiddlewareClient } from "../actions"; -import type { ClientMiddlewareFn } from "../types"; - -/** - * Default fee estimator middleware function that estimates the maximum fee per gas and maximum priority fee per gas for a given client and applies the necessary overrides and fee options. - * - * @example - * ```ts - * import { createSmartAccountClient, defaultFeeEstimator, createBundlerClient } from "@aa-sdk/core"; - * - * const bundlerClient = createBundlerClient(...); - * - * // NOTE: this is already provided by the smart account client - * const client = createSmartAccountClient({ - * feeEstimator: defaultFeeEstimator(bundlerClient), - * ...otherParams - * }); - * ``` - * - * @template {MiddlewareClient} C The type of the client - * @param {C} client The client to perform the fee estimation - * @returns {ClientMiddlewareFn} A middleware function that takes in the struct and options, estimates the fees, and updates the struct with the estimated fees - */ -export function defaultFeeEstimator( - client: C, -): ClientMiddlewareFn { - return async (struct, { overrides, feeOptions }) => { - // maxFeePerGas must be at least the sum of maxPriorityFeePerGas and baseFee - // so we need to accommodate for the fee option applied maxPriorityFeePerGas for the maxFeePerGas - // - // Note that if maxFeePerGas is not at least the sum of maxPriorityFeePerGas and required baseFee - // after applying the fee options, then the transaction will fail - // - // Refer to https://alchemy.com/docs/maxpriorityfeepergas-vs-maxfeepergas - // for more information about maxFeePerGas and maxPriorityFeePerGas - - const feeData = await client.estimateFeesPerGas(); - if (!feeData.maxFeePerGas || feeData.maxPriorityFeePerGas == null) { - throw new Error( - "feeData is missing maxFeePerGas or maxPriorityFeePerGas", - ); - } - - let maxPriorityFeePerGas: BigNumberish = - await client.estimateMaxPriorityFeePerGas(); - - maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption( - maxPriorityFeePerGas, - overrides?.maxPriorityFeePerGas, - feeOptions?.maxPriorityFeePerGas, - ); - - let maxFeePerGas: BigNumberish = - feeData.maxFeePerGas - - feeData.maxPriorityFeePerGas + - BigInt(maxPriorityFeePerGas); - - maxFeePerGas = applyUserOpOverrideOrFeeOption( - maxFeePerGas, - overrides?.maxFeePerGas, - feeOptions?.maxFeePerGas, - ); - - struct.maxFeePerGas = maxFeePerGas; - struct.maxPriorityFeePerGas = maxPriorityFeePerGas; - return struct; - }; -} diff --git a/aa-sdk/core/src/middleware/defaults/gasEstimator.ts b/aa-sdk/core/src/middleware/defaults/gasEstimator.ts deleted file mode 100644 index 34c0617dcf..0000000000 --- a/aa-sdk/core/src/middleware/defaults/gasEstimator.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { - UserOperationFeeOptions, - UserOperationOverrides, - UserOperationStruct, -} from "../../types.js"; -import { deepHexlify, resolveProperties } from "../../utils/index.js"; -import { applyUserOpOverrideOrFeeOption } from "../../utils/userop.js"; -import type { MiddlewareClient } from "../actions.js"; -import type { ClientMiddlewareFn } from "../types.js"; - -/** - * Description default gas estimator middleware for `SmartAccountClient` - * You can override this middleware with your custom gas estimator middleware - * by passing it to the client constructor - * - * @param {MiddlewareClient} client smart account client instance to apply the middleware to - * @returns {ClientMiddlewareFn} middleware execution function used to estimate gas for user operations - */ -export const defaultGasEstimator: ( - client: C, -) => ClientMiddlewareFn = - (client: MiddlewareClient): ClientMiddlewareFn => - async (struct, { account, overrides, feeOptions }) => { - const request = deepHexlify(await resolveProperties(struct)); - - const estimates = await client.estimateUserOperationGas( - request, - account.getEntryPoint().address, - overrides?.stateOverride, - ); - - const callGasLimit = applyUserOpOverrideOrFeeOption( - estimates.callGasLimit, - overrides?.callGasLimit, - feeOptions?.callGasLimit, - ); - const verificationGasLimit = applyUserOpOverrideOrFeeOption( - estimates.verificationGasLimit, - overrides?.verificationGasLimit, - feeOptions?.verificationGasLimit, - ); - const preVerificationGas = applyUserOpOverrideOrFeeOption( - estimates.preVerificationGas, - overrides?.preVerificationGas, - feeOptions?.preVerificationGas, - ); - - struct.callGasLimit = callGasLimit; - struct.verificationGasLimit = verificationGasLimit; - struct.preVerificationGas = preVerificationGas; - - const entryPoint = account.getEntryPoint(); - if (entryPoint.version === "0.7.0") { - const paymasterVerificationGasLimit = applyUserOpOverrideOrFeeOption( - estimates.paymasterVerificationGasLimit, - (overrides as UserOperationOverrides<"0.7.0">) - ?.paymasterVerificationGasLimit, - (feeOptions as UserOperationFeeOptions<"0.7.0">) - ?.paymasterVerificationGasLimit, - ); - const uo_v7 = struct as UserOperationStruct<"0.7.0">; - - uo_v7.paymasterVerificationGasLimit = paymasterVerificationGasLimit; - - uo_v7.paymasterPostOpGasLimit = - uo_v7.paymasterPostOpGasLimit ?? (uo_v7.paymaster ? "0x0" : undefined); - } - - return struct; - }; diff --git a/aa-sdk/core/src/middleware/defaults/paymasterAndData.ts b/aa-sdk/core/src/middleware/defaults/paymasterAndData.ts deleted file mode 100644 index fb025eaa40..0000000000 --- a/aa-sdk/core/src/middleware/defaults/paymasterAndData.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { UserOperationStruct } from "../../types"; -import type { ClientMiddlewareFn } from "../types"; - -/** - * Middleware function that sets the `paymasterAndData` field in the given struct based on the entry point version of the account. - * This is the default used by `createSmartAccountClient` and is not necessary to be used directly. - * - * @param {UserOperationStruct} struct the user operation structure to be modified - * @param {{ account: Account }} context an object containing the account information - * @returns {Promise} a promise that resolves to the modified user operation structure - */ -export const defaultPaymasterAndData: ClientMiddlewareFn = async ( - struct, - { account }, -) => { - const entryPoint = account.getEntryPoint(); - if (entryPoint.version === "0.6.0") { - (struct as UserOperationStruct<"0.6.0">).paymasterAndData = "0x"; - } - return struct; -}; diff --git a/aa-sdk/core/src/middleware/defaults/userOpSigner.ts b/aa-sdk/core/src/middleware/defaults/userOpSigner.ts deleted file mode 100644 index 4ebb66e326..0000000000 --- a/aa-sdk/core/src/middleware/defaults/userOpSigner.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { AccountNotFoundError } from "../../errors/account.js"; -import { ChainNotFoundError } from "../../errors/client.js"; -import { InvalidUserOperationError } from "../../errors/useroperation.js"; -import { - deepHexlify, - isValidRequest, - resolveProperties, -} from "../../utils/index.js"; -import type { ClientMiddlewareFn } from "../types"; -import { type Authorization, type Hex, hexToNumber, toHex } from "viem"; -import { - isSmartAccountWithSigner, - type SmartContractAccount, -} from "../../account/smartContractAccount.js"; -import { BaseError } from "../../errors/base.js"; - -/** - * Provides a default middleware function for signing user operations with a client account. This function validates the request and adds the signature to it. - * This is already included in the client returned from `createSmartAccountClient` - * - * @param {UserOperationStruct} struct The user operation structure to be signed - * @param {*} context The middleware context containing the client and account information - * @param {Client} context.client The client object, which should include account and chain information - * @param {Account} [context.account] Optional, the account used for signing, defaults to the client's account if not provided - * @returns {Promise} A promise that resolves to the signed user operation structure - */ -export const defaultUserOpSigner: ClientMiddlewareFn = async ( - struct, - { client, account = client.account }, -) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!client?.chain) { - throw new ChainNotFoundError(); - } - - const resolvedStruct = await resolveProperties(struct); - const request = deepHexlify(resolvedStruct); - if (!isValidRequest(request)) { - throw new InvalidUserOperationError(resolvedStruct); - } - - return { - ...resolvedStruct, - signature: await account.signUserOperationHash( - account.getEntryPoint().getUserOperationHash(request), - ), - ...(resolvedStruct.eip7702Auth && { - eip7702Auth: await signAuthorization(account, resolvedStruct.eip7702Auth), - }), - }; -}; - -const signAuthorization = async ( - account: SmartContractAccount, - unsignedAuthorization: Authorization, -) => { - if (!account || !isSmartAccountWithSigner(account)) { - throw new AccountNotFoundError(); - } - - const signer = account.getSigner(); - if (!signer.signAuthorization) { - throw new BaseError( - "Signer must implement signAuthorization to sign EIP-7702 authorizations.", - ); - } - - const signedAuthorization = await signer.signAuthorization({ - chainId: hexToNumber(unsignedAuthorization.chainId), - contractAddress: unsignedAuthorization.address, - nonce: hexToNumber(unsignedAuthorization.nonce), - }); - - return { - chainId: toHex(signedAuthorization.chainId), - nonce: toHex(signedAuthorization.nonce), - address: signedAuthorization.address, - r: signedAuthorization.r, - s: signedAuthorization.s, - yParity: toHex(signedAuthorization.yParity ?? signedAuthorization.v - 27n), - }; -}; diff --git a/aa-sdk/core/src/middleware/defaults/webauthnGasEstimator.ts b/aa-sdk/core/src/middleware/defaults/webauthnGasEstimator.ts deleted file mode 100644 index 57fbaec82f..0000000000 --- a/aa-sdk/core/src/middleware/defaults/webauthnGasEstimator.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { AccountNotFoundError } from "../../errors/account.js"; -import type { ClientMiddlewareFn } from "../types"; -import { defaultGasEstimator } from "./gasEstimator.js"; -import { type Hex } from "viem"; - -export const rip7212CheckBytecode = - "0x60806040526040517f532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25815260056020820152600160408201527f4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e560608201527f3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0608082015260208160a0836101005afa503d5f823e3d81f3fe"; - -/** - * A middleware function to estimate the gas usage of a user operation when using a Modular Account V2 WebAuthn account. Has an optional custom gas estimator. - * This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. - * - * @example - * ```ts twoslash - * import { - * webauthnGasEstimator, - * createSmartAccountClient, - * type SmartAccountClient, - * } from "@aa-sdk/core"; - * import { - * createModularAccountV2, - * type CreateModularAccountV2ClientParams, - * } from "@account-kit/smart-contracts"; - * - * const credential = { - * id: "credential-id", - * publicKey: "0x...", - * } - * - * async function createWebauthnAccountClient( - * config: CreateModularAccountV2ClientParams - * ): Promise { - * const webauthnAccount = await createModularAccountV2({ ...config, mode: "webauthn", credential }); - * - * return createSmartAccountClient({ - * account: webAuthnAccount, - * gasEstimator: webauthnGasEstimator(config.gasEstimator), - * ...config, - * }); - * } - * ``` - * - * @param {ClientMiddlewareFn} [gasEstimator] Optional custom gas estimator function - * @returns {ClientMiddlewareFn} A function that takes user operation struct and parameters, estimates gas usage, and returns the user operation with gas limits. - */ -export const webauthnGasEstimator: ( - gasEstimator?: ClientMiddlewareFn, -) => ClientMiddlewareFn = - (gasEstimator?: ClientMiddlewareFn) => async (struct, params) => { - const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client); - - const account = params.account ?? params.client.account; - if (!account) { - throw new AccountNotFoundError(); - } - - const entryPoint = account.getEntryPoint(); - if (entryPoint.version !== "0.7.0") { - throw new Error( - "This middleware is only compatible with EntryPoint v0.7.0", - ); - } - - const uo = await gasEstimator_(struct, params); - - const pvg: bigint | number | Hex | undefined = - uo.verificationGasLimit instanceof Promise - ? await uo.verificationGasLimit - : (uo?.verificationGasLimit ?? 0n); - - if (!pvg) { - throw new Error( - "WebauthnGasEstimator: verificationGasLimit is 0 or not defined", - ); - } - - // perform eth call read check to see if the chain has 7212 - const { data } = await params.client.call({ data: rip7212CheckBytecode }); - - const chainHas7212: boolean = data ? BigInt(data) === 1n : false; - - // TODO: iterate numbers. Aim to have ~1000 gas buffer to account for longer authenticatorDatas and clientDataJSONs - return { - ...uo, - verificationGasLimit: - BigInt(typeof pvg === "string" ? BigInt(pvg) : pvg) + - (chainHas7212 ? 10000n : 300000n), - }; - }; diff --git a/aa-sdk/core/src/middleware/erc7677middleware.ts b/aa-sdk/core/src/middleware/erc7677middleware.ts deleted file mode 100644 index 8be850cf28..0000000000 --- a/aa-sdk/core/src/middleware/erc7677middleware.ts +++ /dev/null @@ -1,217 +0,0 @@ -import { - toHex, - type Address, - type Chain, - type Client, - type Hex, - type Transport, -} from "viem"; -import type { ClientMiddlewareConfig } from "../client/types"; -import type { EntryPointVersion } from "../entrypoint/types"; -import { ChainNotFoundError } from "../errors/client.js"; -import type { - UserOperationFeeOptions, - UserOperationOverrides, - UserOperationRequest, - UserOperationStruct, -} from "../types"; -import { - deepHexlify, - resolveProperties, - type Deferrable, -} from "../utils/index.js"; -import type { ClientMiddlewareFn } from "./types"; - -export type Erc7677RpcSchema< - TContext extends Record = Record, -> = [ - { - Method: "pm_getPaymasterStubData"; - Parameters: [UserOperationRequest, Address, Hex, TContext]; - ReturnType: { - sponsor?: { name: string; icon?: string }; // Sponsor info - paymaster?: Address; // Paymaster address (entrypoint v0.7) - paymasterData?: Hex; // Paymaster data (entrypoint v0.7) - paymasterVerificationGasLimit?: Hex; // Paymaster validation gas (entrypoint v0.7) - paymasterPostOpGasLimit?: Hex; // Paymaster post-op gas (entrypoint v0.7) - paymasterAndData?: Hex; // Paymaster and data (entrypoint v0.6) - isFinal?: boolean; // Indicates that the caller does not need to call pm_getPaymasterData - }; - }, - { - Method: "pm_getPaymasterData"; - Parameters: [UserOperationRequest, Address, Hex, TContext]; - ReturnType: { - paymaster?: Address; // Paymaster address (entrypoint v0.7) - paymasterData?: Hex; // Paymaster data (entrypoint v0.7) - paymasterVerificationGasLimit?: Hex; // Paymaster validation gas (entrypoint v0.7) - paymasterPostOpGasLimit?: Hex; // Paymaster post-op gas (entrypoint v0.7) - paymasterAndData?: Hex; // Paymaster and data (entrypoint v0.6) - }; - }, -]; - -export type Erc7677Client< - T extends Transport = Transport, - TContext extends Record = Record, -> = Client>; - -export type Erc7677MiddlewareParams< - TContext extends Record | undefined = - | Record - | undefined, - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = { - context?: - | (( - struct: Deferrable>, - args: { - overrides?: UserOperationOverrides; - feeOptions?: UserOperationFeeOptions; - }, - ) => Promise) - | TContext; -}; - -/** - * Middleware function for interacting with ERC-7677 enabled clients. It supports resolving paymaster and data fields for user operations. - * This middleware assumes that your RPC provider supports the ERC-7677 methods (pm_getPaymasterStubData and pm_getPaymasterData). - * - * @example - * ```ts - * import { createSmartAccountClient, erc7677Middleware } from "@aa-sdk/core"; - * import { http } from "viem"; - * import { sepolia } from "viem/chains"; - * - * const client = createSmartAccountClient({ - * transport: http("rpc-url"), - * chain: sepolia, - * // this assumes that your RPC provider supports the ERC-7677 methods AND takes no context - * ...erc7677Middleware(), - * }) - * ``` - * - * @param {Erc7677MiddlewareParams} params Middleware parameters including context function or object. Context can be resolved dynamically by passing in a function which takes in the context at the time of sending a user op - * @returns {Pick} An object containing middleware functions `dummyPaymasterAndData` and `paymasterAndData` for processing user operations with the paymaster data - */ -export function erc7677Middleware< - TContext extends Record | undefined = - | Record - | undefined, ->( - params?: Erc7677MiddlewareParams, -): Required< - Pick -> { - const dummyPaymasterAndData: ClientMiddlewareFn = async ( - uo, - { client, account, feeOptions, overrides }, - ) => { - const userOp = deepHexlify(await resolveProperties(uo)); - - // Those values will be set after fee estimation. - userOp.maxFeePerGas = "0x0"; - userOp.maxPriorityFeePerGas = "0x0"; - userOp.callGasLimit = "0x0"; - userOp.verificationGasLimit = "0x0"; - userOp.preVerificationGas = "0x0"; - - const entrypoint = account.getEntryPoint(); - - if (entrypoint.version === "0.7.0") { - userOp.paymasterVerificationGasLimit = "0x0"; - userOp.paymasterPostOpGasLimit = "0x0"; - } - - const context = - (typeof params?.context === "function" - ? await params?.context(userOp, { overrides, feeOptions }) - : params?.context) ?? {}; - - if (!client.chain) { - throw new ChainNotFoundError(); - } - - const erc7677client = client as Erc7677Client; - // TODO: probably need to handle the sponsor and isFinal fields - const { - paymaster, - paymasterAndData, - paymasterData, - paymasterPostOpGasLimit, - paymasterVerificationGasLimit, - } = await erc7677client.request({ - method: "pm_getPaymasterStubData", - params: [userOp, entrypoint.address, toHex(client.chain.id), context], - }); - - if (entrypoint.version === "0.6.0") { - return { - ...uo, - paymasterAndData, - }; - } - - return { - ...uo, - paymaster, - paymasterData, - // these values are currently not override-able, so can be set here directly - paymasterVerificationGasLimit, - paymasterPostOpGasLimit, - }; - }; - - const paymasterAndData: ClientMiddlewareFn = async ( - uo, - { client, account, feeOptions, overrides }, - ) => { - const userOp = deepHexlify(await resolveProperties(uo)); - const context = - (typeof params?.context === "function" - ? await params?.context(userOp, { overrides, feeOptions }) - : params?.context) ?? {}; - - if (!client.chain) { - throw new ChainNotFoundError(); - } - - const erc7677client = client as Erc7677Client; - - const entrypoint = account.getEntryPoint(); - const { - paymaster, - paymasterAndData, - paymasterData, - paymasterPostOpGasLimit, - paymasterVerificationGasLimit, - } = await erc7677client.request({ - method: "pm_getPaymasterData", - params: [userOp, entrypoint.address, toHex(client.chain.id), context], - }); - - if (entrypoint.version === "0.6.0") { - return { - ...uo, - paymasterAndData, - }; - } - - return { - ...uo, - paymaster, - paymasterData, - // if these fields are returned they should override the ones set by user operation gas estimation, - // otherwise they shouldn't modify - ...(paymasterVerificationGasLimit - ? { paymasterVerificationGasLimit } - : {}), - ...(paymasterPostOpGasLimit ? { paymasterPostOpGasLimit } : {}), - }; - }; - - return { - dummyPaymasterAndData, - paymasterAndData, - }; -} diff --git a/aa-sdk/core/src/middleware/noopMiddleware.ts b/aa-sdk/core/src/middleware/noopMiddleware.ts deleted file mode 100644 index 9cab009578..0000000000 --- a/aa-sdk/core/src/middleware/noopMiddleware.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { UserOperationContext } from "../actions/smartAccount/types"; -import type { ClientMiddlewareFn } from "./types"; - -/** - * Noop middleware that does nothing and passes the arguments through - * - * @param {Deferrable>} args the client middleware arguments passed to the middleware - * @returns {Promise>>} the arguments passed to the middleware and returned as is without modification - */ -export const noopMiddleware: ClientMiddlewareFn< - UserOperationContext | undefined -> = async (args) => { - return args; -}; diff --git a/aa-sdk/core/src/middleware/types.ts b/aa-sdk/core/src/middleware/types.ts deleted file mode 100644 index 3eeaac6619..0000000000 --- a/aa-sdk/core/src/middleware/types.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { - GetEntryPointFromAccount, - SmartContractAccount, -} from "../account/smartContractAccount"; -import type { UserOperationContext } from "../actions/smartAccount/types"; -import type { - UserOperationFeeOptions, - UserOperationOverrides, - UserOperationStruct, -} from "../types"; -import type { Deferrable } from "../utils"; -import type { MiddlewareClient } from "./actions"; - -export type ClientMiddlewareArgs< - TAccount extends SmartContractAccount, - C extends MiddlewareClient, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - overrides?: UserOperationOverrides; - context?: TContext; - feeOptions?: UserOperationFeeOptions; - account: TAccount; - client: C; -}; - -export type ClientMiddlewareFn< - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = < - TAccount extends SmartContractAccount, - C extends MiddlewareClient, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - struct: Deferrable>, - args: ClientMiddlewareArgs, -) => Promise>>; - -export type ClientMiddleware< - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = { - dummyPaymasterAndData: ClientMiddlewareFn; - feeEstimator: ClientMiddlewareFn; - gasEstimator: ClientMiddlewareFn; - customMiddleware: ClientMiddlewareFn; - paymasterAndData: ClientMiddlewareFn; - userOperationSimulator: ClientMiddlewareFn; - signUserOperation: ClientMiddlewareFn; -}; diff --git a/aa-sdk/core/src/signer/__tests__/local-account.test.ts b/aa-sdk/core/src/signer/__tests__/local-account.test.ts deleted file mode 100644 index 9e5cb6ec5a..0000000000 --- a/aa-sdk/core/src/signer/__tests__/local-account.test.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { LocalAccountSigner } from "../local-account.js"; - -describe("Local Account Signer Tests", () => { - describe("Using HD Account", () => { - const dummyMnemonic = - "test test test test test test test test test test test test"; - - it("should sign a hex message properly", async () => { - const signer = LocalAccountSigner.mnemonicToAccountSigner(dummyMnemonic); - expect( - await signer.signMessage({ - raw: "0xabcfC3DB1e0f5023F5a4f40c03D149f316E6A5cc", - }), - ).toMatchInlineSnapshot( - '"0x35761512143ffd8da07c93c5a0136424fe935b48e77076f501a57745c16268bf0d9a5d6209b12d5f8b62f96f0991372e046092fd6b1e3bfa610eb51607a28f7e1b"', - ); - }); - - it("should sign a string message properly", async () => { - const signer = LocalAccountSigner.mnemonicToAccountSigner(dummyMnemonic); - expect( - await signer.signMessage("icanbreakthistestcase"), - ).toMatchInlineSnapshot( - '"0x6b2efa82d72558efad294b727741e1eb9ff4800e2d66ce5f0373454ebdd13573630985612c1d618f49f173f65cf83fc131f798cb65ae66f90f8f0b9d4fdbca881b"', - ); - - expect( - await signer.signMessage("i will definitely break this test case"), - ).toMatchInlineSnapshot( - '"0x6e9af75bfcb8ff5abbf8778dee0e0c5a02f150bf5bc13a4216b772f333b23be8419b761230d24309cac67e1497a44c5fdacec7cb22bfb1652d54845f69f80ba51b"', - ); - }); - - it("should sign a byte array correctly", async () => { - const signer = LocalAccountSigner.mnemonicToAccountSigner(dummyMnemonic); - expect( - await signer.signMessage({ - raw: new TextEncoder().encode("hello, I'm moldy"), - }), - ).toEqual(await signer.signMessage("hello, I'm moldy")); - }); - }); - - describe("Using Private Key Account", () => { - const dummyPrivateKey = - "0x022430a80f723d8789f0d4fb346bdd013b546e4b96fcacf8aceca2b1a65a19dc"; - - it("should sign a hex message properly", async () => { - const signer = - LocalAccountSigner.privateKeyToAccountSigner(dummyPrivateKey); - expect( - await signer.signMessage({ - raw: "0xabcfC3DB1e0f5023F5a4f40c03D149f316E6A5cc", - }), - ).toMatchInlineSnapshot( - '"0x91b6680c8f442f46ca71fee15cdd8c9e25693baeb4006d1908a453fd145315ce21a5e7f2ce9760fc993d65e8450fa5225d8dee12972886bdacbb989ca0b09c6c1b"', - ); - }); - - it("should sign a string message properly", async () => { - const signer = - LocalAccountSigner.privateKeyToAccountSigner(dummyPrivateKey); - expect( - await signer.signMessage("icanbreakthistestcase"), - ).toMatchInlineSnapshot( - '"0xabd26de022c2785a7d86c5c388f4adef5d93358b39fbb757463bc9edc78b7b86566cb1ab8c7ff3a52b10d98de6398aacc7b48aec92a3e280065a47b9698209541b"', - ); - - expect( - await signer.signMessage("i will definitely break this test case"), - ).toMatchInlineSnapshot( - '"0x02bf79312d59e4147aaf05eca4d232c32f378c9761366d931f24407464bb75281897963baea5301b0dbaffa8857a284f61a0e20a2444becf702b8ebe95e2b24b1b"', - ); - }); - - it("should sign a byte array correctly", async () => { - const signer = - LocalAccountSigner.privateKeyToAccountSigner(dummyPrivateKey); - expect( - await signer.signMessage({ - raw: new TextEncoder().encode("hello, I'm moldy"), - }), - ).toEqual(await signer.signMessage("hello, I'm moldy")); - }); - }); -}); diff --git a/aa-sdk/core/src/signer/__tests__/wallet-client.test.ts b/aa-sdk/core/src/signer/__tests__/wallet-client.test.ts deleted file mode 100644 index 42ffc64672..0000000000 --- a/aa-sdk/core/src/signer/__tests__/wallet-client.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { createWalletClient, http } from "viem"; -import { mnemonicToAccount } from "viem/accounts"; -import { WalletClientSigner } from "../wallet-client.js"; - -describe("Wallet Client Signer Tests", () => { - const dummyMnemonic = - "test test test test test test test test test test test test"; - const wallet = mnemonicToAccount(dummyMnemonic); - const walletClient = createWalletClient({ - account: wallet, - // just a nonsense URL - transport: http(`https://rpc.testnet.viem.io`), - }); - - const smartAccountSigner: WalletClientSigner = new WalletClientSigner( - walletClient, - "test", - ); - - it("should successfully sign a message", async () => { - const signature = await smartAccountSigner.signMessage("hello world"); - expect(signature).toMatchInlineSnapshot( - '"0xcaf98cb42536352270a5a6e7d5aa2c186cd53701b9059d8596a1a13feb8d33d4194914598a6f60be302947b79d3c2635378adef4e72139e94030a3b8a7cd8d891c"', - ); - }); - - it("should successfully sign a 7702 authorization", async () => { - const signedAuthorization = await smartAccountSigner.signAuthorization({ - address: "0x69007702764179f14F51cdce752f4f775d74E139", - chainId: 1, - nonce: 1, - }); - expect(signedAuthorization).toMatchInlineSnapshot(` - { - "address": "0x69007702764179f14F51cdce752f4f775d74E139", - "chainId": 1, - "nonce": 1, - "r": "0xb5b39b3d7119d68c9936e476346f50061fed17c575ca395755ec0f41b45896bb", - "s": "0x12e44057bd6c761da15b5ca5d860d11962ea34d1e1b9ce6eac7fbe2e8699469c", - "v": 27n, - "yParity": 0, - } - `); - }); -}); diff --git a/aa-sdk/core/src/signer/local-account.ts b/aa-sdk/core/src/signer/local-account.ts deleted file mode 100644 index cf7ede99b2..0000000000 --- a/aa-sdk/core/src/signer/local-account.ts +++ /dev/null @@ -1,204 +0,0 @@ -import { - type HDAccount, - type HDOptions, - type Hex, - type LocalAccount, - type PrivateKeyAccount, - type SignableMessage, - type SignedAuthorization, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { - generatePrivateKey, - mnemonicToAccount, - privateKeyToAccount, -} from "viem/accounts"; -import type { AuthorizationRequest, SmartAccountSigner } from "./types.js"; - -/** - * Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key. - */ -export class LocalAccountSigner< - T extends HDAccount | PrivateKeyAccount | LocalAccount, -> implements SmartAccountSigner -{ - inner: T; - signerType: string; - - /** - * A function to initialize an object with an inner parameter and derive a signerType from it. - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { privateKeyToAccount, generatePrivateKey } from "viem"; - * - * const signer = new LocalAccountSigner( - * privateKeyToAccount(generatePrivateKey()), - * ); - * ``` - * - * @param {T} inner The inner parameter containing the necessary data - */ - constructor(inner: T) { - this.inner = inner; - this.signerType = inner.type; // type: "local" - } - - /** - * Signs the provided message using the inner signMessage function. - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem"; - * - * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - * const signature = await signer.signMessage("Hello, world!"); - * ``` - * - * @param {string} message The message to be signed - * @returns {Promise} A promise that resolves to the signed message - */ - readonly signMessage: (message: SignableMessage) => Promise<`0x${string}`> = ( - message, - ) => { - return this.inner.signMessage({ message }); - }; - - /** - * Signs typed data using the given parameters. - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem"; - * - * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - * const signature = await signer.signTypedData({ - * domain: {}, - * types: {}, - * primaryType: "", - * message: {}, - * }); - * ``` - * - * @param {TypedDataDefinition} params The parameters defining the typed data and primary type - * @returns {Promise} A promise that resolves to the signed data in hexadecimal format - */ - readonly signTypedData = async < - const TTypedData extends TypedData | Record, - TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData, - >( - params: TypedDataDefinition, - ): Promise => { - return this.inner.signTypedData(params); - }; - - /** - * Signs an unsigned authorization using the provided private key account. - * - * @example - * ```ts twoslash - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem/accounts"; - * - * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - * const signedAuthorization = await signer.signAuthorization({ - * contractAddress: "0x1234123412341234123412341234123412341234", - * chainId: 1, - * nonce: 3, - * }); - * ``` - * - * @param {AuthorizationRequest} unsignedAuthorization - The unsigned authorization to be signed. - * @returns {Promise>} A promise that resolves to the signed authorization. - */ - - signAuthorization( - this: LocalAccountSigner, - unsignedAuthorization: AuthorizationRequest, - ): Promise> { - return this.inner.signAuthorization(unsignedAuthorization); - } - - /** - * Returns the address of the inner object in a specific hexadecimal format. - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem"; - * - * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - * const address = await signer.getAddress(); - * ``` - * - * @returns {Promise} A promise that resolves to the address in the format `0x{string}` - */ - readonly getAddress = async (): Promise<`0x${string}`> => { - return this.inner.address; - }; - - /** - * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options. - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generateMnemonic } from "viem"; - * - * const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic()); - * ``` - * - * @param {string} key The mnemonic key to derive the account from. - * @param {HDOptions} [opts] Optional HD options for deriving the account. - * @returns {LocalAccountSigner} A LocalAccountSigner object for the derived account. - */ - static mnemonicToAccountSigner( - key: string, - opts?: HDOptions, - ): LocalAccountSigner { - const signer = mnemonicToAccount(key, opts); - return new LocalAccountSigner(signer); - } - - /** - * Creates a `LocalAccountSigner` instance using the provided private key. - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem"; - * - * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - * ``` - * - * @param {Hex} key The private key in hexadecimal format - * @returns {LocalAccountSigner} An instance of `LocalAccountSigner` initialized with the provided private key - */ - static privateKeyToAccountSigner( - key: Hex, - ): LocalAccountSigner { - const signer = privateKeyToAccount(key); - return new LocalAccountSigner(signer); - } - - /** - * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`. - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * - * const signer = LocalAccountSigner.generatePrivateKeySigner(); - * ``` - * - * @returns {LocalAccountSigner} A `LocalAccountSigner` instance initialized with the generated private key account - */ - static generatePrivateKeySigner(): LocalAccountSigner { - const signer = privateKeyToAccount(generatePrivateKey()); - return new LocalAccountSigner(signer); - } -} diff --git a/aa-sdk/core/src/signer/schema.ts b/aa-sdk/core/src/signer/schema.ts deleted file mode 100644 index a8a3e99a37..0000000000 --- a/aa-sdk/core/src/signer/schema.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { z } from "zod"; -import type { SmartAccountSigner } from "./types"; - -/** - * Checks if the provided object is a `SmartAccountSigner`. - * - * @example - * ```ts - * import { isSigner, LocalAccountSigner } from "@aa-sdk/core"; - * - * const signer = new LocalAccountSigner(...); - * console.log(isSigner(signer)); // true - * ``` - * - * @param {any} signer the object to check - * @returns {boolean} A boolean indicating whether the object is a `SmartAccountSigner` - */ -export const isSigner = (signer: any): signer is SmartAccountSigner => { - return ( - signer != null && - typeof signer === "object" && - "signerType" in signer && - "signMessage" in signer && - "signTypedData" in signer && - "getAddress" in signer && - "inner" in signer - ); -}; - -export const SignerSchema = z.custom(isSigner); diff --git a/aa-sdk/core/src/signer/types.ts b/aa-sdk/core/src/signer/types.ts deleted file mode 100644 index eb2b16773b..0000000000 --- a/aa-sdk/core/src/signer/types.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { Address } from "abitype"; -import type { - Hex, - OneOf, - SignableMessage, - TypedData, - TypedDataDefinition, - SignedAuthorization, -} from "viem"; - -/** - * Extends the @interface SmartAccountSigner interface with authentication. - * - * @template AuthParams - the generic type of the authentication parameters - * @template AuthDetails - the generic type of the authentication details - * @template Inner - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc. - */ -export interface SmartAccountAuthenticator - extends SmartAccountSigner { - authenticate: (params: AuthParams) => Promise; - - getAuthDetails: () => Promise; -} - -// TODO: This is a temporary type to be removed when viem is updated -export type AuthorizationRequest = OneOf< - | { - address: Address; - } - | { - contractAddress: Address; - } -> & { - /** Chain ID. */ - chainId: uint32; - /** Nonce of the EOA to delegate to. */ - nonce: uint32; -}; - -/** - * A signer that can sign messages and typed data. - * - * @template Inner - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc. - */ -export interface SmartAccountSigner { - signerType: string; - inner: Inner; - - getAddress: () => Promise
; - - signMessage: (message: SignableMessage) => Promise; - - signTypedData: < - const TTypedData extends TypedData | Record, - TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData, - >( - params: TypedDataDefinition, - ) => Promise; - - signAuthorization?: ( - unsignedAuthorization: AuthorizationRequest, - ) => Promise>; -} diff --git a/aa-sdk/core/src/signer/utils.ts b/aa-sdk/core/src/signer/utils.ts deleted file mode 100644 index 3f112556ef..0000000000 --- a/aa-sdk/core/src/signer/utils.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { - concat, - encodeAbiParameters, - parseAbiParameters, - type Address, - type Hash, - type Hex, -} from "viem"; - -export type SignWith6492Params = { - factoryAddress: Address; - factoryCalldata: Hex; - signature: Hash; -}; - -/** - * Wraps a given signature with additional data following the EIP-6492 standard. - * - * @example - * ```ts - * import { wrapSignatureWith6492 } from "@aa-sdk/core"; - * - * const signature = wrapSignatureWith6492({ - * factoryAddress: "0x...", - * factoryCalldata: "0x...", - * signature: "0x...", - * }); - * ``` - * - * @param {SignWith6492Params} params The parameters to wrap the signature - * @param {Hex} params.factoryAddress The address of the factory - * @param {Hex} params.factoryCalldata The calldata for the factory - * @param {Hex} params.signature The original signature that needs to be wrapped - * @returns {Hash} The wrapped signature - */ -export const wrapSignatureWith6492 = ({ - factoryAddress, - factoryCalldata, - signature, -}: SignWith6492Params): Hash => { - // wrap the signature as follows: https://eips.ethereum.org/EIPS/eip-6492 - // concat( - // abi.encode( - // (create2Factory, factoryCalldata, originalERC1271Signature), - // (address, bytes, bytes)), - // magicBytes - // ) - return concat([ - encodeAbiParameters(parseAbiParameters("address, bytes, bytes"), [ - factoryAddress, - factoryCalldata, - signature, - ]), - "0x6492649264926492649264926492649264926492649264926492649264926492", - ]); -}; diff --git a/aa-sdk/core/src/signer/wallet-client.ts b/aa-sdk/core/src/signer/wallet-client.ts deleted file mode 100644 index ad3d107a04..0000000000 --- a/aa-sdk/core/src/signer/wallet-client.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { - getAddress, - type Hex, - type SignableMessage, - type TypedData, - type TypedDataDefinition, - type WalletClient, - type SignedAuthorization, -} from "viem"; -import type { Account } from "viem/accounts"; -import type { SignTypedDataParameters } from "viem/actions"; -import { InvalidSignerTypeError } from "../errors/signer.js"; -import type { SmartAccountSigner, AuthorizationRequest } from "./types"; - -/** - * Represents a wallet client signer for smart accounts, providing methods to get the address, sign messages, sign typed data, and sign 7702 authorizations. - */ -export class WalletClientSigner implements SmartAccountSigner { - signerType: string; - inner: WalletClient; - - /** - * Initializes a signer with a given wallet client and signer type. - * - * @example - * ```ts - * import { WalletClientSigner } from "@aa-sdk/core"; - * import { createWalletClient, custom } from 'viem' - * import { mainnet } from 'viem/chains' - * - * const client = createWalletClient({ - * chain: mainnet, - * transport: custom(window.ethereum!) - * }); - * - * const signer = new WalletClientSigner(client, 'wallet'); - * ``` - * - * @param {WalletClient} client The wallet client to interact with - * @param {string} signerType The type of signer; must be a valid signer type, otherwise an error will be thrown - * @throws {InvalidSignerTypeError} If the signer type is invalid - */ - constructor(client: WalletClient, signerType: string) { - this.inner = client; - if (!signerType) { - throw new InvalidSignerTypeError(signerType); - } - this.signerType = signerType; - } - - /** - * Asynchronously retrieves addresses from the inner object and returns the first address after applying the `getAddress` function. - * - * @example - * ```ts - * import { WalletClientSigner } from "@aa-sdk/core"; - * import { createWalletClient, custom } from 'viem' - * import { mainnet } from 'viem/chains' - * - * const client = createWalletClient({ - * chain: mainnet, - * transport: custom(window.ethereum!) - * }); - * - * const signer = new WalletClientSigner(client, 'wallet'); - * console.log(await signer.getAddress()); - * ``` - * - * @returns {Promise} A promise that resolves to the first address after being processed by the `getAddress` function. - */ - getAddress: () => Promise<`0x${string}`> = async () => { - let addresses = await this.inner.getAddresses(); - return getAddress(addresses[0]); - }; - - /** - * Signs a message using the account's signing method. - * - * @example - * ```ts - * import { WalletClientSigner } from "@aa-sdk/core"; - * import { createWalletClient, custom } from 'viem' - * import { mainnet } from 'viem/chains' - * - * const client = createWalletClient({ - * chain: mainnet, - * transport: custom(window.ethereum!) - * }); - * - * const signer = new WalletClientSigner(client, 'wallet'); - * console.log(await signer.signMessage("hello")); - * ``` - * - * @param {string} message the message string that needs to be signed - * @returns {Promise} a promise that resolves to the signed message - */ - readonly signMessage: (message: SignableMessage) => Promise<`0x${string}`> = - async (message) => { - const account = this.inner.account ?? (await this.getAddress()); - - return this.inner.signMessage({ message, account }); - }; - - /** - * Signs the provided typed data using the account's private key. - * - * @example - * ```ts - * import { WalletClientSigner } from "@aa-sdk/core"; - * import { createWalletClient, custom } from 'viem' - * import { mainnet } from 'viem/chains' - * - * const client = createWalletClient({ - * chain: mainnet, - * transport: custom(window.ethereum!) - * }); - * - * const signer = new WalletClientSigner(client, 'wallet'); - * console.log(await signer.signTypedData({ - * types: { - * "Message": [{ name: "content", type: "string" }] - * }, - * primaryType: "Message", - * message: { content: "Hello" }, - * })); - * ``` - * - * @param {TypedDataDefinition} typedData The typed data to be signed - * @returns {Promise} A promise that resolves to a hex string representing the signed data - */ - signTypedData = async < - const TTypedData extends TypedData | Record, - TPrimaryType extends keyof TTypedData | "EIP712Domain" | string = string, - >( - typedData: TypedDataDefinition, - ): Promise => { - const account = this.inner.account ?? (await this.getAddress()); - - const params = { - account, - ...typedData, - } as SignTypedDataParameters; - - return this.inner.signTypedData(params); - }; - - /** - * Signs an EIP-7702 Authorization - * - * @example - * ```ts twoslash - * import { WalletClientSigner } from "@aa-sdk/core"; - * import { createWalletClient, custom } from 'viem'; - * import { mainnet } from 'viem/chains'; - * - * const client = createWalletClient({ - * chain: mainnet, - * transport: custom(window.ethereum!) - * }); - * - * const signer = new WalletClientSigner(client, 'wallet'); - * - * const authorization = await signer.signAuthorization({ - * contractAddress: "0x1234123412341234123412341234123412341234", - * chainId: 1, - * nonce: 0, - * }); - * ``` - * - * @param {AuthorizationRequest} unsignedAuthorization the authorization to be signed - * @returns {Promise>} a promise that resolves to the signed authorization - */ - signAuthorization = async ( - unsignedAuthorization: AuthorizationRequest, - ): Promise> => { - const account = this.inner.account ?? (await this.getAddress()); - return this.inner.signAuthorization({ ...unsignedAuthorization, account }); - }; -} diff --git a/aa-sdk/core/src/transport/split.ts b/aa-sdk/core/src/transport/split.ts deleted file mode 100644 index 0fa551b66b..0000000000 --- a/aa-sdk/core/src/transport/split.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { custom, type CustomTransport, type Transport } from "viem"; - -export interface SplitTransportParams { - overrides: { - methods: string[]; - transport: Transport; - }[]; - fallback: Transport; -} - -/** - * The Split Transport allows you to split RPC traffic for specific methods across - * different RPC providers. This is done by specifying the methods you want handled - * specially as overrides and providing a fallback transport for all other methods. - * - * @example - * ```ts - * import { createPublicClient, http } from "viem"; - * import { split } from "@aa-sdk/core"; - * - * const bundlerMethods = [ - * "eth_sendUserOperation", - * "eth_estimateUserOperationGas", - * "eth_getUserOperationReceipt", - * "eth_getUserOperationByHash", - * "eth_supportedEntryPoints" - * ]; - * - * const clientWithSplit = createPublicClient({ - * transport: split({ - * overrides: [{ - * methods: bundlerMethods, - * transport: http(BUNDLER_RPC_URL) - * }], - * fallback: http(OTHER_RPC_URL) - * }), - * }); - * ``` - * - * @param {SplitTransportParams} params split transport configuration containing the methods overrides and fallback transport - * @returns {CustomTransport} a viem Transport that splits traffic - */ -export const split = (params: SplitTransportParams): CustomTransport => { - const overrideMap = params.overrides.reduce((accum, curr) => { - curr.methods.forEach((method) => { - if (accum.has(method) && accum.get(method) !== curr.transport) { - throw new Error( - "A method cannot be handled by more than one transport", - ); - } - - accum.set(method, curr.transport); - }); - - return accum; - }, new Map()); - - return (opts) => - custom({ - request: async (args) => { - const transportOverride = overrideMap.get(args.method); - if (transportOverride != null) { - return transportOverride(opts).request(args); - } - - return params.fallback(opts).request(args); - }, - })(opts); -}; diff --git a/aa-sdk/core/src/types.ts b/aa-sdk/core/src/types.ts deleted file mode 100644 index 36343013df..0000000000 --- a/aa-sdk/core/src/types.ts +++ /dev/null @@ -1,349 +0,0 @@ -import { - type Address, - type Hash, - type Hex, - type StateOverride, - type TransactionReceipt, -} from "viem"; -import type { z } from "zod"; -import type { - UserOperationFeeOptionsFieldSchema, - UserOperationFeeOptionsSchema, - UserOperationFeeOptionsSchema_v6, - UserOperationFeeOptionsSchema_v7, -} from "./client/schema"; -import type { EntryPointVersion } from "./entrypoint/types"; -import type { - BigNumberishRangeSchema, - BigNumberishSchema, - MultiplierSchema, - NoUndefined, -} from "./utils"; - -export type EmptyHex = `0x`; -export type NullAddress = `0x0`; - -// based on @account-abstraction/common -export type PromiseOrValue = T | Promise; -export type BytesLike = Uint8Array | Hex; -export type Multiplier = z.input; - -export type BigNumberish = z.input; -export type BigNumberishRange = z.input; - -export type UserOperationCallData = - | { - /* the target of the call */ - target: Address; - /* the data passed to the target */ - data: Hex; - /* the amount of native token to send to the target (default: 0) */ - value?: bigint; - } - | Hex; - -export type BatchUserOperationCallData = Exclude[]; - -export type UserOperationFeeOptionsField = z.input< - typeof UserOperationFeeOptionsFieldSchema ->; - -export type UserOperationFeeOptions< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = TEntryPointVersion extends "0.6.0" - ? z.input - : TEntryPointVersion extends "0.7.0" - ? z.input - : z.input; - -export type UserOperationOverridesParameter< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, - Required extends boolean = false, -> = Required extends true - ? { overrides: UserOperationOverrides } - : { overrides?: UserOperationOverrides }; - -export type UserOperationPaymasterOverrides< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = TEntryPointVersion extends "0.6.0" - ? { - // paymasterData overrides to bypass paymaster middleware - paymasterAndData: Hex; - } - : TEntryPointVersion extends "0.7.0" - ? { - // paymasterData overrides to bypass paymaster middleware - // if set to '0x', all paymaster related fields are omitted from the user op request - paymasterData: Hex; - paymaster: Address; - paymasterVerificationGasLimit: - | NoUndefined< - UserOperationStruct<"0.7.0">["paymasterVerificationGasLimit"] - > - | Multiplier; - paymasterPostOpGasLimit: - | NoUndefined["paymasterPostOpGasLimit"]> - | Multiplier; - } - : {}; - -export type UserOperationOverrides< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = Partial< - { - callGasLimit: - | UserOperationStruct["callGasLimit"] - | Multiplier; - maxFeePerGas: - | UserOperationStruct["maxFeePerGas"] - | Multiplier; - maxPriorityFeePerGas: - | UserOperationStruct["maxPriorityFeePerGas"] - | Multiplier; - preVerificationGas: - | UserOperationStruct["preVerificationGas"] - | Multiplier; - verificationGasLimit: - | UserOperationStruct["verificationGasLimit"] - | Multiplier; - - /** - * The same state overrides for - * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method. - * An address-to-state mapping, where each entry specifies some state to be ephemerally overridden - * prior to executing the call. State overrides allow you to customize the network state for - * the purpose of the simulation, so this feature is useful when you need to estimate gas - * for user operation scenarios under conditions that aren’t currently present on the live network. - */ - stateOverride: StateOverride; - } & UserOperationPaymasterOverrides -> & - /** - * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce` - * It is useful when you want to use parallel nonces for user operations - * - * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include - * one user operation for your account in a bundle - */ - Partial< - | { - nonceKey: bigint; - nonce: never; - } - | { nonceKey: never; nonce: bigint } - >; - -// represents the request as it needs to be formatted for v0.6 RPC requests -// Reference: https://github.com/ethereum/ERCs/blob/8dd085d159cb123f545c272c0d871a5339550e79/ERCS/erc-4337.md#definitions -export interface UserOperationRequest_v6 { - /* the origin of the request */ - sender: Address; - /* nonce (as hex) of the transaction, returned from the entry point for this Address */ - nonce: Hex; - /* the initCode for creating the sender if it does not exist yet, otherwise "0x" */ - initCode: Hex | EmptyHex; - /* the callData passed to the target */ - callData: Hex; - /* Gas value (as hex) used by inner account execution */ - callGasLimit: Hex; - /* Actual gas (as hex) used by the validation of this UserOperation */ - verificationGasLimit: Hex; - /* Gas overhead (as hex) of this UserOperation */ - preVerificationGas: Hex; - /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) (as hex)*/ - maxFeePerGas: Hex; - /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) (as hex)*/ - maxPriorityFeePerGas: Hex; - /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster ("0x" for self-sponsored transaction) */ - paymasterAndData: Hex | EmptyHex; - /* Data passed into the account along with the nonce during the verification step */ - signature: Hex; -} - -// represents the request as it needs to be formatted for v0.7 RPC requests -// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions -export interface UserOperationRequest_v7 { - /* the account making the operation */ - sender: Address; - /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */ - nonce: Hex; - /* account factory, only for new accounts */ - factory?: Address; - /* data for account factory (only if account factory exists) */ - factoryData?: Hex; - /* the data to pass to the sender during the main execution call */ - callData: Hex; - /* the amount of gas to allocate the main execution call */ - callGasLimit: Hex; - /* the amount of gas to allocate for the verification step */ - verificationGasLimit: Hex; - /* extra gas to pay the bunder */ - preVerificationGas: Hex; - /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */ - maxFeePerGas: Hex; - /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */ - maxPriorityFeePerGas: Hex; - /* address of paymaster contract, (or empty, if account pays for itself) */ - paymaster?: Address; - /* the amount of gas to allocate for the paymaster validation code */ - paymasterVerificationGasLimit?: Hex; - /* the amount of gas to allocate for the paymaster post-operation code */ - paymasterPostOpGasLimit?: Hex; - /* data for paymaster (only if paymaster exists) */ - paymasterData?: Hex; - /* data passed into the account to verify authorization */ - signature: Hex; -} - -export type Eip7702ExtendedFields = { - eip7702Auth?: { - chainId: Hex; - nonce: Hex; - address: Address; - r: Hex; - s: Hex; - yParity: Hex; - }; -}; - -// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions -export type UserOperationRequest< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = (TEntryPointVersion extends "0.6.0" - ? UserOperationRequest_v6 - : TEntryPointVersion extends "0.7.0" - ? UserOperationRequest_v7 - : never) & - Eip7702ExtendedFields; - -export interface UserOperationEstimateGasResponse< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> { - /* Gas overhead of this UserOperation */ - preVerificationGas: BigNumberish; - /* Actual gas used by the validation of this UserOperation */ - verificationGasLimit: BigNumberish; - /* Value used by inner account execution */ - callGasLimit: BigNumberish; - /* - * EntryPoint v0.7.0 operations only. - * The amount of gas to allocate for the paymaster validation code. - * Note: `eth_estimateUserOperationGas` does not return paymasterPostOpGasLimit. - */ - paymasterVerificationGasLimit: TEntryPointVersion extends "0.7.0" - ? BigNumberish | undefined - : never; -} - -export interface UserOperationResponse< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> { - /* the User Operation */ - userOperation: UserOperationRequest; - /* the address of the entry point contract that executed the user operation */ - entryPoint: Address; - /* the block number the user operation was included in */ - blockNumber: BigNumberish; - /* the hash of the block the user operation was included in */ - blockHash: Hash; - /* the hash of the transaction that included the user operation */ - transactionHash: Hash; -} - -export interface UserOperationReceipt { - /* The request hash of the UserOperation. */ - userOpHash: Hash; - /* The entry point address used for the UserOperation. */ - entryPoint: Address; - /* The account initiating the UserOperation. */ - sender: Address; - /* The nonce used in the UserOperation. */ - nonce: BigNumberish; - /* The paymaster used for this UserOperation (or empty). */ - paymaster?: Address; - /* The actual amount paid (by account or paymaster) for this UserOperation. */ - actualGasCost: BigNumberish; - /* The total gas used by this UserOperation (including preVerification, creation, validation, and execution). */ - actualGasUsed: BigNumberish; - /* Indicates whether the execution completed without reverting. */ - success: boolean; - /* In case of revert, this is the revert reason. */ - reason?: string; - /* The logs generated by this UserOperation (not including logs of other UserOperations in the same bundle). */ - logs: string[]; - /* The TransactionReceipt object for the entire bundle, not only for this UserOperation. */ - receipt: TransactionReceipt; - /* The status of the useroperation. Could be "Mined" or "Preconfirmed". */ - status: string; -} - -// https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOperation.ts -// this is used for building requests for v0.6 entry point contract -export interface UserOperationStruct_v6 { - /* the origin of the request */ - sender: string; - /* nonce of the transaction, returned from the entry point for this address */ - nonce: BigNumberish; - /* the initCode for creating the sender if it does not exist yet, otherwise "0x" */ - initCode: BytesLike | "0x"; - /* the callData passed to the target */ - callData: BytesLike; - /* Value used by inner account execution */ - callGasLimit?: BigNumberish; - /* Actual gas used by the validation of this UserOperation */ - verificationGasLimit?: BigNumberish; - /* Gas overhead of this UserOperation */ - preVerificationGas?: BigNumberish; - /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */ - maxFeePerGas?: BigNumberish; - /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */ - maxPriorityFeePerGas?: BigNumberish; - /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster ("0x" for self-sponsored transaction) */ - paymasterAndData: BytesLike | "0x"; - /* Data passed into the account along with the nonce during the verification step */ - signature: BytesLike; -} - -// based on https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOperation.ts -// this is used for building requests for v0.7 entry point contract -export interface UserOperationStruct_v7 { - /* the account making the operation */ - sender: string; - /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */ - nonce: BigNumberish; - /* account factory, only for new accounts */ - factory?: string; - /* data for account factory (only if account factory exists) */ - factoryData?: BytesLike; - /* the data to pass to the sender during the main execution call */ - callData: BytesLike; - /* the amount of gas to allocate the main execution call */ - callGasLimit?: BigNumberish; - /* the amount of gas to allocate for the verification step */ - verificationGasLimit?: BigNumberish; - /* extra gas to pay the bunder */ - preVerificationGas?: BigNumberish; - /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */ - maxFeePerGas?: BigNumberish; - /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */ - maxPriorityFeePerGas?: BigNumberish; - /* address of paymaster contract, (or empty, if account pays for itself) */ - paymaster?: string; - /* the amount of gas to allocate for the paymaster validation code */ - paymasterVerificationGasLimit?: BigNumberish; - /* the amount of gas to allocate for the paymaster post-operation code */ - paymasterPostOpGasLimit?: BigNumberish; - /* data for paymaster (only if paymaster exists) */ - paymasterData?: BytesLike; - /* data passed into the account to verify authorization */ - signature: BytesLike; -} - -export type UserOperationStruct< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = (TEntryPointVersion extends "0.6.0" - ? UserOperationStruct_v6 - : TEntryPointVersion extends "0.7.0" - ? UserOperationStruct_v7 - : never) & - Eip7702ExtendedFields; diff --git a/aa-sdk/core/src/utils/__tests__/bigint.test.ts b/aa-sdk/core/src/utils/__tests__/bigint.test.ts deleted file mode 100644 index c56ae1ab82..0000000000 --- a/aa-sdk/core/src/utils/__tests__/bigint.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { RoundingMode, bigIntMultiply } from "../bigint.js"; - -describe("BigInt utility", () => { - describe("multiplication operations", () => { - it("should multiply a big int correctly with an int", async () => { - expect(bigIntMultiply(10n, 2, RoundingMode.ROUND_UP)).toEqual(20n); - }); - - it("should multiply a big int correctly with a float", async () => { - expect(bigIntMultiply(10n, 0.5, RoundingMode.ROUND_UP)).toEqual(5n); - }); - - it("should fail to multiply a big int and a float with too much precision", async () => { - expect(() => - bigIntMultiply(10n, 0.53958491842948789, RoundingMode.ROUND_UP), - ).toThrowError( - "bigIntMultiply requires a multiplier validated number as the second argument", - ); - }); - - it("should multiply a big int correctly when rouding up", async () => { - expect(bigIntMultiply(10n, 0.53, RoundingMode.ROUND_UP)).toEqual(6n); - }); - - it("should multiply a big int correctly when rouding down", async () => { - expect(bigIntMultiply(10n, 0.53, RoundingMode.ROUND_DOWN)).toEqual(5n); - }); - - it("should multiply correctly with default settings", () => { - expect(bigIntMultiply(100n, 1.15)).toEqual(115n); - }); - }); -}); diff --git a/aa-sdk/core/src/utils/bigint.ts b/aa-sdk/core/src/utils/bigint.ts deleted file mode 100644 index 02a0e88837..0000000000 --- a/aa-sdk/core/src/utils/bigint.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { keccak256, toHex } from "viem"; -import type { BigNumberish, Multiplier } from "../types"; -import { isMultiplier } from "./schema.js"; - -/** - * Returns the max bigint in a list of bigints - * - * @param {bigint[]} args a list of bigints to get the max of - * @returns {bigint} the max bigint in the list - */ -export const bigIntMax = (...args: bigint[]): bigint => { - if (!args.length) { - throw new Error("bigIntMax requires at least one argument"); - } - - return args.reduce((m, c) => (m > c ? m : c)); -}; - -/** - * Returns the min bigint in a list of bigints - * - * @param {bigint[]} args a list of bigints to get the max of - * @returns {bigint} the min bigint in the list - */ -export const bigIntMin = (...args: bigint[]): bigint => { - if (!args.length) { - throw new Error("bigIntMin requires at least one argument"); - } - - return args.reduce((m, c) => (m < c ? m : c)); -}; - -/** - * Given a bigint and a min-max range, returns the min-max clamped bigint value - * - * @param {BigNumberish} value a bigint value to clamp - * @param {BigNumberish | undefined} lower lower bound min max tuple value - * @param {BigNumberish | undefined} upper upper bound min max tuple value - * @returns {bigint} the clamped bigint value per given range - */ -export const bigIntClamp = ( - value: BigNumberish, - lower: BigNumberish | null | undefined, - upper: BigNumberish | null | undefined, -): bigint => { - lower = lower != null ? BigInt(lower) : null; - upper = upper != null ? BigInt(upper) : null; - - if (upper != null && lower != null && upper < lower) { - throw new Error( - `invalid range: upper bound ${upper} is less than lower bound ${lower}`, - ); - } - - let ret = BigInt(value); - if (lower != null && lower > ret) { - ret = lower; - } - if (upper != null && upper < ret) { - ret = upper; - } - return ret; -}; - -export enum RoundingMode { - ROUND_DOWN = 0, - ROUND_UP = 1, -} - -/** - * Given a bigint and a number (which can be a float), returns the bigint value. - * Note: this function has loss and will round down to the nearest integer. - * - * @param {BigNumberish} base - the number to be multiplied - * @param {number} multiplier - the amount to multiply by - * @param {RoundingMode} roundingMode - the rounding mode to use when calculating the percent. defaults to ROUND_UP - * @returns {bigint} the bigint value of the multiplication with the number rounded by the rounding mode - */ -export const bigIntMultiply = ( - base: BigNumberish, - multiplier: Multiplier["multiplier"], - roundingMode: RoundingMode = RoundingMode.ROUND_UP, -) => { - if (!isMultiplier({ multiplier })) { - throw new Error( - "bigIntMultiply requires a multiplier validated number as the second argument", - ); - } - - // Get decimal places of b. Max decimal places is defined by the MultiplerSchema. - const decimalPlaces = multiplier.toString().split(".")[1]?.length ?? 0; - const val = - roundingMode === RoundingMode.ROUND_UP - ? BigInt(base) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) + - BigInt(10 ** decimalPlaces - 1) - : BigInt(base) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)); - - return val / BigInt(10 ** decimalPlaces); -}; - -/** - * Useful if you want to use a string, such as a user's email address, as salt to generate a unique SmartAccount per user. - * - * example: - * ``` - * const salt = stringToIndex("alice@example.com"); - * - * export const account = new SimpleSmartContractAccount({ - * index: salt, - * // other args omitted... - * }); - * ``` - * - * @param {string} phrase -- any string value. - * @returns {bigint} the bigint value of the hashed string - */ -export const stringToIndex = (phrase: string): bigint => - BigInt(keccak256(toHex(phrase))); diff --git a/aa-sdk/core/src/utils/bytes.ts b/aa-sdk/core/src/utils/bytes.ts deleted file mode 100644 index d2329dc3b4..0000000000 --- a/aa-sdk/core/src/utils/bytes.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { Hex } from "viem"; - -type TakeBytesOpts = { - count?: number; - offset?: number; -}; - -/** - * Given a bytes string, returns a slice of the bytes - * - * @param {Hex} bytes - the hex string representing bytes - * @param {TakeBytesOpts} opts - optional parameters for slicing the bytes - * @param {number} opts.offset - the offset in bytes to start slicing from - * @param {number} opts.count - the number of bytes to slice - * @returns {Hex} the sliced bytes - */ -export const takeBytes = (bytes: Hex, opts: TakeBytesOpts = {}): Hex => { - const { offset, count } = opts; - const start = (offset ? offset * 2 : 0) + 2; // add 2 to skip the 0x prefix - const end = count ? start + count * 2 : undefined; - - return `0x${bytes.slice(start, end)}`; -}; - -export type UnpackedSignature = { - r: `0x${string}`; - s: `0x${string}`; - v: bigint; -}; - -export const unpackSignRawMessageBytes = ( - hex: `0x${string}`, -): UnpackedSignature => { - return { - r: takeBytes(hex, { count: 32 }), - s: takeBytes(hex, { count: 32, offset: 32 }), - v: BigInt(takeBytes(hex, { count: 1, offset: 64 })), - }; -}; diff --git a/aa-sdk/core/src/utils/defaults.ts b/aa-sdk/core/src/utils/defaults.ts deleted file mode 100644 index 44f47d6e29..0000000000 --- a/aa-sdk/core/src/utils/defaults.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type Chain } from "viem"; -import { arbitrum, arbitrumGoerli, arbitrumSepolia } from "viem/chains"; -import type { UserOperationFeeOptions } from "../types.js"; - -export const minPriorityFeePerBidDefaults = new Map([ - [arbitrum.id, 10_000_000n], - [arbitrumGoerli.id, 10_000_000n], - [arbitrumSepolia.id, 10_000_000n], -]); - -export const getDefaultUserOperationFeeOptions = ( - chain: Chain, -): UserOperationFeeOptions => { - return { - maxPriorityFeePerGas: { - min: minPriorityFeePerBidDefaults.get(chain.id) ?? 100_000_000n, - multiplier: 1.33, - }, - }; -}; diff --git a/aa-sdk/core/src/utils/index.ts b/aa-sdk/core/src/utils/index.ts deleted file mode 100644 index bc4a6bc30f..0000000000 --- a/aa-sdk/core/src/utils/index.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { toHex } from "viem"; -import type { PromiseOrValue } from "../types.js"; -import type { RecordableKeys } from "./types.js"; - -/** - * Utility function that allows for piping a series of async functions together - * - * @param {((s: S, o?: O, f?: F) => Promise)[]} fns - functions to pipe - * @returns {S} result of the pipe - */ -export const asyncPipe = - (...fns: ((s: S, o?: O, f?: F) => Promise)[]) => - async (s: S, o?: O, f?: F) => { - let result = s; - for (const fn of fns) { - result = await fn(result, o, f); - } - return result; - }; - -// based on @ethersproject/properties, but pulled in here to minize the dependency on ethers -export type Deferrable = { - [K in keyof T]: PromiseOrValue; -}; - -/** - * Used to ensure type doesn't extend another, for use in & chaining of properties - */ -export type NotType = A extends B ? never : unknown; - -/** - * Await all of the properties of a Deferrable object - * - * @param {Deferrable} object - a Deferrable object - * @returns {Promise} the object with its properties resolved - */ -export async function resolveProperties(object: Deferrable): Promise { - const promises = Object.keys(object).map((key) => { - const value = object[key as keyof Deferrable]; - return Promise.resolve(value).then((v) => ({ key: key, value: v })); - }); - - const results = await Promise.all(promises); - - return filterUndefined( - results.reduce((accum, curr) => { - accum[curr.key as keyof T] = curr.value; - return accum; - }, {} as T), - ); -} - -/** - * Recursively converts all values in an object to hex strings - * - * @param {any} obj - obj to deep hexlify - * @returns {any} object with all of its values hexlified - */ -export function deepHexlify(obj: any): any { - if (typeof obj === "function") { - return undefined; - } - if (obj == null || typeof obj === "string" || typeof obj === "boolean") { - return obj; - } else if (typeof obj === "bigint") { - return toHex(obj); - } else if (obj._isBigNumber != null || typeof obj !== "object") { - return toHex(obj).replace(/^0x0/, "0x"); - } - if (Array.isArray(obj)) { - return obj.map((member) => deepHexlify(member)); - } - return Object.keys(obj).reduce( - (set, key) => ({ - ...set, - [key]: deepHexlify(obj[key]), - }), - {}, - ); -} - -/** - * Filters out properties with undefined or null values from the provided object. - * - * @example - * ```ts - * import { filterUndefined } from "@aa-sdk/core"; - * - * const result = filterUndefined({ - * foo: undefined, - * bar: null, - * baz: "baz", - * }); // { baz: "baz" } - * ``` - * - * @param {T} obj the object from which to remove properties with undefined or null values - * @returns {T} the object with undefined or null properties removed - */ -export function filterUndefined(obj: T): T { - for (const key in obj) { - if (obj[key] == null) { - delete obj[key]; - } - } - return obj as T; -} - -/** - * Picks the specified keys from an object and returns a new object containing only those key-value pairs. - * - * @example - * ```ts - * import { pick } from "@aa-sdk/core"; - * - * const picked = pick({ - * foo: "foo", - * bar: "bar", - * }, ["foo"]); // { foo: "foo" } - * ``` - * - * @param {Record} obj The object from which to pick keys - * @param {string|string[]} keys A single key or an array of keys to pick from the object - * @returns {Record} A new object containing only the picked key-value pairs - */ -export function pick(obj: Record, keys: string | string[]) { - return Object.keys(obj) - .filter((k) => keys.includes(k)) - .reduce((res, k) => Object.assign(res, { [k]: obj[k] }), {}); -} - -/** - * Utility method for checking if the passed in values are all equal (strictly) - * - * @param {...any[]} params - values to check - * @returns {boolean} a boolean indicating if all values are the same - * @throws if no values are passed in - */ -export const allEqual = (...params: any[]): boolean => { - if (params.length === 0) { - throw new Error("no values passed in"); - } - return params.every((v) => v === params[0]); -}; - -/** - * Utility method for checking the condition and return the value if condition holds true, undefined if not. - * - * @param {Promise} condition - condition to check - * @param {() => Promise} value - value to return when condition holds true - * @returns {Promise} the value if condition holds true, undefined if not - */ -export const conditionalReturn = ( - condition: Promise, - value: () => Promise, -): Promise => condition.then((t) => (t ? value() : undefined)); - -/** - * Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function. - * - * @example - * ```ts - * import { toRecord } from "@aa-sdk/core"; - * import { sepolia, mainnet } from "viem/chains"; - * - * const addressesByChain = toRecord( - * [sepolia, mainnet], - * "id", - * () => "0x..." - * ); // { [sepolia.id]: "0x...", [mainnet.id]: "0x..." } - * ``` - * - * @param {T[]} array The array of objects to convert to a record - * @param {K} selector The key used to select the property that will become the record's key - * @param {(item: T) => V} fn The function that transforms each item in the array into the record's value - * @returns {Record} The resulting record object - */ -export const toRecord = < - T extends { [K in RecordableKeys]: string | number | symbol }, - K extends RecordableKeys, - V, ->( - array: T[], - selector: K, - fn: (item: T) => V, -): Record => - array.reduce( - (acc, item) => { - acc[item[selector]] = fn(item); - return acc; - }, - {} as Record, - ); - -export * from "./bigint.js"; -export * from "./bytes.js"; -export * from "./defaults.js"; -export * from "./schema.js"; -export type * from "./types.js"; -export * from "./userop.js"; diff --git a/aa-sdk/core/src/utils/schema.ts b/aa-sdk/core/src/utils/schema.ts deleted file mode 100644 index ed4758a6b9..0000000000 --- a/aa-sdk/core/src/utils/schema.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { isHex, type Chain } from "viem"; -import { z } from "zod"; -import type { BigNumberish, Multiplier } from "../types"; - -export const ChainSchema = z.custom( - (chain) => - chain != null && - typeof chain === "object" && - "id" in chain && - typeof chain.id === "number", -); - -export const HexSchema = z.custom<`0x${string}` | "0x">((val) => { - return isHex(val, { strict: true }); -}); - -export const BigNumberishSchema = z.union([HexSchema, z.number(), z.bigint()]); - -export const BigNumberishRangeSchema = z - .object({ - min: BigNumberishSchema.optional(), - max: BigNumberishSchema.optional(), - }) - .strict(); - -export const MultiplierSchema = z - .object({ - /** - * Multiplier value with max precision of 4 decimal places - */ - multiplier: z.number().refine( - (n) => { - return (n.toString().split(".")[1]?.length ?? 0) <= 4; - }, - { message: "Max precision is 4 decimal places" }, - ), - }) - .strict(); - -export function isBigNumberish(x: any): x is BigNumberish { - return x != null && BigNumberishSchema.safeParse(x).success; -} - -export function isMultiplier(x: any): x is Multiplier { - return x != null && MultiplierSchema.safeParse(x).success; -} diff --git a/aa-sdk/core/src/utils/stateOverride.ts b/aa-sdk/core/src/utils/stateOverride.ts deleted file mode 100644 index 9fcf4ba7c9..0000000000 --- a/aa-sdk/core/src/utils/stateOverride.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Address } from "abitype"; -import { - AccountStateConflictError, - InvalidAddressError, - StateAssignmentConflictError, - isAddress, - numberToHex, - type RpcAccountStateOverride, - type RpcStateMapping, - type RpcStateOverride, - type StateMapping, - type StateOverride, -} from "viem"; - -// Copied from Viem's utils/stateOverride.ts, which does not expose these -// functions. - -type SerializeStateMappingParameters = StateMapping | undefined; - -function serializeStateMapping( - stateMapping: SerializeStateMappingParameters, -): RpcStateMapping | undefined { - if (!stateMapping || stateMapping.length === 0) return undefined; - return stateMapping.reduce((acc, { slot, value }) => { - validateBytes32HexLength(slot); - validateBytes32HexLength(value); - acc[slot] = value; - return acc; - }, {} as RpcStateMapping); -} - -function validateBytes32HexLength(value: Address): void { - if (value.length !== 66) { - // This is the error message from Viem's non-exported InvalidBytesLengthError. - throw new Error( - `Hex is expected to be 66 hex long, but is ${value.length} hex long.`, - ); - } -} - -type SerializeAccountStateOverrideParameters = Omit< - StateOverride[number], - "address" ->; - -function serializeAccountStateOverride( - parameters: SerializeAccountStateOverrideParameters, -): RpcAccountStateOverride { - const { balance, nonce, state, stateDiff, code } = parameters; - const rpcAccountStateOverride: RpcAccountStateOverride = {}; - if (code !== undefined) rpcAccountStateOverride.code = code; - if (balance !== undefined) - rpcAccountStateOverride.balance = numberToHex(balance); - if (nonce !== undefined) rpcAccountStateOverride.nonce = numberToHex(nonce); - if (state !== undefined) - rpcAccountStateOverride.state = serializeStateMapping(state); - if (stateDiff !== undefined) { - if (rpcAccountStateOverride.state) throw new StateAssignmentConflictError(); - rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff); - } - return rpcAccountStateOverride; -} - -type SerializeStateOverrideParameters = StateOverride | undefined; - -// eslint-disable-next-line jsdoc/require-jsdoc -export function serializeStateOverride( - parameters?: SerializeStateOverrideParameters, -): RpcStateOverride | undefined { - if (!parameters) return undefined; - const rpcStateOverride: RpcStateOverride = {}; - for (const { address, ...accountState } of parameters) { - if (!isAddress(address, { strict: false })) - throw new InvalidAddressError({ address }); - if (rpcStateOverride[address]) - throw new AccountStateConflictError({ address: address }); - rpcStateOverride[address] = serializeAccountStateOverride(accountState); - } - return rpcStateOverride; -} diff --git a/aa-sdk/core/src/utils/testUtils.ts b/aa-sdk/core/src/utils/testUtils.ts deleted file mode 100644 index e12f73e047..0000000000 --- a/aa-sdk/core/src/utils/testUtils.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { createPublicClient, custom, type Chain, type Hex } from "viem"; -import { - toSmartContractAccount, - type SmartContractAccount, -} from "../account/smartContractAccount.js"; -import { - createBundlerClientFromExisting, - type BundlerClient, -} from "../client/bundlerClient.js"; -import { getEntryPoint } from "../entrypoint/index.js"; -import type { DefaultEntryPointVersion } from "../entrypoint/types.js"; - -export const createDummySmartContractAccount = async ( - client: C, -): Promise> => { - return toSmartContractAccount({ - source: "dummy", - accountAddress: "0x1234567890123456789012345678901234567890", - entryPoint: getEntryPoint(client.chain), - chain: client.chain, - transport: custom(client), - signMessage: async () => "0xdeadbeef", - signTypedData: async () => "0xdeadbeef", - getAccountInitCode: async () => - "0x1234567890123456789012345678901234567890deadbeef", - encodeBatchExecute: async () => "0x", - encodeExecute: async () => "0x", - getDummySignature: (): Hex => - "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c", - }); -}; - -export const createTestClient = (chain: Chain) => { - return createBundlerClientFromExisting( - createPublicClient({ - chain, - transport: custom({ - request: async () => {}, - }), - }), - ); -}; diff --git a/aa-sdk/core/src/utils/types.ts b/aa-sdk/core/src/utils/types.ts deleted file mode 100644 index 5fb79b6445..0000000000 --- a/aa-sdk/core/src/utils/types.ts +++ /dev/null @@ -1,105 +0,0 @@ -// borrowed from viem - -/** - * Constructs a type by excluding `undefined` from `T`. - * - * @example - * NoUndefined - * => string - */ -export type NoUndefined = T extends undefined ? never : T; -// borrowed from viem -/** - * Checks if T is `undefined` - * - * @param T - Type to check - * @example - * type Result = IsUndefined - * // ^? type Result = true - */ - -export type IsUndefined = [undefined] extends [T] ? true : false; - -export type Never = T extends object - ? { - [K in keyof T]?: never; - } - : never; - -export type RequiredBy = Required< - Pick -> & - Omit; - -/** - * Combines members of an intersection into a readable type. - * - * @see https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg - * @example - * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }> - * => { a: string, b: string, c: number, d: bigint } - */ -export type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -export type WithRequired = Required>; -export type WithOptional = Pick, K>; - -// Checks for type equivalence, evaluates always to either `true` or `false`. -// Semantics: (EQ = true) <==> (A <==> B) -export type EQ = [A] extends [B] - ? [B] extends [A] - ? true - : false - : false; - -// Auxiliary type for `IsMemberOrSubtypeOfAComponent` -// Evaluates to `true` or `boolean` if one of the explicit components (according to the TypeScript distribution -// mechanism for union types) of the union type equals the other given type. -// Examples: -// EqualsOneOfTheComponents ⟶ boolean -// EqualsOneOfTheComponents ⟶ true -// EqualsOneOfTheComponents ⟶ false -export type EqualsOneOfTheComponents = Union extends infer Component // enforce distribution - ? EQ - : never; - -// Auxiliary type for `IsOneOf` -export type IsMemberOrSubtypeOfAComponent< - T, - Union, - ConjunctionOfExplicitComponentChecks extends boolean, -> = [T] extends [Union] - ? true extends ConjunctionOfExplicitComponentChecks - ? true - : false - : false; - -// Checks whether the given type equals one of the explicit components of the union type. Note that in this respect we -// consider the members of the infinite types number and string as implicit since the inbuilt distribution mechanism of -// TypeScript does not (cannot) distribute over the infinite number of strings or numbers. However, `boolean` is treated -// by TypeScript (and accordingly here) as the explicit union `true | false`. -// -// In particular, the evaluation result is `false` if the type is a proper union of components of the union type. It also -// evaluates to false if the given type is a proper subtype of one of its explicit components. -// It always evaluates to either `true` or `false`. -// Examples: -// IsOneOf ⟶ true -// IsOneOf<2 | 4, 0 | 1 | 2 | 3 | 4 | 5 | 6> ⟶ false -// IsOneOf<'text', string> ⟶ false // only implicit but not explicit component -export type IsOneOf = IsMemberOrSubtypeOfAComponent< - T, - Union, - EqualsOneOfTheComponents ->; - -export type OneOf = IsOneOf extends true ? T1 : never; - -export type RecordableKeys = { - [K in keyof T]: T[K] extends string | number | symbol ? K : never; -}[keyof T]; - -// Marks a subset of the fields of T as optional. -export type OptionalFields = Pick, K> & - Omit; diff --git a/aa-sdk/core/src/utils/userop.ts b/aa-sdk/core/src/utils/userop.ts deleted file mode 100644 index 41e28f17d8..0000000000 --- a/aa-sdk/core/src/utils/userop.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { concat, type Address, type Hex } from "viem"; -import type { EntryPointVersion } from "../entrypoint/types"; -import type { - BigNumberish, - Multiplier, - UserOperationFeeOptionsField, - UserOperationOverrides, - UserOperationRequest, - UserOperationStruct, - UserOperationStruct_v6, - UserOperationStruct_v7, -} from "../types"; -import { bigIntClamp, bigIntMultiply } from "./bigint.js"; -import { allEqual, isBigNumberish } from "./index.js"; - -/** - * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version - * - * @param {UserOperationStruct} request a UserOperationStruct to validate - * @returns {boolean} a type guard that asserts the UserOperationRequest is valid - */ -export function isValidRequest< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->( - request: UserOperationStruct, -): request is UserOperationRequest { - // These are the only ones marked as optional in the interface above - return ( - request.callGasLimit != null && - request.preVerificationGas != null && - request.verificationGasLimit != null && - request.maxFeePerGas != null && - request.maxPriorityFeePerGas != null && - isValidPaymasterAndData(request) && - isValidFactoryAndData(request) - ); -} - -/** - * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data - * - * @param {UserOperationRequest} request a UserOperationRequest to validate - * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest - */ -export function isValidPaymasterAndData< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->(request: UserOperationStruct): boolean { - if ("paymasterAndData" in request) { - return (request as UserOperationStruct_v6).paymasterAndData != null; - } - - // either all exist, or none. - return allEqual( - (request as UserOperationStruct_v7).paymaster == null, - (request as UserOperationStruct_v7).paymasterData == null, - (request as UserOperationStruct_v7).paymasterPostOpGasLimit == null, - (request as UserOperationStruct_v7).paymasterVerificationGasLimit == null, - ); -} - -/** - * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data - * - * @param {UserOperationRequest} request a UserOperationRequest to validate - * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest - */ -export function isValidFactoryAndData< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->(request: UserOperationStruct): boolean { - if ("initCode" in request) { - const { initCode } = request as UserOperationStruct_v6; - return initCode != null; - } - - // either all exist, or none. - return allEqual( - (request as UserOperationStruct_v7).factory == null, - (request as UserOperationStruct_v7).factoryData == null, - ); -} - -/** - * Utility method for applying a UserOperationOverrides field value - * over the current value set for the field - * - * @param {BigNumberish} value the current value of the field - * @param {BigNumberish | Multiplier} override the override value to apply - * @returns {BigNumberish} the new value of the field after applying the override - */ -export function applyUserOpOverride( - value: TValue, - override?: BigNumberish | Multiplier, -): TValue | BigNumberish { - if (override == null) { - return value; - } - - if (isBigNumberish(override)) { - return override; - } - - // multiplier override - else { - return value != null ? bigIntMultiply(value, override.multiplier) : value; - } -} - -/** - * Utility method for applying a UserOperationFeeOptionsField value - * over the current value set for the field - * - * @param {BigNumberish} value the current value of the field - * @param {UserOperationFeeOptionsField} feeOption the override value to apply - * @returns {BigNumberish} the new value of the field after applying the override - */ -export function applyUserOpFeeOption( - value: TValue, - feeOption?: UserOperationFeeOptionsField, -): TValue | BigNumberish { - if (feeOption == null) { - return value; - } - - return value != null - ? bigIntClamp( - feeOption.multiplier - ? bigIntMultiply(value, feeOption.multiplier) - : value, - feeOption.min, - feeOption.max, - ) - : (feeOption.min ?? 0n); -} - -/** - * Utility method for applying a UserOperationOverrides field value and - * a UserOperationFeeOptionsField value over the current value set for the field, - * with the override taking precedence over the fee option - * - * @param {BigNumberish} value the current value of the field - * @param {BigNumberish | Multiplier} [override] the override value to apply - * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply - * @returns {BigNumberish} the new value of the field after applying the override or fee option - */ -export function applyUserOpOverrideOrFeeOption< - TValue extends BigNumberish | undefined, ->( - value: TValue, - override?: BigNumberish | Multiplier, - feeOption?: UserOperationFeeOptionsField, -): TValue | BigNumberish { - return value != null && override != null - ? applyUserOpOverride(value, override)! - : applyUserOpFeeOption(value, feeOption); -} - -/** - * Utility method for checking whether the middleware pipeline should - * bypass the paymaster middleware for the user operation with the given overrides, - * either because the UserOp is paying for its own gas, or passing a specific paymaster - * - * @template EntryPointVersion TEntryPointVersion - * @param {UserOperationOverrides | undefined} overrides the user operation overrides to check - * @returns {boolean} whether the paymaster middleware should be bypassed - */ -export const bypassPaymasterAndData = < - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->( - overrides: UserOperationOverrides | undefined, -): boolean => - !!overrides && - ("paymasterAndData" in overrides || "paymasterData" in overrides); - -/** - * An alternative to `bypassPaymasterAndData` which only returns true if the data parameter - * is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will - * pay for its own gas - * - * @template EntryPointVersion TEntryPointVersion - * @param {UserOperationOverrides | undefined} overrides the user operation overrides to check - * @returns {boolean} whether the paymaster middleware should be bypassed - */ -export const bypassPaymasterAndDataEmptyHex = < - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->( - overrides: UserOperationOverrides | undefined, -): boolean => - overrides !== undefined && - (("paymasterAndData" in overrides && overrides.paymasterAndData === "0x") || - ("paymasterData" in overrides && overrides.paymasterData === "0x")); - -/** - * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string - * - * @param {Hex} paymasterAndData the paymaster and data hex string to parse. - * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request - * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field - */ -export const parsePaymasterAndData = ( - paymasterAndData: Hex, -): Pick, "paymaster" | "paymasterData"> => ({ - paymaster: paymasterAndData.substring(0, 42) as Address, - paymasterData: `0x${paymasterAndData.substring(42)}` as Hex, -}); - -/** - * Utility method for converting the object containing the paymaster address and paymaster data - * to the paymaster and data concatenated hex string - * - * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of - * entrypoint v0.7 user operation request - * @param {Hex} paymasterAndData.paymaster the paymaster address - * @param {Hex} paymasterAndData.paymasterData the paymaster data - * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field - */ -export const concatPaymasterAndData = ({ - paymaster = "0x", - paymasterData = "0x", -}: Pick, "paymaster" | "paymasterData">): Hex => - concat([paymaster, paymasterData]); diff --git a/aa-sdk/core/src/version.ts b/aa-sdk/core/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/aa-sdk/core/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/aa-sdk/core/tsconfig.build.json b/aa-sdk/core/tsconfig.build.json deleted file mode 100644 index 5de5b77262..0000000000 --- a/aa-sdk/core/tsconfig.build.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "**/*/*.e2e.test.ts", - "vitest.config.ts", - "vitest.config.e2e.ts" - ], - "include": ["src"], - "compilerOptions": { - "sourceMap": true - } -} diff --git a/aa-sdk/core/tsconfig.json b/aa-sdk/core/tsconfig.json deleted file mode 100644 index 748018d6a6..0000000000 --- a/aa-sdk/core/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "typescript-template/base.json" -} diff --git a/aa-sdk/core/vitest.config.ts b/aa-sdk/core/vitest.config.ts deleted file mode 100644 index 747b44cb8f..0000000000 --- a/aa-sdk/core/vitest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "aa-sdk/core", - }, - }), -); diff --git a/aa-sdk/ethers/CHANGELOG.md b/aa-sdk/ethers/CHANGELOG.md deleted file mode 100644 index ea2f2f7428..0000000000 --- a/aa-sdk/ethers/CHANGELOG.md +++ /dev/null @@ -1,1271 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Features - -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -**Note:** Version bump only for package @aa-sdk/ethers - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([02f2f16](https://github.com/alchemyplatform/aa-sdk/commit/02f2f1623803480b8dc496491d2232c6fe5c219c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([55e6632](https://github.com/alchemyplatform/aa-sdk/commit/55e663208aae63e6092cbf2335c58f1448bd0dc3)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([1385441](https://github.com/alchemyplatform/aa-sdk/commit/1385441095b559ef506d5b4ae429ada5cc84be0e)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([a389f65](https://github.com/alchemyplatform/aa-sdk/commit/a389f656a6e4feb14e13ecfc84880e4e0d93d786)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([593e84c](https://github.com/alchemyplatform/aa-sdk/commit/593e84c027a697b757e3fd954564ff40cd1e11b0)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([b643981](https://github.com/alchemyplatform/aa-sdk/commit/b643981e900d9cabf6e273b5f7e9e75cd0c32c7d)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cb9d92](https://github.com/alchemyplatform/aa-sdk/commit/9cb9d9283db899d5a2f632767993c04135eb1de8)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([cb59787](https://github.com/alchemyplatform/aa-sdk/commit/cb597879a01179a24b919650ba19c1bba0da6e1d)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([3cdea84](https://github.com/alchemyplatform/aa-sdk/commit/3cdea8457d0a1fabd63d6d318a7bd1f62883d5b4)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([45582b1](https://github.com/alchemyplatform/aa-sdk/commit/45582b14e7116903f9b91cdd4bf2bb04de14ffa4)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([8ef751e](https://github.com/alchemyplatform/aa-sdk/commit/8ef751eab7a2357caaa6d5d63cbc1907e90c39cb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cf1b77](https://github.com/alchemyplatform/aa-sdk/commit/9cf1b77e2ac738996af258e38879173184805a1c)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([d5c90da](https://github.com/alchemyplatform/aa-sdk/commit/d5c90dafacaf4194050f3c9870be03d44dbdbfea)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([e177533](https://github.com/alchemyplatform/aa-sdk/commit/e17753377757b4e75f289224fe7e1c4575875286)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c550465](https://github.com/alchemyplatform/aa-sdk/commit/c55046525d790001db4a9a305cade6f0d06ca90b)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([3060a05](https://github.com/alchemyplatform/aa-sdk/commit/3060a05e895e6d6fef363276665f0d3d06c161fb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([22b8183](https://github.com/alchemyplatform/aa-sdk/commit/22b8183ae297648d43594f59578163da6b0ae9bc)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([ae8a272](https://github.com/alchemyplatform/aa-sdk/commit/ae8a2720818ff1505a2424fce5ce154b90b74fd0)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([4102ae0](https://github.com/alchemyplatform/aa-sdk/commit/4102ae051a5a8ac03fb88f08adc8b3bca0f9737e)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([637bb95](https://github.com/alchemyplatform/aa-sdk/commit/637bb953d59bfd931652286dfc73497b0e0e288f)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -**Note:** Version bump only for package @aa-sdk/ethers - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([0601453](https://github.com/alchemyplatform/aa-sdk/commit/060145386572026905f5720866722c5a20c9d7db)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([b2b7cc6](https://github.com/alchemyplatform/aa-sdk/commit/b2b7cc680860f3d416d11b66d626e715fae4cf8b)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([dae2ad0](https://github.com/alchemyplatform/aa-sdk/commit/dae2ad08d863f9d25508e475903e042190aad56f)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([4c0b2f1](https://github.com/alchemyplatform/aa-sdk/commit/4c0b2f19a59272940b3fe40c610c06ad8c49d70e)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([9d81aaf](https://github.com/alchemyplatform/aa-sdk/commit/9d81aafe89b2dc49e2ab2c44556c81c3010c1fa2)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([c92a07f](https://github.com/alchemyplatform/aa-sdk/commit/c92a07fdb39d652fe5c95326d47a929b3b3278ed)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([082d363](https://github.com/alchemyplatform/aa-sdk/commit/082d363923684ae3bc45edf544c8536ff3c42379)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([d2f97c5](https://github.com/alchemyplatform/aa-sdk/commit/d2f97c56fdf63871296dd81b10cbc60b61b34d6c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([6c41e22](https://github.com/alchemyplatform/aa-sdk/commit/6c41e22233932ee98c6214f2ffdf3e8f928f880f)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c5465ee](https://github.com/alchemyplatform/aa-sdk/commit/c5465eee5c957afcb02d3e0d82c5821dd7819b5f)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -## [3.18.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.1...v3.18.2) (2024-06-05) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.18.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.0...v3.18.1) (2024-06-04) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.2...v3.18.0) (2024-06-04) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.17.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.1...v3.17.2) (2024-05-31) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.17.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.0...v3.17.1) (2024-05-31) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.15.0...v3.16.0) (2024-05-22) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.12.3](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.2...v3.12.3) (2024-05-10) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.12.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.1...v3.12.2) (2024-05-09) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.12.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.0...v3.12.1) (2024-05-07) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.1...v3.12.0) (2024-05-02) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.11.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.0...v3.11.1) (2024-04-30) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.10.0...v3.11.0) (2024-04-30) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0...v3.10.0) (2024-04-29) - -### Features - -- remove generic entry point version specification requirement for better devex ([#607](https://github.com/alchemyplatform/aa-sdk/issues/607)) ([f3fb619](https://github.com/alchemyplatform/aa-sdk/commit/f3fb619e3cfb2c3a957a259788ae6ab1c530f3d5)) - -# [3.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0-alpha.4...v3.9.0) (2024-04-24) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.8.2-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.1) (2024-04-18) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) -- paymaster middleware update per entrypoint v7 user operation ([#580](https://github.com/alchemyplatform/aa-sdk/issues/580)) ([399479a](https://github.com/alchemyplatform/aa-sdk/commit/399479a38d6eaf0ab6d4d46b38f9d0f5a773cbed)) - -## [3.8.2-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.0) (2024-04-17) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) - -## [3.8.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.0...v3.8.1) (2024-04-11) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.7.3...v3.8.0) (2024-04-10) - -### Features - -- **alchemy-signer:** emit events from the alchemy signer on state changes ([#523](https://github.com/alchemyplatform/aa-sdk/issues/523)) ([8880e6d](https://github.com/alchemyplatform/aa-sdk/commit/8880e6d5bb9c98524c726a841fab5019bd6f0049)) - -## [3.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.6.0...v3.6.1) (2024-03-18) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.1...v3.6.0) (2024-03-18) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.0...v3.5.1) (2024-03-14) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.4.4...v3.5.0) (2024-03-14) - -### Features - -- **plugins:** make plugingen a cli tool ([#507](https://github.com/alchemyplatform/aa-sdk/issues/507)) ([53ba81d](https://github.com/alchemyplatform/aa-sdk/commit/53ba81d33422bb3f18134c1dd75e68d64f5cc3f0)) - -## [3.4.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.4.1...v3.4.2) (2024-03-08) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.3.0...v3.4.0) (2024-02-29) - -### Features - -- sign user op and send raw user op methods added to smart account client ([#486](https://github.com/alchemyplatform/aa-sdk/issues/486)) ([6518d12](https://github.com/alchemyplatform/aa-sdk/commit/6518d12190e9d48263e4776f288245b5a9940b36)) - -## [3.2.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.2.0...v3.2.1) (2024-02-27) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.1.0...v3.1.1) (2024-02-23) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.1...v3.1.0) (2024-02-23) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [3.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0...v3.0.1) (2024-02-21) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.13...v3.0.0) (2024-02-21) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0-alpha.13](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.12...v3.0.0-alpha.13) (2024-02-16) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.9...v3.0.0-alpha.10) (2024-02-14) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.8...v3.0.0-alpha.9) (2024-02-13) - -### Features - -- **amoy:** add amoy from viem update ([#448](https://github.com/alchemyplatform/aa-sdk/issues/448)) ([adae84a](https://github.com/alchemyplatform/aa-sdk/commit/adae84add30536676725dbc8805f3436c8ad395e)) - -# [3.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.4...v3.0.0-alpha.5) (2024-02-07) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.3...v3.0.0-alpha.4) (2024-02-02) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.2...v3.0.0-alpha.3) (2024-02-02) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.0...v3.0.0-alpha.1) (2024-01-31) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [3.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.3.1...v3.0.0-alpha.0) (2024-01-30) - -### Code Refactoring - -- **aa-ethers:** refactor aa-ethers to use the viem client and accounts ([6cc2051](https://github.com/alchemyplatform/aa-sdk/commit/6cc20518bf90788f83ac3c9e579b0f4f4de518b1)) - -### Features - -- hoist account signing methods ([5bcfac8](https://github.com/alchemyplatform/aa-sdk/commit/5bcfac8ddaca6b712d473cbad2cbbd0228827af5)) - -### BREAKING CHANGES - -- **aa-ethers:** aa-ethers has had some functionality removed and apis changed - -* inputs to the ProviderAdapter now require a SmartAccountClient -* with\* methods have been removed, middleware config now exists - on the SmartAccountClient -* the Account Signer has been updated to take a SmartContractAccount - as input - -## [2.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v2.3.0...v2.3.1) (2024-01-25) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [2.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.2.1...v2.3.0) (2024-01-24) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [2.2.1](https://github.com/alchemyplatform/aa-sdk/compare/v2.2.0...v2.2.1) (2024-01-23) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [2.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.1.0...v2.2.0) (2024-01-22) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [2.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v1.2.4...v2.0.0) (2024-01-12) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## 1.2.4 (2024-01-08) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## 1.2.3 (2023-12-22) - -### Features - -- add stringToIndex util function for SmartAccount salt ([#329](https://github.com/alchemyplatform/aa-sdk/issues/329)) ([b34ef9a](https://github.com/alchemyplatform/aa-sdk/commit/b34ef9aa6727986e89a1461dec45955cac9d4365)) -- add prefix for aa-signers signer type ([#325](https://github.com/alchemyplatform/aa-sdk/issues/325)) ([f3b8cc1](https://github.com/alchemyplatform/aa-sdk/commit/f3b8cc1f0553bad51e4f95c3fd80f6aa0199cff2)) -- add terms page to glossary ([#336](https://github.com/alchemyplatform/aa-sdk/issues/336)) ([63b24ec](https://github.com/alchemyplatform/aa-sdk/commit/63b24ecdb3e5e656c173a1523a3e09478d4c074d)) -- add faq page to docs ([#335](https://github.com/alchemyplatform/aa-sdk/issues/335)) ([63092ce](https://github.com/alchemyplatform/aa-sdk/commit/63092ceb45341d422bd3f8c13ebcc539d9cc5001)) -- add aa-signer implementation for lit protocol ([#312](https://github.com/alchemyplatform/aa-sdk/issues/312)) ([b0f8dd5](https://github.com/alchemyplatform/aa-sdk/commit/b0f8dd538728f8a7dd4447da8c88a50179d61f95)) -- add aa-signer implementation for arcana auth ([#319](https://github.com/alchemyplatform/aa-sdk/issues/319)) ([c82dbf7](https://github.com/alchemyplatform/aa-sdk/commit/c82dbf7ad76791e81525740dfe8820bd234c2863)) -- add types to glossary ([#338](https://github.com/alchemyplatform/aa-sdk/issues/338)) ([28ad2b0](https://github.com/alchemyplatform/aa-sdk/commit/28ad2b015e5d0191f77cbdeeb3c071b7ec813fde)) - -## 1.2.2 (2023-12-13) - -### Bug Fixes - -- fix the named export for web3auth ([#330](https://github.com/alchemyplatform/aa-sdk/issues/330)) ([b340f11](https://github.com/alchemyplatform/aa-sdk/commit/b340f115e96ab068f70f8b5ff8316f4724b3ab6d)) - -## 1.2.1 (2023-12-12) - -### Features - -- allow passing raw call data to sendUserOperation ([#272](https://github.com/alchemyplatform/aa-sdk/issues/272) ([26b90b6](https://github.com/alchemyplatform/aa-sdk/commit/26b90b63a998b106130f3c671bb77f977becb45d))) -- add aa-signers package ([#228](https://github.com/alchemyplatform/aa-sdk/issues/228)) ([5fcd322](https://github.com/alchemyplatform/aa-sdk/commit/5fcd3222133205e5b3f86b456309584d848b1fb5)) -- add aa-signer implementation for magic ([#229](https://github.com/alchemyplatform/aa-sdk/issues/229)) ([860d177](https://github.com/alchemyplatform/aa-sdk/commit/860d17778f6ffc6140d07f2fce147eb8993ee985)) -- add aa-signer implementation for web3auth ([#247](https://github.com/alchemyplatform/aa-sdk/issues/247)) ([7d0492b](https://github.com/alchemyplatform/aa-sdk/commit/7d0492b3829b07d18c1488b7d7e0b129e40f7b4c)) -- add aa-signer implementation for turnkey ([#307](https://github.com/alchemyplatform/aa-sdk/issues/307)) ([4fa05e4](https://github.com/alchemyplatform/aa-sdk/commit/4fa05e4ada8c6558e3ce0bd35b157110baba47c9)) -- add aa-signer implementation for fireblocks ([#301](https://github.com/alchemyplatform/aa-sdk/issues/301)) ([40289e6](https://github.com/alchemyplatform/aa-sdk/commit/40289e6c656344ab0cd6c60e6dbc7c11d392d27e)) -- add aa-signer implementation for particle ([#304](https://github.com/alchemyplatform/aa-sdk/issues/304)) ([e049c2c](https://github.com/alchemyplatform/aa-sdk/commit/e049c2caa562089f62614549ac4e7b2c741f93fd)) -- add aa-signer implementation for portal ([#303](https://github.com/alchemyplatform/aa-sdk/issues/303)) ([eb8a0c3](https://github.com/alchemyplatform/aa-sdk/commit/eb8a0c356ba89701d9cc34921cf7812c23791655)) -- add aa-signer implementation for capsule ([#305](https://github.com/alchemyplatform/aa-sdk/issues/305)) ([9d89e99](https://github.com/alchemyplatform/aa-sdk/commit/9d89e99aea12fc4c13f5b4a680167d5687829bfe)) -- add improvements on provider for override user operation fee and gas ([#277](https://github.com/alchemyplatform/aa-sdk/issues/277)) ([258d80e](https://github.com/alchemyplatform/aa-sdk/commit/258d80e64d7aaa7de26f72375b9d58221c95311e)) -- support one-off percentage overrides for user operations ([#289](https://github.com/alchemyplatform/aa-sdk/issues/289)) ([dc979ff](https://github.com/alchemyplatform/aa-sdk/commit/dc979ff111f0a490b08adce9a913466706399afb)) -- add a convenience method to make creating an alchemy provider easier ([#206](https://github.com/alchemyplatform/aa-sdk/issues/206)) ([211b7e0](https://github.com/alchemyplatform/aa-sdk/commit/211b7e0e715b961520dc5baaa4f0d49b647fbd79)) -- add nani smart account implementation ([#306](https://github.com/alchemyplatform/aa-sdk/issues/306)) ([bf7566f](https://github.com/alchemyplatform/aa-sdk/commit/bf7566f2d62ab7ca4ee7fcb4a9df68308fbe5622)) -- improve zod validation parsing ([#299](https://github.com/alchemyplatform/aa-sdk/issues/299)) ([0763a82](https://github.com/alchemyplatform/aa-sdk/commit/0763a82d47f491513bdcf75716c83043f3dbd2be)) -- docs site re-formatting ([#300](https://github.com/alchemyplatform/aa-sdk/issues/300)) ([a1376c4](https://github.com/alchemyplatform/aa-sdk/commit/a1376c4ad38a62517092ebdd8c87557712c4aecc)) -- docs for Dfns Signer ([#313](https://github.com/alchemyplatform/aa-sdk/issues/313)) ([33141b0](https://github.com/alchemyplatform/aa-sdk/commit/33141b08759b89e2c10f56d95a1316098f67fb9c)) -- docs for Arcana Signer ([#318](https://github.com/alchemyplatform/aa-sdk/issues/318)) ([81711d6](https://github.com/alchemyplatform/aa-sdk/commit/81711d6565a089a15eba95bc54c55972b13457e8)) - -# 1.2.0 (2023-11-17) - -### Features - -- make alchemy-sdk an optional dependency on aa-alchemy ([#265](https://github.com/alchemyplatform/aa-sdk/issues/265)) ([a0088b3](https://github.com/alchemyplatform/aa-sdk/commit/a0088b3ecce191ece21f4082a73c4fcae0e2286c)) - -# 1.1.0 (2023-11-14) - -### Features - -- merge development into main for new minor release ([#251](https://github.com/alchemyplatform/aa-sdk/issues/251)) ([ab098ee](https://github.com/alchemyplatform/aa-sdk/commit/ab098ee9ec35e4b1b3c788046168874fb51e4783)) - -# [1.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.2.0...v1.0.0) (2023-11-10) - -### Features - -- use alchemy provider, light account for e2e tests ([#209](https://github.com/alchemyplatform/aa-sdk/issues/209)) ([124be68](https://github.com/alchemyplatform/aa-sdk/commit/124be68c5137a3511ec612e814265739e6909e75)) - -# 0.2.0 (2023-11-03) - -### Features - -- merge development into main for new version release ([#207](https://github.com/alchemyplatform/aa-sdk/issues/207)) ([f06fd2a](https://github.com/alchemyplatform/aa-sdk/commit/f06fd2adf5e4aaf90214435d32f9d566d8502099)) - -## 0.1.1 (2023-10-20) - -### Bug Fixes - -- bad deploy script again ([2da8de2](https://github.com/alchemyplatform/aa-sdk/commit/2da8de2f4feb4c82fd454050e66f6203b61bcc2c)) - -# [0.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.32...v0.1.0) (2023-10-10) - -### Features - -- merge in all of the staged changes to the aa-sdk ([#120](https://github.com/alchemyplatform/aa-sdk/issues/120)) ([7a9effa](https://github.com/alchemyplatform/aa-sdk/commit/7a9effaa07c03a6a50c9cf856b5935e735adae3a)), closes [#1](https://github.com/alchemyplatform/aa-sdk/issues/1) [#2](https://github.com/alchemyplatform/aa-sdk/issues/2) [#3](https://github.com/alchemyplatform/aa-sdk/issues/3) [#7](https://github.com/alchemyplatform/aa-sdk/issues/7) [#8](https://github.com/alchemyplatform/aa-sdk/issues/8) [#9](https://github.com/alchemyplatform/aa-sdk/issues/9) - -# 0.1.0-alpha.32 (2023-09-18) - -### Bug Fixes - -- `baseGoerli` chainId in `chains.ts` ([#104](https://github.com/alchemyplatform/aa-sdk/issues/104)) ([2dda5dd](https://github.com/alchemyplatform/aa-sdk/commit/2dda5dd729124338ddf529c11bbf24afaea05dd4)) - -# 0.1.0-alpha.31 (2023-09-13) - -### Bug Fixes - -- remove all references to `SimpleSmartAccountOwner` ([#101](https://github.com/alchemyplatform/aa-sdk/issues/101)) ([a8f101d](https://github.com/alchemyplatform/aa-sdk/commit/a8f101dff7fbbd10598467ddaaa1c3c55f707e6d)) - -# 0.1.0-alpha.30 (2023-09-11) - -### Features - -- add base support to alchemy provider ([#100](https://github.com/alchemyplatform/aa-sdk/issues/100)) ([a5dc65c](https://github.com/alchemyplatform/aa-sdk/commit/a5dc65c4208614b935943ebdd8eececf3de03d29)) - -# 0.1.0-alpha.29 (2023-08-29) - -### Bug Fixes - -- **core:** add missing `null` return type of `eth_getUserOperation*` ([#93](https://github.com/alchemyplatform/aa-sdk/issues/93)) ([cba9a0c](https://github.com/alchemyplatform/aa-sdk/commit/cba9a0c79807612b37c9d8c300b494312c9bd752)) - -# 0.1.0-alpha.28 (2023-08-25) - -### Bug Fixes - -- pass overrides from tx to user op ([#88](https://github.com/alchemyplatform/aa-sdk/issues/88)) ([985cb99](https://github.com/alchemyplatform/aa-sdk/commit/985cb997691f5b251337ea0fbe6bd23e6b3fb455)) - -# 0.1.0-alpha.27 (2023-08-24) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# 0.1.0-alpha.26 (2023-08-23) - -### Features - -- add utils for getting the intermediary UO struct ([#86](https://github.com/alchemyplatform/aa-sdk/issues/86)) ([0e1a701](https://github.com/alchemyplatform/aa-sdk/commit/0e1a70174c0eeff2eedce4379914cad75f0629b2)) - -# 0.1.0-alpha.25 (2023-08-17) - -### Features - -- add jwt support for Alchemy providers ([#81](https://github.com/alchemyplatform/aa-sdk/issues/81)) ([af85aa4](https://github.com/alchemyplatform/aa-sdk/commit/af85aa41441825ca6545e850cbc7e834879cf236)) - -# 0.1.0-alpha.24 (2023-08-16) - -### Features - -- add utils for verifying 6492 sigs and ensip-11 utils ([#80](https://github.com/alchemyplatform/aa-sdk/issues/80)) ([52231b6](https://github.com/alchemyplatform/aa-sdk/commit/52231b6b4a521ee0713c4d3d3126ac4e5d66f14c)) - -# 0.1.0-alpha.23 (2023-08-14) - -### Features - -- **alchemy:** modify fee defaults ([0a0a65c](https://github.com/alchemyplatform/aa-sdk/commit/0a0a65c03a6991a1c57473ae9e65c4b727d937e2)) - -# 0.1.0-alpha.22 (2023-08-11) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# 0.1.0-alpha.21 (2023-08-08) - -### Features - -- allow overriding alchemy provider rpc url ([#70](https://github.com/alchemyplatform/aa-sdk/issues/70)) ([6b7c4b9](https://github.com/alchemyplatform/aa-sdk/commit/6b7c4b911b97dfcd1cfb00b2892548644fbe2fc6)) - -# 0.1.0-alpha.20 (2023-08-05) - -### Features - -- add signTypedData to providers ([#66](https://github.com/alchemyplatform/aa-sdk/issues/66)) ([e0a99f6](https://github.com/alchemyplatform/aa-sdk/commit/e0a99f694a6ed6e88b15d6cc73f99e74fd985667)) - -# 0.1.0-alpha.19 (2023-08-03) - -### Features - -- add event emitter to the provider so that we can listen to connected events in dapps ([#65](https://github.com/alchemyplatform/aa-sdk/issues/65)) ([35ee990](https://github.com/alchemyplatform/aa-sdk/commit/35ee990afa1c8be7c4685631af6654ac51b094cd)) - -# 0.1.0-alpha.18 (2023-07-28) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# 0.1.0-alpha.17 (2023-07-19) - -### Features - -- add support for fetch options when creating public clients ([#59](https://github.com/alchemyplatform/aa-sdk/issues/59)) ([5028e7b](https://github.com/alchemyplatform/aa-sdk/commit/5028e7b21a208ad8f88e81d455c2c8e24d57d953)) - -# 0.1.0-alpha.16 (2023-07-06) - -### Bug Fixes - -- always import with file extension ([#48](https://github.com/alchemyplatform/aa-sdk/issues/48)) ([4776d74](https://github.com/alchemyplatform/aa-sdk/commit/4776d7476f8cb622416c8846afa9bc17d16b97a6)) - -# 0.1.0-alpha.15 (2023-07-05) - -### Features - -- kernel batch transactions and gas estimation fixes ([#39](https://github.com/alchemyplatform/aa-sdk/issues/39)) ([f2a3d3d](https://github.com/alchemyplatform/aa-sdk/commit/f2a3d3d093ddbe1b564c0242c28b67487554f1ba)) - -# 0.1.0-alpha.14 (2023-06-29) - -### Bug Fixes - -- npm 404 error ([f34f581](https://github.com/alchemyplatform/aa-sdk/commit/f34f581a0399a2e30f33161d8b4cc1d778122b1f)) - -# 0.1.0-alpha.13 (2023-06-29) - -### Bug Fixes - -- add github user details to publish script ([2b812d3](https://github.com/alchemyplatform/aa-sdk/commit/2b812d34c041e11ba7d4c11a72c26da8f8e7af21)) - -# [0.1.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.10...v0.1.0-alpha.11) (2023-06-26) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [0.1.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.10) (2023-06-26) - -### Bug Fixes - -- types changed when updating to latest viem ([0aec96d](https://github.com/alchemyplatform/aa-sdk/commit/0aec96d184b5bcc3787ce9123260cf287f27f037)) - -# [0.1.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.9) (2023-06-26) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [0.1.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.6...v0.1.0-alpha.7) (2023-06-20) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [0.1.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.4...v0.1.0-alpha.5) (2023-06-16) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [0.1.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.3...v0.1.0-alpha.4) (2023-06-14) - -**Note:** Version bump only for package @alchemy/aa-ethers - -# [0.1.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.1...v0.1.0-alpha.2) (2023-06-12) - -### Features - -- add alchemy sub-package ([#22](https://github.com/alchemyplatform/aa-sdk/issues/22)) ([e7fc1aa](https://github.com/alchemyplatform/aa-sdk/commit/e7fc1aa93ebd57237009d3aa688d8c167f240aad)) - -# [0.1.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.0...v0.1.0-alpha.1) (2023-06-02) - -### Features - -- add support for the new alchemy paymaster endpoint ([#14](https://github.com/alchemyplatform/aa-sdk/issues/14)) ([3fac515](https://github.com/alchemyplatform/aa-sdk/commit/3fac5152075b07ab91dea393e366b667149a3e23)) - -# [0.1.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.2...v0.1.0-alpha.0) (2023-05-31) - -### Features - -- add support for batching transactions in a userop ([#7](https://github.com/alchemyplatform/aa-sdk/issues/7)) ([79d63a7](https://github.com/alchemyplatform/aa-sdk/commit/79d63a79d26d6501d74dbf90de6c9a1158d931de)) - -## [0.0.1-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.1...v0.0.1-alpha.2) (2023-05-23) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [0.0.1-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.0...v0.0.1-alpha.1) (2023-05-22) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## 0.0.1-alpha.0 (2023-05-22) - -### Bug Fixes - -- fix the version in the ethers project to match [@alchemy](https://github.com/alchemy) ([2a879a9](https://github.com/alchemyplatform/aa-sdk/commit/2a879a9a13298df7a979c592bbc32c18e6b74d82)) -- rename folders and update readme to reference correct package names ([8bbcaf7](https://github.com/alchemyplatform/aa-sdk/commit/8bbcaf76d2a9a945b30ce09fd2928a4a5eefb4be)) - -## [0.0.1-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.1...v0.0.1-alpha.0) (2023-05-22) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## [0.0.1-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.1-alpha.0...v0.0.1-alpha.1) (2023-05-22) - -**Note:** Version bump only for package @alchemy/aa-ethers - -## 0.0.1-alpha.0 (2023-05-22) - -### Bug Fixes - -- fix the version in the ethers project to match [@alchemy](https://github.com/alchemy) ([2a879a9](https://github.com/alchemyplatform/aa-sdk/commit/2a879a9a13298df7a979c592bbc32c18e6b74d82)) -- rename folders and update readme to reference correct package names ([8bbcaf7](https://github.com/alchemyplatform/aa-sdk/commit/8bbcaf76d2a9a945b30ce09fd2928a4a5eefb4be)) diff --git a/aa-sdk/ethers/README.md b/aa-sdk/ethers/README.md deleted file mode 100644 index ef1a764243..0000000000 --- a/aa-sdk/ethers/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# `@aa-sdk/ethers` - -This package contains `EthersProviderAdapter` and `AccountSigner`, respective extensions of the [`JsonRpcProvider`](https://docs.ethers.org/v5/api/providers/jsonrpc-provider/) and [`Signer`](https://docs.ethers.org/v5/api/signer/) classes defined in [`ethers.js`](https://docs.ethers.org/v5/) external library. - -If you currently rely `ethers.js` for web3 development, you can use these `ethers.js`-compatible `JsonRpcProvider` and `Signer` to integrate Account Abstraction into your dApp. You may also find the [`util`](https://www.alchemy.com/docs/wallets/packages/aa-ethers/utils/introduction) methods helpful. - -This repo is community maintained and we welcome contributions! - -## Getting started - -If you are already using the `@aa-sdk/core` package, you can simply install this package and start using the `EthersProviderAdapter` and `AccountSigner`. If you are not using `@aa-sdk/core`, you can install it and follow the instructions in the ["Getting started"](https://www.alchemy.com/docs/wallets/packages/aa-ethers/) docs to get started. - -```bash [yarn] -yarn add @aa-sdk/ethers -``` - -```bash [npm] -npm i -s @aa-sdk/ethers -``` - -```bash [pnpm] -pnpm i @aa-sdk/ethers -``` - -## Usage - -You can create a provider and connect it to a signer account like so: - -```typescript ethers-provider.ts -import { - LightSmartContractAccount, - getDefaultLightAccountFactoryAddress, -} from "@alchemy/aa-accounts"; -import { EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner, SmartAccountSigner } from "@aa-sdk/core"; -import { Alchemy, Network } from "alchemy-sdk"; -import { polygonMumbai } from "@aa-sdk/core"; - -const chain = polygonMumbai; - -// 1. Create a provider using EthersProviderAdapter -const alchemy = new Alchemy({ - apiKey: process.env.API_KEY!, - network: Network.MATIC_MUMBAI, -}); -const ethersProvider = await alchemy.config.getProvider(); - -const provider = EthersProviderAdapter.fromEthersProvider(ethersProvider); - -const signer: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner( - process.env.YOUR_OWNER_MNEMONIC!, -); - -// 2. Connect the provider to the smart account signer -export const signer = provider.connectToAccount( - (rpcClient) => - new LightSmartContractAccount({ - chain, - factoryAddress: getDefaultLightAccountFactoryAddress(chain), - rpcClient, - signer, - }), -); -``` diff --git a/aa-sdk/ethers/package.json b/aa-sdk/ethers/package.json deleted file mode 100644 index b78458396a..0000000000 --- a/aa-sdk/ethers/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "@aa-sdk/ethers", - "license": "MIT", - "version": "4.84.1", - "description": "Ethers.js wrapper for @aa-sdk/core", - "author": "Alchemy", - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "!vitest.config.ts", - "!.env", - "!dist/**/*.tsbuildinfo", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - }, - "./package.json": "./package.json" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "scripts": { - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest", - "test:run": "vitest run" - }, - "devDependencies": { - "@account-kit/smart-contracts": "^4.84.1", - "alchemy-sdk": "^3.0.0", - "dotenv": "^16.0.3", - "typescript-template": "*" - }, - "dependencies": { - "@aa-sdk/core": "^4.84.1", - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/contracts": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/providers": "^5.7.2", - "@ethersproject/wallet": "^5.7.0" - }, - "peerDependencies": { - "viem": "^2.45.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d" -} diff --git a/aa-sdk/ethers/src/__tests__/provider-adapter.test.ts b/aa-sdk/ethers/src/__tests__/provider-adapter.test.ts deleted file mode 100644 index a47b830a5a..0000000000 --- a/aa-sdk/ethers/src/__tests__/provider-adapter.test.ts +++ /dev/null @@ -1,70 +0,0 @@ -import dotenv from "dotenv"; - -import { createLightAccount } from "@account-kit/smart-contracts"; -import { Wallet } from "@ethersproject/wallet"; -import { Alchemy, Network, type AlchemyProvider } from "alchemy-sdk"; -import { createPublicClient, http, type Hex } from "viem"; -import { sepolia } from "viem/chains"; -import { EthersProviderAdapter } from "../../src/provider-adapter.js"; -import { convertWalletToAccountSigner } from "../utils.js"; -dotenv.config(); - -const endpoint = - process.env.VITEST_SEPOLIA_FORK_URL ?? - "https://ethereum-sepolia-rpc.publicnode.com"; - -describe("Simple Account Tests", async () => { - const alchemy = new Alchemy({ - apiKey: "test", - network: Network.ETH_SEPOLIA, - }); - // demo mnemonic from viem docs - const dummyMnemonic = - "legal winner thank year wave sausage worth useful legal winner thank yellow"; - const signer = Wallet.fromMnemonic(dummyMnemonic); - const alchemyProvider = await alchemy.config.getProvider(); - - it("should correctly sign the message", async () => { - const provider = await givenConnectedProvider({ alchemyProvider, signer }); - const message = "hello world"; - const signature = (await provider.signMessage(message)) as Hex; - - // We must use a public client, rather than an account client, to verify the message, because AA-SDK incorrectly attaches the account address as a "from" field to all actions taken by that client, including the `eth_call` used internally by viem's signature verifier logic. Per EIP-684, contract creation reverts on non-zero nonce, and the `eth_call`'s from field implicitly increases the nonce of the account contract, causing the contract creation to revert. - const publicClient = createPublicClient({ - chain: sepolia, - transport: http(`${endpoint}`), - }); - - expect( - await publicClient.verifyMessage({ - address: provider.account.address, - message, - signature, - // todo: This provider doesn't support signMessageWith6492, so we have to manually provider the factory data to the verifier. Add support here for 6492 signature generation. - factory: await provider.account.getFactoryAddress(), - factoryData: await provider.account.getFactoryData(), - }), - ).toBe(true); - }); -}); - -const givenConnectedProvider = async ({ - alchemyProvider, - signer, -}: { - alchemyProvider: AlchemyProvider; - signer: Wallet; -}) => { - const chain = sepolia; - - return EthersProviderAdapter.fromEthersProvider( - alchemyProvider, - chain, - ).connectToAccount( - await createLightAccount({ - chain, - signer: convertWalletToAccountSigner(signer), - transport: http(`${endpoint}`), - }), - ); -}; diff --git a/aa-sdk/ethers/src/account-signer.ts b/aa-sdk/ethers/src/account-signer.ts deleted file mode 100644 index d6882c4887..0000000000 --- a/aa-sdk/ethers/src/account-signer.ts +++ /dev/null @@ -1,288 +0,0 @@ -import { - AccountNotFoundError, - resolveProperties, - type BatchUserOperationCallData, - type BundlerClient, - type GetEntryPointFromAccount, - type SmartContractAccount, - type UserOperationCallData, - type UserOperationOverrides, -} from "@aa-sdk/core"; -import { Signer } from "@ethersproject/abstract-signer"; -import { hexlify } from "@ethersproject/bytes"; -import type { Deferrable } from "@ethersproject/properties"; -import { - type TransactionRequest, - type TransactionResponse, -} from "@ethersproject/providers"; -import { isHex, toBytes, type Transport } from "viem"; -import { EthersProviderAdapter } from "./provider-adapter.js"; - -const hexlifyOptional = (value: any): `0x${string}` | undefined => { - if (value == null) { - return undefined; - } - - return hexlify(value) as `0x${string}`; -}; - -/** - * Implementation of the ethers Signer interface to use with Smart Contract Accounts - */ -export class AccountSigner< - TAccount extends SmartContractAccount = SmartContractAccount, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> extends Signer { - readonly account: TAccount; - - sendUserOperation; - waitForUserOperationTransaction; - - /** - * Creates a new AccountSigner with the given ethers Provider and Smart Contract Account - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * import { http } from "viem"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter(); - * const signer = new AccountSigner(provider, account); - * ``` - * - * @template {SmartContractAccount} TAccount the type of the smart contract account - * @param {EthersProviderAdapter} provider the ethers provider to use - * @param {TAccount} account the smart contract account that will be used to sign user ops and send them - */ - constructor( - public provider: EthersProviderAdapter, - account: TAccount, - ) { - super(); - this.account = account; - - this.sendUserOperation = ( - args: UserOperationCallData | BatchUserOperationCallData, - overrides?: UserOperationOverrides, - ) => - this.provider.accountProvider.sendUserOperation({ - uo: args, - account, - overrides, - }); - - this.waitForUserOperationTransaction = - this.provider.accountProvider.waitForUserOperationTransaction.bind( - this.provider.accountProvider, - ); - } - - /** - * Returns the account address if the account exists. - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * import { http } from "viem"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter(); - * const signer = new AccountSigner(provider, account); - * - * const address = await signer.getAddress(); - * ``` - * - * @returns {Promise} a promise that resolves to the account address - * @throws {AccountNotFoundError} if the account is not found - */ async getAddress(): Promise { - if (!this.account) { - throw new AccountNotFoundError(); - } - - return this.account.address; - } - - /** - * Signs a message using the associated account. - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * import { http } from "viem"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter(); - * const signer = new AccountSigner(provider, account); - * - * const message = await signer.signMessage("hello"); - * ``` - * - * @param {string | Uint8Array} message the message to be signed - * @returns {Promise} a promise that resolves to the signed message - * @throws {AccountNotFoundError} if the account is not found - */ - signMessage(message: string | Uint8Array): Promise { - if (!this.account) { - throw new AccountNotFoundError(); - } - - return this.account.signMessage({ - message: - typeof message === "string" && !isHex(message) - ? message - : { raw: isHex(message) ? toBytes(message) : message }, - }); - } - - /** - * Sends a transaction using the account provider and returns the transaction response. - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * import { http } from "viem"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter(); - * const signer = new AccountSigner(provider, account); - * - * const tx = await signer.sendTransaction({ - * to: "0x1234567890123456789012345678901234567890", - * value: "0x0", - * data: "0x", - * }); - * ``` - * - * @param {Deferrable} transaction the transaction request to be sent - * @returns {Promise} a promise that resolves to the transaction response - * @throws {AccountNotFoundError} if the account is not found in the provider - */ - async sendTransaction( - transaction: Deferrable, - ): Promise { - if (!this.provider.accountProvider.account || !this.account) { - throw new AccountNotFoundError(); - } - - const resolved = await resolveProperties(transaction); - const txHash = await this.provider.accountProvider.sendTransaction({ - to: resolved.to as `0x${string}` | undefined, - data: hexlifyOptional(resolved.data), - chain: this.provider.accountProvider.chain, - account: this.account, - }); - - return this.provider.getTransaction(txHash); - } - - /** - * Throws an error indicating that transaction signing is not supported and advises to use `sendUserOperation` instead. - * - * @param {Deferrable} _transaction The transaction request - * @throws {Error} Will always throw an error indicating transaction signing is unsupported - */ - signTransaction( - _transaction: Deferrable, - ): Promise { - throw new Error( - "Transaction signing is not supported, use sendUserOperation instead", - ); - } - - /** - * Retrieves the BundlerClient instance from the provider. - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * import { http } from "viem"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter(); - * const signer = new AccountSigner(provider, account); - * - * const bundler = signer.getBundlerClient(); - * ``` - * - * @returns {BundlerClient} The BundlerClient instance - */ - getBundlerClient(): BundlerClient { - return this.provider.getBundlerClient(); - } - - /** - * Sets the provider for the account signer and returns the updated account signer instance. - * Note: this is not necessary since the Provider is required by the constructor. This is useful - * if you want to change the provider after the account signer has been created. - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * import { http } from "viem"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter(); - * const signer = new AccountSigner(provider, account); - * - * signer.connect(provider); - * ``` - * - * @param {EthersProviderAdapter} provider the provider to be set for the account signer - * @returns {AccountSigner} the updated account signer instance - */ - connect(provider: EthersProviderAdapter): AccountSigner { - this.provider = provider; - - return this; - } -} diff --git a/aa-sdk/ethers/src/index.ts b/aa-sdk/ethers/src/index.ts deleted file mode 100644 index bb7d418598..0000000000 --- a/aa-sdk/ethers/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { AccountSigner } from "./account-signer.js"; -export { EthersProviderAdapter } from "./provider-adapter.js"; -export { - convertEthersSignerToAccountSigner, - convertWalletToAccountSigner, -} from "./utils.js"; diff --git a/aa-sdk/ethers/src/provider-adapter.ts b/aa-sdk/ethers/src/provider-adapter.ts deleted file mode 100644 index 3eb8fb2569..0000000000 --- a/aa-sdk/ethers/src/provider-adapter.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { - createBundlerClientFromExisting, - createSmartAccountClient, - type BundlerClient, - type SmartAccountClient, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { JsonRpcProvider } from "@ethersproject/providers"; -import { - createPublicClient, - custom, - http, - type Chain, - type Transport, -} from "viem"; -import { AccountSigner } from "./account-signer.js"; -import type { EthersProviderAdapterOpts } from "./types.js"; - -/** Lightweight Adapter for SmtAccountProvider to enable Signer Creation */ -export class EthersProviderAdapter extends JsonRpcProvider { - readonly accountProvider: SmartAccountClient; - - /** - * Configures and initializes the account provider based on the given options. - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter({ - * account, - * chain: sepolia, - * rpcProvider: "https://eth-sepolia.g.alchemy.com/v2/your-api-key" - * }); - * ``` - * - * @param {EthersProviderAdapterOpts} opts The options for setting up the ethers provider adapter - */ - constructor(opts: EthersProviderAdapterOpts) { - super(); - if ("accountProvider" in opts) { - this.accountProvider = opts.accountProvider; - } else { - const { chain } = opts; - - if (typeof opts.rpcProvider === "string") { - this.accountProvider = createSmartAccountClient({ - transport: http(opts.rpcProvider), - chain, - account: opts.account, - }); - } else { - this.accountProvider = createSmartAccountClient({ - transport: custom(opts.rpcProvider.transport), - chain, - account: opts.account, - }); - } - } - } - - /** - * Rewrites the send method to use the account provider's EIP-1193 - * compliant request method - * - * @param {any} method - the RPC method to call - * @param {any[]} params - the params required by the RPC method - * @returns {Promise} the result of the RPC call - */ - send(method: any, params: any[]): Promise { - // @ts-expect-error - viem is strongly typed on the request methods, but ethers is not - return this.accountProvider.request({ method, params }); - } - - /** - * Connects the Provider to an Account and returns a Signer - * - * @param {SmartContractAccount} account - the account to connect to - * @returns {AccountSigner} an AccountSigner that can be used to sign and send user operations - */ - connectToAccount( - account: TAccount, - ): AccountSigner { - return new AccountSigner(this, account); - } - - /** - * Creates and returns a BundlerClient using the existing account provider's transport and chain. - * - * @example - * ```ts - * import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "@account-kit/infra"; - * import { createLightAccount } from "@account-kit/smart-contracts"; - * - * const account = await createLightAccount({ - * transport: http("https://rpc.testnet.aepps.com"), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * - * const provider = new EthersProviderAdapter({ - * account, - * chain: sepolia, - * rpcProvider: "https://eth-sepolia.g.alchemy.com/v2/your-api-key" - * }); - * - * const bundlerClient = provider.getBundlerClient(); - * ``` - * - * @returns {BundlerClient} A bundler client configured with the existing account provider. - */ - getBundlerClient(): BundlerClient { - return createBundlerClientFromExisting( - createPublicClient({ - transport: custom(this.accountProvider.transport), - chain: this.accountProvider.chain!, - }), - ); - } - - /** - * Creates an instance of EthersProviderAdapter from an ethers.js JsonRpcProvider. - * - * @param {JsonRpcProvider} provider the ethers JSON RPC provider to convert - * @param {Chain} chain the chain to connect to - * @returns {EthersProviderAdapter} an instance of EthersProviderAdapter - */ - static fromEthersProvider( - provider: JsonRpcProvider, - chain: Chain, - ): EthersProviderAdapter { - return new EthersProviderAdapter({ - rpcProvider: provider.connection.url, - chain, - }); - } -} diff --git a/aa-sdk/ethers/src/types.ts b/aa-sdk/ethers/src/types.ts deleted file mode 100644 index 0736e699e6..0000000000 --- a/aa-sdk/ethers/src/types.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - type BundlerClient, - type SmartAccountClient, - type SmartContractAccount, -} from "@aa-sdk/core"; -import type { Chain, Transport } from "viem"; - -export type EthersProviderAdapterOpts< - TTransport extends Transport = Transport, - TChain extends Chain = Chain, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { - account?: TAccount; -} & ( - | { - rpcProvider: string | BundlerClient; - chain: Chain; - } - | { - accountProvider: SmartAccountClient; - } -); diff --git a/aa-sdk/ethers/src/utils.ts b/aa-sdk/ethers/src/utils.ts deleted file mode 100644 index dffb254435..0000000000 --- a/aa-sdk/ethers/src/utils.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Address, SmartAccountSigner } from "@aa-sdk/core"; -import type { Signer } from "@ethersproject/abstract-signer"; -import { Wallet } from "@ethersproject/wallet"; -import type { SignableMessage, TypedData, TypedDataDefinition } from "viem"; - -/** - * Converts a ethersjs Wallet to a SmartAccountSigner - * - * @param {Wallet} wallet - the Wallet to convert - * @returns {SmartAccountSigner} a signer that can be used to sign and send user operations - */ -export const convertWalletToAccountSigner = ( - wallet: Wallet, -): SmartAccountSigner => { - return { - inner: wallet, - signerType: "local", - getAddress: async () => Promise.resolve(wallet.address as `0x${string}`), - signMessage: async (msg: SignableMessage) => - (await wallet.signMessage( - typeof msg === "string" ? msg : msg.raw, - )) as `0x${string}`, - signTypedData: async < - const TTypedData extends TypedData | { [key: string]: unknown }, - TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData, - >( - params: TypedDataDefinition, - ) => { - return (await wallet._signTypedData( - params.domain ?? {}, - // @ts-expect-error: these params should line up due to the spec for this function - params.types, - params.message, - )) as `0x${string}`; - }, - }; -}; - -/** - * Converts a ethers.js Signer to a SmartAccountSigner - * - * @param {Signer} signer - the Signer to convert - * @returns {SmartAccountSigner} a signer that can be used to sign and send user operations - */ -export const convertEthersSignerToAccountSigner = ( - signer: Signer, -): SmartAccountSigner => { - return { - inner: signer, - signerType: "json-rpc", - getAddress: async () => signer.getAddress() as Promise
, - signMessage: async (msg: SignableMessage) => - (await signer.signMessage( - typeof msg === "string" ? msg : msg.raw, - )) as `0x${string}`, - signTypedData: async < - const TTypedData extends TypedData | { [key: string]: unknown }, - TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData, - >( - _params: TypedDataDefinition, - ) => { - throw new Error( - "signTypedData is not supported for ethers signers; use Wallet", - ); - }, - }; -}; diff --git a/aa-sdk/ethers/tsconfig.build.json b/aa-sdk/ethers/tsconfig.build.json deleted file mode 100644 index 795defce57..0000000000 --- a/aa-sdk/ethers/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.e2e.test.ts", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "vitest.config.ts" - ], - "include": ["src"], - "compilerOptions": { - "sourceMap": true - } -} diff --git a/aa-sdk/ethers/tsconfig.json b/aa-sdk/ethers/tsconfig.json deleted file mode 100644 index 748018d6a6..0000000000 --- a/aa-sdk/ethers/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "typescript-template/base.json" -} diff --git a/aa-sdk/ethers/vitest.config.ts b/aa-sdk/ethers/vitest.config.ts deleted file mode 100644 index b2186de86a..0000000000 --- a/aa-sdk/ethers/vitest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "aa-sdk/ethers", - }, - }), -); diff --git a/account-kit/core/CHANGELOG.md b/account-kit/core/CHANGELOG.md deleted file mode 100644 index 70ba4fb020..0000000000 --- a/account-kit/core/CHANGELOG.md +++ /dev/null @@ -1,956 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/core - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/core - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/core - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/core - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/core - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/core - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/core - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/core - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/core - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/core - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/core - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/core - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -### Bug Fixes - -- session config expiration time should never be restored ([#2283](https://github.com/alchemyplatform/aa-sdk/issues/2283)) ([69999e6](https://github.com/alchemyplatform/aa-sdk/commit/69999e6295fe9588c73e9c5a9417f1c7df732f2f)) - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/core - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/core - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/core - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/core - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/core - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -### Features - -- allow global policy id w/ multiple chains ([#2194](https://github.com/alchemyplatform/aa-sdk/issues/2194)) ([dadeb20](https://github.com/alchemyplatform/aa-sdk/commit/dadeb205763691c190b9f63d012c42d7ea1e0535)) - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/core - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/core - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/core - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/core - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/core - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/core - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/core - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/core - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/core - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/core - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/core - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/core - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/core - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/core - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -### Bug Fixes - -- reduce rpc calls when using 7702 ([#2155](https://github.com/alchemyplatform/aa-sdk/issues/2155)) ([280ee4b](https://github.com/alchemyplatform/aa-sdk/commit/280ee4bc5f71a3f57492424df526f4313ad5afb1)) - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/core - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/core - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -### Bug Fixes - -- prevent useSmartWalletClient infinite render loop if address is specified while client loading ([#2146](https://github.com/alchemyplatform/aa-sdk/issues/2146)) ([6015e46](https://github.com/alchemyplatform/aa-sdk/commit/6015e4623617bc59a2795711de9b33a20b141de2)) - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/core - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @account-kit/core - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/core - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -### Bug Fixes - -- don't try to clear walletconnect data for react native ([#2061](https://github.com/alchemyplatform/aa-sdk/issues/2061)) ([75a0f66](https://github.com/alchemyplatform/aa-sdk/commit/75a0f66be65e03d5626a02678ed6f8e4036b0379)) - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/core - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/core - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/core - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/core - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -### Features - -- signer email/sms verification ([#1964](https://github.com/alchemyplatform/aa-sdk/issues/1964)) ([07d3bff](https://github.com/alchemyplatform/aa-sdk/commit/07d3bff1578c4f043c871da5edcab8feeb8cb105)) - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @account-kit/core - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/core - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -**Note:** Version bump only for package @account-kit/core - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/core - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/core - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/core - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -### Bug Fixes - -- initial store bug on first load ([#1903](https://github.com/alchemyplatform/aa-sdk/issues/1903)) ([2ef53e7](https://github.com/alchemyplatform/aa-sdk/commit/2ef53e721ca3755bb70e098860e3b683b433f9ab)) - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/core - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/core - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -### Features - -- update external wallet support to include Solana wallets ([#1847](https://github.com/alchemyplatform/aa-sdk/issues/1847)) ([7e33d35](https://github.com/alchemyplatform/aa-sdk/commit/7e33d35fdede8358d240fe919af54486f8b10edd)) - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -### Bug Fixes - -- use policyToken from config when getting smart acct client ([#1870](https://github.com/alchemyplatform/aa-sdk/issues/1870)) ([d7811ea](https://github.com/alchemyplatform/aa-sdk/commit/d7811ea14fa2b8fc57571e7dfcc04c3bb05ca0e9)) - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -**Note:** Version bump only for package @account-kit/core - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/core - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -### Features - -- sms auth beta ([#1835](https://github.com/alchemyplatform/aa-sdk/issues/1835)) ([b9eebf7](https://github.com/alchemyplatform/aa-sdk/commit/b9eebf7a935fa4666cf4b692692a4f14848994ac)) - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/core - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -### Bug Fixes - -- docspath param in errors ([#1830](https://github.com/alchemyplatform/aa-sdk/issues/1830)) ([2b4ec0a](https://github.com/alchemyplatform/aa-sdk/commit/2b4ec0a38e10b057098ad72c3982ec353f0e9b09)) - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/core - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/core - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/core - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -### Bug Fixes - -- add more fallbacks for chainAgnosticRpcUrl ([#1768](https://github.com/alchemyplatform/aa-sdk/issues/1768)) ([61e2dc1](https://github.com/alchemyplatform/aa-sdk/commit/61e2dc1d11f425eae2149a954451891b02f30c63)) - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/core - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -### Features - -- add initial smart wallet client actions ([#1648](https://github.com/alchemyplatform/aa-sdk/issues/1648)) ([a3d8ab2](https://github.com/alchemyplatform/aa-sdk/commit/a3d8ab2f698ca08f62d04423262b3497b46551af)), closes [#1649](https://github.com/alchemyplatform/aa-sdk/issues/1649) [#1733](https://github.com/alchemyplatform/aa-sdk/issues/1733) [#1742](https://github.com/alchemyplatform/aa-sdk/issues/1742) - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @account-kit/core - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/core - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -### Bug Fixes - -- unify maxTokenAmount as token value ([#1704](https://github.com/alchemyplatform/aa-sdk/issues/1704)) ([2c356a8](https://github.com/alchemyplatform/aa-sdk/commit/2c356a842d5a0d6286e13a52a087fc675dd62a6b)) - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/core - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/core - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @account-kit/core - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/core - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/core - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/core - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/core - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/core - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/core - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @account-kit/core - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/core - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/core - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @account-kit/core - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @account-kit/core - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/core - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Features - -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -### Bug Fixes - -- don't use unconfigured chain during hydration ([#1608](https://github.com/alchemyplatform/aa-sdk/issues/1608)) ([b31947d](https://github.com/alchemyplatform/aa-sdk/commit/b31947d1cf7f74c79b94377791ed5a4dfae27e4f)) - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/core - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/core - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -### Features - -- export create signer ([#1577](https://github.com/alchemyplatform/aa-sdk/issues/1577)) ([5325b31](https://github.com/alchemyplatform/aa-sdk/commit/5325b313ade16aecce6dc4a2d381a0e462dc0e38)) - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -### Features - -- move to use the alchemy store for web3 communication ([#1562](https://github.com/alchemyplatform/aa-sdk/issues/1562)) ([f86a815](https://github.com/alchemyplatform/aa-sdk/commit/f86a815412cb532de12a405b1cfb143da2e22b77)) - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/core - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/core - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/core - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/core - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @account-kit/core - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @account-kit/core - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @account-kit/core - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/core - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @account-kit/core - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -### Bug Fixes - -- only reconnect EOAs if they're cached as connected ([#1510](https://github.com/alchemyplatform/aa-sdk/issues/1510)) ([ab38864](https://github.com/alchemyplatform/aa-sdk/commit/ab38864c9cc9150734bbededdc1636c3ca991cfb)) - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @account-kit/core - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -### Bug Fixes - -- update setChain function to update the sdk state if the wallet is already on a chain ([#1503](https://github.com/alchemyplatform/aa-sdk/issues/1503)) ([76da7cb](https://github.com/alchemyplatform/aa-sdk/commit/76da7cbbf8e6a4fe9d1a72adeebdb3f017304255)) - -### Features - -- tracing added for imply and open telemetry ([#1424](https://github.com/alchemyplatform/aa-sdk/issues/1424)) ([1caf63b](https://github.com/alchemyplatform/aa-sdk/commit/1caf63bbe4150b7eb66ee7aef7ccf2e228336ba6)) - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @account-kit/core - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/core - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/core - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -**Note:** Version bump only for package @account-kit/core - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -**Note:** Version bump only for package @account-kit/core - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -### Bug Fixes - -- invalidate state if the local signer config changes ([#1435](https://github.com/alchemyplatform/aa-sdk/issues/1435)) ([9ad59f2](https://github.com/alchemyplatform/aa-sdk/commit/9ad59f2d6673bc6f587e6a57343b1486c92f382f)) - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/core - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/core - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -### Bug Fixes - -- add a check to migrate store versions ([#1420](https://github.com/alchemyplatform/aa-sdk/issues/1420)) ([0990240](https://github.com/alchemyplatform/aa-sdk/commit/099024047f9934b663d91517e1faf7fda9984562)) - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Features - -- add react-native core files ([#1402](https://github.com/alchemyplatform/aa-sdk/issues/1402)) ([060e1ab](https://github.com/alchemyplatform/aa-sdk/commit/060e1ab231db8455a71f25452e1a4cddace60dbd)) - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -### Bug Fixes - -- only reconnect accounts for active chain during rehydration ([#1356](https://github.com/alchemyplatform/aa-sdk/issues/1356)) ([95c6174](https://github.com/alchemyplatform/aa-sdk/commit/95c6174168047cedef1ea04182b7d7d2ceedc5ef)) - -### Features - -- add multi-policy sponsorships ([#1189](https://github.com/alchemyplatform/aa-sdk/issues/1189)) ([024d735](https://github.com/alchemyplatform/aa-sdk/commit/024d73545b03e8ce08485ef2f8252d6ed95e4521)) -- invalidate MAv2 account when switching mode ([#1384](https://github.com/alchemyplatform/aa-sdk/issues/1384)) ([c75826e](https://github.com/alchemyplatform/aa-sdk/commit/c75826e781fe6dd29c5a9202ca2a828d9c146578)) - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -### Features - -- session expiration improvements ([#1291](https://github.com/alchemyplatform/aa-sdk/issues/1291)) ([7cc7b33](https://github.com/alchemyplatform/aa-sdk/commit/7cc7b3371c2d8695ef0ccf34586d8f5079782953)) - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @account-kit/core - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -**Note:** Version bump only for package @account-kit/core - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -**Note:** Version bump only for package @account-kit/core - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -**Note:** Version bump only for package @account-kit/core - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -### Features - -- add email OTP support ([#1163](https://github.com/alchemyplatform/aa-sdk/issues/1163)) ([76720d9](https://github.com/alchemyplatform/aa-sdk/commit/76720d9b647d5e65a78726935520c41d94c1f6ff)) - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @account-kit/core - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @account-kit/core - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -### Bug Fixes - -- **wc:** wc connection should persist across refreshes ([#1162](https://github.com/alchemyplatform/aa-sdk/issues/1162)) ([a22f3d9](https://github.com/alchemyplatform/aa-sdk/commit/a22f3d92e5daaee46c6da7fe6a51488ea70f334f)) - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -### Bug Fixes - -- add check to ensure WC indexedDB store had been previously initialized on disconnect ([#1149](https://github.com/alchemyplatform/aa-sdk/issues/1149)) ([4377920](https://github.com/alchemyplatform/aa-sdk/commit/43779201f64e559e47e3f4e0f97670a13d520edf)) - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -### Features - -- oauth add passkey after signup (redirect flow) ([#1140](https://github.com/alchemyplatform/aa-sdk/issues/1140)) ([6d5e229](https://github.com/alchemyplatform/aa-sdk/commit/6d5e229e24402344b214df9689ca18d8f5954922)) - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -**Note:** Version bump only for package @account-kit/core - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -**Note:** Version bump only for package @account-kit/core - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -### Features - -- add custom error messages for chainId errors ([#1101](https://github.com/alchemyplatform/aa-sdk/issues/1101)) ([150525a](https://github.com/alchemyplatform/aa-sdk/commit/150525a9245d26029105509de51c175b61d6e4ab)) - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @account-kit/core - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -**Note:** Version bump only for package @account-kit/core - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -### Bug Fixes - -- issue causing recursive depth exception in react ([#1088](https://github.com/alchemyplatform/aa-sdk/issues/1088)) ([7b61fd6](https://github.com/alchemyplatform/aa-sdk/commit/7b61fd664daa256578c092e8feef6e4b1f25931d)) - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -### Bug Fixes - -- drop id token and claims from user object for now ([#1070](https://github.com/alchemyplatform/aa-sdk/issues/1070)) ([b45fa9f](https://github.com/alchemyplatform/aa-sdk/commit/b45fa9f844589284f8d46849e0265d04ca1f0b61)) - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -### Bug Fixes - -- **core:** hydrate wasn't properly handling logged out users ([#1046](https://github.com/alchemyplatform/aa-sdk/issues/1046)) ([987cf88](https://github.com/alchemyplatform/aa-sdk/commit/987cf88bc4cba351663fe3b04dcc12cc39ae93b4)) - -### Features - -- add google auth components and demo support (extension of linnas pr) ([#1032](https://github.com/alchemyplatform/aa-sdk/issues/1032)) ([cb91914](https://github.com/alchemyplatform/aa-sdk/commit/cb91914c8da0a7c3e7519bf98bc55d2848062e9f)), closes [#1024](https://github.com/alchemyplatform/aa-sdk/issues/1024) [#1035](https://github.com/alchemyplatform/aa-sdk/issues/1035) [#1036](https://github.com/alchemyplatform/aa-sdk/issues/1036) -- add logger schemas to infra, react, core ([65fac7d](https://github.com/alchemyplatform/aa-sdk/commit/65fac7dbf2c63232199607b801db49ee96294b41)) -- **demo:** persist the demo config across refreshes ([#1040](https://github.com/alchemyplatform/aa-sdk/issues/1040)) ([8ce8c36](https://github.com/alchemyplatform/aa-sdk/commit/8ce8c360676d7c2496ef86017f5c24b2d8671341)) -- log events from core package ([eab0ecd](https://github.com/alchemyplatform/aa-sdk/commit/eab0ecd7079b303bef15decca13f8ffac6eccea3)) - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -### Bug Fixes - -- persist login state across refreshes ([#1020](https://github.com/alchemyplatform/aa-sdk/issues/1020)) ([73214a0](https://github.com/alchemyplatform/aa-sdk/commit/73214a08e530197338375ecba85d7a683c6c0041)) - -### Features - -- enable specifying the domain that a session is available on (if storage supports it) ([#1022](https://github.com/alchemyplatform/aa-sdk/issues/1022)) ([90d859c](https://github.com/alchemyplatform/aa-sdk/commit/90d859cbcb6e9d9e2ff69794cced6da9a08697c4)) -- expose signer error messages ([#1019](https://github.com/alchemyplatform/aa-sdk/issues/1019)) ([998c75c](https://github.com/alchemyplatform/aa-sdk/commit/998c75c61fcd67741bb8d4e25221423441cdd1d6)) - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -### Bug Fixes - -- **ui-components:** ensure the passkey prompt always shows up when qp is present ([#978](https://github.com/alchemyplatform/aa-sdk/issues/978)) ([81f1580](https://github.com/alchemyplatform/aa-sdk/commit/81f15806e704bcffca6435eccb293923ff64d0e9)) - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -### Bug Fixes - -- don't ignore oauthCallbackUrl config option ([#971](https://github.com/alchemyplatform/aa-sdk/issues/971)) ([714da46](https://github.com/alchemyplatform/aa-sdk/commit/714da4652f1b55a763d77cc5a509c04054aab384)) - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -### Features - -- add support for social login ([#942](https://github.com/alchemyplatform/aa-sdk/issues/942)) ([aa00dc7](https://github.com/alchemyplatform/aa-sdk/commit/aa00dc7d880f6d9cf9ae29e63941a9552faa9dd5)) - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -### Bug Fixes - -- update store logic on merging and disconnect ([#948](https://github.com/alchemyplatform/aa-sdk/issues/948)) ([1ef808b](https://github.com/alchemyplatform/aa-sdk/commit/1ef808b247ca283b7528306620f4d1200c7c5d5f)) - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Bug Fixes - -- **core:** initial state parsing and disconnect logic ([#842](https://github.com/alchemyplatform/aa-sdk/issues/842)) ([d3e80ad](https://github.com/alchemyplatform/aa-sdk/commit/d3e80ad7ad8f3469a40bc741595719c57374e8b9)) -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([0d094e8](https://github.com/alchemyplatform/aa-sdk/commit/0d094e870c1a0ceb5f8d1c862f4109e32de46097)) -- demo app not building ([#733](https://github.com/alchemyplatform/aa-sdk/issues/733)) ([2bbf359](https://github.com/alchemyplatform/aa-sdk/commit/2bbf3598a882089ad78c36622cb73607d3737f91)) -- merge base into this ([e41b396](https://github.com/alchemyplatform/aa-sdk/commit/e41b396fdf331d2dd7d4e6b608b90dcab37f8386)) -- passing gas manager to createConfig should use it ([#836](https://github.com/alchemyplatform/aa-sdk/issues/836)) ([53b4e95](https://github.com/alchemyplatform/aa-sdk/commit/53b4e950c4aa153ba7c26d98acc2898591931cb9)) -- **ui-modal:** don't render ui modal if no ui config is passed in ([#943](https://github.com/alchemyplatform/aa-sdk/issues/943)) ([65b1584](https://github.com/alchemyplatform/aa-sdk/commit/65b1584c6f3bf5226bcf457d3736bda3543d6219)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([02f2f16](https://github.com/alchemyplatform/aa-sdk/commit/02f2f1623803480b8dc496491d2232c6fe5c219c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([55e6632](https://github.com/alchemyplatform/aa-sdk/commit/55e663208aae63e6092cbf2335c58f1448bd0dc3)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([85548c8](https://github.com/alchemyplatform/aa-sdk/commit/85548c86fe52262bfc761a5b3c0eb5d050bd8568)) -- enable linting class methods from exported classes ([1b87a51](https://github.com/alchemyplatform/aa-sdk/commit/1b87a51f5cafada625180b386e9b7e4e58f6e4d7)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([4be87d3](https://github.com/alchemyplatform/aa-sdk/commit/4be87d3147e1cdd70d2034479dcf0973c2820ea8)) -- make it easier to start with account-kit/core ([#933](https://github.com/alchemyplatform/aa-sdk/issues/933)) ([6d98643](https://github.com/alchemyplatform/aa-sdk/commit/6d9864334f3c8e98ddb2f5885dbc705dc78587ba)) -- **react:** enable multi-owner la usage in core and react ([#893](https://github.com/alchemyplatform/aa-sdk/issues/893)) ([43464da](https://github.com/alchemyplatform/aa-sdk/commit/43464daf59e6b653a5332662c4098cb2174f65d3)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([593e84c](https://github.com/alchemyplatform/aa-sdk/commit/593e84c027a697b757e3fd954564ff40cd1e11b0)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -### Features - -- make it easier to start with account-kit/core ([#933](https://github.com/alchemyplatform/aa-sdk/issues/933)) ([b5714b6](https://github.com/alchemyplatform/aa-sdk/commit/b5714b6be15a4d7cb41c45911ca3cb42482aa85f)) - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Bug Fixes - -- **core:** initial state parsing and disconnect logic ([#842](https://github.com/alchemyplatform/aa-sdk/issues/842)) ([373ad81](https://github.com/alchemyplatform/aa-sdk/commit/373ad81b099fd2a75a8b6207b754c1b6d8fe521e)) -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([0d09472](https://github.com/alchemyplatform/aa-sdk/commit/0d09472d5cf4a32864272a4f524d630f50a4a1ab)) -- demo app not building ([#733](https://github.com/alchemyplatform/aa-sdk/issues/733)) ([9f77a54](https://github.com/alchemyplatform/aa-sdk/commit/9f77a54777d0e355331fdfa14e235af781f25750)) -- merge base into this ([f9a6b2d](https://github.com/alchemyplatform/aa-sdk/commit/f9a6b2d801b909146c0e10bb072369992163ea69)) -- passing gas manager to createConfig should use it ([#836](https://github.com/alchemyplatform/aa-sdk/issues/836)) ([f2c9723](https://github.com/alchemyplatform/aa-sdk/commit/f2c972303906ecd977fae891c688eedef81e5420)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([b643981](https://github.com/alchemyplatform/aa-sdk/commit/b643981e900d9cabf6e273b5f7e9e75cd0c32c7d)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cb9d92](https://github.com/alchemyplatform/aa-sdk/commit/9cb9d9283db899d5a2f632767993c04135eb1de8)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([0a5a4ae](https://github.com/alchemyplatform/aa-sdk/commit/0a5a4ae7cc6914b05d471d010a161c7a8a8f303b)) -- enable linting class methods from exported classes ([4968d83](https://github.com/alchemyplatform/aa-sdk/commit/4968d838e903218d255bff0610babebd37c13413)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([4e645e9](https://github.com/alchemyplatform/aa-sdk/commit/4e645e97a745bfdd11d6174cb32c7f2eb556f803)) -- **react:** enable multi-owner la usage in core and react ([#893](https://github.com/alchemyplatform/aa-sdk/issues/893)) ([6d1bfc5](https://github.com/alchemyplatform/aa-sdk/commit/6d1bfc5ffde1a9ba814c06983939994ccceaa9f6)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([45582b1](https://github.com/alchemyplatform/aa-sdk/commit/45582b14e7116903f9b91cdd4bf2bb04de14ffa4)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Bug Fixes - -- **core:** initial state parsing and disconnect logic ([#842](https://github.com/alchemyplatform/aa-sdk/issues/842)) ([1f1047b](https://github.com/alchemyplatform/aa-sdk/commit/1f1047b4201c976fa8abaed76f8949163afb085b)) -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([190e25f](https://github.com/alchemyplatform/aa-sdk/commit/190e25f55e30c8555863601f471e24f0a5122926)) -- demo app not building ([#733](https://github.com/alchemyplatform/aa-sdk/issues/733)) ([0dd262e](https://github.com/alchemyplatform/aa-sdk/commit/0dd262e06e9fafffdb7af36cf36a952045d6a6ad)) -- merge base into this ([1409772](https://github.com/alchemyplatform/aa-sdk/commit/140977220c6e9cd32820a64e573c2d8070e9b603)) -- passing gas manager to createConfig should use it ([#836](https://github.com/alchemyplatform/aa-sdk/issues/836)) ([b8fce22](https://github.com/alchemyplatform/aa-sdk/commit/b8fce22a281d700f502f2063fb016726c6d34d6b)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([8ef751e](https://github.com/alchemyplatform/aa-sdk/commit/8ef751eab7a2357caaa6d5d63cbc1907e90c39cb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cf1b77](https://github.com/alchemyplatform/aa-sdk/commit/9cf1b77e2ac738996af258e38879173184805a1c)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([cffda84](https://github.com/alchemyplatform/aa-sdk/commit/cffda8493deaf7cb29d4f93d40aa88cd63eb5b75)) -- enable linting class methods from exported classes ([2ee9eb9](https://github.com/alchemyplatform/aa-sdk/commit/2ee9eb979e1c079ae68a76e9156d6e143c0ce909)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([0020257](https://github.com/alchemyplatform/aa-sdk/commit/002025791b57b6aa3f5efd9858593ccb25918d97)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c550465](https://github.com/alchemyplatform/aa-sdk/commit/c55046525d790001db4a9a305cade6f0d06ca90b)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -### Bug Fixes - -- **core:** initial state parsing and disconnect logic ([#842](https://github.com/alchemyplatform/aa-sdk/issues/842)) ([2db4965](https://github.com/alchemyplatform/aa-sdk/commit/2db49655b3b9c5bf2bb434e516f743ddbdd5a3b4)) - -### Features - -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([62e2b59](https://github.com/alchemyplatform/aa-sdk/commit/62e2b59579e44f1825ae8224fb182aebd3c4f7e0)) - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([56af31e](https://github.com/alchemyplatform/aa-sdk/commit/56af31eb8580783d884a21d5b8d8d8a1420e1742)) -- demo app not building ([#733](https://github.com/alchemyplatform/aa-sdk/issues/733)) ([90af8cd](https://github.com/alchemyplatform/aa-sdk/commit/90af8cd211544f3f20c749d6ac144c668376c65c)) -- merge base into this ([ea9ce2c](https://github.com/alchemyplatform/aa-sdk/commit/ea9ce2cabc407eec69aebe459446630142108f06)) -- passing gas manager to createConfig should use it ([#836](https://github.com/alchemyplatform/aa-sdk/issues/836)) ([86e6116](https://github.com/alchemyplatform/aa-sdk/commit/86e611609ccdc780d9f3c63f1b8317f057ad2f4d)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([3060a05](https://github.com/alchemyplatform/aa-sdk/commit/3060a05e895e6d6fef363276665f0d3d06c161fb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([22b8183](https://github.com/alchemyplatform/aa-sdk/commit/22b8183ae297648d43594f59578163da6b0ae9bc)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([eb87340](https://github.com/alchemyplatform/aa-sdk/commit/eb8734031b0b8132b7d1e7d19f7b57dfeda920c3)) -- enable linting class methods from exported classes ([20df68e](https://github.com/alchemyplatform/aa-sdk/commit/20df68ecc722ee4c87b75f1880debe4591be5bb5)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([637bb95](https://github.com/alchemyplatform/aa-sdk/commit/637bb953d59bfd931652286dfc73497b0e0e288f)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -**Note:** Version bump only for package @account-kit/core - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([2adddf9](https://github.com/alchemyplatform/aa-sdk/commit/2adddf93775370498cd60e21fccb21f03aa29544)) - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Bug Fixes - -- demo app not building ([#733](https://github.com/alchemyplatform/aa-sdk/issues/733)) ([e845341](https://github.com/alchemyplatform/aa-sdk/commit/e8453410547d5dff492c3f44f898029cc0853eb8)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([0601453](https://github.com/alchemyplatform/aa-sdk/commit/060145386572026905f5720866722c5a20c9d7db)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([b2b7cc6](https://github.com/alchemyplatform/aa-sdk/commit/b2b7cc680860f3d416d11b66d626e715fae4cf8b)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([4c0b2f1](https://github.com/alchemyplatform/aa-sdk/commit/4c0b2f19a59272940b3fe40c610c06ad8c49d70e)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Bug Fixes - -- demo app not building ([#733](https://github.com/alchemyplatform/aa-sdk/issues/733)) ([b2c229c](https://github.com/alchemyplatform/aa-sdk/commit/b2c229c145b30c42b97a244a94b3b4fc605f93cf)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([9d81aaf](https://github.com/alchemyplatform/aa-sdk/commit/9d81aafe89b2dc49e2ab2c44556c81c3010c1fa2)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([c92a07f](https://github.com/alchemyplatform/aa-sdk/commit/c92a07fdb39d652fe5c95326d47a929b3b3278ed)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([082d363](https://github.com/alchemyplatform/aa-sdk/commit/082d363923684ae3bc45edf544c8536ff3c42379)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Bug Fixes - -- demo app not building ([#733](https://github.com/alchemyplatform/aa-sdk/issues/733)) ([6afff79](https://github.com/alchemyplatform/aa-sdk/commit/6afff7976153a5bf07187fc0506eec65bbe4c6e4)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([d2f97c5](https://github.com/alchemyplatform/aa-sdk/commit/d2f97c56fdf63871296dd81b10cbc60b61b34d6c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([6c41e22](https://github.com/alchemyplatform/aa-sdk/commit/6c41e22233932ee98c6214f2ffdf3e8f928f880f)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c5465ee](https://github.com/alchemyplatform/aa-sdk/commit/c5465eee5c957afcb02d3e0d82c5821dd7819b5f)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages diff --git a/account-kit/core/package.json b/account-kit/core/package.json deleted file mode 100644 index 79e2e8cd70..0000000000 --- a/account-kit/core/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "@account-kit/core", - "version": "4.84.1", - "description": "Core library for account kit that provides state management and framework indepednent abstractions across infra, Alchemy Signer, and Smart Contracts", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - }, - "./web": { - "types": "./dist/types/environments/web/index.d.ts", - "import": "./dist/esm/environments/web/index.js", - "default": "./dist/esm/environments/web/index.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest --passWithNoTests", - "test:run": "vitest run --passWithNoTests" - }, - "devDependencies": { - "@types/js-cookie": "^3.0.6", - "typescript-template": "*" - }, - "dependencies": { - "@account-kit/infra": "^4.84.1", - "@account-kit/logging": "^4.84.1", - "@account-kit/react-native-signer": "^4.84.1", - "@account-kit/signer": "^4.84.1", - "@account-kit/smart-contracts": "^4.84.1", - "@account-kit/wallet-client": "^4.84.1", - "@solana/web3.js": "^1.98.0", - "js-cookie": "^3.0.5", - "zod": "^3.22.4", - "zustand": "^5.0.0-rc.2" - }, - "peerDependencies": { - "viem": "^2.45.0", - "wagmi": "^2.15.5" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d", - "optionalDependencies": { - "alchemy-sdk": "^3.0.0" - } -} diff --git a/account-kit/core/setupTests.ts b/account-kit/core/setupTests.ts deleted file mode 100644 index 051d7691a0..0000000000 --- a/account-kit/core/setupTests.ts +++ /dev/null @@ -1,3 +0,0 @@ -beforeEach(() => { - localStorage.clear(); -}); diff --git a/account-kit/core/src/actions/createAccount.ts b/account-kit/core/src/actions/createAccount.ts deleted file mode 100644 index 4d0cf1579f..0000000000 --- a/account-kit/core/src/actions/createAccount.ts +++ /dev/null @@ -1,263 +0,0 @@ -import { - type CreateLightAccountParams, - type CreateModularAccountV2Params, - type CreateMultiOwnerLightAccountParams, - type CreateMultiOwnerModularAccountParams, - type LightAccountVersion, -} from "@account-kit/smart-contracts"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import { toHex, type Transport } from "viem"; -import { ClientOnlyPropertyError, SignerNotConnectedError } from "../errors.js"; -import { getSmartWalletClient } from "./getSmartWalletClient.js"; -import { CoreLogger } from "../metrics.js"; -import type { - AlchemyAccountsConfig, - AlchemySigner, - SupportedAccountTypes, - SupportedAccounts, -} from "../types.js"; -import type { GetAccountParams } from "./getAccount"; -import { getConnection } from "./getConnection.js"; -import { getSigner } from "./getSigner.js"; -import { getSignerStatus } from "./getSignerStatus.js"; - -type OmitSignerTransportChain = T extends infer U - ? Omit - : never; - -export type AccountConfig = - TAccount extends "LightAccount" - ? OmitSignerTransportChain< - CreateLightAccountParams< - Transport, - AlchemySigner, - LightAccountVersion<"LightAccount"> - > - > - : TAccount extends "MultiOwnerLightAccount" - ? OmitSignerTransportChain< - CreateMultiOwnerLightAccountParams< - Transport, - AlchemySigner, - LightAccountVersion<"MultiOwnerLightAccount"> - > - > - : TAccount extends "MultiOwnerModularAccount" - ? OmitSignerTransportChain< - CreateMultiOwnerModularAccountParams - > - : TAccount extends "ModularAccountV2" - ? OmitSignerTransportChain< - CreateModularAccountV2Params - > - : never; - -export type CreateAccountParams = { - type: TAccount; - accountParams?: AccountConfig; -}; - -/** - * Creates an account of a specified type using the provided parameters and configuration. Supports creating LightAccount and MultiOwnerModularAccount types. - * - * @example - * ```ts - * import { createAccount } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * const account = createAccount({ - * type: "LightAccount", - * }, config); - * ``` - * - * @param {CreateAccountParams} params The parameters required to create the account, including the type and account parameters - * @param {AlchemyAccountsConfig} config The configuration object for Alchemy accounts - * @returns {Promise} A promise that resolves to the created account object - */ -export async function createAccount( - params: CreateAccountParams, - config: AlchemyAccountsConfig, -): Promise { - const store = config.store; - const accounts = store.getState().accounts; - if (!accounts) { - throw new ClientOnlyPropertyError("account"); - } - - const connection = getConnection(config); - const chain = connection.chain; - const signer = getSigner(config); - const signerStatus = getSignerStatus(config); - - if (!signerStatus.isConnected || !signer) { - throw new SignerNotConnectedError(); - } - const smartWalletClient = getSmartWalletClient(config); - if (!smartWalletClient) { - throw new Error("Smart wallet client not found"); - } - - const cachedAccount = accounts[chain.id]?.[params.type]; - if (cachedAccount.status !== "RECONNECTING" && cachedAccount.account) { - return cachedAccount.account; - } - - const accountPromise = smartWalletClient - .requestAccount({ - accountAddress: params.accountParams?.accountAddress, - creationHint: convertAccountParamsToCreationHint(params), - }) - .then((account) => { - CoreLogger.trackEvent({ - name: "account_initialized", - data: { - accountType: params.type, - accountVersion: isLightAccountParams(params) - ? (params.accountParams?.version ?? "v2.0.0") - : isMultiOwnerLightAccountParams(params) - ? "v2.0.0" - : isMultiOwnerModularAccountParams(params) - ? "v1.0.0" - : "v2.0.0", - }, - }); - return account as SupportedAccounts; - }); - - if (cachedAccount.status !== "RECONNECTING") { - store.setState((state) => ({ - accounts: { - ...accounts, - [chain.id]: { - ...accounts[chain.id], - [params.type]: { - status: "INITIALIZING", - account: accountPromise, - }, - }, - }, - accountConfigs: { - ...state.accountConfigs, - [chain.id]: { - ...state.accountConfigs[chain.id], - [params.type]: { - ...params.accountParams, - }, - }, - }, - })); - } - - try { - const account = await accountPromise; - const initCode = await account.getInitCode(); - store.setState((state) => ({ - accounts: { - ...accounts, - [chain.id]: { - ...accounts[chain.id], - [params.type]: { - status: "READY", - account, - }, - }, - }, - accountConfigs: { - ...state.accountConfigs, - [chain.id]: { - ...state.accountConfigs[chain.id], - [params.type]: { - ...params.accountParams, - accountAddress: account.address, - initCode, - }, - }, - }, - })); - } catch (error) { - store.setState(() => ({ - accounts: { - ...accounts, - [chain.id]: { - ...accounts[chain.id], - [params.type]: { - status: "ERROR", - error, - }, - }, - }, - })); - } - - return accountPromise; -} - -function convertAccountParamsToCreationHint< - TAccount extends SupportedAccountTypes, ->( - params: CreateAccountParams, -): NonNullable< - Parameters["0"] ->["creationHint"] { - if (isModularV2AccountParams(params)) { - return params.accountParams?.mode === "7702" - ? { accountType: "7702" } - : { - accountType: "sma-b", - salt: toHex(params.accountParams?.salt ?? 0n), - createAdditional: true, - }; - } - if (isLightAccountParams(params)) { - return { - accountType: `la-${params.accountParams?.version === "v2.0.0" ? "v2" : (params.accountParams?.version ?? "v2")}`, - salt: toHex(params.accountParams?.salt ?? 0n), - createAdditional: true, - }; - } - - if (isMultiOwnerLightAccountParams(params)) { - return { - accountType: `la-v2-multi-owner`, - salt: toHex(params.accountParams?.salt ?? 0n), - initialOwners: params.accountParams?.owners, - createAdditional: true, - }; - } - - if (isMultiOwnerModularAccountParams(params)) { - return { - accountType: "ma-v1-multi-owner", - salt: toHex(params.accountParams?.salt ?? 0n), - initialOwners: params.accountParams?.owners, - createAdditional: true, - }; - } - - throw new Error(`account of type ${params.type} not supported yet`); -} - -export const isModularV2AccountParams = ( - params: CreateAccountParams, -): params is GetAccountParams<"ModularAccountV2"> => { - return params.type === "ModularAccountV2"; -}; - -export const isLightAccountParams = ( - params: CreateAccountParams, -): params is GetAccountParams<"LightAccount"> => { - return params.type === "LightAccount"; -}; - -export const isMultiOwnerLightAccountParams = ( - params: CreateAccountParams, -): params is GetAccountParams<"MultiOwnerLightAccount"> => { - return params.type === "MultiOwnerLightAccount"; -}; - -export const isMultiOwnerModularAccountParams = ( - params: CreateAccountParams, -): params is GetAccountParams<"MultiOwnerModularAccount"> => { - return params.type === "MultiOwnerModularAccount"; -}; diff --git a/account-kit/core/src/actions/disconnect.ts b/account-kit/core/src/actions/disconnect.ts deleted file mode 100644 index fe0fd88541..0000000000 --- a/account-kit/core/src/actions/disconnect.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { AlchemySignerStatus } from "@account-kit/signer"; -import { disconnect as wagmi_disconnect } from "@wagmi/core"; -import { convertSignerStatusToState } from "../store/store.js"; -import type { AlchemyAccountsConfig } from "../types"; -import { getSigner } from "./getSigner.js"; - -/** - * Disconnects the current signer, accounts, and clears the store. - * - * @example - * ```ts - * import { disconnect, createConfig } from "@account-kit/core"; - * import { sepolia } from "@account-kit/infra"; - * - * const config = createConfig({ - * chain: sepolia, - * apiKey: "your-api-key", - * }); - * - * await disconnect(config); - * ``` - * - * @param {AlchemyAccountsConfig} config The configuration containing the store to be cleared - */ -export async function disconnect(config: AlchemyAccountsConfig): Promise { - const signer = getSigner(config); - await wagmi_disconnect(config._internal.wagmiConfig); - await signer?.disconnect(); - - config.store.persist.clearStorage(); - - // Clear Wallet Connect store - clearWalletConnectStore(); - - config.store.setState(() => config.store.getInitialState()); - - config.store.setState((state) => ({ - signerStatus: convertSignerStatusToState( - AlchemySignerStatus.DISCONNECTED, - state.signerStatus.error, - ), - })); -} - -// Function to clear the Wallet Connect store to prevent -// Persistence of Wallet Connect connection state on error. -const clearWalletConnectStore = () => { - if ( - typeof window === "undefined" || - // indexedDB is not available + wallet connect is not used in react native - typeof window.indexedDB === "undefined" - ) { - return; - } - - // Open Wallet Connect Indexed DB - let walletConnectDBExists = true; - const dbOpenRequest = window.indexedDB.open("WALLET_CONNECT_V2_INDEXED_DB"); - - dbOpenRequest.onupgradeneeded = () => { - if (dbOpenRequest.result.version === 1) { - walletConnectDBExists = false; - - // Remove the Database created from the indexedDB.open() call above. - window.indexedDB.deleteDatabase("WALLET_CONNECT_V2_INDEXED_DB"); - } - }; - - dbOpenRequest.onsuccess = () => { - if (!walletConnectDBExists) return; - - try { - const db = dbOpenRequest.result; - - const txn = db.transaction(["keyvaluestorage"], "readwrite"); - - const store = txn.objectStore("keyvaluestorage"); - - // Clear Store - store.clear(); - } catch (error) { - console.error( - "Error clearing Wallet Connect DB. Cannot clear store.", - error, - ); - } - }; - - dbOpenRequest.onerror = () => { - console.error("Error opening Wallet Connect DB. Cannot clear store."); - }; -}; diff --git a/account-kit/core/src/actions/getAccount.ts b/account-kit/core/src/actions/getAccount.ts deleted file mode 100644 index d0e26b1ce9..0000000000 --- a/account-kit/core/src/actions/getAccount.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { defaultAccountState } from "../store/store.js"; -import type { AccountState } from "../store/types.js"; -import type { AlchemyAccountsConfig, SupportedAccountTypes } from "../types.js"; -import { - isModularV2AccountParams, - type CreateAccountParams, -} from "./createAccount.js"; -import { getChain } from "./getChain.js"; - -export type GetAccountResult = - AccountState; - -export type GetAccountParams = - CreateAccountParams; - -/** - * Retrieves the account of the specified type from the client store based on the provided configuration. - * - * @example - * ```ts - * import { getAccount } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * const { account, status } = getAccount({ - * type: "LightAccount" - * }, config) - * ``` - * - * @param {GetAccountParams} params The parameters containing the type of the account to retrieve - * @param {AlchemyAccountsConfig} config The configuration containing the client store - * @returns {GetAccountResult} The result which includes the account if found and its status - */ -export const getAccount = ( - params: GetAccountParams, - config: AlchemyAccountsConfig, -): GetAccountResult => { - const accounts = config.store.getState().accounts; - const chain = getChain(config); - const account = accounts?.[chain.id]?.[params.type]; - if (!account) { - return defaultAccountState(); - } - - if (isModularV2AccountParams(params) && account?.status === "READY") { - const accountConfig = - config.store.getState().accountConfigs[chain.id]?.[params.type]; - const haveMode = accountConfig?.mode ?? "default"; - const wantMode = params.accountParams?.mode ?? "default"; - if (haveMode !== wantMode) { - return defaultAccountState(); - } - } - - return account; -}; diff --git a/account-kit/core/src/actions/getAlchemyTransport.ts b/account-kit/core/src/actions/getAlchemyTransport.ts deleted file mode 100644 index 10b6e69ca4..0000000000 --- a/account-kit/core/src/actions/getAlchemyTransport.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { alchemy, type AlchemyTransport } from "@account-kit/infra"; -import { ChainNotFoundError } from "../errors.js"; -import { type AlchemyAccountsConfig } from "../types.js"; - -export function getAlchemyTransport( - config: AlchemyAccountsConfig, -): AlchemyTransport { - const { chain, connections } = config.store.getState(); - if (!connections.has(chain.id)) { - throw new ChainNotFoundError(chain); - } - const connection = connections.get(chain.id)!; - - return alchemy(connection.transport); -} diff --git a/account-kit/core/src/actions/getBundlerClient.ts b/account-kit/core/src/actions/getBundlerClient.ts deleted file mode 100644 index 91b611ba63..0000000000 --- a/account-kit/core/src/actions/getBundlerClient.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { type ClientWithAlchemyMethods } from "@account-kit/infra"; -import type { AlchemyAccountsConfig } from "../types"; - -/** - * Retrieves the BundlerClient from the core store of the given AlchemyAccountsConfig. - * - * @example - * ```ts - * // see `createConfig` for more information on how to create a config - * import { config } from "./config"; - * - * const bundlerClient = getBundlerClient(config); - * ``` - * - * @param {AlchemyAccountsConfig} config The configuration object containing the core store. - * @returns {ClientWithAlchemyMethods} The BundlerClient from the core store. - */ -export const getBundlerClient = ( - config: AlchemyAccountsConfig, -): ClientWithAlchemyMethods => { - const { bundlerClient } = config.store.getState(); - - return bundlerClient; -}; diff --git a/account-kit/core/src/actions/getChain.ts b/account-kit/core/src/actions/getChain.ts deleted file mode 100644 index eff42fafe9..0000000000 --- a/account-kit/core/src/actions/getChain.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Chain } from "viem"; -import type { AlchemyAccountsConfig } from "../types"; - -/** - * Gets the currently active chain - * - * @param {AlchemyAccountsConfig} config the account config object - * @returns {Chain} the currently active chain - */ -export function getChain(config: AlchemyAccountsConfig): Chain { - return config.store.getState().chain; -} diff --git a/account-kit/core/src/actions/getConnection.ts b/account-kit/core/src/actions/getConnection.ts deleted file mode 100644 index 59c2a4ae50..0000000000 --- a/account-kit/core/src/actions/getConnection.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ChainNotFoundError } from "../errors.js"; -import { type AlchemyAccountsConfig, type Connection } from "../types.js"; -import { getChain } from "./getChain.js"; - -/** - * Used to get the connection for the currently active chain - * - * @example - * ```ts - * import { getConnection } from "@account-kit/core"; - * import { config } from "./config"; - * - * const connection = getConnection(config); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config - * @returns {Connection} a connection object for the current active chain - */ -export function getConnection(config: AlchemyAccountsConfig): Connection { - const chain = getChain(config); - const connection = config.store.getState().connections.get(chain.id); - if (!connection) { - throw new ChainNotFoundError(chain); - } - - return connection; -} diff --git a/account-kit/core/src/actions/getSigner.ts b/account-kit/core/src/actions/getSigner.ts deleted file mode 100644 index 9619bd8b40..0000000000 --- a/account-kit/core/src/actions/getSigner.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { AlchemyAccountsConfig, AlchemySigner } from "../types.js"; - -/** - * If there is a signer attached to the client state, it will return it. - * The signer should always be null on the server, and will be set on the client - * if the store was properly hydrated. - * - * @example - * ```ts - * import { getSigner } from "@account-kit/core"; - * import { config } from "./config"; - * - * const signer = getSigner(config); - * ``` - * - * @param {AlchemyAccountsConfig} config The account config which contains the client store - * @returns {AlchemySigner | null} the instance of the signer present in the store if it exists, otherwise null - */ -export const getSigner = ( - config: AlchemyAccountsConfig, -): T | null => { - const signer: T | null = config.store.getState().signer as T | null; - - return signer; -}; diff --git a/account-kit/core/src/actions/getSignerStatus.ts b/account-kit/core/src/actions/getSignerStatus.ts deleted file mode 100644 index fd156b8b8a..0000000000 --- a/account-kit/core/src/actions/getSignerStatus.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { AlchemyAccountsConfig } from "../types"; - -/** - * Retrieves the signer status from the client's store in the provided configuration. - * - * @example - * ```ts - * import { getSignerStatus } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * const signerStatus = getSignerStatus(config); - * ``` - * - * @param {AlchemyAccountsConfig} config The configuration object containing the client store - * @returns {SignerStatus} The current signer status from the client store - */ -export const getSignerStatus = (config: AlchemyAccountsConfig) => { - return config.store.getState().signerStatus; -}; diff --git a/account-kit/core/src/actions/getSmartAccountClient.ts b/account-kit/core/src/actions/getSmartAccountClient.ts deleted file mode 100644 index fbeed1bb7c..0000000000 --- a/account-kit/core/src/actions/getSmartAccountClient.ts +++ /dev/null @@ -1,299 +0,0 @@ -import { - createAlchemySmartAccountClient, - type AlchemySmartAccountClient, - type AlchemySmartAccountClientConfig, -} from "@account-kit/infra"; -import { - accountLoupeActions, - lightAccountClientActions, - multiOwnerLightAccountClientActions, - multiOwnerPluginActions, - pluginManagerActions, - type AccountLoupeActions, - type LightAccount, - type LightAccountClientActions, - type ModularAccountV2, - type MultiOwnerLightAccount, - type MultiOwnerLightAccountClientActions, - type MultiOwnerModularAccount, - type MultiOwnerPluginActions, - type PluginManagerActions, -} from "@account-kit/smart-contracts"; -import type { Address, Chain } from "viem"; -import type { - AlchemyAccountsConfig, - AlchemySigner, - Connection, - SupportedAccount, - SupportedAccounts, - SupportedAccountTypes, -} from "../types"; -import { createAccount } from "./createAccount.js"; -import { getAccount, type GetAccountParams } from "./getAccount.js"; -import { getAlchemyTransport } from "./getAlchemyTransport.js"; -import { getConnection } from "./getConnection.js"; -import { getSignerStatus } from "./getSignerStatus.js"; - -export type GetSmartAccountClientParams< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SupportedAccountTypes = SupportedAccountTypes, -> = Omit< - AlchemySmartAccountClientConfig>, - "transport" | "account" | "chain" -> & - GetAccountParams; - -export type ClientActions< - TAccount extends SupportedAccounts = SupportedAccounts, -> = TAccount extends LightAccount - ? LightAccountClientActions - : TAccount extends MultiOwnerModularAccount - ? MultiOwnerPluginActions> & - PluginManagerActions> & - AccountLoupeActions> - : TAccount extends MultiOwnerLightAccount - ? MultiOwnerLightAccountClientActions - : TAccount extends ModularAccountV2 - ? {} // no ma v2 actions - : never; - -export type GetSmartAccountClientResult< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SupportedAccounts = SupportedAccounts, -> = { - client?: AlchemySmartAccountClient>; - address?: Address; - isLoadingClient: boolean; - error?: Error; -}; - -export function getSmartAccountClient< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SupportedAccountTypes = SupportedAccountTypes, ->( - params: GetSmartAccountClientParams, - config: AlchemyAccountsConfig, -): GetSmartAccountClientResult>; - -/** - * Obtains a smart account client based on the provided parameters and configuration. Supports creating any of the SupportAccountTypes in Account Kit. - * If the signer is not connected, or an account is already being intializes, this results in a loading state. - * - * @deprecated Use `getSmartWalletClient` instead. - * - * @example - * ```ts - * import { getSmartAccountClient } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * const { client, address, isLoadingClient } = getSmartAccountClient({ - * type: "LightAccount", - * }, config); - * ``` - * - * @param {GetSmartAccountClientParams} params Parameters for getting the smart account client, including account parameters and client parameters - * @param {AlchemyAccountsConfig} config The configuration containing the client store and other necessary information - * @returns {GetSmartAccountClientResult} The result object which includes the client, address, and loading status of the client - */ -export function getSmartAccountClient( - params: GetSmartAccountClientParams, - config: AlchemyAccountsConfig, -): GetSmartAccountClientResult { - const { accountParams, type, ...clientParams } = params; - const { account, status, error } = getAccount( - { - type, - accountParams, - }, - config, - ); - const signerStatus = getSignerStatus(config); - const transport = getAlchemyTransport(config); - const connection = getConnection(config); - const clientState = - config.store.getState().smartAccountClients[connection.chain.id]?.[type]; - - if (status === "ERROR" && clientState?.error) { - return clientState; - } else if (status === "ERROR") { - setSmartAccountClientState({ - config, - newState: { - client: undefined, - address: undefined, - isLoadingClient: false, - error, - }, - type, - connection, - }); - - return getSmartAccountClientState({ - config, - chainId: connection.chain.id, - type, - }); - } - - if ( - !account || - status === "INITIALIZING" || - status === "RECONNECTING" || - signerStatus.isAuthenticating || - signerStatus.isInitializing - ) { - if (!account && signerStatus.isConnected) { - createAccount({ type, accountParams }, config); - } - - if (clientState && clientState.isLoadingClient) { - return clientState; - } - - const loadingState = { - client: undefined, - address: - status === "RECONNECTING" || status === "READY" - ? account.address - : undefined, - isLoadingClient: true, - }; - - setSmartAccountClientState({ - config, - newState: loadingState, - type, - connection, - }); - - return getSmartAccountClientState({ - config, - chainId: connection.chain.id, - type, - }); - } - - // if the state of the client wasn't loading before, then we can just return the cached client - if (clientState && !clientState.isLoadingClient) { - return clientState; - } - - // TODO: this needs to be updated to use the smart wallet client instead - const newState = (() => { - switch (account.source) { - case "LightAccount": - return { - client: createAlchemySmartAccountClient({ - transport, - chain: connection.chain, - account: account, - policyId: connection.policyId, - policyToken: connection.policyToken, - ...clientParams, - }).extend(lightAccountClientActions), - address: account.address, - isLoadingClient: false, - }; - case "MultiOwnerLightAccount": - return { - client: createAlchemySmartAccountClient({ - transport, - chain: connection.chain, - account: account, - policyId: connection.policyId, - policyToken: connection.policyToken, - ...clientParams, - }).extend(multiOwnerLightAccountClientActions), - address: account.address, - isLoadingClient: false, - }; - case "MultiOwnerModularAccount": - return { - client: createAlchemySmartAccountClient({ - transport, - chain: connection.chain, - account: account, - policyId: connection.policyId, - policyToken: connection.policyToken, - ...clientParams, - }) - .extend(multiOwnerPluginActions) - .extend(pluginManagerActions) - .extend(accountLoupeActions), - address: account.address, - isLoadingClient: false, - }; - case "ModularAccountV2": - return { - client: createAlchemySmartAccountClient({ - transport, - chain: connection.chain, - account: account, - policyId: connection.policyId, - policyToken: connection.policyToken, - ...clientParams, - }), - address: account.address, - isLoadingClient: false, - }; - default: - assertNeverAccountType(account); - } - })(); - - setSmartAccountClientState({ - config, - newState, - type, - connection, - }); - - return getSmartAccountClientState({ - config, - chainId: connection.chain.id, - type, - }); -} - -function getSmartAccountClientState< - TAccountType extends SupportedAccountTypes, ->({ - config, - chainId, - type, -}: { - chainId: number; - type: TAccountType; - config: AlchemyAccountsConfig; -}) { - return config.store.getState().smartAccountClients[chainId][type]!; -} - -function setSmartAccountClientState< - TAccountType extends SupportedAccountTypes, ->({ - config, - newState, - type, - connection, -}: { - config: AlchemyAccountsConfig; - type: TAccountType; - newState: GetSmartAccountClientResult; - connection: Connection; -}) { - config.store.setState((state) => ({ - smartAccountClients: { - ...state.smartAccountClients, - [connection.chain.id]: { - ...state.smartAccountClients[connection.chain.id], - [type]: newState, - }, - }, - })); -} - -function assertNeverAccountType(_accountType: never): never { - throw new Error("Unsupported account type"); -} diff --git a/account-kit/core/src/actions/getSmartWalletClient.ts b/account-kit/core/src/actions/getSmartWalletClient.ts deleted file mode 100644 index fcbb064d4d..0000000000 --- a/account-kit/core/src/actions/getSmartWalletClient.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { - createSmartWalletClient, - type SmartWalletClient, -} from "@account-kit/wallet-client"; -import type { Address } from "viem"; -import { getAlchemyTransport } from "./getAlchemyTransport.js"; -import { getConnection } from "./getConnection.js"; -import { getSigner } from "./getSigner.js"; -import { getSignerStatus } from "./getSignerStatus.js"; -import type { AlchemyAccountsConfig } from "../types.js"; - -export type GetSmartWalletClientResult< - TAccount extends Address | undefined = Address | undefined, -> = SmartWalletClient | undefined; - -export type GetSmartWalletClientParams< - TAccount extends Address | undefined = Address | undefined, -> = { account?: TAccount }; - -export function getSmartWalletClient< - TAccount extends Address | undefined = Address | undefined, ->( - config: AlchemyAccountsConfig, - params?: GetSmartWalletClientParams, -): GetSmartWalletClientResult; - -/** - * Creates and returns a Smart Wallet Client instance. - * Returns undefined if running in a server environment or if no signer is connected. - * Caches clients by chain ID & address for performance optimization. - * - * @example - * ```ts - * import { getSmartWalletClient } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config.js"; - * - * const client = getSmartWalletClient(config); - * - * // With specific account address - * const clientWithAccount = getSmartWalletClient(config, { - * account: "0x1234..." - * }); - * ``` - * - * @param {AlchemyAccountsConfig} config The configuration containing the client store and connection information - * @param {GetSmartWalletClientParams} [params] Optional parameters including account address - * @returns {GetSmartWalletClientResult} The Smart Wallet Client instance or undefined if not available - */ -export function getSmartWalletClient( - config: AlchemyAccountsConfig, - params?: GetSmartWalletClientParams, -): GetSmartWalletClientResult { - if (typeof window === "undefined") { - return undefined; - } - - const connection = getConnection(config); - const signerStatus = getSignerStatus(config); - const transport = getAlchemyTransport(config); - const signer = getSigner(config); - - if (!signer || !signerStatus.isConnected) { - return undefined; - } - - const isAccountClientLoading = Array.from( - Object.values( - config.store.getState().smartAccountClients[connection.chain.id] || {}, - ), - ).some((it) => it.isLoadingClient); - - // Hooks that use `useSmartWalletClient` internally are passed a SmartAccountClient - // as a param. While the client is loading, it's expected that its account address - // will be undefined. However, it's possible that consuming apps may use the - // `useSmartWalletClient` hook directly and specify the account address while - // the SmartAccountClient is still loading. To prevent this from resulting in an - // infinite render loop, we can wait until the SmartAccountClient is done loading - // before using the account address from params. - const account = isAccountClientLoading ? undefined : params?.account; - - const smartWalletClient = - config.store.getState().smartWalletClients[connection.chain.id]; - - if (smartWalletClient && smartWalletClient.account?.address === account) { - return smartWalletClient; - } - - const client = createSmartWalletClient({ - transport, - chain: connection.chain, - signer, - account, - ...(Array.isArray(connection.policyId) - ? { policyIds: connection.policyId } - : connection.policyId - ? { policyId: connection.policyId } - : {}), - }); - - config.store.setState((state) => ({ - smartWalletClients: { - ...state.smartWalletClients, - [connection.chain.id]: client, - }, - })); - - return client; -} diff --git a/account-kit/core/src/actions/getSolanaConnection.ts b/account-kit/core/src/actions/getSolanaConnection.ts deleted file mode 100644 index 0cb01f6bd1..0000000000 --- a/account-kit/core/src/actions/getSolanaConnection.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { type AlchemyAccountsConfig, type SolanaConnection } from "../types.js"; - -/** - * Used to get the connection for the id - * - * @example - * ```ts - * import { getSolanaConnection } from "@account-kit/core"; - * import { config } from "./config"; - * - * const connection = getSolanaConnection(config); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config - * @returns {SolanaConnection | void} a connection object for the current active chain - */ -export function getSolanaConnection( - config: AlchemyAccountsConfig, -): SolanaConnection | null { - const connection = config.store.getState().solana; - if (!connection) { - return null; - } - - return connection; -} diff --git a/account-kit/core/src/actions/getUser.ts b/account-kit/core/src/actions/getUser.ts deleted file mode 100644 index d11d822bf6..0000000000 --- a/account-kit/core/src/actions/getUser.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { User } from "@account-kit/signer"; -import type { AlchemyAccountsConfig } from "../types"; - -export type GetUserResult = (User & { type: "eoa" | "sca" }) | null; - -/** - * Returns the currently logged in user if using an SCA with the AlchemySigner - * or the connected EOA details. - * - * @example - * ```ts - * import { getUser } from "@account-kit/core"; - * import { config } from "./config"; - * - * const user = getUser(config); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config containing app state - * @returns {GetUserResult} the user if the signer or an EOA are connected - */ -export const getUser = ( - config: AlchemyAccountsConfig, -): (User & { type: "eoa" | "sca" }) | null => { - const user = config.store.getState().user; - if (user == null) return user ?? null; - - // @ts-ignore - user.type = "sca" as const; - // @ts-ignore - return user; -}; diff --git a/account-kit/core/src/actions/reconnect.ts b/account-kit/core/src/actions/reconnect.ts deleted file mode 100644 index ee1644a6bd..0000000000 --- a/account-kit/core/src/actions/reconnect.ts +++ /dev/null @@ -1,77 +0,0 @@ -import type { AlchemyAccountsConfig } from "../types.js"; -import { createAccount } from "./createAccount.js"; -import { getChain } from "./getChain.js"; - -/** - * This method will use the current state in the client store and attempt to restore - * connected instances of previously used accounts and the signer. - * - * @example - * ```ts - * import { reconnect } from "@account-kit/core"; - * import { config } from "./config"; - * - * await reconnect(config); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config which contains the client store - */ -export async function reconnect(config: AlchemyAccountsConfig) { - const { store } = config; - const signerConfig = store.getState().config; - const accountConfigs = store.getState().accountConfigs; - - // If signer isn't already set, create a new signer. - // If the createSigner function isn't provided from the config, - const signer = - store.getState().signer ?? config._internal.createSigner(signerConfig); - - if (!store.getState().signer) { - store.setState({ - signer, - }); - } - - const chain = getChain(config); - - const unsubConnected = signer.on("connected", async () => { - if (accountConfigs[chain.id]?.["LightAccount"]) { - await createAccount( - { - type: "LightAccount", - accountParams: accountConfigs[chain.id]["LightAccount"], - }, - config, - ); - } - - if (accountConfigs[chain.id]?.["MultiOwnerModularAccount"]) { - await createAccount( - { - type: "MultiOwnerModularAccount", - accountParams: accountConfigs[chain.id]["MultiOwnerModularAccount"], - }, - config, - ); - } - - if (accountConfigs[chain.id]?.["ModularAccountV2"]) { - await createAccount( - { - type: "ModularAccountV2", - accountParams: accountConfigs[chain.id]["ModularAccountV2"], - }, - config, - ); - } - - setTimeout(() => unsubConnected(), 1); - }); - - const unsubDisconnected = signer.on("disconnected", () => { - store.setState({ - accountConfigs: {}, - }); - setTimeout(() => unsubDisconnected(), 1); - }); -} diff --git a/account-kit/core/src/actions/setChain.ts b/account-kit/core/src/actions/setChain.ts deleted file mode 100644 index 83b45e358c..0000000000 --- a/account-kit/core/src/actions/setChain.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { alchemy, createAlchemyPublicRpcClient } from "@account-kit/infra"; -import { switchChain, getChainId } from "@wagmi/core"; -import type { Chain } from "viem"; -import { ChainNotFoundError } from "../errors.js"; -import { type AlchemyAccountsConfig } from "../types.js"; - -/** - * Allows you to change the current chain in the core store. Note, this chain - * must be one of the chains configured in your original createConfig call. - * - * @example - * ```ts - * import { setChain } from "@account-kit/core"; - * import { config } from "./config"; - * import { sepolia } from "@account-kit/infra"; - * - * await setChain(config, sepolia); - * ``` - * - * @param {AlchemyAccountsConfig} config the accounts config object - * @param {Chain} chain the chain to change to. It must be present in the connections config object - */ -export async function setChain(config: AlchemyAccountsConfig, chain: Chain) { - const connection = config.store.getState().connections.get(chain.id); - if (connection == null) { - throw new ChainNotFoundError(chain); - } - - const wagmiChainId = getChainId(config._internal.wagmiConfig); - - // If the wallet's current chainId differs from chain.id, attempt to switch it. - // Some wallets (e.g., Safe when making a Safe App) don't allow programmatic chain switching and may throw. - // If the wallet is already on chain.id, we skip switchChain and simply update the SDK state. - if (wagmiChainId !== chain.id) { - await switchChain(config._internal.wagmiConfig, { chainId: chain.id }); - } - - const transport = connection.transport; - - config.store.setState(() => ({ - chain, - bundlerClient: createAlchemyPublicRpcClient({ - chain, - transport: alchemy(transport), - }), - })); -} diff --git a/account-kit/core/src/actions/watchAccount.ts b/account-kit/core/src/actions/watchAccount.ts deleted file mode 100644 index badefa43e5..0000000000 --- a/account-kit/core/src/actions/watchAccount.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ClientOnlyPropertyError } from "../errors.js"; -import type { AlchemyAccountsConfig, SupportedAccountTypes } from "../types.js"; -import { type GetAccountResult } from "./getAccount.js"; -import { getChain } from "./getChain.js"; - -/** - * Watches for changes to a specific type of account and triggers the provided callback function when changes occur. - * - * @example - * ```ts - * import { watchAccount } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchAccount("LightAccount", config)(console.log); - * ``` - * - * @template TAccount The type of account to watch - * @param {TAccount} type The type of account to watch - * @param {AlchemyAccountsConfig} config The configuration containing client store settings - * @returns {(onChange: (account: GetAccountResult) => void) => (() => void)} A function that accepts a callback to be called when the account changes and returns a function to unsubscribe from the store - */ -export const watchAccount = - ( - type: TAccount, - config: AlchemyAccountsConfig, - ) => - (onChange: (account: GetAccountResult) => void) => { - const accounts = config.store.getState().accounts; - if (!accounts) { - throw new ClientOnlyPropertyError("account"); - } - - const chain = getChain(config); - return config.store.subscribe( - // this should be available on the client now because of the check above - ({ accounts }) => accounts![chain.id][type], - onChange, - { - equalityFn(a, b) { - return a?.status === "READY" && b?.status === "READY" - ? a.account.address === b.account.address - : a?.status === b?.status; - }, - }, - ); - }; diff --git a/account-kit/core/src/actions/watchBundlerClient.test.ts b/account-kit/core/src/actions/watchBundlerClient.test.ts deleted file mode 100644 index 9da873a8b3..0000000000 --- a/account-kit/core/src/actions/watchBundlerClient.test.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { alchemy, arbitrumSepolia, sepolia } from "@account-kit/infra"; -import { AlchemySignerStatus } from "@account-kit/signer"; -import { createConfig } from "../createConfig.js"; -import { - convertSignerStatusToState, - createDefaultAccountState, -} from "../store/store.js"; -import { setChain } from "./setChain.js"; -import { watchBundlerClient } from "./watchBundlerClient.js"; - -describe("watchBundlerClient", () => { - it("should not fire the callback if transport or chain didn't change", () => { - const config = givenConfig(); - const onChange = vi.fn(); - - watchBundlerClient(config)(onChange); - - config.store.setState({ - signerStatus: convertSignerStatusToState( - AlchemySignerStatus.AWAITING_EMAIL_AUTH, - undefined, - ), - }); - - expect(onChange).not.toHaveBeenCalled(); - }); - - it("should fire the callback if chain changed", async () => { - const config = givenConfig(); - const onChange = vi.fn(); - - watchBundlerClient(config)(onChange); - - await setChain(config, arbitrumSepolia); - - expect(onChange).toHaveBeenCalled(); - }); - - it("should not fire if the chain id is the same", async () => { - const config = givenConfig(); - const onChange = vi.fn(); - - watchBundlerClient(config)(onChange); - - await setChain(config, sepolia); - - expect(onChange).not.toHaveBeenCalled(); - }); - - const givenConfig = () => { - const config = createConfig({ - chain: sepolia, - chains: [{ chain: sepolia }, { chain: arbitrumSepolia }], - transport: alchemy({ apiKey: "AN_API_KEY" }), - }); - - config.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - - return config; - }; -}); diff --git a/account-kit/core/src/actions/watchBundlerClient.ts b/account-kit/core/src/actions/watchBundlerClient.ts deleted file mode 100644 index 7fe47dc768..0000000000 --- a/account-kit/core/src/actions/watchBundlerClient.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { type ClientWithAlchemyMethods } from "@account-kit/infra"; -import type { AlchemyAccountsConfig } from "../types"; - -/** - * Watches for changes to the bundler client within the given configuration and triggers a callback when changes occur. - * - * @example - * ```ts - * import { watchBundlerClient } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchBundlerClient(config)(console.log); - * ``` - * - * @param {AlchemyAccountsConfig} config The configuration object containing the core store - * @returns {(onChange: (bundlerClient: ClientWithAlchemyMethods) => void) => (() => void)} A function accepting a callback function to invoke when the bundler client changes and returns a function to unsubscribe from the store - */ -export const watchBundlerClient = - (config: AlchemyAccountsConfig) => - (onChange: (bundlerClient: ClientWithAlchemyMethods) => void) => { - return config.store.subscribe( - ({ bundlerClient }) => bundlerClient, - onChange, - { - equalityFn(a, b) { - return a.chain.id === b.chain.id; - }, - }, - ); - }; diff --git a/account-kit/core/src/actions/watchChain.ts b/account-kit/core/src/actions/watchChain.ts deleted file mode 100644 index 0994fb8cf9..0000000000 --- a/account-kit/core/src/actions/watchChain.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Chain } from "viem"; -import type { AlchemyAccountsConfig } from "../types"; - -/** - * Allows you to subscribe to changes of the chain in the client store. - * - * @example - * ```ts - * import { watchChain } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchChain(config)(console.log); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config object - * @returns {(onChange: (chain: Chain) => void) => (() => void)} a function which accepts an onChange callback that will be fired when the chain changes and returns a function to unsubscribe from the store - */ -export function watchChain(config: AlchemyAccountsConfig) { - return (onChange: (chain: Chain) => void) => { - return config.store.subscribe(({ chain }) => chain, onChange); - }; -} diff --git a/account-kit/core/src/actions/watchConnection.ts b/account-kit/core/src/actions/watchConnection.ts deleted file mode 100644 index 3c45718283..0000000000 --- a/account-kit/core/src/actions/watchConnection.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { AlchemyAccountsConfig, Connection } from "../types"; - -/** - * Subscribe to changes to the active connection - * - * @example - * ```ts - * import { watchConnection } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchConnection(config)(console.log); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config - * @returns {(onChange: (connection: Connection) => void) => (() => void)} a function which accepts an onChange callback that will be fired when the connection changes and returns a function to unsubscribe from the store - */ -export function watchConnection(config: AlchemyAccountsConfig) { - return (onChange: (connection: Connection) => void) => { - return config.store.subscribe( - ({ chain }) => chain, - (chain) => { - const connection = config.store.getState().connections.get(chain.id); - - if (connection) { - onChange(connection); - } - }, - ); - }; -} diff --git a/account-kit/core/src/actions/watchSigner.ts b/account-kit/core/src/actions/watchSigner.ts deleted file mode 100644 index e35dd73218..0000000000 --- a/account-kit/core/src/actions/watchSigner.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { AlchemyAccountsConfig, AlchemySigner } from "../types"; - -/** - * Subscribe to changes of the signer instance on the client store. - * - * @example - * ```ts - * import { watchSigner } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchSigner(config)(console.log); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config containing the client store - * @returns {(onChange: (chain: AlchemySigner) => void) => (() => void)} a function which accepts an onChange callback that will be fired when the signer changes and returns a function to unsubscribe from the store - */ -export const watchSigner = - (config: AlchemyAccountsConfig) => - (onChange: (signer?: AlchemySigner) => void) => { - return config.store.subscribe(({ signer }) => signer, onChange); - }; diff --git a/account-kit/core/src/actions/watchSignerStatus.ts b/account-kit/core/src/actions/watchSignerStatus.ts deleted file mode 100644 index 121544d142..0000000000 --- a/account-kit/core/src/actions/watchSignerStatus.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { SignerStatus } from "../store/types.js"; -import type { AlchemyAccountsConfig } from "../types.js"; - -/** - * Watches the signer status in the client store and triggers the provided callback function when the status changes. - * - * @example - * ```ts - * import { watchSignerStatus } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchSignerStatus(config)(console.log); - * ``` - * - * @param {AlchemyAccountsConfig} config The configuration object containing the client store - * @returns {(onChange: (status: SignerStatus) => void) => (() => void)} A function that accepts a callback to be called when the signer status changes which returns a function to unsubscribe from the store - */ -export const watchSignerStatus = - (config: AlchemyAccountsConfig) => - (onChange: (status: SignerStatus) => void) => { - return config.store.subscribe( - ({ signerStatus }) => signerStatus, - onChange, - { equalityFn: (a, b) => a.status === b.status && a.error === b.error }, - ); - }; diff --git a/account-kit/core/src/actions/watchSmartAccountClient.test.ts b/account-kit/core/src/actions/watchSmartAccountClient.test.ts deleted file mode 100644 index 52e05ce3ce..0000000000 --- a/account-kit/core/src/actions/watchSmartAccountClient.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { alchemy, arbitrumSepolia, sepolia } from "@account-kit/infra"; -import { AlchemySignerStatus } from "@account-kit/signer"; -import { createConfig } from "../createConfig.js"; -import { - convertSignerStatusToState, - createDefaultAccountState, -} from "../store/store.js"; -import { getSmartAccountClient } from "./getSmartAccountClient.js"; -import { setChain } from "./setChain.js"; -import { watchSmartAccountClient } from "./watchSmartAccountClient.js"; - -describe("watchSmartAccountClient", () => { - it("should fire the on subscribe callback if signer status changes", () => { - const config = givenConfig(); - const onChange = vi.fn(); - - watchSmartAccountClient({ type: "LightAccount" }, config)(onChange); - - config.store.setState({ - signerStatus: convertSignerStatusToState( - AlchemySignerStatus.DISCONNECTED, - undefined, - ), - }); - - expect(onChange).toHaveBeenCalled(); - }); - - it("should fire the on subscribe callback if account changes", () => { - const config = givenConfig(); - const onChange = vi.fn(); - - watchSmartAccountClient({ type: "LightAccount" }, config)(onChange); - - config.store.setState((state) => ({ - accounts: { - ...state.accounts, - [sepolia.id]: { - ...state.accounts![sepolia.id], - LightAccount: { - status: "ERROR", - account: undefined, - error: new Error("An error occurred"), - }, - }, - }, - })); - - expect(onChange).toHaveBeenCalled(); - }); - - it("should fire the on subscribe callback if bundler client changes", async () => { - const config = givenConfig(); - const onChange = vi.fn(); - - watchSmartAccountClient({ type: "LightAccount" }, config)(onChange); - - // this will implicitly change the bundler client - // this is the most likely usecase that the bundler client changes - await setChain(config, arbitrumSepolia); - - expect(onChange).toHaveBeenCalled(); - }); - - it("should return an error and set it in the store if the account is in an error state", async () => { - const config = givenConfig(); - const onChange = vi.fn(); - - watchSmartAccountClient({ type: "LightAccount" }, config)(onChange); - - config.store.setState((state) => ({ - accounts: { - ...state.accounts, - [sepolia.id]: { - ...state.accounts![sepolia.id], - LightAccount: { - status: "ERROR", - account: undefined, - error: new Error("An error occurred"), - }, - }, - }, - })); - - const errorState = { - address: undefined, - client: undefined, - isLoadingClient: false, - error: new Error("An error occurred"), - }; - - expect(onChange).toHaveBeenCalledWith(errorState); - - expect(getSmartAccountClient({ type: "LightAccount" }, config)).toEqual( - errorState, - ); - }); - - const givenConfig = () => { - const config = createConfig({ - chain: sepolia, - chains: [{ chain: sepolia }, { chain: arbitrumSepolia }], - transport: alchemy({ apiKey: "AN_API_KEY" }), - }); - - config.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - - return config; - }; -}); diff --git a/account-kit/core/src/actions/watchSmartAccountClient.ts b/account-kit/core/src/actions/watchSmartAccountClient.ts deleted file mode 100644 index c852ee08bb..0000000000 --- a/account-kit/core/src/actions/watchSmartAccountClient.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { Chain } from "viem"; -import { ClientOnlyPropertyError } from "../errors.js"; -import type { - AlchemyAccountsConfig, - SupportedAccount, - SupportedAccountTypes, -} from "../types"; -import { - getSmartAccountClient, - type GetSmartAccountClientParams, - type GetSmartAccountClientResult, -} from "./getSmartAccountClient.js"; - -/** - * Watches for changes to the smart account client and triggers the provided callback when a change is detected. - * - * @example - * ```ts - * import { watchSmartAccountClient } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchSmartAccountClient({ type: "LightAccount" }, config)(console.log); - * ``` - * - * @template TAccount extends SupportedAccountTypes - * @template TTransport extends Transport = Transport - * @template TChain extends Chain | undefined = Chain | undefined - * - * @param {GetSmartAccountClientParams} params the parameters needed to get the smart account client - * @param {AlchemyAccountsConfig} config the configuration containing the client store and other settings - * @returns {(onChange: (client: GetSmartAccountClientResult>) => void) => (() => void)} a function that accepts a callback to be called when the client changes and returns a function to unsubscribe from the store - */ export function watchSmartAccountClient< - TAccount extends SupportedAccountTypes, - TChain extends Chain | undefined = Chain | undefined, ->( - params: GetSmartAccountClientParams, - config: AlchemyAccountsConfig, -) { - return ( - onChange: ( - client: GetSmartAccountClientResult>, - ) => void, - ) => { - const accounts_ = config.store.getState().accounts; - if (!accounts_) { - throw new ClientOnlyPropertyError("account"); - } - - return config.store.subscribe( - ({ signerStatus, accounts, chain }) => ({ - signerStatus, - account: accounts![chain.id][params.type], - chain, - }), - () => { - onChange(getSmartAccountClient(params, config)); - }, - { - equalityFn(a, b) { - return ( - a.signerStatus === b.signerStatus && - a.account === b.account && - a.chain === b.chain - ); - }, - }, - ); - }; -} diff --git a/account-kit/core/src/actions/watchSmartWalletClient.ts b/account-kit/core/src/actions/watchSmartWalletClient.ts deleted file mode 100644 index 189ddb4c98..0000000000 --- a/account-kit/core/src/actions/watchSmartWalletClient.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { AlchemyAccountsConfig } from "../types"; -import { - getSmartWalletClient, - type GetSmartWalletClientResult, -} from "./getSmartWalletClient.js"; - -/** - * Creates a subscription function that watches for changes to the Smart Wallet Client. - * Triggers the onChange callback whenever the signer status or chain changes. - * - * @example - * ```ts - * import { watchSmartWalletClient } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config.js"; - * - * const watchClient = watchSmartWalletClient(config); - * const unsubscribe = watchClient((client) => { - * console.log("Smart Wallet Client changed:", client); - * }); - * - * // Clean up subscription - * unsubscribe(); - * ``` - * - * @param {AlchemyAccountsConfig} config The configuration containing the client store and connection information - * @returns {Function} A function that accepts an onChange callback and returns an unsubscribe function - */ -export function watchSmartWalletClient(config: AlchemyAccountsConfig) { - return (onChange: (client: GetSmartWalletClientResult) => void) => { - return config.store.subscribe( - ({ signerStatus, chain }) => ({ signerStatus, chain }), - () => { - onChange(getSmartWalletClient(config)); - }, - { - equalityFn(a, b) { - return a.signerStatus === b.signerStatus && a.chain === b.chain; - }, - }, - ); - }; -} diff --git a/account-kit/core/src/actions/watchSolanaConnection.ts b/account-kit/core/src/actions/watchSolanaConnection.ts deleted file mode 100644 index 1727c7e5bd..0000000000 --- a/account-kit/core/src/actions/watchSolanaConnection.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { AlchemyAccountsConfig, SolanaConnection } from "../types"; - -/** - * Subscribe to changes to the solana connection for the id - * - * @example - * ```ts twoslash - * import { watchSolanaConnection } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * const config = {} as any; - * - * watchSolanaConnection(config)(console.log); - * ``` - * - * @param {AlchemyAccountsConfig} config the account config of the connection - * @returns {(onChange: (connection: Connection) => void) => (() => void)} a function which accepts an onChange callback that will be fired when the connection changes and returns a function to unsubscribe from the store - */ -export function watchSolanaConnection(config: AlchemyAccountsConfig) { - return (onChange: (connection: SolanaConnection) => void) => { - return config.store.subscribe( - ({ chain }) => chain, - (_) => { - const connection = config.store.getState().solana; - - if (connection) { - onChange(connection); - } - }, - ); - }; -} diff --git a/account-kit/core/src/actions/watchUser.ts b/account-kit/core/src/actions/watchUser.ts deleted file mode 100644 index 51baf3259d..0000000000 --- a/account-kit/core/src/actions/watchUser.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { User } from "@account-kit/signer"; -import type { AlchemyAccountsConfig } from "../types"; - -/** - * Watches for changes to the user in the client store and triggers the provided callback when a change is detected. - * - * @example - * ```ts - * import { watchUser } from "@account-kit/core"; - * // see createConfig for more information on how to create a config - * import { config } from "./config"; - * - * watchUser(config)(console.log); - * ``` - * - * @param {AlchemyAccountsConfig} config the configuration containing the client store - * @returns {(onChange: (user: User) => void) => (() => void)} a function which accepts a callback that fires when the user changes and returns a function to unsubscribe from the user updates - */ -export const watchUser = - (config: AlchemyAccountsConfig) => (onChange: (user?: User) => void) => { - return config.store.subscribe(({ user }) => user, onChange, { - equalityFn: (a, b) => a?.userId === b?.userId, - }); - }; diff --git a/account-kit/core/src/createConfig.test.ts b/account-kit/core/src/createConfig.test.ts deleted file mode 100644 index 6656f7b537..0000000000 --- a/account-kit/core/src/createConfig.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { alchemy, sepolia } from "@account-kit/infra"; -import { createConfig } from "./createConfig.js"; -import { createSigner as createWebSigner } from "./environments/web/createSigner.js"; - -describe("createConfig", () => { - it("should set the internal session length", async () => { - const config = await givenConfig(); - expect(config._internal.sessionLength).toBe(5000); - }); - - it("should set the session config expiration time", async () => { - const config = await givenConfig(); - expect(config.store.getState().config.sessionConfig?.expirationTimeMs).toBe( - 5000, - ); - }); - - const givenConfig = async () => { - return createConfig({ - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - signerConnection: { rpcUrl: "/api/signer" }, - storage: () => localStorage, - sessionConfig: { - expirationTimeMs: 5000, - }, - _internal: { createSigner: createWebSigner }, - }); - }; -}); diff --git a/account-kit/core/src/createConfig.ts b/account-kit/core/src/createConfig.ts deleted file mode 100644 index ac1ed516ce..0000000000 --- a/account-kit/core/src/createConfig.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { DEFAULT_SESSION_MS } from "@account-kit/signer"; -import { createStorage, createConfig as createWagmiConfig } from "@wagmi/core"; -import { getBundlerClient } from "./actions/getBundlerClient.js"; -import { createSigner as createWebSigner } from "./environments/web/createSigner.js"; -import { CoreLogger } from "./metrics.js"; -import { createAccountKitStore } from "./store/store.js"; -import { DEFAULT_STORAGE_KEY } from "./store/types.js"; -import { - type AlchemyAccountsConfig, - type Connection, - type CreateConfigProps, -} from "./types.js"; - -export const DEFAULT_IFRAME_CONTAINER_ID = "alchemy-signer-iframe-container"; - -/** - * Creates an AlchemyAccountsConfig object that can be used in conjunction with - * the actions exported from `@account-kit/core`. - * - * The config contains core and client stores that can be used to manage account state - * in your application. - * - * @example - * ```ts - * import { createConfig } from "@account-kit/core"; - * import { sepolia } from "@account-kit/infra"; - * - * const config = createConfig({ - * chain: sepolia, - * transport: alchemy({ apiKey: "your-api-key" }), - * }); - * ``` - * - * @param {CreateConfigProps} params The parameters to create the config with - * @returns {AlchemyAccountsConfig} An alchemy account config object containing the core and client store - */ -export const createConfig = ( - params: CreateConfigProps, -): AlchemyAccountsConfig => { - const { - chain, - iframeConfig, - rootOrgId, - rpId, - sessionConfig, - signerConnection, - ssr, - storage, - connectors, - oauthCallbackUrl, - enablePopupOauth, - _internal: { createSigner } = {}, - ...connectionConfig - } = params; - - const connections: Connection[] = []; - if (connectionConfig.chains == null) { - const transportConfig = { ...connectionConfig.transport.config }; - - transportConfig.chainAgnosticUrl ??= signerConnection?.rpcUrl - ? `${signerConnection.rpcUrl}/v2` - : transportConfig.rpcUrl - ? `${transportConfig.rpcUrl}/v2` - : undefined; - - connections.push({ - transport: transportConfig, - policyId: connectionConfig.policyId, - policyToken: connectionConfig.policyToken, - chain, - }); - } else { - connectionConfig.chains.forEach((params) => { - const { chain, policyId, transport } = params; - const transportConfig = - transport?.config ?? connectionConfig.transport!.config; - - transportConfig.chainAgnosticUrl ??= signerConnection?.rpcUrl - ? `${signerConnection.rpcUrl}/v2` - : connectionConfig.transport?.config.rpcUrl - ? `${connectionConfig.transport.config.rpcUrl}/v2` - : transportConfig.rpcUrl - ? `${transportConfig.rpcUrl}/v2` - : undefined; - - connections.push({ - transport: transportConfig, - chain, - policyId: policyId ?? connectionConfig.policyId, - policyToken: connectionConfig.policyToken, - }); - }); - } - - const defaultConnection = connections[0].transport; - const store = createAccountKitStore({ - connections, - chain, - client: { - connection: - signerConnection ?? - defaultConnection.alchemyConnection ?? - defaultConnection, - iframeConfig, - rootOrgId, - rpId, - oauthCallbackUrl, - enablePopupOauth, - }, - sessionConfig, - storage: storage?.( - sessionConfig - ? { - domain: sessionConfig.domain, - } - : undefined, - ), - ssr, - solana: params.solana, - }); - - const wagmiConfig = createWagmiConfig({ - connectors, - chains: [chain, ...connections.map((c) => c.chain)], - client: () => getBundlerClient(config), - storage: createStorage({ - key: `${DEFAULT_STORAGE_KEY}:wagmi`, - storage: storage - ? storage() - : typeof window !== "undefined" - ? localStorage - : undefined, - }), - ssr, - }); - - const config: AlchemyAccountsConfig = { - store: store, - accountCreationHint: params.accountCreationHint, - solana: params.solana - ? { - adapters: params.solana.adapters, - connection: params.solana.connection, - } - : undefined, - _internal: { - ssr, - createSigner: createSigner ?? createWebSigner, // <-- Default to web signer if not provided - wagmiConfig, - storageKey: "alchemy-account-state", - sessionLength: sessionConfig?.expirationTimeMs ?? DEFAULT_SESSION_MS, - }, - }; - - CoreLogger.trackEvent({ - name: "config_created", - data: { - ssr: ssr ?? false, - chainIds: connections.map((x) => x.chain.id), - }, - }); - - return config; -}; diff --git a/account-kit/core/src/environments/web/createSigner.ts b/account-kit/core/src/environments/web/createSigner.ts deleted file mode 100644 index f8cdc3bd68..0000000000 --- a/account-kit/core/src/environments/web/createSigner.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { AlchemyWebSigner } from "@account-kit/signer"; -import { DEFAULT_IFRAME_CONTAINER_ID } from "../../createConfig.js"; -import type { ClientStoreConfig } from "../../store/types"; - -/** - * Given initial client store parameters, it initializes an AlchemySigner instance. - * This should only be called on the client. - * - * @param {CreateClientStoreParams} params to configure and create the signer - * @returns {AlchemySigner} an instance of the AlchemySigner - */ -export const createSigner = (params: ClientStoreConfig) => { - const { client, sessionConfig } = params; - const { iframeContainerId } = client.iframeConfig ?? { - iframeContainerId: DEFAULT_IFRAME_CONTAINER_ID, - }; - - let iframeContainer = document.getElementById(iframeContainerId); - if (iframeContainer !== null) { - iframeContainer.innerHTML = ""; - iframeContainer.style.display = "none"; - } else { - iframeContainer = document.createElement("div"); - iframeContainer.id = iframeContainerId; - iframeContainer.style.display = "none"; - document.body.appendChild(iframeContainer); - } - - const signer = new AlchemyWebSigner({ - client: { - ...client, - iframeConfig: { - ...client.iframeConfig, - iframeContainerId, - }, - }, - sessionConfig, - }); - - if (client.enablePopupOauth) { - signer.preparePopupOauth(); - } - - return signer; -}; diff --git a/account-kit/core/src/environments/web/index.ts b/account-kit/core/src/environments/web/index.ts deleted file mode 100644 index d5bc0ae344..0000000000 --- a/account-kit/core/src/environments/web/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./createSigner.js"; diff --git a/account-kit/core/src/errors.ts b/account-kit/core/src/errors.ts deleted file mode 100644 index 6da9cb7d7f..0000000000 --- a/account-kit/core/src/errors.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { BaseError as CoreBaseError } from "@aa-sdk/core"; -import type { Chain } from "viem"; -import { VERSION } from "./version.js"; - -/** - * Represents the base class for custom errors, inheriting from `CoreBaseError` and overriding the version with a specific version number. - */ -export abstract class BaseError extends CoreBaseError { - // This version could be different from the aa-core version so we overwrite this here. - override version = VERSION; -} - -/** - * Error thrown when a client only property is accessed on the server - */ -export class ClientOnlyPropertyError extends BaseError { - name: string = "ClientOnlyPropertyError"; - - /** - * Creates a new ClientOnlyPropertyError - * - * @param {string} property the name of the property that is only available on the client - */ - constructor(property: string) { - super(`${property} is only available on the client`); - } -} - -/** - * Error thrown when a client does not have a chain configured in the connections object - * This is not really meant to be used out of the SDK, but is exported for convenience (ie. matching errors are of an instance of this class) - */ -export class ChainNotFoundError extends BaseError { - name: string = "ChainNotFoundError"; - - /** - * Constructs a new error indicating that the specified chain was not found in the connections configuration object. - * - * @example - * ```ts - * import { ChainNotFoundError } from "@account-kit/core"; - * import { sepolia } from "@account-kit/infra"; - * - * throw new ChainNotFoundError(sepolia); - * ``` - * - * @param {Chain} chain The chain for which the error is being thrown - */ - constructor(chain: Chain) { - super(`Chain (${chain.name}) not found in connections config object`, { - docsPath: "/reference/account-kit/react/functions/createConfig", - }); - } -} - -export class SignerNotConnectedError extends BaseError { - name: string = "SignerNotConnectedError"; - - constructor() { - super( - "Signer not connected. Authenticate the user before calling this function", - ); - } -} diff --git a/account-kit/core/src/hydrate.ts b/account-kit/core/src/hydrate.ts deleted file mode 100644 index 24c1a51454..0000000000 --- a/account-kit/core/src/hydrate.ts +++ /dev/null @@ -1,147 +0,0 @@ -import type { Address } from "@aa-sdk/core"; -import { AlchemySignerStatus } from "@account-kit/signer"; -import { hydrate as wagmi_hydrate } from "@wagmi/core"; -import { reconnect } from "./actions/reconnect.js"; -import { - convertSignerStatusToState, - createDefaultAccountState, - defaultAccountState, -} from "./store/store.js"; -import type { AccountState, StoreState, StoredState } from "./store/types.js"; -import { - type AlchemyAccountsConfig, - type SupportedAccountTypes, -} from "./types.js"; - -export type HydrateResult = { - onMount: () => Promise; -}; - -/** - * Will hydrate the client store with the provided initial state if one is provided. - * - * @example - * ```ts - * import { hydrate, cookieToInitialState } from "@account-kit/core"; - * import { config } from "./config"; - * - * const initialState = cookieToInitialState(document.cookie); - * const { onMount } = hydrate(config, initialState); - * // call onMount once your component has mounted - * ``` - * - * @param {AlchemyAccountsConfig} config the config containing the client store - * @param {StoredState} initialState optional param detailing the initial ClientState - * @returns {{ onMount: () => Promise }} an object containing an onMount function that can be called when your component first renders on the client - */ -export function hydrate( - config: AlchemyAccountsConfig, - initialState?: StoredState, -): HydrateResult { - const initialAlchemyState = - initialState != null && "alchemy" in initialState - ? initialState.alchemy - : initialState; - - if (initialAlchemyState && !config.store.persist.hasHydrated()) { - const { accountConfigs, signerStatus, ...rest } = initialAlchemyState; - const shouldReconnectAccounts = - signerStatus.isConnected || signerStatus.isAuthenticating; - - // If the persisted chainId is not in the config, we should fall back to the default chain. - const configuredChains = Array.from( - config.store.getInitialState().connections.keys(), - ); - const chain = configuredChains.includes(rest.chain.id) - ? rest.chain - : config.store.getInitialState().chain; - - config.store.setState({ - ...rest, - chain, - user: initialAlchemyState.user, - accountConfigs, - signerStatus: convertSignerStatusToState( - AlchemySignerStatus.INITIALIZING, - undefined, - ), - accounts: hydrateAccountState( - accountConfigs, - shouldReconnectAccounts, - config, - ), - }); - } - - const initialWagmiState = - initialState != null && "wagmi" in initialState - ? initialState.wagmi - : undefined; - - const { onMount: wagmi_onMount } = wagmi_hydrate( - config._internal.wagmiConfig, - { - initialState: initialWagmiState, - reconnectOnMount: (initialWagmiState?.connections?.size ?? 0) > 0, - }, - ); - - return { - async onMount() { - if (config._internal.ssr) { - await config.store.persist.rehydrate(); - } - - await wagmi_onMount(); - - await reconnect(config); - }, - }; -} - -const reconnectingState = ( - address: Address, -): AccountState => ({ - status: "RECONNECTING", - account: { - address, - }, -}); - -const hydrateAccountState = ( - accountConfigs: StoreState["accountConfigs"], - shouldReconnectAccounts: boolean, - config: AlchemyAccountsConfig, -): StoreState["accounts"] => { - const chains = Array.from(config.store.getState().connections.entries()) - .map(([_, cnx]) => cnx) - .map((cnx) => cnx.chain); - const initialState = createDefaultAccountState(chains); - const activeChainId = config.store.getState().chain.id; - - return Object.entries(accountConfigs).reduce((acc, [chainKey, config]) => { - const chainId = Number(chainKey); - const isActiveChain = chainId === activeChainId; - const shouldReconnect = shouldReconnectAccounts && isActiveChain; - acc[chainId] = { - LightAccount: - shouldReconnect && config.LightAccount?.accountAddress - ? reconnectingState(config.LightAccount.accountAddress) - : defaultAccountState(), - MultiOwnerModularAccount: - shouldReconnect && config.MultiOwnerModularAccount?.accountAddress - ? reconnectingState(config.MultiOwnerModularAccount.accountAddress) - : defaultAccountState(), - MultiOwnerLightAccount: - shouldReconnect && config.MultiOwnerLightAccount?.accountAddress - ? reconnectingState(config.MultiOwnerLightAccount.accountAddress) - : defaultAccountState(), - ModularAccountV2: - shouldReconnect && config.ModularAccountV2?.accountAddress - ? reconnectingState(config.ModularAccountV2.accountAddress) - : defaultAccountState(), - }; - - return acc; - }, initialState); -}; diff --git a/account-kit/core/src/index.ts b/account-kit/core/src/index.ts deleted file mode 100644 index 4eda87d7f2..0000000000 --- a/account-kit/core/src/index.ts +++ /dev/null @@ -1,107 +0,0 @@ -export type * from "./actions/createAccount.js"; -export { createAccount } from "./actions/createAccount.js"; -export { disconnect } from "./actions/disconnect.js"; -export type * from "./actions/getAccount.js"; -export { getAccount } from "./actions/getAccount.js"; -export type * from "./actions/getBundlerClient.js"; -export { getBundlerClient } from "./actions/getBundlerClient.js"; -export { getChain } from "./actions/getChain.js"; -export type * from "./actions/getConnection.js"; -export { getConnection } from "./actions/getConnection.js"; -export type * from "./actions/getSigner.js"; -export { getSigner } from "./actions/getSigner.js"; -export type * from "./actions/getSignerStatus.js"; -export { getSignerStatus } from "./actions/getSignerStatus.js"; -export type * from "./actions/getSmartAccountClient.js"; -export { getSmartAccountClient } from "./actions/getSmartAccountClient.js"; -export type * from "./actions/getSolanaConnection.js"; -export { getSolanaConnection } from "./actions/getSolanaConnection.js"; -export type * from "./actions/getUser.js"; -export { getUser } from "./actions/getUser.js"; -export type * from "./actions/reconnect.js"; -export { reconnect } from "./actions/reconnect.js"; -export { setChain } from "./actions/setChain.js"; -export type * from "./actions/watchAccount.js"; -export { watchAccount } from "./actions/watchAccount.js"; -export type * from "./actions/watchBundlerClient.js"; -export { watchBundlerClient } from "./actions/watchBundlerClient.js"; -export { watchChain } from "./actions/watchChain.js"; -export type * from "./actions/watchConnection.js"; -export { watchConnection } from "./actions/watchConnection.js"; -export type * from "./actions/watchSigner.js"; -export { watchSigner } from "./actions/watchSigner.js"; -export type * from "./actions/watchSignerStatus.js"; -export { watchSignerStatus } from "./actions/watchSignerStatus.js"; -export type * from "./actions/watchSmartAccountClient.js"; -export { watchSmartAccountClient } from "./actions/watchSmartAccountClient.js"; -export type * from "./actions/watchSolanaConnection.js"; -export { watchSolanaConnection } from "./actions/watchSolanaConnection.js"; -export type * from "./actions/watchUser.js"; -export { watchUser } from "./actions/watchUser.js"; -export type * from "./createConfig.js"; -export { createConfig, DEFAULT_IFRAME_CONTAINER_ID } from "./createConfig.js"; -export type * from "./environments/web/createSigner.js"; -export { createSigner as internalCreateWebSigner } from "./environments/web/createSigner.js"; -export type * from "./actions/getSmartWalletClient.js"; -export { getSmartWalletClient } from "./actions/getSmartWalletClient.js"; -export type * from "./actions/watchSmartWalletClient.js"; -export { watchSmartWalletClient } from "./actions/watchSmartWalletClient.js"; -export { ClientOnlyPropertyError } from "./errors.js"; -export { hydrate } from "./hydrate.js"; -export { - convertSignerStatusToState, - createDefaultAccountState, - defaultAccountState, -} from "./store/store.js"; -export type { - AccountState, - ClientStoreConfig, - SignerStatus, - Store, - StoredState, - StoreState, -} from "./store/types.js"; -export type * from "./types.js"; -export { - cookieStorage, - cookieToInitialState, - parseCookie, -} from "./utils/cookies.js"; - -/** Re-export core packages to make it easier to use this package without the lower level packages */ -// Accounts -export type * from "@account-kit/smart-contracts"; -export { - accountLoupeActions, - createLightAccount, - createMultiOwnerModularAccount as createModularAccount, - createMultiOwnerLightAccount, - createMultisigModularAccount, - getMAInitializationData, - getMSCAUpgradeToData, - lightAccountClientActions, - multiOwnerLightAccountClientActions, - MultiOwnerPlugin, - multiOwnerPluginActions, - MultisigPlugin, - MultisigPluginAbi, - multisigPluginActions, - MultisigPluginExecutionFunctionAbi, - multisigSignatureMiddleware, - pluginManagerActions, - SessionKeyAccessListType, - SessionKeyPermissionsBuilder, - SessionKeyPlugin, - SessionKeyPluginAbi, - sessionKeyPluginActions, - SessionKeyPluginExecutionFunctionAbi, - SessionKeySigner, -} from "@account-kit/smart-contracts"; - -// Infra -export type * from "@account-kit/infra"; -export { - createAlchemySmartAccountClient, - type AlchemySmartAccountClient, - type AlchemySmartAccountClientConfig, -} from "@account-kit/infra"; diff --git a/account-kit/core/src/metrics.ts b/account-kit/core/src/metrics.ts deleted file mode 100644 index b617a9fbad..0000000000 --- a/account-kit/core/src/metrics.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { createLogger } from "@account-kit/logging"; -import { VERSION } from "./version.js"; - -export type ConfigCreatedData = { - ssr: boolean; - chainIds: number[]; -}; - -export type CoreEventsSchema = [ - { - EventName: "config_created"; - EventData: ConfigCreatedData; - }, - { - EventName: "account_initialized"; - EventData: { - accountType: string; - accountVersion: string; - }; - }, -]; - -export const CoreLogger = createLogger({ - package: "@account-kit/core", - version: VERSION, -}); diff --git a/account-kit/core/src/store/store.test.ts b/account-kit/core/src/store/store.test.ts deleted file mode 100644 index 84333f43a2..0000000000 --- a/account-kit/core/src/store/store.test.ts +++ /dev/null @@ -1,647 +0,0 @@ -import { - alchemy, - arbitrumSepolia, - baseSepolia, - sepolia, -} from "@account-kit/infra"; -import { getAlchemyTransport } from "../actions/getAlchemyTransport.js"; -import { setChain } from "../actions/setChain.js"; -import { createConfig } from "../createConfig.js"; -import { createDefaultAccountState, STORAGE_VERSION } from "./store.js"; -import { DEFAULT_STORAGE_KEY } from "./types.js"; - -describe("createConfig tests", () => { - it("should setup the config with the correct transport", async () => { - const config = await givenConfig(); - - expect({ ...getAlchemyTransport(config) }).toMatchInlineSnapshot( - { - dynamicFetchOptions: { - headers: { - "Alchemy-AA-Sdk-Version": expect.stringMatching(/^\d+\.\d+\.\d+/), - }, - }, - }, - ` - { - "config": { - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - "dynamicFetchOptions": { - "headers": { - "Alchemy-AA-Sdk-Version": StringMatching /\\^\\\\d\\+\\\\\\.\\\\d\\+\\\\\\.\\\\d\\+/, - }, - }, - "updateHeaders": [Function], - } - `, - ); - }); - - it("should rehydrate the current chain and transport", async () => { - const config = await givenConfig(); - - // update the chain so we can make sure the store is updated - expect(getStorageItem("chain").id).toBe(sepolia.id); - await setChain(config, arbitrumSepolia); - expect(getStorageItem("chain").id).toBe(arbitrumSepolia.id); - - // create a config that is the result of a rehydration - const hydratedConfig = await givenConfig(); - - expect(hydratedConfig.store.getState().chain.id).toBe( - config.store.getState().chain.id, - ); - - expect(hydratedConfig.store.getState().bundlerClient.chain.id).toBe( - config.store.getState().bundlerClient.chain.id, - ); - - expect(getAlchemyTransport(hydratedConfig).config).toMatchInlineSnapshot(` - { - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - } - `); - }); - - it("should overwrite the state if the config changed (chain removed)", async () => { - await givenConfig(); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 421614, - { - "chain": { - "id": 421614, - }, - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - }, - }, - ], - ], - } - `); - - const config2 = createConfig({ - chain: sepolia, - chains: [ - { - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - policyId: "test-policy-id", - }, - ], - signerConnection: { rpcUrl: "/api/signer" }, - storage: () => localStorage, - }); - - await config2.store.persist.rehydrate(); - config2.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - ], - } - `); - }); - - it("should overwrite the state if the config changed (policyId changed)", async () => { - await givenConfig(); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 421614, - { - "chain": { - "id": 421614, - }, - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - }, - }, - ], - ], - } - `); - - const config2 = createConfig({ - chain: sepolia, - chains: [ - { - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - policyId: "test-policy-id2", - }, - { - chain: arbitrumSepolia, - transport: alchemy({ rpcUrl: "/api/arbitrumSepolia" }), - }, - ], - signerConnection: { rpcUrl: "/api/signer" }, - storage: () => localStorage, - }); - - await config2.store.persist.rehydrate(); - config2.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id2", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 421614, - { - "chain": { - "id": 421614, - }, - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - }, - }, - ], - ], - } - `); - }); - - it("should overwrite the state if the config changed (chain swapped out)", async () => { - await givenConfig(); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 421614, - { - "chain": { - "id": 421614, - }, - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - }, - }, - ], - ], - } - `); - - const config2 = createConfig({ - chain: sepolia, - chains: [ - { - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - policyId: "test-policy-id", - }, - { - chain: baseSepolia, - // this isn't a typo, I'm testing the chain swap out - transport: alchemy({ rpcUrl: "/api/arbitrumSepolia" }), - }, - ], - signerConnection: { rpcUrl: "/api/signer" }, - storage: () => localStorage, - }); - - await config2.store.persist.rehydrate(); - config2.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 84532, - { - "chain": { - "id": 84532, - }, - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - }, - }, - ], - ], - } - `); - }); - - it("should overwrite the state if the config changed (signer config)", async () => { - await givenConfig(); - expect(getStorageItem("config")).toMatchInlineSnapshot(` - { - "client": { - "connection": { - "rpcUrl": "/api/signer", - }, - }, - } - `); - - const config2 = createConfig({ - chain: sepolia, - chains: [ - { - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - policyId: "test-policy-id", - }, - { - chain: baseSepolia, - // this isn't a typo, I'm testing the chain swap out - transport: alchemy({ rpcUrl: "/api/arbitrumSepolia" }), - }, - ], - signerConnection: { rpcUrl: "/api/signer" }, - oauthCallbackUrl: "https://example.com", - storage: () => localStorage, - }); - - await config2.store.persist.rehydrate(); - config2.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - expect(getStorageItem("config")).toMatchInlineSnapshot(` - { - "client": { - "connection": { - "rpcUrl": "/api/signer", - }, - "oauthCallbackUrl": "https://example.com", - }, - } - `); - }); - - it("should overwrite the state if the config changed (transport changed out)", async () => { - await givenConfig(); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 421614, - { - "chain": { - "id": 421614, - }, - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - }, - }, - ], - ], - } - `); - - const config2 = createConfig({ - chain: sepolia, - chains: [ - { - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - policyId: "test-policy-id", - }, - { - chain: arbitrumSepolia, - // this isn't a typo, I'm testing the chain swap out - transport: alchemy({ apiKey: "test-api-key" }), - }, - ], - signerConnection: { rpcUrl: "/api/signer" }, - storage: () => localStorage, - }); - - await config2.store.persist.rehydrate(); - config2.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - expect(getStorageItem("connections")).toMatchInlineSnapshot(` - { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 421614, - { - "chain": { - "id": 421614, - }, - "transport": { - "__type": "Transport", - "apiKey": "test-api-key", - "chainAgnosticUrl": "/api/signer/v2", - }, - }, - ], - ], - } - `); - }); - - it("should correctly serialize the state to storage", async () => { - await givenConfig(); - - expect(JSON.parse(localStorage.getItem(DEFAULT_STORAGE_KEY) ?? "{}")) - .toMatchInlineSnapshot(` - { - "state": { - "accountConfigs": { - "11155111": {}, - "421614": {}, - }, - "chain": { - "id": 11155111, - }, - "config": { - "client": { - "connection": { - "rpcUrl": "/api/signer", - }, - }, - }, - "connections": { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - [ - 421614, - { - "chain": { - "id": 421614, - }, - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/arbitrumSepolia", - }, - }, - ], - ], - }, - "signerStatus": { - "isAuthenticating": false, - "isConnected": false, - "isDisconnected": false, - "isInitializing": true, - "status": "INITIALIZING", - }, - "smartWalletClients": {}, - }, - "version": ${STORAGE_VERSION}, - } - `); - }); - - it("should serialize/deserialize state correctly when using single chain config", async () => { - const config = createConfig({ - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - signerConnection: { rpcUrl: "/api/signer" }, - sessionConfig: { - expirationTimeMs: 1000, - }, - policyId: "test-policy-id", - storage: () => localStorage, - }); - - await config.store.persist.rehydrate(); - - config.store.setState({ - accounts: createDefaultAccountState([sepolia]), - }); - - expect(JSON.parse(localStorage.getItem(DEFAULT_STORAGE_KEY) ?? "{}")) - .toMatchInlineSnapshot(` - { - "state": { - "accountConfigs": { - "11155111": {}, - }, - "chain": { - "id": 11155111, - }, - "config": { - "client": { - "connection": { - "rpcUrl": "/api/signer", - }, - }, - "sessionConfig": { - "expirationTimeMs": 1000, - }, - }, - "connections": { - "__type": "Map", - "value": [ - [ - 11155111, - { - "chain": { - "id": 11155111, - }, - "policyId": "test-policy-id", - "transport": { - "__type": "Transport", - "chainAgnosticUrl": "/api/signer/v2", - "rpcUrl": "/api/sepolia", - }, - }, - ], - ], - }, - "signerStatus": { - "isAuthenticating": false, - "isConnected": false, - "isDisconnected": false, - "isInitializing": true, - "status": "INITIALIZING", - }, - "smartWalletClients": {}, - }, - "version": ${STORAGE_VERSION}, - } - `); - }); - - const getStorageItem = (name: string) => { - return JSON.parse(localStorage.getItem(DEFAULT_STORAGE_KEY) ?? "{}")[ - "state" - ][name]; - }; - - const givenConfig = async () => { - const config = createConfig({ - chain: sepolia, - chains: [ - { - chain: sepolia, - transport: alchemy({ rpcUrl: "/api/sepolia" }), - policyId: "test-policy-id", - }, - { - chain: arbitrumSepolia, - transport: alchemy({ rpcUrl: "/api/arbitrumSepolia" }), - }, - ], - signerConnection: { rpcUrl: "/api/signer" }, - storage: () => localStorage, - }); - - await config.store.persist.rehydrate(); - - config.store.setState({ - accounts: createDefaultAccountState([sepolia, arbitrumSepolia]), - }); - - return config; - }; -}); diff --git a/account-kit/core/src/store/store.ts b/account-kit/core/src/store/store.ts deleted file mode 100644 index 41d356b00a..0000000000 --- a/account-kit/core/src/store/store.ts +++ /dev/null @@ -1,427 +0,0 @@ -import type { NoUndefined } from "@aa-sdk/core"; -import { alchemy, createAlchemyPublicRpcClient } from "@account-kit/infra"; -import { - AlchemySignerStatus, - AlchemyWebSigner, - type ErrorInfo, -} from "@account-kit/signer"; -import { Connection as SolanaWeb3Connection } from "@solana/web3.js"; -import type { Chain } from "viem"; -import { - createJSONStorage, - persist, - subscribeWithSelector, -} from "zustand/middleware"; -import { createStore } from "zustand/vanilla"; -import { DEFAULT_IFRAME_CONTAINER_ID } from "../createConfig.js"; -import { type Connection, type SupportedAccountTypes } from "../types.js"; -import { storeReplacer } from "../utils/replacer.js"; -import { storeReviver } from "../utils/reviver.js"; -import { - DEFAULT_STORAGE_KEY, - type AccountState, - type ClientStoreConfig, - type CreateAccountKitStoreParams, - type SignerStatus, - type Store, - type StoreState, -} from "./types.js"; - -export const STORAGE_VERSION = 14; - -export const createAccountKitStore = ( - params: CreateAccountKitStoreParams, -): Store => { - const { - connections, - storage = typeof window !== "undefined" ? localStorage : undefined, - ssr, - } = params; - - // State defined in here should work either on the server or on the client - // bundler client for example can be used in either setting to make RPC calls - const store = createStore( - subscribeWithSelector( - storage - ? persist(() => createInitialStoreState(params), { - name: DEFAULT_STORAGE_KEY, - storage: createJSONStorage(() => storage, { - replacer: (key, value) => { - if (key === "bundlerClient") return undefined; - - if (value instanceof SolanaWeb3Connection) { - return undefined; - } - if (key === "user") { - const user = value as StoreState["user"]; - if (!user) return undefined; - - return { - address: user.address, - solanaAddress: user.solanaAddress, - orgId: user.orgId, - userId: user.userId, - email: user.email, - } as StoreState["user"]; - } - - if (key === "chain") { - return { id: (value as Chain).id }; - } - - if (key === "smartAccountClients") { - return undefined; - } - - return storeReplacer(key, value); - }, - reviver: (key, value) => { - if (key === "chain") { - return connections.find( - (c) => c.chain.id === (value as { id: number }).id, - )?.chain; - } - - return storeReviver(key, value); - }, - }), - migrate: (persisted, version) => { - if (version < STORAGE_VERSION) { - return createInitialStoreState(params); - } - - return persisted as StoreState; - }, - merge: (persisted, current) => { - const persistedState = persisted as StoreState; - const transportConnection = persistedState.connections.get( - persistedState.chain.id, - ); - if (persistedState.chain == null) { - return createInitialStoreState(params); - } - - if (transportConnection == null) { - return createInitialStoreState(params); - } - - const connectionsMap = createConnectionsMap(connections); - if (!connectionsMap.has(persistedState.chain.id)) { - return createInitialStoreState(params); - } - - // simple check to ensure the same chains are present - if (persistedState.connections.size !== connectionsMap.size) { - return createInitialStoreState(params); - } - - // check if all of the connections in the config match the persisted connections - if ( - !connections.every( - (c) => - persistedState.connections.has(c.chain.id) && - deepEquals(persistedState.connections.get(c.chain.id), c), - ) - ) { - return createInitialStoreState(params); - } - - // handle the case where the signer config changes - if (!deepEquals(current.config, persistedState.config)) { - return createInitialStoreState(params); - } - - return { - // this is the default merge behavior - ...current, - ...persistedState, - smartAccountClients: createEmptySmartAccountClientState( - connections.map((c) => c.chain), - ), - smartWalletClients: createEmptySmartWalletClientState( - connections.map((c) => c.chain), - ), - connections: connectionsMap, - solana: params.solana, - bundlerClient: createAlchemyPublicRpcClient({ - chain: persistedState.chain, - transport: alchemy(transportConnection.transport), - }), - }; - }, - skipHydration: ssr, - partialize: (state) => { - const { signer, accounts, solana, ...writeableState } = state; - return writeableState; - }, - version: STORAGE_VERSION, - }) - : () => createInitialStoreState(params), - ), - ); - - addClientSideStoreListeners(store); - - return store; -}; - -const createInitialStoreState = ( - params: CreateAccountKitStoreParams, -): StoreState => { - const { connections, chain, client, sessionConfig } = params; - const connectionMap = createConnectionsMap(connections); - const transportConnection = connectionMap.get(chain.id); - - if (!transportConnection) { - throw new Error("Chain not found in connections"); - } - - const chains = connections.map((c) => c.chain); - const accountConfigs = createEmptyAccountConfigState(chains); - const baseState: StoreState = { - bundlerClient: createAlchemyPublicRpcClient({ - chain, - transport: alchemy(transportConnection.transport), - }), - chain, - connections: connectionMap, - accountConfigs, - config: { client, sessionConfig }, - signerStatus: convertSignerStatusToState( - AlchemySignerStatus.INITIALIZING, - undefined, - ), - smartAccountClients: createEmptySmartAccountClientState(chains), - smartWalletClients: createEmptySmartWalletClientState(chains), - user: undefined, - }; - - if ("solana" in params && params.solana) { - baseState.solana = params.solana; - } - - if (typeof window === "undefined") { - return baseState; - } - - const accounts = createDefaultAccountState(chains); - - return { - ...baseState, - accounts, - }; -}; - -const createConnectionsMap = (connections: Connection[]) => { - return connections.reduce((acc, connection) => { - acc.set(connection.chain.id, connection); - return acc; - }, new Map()); -}; - -/** - * Given initial client store parameters, it initializes an AlchemySigner instance. - * This should only be called on the client. - * - * @param {CreateClientStoreParams} params to configure and create the signer - * @returns {AlchemySigner} an instance of the AlchemySigner - */ -export const createSigner = (params: ClientStoreConfig) => { - const { client, sessionConfig } = params; - const { iframeContainerId } = client.iframeConfig ?? { - iframeContainerId: DEFAULT_IFRAME_CONTAINER_ID, - }; - - let iframeContainer = document.getElementById(iframeContainerId); - if (iframeContainer !== null) { - iframeContainer.innerHTML = ""; - iframeContainer.style.display = "none"; - } else { - iframeContainer = document.createElement("div"); - iframeContainer.id = iframeContainerId; - iframeContainer.style.display = "none"; - document.body.appendChild(iframeContainer); - } - - const signer = new AlchemyWebSigner({ - client: { - ...client, - iframeConfig: { - ...client.iframeConfig, - iframeContainerId, - }, - }, - sessionConfig, - }); - - if (client.enablePopupOauth) { - signer.preparePopupOauth(); - } - - return signer; -}; - -const AUTHENTICATING_STATUSES: AlchemySignerStatus[] = [ - AlchemySignerStatus.AUTHENTICATING_EMAIL, - AlchemySignerStatus.AUTHENTICATING_OAUTH, - AlchemySignerStatus.AUTHENTICATING_PASSKEY, - AlchemySignerStatus.AWAITING_EMAIL_AUTH, - AlchemySignerStatus.AWAITING_OTP_AUTH, - AlchemySignerStatus.AWAITING_SMS_AUTH, -]; - -/** - * Converts the AlchemySigner's status to a more readable object - * - * @param {AlchemySignerStatus} alchemySignerStatus Enum value of the AlchemySigner's status to convert - * @param {ErrorInfo | undefined} error the current signer error, if present - * @returns {SignerStatus} an object containing the original status as well as booleans to check the current state - */ -export const convertSignerStatusToState = ( - alchemySignerStatus: AlchemySignerStatus, - error: ErrorInfo | undefined, -): SignerStatus => ({ - status: alchemySignerStatus, - error, - isInitializing: alchemySignerStatus === AlchemySignerStatus.INITIALIZING, - isAuthenticating: AUTHENTICATING_STATUSES.includes(alchemySignerStatus), - isConnected: alchemySignerStatus === AlchemySignerStatus.CONNECTED, - isDisconnected: alchemySignerStatus === AlchemySignerStatus.DISCONNECTED, -}); - -// This is done this way to avoid issues with React requiring static state -const staticState: AccountState = { - status: "DISCONNECTED", - account: undefined, -}; - -/** - * Returns the default state for an account of a supported type. - * - * @example - * ```ts - * import { defaultAccountState } from "@account-kit/core"; - * - * const defaultLightAccountState = defaultAccountState<"LightAccount">(); - * ``` - * - * @template T - * @returns {AccountState} The default state for the specified account type - */ -export const defaultAccountState = < - T extends SupportedAccountTypes, ->(): AccountState => staticState; - -const addClientSideStoreListeners = (store: Store) => { - if (typeof window === "undefined") { - return; - } - - store.subscribe( - ({ signer }) => signer, - (signer) => { - if (!signer) return; - signer.on("statusChanged", (status) => { - store.setState((state) => ({ - signerStatus: convertSignerStatusToState( - status, - state.signerStatus.error, - ), - })); - }); - - // TODO: handle this appropriately, see https://github.com/alchemyplatform/aa-sdk/pull/1140#discussion_r1837265706 - // signer.on("newUserSignup", () => console.log("got new user signup")); - - signer.on("connected", (user) => store.setState({ user })); - - signer.on("disconnected", () => { - const chains = [...store.getState().connections.values()].map( - (c) => c.chain, - ); - store.setState({ - user: undefined, - accountConfigs: createEmptyAccountConfigState(chains), - accounts: createDefaultAccountState(chains), - }); - }); - - signer.on("errorChanged", (error) => - store.setState((state) => ({ - signerStatus: convertSignerStatusToState( - state.signerStatus.status, - error, - ), - })), - ); - }, - { fireImmediately: true }, - ); -}; - -const createEmptyAccountConfigState = (chains: Chain[]) => { - return chains.reduce( - (acc, chain) => { - acc[chain.id] = {}; - return acc; - }, - {} as StoreState["accountConfigs"], - ); -}; - -/** - * Creates the default account state for the given chains. - * - * @param {Chain[]} chains The chains to create the account state for - * @returns {NoUndefined} The default account state for the given chains - */ -export const createDefaultAccountState = (chains: Chain[]) => { - return chains.reduce( - (acc, chain) => { - acc[chain.id] = { - LightAccount: defaultAccountState<"LightAccount">(), - MultiOwnerModularAccount: - defaultAccountState<"MultiOwnerModularAccount">(), - MultiOwnerLightAccount: defaultAccountState<"MultiOwnerLightAccount">(), - ModularAccountV2: defaultAccountState<"ModularAccountV2">(), - }; - return acc; - }, - {} as NoUndefined, - ); -}; - -export const createEmptySmartAccountClientState = (chains: Chain[]) => { - return chains.reduce( - (acc, chain) => { - acc[chain.id] = {}; - - return acc; - }, - {} as StoreState["smartAccountClients"], - ); -}; - -export const createEmptySmartWalletClientState = (chains: Chain[]) => { - return chains.reduce( - (acc, chain) => { - acc[chain.id] = undefined; - - return acc; - }, - {} as StoreState["smartWalletClients"], - ); -}; -const deepEquals = (obj1: any, obj2: any) => { - if (typeof obj1 !== typeof obj2) return false; - if (typeof obj1 !== "object") return obj1 === obj2; - if (obj1 === null && obj2 === null) return true; - if (obj1 === null || obj2 === null) return false; - if (obj1.length !== obj2.length) return false; - - for (const key in obj1) { - if (!deepEquals(obj1[key], obj2[key])) return false; - } - - return true; -}; diff --git a/account-kit/core/src/store/types.ts b/account-kit/core/src/store/types.ts deleted file mode 100644 index 653997ac53..0000000000 --- a/account-kit/core/src/store/types.ts +++ /dev/null @@ -1,125 +0,0 @@ -import type { ClientWithAlchemyMethods } from "@account-kit/infra"; -import type { - AlchemySignerParams, - AlchemySignerStatus, - AlchemySignerWebClient, - ErrorInfo, - User, -} from "@account-kit/signer"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import type { State as WagmiState } from "@wagmi/core"; -import type { Address, Chain } from "viem"; -import type { PartialBy } from "viem/chains"; -import type { Mutate, StoreApi } from "zustand/vanilla"; -import type { AccountConfig } from "../actions/createAccount"; -import type { GetSmartAccountClientResult } from "../actions/getSmartAccountClient"; -import type { - AlchemySigner, - Connection, - SolanaConnection, - SupportedAccount, - SupportedAccountTypes, -} from "../types"; - -export const DEFAULT_STORAGE_KEY = "alchemy-account-state"; - -export type AccountState = - | { - status: "INITIALIZING"; - account: Promise>; - error?: never; - } - | { - status: "RECONNECTING"; - account: { - address: Address; - }; - error?: never; - } - | { - status: "READY"; - account: SupportedAccount; - error?: never; - } - | { status: "DISCONNECTED"; account: undefined; error?: never } - | { status: "ERROR"; account: undefined; error: Error }; - -export type ClientStoreConfig = { - client: PartialBy< - Exclude, - "iframeConfig" - >; - sessionConfig?: AlchemySignerParams["sessionConfig"]; -}; - -export type SignerStatus = { - status: AlchemySignerStatus; - error?: ErrorInfo; - isInitializing: boolean; - isAuthenticating: boolean; - isConnected: boolean; - isDisconnected: boolean; -}; - -export type StoredState = { - alchemy: Omit; - wagmi?: WagmiState; -}; - -export type CreateAccountKitStoreParams = ClientStoreConfig & { - connections: Connection[]; - chain: Chain; - client: PartialBy< - Exclude, - "iframeConfig" - >; - sessionConfig?: AlchemySignerParams["sessionConfig"]; - storage?: Storage; - ssr?: boolean; - solana?: SolanaConnection; -}; - -export type StoreState = { - // non-serializable - signer?: AlchemySigner; - accounts?: { - [chain: number]: { - [key in SupportedAccountTypes]: AccountState; - }; - }; - smartAccountClients: { - [chain: number]: Partial<{ - [key in SupportedAccountTypes]: GetSmartAccountClientResult< - Chain, - SupportedAccount - >; - }>; - }; - smartWalletClients: { - [chain: number]: SmartWalletClient | undefined; - }; - bundlerClient: ClientWithAlchemyMethods; - // serializable state - // NOTE: in some cases this can be serialized to cookie storage - // be mindful of how big this gets. cookie limit 4KB - config: ClientStoreConfig; - accountConfigs: { - [chain: number]: Partial<{ - [key in SupportedAccountTypes]: AccountConfig; - }>; - }; - user?: User; - signerStatus: SignerStatus; - chain: Chain; - connections: Map; - solana?: SolanaConnection; -}; - -type Expanded = { [K in keyof T]: T[K] }; - -type Middleware = [ - ["zustand/subscribeWithSelector", never], - ["zustand/persist", StoreState], -]; - -export type Store = Expanded, Middleware>>; diff --git a/account-kit/core/src/types.ts b/account-kit/core/src/types.ts deleted file mode 100644 index c087a4e58e..0000000000 --- a/account-kit/core/src/types.ts +++ /dev/null @@ -1,209 +0,0 @@ -import type { ConnectionConfig } from "@aa-sdk/core"; -import type { - AlchemyTransport, - AlchemyTransportConfig, - PolicyToken, -} from "@account-kit/infra"; - -import type { - RNAlchemySignerSingleton as RNAlchemySigner, - RNSignerClient, -} from "@account-kit/react-native-signer"; -import type { - AlchemySignerParams, - AlchemySignerWebClient, - AlchemyWebSigner, -} from "@account-kit/signer"; -import type { - LightAccount, - LightAccountVersion, - ModularAccountV2, - MultiOwnerLightAccount, - MultiOwnerModularAccount, -} from "@account-kit/smart-contracts"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import type { Connection as SolanaWeb3Connection } from "@solana/web3.js"; -import type { CreateConnectorFn } from "@wagmi/core"; -import { type Config as WagmiConfig } from "@wagmi/core"; -import type { Chain } from "viem"; -import type { PartialBy } from "viem/chains"; -import type { ClientStoreConfig, Store, StoredState } from "./store/types"; -import type { WalletAdapter } from "@solana/wallet-adapter-base"; - -export type SupportedAccountTypes = - | "MultiOwnerLightAccount" - | "LightAccount" - | "MultiOwnerModularAccount" - | "ModularAccountV2"; - -export type SupportedAccounts = - | LightAccount> - | MultiOwnerModularAccount - | MultiOwnerLightAccount< - AlchemySigner, - LightAccountVersion<"MultiOwnerLightAccount"> - > - | ModularAccountV2; - -export type SupportedAccount = - T extends "LightAccount" - ? LightAccount - : T extends "MultiOwnerModularAccount" - ? MultiOwnerModularAccount - : T extends "MultiOwnerLightAccount" - ? MultiOwnerLightAccount - : T extends "ModularAccountV2" - ? ModularAccountV2 - : never; - -export type AlchemyAccountsConfig = { - store: Store; - accountCreationHint?: CreateConfigProps["accountCreationHint"]; - solana?: { - adapters?: WalletAdapter[] | "detect"; - connection: SolanaWeb3Connection; - }; - _internal: { - // if not provided, the default signer will be used - createSigner: (config: ClientStoreConfig) => AlchemySigner; - wagmiConfig: WagmiConfig; - ssr?: boolean; - storageKey: string; - sessionLength: number; - }; -}; - -export type SolanaConnection = { - connection: SolanaWeb3Connection; - policyId?: string; - /** - * Array of Solana wallet adapters to be used for connecting to wallets. - * Set to "detect" to auto-detect installed wallets, or provide explicit adapters. - * These adapters will be made available in the React context for wallet selection. - * - * @example - * ```ts - * import { PhantomWalletAdapter, SolflareWalletAdapter } from "@solana/wallet-adapter-wallets"; - * - * // Auto-detect installed wallets - * const config = createConfig({ - * // ... other config - * solana: { - * connection: solanaConnection, - * adapters: "detect" - * } - * }); - * - * // Explicit wallet configuration - * const config = createConfig({ - * // ... other config - * solana: { - * connection: solanaConnection, - * adapters: [ - * new PhantomWalletAdapter(), - * new SolflareWalletAdapter(), - * ] - * } - * }); - * ``` - */ - adapters?: WalletAdapter[] | "detect"; -}; - -export type Connection = { - transport: AlchemyTransportConfig; - chain: Chain; - policyId?: string | string[]; - policyToken?: PolicyToken; -}; - -type RpcConnectionConfig = - | { - chain: Chain; - chains: { - chain: Chain; - policyId?: string | string[]; - // optional transport override - transport?: AlchemyTransport; - }[]; - solana?: SolanaConnection; - // optional global transport to use for all chains - transport: AlchemyTransport; - // When providing multiple chains and no default transport, the signer connection is required - signerConnection?: ConnectionConfig; - policyId?: string | string[]; - policyToken?: never; - } - | { - chain: Chain; - chains: { - chain: Chain; - policyId?: string | string[]; - transport: AlchemyTransport; - }[]; - solana?: SolanaConnection; - transport?: never; - // When providing multiple chains, then the signer connection is required - signerConnection: ConnectionConfig; - policyId?: string | string[]; - policyToken?: never; - } - | { - transport: AlchemyTransport; - chain: Chain; - solana?: SolanaConnection; - policyId?: string | string[]; - policyToken?: PolicyToken; - signerConnection?: ConnectionConfig; - chains?: never; - }; - -type CreateStorageFn = (config?: { - /** @deprecated Use `sessionConfig` to define session length instead. */ - sessionLength?: number; - domain?: string; -}) => Storage; - -export type AlchemyClientState = StoredState; - -export type AlchemySigner = AlchemyWebSigner | RNAlchemySigner; - -export type AlchemySignerClient = (AlchemyWebSigner | RNSignerClient) & {}; - -export type BaseCreateConfigProps = RpcConnectionConfig & { - sessionConfig?: AlchemySignerParams["sessionConfig"] & { domain?: string }; - /** - * Enable this parameter if you are using the config in an SSR setting (eg. NextJS) - * Turing this setting on will disable automatic hydration of the client store - */ - ssr?: boolean; - - storage?: CreateStorageFn; - - connectors?: CreateConnectorFn[]; - - accountCreationHint?: NonNullable< - Parameters[0] - >["creationHint"]; - - /** - * If set, calls `preparePopupOauth` immediately upon initializing the signer. - * If you intend to use popup-based OAuth login, you must either set this - * option to true or manually ensure that you call - * `signer.preparePopupOauth()` at some point before the user interaction that - * triggers the OAuth authentication flow. - */ - enablePopupOauth?: boolean; -} & Omit< - PartialBy< - Exclude, - "iframeConfig" - >, - "connection" - >; - -export type CreateConfigProps = BaseCreateConfigProps & { - _internal?: { - createSigner?: (config: ClientStoreConfig) => AlchemySigner; - }; -}; diff --git a/account-kit/core/src/utils/cookies.ts b/account-kit/core/src/utils/cookies.ts deleted file mode 100644 index cdf44fd83a..0000000000 --- a/account-kit/core/src/utils/cookies.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { cookieToInitialState as wagmiCookieToInitialState } from "@wagmi/core"; -import Cookies from "js-cookie"; -import type { StoredState } from "../store/types.js"; -import type { AlchemyAccountsConfig } from "../types.js"; -import { deserialize } from "./deserialize.js"; -import { DEFAULT_SESSION_MS } from "@account-kit/signer"; - -// The maximum duration of a cookie according to the spec is 400 days. -// https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#name-cookie-lifetime-limits -const MAX_COOKIE_DURATION_MS = 1000 * 60 * 60 * 24 * 400; - -/** - * Function to create cookie based Storage - * - * @param {{sessionLength: number; domain?: string}} config optional config object - * @param {number} config.sessionLength the duration until the cookie expires in milliseconds (deprecated) - * @param {string} config.domain optional domain to set the cookie on, eg: `example.com` if you want the cookie to work on all subdomains of example.com - * @returns {Storage} an instance of a browser storage object that leverages cookies - */ -export const cookieStorage = (config?: { - /** @deprecated this option is deprecated and will be ignored */ - sessionLength?: number; - domain?: string; -}): Storage => { - if (config?.sessionLength) { - console.warn( - "The cookieStorage sessionLength option is deprecated and will be ignored.", - ); - } - return { - // this is unused for now, we should update this if we do need it - length: 0, - - clear: function (): void { - throw new Error( - "clearing cookies is not supported as this could lead to unexpected behaviour.\n" + - " Use removeItem instead or you can manually clear cookies with document.cookie = ''", - ); - }, - - getItem: function (key: string): string | null { - if (typeof document === "undefined") return null; - - const cookieValue = Cookies.get(key); - return cookieValue ? decodeURIComponent(cookieValue) : null; - }, - - // we will not be using this, if we have need for it add it back later - key: function (): string | null { - throw new Error("Function not implemented."); - }, - - removeItem: function (key: string): void { - if (typeof document === "undefined") return; - - Cookies.remove(key); - }, - - setItem: function (key: string, value: string): void { - if (typeof document === "undefined") return; - - Cookies.set(key, value, { - expires: new Date(Date.now() + MAX_COOKIE_DURATION_MS), - domain: config?.domain, - }); - }, - }; -}; - -/** - * Converts a cookie into an initial state object - * - * @param {AlchemyAccountsConfig} config the account config containing the client store - * @param {string | undefined} cookie optional cookie string - * @returns {StoredState | undefined} the deserialized AlchemyClientState if the cookie exists, otherwise undefined - */ -export function cookieToInitialState( - config: AlchemyAccountsConfig, - cookie?: string, -): StoredState | undefined { - if (!cookie) return; - - const state = parseCookie(cookie, config._internal.storageKey); - if (!state) return; - - const alchemyClientState = deserialize<{ - state: StoredState["alchemy"]; - }>(state).state; - - alchemyClientState.config.sessionConfig = { - ...alchemyClientState.config.sessionConfig, - // Always use the session expiration time set in the config. - expirationTimeMs: - config.store.getInitialState().config.sessionConfig?.expirationTimeMs ?? - DEFAULT_SESSION_MS, - }; - - const wagmiClientState = wagmiCookieToInitialState( - config._internal.wagmiConfig, - decodeURIComponent(cookie), - ); - - return { - alchemy: alchemyClientState, - wagmi: wagmiClientState, - }; -} - -/** - * Helper function that can be used to parse a cookie string on the server or client - * - * @param {string} cookie the cookie string to parse - * @param {string} key the key of the cookie to parse - * @returns {string} the value of the cookie given a key if it exists, otherwise undefined - */ -export function parseCookie(cookie: string, key: string) { - const keyValue = cookie.split("; ").find((x) => x.startsWith(`${key}=`)); - if (!keyValue) return undefined; - return keyValue.substring(key.length + 1); -} diff --git a/account-kit/core/src/utils/deserialize.ts b/account-kit/core/src/utils/deserialize.ts deleted file mode 100644 index 95f5eccd3b..0000000000 --- a/account-kit/core/src/utils/deserialize.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { storeReviver } from "./reviver.js"; - -/** - * JSON parses a string while correctly handling BigInt and Map types. - * This method will take the string input, decodeURIComponent it, and then json parse it. - * It handles BigInt and Map types by checking for the __type key and converting the value to the correct type. - * Those types are generated by the `serialize` method exported alongside this one - * - * @param {string} value the string to deserialize - * @returns {T} the parsed object - */ -export function deserialize(value: string): type { - return JSON.parse(decodeURIComponent(value), storeReviver); -} diff --git a/account-kit/core/src/utils/replacer.ts b/account-kit/core/src/utils/replacer.ts deleted file mode 100644 index 8654ca8d39..0000000000 --- a/account-kit/core/src/utils/replacer.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * JSON stringify replacer that correctly handles BigInt and Map types. - * - * @param {string} key the key in the JSON object - * @param {any} value_ the value to convert if map or bigint - * @returns {any} the replaced value - */ -export const storeReplacer = (key: string, value_: any) => { - let value = value_; - if (key === "transport") { - value = { __type: "Transport", ...value }; - } - if (typeof value === "bigint") - value = { __type: "bigint", value: value_.toString() }; - if (value instanceof Map) - value = { - __type: "Map", - value: Array.from(value_.entries()), - }; - return value; -}; diff --git a/account-kit/core/src/utils/reviver.ts b/account-kit/core/src/utils/reviver.ts deleted file mode 100644 index 8b25c60509..0000000000 --- a/account-kit/core/src/utils/reviver.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Revives a Map and BigInts from a JSON string that contains them - * in the format of {__type: "bigint" | "Map", value: any } - * - * @param {string} _key the key in the JSON object being revivied - * @param {any} value_ the value of the key being revived - * @returns {any} the revived value - */ -export const storeReviver = (_key: string, value_: any) => { - let value = value_; - if (value?.__type === "Transport") { - const { __type, ...config } = value; - value = config; - } - if (value?.__type === "bigint") value = BigInt(value.value); - if (value?.__type === "Map") value = new Map(value.value); - return value; -}; diff --git a/account-kit/core/src/version.ts b/account-kit/core/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/core/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/core/vitest.config.ts b/account-kit/core/vitest.config.ts deleted file mode 100644 index 579c9bc70f..0000000000 --- a/account-kit/core/vitest.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { join } from "node:path"; -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/core", - environment: "jsdom", - setupFiles: [ - ...(sharedConfig.test?.setupFiles ?? []), - join(__dirname, "setupTests.ts"), - ], - }, - }), -); diff --git a/account-kit/infra/CHANGELOG.md b/account-kit/infra/CHANGELOG.md deleted file mode 100644 index adab8c42de..0000000000 --- a/account-kit/infra/CHANGELOG.md +++ /dev/null @@ -1,960 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/infra - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/infra - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/infra - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/infra - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/infra - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -### Bug Fixes - -- extend worldchain from viem/chains ([#2301](https://github.com/alchemyplatform/aa-sdk/issues/2301)) ([#2312](https://github.com/alchemyplatform/aa-sdk/issues/2312)) ([241ea9b](https://github.com/alchemyplatform/aa-sdk/commit/241ea9be0dc2e627c39a20b4b6fd9759ca0f44d0)) - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/infra - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/infra - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/infra - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/infra - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/infra - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/infra - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/infra - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -### Features - -- **monad:** add monad mainnet ([#2014](https://github.com/alchemyplatform/aa-sdk/issues/2014)) ([323612b](https://github.com/alchemyplatform/aa-sdk/commit/323612be774d7d93a8fc945539c1cd45001ed6cc)) - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -### Bug Fixes - -- **chains:** expose worldl3devnet ([#2274](https://github.com/alchemyplatform/aa-sdk/issues/2274)) ([a85d0a4](https://github.com/alchemyplatform/aa-sdk/commit/a85d0a4e0300c7aa4b13b62e537815e31db322b4)) - -### Features - -- **mythos:** add mythos mainnet ([#2265](https://github.com/alchemyplatform/aa-sdk/issues/2265)) ([2a53ac2](https://github.com/alchemyplatform/aa-sdk/commit/2a53ac2a4c7d820c66d764ea3f5dedafb605518c)) - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -### Features - -- add worldl3-devnet ([#2251](https://github.com/alchemyplatform/aa-sdk/issues/2251)) ([bbab618](https://github.com/alchemyplatform/aa-sdk/commit/bbab618dc7dc6b77354ab5b944ad3ae5d11ec5b5)) -- adds celo sepolia ([#2239](https://github.com/alchemyplatform/aa-sdk/issues/2239)) ([11d46d1](https://github.com/alchemyplatform/aa-sdk/commit/11d46d1a54ec2faf191d007beb3b92ec72839d06)) -- adds edge mainnet ([#2241](https://github.com/alchemyplatform/aa-sdk/issues/2241)) ([27e3632](https://github.com/alchemyplatform/aa-sdk/commit/27e36329c103b4660886c9508b86d0a2c5c6c47e)) -- **stable:** add stable mainnet ([#2259](https://github.com/alchemyplatform/aa-sdk/issues/2259)) ([f713157](https://github.com/alchemyplatform/aa-sdk/commit/f713157b4db575f7662bc2c6e814286997430f3b)) - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -### Features - -- adding-bsc-import ([395e839](https://github.com/alchemyplatform/aa-sdk/commit/395e839cd07c71bdd1bdf3ce2dde24f51fd73ec0)) - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/infra - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/infra - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/infra - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/infra - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/infra - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/infra - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/infra - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/infra - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/infra - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/infra - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/infra - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/infra - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -### Features - -- add webhook data to gas manager middleware ([#2180](https://github.com/alchemyplatform/aa-sdk/issues/2180)) ([93be151](https://github.com/alchemyplatform/aa-sdk/commit/93be151a004167e2d0cfaeb9a1eef94f324a3995)) - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/infra - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -### Bug Fixes - -- use wallet apis to wait for call status in useSendUserOperation ([#2162](https://github.com/alchemyplatform/aa-sdk/issues/2162)) ([958378d](https://github.com/alchemyplatform/aa-sdk/commit/958378de001ecda7cb50b2aaacd8fc0e9e75d423)) - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/infra - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @account-kit/infra - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/infra - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/infra - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -### Bug Fixes - -- prevent useSmartWalletClient infinite render loop if address is specified while client loading ([#2146](https://github.com/alchemyplatform/aa-sdk/issues/2146)) ([6015e46](https://github.com/alchemyplatform/aa-sdk/commit/6015e4623617bc59a2795711de9b33a20b141de2)) - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/infra - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -### Features - -- add swapi decorator for sdk v4 ([#2091](https://github.com/alchemyplatform/aa-sdk/issues/2091)) ([19b08d3](https://github.com/alchemyplatform/aa-sdk/commit/19b08d3c713a14fe35acbde945ac1280a96b1b99)) - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/infra - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/infra - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/infra - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/infra - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/infra - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/infra - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -### Features - -- signer email/sms verification ([#1964](https://github.com/alchemyplatform/aa-sdk/issues/1964)) ([07d3bff](https://github.com/alchemyplatform/aa-sdk/commit/07d3bff1578c4f043c871da5edcab8feeb8cb105)) - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @account-kit/infra - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/infra - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -**Note:** Version bump only for package @account-kit/infra - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/infra - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/infra - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/infra - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/infra - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/infra - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @account-kit/infra - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/infra - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -### Bug Fixes - -- split infra export to handle optional dependency ([#1860](https://github.com/alchemyplatform/aa-sdk/issues/1860)) ([1953dce](https://github.com/alchemyplatform/aa-sdk/commit/1953dceda6e5d75b6a4a82933d5960d696e3a86e)) - -### Features - -- add boba sepolia and boba mainnet to aa-sdk ([#1850](https://github.com/alchemyplatform/aa-sdk/issues/1850)) ([21e29db](https://github.com/alchemyplatform/aa-sdk/commit/21e29db90f2f4b280bc3520a44525cf9382d048a)) - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/infra - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @account-kit/infra - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/infra - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -### Bug Fixes - -- respect retryCount on alchemy transport & in alchemy smart account client ([#1841](https://github.com/alchemyplatform/aa-sdk/issues/1841)) ([cba003f](https://github.com/alchemyplatform/aa-sdk/commit/cba003f897b26890cb9f6cf7e107444603751e53)) - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/infra - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/infra - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/infra - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/infra - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @account-kit/infra - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @account-kit/infra - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -### Features - -- **middleware:** add signed permit to uo context for use in middleware ([f91e7ee](https://github.com/alchemyplatform/aa-sdk/commit/f91e7ee72ce33d225af935cce2c79ad08f44ca05)) -- refactor erc20 paymaster arguments ([#1738](https://github.com/alchemyplatform/aa-sdk/issues/1738)) ([20957e3](https://github.com/alchemyplatform/aa-sdk/commit/20957e39a68aae94e66eee23b6de6a1eaf53b3ef)) - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -### Bug Fixes - -- unify maxTokenAmount as token value ([#1704](https://github.com/alchemyplatform/aa-sdk/issues/1704)) ([2c356a8](https://github.com/alchemyplatform/aa-sdk/commit/2c356a842d5a0d6286e13a52a087fc675dd62a6b)) - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/infra - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -### Features - -- update RequestPayamsterTokenQuote API ([#1730](https://github.com/alchemyplatform/aa-sdk/issues/1730)) ([9b285a1](https://github.com/alchemyplatform/aa-sdk/commit/9b285a15e3f16c5ef5701e4746981ec22fb2ec2f)) - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -### Features - -- add paymaster address to aa-sdk ([#1662](https://github.com/alchemyplatform/aa-sdk/issues/1662)) ([eff651c](https://github.com/alchemyplatform/aa-sdk/commit/eff651c89758bd3a1b7ecc04778b25d2a9dc64e9)) - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/infra - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/infra - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/infra - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -### Features - -- add alchemy_requestPaymasterTokenQuote to aa-sdk ([#1659](https://github.com/alchemyplatform/aa-sdk/issues/1659)) ([5a8f22f](https://github.com/alchemyplatform/aa-sdk/commit/5a8f22fd3464039d7261936c2c7c6010e21b2400)) - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -### Bug Fixes - -- remove trailing slash from alchemy rpc url ([#1657](https://github.com/alchemyplatform/aa-sdk/issues/1657)) ([60b3a23](https://github.com/alchemyplatform/aa-sdk/commit/60b3a231354a6b1ca1aaf69ee4e3b82f0b4110ea)) - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @account-kit/infra - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/infra - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/infra - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -### Features - -- add celo and tea to aa-sdk ([#1627](https://github.com/alchemyplatform/aa-sdk/issues/1627)) ([515a302](https://github.com/alchemyplatform/aa-sdk/commit/515a30210a6106490f1132a447651889769db4b3)) - -### Reverts - -- undo the retry logic because it's causing issues ([#1628](https://github.com/alchemyplatform/aa-sdk/issues/1628)) ([2da1d37](https://github.com/alchemyplatform/aa-sdk/commit/2da1d37609fae208013a6ffde13e6c1cc14dfa7b)) - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -### Bug Fixes - -- let outter transport dictate retries ([#1625](https://github.com/alchemyplatform/aa-sdk/issues/1625)) ([6d291bd](https://github.com/alchemyplatform/aa-sdk/commit/6d291bd83e09e0b4e98baf1608e9451d3fba792d)) - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/infra - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Bug Fixes - -- parallel eth_calls, make maxTokenAmount requried ([#1609](https://github.com/alchemyplatform/aa-sdk/issues/1609)) ([0de0b90](https://github.com/alchemyplatform/aa-sdk/commit/0de0b9071f0f80a94ab08ba57f41c63f7154456f)) - -### Features - -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -### Bug Fixes - -- fix error message ([#1595](https://github.com/alchemyplatform/aa-sdk/issues/1595)) ([1d655e0](https://github.com/alchemyplatform/aa-sdk/commit/1d655e067b147f01e7ed1821ff2491275a46aa71)) - -### Features - -- support chain agnostic rpc url override ([#1613](https://github.com/alchemyplatform/aa-sdk/issues/1613)) ([6e4eee6](https://github.com/alchemyplatform/aa-sdk/commit/6e4eee668bf7c6c0f9aa4b43df67bd1e36b43d4f)) - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -### Bug Fixes - -- use rawtoken for permit, token value for erc20Context ([#1591](https://github.com/alchemyplatform/aa-sdk/issues/1591)) ([78f6728](https://github.com/alchemyplatform/aa-sdk/commit/78f67289ed52787b3038a10ef9e813872071524c)) - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/infra - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -### Features - -- add erc20 to alchemyGasManagerMiddleware ([#1574](https://github.com/alchemyplatform/aa-sdk/issues/1574)) ([8a0ce97](https://github.com/alchemyplatform/aa-sdk/commit/8a0ce97d5464930a2c21db9aed9b7273d57c783f)) -- add erc20Context to sdk ([#1561](https://github.com/alchemyplatform/aa-sdk/issues/1561)) ([56ddda0](https://github.com/alchemyplatform/aa-sdk/commit/56ddda0bcd0eb760bad607be5d3050fabc0c71e3)) -- add story mainnet and aeneid testnet ([#1580](https://github.com/alchemyplatform/aa-sdk/issues/1580)) ([dc27322](https://github.com/alchemyplatform/aa-sdk/commit/dc273221abb6818af5f911d9786e2f660b6c9f7b)) - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @account-kit/infra - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -### Features - -- extend alchemy transport to support wallet apis ([#1564](https://github.com/alchemyplatform/aa-sdk/issues/1564)) ([71d3e61](https://github.com/alchemyplatform/aa-sdk/commit/71d3e611f89ccb920a0ac494aa01a2b13be2982f)) - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/infra - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/infra - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/infra - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @account-kit/infra - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @account-kit/infra - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/infra - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -### Bug Fixes - -- remove the sonic export as it is not supported with aa infra yet ([#1523](https://github.com/alchemyplatform/aa-sdk/issues/1523)) ([22e6943](https://github.com/alchemyplatform/aa-sdk/commit/22e69431a8861a58b65ef3864dfa580b5c618605)) - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/infra - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @account-kit/infra - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -### Bug Fixes - -- update setChain function to update the sdk state if the wallet is already on a chain ([#1503](https://github.com/alchemyplatform/aa-sdk/issues/1503)) ([76da7cb](https://github.com/alchemyplatform/aa-sdk/commit/76da7cbbf8e6a4fe9d1a72adeebdb3f017304255)) - -### Features - -- tracing added for imply and open telemetry ([#1424](https://github.com/alchemyplatform/aa-sdk/issues/1424)) ([1caf63b](https://github.com/alchemyplatform/aa-sdk/commit/1caf63bbe4150b7eb66ee7aef7ccf2e228336ba6)) - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -### Features - -- add rise support to aa-sdk ([#1498](https://github.com/alchemyplatform/aa-sdk/issues/1498)) ([aaf8b9c](https://github.com/alchemyplatform/aa-sdk/commit/aaf8b9c436e96b43a23fe244649caecea814acb4)) - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/infra - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -### Features - -- **networks:** add gensyn testnet ([8c55523](https://github.com/alchemyplatform/aa-sdk/commit/8c55523dd435018ded51d3f7af46fa9f6f6bc261)) - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -### Features - -- **openloot:** add openloot to aa-sdk ([#1481](https://github.com/alchemyplatform/aa-sdk/issues/1481)) ([737d7d7](https://github.com/alchemyplatform/aa-sdk/commit/737d7d79571e6552ee40168b09ef3255d143d361)) - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @account-kit/infra - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/infra - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/infra - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/infra - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Features - -- **monad:** add monad for aa ([#1373](https://github.com/alchemyplatform/aa-sdk/issues/1373)) ([e4c12e2](https://github.com/alchemyplatform/aa-sdk/commit/e4c12e2a6a261b44505c55164a4860ae0d4caa16)) - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -### Features - -- add multi-policy sponsorships ([#1189](https://github.com/alchemyplatform/aa-sdk/issues/1189)) ([024d735](https://github.com/alchemyplatform/aa-sdk/commit/024d73545b03e8ce08485ef2f8252d6ed95e4521)) -- use alchemy_requestGasAndPaymasterAndData when using alchemy paymaster ([#1310](https://github.com/alchemyplatform/aa-sdk/issues/1310)) ([20b80a6](https://github.com/alchemyplatform/aa-sdk/commit/20b80a6bce7b754b7b2e8a64522c2c00e8f5a70c)) - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @account-kit/infra - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @account-kit/infra - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -**Note:** Version bump only for package @account-kit/infra - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -### Features - -- **client:** multi account light and alchemy consolidation ([#1264](https://github.com/alchemyplatform/aa-sdk/issues/1264)) ([18a9228](https://github.com/alchemyplatform/aa-sdk/commit/18a922830f5cfcfbed4bf12d064bdf4699e29c6c)) - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -### Features - -- add ink mainnet ([#1225](https://github.com/alchemyplatform/aa-sdk/issues/1225)) ([0a6606e](https://github.com/alchemyplatform/aa-sdk/commit/0a6606e6a447f08406aa84308795118eda950531)) -- add mekong devnet support ([#1239](https://github.com/alchemyplatform/aa-sdk/issues/1239)) ([baad28a](https://github.com/alchemyplatform/aa-sdk/commit/baad28a6b1df36f66eae1fb723bbcfdc61592a51)) -- **chains:** add ink and soneium mainnet ([#1215](https://github.com/alchemyplatform/aa-sdk/issues/1215)) ([de83640](https://github.com/alchemyplatform/aa-sdk/commit/de83640936bfa43f04fa274efda5a968afc4d773)) - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -**Note:** Version bump only for package @account-kit/infra - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @account-kit/infra - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @account-kit/infra - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -**Note:** Version bump only for package @account-kit/infra - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -**Note:** Version bump only for package @account-kit/infra - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -### Features - -- add unichain mainnet ([#1136](https://github.com/alchemyplatform/aa-sdk/issues/1136)) ([de9ba7c](https://github.com/alchemyplatform/aa-sdk/commit/de9ba7c6e6c37a0be9b10af78927ba0cf2841cac)) - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -**Note:** Version bump only for package @account-kit/infra - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -**Note:** Version bump only for package @account-kit/infra - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -### Features - -- **networks:** add new networks ([#1106](https://github.com/alchemyplatform/aa-sdk/issues/1106)) ([569862f](https://github.com/alchemyplatform/aa-sdk/commit/569862f6b9bdca68bc73362e1438de31c691a5f2)) - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -### Bug Fixes - -- **fee-estimator:** add a 50% buffer to base fee by default in alchemy fee estimator ([#1103](https://github.com/alchemyplatform/aa-sdk/issues/1103)) ([62ec78d](https://github.com/alchemyplatform/aa-sdk/commit/62ec78d9d0055b5fc575f5df8f1c1815355af86c)) - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -**Note:** Version bump only for package @account-kit/infra - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -### Features - -- add google auth components and demo support (extension of linnas pr) ([#1032](https://github.com/alchemyplatform/aa-sdk/issues/1032)) ([cb91914](https://github.com/alchemyplatform/aa-sdk/commit/cb91914c8da0a7c3e7519bf98bc55d2848062e9f)), closes [#1024](https://github.com/alchemyplatform/aa-sdk/issues/1024) [#1035](https://github.com/alchemyplatform/aa-sdk/issues/1035) [#1036](https://github.com/alchemyplatform/aa-sdk/issues/1036) -- add logger schemas to infra, react, core ([65fac7d](https://github.com/alchemyplatform/aa-sdk/commit/65fac7dbf2c63232199607b801db49ee96294b41)) -- log infra events ([4ec1b05](https://github.com/alchemyplatform/aa-sdk/commit/4ec1b0569db7908e67e8da6cc286b20e19d28997)) - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -### Features - -- add alchemyTransport to use in other places ([98cef3d](https://github.com/alchemyplatform/aa-sdk/commit/98cef3de1bb32abba47efae840203d528c12ed49)) -- **chains:** add berachain bartio ([#989](https://github.com/alchemyplatform/aa-sdk/issues/989)) ([180edad](https://github.com/alchemyplatform/aa-sdk/commit/180edad0f7d93d610e72933cdd98ab1e1905fbbf)) - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -### Bug Fixes - -- **ui-components:** ensure the passkey prompt always shows up when qp is present ([#978](https://github.com/alchemyplatform/aa-sdk/issues/978)) ([81f1580](https://github.com/alchemyplatform/aa-sdk/commit/81f15806e704bcffca6435eccb293923ff64d0e9)) - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -### Bug Fixes - -- aa only chain guides ([5b69139](https://github.com/alchemyplatform/aa-sdk/commit/5b691399d859cd6d7296101e8f9a800e3954d9ea)) - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([0d094e8](https://github.com/alchemyplatform/aa-sdk/commit/0d094e870c1a0ceb5f8d1c862f4109e32de46097)) -- merge base into this ([e41b396](https://github.com/alchemyplatform/aa-sdk/commit/e41b396fdf331d2dd7d4e6b608b90dcab37f8386)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([02f2f16](https://github.com/alchemyplatform/aa-sdk/commit/02f2f1623803480b8dc496491d2232c6fe5c219c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([55e6632](https://github.com/alchemyplatform/aa-sdk/commit/55e663208aae63e6092cbf2335c58f1448bd0dc3)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([1385441](https://github.com/alchemyplatform/aa-sdk/commit/1385441095b559ef506d5b4ae429ada5cc84be0e)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([4a30808](https://github.com/alchemyplatform/aa-sdk/commit/4a30808fb6df51a59be861dab523dbd45badf26a)) -- **aa:** new chain ([#835](https://github.com/alchemyplatform/aa-sdk/issues/835)) ([1e3b4b9](https://github.com/alchemyplatform/aa-sdk/commit/1e3b4b94e90822907512a523c07a8edbf3c463f8)) -- **chains:** add arbnova and shape ([#937](https://github.com/alchemyplatform/aa-sdk/issues/937)) ([938181b](https://github.com/alchemyplatform/aa-sdk/commit/938181bd6094c8363127772af61713a81fc7c09a)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([4be87d3](https://github.com/alchemyplatform/aa-sdk/commit/4be87d3147e1cdd70d2034479dcf0973c2820ea8)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([593e84c](https://github.com/alchemyplatform/aa-sdk/commit/593e84c027a697b757e3fd954564ff40cd1e11b0)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([0d09472](https://github.com/alchemyplatform/aa-sdk/commit/0d09472d5cf4a32864272a4f524d630f50a4a1ab)) -- merge base into this ([f9a6b2d](https://github.com/alchemyplatform/aa-sdk/commit/f9a6b2d801b909146c0e10bb072369992163ea69)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([b643981](https://github.com/alchemyplatform/aa-sdk/commit/b643981e900d9cabf6e273b5f7e9e75cd0c32c7d)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cb9d92](https://github.com/alchemyplatform/aa-sdk/commit/9cb9d9283db899d5a2f632767993c04135eb1de8)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([cb59787](https://github.com/alchemyplatform/aa-sdk/commit/cb597879a01179a24b919650ba19c1bba0da6e1d)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([23bcd22](https://github.com/alchemyplatform/aa-sdk/commit/23bcd225b434b55061d72ea622bdba2e85237ec9)) -- **aa:** new chain ([#835](https://github.com/alchemyplatform/aa-sdk/issues/835)) ([80a5435](https://github.com/alchemyplatform/aa-sdk/commit/80a54350ea3143991b9ce8bf6d31d76bd782e156)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([4e645e9](https://github.com/alchemyplatform/aa-sdk/commit/4e645e97a745bfdd11d6174cb32c7f2eb556f803)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([45582b1](https://github.com/alchemyplatform/aa-sdk/commit/45582b14e7116903f9b91cdd4bf2bb04de14ffa4)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([190e25f](https://github.com/alchemyplatform/aa-sdk/commit/190e25f55e30c8555863601f471e24f0a5122926)) -- merge base into this ([1409772](https://github.com/alchemyplatform/aa-sdk/commit/140977220c6e9cd32820a64e573c2d8070e9b603)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([8ef751e](https://github.com/alchemyplatform/aa-sdk/commit/8ef751eab7a2357caaa6d5d63cbc1907e90c39cb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cf1b77](https://github.com/alchemyplatform/aa-sdk/commit/9cf1b77e2ac738996af258e38879173184805a1c)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([d5c90da](https://github.com/alchemyplatform/aa-sdk/commit/d5c90dafacaf4194050f3c9870be03d44dbdbfea)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([69ea495](https://github.com/alchemyplatform/aa-sdk/commit/69ea495765175da4c74cde31bcd089f6838cfeb4)) -- **aa:** new chain ([#835](https://github.com/alchemyplatform/aa-sdk/issues/835)) ([bfcf4f7](https://github.com/alchemyplatform/aa-sdk/commit/bfcf4f77a87ef38bd766bb852ebddc1f72b711d8)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([0020257](https://github.com/alchemyplatform/aa-sdk/commit/002025791b57b6aa3f5efd9858593ccb25918d97)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c550465](https://github.com/alchemyplatform/aa-sdk/commit/c55046525d790001db4a9a305cade6f0d06ca90b)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -### Features - -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([62e2b59](https://github.com/alchemyplatform/aa-sdk/commit/62e2b59579e44f1825ae8224fb182aebd3c4f7e0)) - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([56af31e](https://github.com/alchemyplatform/aa-sdk/commit/56af31eb8580783d884a21d5b8d8d8a1420e1742)) -- merge base into this ([ea9ce2c](https://github.com/alchemyplatform/aa-sdk/commit/ea9ce2cabc407eec69aebe459446630142108f06)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([3060a05](https://github.com/alchemyplatform/aa-sdk/commit/3060a05e895e6d6fef363276665f0d3d06c161fb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([22b8183](https://github.com/alchemyplatform/aa-sdk/commit/22b8183ae297648d43594f59578163da6b0ae9bc)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([ae8a272](https://github.com/alchemyplatform/aa-sdk/commit/ae8a2720818ff1505a2424fce5ce154b90b74fd0)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([1a7af53](https://github.com/alchemyplatform/aa-sdk/commit/1a7af533d82e60accc3428cbb699f263a0cef536)) -- **aa:** new chain ([#835](https://github.com/alchemyplatform/aa-sdk/issues/835)) ([79dbebf](https://github.com/alchemyplatform/aa-sdk/commit/79dbebf23416674f6e1c50fe5d29397e0d8bbf36)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([637bb95](https://github.com/alchemyplatform/aa-sdk/commit/637bb953d59bfd931652286dfc73497b0e0e288f)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -**Note:** Version bump only for package @account-kit/infra - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([2adddf9](https://github.com/alchemyplatform/aa-sdk/commit/2adddf93775370498cd60e21fccb21f03aa29544)) - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([0601453](https://github.com/alchemyplatform/aa-sdk/commit/060145386572026905f5720866722c5a20c9d7db)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([b2b7cc6](https://github.com/alchemyplatform/aa-sdk/commit/b2b7cc680860f3d416d11b66d626e715fae4cf8b)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([dae2ad0](https://github.com/alchemyplatform/aa-sdk/commit/dae2ad08d863f9d25508e475903e042190aad56f)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([4c0b2f1](https://github.com/alchemyplatform/aa-sdk/commit/4c0b2f19a59272940b3fe40c610c06ad8c49d70e)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([9d81aaf](https://github.com/alchemyplatform/aa-sdk/commit/9d81aafe89b2dc49e2ab2c44556c81c3010c1fa2)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([c92a07f](https://github.com/alchemyplatform/aa-sdk/commit/c92a07fdb39d652fe5c95326d47a929b3b3278ed)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([082d363](https://github.com/alchemyplatform/aa-sdk/commit/082d363923684ae3bc45edf544c8536ff3c42379)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([d2f97c5](https://github.com/alchemyplatform/aa-sdk/commit/d2f97c56fdf63871296dd81b10cbc60b61b34d6c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([6c41e22](https://github.com/alchemyplatform/aa-sdk/commit/6c41e22233932ee98c6214f2ffdf3e8f928f880f)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c5465ee](https://github.com/alchemyplatform/aa-sdk/commit/c5465eee5c957afcb02d3e0d82c5821dd7819b5f)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages diff --git a/account-kit/infra/package.json b/account-kit/infra/package.json deleted file mode 100644 index 467ba714d3..0000000000 --- a/account-kit/infra/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "@account-kit/infra", - "version": "4.84.1", - "description": "adapters for @aa-sdk/core for interacting with alchemy services", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/exports/index.js", - "module": "./dist/esm/exports/index.js", - "types": "./dist/types/exports/index.d.ts", - "typings": "./dist/types/exports/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/exports/index.d.ts", - "import": "./dist/esm/exports/index.js", - "default": "./dist/esm/exports/index.js" - }, - "./enhanced-apis": { - "types": "./dist/types/exports/enhancedApi.d.ts", - "import": "./dist/esm/exports/enhancedApi.js", - "default": "./dist/esm/exports/enhancedApi.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest", - "test:run": "vitest run" - }, - "devDependencies": { - "typescript-template": "*" - }, - "dependencies": { - "@aa-sdk/core": "^4.84.1", - "@account-kit/logging": "^4.84.1", - "eventemitter3": "^5.0.1", - "zod": "^3.22.4" - }, - "peerDependencies": { - "viem": "^2.45.0" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d", - "optionalDependencies": { - "alchemy-sdk": "^3.0.0" - } -} diff --git a/account-kit/infra/src/__snapshots__/alchemyTransport.test.ts.snap b/account-kit/infra/src/__snapshots__/alchemyTransport.test.ts.snap deleted file mode 100644 index 413e042787..0000000000 --- a/account-kit/infra/src/__snapshots__/alchemyTransport.test.ts.snap +++ /dev/null @@ -1,149 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Alchemy Transport Tests > should correctly create a split transport 1`] = ` -[ - { - "fallback": [Function], - "overrides": [ - { - "methods": [ - "eth_sendUserOperation", - "eth_estimateUserOperationGas", - "eth_getUserOperationReceipt", - "eth_getUserOperationByHash", - "eth_supportedEntryPoints", - "rundler_maxPriorityFeePerGas", - "pm_getPaymasterData", - "pm_getPaymasterStubData", - "alchemy_requestGasAndPaymasterAndData", - ], - "transport": [Function], - }, - { - "methods": [ - "wallet_prepareCalls", - "wallet_sendPreparedCalls", - "wallet_requestAccount", - "wallet_createAccount", - "wallet_listAccounts", - "wallet_createSession", - "wallet_getCallsStatus", - "wallet_requestQuote_v0", - ], - "transport": [Function], - }, - ], - }, -] -`; - -exports[`Alchemy Transport Tests > should correctly create a split transport 2`] = ` -[ - { - "fallback": [Function], - "overrides": [ - { - "methods": [ - "eth_sendUserOperation", - "eth_estimateUserOperationGas", - "eth_getUserOperationReceipt", - "eth_getUserOperationByHash", - "eth_supportedEntryPoints", - "rundler_maxPriorityFeePerGas", - "pm_getPaymasterData", - "pm_getPaymasterStubData", - "alchemy_requestGasAndPaymasterAndData", - ], - "transport": [Function], - }, - { - "methods": [ - "wallet_prepareCalls", - "wallet_sendPreparedCalls", - "wallet_requestAccount", - "wallet_createAccount", - "wallet_listAccounts", - "wallet_createSession", - "wallet_getCallsStatus", - "wallet_requestQuote_v0", - ], - "transport": [Function], - }, - ], - }, -] -`; - -exports[`Alchemy Transport Tests > should correctly create a split transport 3`] = ` -[ - { - "fallback": [Function], - "overrides": [ - { - "methods": [ - "eth_sendUserOperation", - "eth_estimateUserOperationGas", - "eth_getUserOperationReceipt", - "eth_getUserOperationByHash", - "eth_supportedEntryPoints", - "rundler_maxPriorityFeePerGas", - "pm_getPaymasterData", - "pm_getPaymasterStubData", - "alchemy_requestGasAndPaymasterAndData", - ], - "transport": [Function], - }, - { - "methods": [ - "wallet_prepareCalls", - "wallet_sendPreparedCalls", - "wallet_requestAccount", - "wallet_createAccount", - "wallet_listAccounts", - "wallet_createSession", - "wallet_getCallsStatus", - "wallet_requestQuote_v0", - ], - "transport": [Function], - }, - ], - }, -] -`; - -exports[`Alchemy Transport Tests > should correctly create a split transport 4`] = ` -[ - { - "fallback": [Function], - "overrides": [ - { - "methods": [ - "eth_sendUserOperation", - "eth_estimateUserOperationGas", - "eth_getUserOperationReceipt", - "eth_getUserOperationByHash", - "eth_supportedEntryPoints", - "rundler_maxPriorityFeePerGas", - "pm_getPaymasterData", - "pm_getPaymasterStubData", - "alchemy_requestGasAndPaymasterAndData", - ], - "transport": [Function], - }, - { - "methods": [ - "wallet_prepareCalls", - "wallet_sendPreparedCalls", - "wallet_requestAccount", - "wallet_createAccount", - "wallet_listAccounts", - "wallet_createSession", - "wallet_getCallsStatus", - "wallet_requestQuote_v0", - ], - "transport": [Function], - }, - ], - }, -] -`; diff --git a/account-kit/infra/src/actions/simulateUserOperationChanges.ts b/account-kit/infra/src/actions/simulateUserOperationChanges.ts deleted file mode 100644 index 99f9afed50..0000000000 --- a/account-kit/infra/src/actions/simulateUserOperationChanges.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - deepHexlify, - type SendUserOperationParameters, - type SmartContractAccount, -} from "@aa-sdk/core"; -import type { Chain, Client, Transport } from "viem"; -import { isAlchemySmartAccountClient } from "../client/isAlchemySmartAccountClient.js"; -import type { AlchemyRpcSchema } from "../client/types.js"; -import type { SimulateUserOperationAssetChangesResponse } from "./types.js"; - -/** - * Simulates user operation changes including asset changes for a specified user operation and returns the resulting state changes. - * - * @example - * ```ts - * import { simulateUserOperationChanges, createAlchemyPublicRpcClient } from "@account-kit/infra"; - * - * const client = createAlchemyPublicRpcClient(...); - * const response = await simulateUserOperationChanges(client, { - * uo: ... - * }); - * ``` - * - * @param {Client} client The client instance used to send the simulation request - * @param {SendUserOperationParameters} args The parameters of the user operation including the account and other overrides - * @returns {Promise} A promise that resolves to the response of the simulation showing the asset changes - */ -export const simulateUserOperationChanges: < - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: SendUserOperationParameters, -) => Promise = async ( - client, - { account = client.account, overrides, ...params }, -) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isAlchemySmartAccountClient(client)) { - throw new IncompatibleClientError( - "AlchemySmartAccountClient", - "SimulateUserOperationAssetChanges", - client, - ); - } - - const uoStruct = deepHexlify( - await client.buildUserOperation({ - ...params, - account, - overrides, - }), - ); - - return client.request({ - method: "alchemy_simulateUserOperationAssetChanges", - params: [uoStruct, account.getEntryPoint().address], - }); -}; diff --git a/account-kit/infra/src/actions/types.ts b/account-kit/infra/src/actions/types.ts deleted file mode 100644 index 7dba66abb8..0000000000 --- a/account-kit/infra/src/actions/types.ts +++ /dev/null @@ -1,114 +0,0 @@ -import type { - UserOperationStruct, - UserOperationRequest, - UserOperationOverrides, - EntryPointVersion, -} from "@aa-sdk/core"; -import type { Address, Hash, Hex } from "viem"; - -export enum SimulateAssetType { - NATIVE = "NATIVE", - ERC20 = "ERC20", - ERC721 = "ERC721", - ERC1155 = "ERC1155", - /** - * Special contracts that don't follow ERC 721/1155. Currently limited to - * CryptoKitties and CryptoPunks. - */ - SPECIAL_NFT = "SPECIAL_NFT", -} - -export enum SimulateChangeType { - APPROVE = "APPROVE", - TRANSFER = "TRANSFER", -} - -export type SimulateUserOperationAssetChangesRequest = [ - UserOperationStruct, - entryPoint: Address, - blockNumber?: Hash, -]; - -export type SimulateUserOperationAssetChangesResponse = { - changes: SimulateAssetChange[]; - error?: SimulateAssetChangesError; -}; - -export interface SimulateAssetChangesError extends Record { - message: string; -} - -export interface SimulateAssetChange { - assetType: SimulateAssetType; - changeType: SimulateChangeType; - from: Address; - to: Address; - rawAmount?: string; - amount?: string; - contactAddress: Address; - tokenId?: string; - decimals: number; - symbol: string; - name?: string; - logo?: string; -} - -export type RequestGasAndPaymasterAndDataRequest = [ - { - policyId: string | string[]; - entryPoint: Address; - erc20Context?: { - tokenAddress: Address; - permit?: Hex; - maxTokenAmount?: BigInt; - }; - dummySignature: Hex; - userOperation: UserOperationRequest; - overrides?: UserOperationOverrides; - }, -]; - -export type RequestGasAndPaymasterAndDataResponse< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = Pick< - UserOperationRequest, - | "callGasLimit" - | "preVerificationGas" - | "verificationGasLimit" - | "maxFeePerGas" - | "maxPriorityFeePerGas" -> & - (TEntryPointVersion extends "0.6.0" - ? { - paymasterAndData: UserOperationRequest<"0.6.0">["paymasterAndData"]; - } - : TEntryPointVersion extends "0.7.0" - ? Pick< - UserOperationRequest<"0.7.0">, - | "paymaster" - | "paymasterData" - | "paymasterVerificationGasLimit" - | "paymasterPostOpGasLimit" - > - : never); - -export type RequestPaymasterTokenQuoteRequest = [ - { - policyId: string; - entryPoint: Address; - erc20Context?: { - tokenAddress: Address; - permit?: Hex; - maxTokenAmount?: BigInt; - }; - dummySignature: Hex; - userOperation: UserOperationRequest; - overrides?: UserOperationOverrides; - }, -]; - -export type RequestPaymasterTokenQuoteResponse = { - tokensPerEth: string; - estimatedTokenAmount: string; - estimatedUsd: number; -}; diff --git a/account-kit/infra/src/alchemyTrackerHeaders.ts b/account-kit/infra/src/alchemyTrackerHeaders.ts deleted file mode 100644 index 65cb56fa78..0000000000 --- a/account-kit/infra/src/alchemyTrackerHeaders.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { TRACE_HEADER_NAME } from "@aa-sdk/core"; -import { TRACE_HEADER_STATE } from "@aa-sdk/core"; -import { TraceHeader } from "@aa-sdk/core"; - -/** - * The header that is used to track the trace id. - * We use a client specific one to not mess with the span tracing of the servers. - * - * @see headersUpdate - */ -const TRACKER_HEADER = "X-Alchemy-Client-Trace-Id"; - -/** - * The header that is used to track the breadcrumb. - * - * @see headersUpdate - */ -const TRACKER_BREADCRUMB = "X-Alchemy-Client-Breadcrumb"; - -/** - * Remove the tracking headers. This is used in our split transport to ensure that we remove the headers that - * are not used by the other systems. - * - * @param {unknown} x The headers to remove the tracking headers from - */ -export function mutateRemoveTrackingHeaders(x?: unknown) { - if (!x) return; - if (Array.isArray(x)) return; - if (typeof x !== "object") return; - TRACKER_HEADER in x && delete x[TRACKER_HEADER]; - TRACKER_BREADCRUMB in x && delete x[TRACKER_BREADCRUMB]; - TRACE_HEADER_NAME in x && delete x[TRACE_HEADER_NAME]; - TRACE_HEADER_STATE in x && delete x[TRACE_HEADER_STATE]; -} - -function addCrumb(previous: string | undefined, crumb: string): string { - if (!previous) return crumb; - return `${previous} > ${crumb}`; -} -/** - * Update the headers with the trace header and breadcrumb. - * - * These trace headers are used in the imply ingestion pipeline to trace the request. - * And the breadcrumb is used to get finer grain details in the trace. - * - * Then there are the trace headers that are part of the W3C trace context standard. - * - * @param {string} crumb The crumb to add to the breadcrumb - * @returns {Function} A function that updates the headers - */ -export function headersUpdate(crumb: string) { - const headerUpdate_ = (x: Record) => { - const traceHeader = ( - TraceHeader.fromTraceHeader(x) || TraceHeader.default() - ).withEvent(crumb); - return { - [TRACKER_HEADER]: traceHeader.parentId, - ...x, - [TRACKER_BREADCRUMB]: addCrumb(x[TRACKER_BREADCRUMB], crumb), - ...traceHeader.toTraceHeader(), - }; - }; - return headerUpdate_; -} diff --git a/account-kit/infra/src/alchemyTransport.test.ts b/account-kit/infra/src/alchemyTransport.test.ts deleted file mode 100644 index 1806badcfa..0000000000 --- a/account-kit/infra/src/alchemyTransport.test.ts +++ /dev/null @@ -1,116 +0,0 @@ -import * as AACoreModule from "@aa-sdk/core"; -import { createSmartAccountClient } from "@aa-sdk/core"; -import { avalanche } from "viem/chains"; -import { alchemy } from "./alchemyTransport.js"; -import { sepolia } from "./chains.js"; -import { createBundlerClient } from "viem/account-abstraction"; - -describe("Alchemy Transport Tests", () => { - it.each([ - { rpcUrl: "/api" }, - { jwt: "test" }, - { apiKey: "key" }, - { rpcUrl: "/api", jwt: "jwt" }, - ])("should successfully create a non-split transport", (args) => { - expect(() => - alchemy({ - ...args, - }), - ).not.toThrowError(); - }); - - it.each([ - { rpcUrl: "/api" }, - { jwt: "test" }, - { apiKey: "key" }, - { rpcUrl: "/api", jwt: "jwt" }, - ])("should correctly create a split transport", (args) => { - const splitSpy = vi.spyOn(AACoreModule, "split"); - alchemy({ - alchemyConnection: args, - nodeRpcUrl: "/test", - })({ chain: sepolia }); - - expect(splitSpy.mock.calls.length).toBe(1); - expect(splitSpy.mock.calls[0]).toMatchSnapshot(); - }); - - it("should correctly do runtime validation when chain is not supported by Alchemy", () => { - expect(() => alchemy({ rpcUrl: "/test" })({ chain: avalanche })) - .toThrowErrorMatchingInlineSnapshot(` - [ZodError: [ - { - "code": "custom", - "message": "chain must include an alchemy rpc url. See \`defineAlchemyChain\` or import a chain from \`@account-kit/infra\`.", - "fatal": true, - "path": [] - } - ]] - `); - }); - - it.each([0, 1, 2, 3])( - "respects retryCount of %i when used with a viem bundler client", - async (retryCount) => { - const { mockFetch, unstub } = givenMockFetchError(); - - const client = createBundlerClient({ - transport: alchemy({ - rpcUrl: "http://invalid", - retryCount, - }), - chain: sepolia, - }); - - await expect( - client.request({ - // @ts-expect-error - Method doesn't matter for this test. - method: "eth_blockNumber", - }), - ).rejects.toThrow(); - - expect(mockFetch.mock.calls.length).toEqual(retryCount + 1); - unstub(); - }, - ); - - it.each([0, 1, 2, 3])( - "respects retryCount of %i when used with an alchemy smart account client", - async (retryCount) => { - const { mockFetch, unstub } = givenMockFetchError(); - - const client = createSmartAccountClient({ - transport: alchemy({ - apiKey: "invalid", - retryCount, - }), - chain: sepolia, - }); - - await expect( - client.request({ - method: "eth_blockNumber", - }), - ).rejects.toThrow(); - - expect(mockFetch.mock.calls.length).toEqual(retryCount + 1); - unstub(); - }, - ); -}); - -// Mocks global fetch to always return a 500 error. -const givenMockFetchError = () => { - const mockFetch = vi.fn().mockResolvedValue({ - ok: false, - status: 500, - statusText: "Internal Server Error", - json: () => Promise.resolve({ error: "Internal Server Error" }), - text: () => Promise.resolve("Internal Server Error"), - }); - vi.stubGlobal("fetch", mockFetch); - return { - mockFetch, - unstub: () => vi.unstubAllGlobals(), - }; -}; diff --git a/account-kit/infra/src/alchemyTransport.ts b/account-kit/infra/src/alchemyTransport.ts deleted file mode 100644 index 5b86426c9a..0000000000 --- a/account-kit/infra/src/alchemyTransport.ts +++ /dev/null @@ -1,288 +0,0 @@ -import { - ChainNotFoundError, - ConnectionConfigSchema, - split, - type ConnectionConfig, - type NoUndefined, -} from "@aa-sdk/core"; -import { - createTransport, - http, - type Chain, - type EIP1193RequestFn, - type HttpTransportConfig, - type PublicRpcSchema, - type Transport, - type TransportConfig, -} from "viem"; -import { mutateRemoveTrackingHeaders } from "./alchemyTrackerHeaders.js"; -import type { AlchemyRpcSchema } from "./client/types.js"; -import { AlchemyChainSchema } from "./schema.js"; -import { VERSION } from "./version.js"; - -type Never = T extends object - ? { - [K in keyof T]?: never; - } - : never; - -type AlchemyConnectionConfig = ConnectionConfig; - -type SplitTransportConfig = { - alchemyConnection: AlchemyConnectionConfig; - nodeRpcUrl: string; -}; - -const alchemyMethods = [ - "eth_sendUserOperation", - "eth_estimateUserOperationGas", - "eth_getUserOperationReceipt", - "eth_getUserOperationByHash", - "eth_supportedEntryPoints", - "rundler_maxPriorityFeePerGas", - "pm_getPaymasterData", - "pm_getPaymasterStubData", - "alchemy_requestGasAndPaymasterAndData", -]; - -const chainAgnosticMethods = [ - "wallet_prepareCalls", - "wallet_sendPreparedCalls", - "wallet_requestAccount", - "wallet_createAccount", - "wallet_listAccounts", - "wallet_createSession", - "wallet_getCallsStatus", - "wallet_requestQuote_v0", -]; - -export type AlchemyTransportConfig = ( - | (AlchemyConnectionConfig & Never) - | (SplitTransportConfig & Never) -) & { - /** The max number of times to retry. */ - retryCount?: TransportConfig["retryCount"] | undefined; - /** The base delay (in ms) between retries. */ - retryDelay?: TransportConfig["retryDelay"] | undefined; - fetchOptions?: NoUndefined; -}; - -type AlchemyTransportBase = Transport< - "alchemy", - { - alchemyRpcUrl: string; - fetchOptions?: AlchemyTransportConfig["fetchOptions"]; - }, - EIP1193RequestFn<[...PublicRpcSchema, ...AlchemyRpcSchema]> ->; - -export type AlchemyTransport = AlchemyTransportBase & { - updateHeaders(newHeaders: HeadersInit): void; - config: AlchemyTransportConfig; - dynamicFetchOptions: AlchemyTransportConfig["fetchOptions"]; -}; - -/** - * A type guard for the transport to determine if it is an Alchemy transport. - * Used in cases where we would like to do switching depending on the transport, where there used - * to be two clients for an alchemy and a non-alchemy, and with this switch we don't need the two seperate clients. * - * - * @param {Transport} transport The transport to check - * @param {Chain} chain Chain for the transport to run its function to return the transport config - * @returns {boolean} `true` if the transport is an Alchemy transport, otherwise `false` - */ -export function isAlchemyTransport( - transport: Transport, - chain: Chain, -): transport is AlchemyTransport { - return transport({ chain }).config.type === "alchemy"; -} - -/** - * Creates an Alchemy transport with the specified configuration options. - * When sending all traffic to Alchemy, you must pass in one of rpcUrl, apiKey, or jwt. - * If you want to send Bundler and Paymaster traffic to Alchemy and Node traffic to a different RPC, you must pass in alchemyConnection and nodeRpcUrl. - * - * @example - * ### Basic Example - * If the chain you're using is supported for both Bundler and Node RPCs, then you can do the following: - * ```ts - * import { alchemy } from "@account-kit/infra"; - * - * const transport = alchemy({ - * // NOTE: you can also pass in an rpcUrl or jwt here or rpcUrl and jwt - * apiKey: "your-api-key", - * }); - * ``` - * - * ### AA Only Chains - * For AA-only chains, you need to specify the alchemyConnection and nodeRpcUrl since Alchemy only - * handles the Bundler and Paymaster RPCs for these chains. - * ```ts - * import { alchemy } from "@account-kit/infra"; - * - * const transport = alchemy({ - * alchemyConnection: { - * apiKey: "your-api-key", - * }, - * nodeRpcUrl: "https://zora.rpc.url", - * }); - * ``` - * - * @param {AlchemyTransportConfig} config The configuration object for the Alchemy transport. - * @param {number} config.retryDelay Optional The delay between retries, in milliseconds. - * @param {number} config.retryCount Optional The number of retry attempts. - * @param {string} [config.alchemyConnection] Optional Alchemy connection configuration (if this is passed in, nodeRpcUrl is required). - * @param {string} [config.fetchOptions] Optional fetch options for HTTP requests. - * @param {string} [config.nodeRpcUrl] Optional RPC URL for node (if this is passed in, alchemyConnection is required). - * @param {string} [config.rpcUrl] Optional RPC URL. - * @param {string} [config.apiKey] Optional API key for Alchemy. - * @param {string} [config.jwt] Optional JSON Web Token for authorization. - * @returns {AlchemyTransport} The configured Alchemy transport object. - */ -export function alchemy(config: AlchemyTransportConfig): AlchemyTransport { - const { retryDelay, retryCount = 0 } = config; - // we create a copy here in case we create a split transport down below - // we don't want to add alchemy headers to 3rd party nodes - const fetchOptions = { ...config.fetchOptions }; - - const connectionConfig = ConnectionConfigSchema.parse( - config.alchemyConnection ?? config, - ); - - const headersAsObject = convertHeadersToObject(fetchOptions.headers); - - // TODO: we probably should just log these headers during telemetry logging instead of doing this mutable header stuff - fetchOptions.headers = { - ...headersAsObject, - "Alchemy-AA-Sdk-Version": VERSION, - }; - - if (connectionConfig.jwt != null || connectionConfig.apiKey != null) { - fetchOptions.headers = { - ...fetchOptions.headers, - Authorization: `Bearer ${ - connectionConfig.jwt ?? connectionConfig.apiKey - }`, - }; - } - - const transport: AlchemyTransportBase = (opts) => { - const { chain: chain_ } = opts; - if (!chain_) { - throw new ChainNotFoundError(); - } - const chain = AlchemyChainSchema.parse(chain_); - - const rpcUrl = - connectionConfig.rpcUrl == null - ? chain.rpcUrls.alchemy.http[0] - : connectionConfig.rpcUrl; - - const chainAgnosticRpcUrl = - connectionConfig.rpcUrl == null - ? "https://api.g.alchemy.com/v2" - : (connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl); - - const innerTransport = (() => { - mutateRemoveTrackingHeaders(config?.fetchOptions?.headers); - if (config.alchemyConnection && config.nodeRpcUrl) { - return split({ - overrides: [ - { - methods: alchemyMethods, - transport: http(rpcUrl, { fetchOptions, retryCount }), - }, - { - methods: chainAgnosticMethods, - transport: http(chainAgnosticRpcUrl, { - fetchOptions, - retryCount, - retryDelay, - }), - }, - ], - fallback: http(config.nodeRpcUrl, { - fetchOptions: config.fetchOptions, - retryCount, - retryDelay, - }), - }); - } - - return split({ - overrides: [ - { - methods: chainAgnosticMethods, - transport: http(chainAgnosticRpcUrl, { - fetchOptions, - retryCount, - retryDelay, - }), - }, - ], - fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay }), - }); - })(); - - return createTransport( - { - key: "alchemy", - name: "Alchemy Transport", - request: innerTransport({ - ...opts, - // Retries are already handled above within the split transport, - // so `retryCount` must be 0 here for the expected behavior. - retryCount: 0, - }).request, - // Retries are already handled above within the split transport, - // so `retryCount` must be 0 here too for the expected behavior. - retryCount: 0, - retryDelay, - type: "alchemy", - }, - { alchemyRpcUrl: rpcUrl, fetchOptions }, - ); - }; - - return Object.assign(transport, { - dynamicFetchOptions: fetchOptions, - updateHeaders(newHeaders_: HeadersInit) { - const newHeaders = convertHeadersToObject(newHeaders_); - - fetchOptions.headers = { - ...fetchOptions.headers, - ...newHeaders, - }; - }, - config, - }); -} - -export const convertHeadersToObject = ( - headers?: HeadersInit, -): Record => { - if (!headers) { - return {}; - } - - if (headers instanceof Headers) { - const headersObject = {} as Record; - headers.forEach((value, key) => { - headersObject[key] = value; - }); - return headersObject; - } - - if (Array.isArray(headers)) { - return headers.reduce( - (acc, header) => { - acc[header[0]] = header[1]; - return acc; - }, - {} as Record, - ); - } - - return headers; -}; diff --git a/account-kit/infra/src/chains.ts b/account-kit/infra/src/chains.ts deleted file mode 100644 index 856b633612..0000000000 --- a/account-kit/infra/src/chains.ts +++ /dev/null @@ -1,912 +0,0 @@ -import type { Chain } from "viem"; - -import { defineChain } from "viem"; -import { - arbitrum as vab, - arbitrumGoerli as vabg, - arbitrumSepolia as vabs, - base as vbase, - baseGoerli as vbaseg, - baseSepolia as vbases, - bsc as vbsc, - bscTestnet as vbsct, - fraxtal as vfrax, - goerli as vgo, - mainnet as vmain, - optimism as vop, - optimismGoerli as vopg, - optimismSepolia as vops, - polygon as vpg, - polygonAmoy as vpga, - polygonMumbai as vpgm, - sepolia as vsep, - arbitrumNova as vabn, - zora as vzora, - zoraSepolia as vzoras, - worldchain as vwc, - worldchainSepolia as vwcs, - hyperliquid as vhyperliquid, - hyperliquidEvmTestnet as vhyperliquidEvmTestnet, -} from "viem/chains"; - -export type AlchemyChainConfig = { - chain: Chain; - rpcBaseUrl: string; -}; - -/** - * Defines an Alchemy chain configuration by adding an Alchemy-specific RPC base URL to the chain's RPC URLs. - * - * @example - * ```ts - * import { defineAlchemyChain } from "@account-kit/infra"; - * import { sepolia } from "viem/chains"; - * - * const chain = defineAlchemyChain({ - * chain: sepolia, - * rpcBaseUrl: "https://eth-sepolia.g.alchemy.com/v2" - * }); - * ``` - * - * @param {AlchemyChainConfig} params The parameters for defining the Alchemy chain - * @param {Chain} params.chain The original chain configuration - * @param {string} params.rpcBaseUrl The Alchemy-specific RPC base URL - * @returns {Chain} The updated chain configuration with the Alchemy RPC URL added - */ -export const defineAlchemyChain = ({ - chain, - rpcBaseUrl, -}: { - chain: Chain; - rpcBaseUrl: string; -}): Chain => { - return { - ...chain, - rpcUrls: { - ...chain.rpcUrls, - alchemy: { - http: [rpcBaseUrl], - }, - }, - }; -}; - -export const arbitrum: Chain = { - ...vab, - rpcUrls: { - ...vab.rpcUrls, - alchemy: { - http: ["https://arb-mainnet.g.alchemy.com/v2"], - }, - }, -}; - -export const arbitrumGoerli: Chain = { - ...vabg, - rpcUrls: { - ...vabg.rpcUrls, - alchemy: { - http: ["https://arb-goerli.g.alchemy.com/v2"], - }, - }, -}; - -export const arbitrumSepolia: Chain = { - ...vabs, - rpcUrls: { - ...vabs.rpcUrls, - alchemy: { - http: ["https://arb-sepolia.g.alchemy.com/v2"], - }, - }, -}; -export const goerli: Chain = { - ...vgo, - rpcUrls: { - ...vgo.rpcUrls, - alchemy: { - http: ["https://eth-goerli.g.alchemy.com/v2"], - }, - }, -}; -export const mainnet: Chain = { - ...vmain, - rpcUrls: { - ...vmain.rpcUrls, - alchemy: { - http: ["https://eth-mainnet.g.alchemy.com/v2"], - }, - }, -}; -export const optimism: Chain = { - ...vop, - rpcUrls: { - ...vop.rpcUrls, - alchemy: { - http: ["https://opt-mainnet.g.alchemy.com/v2"], - }, - }, -}; -export const optimismGoerli: Chain = { - ...vopg, - rpcUrls: { - ...vopg.rpcUrls, - alchemy: { - http: ["https://opt-goerli.g.alchemy.com/v2"], - }, - }, -}; -export const optimismSepolia: Chain = { - ...vops, - rpcUrls: { - ...vops.rpcUrls, - alchemy: { - http: ["https://opt-sepolia.g.alchemy.com/v2"], - }, - }, -}; -export const sepolia: Chain = { - ...vsep, - rpcUrls: { - ...vsep.rpcUrls, - alchemy: { - http: ["https://eth-sepolia.g.alchemy.com/v2"], - }, - }, -}; -export const base: Chain = { - ...vbase, - rpcUrls: { - ...vbase.rpcUrls, - alchemy: { - http: ["https://base-mainnet.g.alchemy.com/v2"], - }, - }, -}; -export const baseGoerli: Chain = { - ...vbaseg, - rpcUrls: { - ...vbaseg.rpcUrls, - alchemy: { - http: ["https://base-goerli.g.alchemy.com/v2"], - }, - }, -}; -export const baseSepolia: Chain = { - ...vbases, - rpcUrls: { - ...vbases.rpcUrls, - alchemy: { - http: ["https://base-sepolia.g.alchemy.com/v2"], - }, - }, -}; - -export const bsc: Chain = { - ...vbsc, - rpcUrls: { - ...vbsc.rpcUrls, - alchemy: { - http: ["https://bnb-mainnet.g.alchemy.com/v2"], - }, - }, -}; - -export const bscTestnet: Chain = { - ...vbsct, - rpcUrls: { - ...vbsct.rpcUrls, - alchemy: { - http: ["https://bnb-testnet.g.alchemy.com/v2"], - }, - }, -}; - -export const polygonMumbai: Chain = { - ...vpgm, - rpcUrls: { - ...vpgm.rpcUrls, - alchemy: { - http: ["https://polygon-mumbai.g.alchemy.com/v2"], - }, - }, -}; - -export const polygonAmoy: Chain = { - ...vpga, - rpcUrls: { - ...vpga.rpcUrls, - alchemy: { - http: ["https://polygon-amoy.g.alchemy.com/v2"], - }, - }, -}; - -export const polygon: Chain = { - ...vpg, - rpcUrls: { - ...vpg.rpcUrls, - alchemy: { - http: ["https://polygon-mainnet.g.alchemy.com/v2"], - }, - }, -}; - -export const fraxtal: Chain = { - ...vfrax, - rpcUrls: { - ...vfrax.rpcUrls, - }, -}; - -export const fraxtalSepolia: Chain = defineChain({ - id: 2523, - name: "Fraxtal Sepolia", - nativeCurrency: { name: "Frax Ether", symbol: "frxETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://rpc.testnet-sepolia.frax.com"], - }, - }, -}); - -export const zora: Chain = { - ...vzora, - rpcUrls: { - ...vzora.rpcUrls, - }, -}; - -export const zoraSepolia: Chain = { - ...vzoras, - rpcUrls: { - ...vzoras.rpcUrls, - }, -}; - -export const worldChainSepolia: Chain = { - ...vwcs, - rpcUrls: { - ...vwcs.rpcUrls, - alchemy: { - http: ["https://worldchain-sepolia.g.alchemy.com/v2"], - }, - }, -}; - -export const worldChain: Chain = { - ...vwc, - rpcUrls: { - ...vwc.rpcUrls, - alchemy: { - http: ["https://worldchain-mainnet.g.alchemy.com/v2"], - }, - }, -}; - -export const shapeSepolia: Chain = defineChain({ - id: 11011, - name: "Shape Sepolia", - network: "Shape Sepolia", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://shape-sepolia.g.alchemy.com/v2"], - }, - public: { - http: ["https://shape-sepolia.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://shape-sepolia.g.alchemy.com/v2"], - }, - }, -}); - -export const shape: Chain = defineChain({ - id: 360, - name: "Shape", - network: "Shape", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://shape-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://shape-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://shape-mainnet.g.alchemy.com/v2"], - }, - }, -}); - -export const unichainMainnet: Chain = defineChain({ - id: 130, - name: "Unichain Mainnet", - network: "Unichain Mainnet", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://unichain-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://unichain-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://unichain-mainnet.g.alchemy.com/v2"], - }, - }, -}); - -export const unichainSepolia: Chain = defineChain({ - id: 1301, - name: "Unichain Sepolia", - network: "Unichain Sepolia", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://unichain-sepolia.g.alchemy.com/v2"], - }, - public: { - http: ["https://unichain-sepolia.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://unichain-sepolia.g.alchemy.com/v2"], - }, - }, -}); - -export const soneiumMinato: Chain = defineChain({ - id: 1946, - name: "Soneium Minato", - network: "Soneium Minato", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://soneium-minato.g.alchemy.com/v2"], - }, - public: { - http: ["https://soneium-minato.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://soneium-minato.g.alchemy.com/v2"], - }, - }, -}); - -export const soneiumMainnet: Chain = defineChain({ - id: 1868, - name: "Soneium Mainnet", - network: "Soneium Mainnet", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://soneium-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://soneium-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://soneium-mainnet.g.alchemy.com/v2"], - }, - }, -}); - -export const opbnbTestnet: Chain = defineChain({ - id: 5611, - name: "OPBNB Testnet", - network: "OPBNB Testnet", - nativeCurrency: { name: "BNB", symbol: "BNB", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://opbnb-testnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://opbnb-testnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://opbnb-testnet.g.alchemy.com/v2"], - }, - }, -}); - -export const opbnbMainnet: Chain = defineChain({ - id: 204, - name: "OPBNB Mainnet", - network: "OPBNB Mainnet", - nativeCurrency: { name: "BNB", symbol: "BNB", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://opbnb-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://opbnb-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://opbnb-mainnet.g.alchemy.com/v2"], - }, - }, -}); - -export const beraChainBartio: Chain = defineChain({ - id: 80084, - name: "BeraChain Bartio", - network: "BeraChain Bartio", - nativeCurrency: { name: "Bera", symbol: "BERA", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://berachain-bartio.g.alchemy.com/v2"], - }, - public: { - http: ["https://berachain-bartio.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://berachain-bartio.g.alchemy.com/v2"], - }, - }, -}); - -export const inkMainnet: Chain = defineChain({ - id: 57073, - name: "Ink Mainnet", - network: "Ink Mainnet", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://ink-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://ink-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://ink-mainnet.g.alchemy.com/v2"], - }, - }, -}); - -export const inkSepolia: Chain = defineChain({ - id: 763373, - name: "Ink Sepolia", - network: "Ink Sepolia", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://ink-sepolia.g.alchemy.com/v2"], - }, - public: { - http: ["https://ink-sepolia.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://ink-sepolia.g.alchemy.com/v2"], - }, - }, -}); - -export const arbitrumNova: Chain = { - ...vabn, - rpcUrls: { - ...vabn.rpcUrls, - }, -}; - -export const monadTestnet: Chain = defineChain({ - id: 10143, - name: "Monad Testnet", - nativeCurrency: { name: "Monad", symbol: "MON", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://monad-testnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://monad-testnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://monad-testnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://testnet.monadexplorer.com", - }, - }, - testnet: true, -}); - -export const monadMainnet: Chain = defineChain({ - id: 143, - name: "Monad Mainnet", - nativeCurrency: { name: "Monad", symbol: "MON", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://monad-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://monad-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://monad-mainnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://mainnet-beta.monvision.io", - }, - }, - testnet: false, -}); - -export const mekong: Chain = defineChain({ - id: 7078815900, - name: "Mekong Pectra Devnet", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://rpc.mekong.ethpandaops.io"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://explorer.mekong.ethpandaops.io", - }, - }, - testnet: true, -}); - -export const openlootSepolia: Chain = defineChain({ - id: 905905, - name: "Openloot Sepolia", - nativeCurrency: { name: "Openloot", symbol: "OL", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://openloot-sepolia.g.alchemy.com/v2"], - }, - public: { - http: ["https://openloot-sepolia.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://openloot-sepolia.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://openloot-sepolia.explorer.alchemy.com", - }, - }, - testnet: true, -}); - -export const gensynTestnet: Chain = defineChain({ - id: 685685, - name: "Gensyn Testnet", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://gensyn-testnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://gensyn-testnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://gensyn-testnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://gensyn-testnet.explorer.alchemy.com", - }, - }, - testnet: true, -}); - -export const riseTestnet: Chain = defineChain({ - id: 11155931, - name: "Rise Testnet", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://rise-testnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://rise-testnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://rise-testnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://explorer.testnet.riselabs.xyz", - }, - }, - testnet: true, -}); - -export const storyMainnet: Chain = defineChain({ - id: 1514, - name: "Story Mainnet", - nativeCurrency: { name: "IP", symbol: "IP", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://story-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://story-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://story-mainnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://www.storyscan.io", - }, - }, - testnet: false, -}); - -export const storyAeneid: Chain = defineChain({ - id: 1315, - name: "Story Aeneid", - nativeCurrency: { name: "IP", symbol: "IP", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://story-aeneid.g.alchemy.com/v2"], - }, - public: { - http: ["https://story-aeneid.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://story-aeneid.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://aeneid.storyscan.io", - }, - }, - testnet: true, -}); - -export const celoMainnet: Chain = defineChain({ - id: 42220, - name: "Celo Mainnet", - nativeCurrency: { name: "Celo native asset", symbol: "CELO", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://celo-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://celo-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://celo-mainnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://celo.blockscout.com/", - }, - }, - testnet: false, -}); - -export const celoSepolia: Chain = defineChain({ - id: 11142220, - name: "Celo Sepolia", - nativeCurrency: { name: "Celo native asset", symbol: "CELO", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://celo-sepolia.g.alchemy.com/v2"], - }, - public: { - http: ["https://celo-sepolia.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://celo-sepolia.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://celo-sepolia.blockscout.com/", - }, - }, - testnet: true, -}); - -export const teaSepolia: Chain = defineChain({ - id: 10218, - name: "Tea Sepolia", - nativeCurrency: { name: "TEA", symbol: "TEA", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://tea-sepolia.g.alchemy.com/v2"], - }, - public: { - http: ["https://tea-sepolia.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://tea-sepolia.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://sepolia.tea.xyz/", - }, - }, - testnet: true, -}); - -export const bobaSepolia: Chain = defineChain({ - id: 28882, - name: "Boba Sepolia", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://boba-sepolia.g.alchemy.com/v2"], - }, - public: { - http: ["https://boba-sepolia.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://boba-sepolia.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://sepolia.testnet.bobascan.com/", - }, - }, - testnet: true, -}); - -export const bobaMainnet: Chain = defineChain({ - id: 288, - name: "Boba Mainnet", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://boba-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://boba-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://boba-mainnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://bobascan.com/", - }, - }, - testnet: false, -}); - -export const edgeMainnet: Chain = defineChain({ - id: 3343, - name: "Edge Mainnet", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://edge-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://edge-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://edge-mainnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://edge-mainnet.blockscout.com/", - }, - }, - testnet: false, -}); - -export const worldl3devnet: Chain = defineChain({ - id: 48011, - name: "WorldL3 Devnet", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://worldl3-devnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://worldl3-devnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://worldl3-devnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://worldl3-devnet.blockscout.com/", - }, - }, - testnet: true, -}); - -export const stableMainnet: Chain = defineChain({ - id: 988, - name: "Stable Mainnet", - nativeCurrency: { name: "gUSDT", symbol: "gUSDT", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://stable-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://stable-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://stable-mainnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://stablescan.xyz/", - }, - }, - testnet: false, -}); - -export const mythosMainnet: Chain = defineChain({ - id: 42018, - name: "Mythos Mainnet", - nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, - rpcUrls: { - default: { - http: ["https://mythos-mainnet.g.alchemy.com/v2"], - }, - public: { - http: ["https://mythos-mainnet.g.alchemy.com/v2"], - }, - alchemy: { - http: ["https://mythos-mainnet.g.alchemy.com/v2"], - }, - }, - blockExplorers: { - default: { - name: "Block Explorer", - url: "https://mythos-mainnet.explorer.alchemy.com/", - }, - }, - testnet: false, -}); - -export const hyperliquid: Chain = { - ...vhyperliquid, - rpcUrls: { - ...vhyperliquid.rpcUrls, - alchemy: { - http: ["https://hyperliquid-mainnet.g.alchemy.com/v2"], - }, - }, -}; - -export const hyperliquidEvmTestnet: Chain = { - ...vhyperliquidEvmTestnet, - rpcUrls: { - ...vhyperliquidEvmTestnet.rpcUrls, - alchemy: { - http: ["https://hyperliquid-testnet.g.alchemy.com/v2"], - }, - }, -}; diff --git a/account-kit/infra/src/client/decorators/smartAccount.ts b/account-kit/infra/src/client/decorators/smartAccount.ts deleted file mode 100644 index 5bcd88f5a2..0000000000 --- a/account-kit/infra/src/client/decorators/smartAccount.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { - isSmartAccountWithSigner, - sendTransaction, - sendTransactions, - sendUserOperation, - type GetEntryPointFromAccount, - type SendTransactionsParameters, - type SendUserOperationParameters, - type SendUserOperationResult, - type SmartContractAccount, - type UserOperationContext, - type UserOperationOverrides, - clientHeaderTrack, -} from "@aa-sdk/core"; -import type { - Chain, - Client, - Hex, - SendTransactionParameters, - Transport, -} from "viem"; -import { simulateUserOperationChanges } from "../../actions/simulateUserOperationChanges.js"; -import type { SimulateUserOperationAssetChangesResponse } from "../../actions/types.js"; -import { InfraLogger } from "../../metrics.js"; - -export type AlchemySmartAccountClientActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TChain extends Chain | undefined = Chain | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - simulateUserOperation: ( - args: SendUserOperationParameters, - ) => Promise; - sendUserOperation: ( - args: SendUserOperationParameters< - TAccount, - TContext, - GetEntryPointFromAccount - >, - ) => Promise>; - sendTransaction: ( - args: SendTransactionParameters, - overrides?: UserOperationOverrides, - context?: TContext, - ) => Promise; - sendTransactions: ( - args: SendTransactionsParameters, - ) => Promise; -}; - -/** - * Provides a set of actions for interacting with the Alchemy Smart Account client, including the ability to simulate user operations. - * - * @example - * ```ts - * import { alchemyActions } from "@account-kit/infra"; - * import { createPublicClient } from "viem"; - * - * const client = createPublicClient(...); - * const clientWithAlchemyActions = client.extend(alchemyActions); - * ``` - * - * @param {Client} client_ The client instance used to perform actions - * @returns {AlchemySmartAccountClientActions} An object containing Alchemy Smart Account client actions - */ -export const alchemyActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client: Client, -) => AlchemySmartAccountClientActions = ( - client_, -) => ({ - simulateUserOperation: async (args) => { - const client = clientHeaderTrack(client_, "simulateUserOperation"); - return simulateUserOperationChanges(client, args); - }, - async sendUserOperation(args) { - const client = clientHeaderTrack(client_, "infraSendUserOperation"); - const { account = client.account } = args; - - const result = sendUserOperation(client, args); - logSendUoEvent(client.chain!.id, account!); - return result; - }, - sendTransaction: async (args, overrides, context) => { - const client = clientHeaderTrack(client_, "sendTransaction"); - const { account = client.account } = args; - - const result = await sendTransaction(client, args, overrides, context); - logSendUoEvent(client.chain!.id, account as SmartContractAccount); - return result; - }, - async sendTransactions(args) { - const client = clientHeaderTrack(client_, "sendTransactions"); - const { account = client.account } = args; - - const result = sendTransactions(client, args); - logSendUoEvent(client.chain!.id, account!); - return result; - }, -}); - -function logSendUoEvent(chainId: number, account: SmartContractAccount) { - const signerType = isSmartAccountWithSigner(account) - ? account.getSigner().signerType - : "unknown"; - - InfraLogger.trackEvent({ - name: "client_send_uo", - data: { - chainId, - signerType: signerType, - entryPoint: account.getEntryPoint().address, - }, - }); -} diff --git a/account-kit/infra/src/client/isAlchemySmartAccountClient.ts b/account-kit/infra/src/client/isAlchemySmartAccountClient.ts deleted file mode 100644 index 901b761687..0000000000 --- a/account-kit/infra/src/client/isAlchemySmartAccountClient.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { type SmartContractAccount } from "@aa-sdk/core"; -import type { Chain, Client, Transport } from "viem"; -import type { AlchemySmartAccountClient } from "./smartAccountClient"; - -/** - * Checks if a given client is an Alchemy Smart Account Client. The goal of this check is to ensure that the client supports certain RPC methods. - * - * @example - * ```ts - * import { isAlchemySmartAccountClient } from "@account-kit/infra"; - * - * if (isAlchemySmartAccountClient(client)) { - * // do things with the client as an Alchemy Smart Account Client - * } - * ``` - * - * @param {Client} client The client instance to be checked - * @returns {boolean} `true` if the client is an Alchemy Smart Account Client, otherwise `false` - */ -export function isAlchemySmartAccountClient< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -): client is AlchemySmartAccountClient { - return client.transport.type === "alchemy"; -} diff --git a/account-kit/infra/src/client/rpcClient.ts b/account-kit/infra/src/client/rpcClient.ts deleted file mode 100644 index bffd1f5b33..0000000000 --- a/account-kit/infra/src/client/rpcClient.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { createBundlerClient } from "@aa-sdk/core"; -import type { Chain } from "viem"; -import type { AlchemyTransport } from "../alchemyTransport.js"; -import type { ClientWithAlchemyMethods } from "./types.js"; - -/** - * Creates an Alchemy public RPC client with the provided chain, connection configuration, and optional fetch options. The client has alchemy methods and can dynamically update HTTP headers. - * - * @example - * ```ts - * import { createAlchemyPublicRpcClient, alchemy } from "@account-kit/infra"; - * import { sepolia } from "@account-kit/infra"; - * - * const client = createAlchemyPublicRpcClient({ - * transport: alchemy({ - * apiKey: "ALCHEMY_API_KEY" - * }), - * chain: sepolia, - * }); - * ``` - * - * @param {{connectionConfig: ConnectionConfig,chain: Chain,fetchOptions?: NoUndefined}} params The parameters for creating the Alchemy public RPC client - * @param {ConnectionConfig} params.connectionConfig The connection configuration containing the RPC URL and API key - * @param {Chain} params.chain The blockchain chain configuration - * @param {NoUndefined} [params.fetchOptions] Optional fetch configuration for HTTP transport - * @returns {ClientWithAlchemyMethods} A client object tailored with Alchemy methods and capabilities to interact with the blockchain - */ -export const createAlchemyPublicRpcClient = ({ - transport, - chain, -}: { - transport: AlchemyTransport; - chain: Chain | undefined; -}): ClientWithAlchemyMethods => { - return createBundlerClient({ - chain, - transport, - }); -}; diff --git a/account-kit/infra/src/client/smartAccountClient.test.ts b/account-kit/infra/src/client/smartAccountClient.test.ts deleted file mode 100644 index e728b05574..0000000000 --- a/account-kit/infra/src/client/smartAccountClient.test.ts +++ /dev/null @@ -1,213 +0,0 @@ -import { - clientHeaderTrack, - LocalAccountSigner, - type ClientMiddlewareFn, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { createLightAccount } from "@account-kit/smart-contracts"; -import { http, zeroAddress } from "viem"; -import { generatePrivateKey } from "viem/accounts"; -import { alchemy } from "../alchemyTransport.js"; -import { sepolia } from "../chains.js"; -import { createAlchemySmartAccountClient } from "./smartAccountClient.js"; - -const headerMatcher = { - "Alchemy-AA-Sdk-Version": expect.any(String), -}; - -const fetchSpy = vi.spyOn(global, "fetch"); - -describe("AlchemySmartAccountClient tests", () => { - beforeEach(() => { - fetchSpy.mockClear(); - fetchSpy.mockImplementation(async () => { - return new Response(); - }); - }); - - it("should set the headers when using non-hoisted accounts", async () => { - const client = givenClient(); - await client - .request({ method: "eth_supportedEntryPoints", params: [] }) - .catch(() => {}); - - expect( - fetchSpy.mock.calls.map((x) => x[1]?.headers)[0], - ).toMatchInlineSnapshot( - { "Alchemy-AA-Sdk-Version": expect.stringMatching(/\d+\.\d+\.\d+/) }, - ` - { - "Alchemy-AA-Sdk-Version": StringMatching /\\\\d\\+\\\\\\.\\\\d\\+\\\\\\.\\\\d\\+/, - "Content-Type": "application/json", - } - `, - ); - - await client.middleware - // @ts-expect-error this is actually still there - .customMiddleware( - {}, - { - account: await createLightAccount({ - chain: sepolia, - transport: http(), - signer: - LocalAccountSigner.privateKeyToAccountSigner( - generatePrivateKey(), - ), - accountAddress: zeroAddress, - }), - }, - ) - .catch(() => {}); - - // clear the mock calls so we only get the latest call below - fetchSpy.mockClear(); - await client - .request({ method: "eth_supportedEntryPoints", params: [] }) - .catch(() => {}); - - expect( - fetchSpy.mock.calls.map((x) => x[1]?.headers)[0], - ).toMatchInlineSnapshot( - headerMatcher, - ` - { - "Alchemy-AA-Sdk-Version": Any, - "Alchemy-Aa-Sdk-Signer": "local", - "Content-Type": "application/json", - } - `, - ); - }); - - it("should set the headers with tracking", async () => { - const client_ = givenClient(); - const client = clientHeaderTrack( - clientHeaderTrack(client_, "test"), - "afterTest", - ); - await client - .request({ method: "eth_supportedEntryPoints", params: [] }) - .catch(() => {}); - - expect( - fetchSpy.mock.calls.map((x) => x[1]?.headers)[0], - ).toMatchInlineSnapshot( - { - "Alchemy-AA-Sdk-Version": expect.any(String), - "X-Alchemy-Client-Trace-Id": expect.stringMatching(/^[0-9a-f]{16}$/), - traceparent: expect.stringMatching(/^00-[0-9a-f]{32}-[0-9a-f]{16}-00$/), - "Content-Type": "application/json", - tracestate: "breadcrumbs=test-afterTest", - }, - ` - { - "Alchemy-AA-Sdk-Version": Any, - "Content-Type": "application/json", - "X-Alchemy-Client-Breadcrumb": "test > afterTest", - "X-Alchemy-Client-Trace-Id": StringMatching /\\^\\[0-9a-f\\]\\{16\\}\\$/, - "traceparent": StringMatching /\\^00-\\[0-9a-f\\]\\{32\\}-\\[0-9a-f\\]\\{16\\}-00\\$/, - "tracestate": "breadcrumbs=test-afterTest", - } - `, - ); - }); - - it("should set the headers when using hoisted accounts", async () => { - const client = givenClient({ - account: await createLightAccount({ - chain: sepolia, - transport: http(), - signer: - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), - accountAddress: zeroAddress, - }), - }); - - await client - .request({ method: "eth_supportedEntryPoints", params: [] }) - .catch(() => {}); - - expect( - fetchSpy.mock.calls.map((x) => x[1]?.headers)[0], - ).toMatchInlineSnapshot( - headerMatcher, - ` - { - "Alchemy-AA-Sdk-Version": Any, - "Alchemy-Aa-Sdk-Signer": "local", - "Content-Type": "application/json", - } - `, - ); - }); - - it("should still use customMiddleware if it is passed in", async () => { - const client = givenClient({ - customMiddleware: async (struct) => { - return { - ...struct, - callGasLimit: "0xdeadbeef", - }; - }, - }); - - expect( - // @ts-expect-error - this is available but not typed as public - await client.middleware.customMiddleware( - {}, - { - account: await createLightAccount({ - chain: sepolia, - transport: http(), - signer: - LocalAccountSigner.privateKeyToAccountSigner( - generatePrivateKey(), - ), - accountAddress: zeroAddress, - }), - }, - ), - ).toMatchInlineSnapshot(` - { - "callGasLimit": "0xdeadbeef", - } - `); - - await client - .request({ method: "eth_supportedEntryPoints", params: [] }) - .catch(() => {}); - - expect( - fetchSpy.mock.calls.map((x) => x[1]?.headers)[0], - ).toMatchInlineSnapshot( - headerMatcher, - ` - { - "Alchemy-AA-Sdk-Version": Any, - "Alchemy-Aa-Sdk-Signer": "local", - "Content-Type": "application/json", - } - `, - ); - }); - - const givenClient = ({ - account, - customMiddleware, - }: { - account?: SmartContractAccount; - customMiddleware?: ClientMiddlewareFn; - } = {}) => { - return createAlchemySmartAccountClient({ - transport: alchemy({ - rpcUrl: "https://localhost:3000", - retryCount: 0, - }), - chain: sepolia, - account, - customMiddleware, - }); - }; -}); diff --git a/account-kit/infra/src/client/smartAccountClient.ts b/account-kit/infra/src/client/smartAccountClient.ts deleted file mode 100644 index 1e53a63358..0000000000 --- a/account-kit/infra/src/client/smartAccountClient.ts +++ /dev/null @@ -1,205 +0,0 @@ -import { - ChainNotFoundError, - clientHeaderTrack, - createSmartAccountClient, - isSmartAccountWithSigner, - type Prettify, - type SmartAccountClient, - type SmartAccountClientActions, - type SmartAccountClientConfig, - type SmartAccountClientRpcSchema, - type SmartContractAccount, - type SmartContractAccountWithSigner, - type UserOperationContext, -} from "@aa-sdk/core"; -import { type Chain } from "viem"; -import { - alchemy, - convertHeadersToObject, - type AlchemyTransport, -} from "../alchemyTransport.js"; -import { getDefaultUserOperationFeeOptions } from "../defaults.js"; -import { alchemyFeeEstimator } from "../middleware/feeEstimator.js"; -import { alchemyGasAndPaymasterAndDataMiddleware } from "../middleware/gasManager.js"; -import { alchemyUserOperationSimulator } from "../middleware/userOperationSimulator.js"; -import { - alchemyActions, - type AlchemySmartAccountClientActions, -} from "./decorators/smartAccount.js"; -import type { AlchemyRpcSchema } from "./types.js"; -import { headersUpdate } from "../alchemyTrackerHeaders.js"; -import type { PolicyToken } from "../middleware/gasManager.js"; - -export function getSignerTypeHeader< - TAccount extends SmartContractAccountWithSigner, ->(account: TAccount) { - return { "Alchemy-Aa-Sdk-Signer": account.getSigner().signerType }; -} - -// #region AlchemySmartAccountClientConfig -export type AlchemySmartAccountClientConfig< - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = { - account?: account; - useSimulation?: boolean; - policyId?: string | string[]; - policyToken?: PolicyToken; -} & Pick< - SmartAccountClientConfig, - | "customMiddleware" - | "feeEstimator" - | "gasEstimator" - | "signUserOperation" - | "transport" - | "chain" - | "opts" ->; -// #endregion AlchemySmartAccountClientConfig - -export type BaseAlchemyActions< - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = SmartAccountClientActions & - AlchemySmartAccountClientActions; - -export type AlchemySmartAccountClient_Base< - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - actions extends Record = Record, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = Prettify< - SmartAccountClient< - AlchemyTransport, - chain, - account, - actions & BaseAlchemyActions, - [...SmartAccountClientRpcSchema, ...AlchemyRpcSchema], - context - > ->; - -export type AlchemySmartAccountClient< - chain extends Chain | undefined = Chain | undefined, - account extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - actions extends Record = Record, - context extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = Prettify>; - -export function createAlchemySmartAccountClient< - TChain extends Chain = Chain, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - params: AlchemySmartAccountClientConfig, -): AlchemySmartAccountClient, TContext>; - -/** - * Creates an Alchemy smart account client using the provided configuration options, including account details, gas manager configuration, and custom middleware. - * - * @example - * ```ts - * import { createAlchemySmartAccountClient, alchemy } from "@account-kit/infra"; - * import { sepolia } from "@account-kit/infra/chain"; - * - * const client = createAlchemySmartAccountClient({ - * chain: sepolia, - * transport: alchemy({ apiKey: "your-api-key" }), - * }); - * ``` - * - * @param {AlchemySmartAccountClientConfig} config The configuration for creating the Alchemy smart account client - * @returns {AlchemySmartAccountClient} An instance of `AlchemySmartAccountClient` configured based on the provided options - */ -export function createAlchemySmartAccountClient( - config: AlchemySmartAccountClientConfig, -): AlchemySmartAccountClient { - if (!config.chain) { - throw new ChainNotFoundError(); - } - - const feeOptions = - config.opts?.feeOptions ?? getDefaultUserOperationFeeOptions(config.chain); - - const scaClient = createSmartAccountClient({ - account: config.account, - transport: config.transport, - chain: config.chain, - type: "AlchemySmartAccountClient", - opts: { - ...config.opts, - feeOptions, - }, - feeEstimator: config.feeEstimator ?? alchemyFeeEstimator(config.transport), - gasEstimator: config.gasEstimator, - customMiddleware: async (struct, args) => { - if (isSmartAccountWithSigner(args.account)) { - config.transport.updateHeaders(getSignerTypeHeader(args.account)); - } - return config.customMiddleware - ? config.customMiddleware(struct, args) - : struct; - }, - ...(config.policyId - ? alchemyGasAndPaymasterAndDataMiddleware({ - policyId: config.policyId, - policyToken: config.policyToken, - transport: config.transport, - gasEstimatorOverride: config.gasEstimator, - feeEstimatorOverride: config.feeEstimator, - }) - : {}), - userOperationSimulator: config.useSimulation - ? alchemyUserOperationSimulator(config.transport) - : undefined, - signUserOperation: config.signUserOperation, - addBreadCrumb(breadcrumb: string) { - const oldConfig = config.transport.config; - const dynamicFetchOptions = config.transport.dynamicFetchOptions; - const newTransport = alchemy({ ...oldConfig }); - newTransport.updateHeaders( - headersUpdate(breadcrumb)( - convertHeadersToObject(dynamicFetchOptions?.headers), - ), - ); - return createAlchemySmartAccountClient({ - ...config, - transport: newTransport, - }) as any; - }, - }) - .extend(alchemyActions) - .extend((client_) => ({ - addBreadcrumb(breadcrumb: string) { - return clientHeaderTrack(client_, breadcrumb); - }, - })); - - if (config.account && isSmartAccountWithSigner(config.account)) { - config.transport.updateHeaders(getSignerTypeHeader(config.account)); - } - - return scaClient; -} diff --git a/account-kit/infra/src/client/types.ts b/account-kit/infra/src/client/types.ts deleted file mode 100644 index a27d175156..0000000000 --- a/account-kit/infra/src/client/types.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - type BundlerClient, - type Erc7677RpcSchema, - type UserOperationRequest, -} from "@aa-sdk/core"; -import type { - SimulateUserOperationAssetChangesRequest, - SimulateUserOperationAssetChangesResponse, - RequestGasAndPaymasterAndDataRequest, - RequestGasAndPaymasterAndDataResponse, - RequestPaymasterTokenQuoteRequest, - RequestPaymasterTokenQuoteResponse, -} from "../actions/types"; -import type { AlchemyTransport } from "../alchemyTransport"; - -export type AlchemyRpcSchema = [ - { - Method: "alchemy_simulateUserOperationAssetChanges"; - Parameters: SimulateUserOperationAssetChangesRequest; - ReturnType: SimulateUserOperationAssetChangesResponse; - }, - { - Method: "rundler_maxPriorityFeePerGas"; - Parameters: []; - ReturnType: UserOperationRequest["maxPriorityFeePerGas"]; - }, - ...Erc7677RpcSchema<{ policyId: string }>, - { - Method: "alchemy_requestGasAndPaymasterAndData"; - Parameters: RequestGasAndPaymasterAndDataRequest; - ReturnType: RequestGasAndPaymasterAndDataResponse; - }, - { - Method: "alchemy_requestPaymasterTokenQuote"; - Parameters: RequestPaymasterTokenQuoteRequest; - ReturnType: RequestPaymasterTokenQuoteResponse; - }, -]; - -export type ClientWithAlchemyMethods = BundlerClient & { - request: BundlerClient["request"] & - { - request(args: { - method: "alchemy_simulateUserOperationAssetChanges"; - params: SimulateUserOperationAssetChangesRequest; - }): Promise; - - request(args: { - method: "rundler_maxPriorityFeePerGas"; - params: []; - }): Promise; - - request(args: { - method: "alchemy_requestGasAndPaymasterAndData"; - params: RequestGasAndPaymasterAndDataRequest; - }): Promise; - }["request"]; -}; diff --git a/account-kit/infra/src/defaults.ts b/account-kit/infra/src/defaults.ts deleted file mode 100644 index add7fcaec1..0000000000 --- a/account-kit/infra/src/defaults.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { type UserOperationFeeOptions } from "@aa-sdk/core"; -import type { Chain } from "viem"; -import { - arbitrum, - arbitrumGoerli, - arbitrumSepolia, - optimism, - optimismGoerli, - optimismSepolia, -} from "./chains.js"; - -/** - * Retrieves the default user operation fee options for a given chain. Adjusts fees for specific chains like Arbitrum and Optimism. - * - * @example - * ```ts - * import { getDefaultUserOperationFeeOptions } from "@account-kit/infra"; - * import { arbitrum } from "@account-kit/infra"; - * - * const feeOpts = getDefaultUserOperationFeeOptions(arbitrum); - * ``` - * - * @param {Chain} chain The blockchain chain for which to get the fee options - * @returns {UserOperationFeeOptions} An object containing the default fee options for user operations on the specified chain - */ -export const getDefaultUserOperationFeeOptions = ( - chain: Chain, -): UserOperationFeeOptions => { - const feeOptions: UserOperationFeeOptions = { - maxFeePerGas: { multiplier: 1.5 }, - maxPriorityFeePerGas: { multiplier: 1.05 }, - }; - - if ( - new Set([ - arbitrum.id, - arbitrumGoerli.id, - arbitrumSepolia.id, - optimism.id, - optimismGoerli.id, - optimismSepolia.id, - ]).has(chain.id) - ) { - feeOptions.preVerificationGas = { multiplier: 1.05 }; - } - - return feeOptions; -}; diff --git a/account-kit/infra/src/enhancedApi/alchemyEnhancedApisDecorator.ts b/account-kit/infra/src/enhancedApi/alchemyEnhancedApisDecorator.ts deleted file mode 100644 index b49c233796..0000000000 --- a/account-kit/infra/src/enhancedApi/alchemyEnhancedApisDecorator.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { SmartContractAccount } from "@aa-sdk/core"; -import type { Alchemy } from "alchemy-sdk"; -import type { Chain } from "viem"; -import { AlchemySdkClientSchema } from "./schema.js"; -import type { AlchemySmartAccountClient } from "../client/smartAccountClient.js"; - -export type AlchemyEnhancedApis = { - core: Alchemy["core"]; - nft: Alchemy["nft"]; - transact: Alchemy["transact"]; - debug: Alchemy["debug"]; - ws: Alchemy["ws"]; - notify: Alchemy["notify"]; - config: Alchemy["config"]; -}; - -/** - * Given an instance of the Alchemy SDK, returns a smart account client decorator which contains actions for interacting Alchemy's enhanced APIs. - * - * @example - * ```ts - * import { Alchemy } from "alchemy-sdk"; - * import { alchemyEnhancedApiActions } from "@account-kit/infra/enhanced-apis"; - * import { alchemySCAClient } from "./client"; - * - * const alchemy = new Alchemy(...); - * const enhancedApiDecorator = alchemyEnhancedApiActions(alchemy); - * const withEnhancedApis = alchemySCAClient.extend(enhancedApiDecorator); - * ``` - * - * @param {Alchemy} alchemy The Alchemy instance containing the SDK client - * @returns {(client: AlchemySmartAccountClient) => AlchemyEnhancedApis} A client decorator for Alchemy Smart Account clients that adds the enhanced API methods - */ -export function alchemyEnhancedApiActions( - alchemy: Alchemy, -): < - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: AlchemySmartAccountClient, -) => AlchemyEnhancedApis { - return (client) => { - const alchemySdk = AlchemySdkClientSchema.parse(alchemy); - - if ( - alchemy.config.url && - alchemy.config.url !== client.transport.alchemyRpcUrl - ) { - throw new Error( - "Alchemy SDK client JSON-RPC URL must match AlchemyProvider JSON-RPC URL", - ); - } - - return { - core: alchemySdk.core, - nft: alchemySdk.nft, - transact: alchemySdk.transact, - debug: alchemySdk.debug, - ws: alchemySdk.ws, - notify: alchemySdk.notify, - config: alchemySdk.config, - }; - }; -} diff --git a/account-kit/infra/src/enhancedApi/schema.ts b/account-kit/infra/src/enhancedApi/schema.ts deleted file mode 100644 index 9c7a7f7df9..0000000000 --- a/account-kit/infra/src/enhancedApi/schema.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Alchemy } from "alchemy-sdk"; -import z from "zod"; - -export const AlchemySdkClientSchema = z.instanceof(Alchemy); diff --git a/account-kit/infra/src/errors/base.ts b/account-kit/infra/src/errors/base.ts deleted file mode 100644 index dc9da307ed..0000000000 --- a/account-kit/infra/src/errors/base.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { BaseError as CoreBaseError } from "@aa-sdk/core"; -import { VERSION } from "../version.js"; - -export abstract class BaseError extends CoreBaseError { - // This version could be different from the aa-core version so we overwrite this here. - override version = VERSION; -} diff --git a/account-kit/infra/src/errors/invalidSignedPermit.ts b/account-kit/infra/src/errors/invalidSignedPermit.ts deleted file mode 100644 index 0b239fb8e2..0000000000 --- a/account-kit/infra/src/errors/invalidSignedPermit.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseError } from "./base.js"; - -export class InvalidSignedPermit extends BaseError { - override name = "InvalidSignedPermit"; - - constructor(reason: string) { - super(["Invalid signed permit"].join("\n"), { - details: [reason, "Please provide a valid signed permit"].join("\n"), - }); - } -} diff --git a/account-kit/infra/src/errors/rpcUrl.ts b/account-kit/infra/src/errors/rpcUrl.ts deleted file mode 100644 index 7b27f6d410..0000000000 --- a/account-kit/infra/src/errors/rpcUrl.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type ConnectionConfig } from "@aa-sdk/core"; -import { type Chain } from "viem"; -import { BaseError } from "./base.js"; - -export class InvalidRpcUrlError extends BaseError { - override name = "InvalidRpcUrlError"; - - constructor(context: { chain: Chain; connectionConfig: ConnectionConfig }) { - super(["RPC Url not provided"].join("\n"), { - details: [ - "If you are passing in a chain object and only an API key, make sure to use the chain object exported from @aa-sdk/core", - "Otherwise, pass in an RPC URL directly", - ].join("\n"), - metaMessages: [ - `Chain: ${JSON.stringify(context.chain, null, 2)}`, - `ConnectionConfig: ${JSON.stringify(context.connectionConfig)}`, - ], - }); - } -} diff --git a/account-kit/infra/src/exports/enhancedApi.ts b/account-kit/infra/src/exports/enhancedApi.ts deleted file mode 100644 index d1915b498b..0000000000 --- a/account-kit/infra/src/exports/enhancedApi.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type * from "../enhancedApi/schema.js"; -export type * from "../enhancedApi/alchemyEnhancedApisDecorator.js"; -export { alchemyEnhancedApiActions } from "../enhancedApi/alchemyEnhancedApisDecorator.js"; diff --git a/account-kit/infra/src/exports/index.ts b/account-kit/infra/src/exports/index.ts deleted file mode 100644 index 8db8bfc7a2..0000000000 --- a/account-kit/infra/src/exports/index.ts +++ /dev/null @@ -1,83 +0,0 @@ -export type * from "../actions/simulateUserOperationChanges.js"; -export { simulateUserOperationChanges } from "../actions/simulateUserOperationChanges.js"; -export type * from "../actions/types.js"; -export type * from "../alchemyTransport.js"; -export { alchemy, isAlchemyTransport } from "../alchemyTransport.js"; -export type * from "../chains.js"; -export { - arbitrum, - arbitrumGoerli, - arbitrumNova, - arbitrumSepolia, - base, - baseGoerli, - baseSepolia, - bsc, - bscTestnet, - defineAlchemyChain, - fraxtal, - fraxtalSepolia, - goerli, - mainnet, - optimism, - optimismGoerli, - optimismSepolia, - polygon, - polygonAmoy, - polygonMumbai, - sepolia, - shape, - shapeSepolia, - worldChain, - worldChainSepolia, - zora, - zoraSepolia, - beraChainBartio, - opbnbMainnet, - opbnbTestnet, - soneiumMinato, - soneiumMainnet, - unichainMainnet, - unichainSepolia, - inkMainnet, - inkSepolia, - mekong, - monadTestnet, - monadMainnet, - openlootSepolia, - gensynTestnet, - riseTestnet, - storyMainnet, - storyAeneid, - celoMainnet, - celoSepolia, - teaSepolia, - bobaSepolia, - bobaMainnet, - edgeMainnet, - stableMainnet, - mythosMainnet, - worldl3devnet, - hyperliquid, - hyperliquidEvmTestnet, -} from "../chains.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/rpcClient.js"; -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 { getDefaultUserOperationFeeOptions } from "../defaults.js"; -export { getAlchemyPaymasterAddress } from "../gas-manager.js"; -export { alchemyFeeEstimator } from "../middleware/feeEstimator.js"; -export type * from "../middleware/gasManager.js"; -export * from "../alchemyTrackerHeaders.js"; -export { - alchemyGasManagerMiddleware, - alchemyGasAndPaymasterAndDataMiddleware, - type PolicyToken, -} from "../middleware/gasManager.js"; -export { alchemyUserOperationSimulator } from "../middleware/userOperationSimulator.js"; -export type * from "../schema.js"; diff --git a/account-kit/infra/src/gas-manager.ts b/account-kit/infra/src/gas-manager.ts deleted file mode 100644 index c9b5fe02a9..0000000000 --- a/account-kit/infra/src/gas-manager.ts +++ /dev/null @@ -1,241 +0,0 @@ -import { encodeFunctionData, type Address, type Chain, type Hex } from "viem"; -import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - fraxtal, - fraxtalSepolia, - mainnet, - optimism, - optimismSepolia, - polygon, - polygonAmoy, - unichainSepolia, - worldChainSepolia, - sepolia, - zora, - zoraSepolia, - shapeSepolia, - optimismGoerli, - arbitrumGoerli, - arbitrumNova, - baseGoerli, - beraChainBartio, - celoMainnet, - gensynTestnet, - goerli, - inkMainnet, - inkSepolia, - monadTestnet, - opbnbMainnet, - opbnbTestnet, - openlootSepolia, - polygonMumbai, - riseTestnet, - shape, - soneiumMainnet, - soneiumMinato, - storyAeneid, - storyMainnet, - teaSepolia, - unichainMainnet, - worldChain, -} from "./chains.js"; -import type { EntryPointVersion } from "@aa-sdk/core"; -export const AlchemyPaymasterAddressV06Unify = - "0x0000000000ce04e2359130e7d0204A5249958921"; -export const AlchemyPaymasterAddressV07Unify = - "0x00000000000667F27D4DB42334ec11a25db7EBb4"; - -export const AlchemyPaymasterAddressV4 = - "0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2"; -export const AlchemyPaymasterAddressV3 = - "0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F"; -export const AlchemyPaymasterAddressV2 = - "0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc"; -export const ArbSepoliaPaymasterAddress = - "0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592"; -export const AlchemyPaymasterAddressV1 = - "0xc03aac639bb21233e0139381970328db8bceeb67"; - -export const AlchemyPaymasterAddressV07V2 = - "0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633"; -export const AlchemyPaymasterAddressV07V1 = - "0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B"; - -/** - * Retrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID. - * - * @example - * ```ts - * import { sepolia, getAlchemyPaymasterAddress } from "@account-kit/infra"; - * - * const paymasterAddress = getAlchemyPaymasterAddress(sepolia, "0.6.0"); - * ``` - * - * @param {Chain} chain The chain for which the paymaster address is required - * @param {EntryPointVersion} version The version of the entry point - * @returns {Address} The Alchemy paymaster address corresponding to the specified chain - */ -export const getAlchemyPaymasterAddress = ( - chain: Chain, - version: EntryPointVersion, -): Address => { - switch (version) { - case "0.6.0": - switch (chain.id) { - case fraxtalSepolia.id: - case worldChainSepolia.id: - case shapeSepolia.id: - case unichainSepolia.id: - case opbnbTestnet.id: - case inkSepolia.id: - case monadTestnet.id: - case openlootSepolia.id: - case gensynTestnet.id: - case riseTestnet.id: - case storyAeneid.id: - case teaSepolia.id: - case arbitrumGoerli.id: - case goerli.id: - case optimismGoerli.id: - case baseGoerli.id: - case polygonMumbai.id: - case worldChain.id: - case shape.id: - case unichainMainnet.id: - case soneiumMinato.id: - case soneiumMainnet.id: - case opbnbMainnet.id: - case beraChainBartio.id: - case inkMainnet.id: - case arbitrumNova.id: - case storyMainnet.id: - case celoMainnet.id: - return AlchemyPaymasterAddressV4; - case polygonAmoy.id: - case optimismSepolia.id: - case baseSepolia.id: - case zora.id: - case zoraSepolia.id: - case fraxtal.id: - return AlchemyPaymasterAddressV3; - case mainnet.id: - case arbitrum.id: - case optimism.id: - case polygon.id: - case base.id: - return AlchemyPaymasterAddressV2; - case arbitrumSepolia.id: - return ArbSepoliaPaymasterAddress; - case sepolia.id: - return AlchemyPaymasterAddressV1; - default: - return AlchemyPaymasterAddressV06Unify; - } - case "0.7.0": - switch (chain.id) { - case arbitrumNova.id: - case celoMainnet.id: - case gensynTestnet.id: - case inkMainnet.id: - case inkSepolia.id: - case monadTestnet.id: - case opbnbMainnet.id: - case opbnbTestnet.id: - case openlootSepolia.id: - case riseTestnet.id: - case shape.id: - case shapeSepolia.id: - case soneiumMainnet.id: - case soneiumMinato.id: - case storyAeneid.id: - case storyMainnet.id: - case teaSepolia.id: - case unichainMainnet.id: - case unichainSepolia.id: - case worldChain.id: - case worldChainSepolia.id: - return AlchemyPaymasterAddressV07V1; - case arbitrum.id: - case arbitrumGoerli.id: - case arbitrumSepolia.id: - case base.id: - case baseGoerli.id: - case baseSepolia.id: - case beraChainBartio.id: - case fraxtal.id: - case fraxtalSepolia.id: - case goerli.id: - case mainnet.id: - case optimism.id: - case optimismGoerli.id: - case optimismSepolia.id: - case polygon.id: - case polygonAmoy.id: - case polygonMumbai.id: - case sepolia.id: - case zora.id: - case zoraSepolia.id: - return AlchemyPaymasterAddressV07V2; - default: - return AlchemyPaymasterAddressV07Unify; - } - default: - throw new Error(`Unsupported EntryPointVersion: ${version}`); - } -}; - -export const PermitTypes = { - EIP712Domain: [ - { name: "name", type: "string" }, - { name: "version", type: "string" }, - { name: "chainId", type: "uint256" }, - { name: "verifyingContract", type: "address" }, - ], - Permit: [ - { name: "owner", type: "address" }, - { name: "spender", type: "address" }, - { name: "value", type: "uint256" }, - { name: "nonce", type: "uint256" }, - { name: "deadline", type: "uint256" }, - ], -} as const; - -export const ERC20Abis = [ - "function decimals() public view returns (uint8)", - "function balanceOf(address owner) external view returns (uint256)", - "function allowance(address owner, address spender) external view returns (uint256)", - "function approve(address spender, uint256 amount) external returns (bool)", -] as const; - -export const EIP7597Abis = [ - "function nonces(address owner) external view returns (uint)", -] as const; - -export const approveTokenCallData = ( - paymasterAddress: Address, - allowance: BigInt, -) => { - return encodeFunctionData({ - abi: ERC20Abis, - functionName: "approve", - args: [paymasterAddress, allowance], - }); -}; - -export type PermitMessage = { - owner: Hex; - spender: Hex; - value: bigint; - nonce: bigint; - deadline: bigint; -}; - -export type PermitDomain = { - name: string; - version: string; - chainId: bigint; - verifyingContract: Hex; -}; diff --git a/account-kit/infra/src/metrics.ts b/account-kit/infra/src/metrics.ts deleted file mode 100644 index 7b04c57f40..0000000000 --- a/account-kit/infra/src/metrics.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { createLogger } from "@account-kit/logging"; -import type { Address } from "viem"; -import { VERSION } from "./version.js"; - -export type InfraEventsSchema = [ - { - EventName: "client_send_uo"; - EventData: { - signerType: string; - chainId: number; - entryPoint: Address; - }; - }, -]; - -export const InfraLogger = createLogger({ - package: "@account-kit/infra", - version: VERSION, -}); diff --git a/account-kit/infra/src/middleware/feeEstimator.ts b/account-kit/infra/src/middleware/feeEstimator.ts deleted file mode 100644 index 6e95dbb549..0000000000 --- a/account-kit/infra/src/middleware/feeEstimator.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { ClientMiddlewareFn } from "@aa-sdk/core"; -import { - applyUserOpOverrideOrFeeOption, - bigIntMultiply, - clientHeaderTrack, -} from "@aa-sdk/core"; -import type { AlchemyTransport } from "../alchemyTransport"; - -/** - * Function that estimates the transaction fees using Alchemy methods for a given client. - * It fetches the latest block and estimates the max priority fee per gas, applying any overrides or fee options provided. - * - * @example - * ```ts - * import { alchemyFeeEstimator, alchemy } from "@account-kit/infra"; - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * const alchemyTransport = alchemy({ - * chain: sepolia, - * apiKey: "your-api-key" - * }); - * - * const client = createSmartAccountClient({ - * feeEstimator: alchemyFeeEstimator(alchemyTransport), - * ...otherParams - * }); - * ``` - * - * @param {AlchemyTransport} transport An alchemy transport for making Alchemy specific RPC calls - * @returns {ClientMiddlewareFn} A middleware function that takes a transaction structure and fee options, and returns the augmented structure with estimated fees - */ -export const alchemyFeeEstimator: ( - transport: AlchemyTransport, -) => ClientMiddlewareFn = - (transport) => - async (struct, { overrides, feeOptions, client: client_ }) => { - const client = clientHeaderTrack(client_, "alchemyFeeEstimator"); - const transport_ = transport({ chain: client.chain }); - let [block, maxPriorityFeePerGasEstimate] = await Promise.all([ - client.getBlock({ blockTag: "latest" }), - // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC - transport_.request({ - method: "rundler_maxPriorityFeePerGas", - params: [], - }), - ]); - - const baseFeePerGas = block.baseFeePerGas; - if (baseFeePerGas == null) { - throw new Error("baseFeePerGas is null"); - } - - const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption( - maxPriorityFeePerGasEstimate, - overrides?.maxPriorityFeePerGas, - feeOptions?.maxPriorityFeePerGas, - ); - const maxFeePerGas = applyUserOpOverrideOrFeeOption( - bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), - overrides?.maxFeePerGas, - feeOptions?.maxFeePerGas, - ); - - return { - ...struct, - maxPriorityFeePerGas, - maxFeePerGas, - }; - }; diff --git a/account-kit/infra/src/middleware/gasManager.ts b/account-kit/infra/src/middleware/gasManager.ts deleted file mode 100644 index 7923712023..0000000000 --- a/account-kit/infra/src/middleware/gasManager.ts +++ /dev/null @@ -1,526 +0,0 @@ -import type { - Address, - ClientMiddlewareConfig, - ClientMiddlewareFn, - EntryPointVersion, - Multiplier, - SmartContractAccount, - UserOperationContext, - UserOperationFeeOptions, - UserOperationOverrides, - UserOperationRequest, -} from "@aa-sdk/core"; -import { - bypassPaymasterAndData, - ChainNotFoundError, - clientHeaderTrack, - deepHexlify, - defaultGasEstimator, - erc7677Middleware, - filterUndefined, - isBigNumberish, - isMultiplier, - noopMiddleware, - resolveProperties, -} from "@aa-sdk/core"; -import { - fromHex, - isHex, - type Hex, - encodeAbiParameters, - encodeFunctionData, - parseAbi, -} from "viem"; -import type { AlchemySmartAccountClient } from "../client/smartAccountClient.js"; -import type { AlchemyTransport } from "../alchemyTransport.js"; -import { alchemyFeeEstimator } from "./feeEstimator.js"; -import type { RequestGasAndPaymasterAndDataRequest } from "../actions/types.js"; - -import { - PermitTypes, - EIP7597Abis, - ERC20Abis, - getAlchemyPaymasterAddress, -} from "../gas-manager.js"; -import type { PermitMessage, PermitDomain } from "../gas-manager.js"; -import type { MiddlewareClient } from "@aa-sdk/core"; -import { InvalidSignedPermit } from "../errors/invalidSignedPermit.js"; - -export type PaymasterContext = { - policyId: string | string[]; - erc20Context?: { - tokenAddress: Address; - maxTokenAmount?: bigint; - permit?: Hex; - }; - webhookData?: string; -}; - -export type PolicyToken = { - address: Address; - maxTokenAmount: bigint; - permit?: { - paymasterAddress?: Address; - autoPermitApproveTo: bigint; - autoPermitBelow: bigint; - erc20Name: string; - version: string; - }; -}; - -/** - * Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring - * transactions. Adheres to the ERC-7677 standardized communication protocol. - * - * @example - * ```ts - * import { sepolia, alchemyGasManagerMiddleware } from "@account-kit/infra"; - * import { http } from "viem"; - * - * const client = createSmartAccountClient({ - * transport: http("rpc-url"), - * chain: sepolia, - * ...alchemyGasManagerMiddleware("policyId") - * }); - * ``` - * - * @param {string | string[]} policyId - The policyId (or list of policyIds) for Alchemy's gas manager - * @param {PolicyToken | undefined} policyToken - The policy token configuration - * @param {string | undefined} webhookData - The webhook data to include in the request - * @returns {Pick} Partial client middleware configuration containing `dummyPaymasterAndData` and `paymasterAndData` - */ -export function alchemyGasManagerMiddleware( - policyId: string | string[], - policyToken?: PolicyToken, - webhookData?: string, -): Required< - Pick -> { - const buildContext = async ( - args: Parameters[1], - ): Promise => { - const context: PaymasterContext = { policyId }; - - const { account, client } = args; - if (!client.chain) { - throw new ChainNotFoundError(); - } - - if (policyToken !== undefined) { - context.erc20Context = { - tokenAddress: policyToken.address, - maxTokenAmount: policyToken.maxTokenAmount, - }; - - if (policyToken.permit !== undefined) { - const permit = await generateSignedPermit(client, account, policyToken); - if (permit !== undefined) { - context.erc20Context.permit = permit; - } - } else if (args.context !== undefined) { - context.erc20Context.permit = extractSignedPermitFromContext( - args.context, - ); - } - } - - if (webhookData !== undefined) { - context.webhookData = webhookData; - } - - return context; - }; - return { - dummyPaymasterAndData: async (uo, args) => { - const context = await buildContext(args); - const baseMiddleware = erc7677Middleware({ context }); - return baseMiddleware.dummyPaymasterAndData(uo, args); - }, - - paymasterAndData: async (uo, args) => { - const context = await buildContext(args); - const baseMiddleware = erc7677Middleware({ context }); - return baseMiddleware.paymasterAndData(uo, args); - }, - }; -} - -interface AlchemyGasAndPaymasterAndDataMiddlewareParams { - policyId: string | string[]; - policyToken?: PolicyToken; - webhookData?: string; - transport: AlchemyTransport; - gasEstimatorOverride?: ClientMiddlewareFn; - feeEstimatorOverride?: ClientMiddlewareFn; -} - -/** - * Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring - * transactions. Uses Alchemy's custom `alchemy_requestGasAndPaymasterAndData` - * method instead of conforming to the standard ERC-7677 interface. Note that - * if you use `createAlchemySmartAccountClient`, this middleware is already - * used by default and you do not need to manually include it. - * - * @example - * ```ts twoslash - * import { sepolia, alchemy, alchemyGasAndPaymasterAndDataMiddleware } from "@account-kit/infra"; - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * const client = createSmartAccountClient({ - * transport: alchemy({ apiKey: "your-api-key" }), - * chain: sepolia, - * ...alchemyGasAndPaymasterAndDataMiddleware({ - * policyId: "policyId", - * transport: alchemy({ apiKey: "your-api-key" }), - * }) - * }); - * ``` - * - * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams} params configuration params - * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams.policyId} params.policyId the policyId for Alchemy's gas manager - * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams.transport} params.transport fallback transport to use for fee estimation when not using the paymaster - * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams.gasEstimatorOverride} params.gasEstimatorOverride custom gas estimator middleware - * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams.feeEstimatorOverride} params.feeEstimatorOverride custom fee estimator middleware - * @returns {Pick} partial client middleware configuration containing `dummyPaymasterAndData`, `feeEstimator`, `gasEstimator`, and `paymasterAndData` - */ -export function alchemyGasAndPaymasterAndDataMiddleware( - params: AlchemyGasAndPaymasterAndDataMiddlewareParams, -): Pick< - ClientMiddlewareConfig, - "dummyPaymasterAndData" | "feeEstimator" | "gasEstimator" | "paymasterAndData" -> { - const { - policyId, - policyToken, - transport, - webhookData, - gasEstimatorOverride, - feeEstimatorOverride, - } = params; - return { - dummyPaymasterAndData: async (uo, args) => { - if ( - // No reason to generate dummy data if we are bypassing the paymaster. - bypassPaymasterAndData(args.overrides) || - // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy - // data. However, if the gas/feeEstimator is overriden, then this option should be enabled. - !(gasEstimatorOverride || feeEstimatorOverride) - ) { - return noopMiddleware(uo, args); - } - - // Fall back to the default 7677 dummyPaymasterAndData middleware. - return alchemyGasManagerMiddleware( - policyId, - policyToken, - webhookData, - ).dummyPaymasterAndData(uo, args); - }, - feeEstimator: (uo, args) => { - return feeEstimatorOverride - ? feeEstimatorOverride(uo, args) - : bypassPaymasterAndData(args.overrides) - ? alchemyFeeEstimator(transport)(uo, args) - : noopMiddleware(uo, args); - }, - gasEstimator: (uo, args) => { - return gasEstimatorOverride - ? gasEstimatorOverride(uo, args) - : bypassPaymasterAndData(args.overrides) - ? defaultGasEstimator(args.client)(uo, args) - : noopMiddleware(uo, args); - }, - paymasterAndData: async ( - uo, - { - account, - client: client_, - feeOptions, - overrides: overrides_, - context: uoContext, - }, - ) => { - const client = clientHeaderTrack(client_, "alchemyFeeEstimator"); - if (!client.chain) { - throw new ChainNotFoundError(); - } - - const userOp = deepHexlify(await resolveProperties(uo)); - - const overrides: UserOperationOverrides = filterUndefined({ - maxFeePerGas: overrideField( - "maxFeePerGas", - overrides_ as UserOperationOverrides, - feeOptions, - userOp, - ), - maxPriorityFeePerGas: overrideField( - "maxPriorityFeePerGas", - overrides_ as UserOperationOverrides, - feeOptions, - userOp, - ), - callGasLimit: overrideField( - "callGasLimit", - overrides_ as UserOperationOverrides, - feeOptions, - userOp, - ), - verificationGasLimit: overrideField( - "verificationGasLimit", - overrides_ as UserOperationOverrides, - feeOptions, - userOp, - ), - preVerificationGas: overrideField( - "preVerificationGas", - overrides_ as UserOperationOverrides, - feeOptions, - userOp, - ), - ...(account.getEntryPoint().version === "0.7.0" - ? { - paymasterVerificationGasLimit: overrideField<"0.7.0">( - "paymasterVerificationGasLimit", - overrides_ as UserOperationOverrides<"0.7.0">, - feeOptions, - userOp, - ), - paymasterPostOpGasLimit: overrideField<"0.7.0">( - "paymasterPostOpGasLimit", - overrides_ as UserOperationOverrides<"0.7.0">, - feeOptions, - userOp, - ), - } - : {}), - }); - - let erc20Context: RequestGasAndPaymasterAndDataRequest[0]["erc20Context"] = - undefined; - if (policyToken !== undefined) { - erc20Context = { - tokenAddress: policyToken.address, - maxTokenAmount: policyToken.maxTokenAmount, - }; - if (policyToken.permit !== undefined) { - const permit = await generateSignedPermit( - client, - account, - policyToken, - ); - if (permit !== undefined) { - erc20Context.permit = permit; - } - } else if (uoContext !== undefined) { - erc20Context.permit = extractSignedPermitFromContext(uoContext); - } - } - - const result = await (client as AlchemySmartAccountClient).request({ - method: "alchemy_requestGasAndPaymasterAndData", - params: [ - { - policyId, - entryPoint: account.getEntryPoint().address, - userOperation: userOp, - dummySignature: await account.getDummySignature(), - overrides, - webhookData, - ...(erc20Context - ? { - erc20Context, - } - : {}), - }, - ], - }); - - return { - ...uo, - ...result, - }; - }, - }; -} - -/** - * Utility function to override a field in the user operation request with the overrides or fee options - * - * @template {EntryPointVersion} TEntryPointVersion - * @param {keyof UserOperationFeeOptions} field the field to override - * @param {UserOperationOverrides | undefined} overrides the overrides object - * @param {UserOperationFeeOptions | undefined} feeOptions the fee options object from the client - * @param {UserOperationRequest} userOperation the user operation request - * @returns {Hex | Multiplier | undefined} the overridden field value - */ -const overrideField = < - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->( - field: keyof UserOperationFeeOptions, - overrides: UserOperationOverrides | undefined, - feeOptions: UserOperationFeeOptions | undefined, - userOperation: UserOperationRequest, -): Hex | Multiplier | undefined => { - let _field = field as keyof UserOperationOverrides; - - if (overrides?.[_field] != null) { - // one-off absolute override - if (isBigNumberish(overrides[_field])) { - return deepHexlify(overrides[_field]); - } - // one-off multiplier overrides - else { - return { - multiplier: Number((overrides[_field] as Multiplier).multiplier), - }; - } - } - - // provider level fee options with multiplier - if (isMultiplier(feeOptions?.[field])) { - return { - multiplier: Number((feeOptions![field] as Multiplier).multiplier), - }; - } - - const userOpField = - userOperation[field as keyof UserOperationRequest]; - if (isHex(userOpField) && fromHex(userOpField as Hex, "bigint") > 0n) { - return userOpField; - } - return undefined; -}; - -/** - * Utility function to generate a signed Permit for erc20 transaction - * - * @param {MiddlewareClient} client - The Alchemy smart account client - * @param {TAccount} account - The smart account instance - * @param {PolicyToken} policyToken - The policy token configuration - * @returns {Promise} Returns a Promise containing the signed EIP2612 permit - */ -const generateSignedPermit = async ( - client: MiddlewareClient, - account: TAccount, - policyToken: PolicyToken, -): Promise => { - if (!client.chain) { - throw new ChainNotFoundError(); - } - if (!policyToken.permit) { - throw new Error("permit is missing"); - } - - if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) { - throw new Error("erc20Name or version is missing"); - } - - const paymasterAddress = - policyToken.permit.paymasterAddress ?? - getAlchemyPaymasterAddress(client.chain, account.getEntryPoint().version); - - if (paymasterAddress === undefined || paymasterAddress === "0x") { - throw new Error("no paymaster contract address available"); - } - - let allowanceFuture = client.call({ - to: policyToken.address, - data: encodeFunctionData({ - abi: parseAbi(ERC20Abis), - functionName: "allowance", - args: [account.address, paymasterAddress], - }), - }); - - let nonceFuture = client.call({ - to: policyToken.address, - data: encodeFunctionData({ - abi: parseAbi(EIP7597Abis), - functionName: "nonces", - args: [account.address], - }), - }); - - const [allowanceResponse, nonceResponse] = await Promise.all([ - allowanceFuture, - nonceFuture, - ]); - - if (!allowanceResponse.data) { - throw new Error("No allowance returned from erc20 contract call"); - } - - if (!nonceResponse.data) { - throw new Error("No nonces returned from erc20 contract call"); - } - - const permitLimit = policyToken.permit.autoPermitApproveTo; - const currentAllowance: bigint = BigInt(allowanceResponse.data); - if (currentAllowance > policyToken.permit.autoPermitBelow) { - // no need to generate permit - return undefined; - } - - const nonce = BigInt(nonceResponse.data); - - const deadline = BigInt(Math.floor(Date.now() / 1000) + 60 * 10); - - const typedPermitData = { - types: PermitTypes, - primaryType: "Permit" as const, - domain: { - name: policyToken.permit.erc20Name ?? "", - version: policyToken.permit.version ?? "", - chainId: BigInt(client.chain.id), - verifyingContract: policyToken.address, - } satisfies PermitDomain, - message: { - owner: account.address, - spender: paymasterAddress, - value: permitLimit as bigint, - nonce: nonce, - deadline, - } satisfies PermitMessage, - } as const; - - const signedPermit = await account.signTypedData(typedPermitData); - return encodeSignedPermit(permitLimit, deadline, signedPermit); -}; - -function extractSignedPermitFromContext( - context: UserOperationContext, -): Hex | undefined { - if (context.signedPermit === undefined) { - return undefined; - } - - if (typeof context.signedPermit !== "object") { - throw new InvalidSignedPermit("signedPermit is not an object"); - } - if (typeof context.signedPermit.value !== "bigint") { - throw new InvalidSignedPermit("signedPermit.value is not a bigint"); - } - if (typeof context.signedPermit.deadline !== "bigint") { - throw new InvalidSignedPermit("signedPermit.deadline is not a bigint"); - } - if (!isHex(context.signedPermit.signature)) { - throw new InvalidSignedPermit("signedPermit.signature is not a hex string"); - } - return encodeSignedPermit( - context.signedPermit.value, - context.signedPermit.deadline, - context.signedPermit.signature, - ); -} - -function encodeSignedPermit( - value: bigint, - deadline: bigint, - signedPermit: Hex, -) { - return encodeAbiParameters( - [{ type: "uint256" }, { type: "uint256" }, { type: "bytes" }], - [value, deadline, signedPermit], - ); -} diff --git a/account-kit/infra/src/middleware/userOperationSimulator.ts b/account-kit/infra/src/middleware/userOperationSimulator.ts deleted file mode 100644 index c6bb66095d..0000000000 --- a/account-kit/infra/src/middleware/userOperationSimulator.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { - deepHexlify, - resolveProperties, - type ClientMiddlewareFn, - type UserOperationContext, -} from "@aa-sdk/core"; -import type { AlchemyTransport } from "../alchemyTransport"; - -/** - * A middleware function to be used during simulation of user operations which leverages Alchemy's RPC uo simulation method. - * - * @example - * ```ts - * import { alchemyUserOperationSimulator, alchemy, sepolia } from "@account-kit/infra"; - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * const alchemyTransport = alchemy({ - * chain: sepolia, - * apiKey: "your-api-key" - * }); - * - * const client = createSmartAccountClient({ - * chain: sepolia, - * userOperationSimulator: alchemyUserOperationSimulator(alchemyTransport), - * ...otherParams - * }); - * ``` - * - * @param {AlchemyTransport} transport An Alchemy Transport that can be used for making RPC calls to alchemy - * @returns {ClientMiddlewareFn} A middleware function to simulate and process user operations - */ -export function alchemyUserOperationSimulator< - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->(transport: AlchemyTransport): ClientMiddlewareFn { - return async (struct, { account, client }) => { - const uoSimResult = await transport({ chain: client.chain }).request({ - method: "alchemy_simulateUserOperationAssetChanges", - params: [ - deepHexlify(await resolveProperties(struct)), - account.getEntryPoint().address, - ], - }); - - if (uoSimResult.error) { - throw new Error(uoSimResult.error.message); - } - - return struct; - }; -} diff --git a/account-kit/infra/src/schema.ts b/account-kit/infra/src/schema.ts deleted file mode 100644 index 887ee869a0..0000000000 --- a/account-kit/infra/src/schema.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ChainSchema } from "@aa-sdk/core"; -import type { Chain } from "viem"; -import z from "zod"; - -export const AlchemyChainSchema = z.custom((chain) => { - const chain_ = ChainSchema.parse(chain); - - return chain_.rpcUrls.alchemy != null; -}, "chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`."); diff --git a/account-kit/infra/src/version.ts b/account-kit/infra/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/infra/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/infra/typedoc.json b/account-kit/infra/typedoc.json deleted file mode 100644 index 4d68c9780a..0000000000 --- a/account-kit/infra/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["src/exports/index.ts"], - "tsconfig": "./tsconfig.build.json", - "plugin": ["typedoc-plugin-markdown"], - "fileExtension": ".mdx" -} diff --git a/account-kit/infra/vitest.config.ts b/account-kit/infra/vitest.config.ts deleted file mode 100644 index fd23b867a0..0000000000 --- a/account-kit/infra/vitest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/infra", - }, - }), -); diff --git a/account-kit/logging/CHANGELOG.md b/account-kit/logging/CHANGELOG.md deleted file mode 100644 index 33609ca38f..0000000000 --- a/account-kit/logging/CHANGELOG.md +++ /dev/null @@ -1,602 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/logging - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/logging - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/logging - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/logging - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/logging - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/logging - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/logging - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/logging - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/logging - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/logging - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/logging - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/logging - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/logging - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/logging - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/logging - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/logging - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/logging - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/logging - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/logging - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/logging - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/logging - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/logging - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/logging - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/logging - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/logging - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/logging - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/logging - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/logging - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/logging - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/logging - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/logging - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/logging - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/logging - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @account-kit/logging - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/logging - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/logging - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -**Note:** Version bump only for package @account-kit/logging - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/logging - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -**Note:** Version bump only for package @account-kit/logging - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @account-kit/logging - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/logging - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/logging - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/logging - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/logging - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/logging - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/logging - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -**Note:** Version bump only for package @account-kit/logging - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @account-kit/logging - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/logging - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -### Features - -- remove segment & add heap to demo app ([#1983](https://github.com/alchemyplatform/aa-sdk/issues/1983)) ([658bd54](https://github.com/alchemyplatform/aa-sdk/commit/658bd54c9cd4b0c59bd804cdc85ddef1caa3164f)) - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/logging - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/logging - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/logging - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/logging - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/logging - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/logging - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @account-kit/logging - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/logging - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -**Note:** Version bump only for package @account-kit/logging - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/logging - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @account-kit/logging - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/logging - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @account-kit/logging - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/logging - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/logging - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/logging - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/logging - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/logging - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @account-kit/logging - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @account-kit/logging - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/logging - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @account-kit/logging - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/logging - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/logging - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @account-kit/logging - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/logging - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/logging - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/logging - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -**Note:** Version bump only for package @account-kit/logging - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/logging - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/logging - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/logging - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @account-kit/logging - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/logging - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/logging - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @account-kit/logging - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @account-kit/logging - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/logging - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/logging - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -**Note:** Version bump only for package @account-kit/logging - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/logging - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/logging - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -**Note:** Version bump only for package @account-kit/logging - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @account-kit/logging - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/logging - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/logging - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/logging - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/logging - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @account-kit/logging - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @account-kit/logging - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @account-kit/logging - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/logging - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @account-kit/logging - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -**Note:** Version bump only for package @account-kit/logging - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/logging - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @account-kit/logging - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -**Note:** Version bump only for package @account-kit/logging - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @account-kit/logging - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/logging - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/logging - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -**Note:** Version bump only for package @account-kit/logging - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -**Note:** Version bump only for package @account-kit/logging - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @account-kit/logging - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/logging - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/logging - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/logging - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -**Note:** Version bump only for package @account-kit/logging - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -**Note:** Version bump only for package @account-kit/logging - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -**Note:** Version bump only for package @account-kit/logging - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @account-kit/logging - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @account-kit/logging - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -**Note:** Version bump only for package @account-kit/logging - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -**Note:** Version bump only for package @account-kit/logging - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -**Note:** Version bump only for package @account-kit/logging - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -**Note:** Version bump only for package @account-kit/logging - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @account-kit/logging - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @account-kit/logging - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -**Note:** Version bump only for package @account-kit/logging - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -**Note:** Version bump only for package @account-kit/logging - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -**Note:** Version bump only for package @account-kit/logging - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -### Bug Fixes - -- bigint multiply was sometimes generating floats ([#1135](https://github.com/alchemyplatform/aa-sdk/issues/1135)) ([217443f](https://github.com/alchemyplatform/aa-sdk/commit/217443f33a46e99e1712dcf368a582d4dc3ac2ef)) - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -### Bug Fixes - -- **logging:** check process is defined ([#1124](https://github.com/alchemyplatform/aa-sdk/issues/1124)) ([337c012](https://github.com/alchemyplatform/aa-sdk/commit/337c01264c7479328dc8f9e75a231f7493c9c22d)) - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -**Note:** Version bump only for package @account-kit/logging - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @account-kit/logging - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -### Bug Fixes - -- **logging:** add better dev mode checking so this works in RN ([#1099](https://github.com/alchemyplatform/aa-sdk/issues/1099)) ([5a15482](https://github.com/alchemyplatform/aa-sdk/commit/5a1548216f8eac6eac33f3c9dbb6f91bc64576c3)) - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -**Note:** Version bump only for package @account-kit/logging - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -**Note:** Version bump only for package @account-kit/logging - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -### Bug Fixes - -- **logging:** no cors on the static resource ([#1060](https://github.com/alchemyplatform/aa-sdk/issues/1060)) ([6045c48](https://github.com/alchemyplatform/aa-sdk/commit/6045c488dd3f4f7ee18af74c263215a98b5eb301)) - -### Features - -- add logger schemas to infra, react, core ([65fac7d](https://github.com/alchemyplatform/aa-sdk/commit/65fac7dbf2c63232199607b801db49ee96294b41)) -- add signer profiling metrics ([b7b0aa3](https://github.com/alchemyplatform/aa-sdk/commit/b7b0aa371e124548c2f2e7693f68e474648ae6c5)) -- add the client logger implementation ([4577bbf](https://github.com/alchemyplatform/aa-sdk/commit/4577bbfdf0c1d06bd04f838c192f621eea8c7e93)) diff --git a/account-kit/logging/README.md b/account-kit/logging/README.md deleted file mode 100644 index f7d121e3a6..0000000000 --- a/account-kit/logging/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@account-kit/logging` - -Core logging library, providing logging functionality to other Account Kit packages. diff --git a/account-kit/logging/package.json b/account-kit/logging/package.json deleted file mode 100644 index e61d107c1d..0000000000 --- a/account-kit/logging/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@account-kit/logging", - "version": "4.84.1", - "description": "Core logging library for Account Kit packages", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "prebuild": "tsx ./prebuild.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "postbuild": "tsx ./postbuild.ts", - "clean": "rm -rf ./dist", - "test": "vitest --passWithNoTests", - "test:run": "vitest run --passWithNoTests" - }, - "devDependencies": { - "@types/jsdom": "^21.1.7", - "jsdom": "^25.0.1", - "typescript-template": "*" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "dependencies": { - "@segment/analytics-next": "1.74.0", - "uuid": "^11.0.2" - } -} diff --git a/account-kit/logging/postbuild.ts b/account-kit/logging/postbuild.ts deleted file mode 100644 index dfaaa533f2..0000000000 --- a/account-kit/logging/postbuild.ts +++ /dev/null @@ -1,20 +0,0 @@ -import dotenv from "dotenv"; -import { writeFileSync } from "fs"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; -dotenv.config(); - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const writeInDev = process.env.WRITE_IN_DEV === "true"; - -if (writeInDev) { - const targetFilePath = "dist/esm/_writeKey.js"; - writeFileSync( - resolve(__dirname, targetFilePath), - ` - export const WRITE_IN_DEV = ${writeInDev}; - `, - ); -} diff --git a/account-kit/logging/prebuild.ts b/account-kit/logging/prebuild.ts deleted file mode 100644 index 480d0eaff6..0000000000 --- a/account-kit/logging/prebuild.ts +++ /dev/null @@ -1,21 +0,0 @@ -import dotenv from "dotenv"; -import { readFileSync, writeFileSync } from "fs"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; -dotenv.config(); - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const VERSION_FILE_PATH = "src/version.ts"; - -const packageJSON = JSON.parse(readFileSync("./package.json").toString()); - -writeFileSync( - resolve(__dirname, VERSION_FILE_PATH), - `// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "${packageJSON.version}"; -`, -); -console.log(`Wrote version to ${VERSION_FILE_PATH}.`); diff --git a/account-kit/logging/src/index.ts b/account-kit/logging/src/index.ts deleted file mode 100644 index fe0363346d..0000000000 --- a/account-kit/logging/src/index.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { noopLogger } from "./noop.js"; -import type { EventLogger, EventsSchema, LoggerContext } from "./types"; - -export type * from "./types.js"; - -export function createLogger( - context: LoggerContext, -): EventLogger; - -export function createLogger(_context: LoggerContext): EventLogger { - // We are currently not logging events from the SDK (as Sept 2, 2025), so - // a no-op logger is always used. This will be further explored in v5. - const innerLogger = noopLogger; - - const logger: EventLogger = { - ...innerLogger, - profiled( - name: string, - func: (...args: TArgs) => TRet, - ): (...args: TArgs) => TRet { - return function (this: any, ...args: TArgs): TRet { - const start = Date.now(); - const result = func.apply(this, args); - if (result instanceof Promise) { - return result.then((res) => { - innerLogger.trackEvent({ - name: "performance", - data: { - executionTimeMs: Date.now() - start, - functionName: name, - }, - }); - - return res; - }) as TRet; - } - - innerLogger.trackEvent({ - name: "performance", - data: { - executionTimeMs: Date.now() - start, - functionName: name, - }, - }); - return result; - }; - }, - }; - - return logger; -} diff --git a/account-kit/logging/src/noop.ts b/account-kit/logging/src/noop.ts deleted file mode 100644 index 84fab77478..0000000000 --- a/account-kit/logging/src/noop.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { InnerLogger } from "./types"; - -export const noopLogger: InnerLogger = { - trackEvent: async () => {}, - _internal: { - ready: Promise.resolve(), - anonId: "", - }, -}; diff --git a/account-kit/logging/src/plugins/contextAllowlist.ts b/account-kit/logging/src/plugins/contextAllowlist.ts deleted file mode 100644 index a927b73a30..0000000000 --- a/account-kit/logging/src/plugins/contextAllowlist.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { Context, Plugin } from "@segment/analytics-next"; - -const allowlist: readonly string[] = ["page"] as const; - -function stripContext(ctx: Context): Context { - ctx.event.context = allowlist.reduce( - (acc, key) => { - acc[key] = ctx.event?.context?.[key]; - - return acc; - }, - {} as Record<(typeof allowlist)[number], unknown>, - ); - - return ctx; -} - -/** - * This plugin enforces a context allowlist for all events - * - * This is done to make sure that anything Analytics.js sends to Segment is only the data we want to send - */ -export const ContextAllowlistPlugin: Plugin = { - name: "Enforce Context Allowlist", - type: "enrichment", - - isLoaded: () => true, - load: () => Promise.resolve(), - - track: stripContext, - identify: stripContext, - page: stripContext, - alias: stripContext, - group: stripContext, - screen: stripContext, -}; diff --git a/account-kit/logging/src/plugins/devDestination.ts b/account-kit/logging/src/plugins/devDestination.ts deleted file mode 100644 index 000de38561..0000000000 --- a/account-kit/logging/src/plugins/devDestination.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Context, Plugin } from "@segment/analytics-next"; - -function consoleLogEvent(ctx: Context): Context { - console.log(JSON.stringify(ctx.event, null, 2)); - - return ctx; -} - -export const DevDestinationPlugin: Plugin = { - name: "Dev Destination Plugin", - type: "destination", - isLoaded: () => true, - load: () => Promise.resolve(), - - track: consoleLogEvent, - identify: consoleLogEvent, - page: consoleLogEvent, - alias: consoleLogEvent, - group: consoleLogEvent, - screen: consoleLogEvent, -}; diff --git a/account-kit/logging/src/types.ts b/account-kit/logging/src/types.ts deleted file mode 100644 index f6b58b41a8..0000000000 --- a/account-kit/logging/src/types.ts +++ /dev/null @@ -1,51 +0,0 @@ -export type EventsSchema = readonly { - EventName: string; - EventData?: Record; -}[]; - -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -export type TrackEventParameters = { - [K in keyof Schema]: Prettify< - { name: Schema[K]["EventName"] } & ([undefined] extends [ - Schema[K]["EventData"], - ] - ? { data?: undefined } - : { data: Schema[K]["EventData"] }) - >; -}[number]; - -export interface EventLogger { - trackEvent( - params: TrackEventParameters<[...Schema, PerformanceEvent]>, - ): Promise; - profiled( - name: string, - func: (...args: TArgs) => TRet, - ): (...args: TArgs) => TRet; - _internal: { - ready: Promise; - anonId: string; - }; -} - -export type InnerLogger = Omit< - EventLogger, - "profiled" ->; - -export type LoggerContext = { - package: string; - version: string; - [key: string]: string; -}; - -export type PerformanceEvent = { - EventName: "performance"; - EventData: { - executionTimeMs: number; - functionName: string; - }; -}; diff --git a/account-kit/logging/src/utils.ts b/account-kit/logging/src/utils.ts deleted file mode 100644 index 77bcff1c59..0000000000 --- a/account-kit/logging/src/utils.ts +++ /dev/null @@ -1,25 +0,0 @@ -// just in case we're in a setting that doesn't have these types defined -declare const __DEV__: boolean | undefined; -declare const window: Window | undefined; - -export function isClientDevMode() { - if (typeof __DEV__ !== "undefined" && __DEV__) { - return true; - } - - if ( - typeof process !== "undefined" && - process.env.NODE_ENV === "development" - ) { - return true; - } - - if ( - typeof window !== "undefined" && - window.location?.hostname?.includes("localhost") - ) { - return true; - } - - return false; -} diff --git a/account-kit/logging/src/version.ts b/account-kit/logging/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/logging/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/logging/tsconfig.build.json b/account-kit/logging/tsconfig.build.json deleted file mode 100644 index 5de5b77262..0000000000 --- a/account-kit/logging/tsconfig.build.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "**/*/*.e2e.test.ts", - "vitest.config.ts", - "vitest.config.e2e.ts" - ], - "include": ["src"], - "compilerOptions": { - "sourceMap": true - } -} diff --git a/account-kit/logging/tsconfig.json b/account-kit/logging/tsconfig.json deleted file mode 100644 index 748018d6a6..0000000000 --- a/account-kit/logging/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "typescript-template/base.json" -} diff --git a/account-kit/logging/vitest.config.ts b/account-kit/logging/vitest.config.ts deleted file mode 100644 index 0f6bfaf053..0000000000 --- a/account-kit/logging/vitest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { defineProject } from "vitest/config"; - -export default defineProject({ - test: { - environment: "jsdom", - name: "account-kit/logging", - globals: true, - }, -}); - -// export default mergeConfig( -// // @ts-ignore this does work -// sharedConfig, -// defineProject({ -// test: { -// environment: "jsdom", -// name: "account-kit/logging", -// setupFiles: [], -// globalSetup: [], -// }, -// }) -// ); diff --git a/account-kit/plugingen/CHANGELOG.md b/account-kit/plugingen/CHANGELOG.md deleted file mode 100644 index ac7d40584a..0000000000 --- a/account-kit/plugingen/CHANGELOG.md +++ /dev/null @@ -1,866 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -### Bug Fixes - -- json stringify plugin contract reads ([#2297](https://github.com/alchemyplatform/aa-sdk/issues/2297)) ([9ad930a](https://github.com/alchemyplatform/aa-sdk/commit/9ad930a60d0ce3ca7e3e2066c2919651ff001d2e)) - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -### Bug Fixes - -- json stringify plugin contract reads ([#2297](https://github.com/alchemyplatform/aa-sdk/issues/2297)) ([9ad930a](https://github.com/alchemyplatform/aa-sdk/commit/9ad930a60d0ce3ca7e3e2066c2919651ff001d2e)) - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -### Bug Fixes - -- prevent useSmartWalletClient infinite render loop if address is specified while client loading ([#2146](https://github.com/alchemyplatform/aa-sdk/issues/2146)) ([6015e46](https://github.com/alchemyplatform/aa-sdk/commit/6015e4623617bc59a2795711de9b33a20b141de2)) - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Features - -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -**Note:** Version bump only for package @account-kit/plugingen - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -### Features - -- add google auth components and demo support (extension of linnas pr) ([#1032](https://github.com/alchemyplatform/aa-sdk/issues/1032)) ([cb91914](https://github.com/alchemyplatform/aa-sdk/commit/cb91914c8da0a7c3e7519bf98bc55d2848062e9f)), closes [#1024](https://github.com/alchemyplatform/aa-sdk/issues/1024) [#1035](https://github.com/alchemyplatform/aa-sdk/issues/1035) [#1036](https://github.com/alchemyplatform/aa-sdk/issues/1036) - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -### Bug Fixes - -- **ui-components:** ensure the passkey prompt always shows up when qp is present ([#978](https://github.com/alchemyplatform/aa-sdk/issues/978)) ([81f1580](https://github.com/alchemyplatform/aa-sdk/commit/81f15806e704bcffca6435eccb293923ff64d0e9)) - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Bug Fixes - -- merge base into this ([e41b396](https://github.com/alchemyplatform/aa-sdk/commit/e41b396fdf331d2dd7d4e6b608b90dcab37f8386)) - -### Code Refactoring - -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([073e8f6](https://github.com/alchemyplatform/aa-sdk/commit/073e8f6caacf7360fa7a352e2feab6db3b2a7ba1)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Bug Fixes - -- merge base into this ([f9a6b2d](https://github.com/alchemyplatform/aa-sdk/commit/f9a6b2d801b909146c0e10bb072369992163ea69)) - -### Code Refactoring - -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([b7af7eb](https://github.com/alchemyplatform/aa-sdk/commit/b7af7ebd634301b5e8640aacd420e5e95dde1fe7)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Bug Fixes - -- merge base into this ([1409772](https://github.com/alchemyplatform/aa-sdk/commit/140977220c6e9cd32820a64e573c2d8070e9b603)) - -### Code Refactoring - -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([3e214a0](https://github.com/alchemyplatform/aa-sdk/commit/3e214a0954109079418af5a8e8e0a07c556dfa4f)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Bug Fixes - -- merge base into this ([ea9ce2c](https://github.com/alchemyplatform/aa-sdk/commit/ea9ce2cabc407eec69aebe459446630142108f06)) - -### Code Refactoring - -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([20fafb1](https://github.com/alchemyplatform/aa-sdk/commit/20fafb1b175b1758713beef2972e1330bf812334)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -**Note:** Version bump only for package @account-kit/plugingen - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Code Refactoring - -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([0afdcae](https://github.com/alchemyplatform/aa-sdk/commit/0afdcae4a1c944bf18e002b418d18f09838c5428)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Code Refactoring - -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([09e4f33](https://github.com/alchemyplatform/aa-sdk/commit/09e4f33528f4caf0b51e737663851b71bdaf15eb)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Code Refactoring - -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([d90c6f2](https://github.com/alchemyplatform/aa-sdk/commit/d90c6f2834a6356c5dee2403e8fae66b81112ec3)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen - -## [3.18.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.1...v3.18.2) (2024-06-05) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.18.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.0...v3.18.1) (2024-06-04) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.2...v3.18.0) (2024-06-04) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.17.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.1...v3.17.2) (2024-05-31) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.17.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.0...v3.17.1) (2024-05-31) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.16.2...v3.17.0) (2024-05-29) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.15.0...v3.16.0) (2024-05-22) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.14.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.14.0...v3.14.1) (2024-05-17) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.13.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.13.0...v3.13.1) (2024-05-14) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.4...v3.13.0) (2024-05-10) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.12.3](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.2...v3.12.3) (2024-05-10) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.12.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.1...v3.12.2) (2024-05-09) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.12.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.0...v3.12.1) (2024-05-07) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.1...v3.12.0) (2024-05-02) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.11.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.0...v3.11.1) (2024-04-30) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.10.0...v3.11.0) (2024-04-30) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0...v3.10.0) (2024-04-29) - -### Features - -- remove generic entry point version specification requirement for better devex ([#607](https://github.com/alchemyplatform/aa-sdk/issues/607)) ([f3fb619](https://github.com/alchemyplatform/aa-sdk/commit/f3fb619e3cfb2c3a957a259788ae6ab1c530f3d5)) - -# [3.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0-alpha.4...v3.9.0) (2024-04-24) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.8.2-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.1) (2024-04-18) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) -- paymaster middleware update per entrypoint v7 user operation ([#580](https://github.com/alchemyplatform/aa-sdk/issues/580)) ([399479a](https://github.com/alchemyplatform/aa-sdk/commit/399479a38d6eaf0ab6d4d46b38f9d0f5a773cbed)) - -## [3.8.2-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.0) (2024-04-17) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) - -## [3.8.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.0...v3.8.1) (2024-04-11) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.7.3...v3.8.0) (2024-04-10) - -### Features - -- **alchemy-signer:** emit events from the alchemy signer on state changes ([#523](https://github.com/alchemyplatform/aa-sdk/issues/523)) ([8880e6d](https://github.com/alchemyplatform/aa-sdk/commit/8880e6d5bb9c98524c726a841fab5019bd6f0049)) -- **multi-sig:** add multisig plugin ([#519](https://github.com/alchemyplatform/aa-sdk/issues/519)) ([0139ef6](https://github.com/alchemyplatform/aa-sdk/commit/0139ef6de9b593dbe239675485a531122da254c4)), closes [#536](https://github.com/alchemyplatform/aa-sdk/issues/536) - -## [3.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.6.0...v3.6.1) (2024-03-18) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.1...v3.6.0) (2024-03-18) - -**Note:** Version bump only for package @alchemy/plugingen - -## [3.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.0...v3.5.1) (2024-03-14) - -**Note:** Version bump only for package @alchemy/plugingen - -# [3.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.4.4...v3.5.0) (2024-03-14) - -### Features - -- **plugins:** make plugingen a cli tool ([#507](https://github.com/alchemyplatform/aa-sdk/issues/507)) ([53ba81d](https://github.com/alchemyplatform/aa-sdk/commit/53ba81d33422bb3f18134c1dd75e68d64f5cc3f0)) diff --git a/account-kit/plugingen/package.json b/account-kit/plugingen/package.json deleted file mode 100644 index e9b9d14065..0000000000 --- a/account-kit/plugingen/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "@account-kit/plugingen", - "version": "4.84.1", - "description": "A CLI tool that enables you to generate TS code for your ERC-6900 plugins", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/exports/index.js", - "types": "./dist/types/exports/index.d.ts", - "typings": "./dist/types/exports/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/exports/index.d.ts", - "default": "./dist/esm/exports/index.js" - }, - "./config": { - "types": "./dist/types/exports/config.d.ts", - "default": "./dist/esm/exports/config.js" - }, - "./package.json": "./package.json" - }, - "bin": { - "plugingen": "./dist/esm/cli.js" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "postbuild": "chmod +x ./dist/esm/cli.js", - "clean": "rm -rf ./dist" - }, - "devDependencies": { - "@types/fs-extra": "^11.0.4", - "typescript-template": "*" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "dependencies": { - "@aa-sdk/core": "^4.84.1", - "bundle-require": "^4.0.2", - "cac": "^6.7.14", - "change-case": "^5.4.3", - "chokidar": "^3.6.0", - "dedent": "^1.5.1", - "esbuild": "^0.20.1", - "find-up": "^7.0.0", - "fs-extra": "^11.2.0", - "ora": "^8.0.1", - "pathe": "^1.1.2", - "picocolors": "^1.0.0", - "prettier": "3.3.3", - "zod": "^3.22.4" - }, - "peerDependencies": { - "viem": "^2.45.0" - } -} diff --git a/account-kit/plugingen/src/IPlugin.ts b/account-kit/plugingen/src/IPlugin.ts deleted file mode 100644 index 893d5eee91..0000000000 --- a/account-kit/plugingen/src/IPlugin.ts +++ /dev/null @@ -1,396 +0,0 @@ -export const IPluginAbi = [ - { - type: "function", - name: "onInstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { name: "interfaceIds", type: "bytes4[]", internalType: "bytes4[]" }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { name: "canSpendNativeToken", type: "bool", internalType: "bool" }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { name: "permitAnySelector", type: "bool", internalType: "bool" }, - { name: "selectors", type: "bytes4[]", internalType: "bytes4[]" }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "author", type: "string", internalType: "string" }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "preExecHookData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; diff --git a/account-kit/plugingen/src/cli.ts b/account-kit/plugingen/src/cli.ts deleted file mode 100644 index 2427e61e5d..0000000000 --- a/account-kit/plugingen/src/cli.ts +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env node -import { cac } from "cac"; -import { generate, type GenerateOptions } from "./commands/generate/index.js"; -import { init, type InitOptions } from "./commands/init.js"; -import * as logger from "./logger.js"; -import { VERSION } from "./version.js"; - -const cli = cac("plugingen"); - -cli - .command("init", "Initialize a new plugingen config") - .option("-c, --config ", "[string] path to config file") - .option("-r, --root ", "[string] root path to resolve config from") - .example((name) => `${name} init`) - .action(async (options: InitOptions) => init(options)); - -cli - .command( - "generate", - "Generate code for all of the plugins configured within the plugingen config", - ) - .option("-c, --config ", "[string] path to config file") - .option("-r, --root ", "[string] root path to resolve config from") - .example((name) => `${name} generate`) - .action(async (options: GenerateOptions) => generate(options)); - -cli.help(); -cli.version(VERSION); - -void (async () => { - try { - // Parse CLI args without running command - cli.parse(process.argv, { run: false }); - if (!cli.matchedCommand) { - if (cli.args.length === 0) { - if (!cli.options.help && !cli.options.version) cli.outputHelp(); - } else throw new Error(`Unknown command: ${cli.args.join(" ")}`); - } - await cli.runMatchedCommand(); - } catch (error) { - logger.error(`\n${(error as Error).message}`); - process.exit(1); - } -})(); diff --git a/account-kit/plugingen/src/commands/generate/index.ts b/account-kit/plugingen/src/commands/generate/index.ts deleted file mode 100644 index 6650092645..0000000000 --- a/account-kit/plugingen/src/commands/generate/index.ts +++ /dev/null @@ -1,270 +0,0 @@ -import { asyncPipe } from "@aa-sdk/core"; -import { kebabCase } from "change-case"; -import dedent from "dedent"; -import { default as fs } from "fs-extra"; -import { basename, dirname, resolve } from "pathe"; -import pc from "picocolors"; -import { - createPublicClient, - getContract, - http, - type GetContractReturnType, - type PublicClient, -} from "viem"; -import z from "zod"; -import type { Config, PluginConfig } from "../../config.js"; -import { IPluginAbi } from "../../IPlugin.js"; -import * as logger from "../../logger.js"; -import { findConfig } from "../../utils/findConfig.js"; -import { format } from "../../utils/format.js"; -import { getIsUsingTypeScript } from "../../utils/isUsingTypescript.js"; -import { resolveConfig } from "../../utils/resolveConfig.js"; -import { ContractAbiGenPhase } from "./phases/contract-abi-gen.js"; -import { ContractAddressesGenPhase } from "./phases/contract-addresses-gen.js"; -import { ExecutionAbiGenPhase } from "./phases/execution-abi-gen.js"; -import { PluginActionsGenPhase } from "./phases/plugin-actions/index.js"; -import { PluginGeneratorPhase } from "./phases/plugin-generator/index.js"; -import type { Phase, PhaseInput } from "./types.js"; - -const GenerateSchema = z.object({ - /** Path to config file */ - config: z.string().optional(), - /** Directory to search for config file */ - root: z.string().optional(), -}); - -export type GenerateOptions = z.infer; - -export async function generate(options: GenerateOptions = {}) { - try { - options = await GenerateSchema.parseAsync(options); - } catch (error) { - if (error instanceof z.ZodError) throw error; - throw error; - } - - // Get cli config file - const configPath = await findConfig(options); - if (!configPath) { - if (options.config) { - throw new Error(`Config not found at ${pc.gray(options.config)}`); - } - - throw new Error("Config not found"); - } - - const resolvedConfigs = await resolveConfig({ configPath }); - // TODO: need to use this in the phases below and add support for JS within the generated code - // To support that we will likely need to: - // 1. generate a types.ts file instead of appending the types to the top of the generated code - // 2. in generated plugin.(ts|js) files we will either import the types or use the type reference comment - // 3. in generated plugin files we need to check if TS when specifying the types of methods - const isTypeScript = await getIsUsingTypeScript(); - if (!isTypeScript) { - throw new Error("Only typescript is supported at the moment."); - } - - const outNames = new Set(); - const isArrayConfig = Array.isArray(resolvedConfigs); - const configs = isArrayConfig ? resolvedConfigs : [resolvedConfigs]; - - for (const config of configs) { - if (isArrayConfig) - logger.log(`Using config ${pc.gray(basename(configPath))}`); - - // group configs by out dir - if (!config.outDir) throw new Error("outDir is required."); - if (outNames.has(config.outDir)) - throw new Error(`outDir "${config.outDir}" must be unique.`); - outNames.add(config.outDir); - const spinner = logger.spinner(); - const pluginConfigs = config.plugins; - - // Get contracts from config - spinner.start("Resolving plugin contracts"); - if (!pluginConfigs || !pluginConfigs.length) { - logger.warn("no plugins found in config"); - spinner.fail(); - return; - } - - // TODO: check that plugins are unique - const plugins = pluginConfigs.map((plugin) => { - const chain = plugin.chain ?? config.chain; - const transport = http(plugin.rpcUrl ?? config.rpcUrl); - - const client = createPublicClient({ - chain, - transport, - }); - - if (!(chain.id in plugin.addresses)) { - spinner.fail(); - throw new Error( - `contract address missing for the reference chain ${chain.id}`, - ); - } - - return { - contract: getContract({ - address: plugin.addresses[chain.id], - abi: IPluginAbi, - client, - }), - pluginConfig: plugin, - }; - }); - spinner.succeed(); - - // Generate plugin files - await Promise.all( - plugins.map((plugin) => - generatePlugin({ - pluginConfig: plugin.pluginConfig, - contract: plugin.contract, - config, - }), - ), - ); - } -} - -// Add more phases here if needed -const phases: Phase[] = [ - ContractAddressesGenPhase, - PluginGeneratorPhase, - PluginActionsGenPhase, - ExecutionAbiGenPhase, - ContractAbiGenPhase, -]; - -const generatePlugin = async ({ - pluginConfig, - contract, - config, -}: { - pluginConfig: PluginConfig; - contract: GetContractReturnType; - config: Config; -}) => { - const spinner = logger.spinner(); - spinner.start(`Generating plugin ${pc.gray(pluginConfig.name)}`); - // Setup plugin generator - const imports: Map< - string, - { - types: Set; - members: Set; - } - > = new Map(); - const addImport: PhaseInput["addImport"] = (moduleName, member) => { - if (!imports.has(moduleName)) { - imports.set(moduleName, { - types: new Set(), - members: new Set(), - }); - } - - const module = imports.get(moduleName)!; - if (member.isType) { - module.types.add(member.name); - } else { - module.members.add(member.name); - } - }; - const content: string[] = []; - const types: Map = - new Map(); - const addType: PhaseInput["addType"] = (typeName, typeDef, isPublic) => { - if (types.has(typeName)) { - throw new Error(`Type ${typeName} already exists`); - } - - types.set(typeName, { - definition: typeDef.replace(";", ""), - isPublic: isPublic ?? false, - }); - }; - - // TODO: we need to handle the case where this isn't typescript because right now we generate types in here - const result = await asyncPipe(...phases)({ - addImport, - addType, - content, - config, - contract, - pluginConfig, - }); - - // Aggregate Result of phase - const finalContent = dedent` - ${Array.from(types.entries()) - .map( - ([name, type]) => - `${type.isPublic ? "export" : ""} type ${name} = ${type.definition};`, - ) - .join("\n\n")} - - ${result.content.join("\n\n")} -`; - - const finalImports = Array.from(imports.entries()) - .map(([moduleName, { members, types }]) => { - return dedent` - import { ${Array.from(members.values()).join(",")} ${ - members.size > 0 ? "," : "" - } ${Array.from(types.values()) - .map((x) => `type ${x}`) - .join(",")} } from "${moduleName}"; - `; - }) - .join("\n"); - spinner.succeed(); - await writePlugin({ - config, - content: finalContent, - imports: finalImports, - pluginConfig, - }); -}; - -const writePlugin = async ({ - config, - content, - imports, - pluginConfig, -}: { - pluginConfig: PluginConfig; - config: Config; - content: string; - imports: string; -}) => { - const isTypeScript = await getIsUsingTypeScript(); - - const pluginRegEx: RegExp = /[pP]lugin/g; - // TODO: because we are now generating these ourselves, we have a lot more flexibility - // We could: - // 1. generate a types.ts file containing the type defs intead of merging them with content - // 2. generate an extensions.ts file which doesn't get overwritten on each generation - // 3. generate an index.ts file which correctly exports all of the types + exports the output of extensions.ts - // so that it's easier to extend and import without conflicts - const pluginPath = `${config.outDir}/${kebabCase( - pluginConfig.name.replaceAll(pluginRegEx, ""), - )}/plugin.${isTypeScript ? "ts" : "js"}`; - - const code = dedent` - ${imports} - - ${content} -`; - - const spinner = logger.spinner(); - spinner.start(`Writing plugin to ${pc.gray(pluginPath)}`); - // Format and write output - const cwd = process.cwd(); - const outPath = resolve(cwd, pluginPath); - await fs.ensureDir(dirname(outPath)); - const formatted = await format(code); - await fs.writeFile(outPath, formatted); - spinner.succeed(); -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/contract-abi-gen.ts b/account-kit/plugingen/src/commands/generate/phases/contract-abi-gen.ts deleted file mode 100644 index 8dbe275697..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/contract-abi-gen.ts +++ /dev/null @@ -1,12 +0,0 @@ -import dedent from "dedent"; -import type { Phase } from "../types"; - -export const ContractAbiGenPhase: Phase = async (input) => { - const { content, pluginConfig } = input; - content.push(dedent` - export const ${pluginConfig.name}Abi = ${JSON.stringify( - pluginConfig.abi, - )} as const; - `); - return input; -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/contract-addresses-gen.ts b/account-kit/plugingen/src/commands/generate/phases/contract-addresses-gen.ts deleted file mode 100644 index 3d9d208afb..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/contract-addresses-gen.ts +++ /dev/null @@ -1,18 +0,0 @@ -import dedent from "dedent"; -import type { Address } from "viem"; -import type { Phase } from "../types"; - -export const ContractAddressesGenPhase: Phase = async (input) => { - const { pluginConfig, content, addImport } = input; - - addImport("viem", { name: "Address", isType: true }); - content.push(dedent` - const addresses = {${Object.entries( - pluginConfig.addresses as Record, - ).reduce( - (prev, [chainId, addr]) => (prev += `${chainId}: "${addr}" as Address, `), - "", - )}} as Record; - `); - return input; -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/execution-abi-gen.ts b/account-kit/plugingen/src/commands/generate/phases/execution-abi-gen.ts deleted file mode 100644 index 43cdffba38..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/execution-abi-gen.ts +++ /dev/null @@ -1,20 +0,0 @@ -import dedent from "dedent"; -import type { Phase } from "../types"; -import { executionAbiConst, extractExecutionAbi } from "../utils.js"; - -export const ExecutionAbiGenPhase: Phase = async (input) => { - const { contract, content, pluginConfig } = input; - - const { executionFunctions } = await contract.read.pluginManifest(); - const executionAbi = extractExecutionAbi( - executionFunctions, - pluginConfig.abi, - ); - - content.push(dedent` - export const ${executionAbiConst(pluginConfig.name)} = ${JSON.stringify( - executionAbi, - )} as const; - `); - return input; -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/plugin-actions/index.ts b/account-kit/plugingen/src/commands/generate/phases/plugin-actions/index.ts deleted file mode 100644 index 876d90e679..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/plugin-actions/index.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { asyncPipe } from "@aa-sdk/core"; -import { camelCase } from "change-case"; -import dedent from "dedent"; -import type { Phase } from "../../types"; -import { extractExecutionAbi } from "../../utils.js"; -import { ManagementActionsGenPhase } from "./management-actions.js"; -import { AccountReadActionsGenPhase } from "./read-actions.js"; - -export const PluginActionsGenPhase: Phase = async (input) => { - const { pluginConfig, contract, addImport, addType } = input; - const { executionFunctions } = await contract.read.pluginManifest(); - const executionAbiConst = `${pluginConfig.name}ExecutionFunctionAbi`; - const executionAbi = extractExecutionAbi( - executionFunctions, - pluginConfig.abi, - ); - - 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("@aa-sdk/core", { - name: "SmartContractAccount", - isType: true, - }); - addImport("@aa-sdk/core", { - name: "GetAccountParameter", - isType: true, - }); - addImport("@aa-sdk/core", { - name: "SendUserOperationResult", - isType: true, - }); - addImport("@aa-sdk/core", { - name: "GetEntryPointFromAccount", - isType: true, - }); - addImport("@aa-sdk/core", { - name: "UserOperationOverridesParameter", - isType: true, - }); - addImport("@aa-sdk/core", { - name: "UserOperationContext", - isType: true, - }); - addImport("@aa-sdk/core", { name: "AccountNotFoundError" }); - addImport("@aa-sdk/core", { name: "isSmartAccountClient" }); - addImport("@aa-sdk/core", { name: "IncompatibleClientError" }); - addImport("@aa-sdk/core", { name: "GetContextParameter", isType: true }); - - const providerFunctionDefs: string[] = []; - const providerFunctions = executionAbi - .filter((n) => n.stateMutability !== "view") - .map((n) => { - const argsParamString = - n.inputs.length > 0 - ? dedent`{ - args, - overrides, - context, - account = client.account - }` - : dedent`{ - overrides, - context, - account = client.account - }`; - const argsEncodeString = n.inputs.length > 0 ? "args," : ""; - - providerFunctionDefs.push(dedent` - ${camelCase( - n.name, - )}: (args: Pick, "args"> & UserOperationOverridesParameter & - GetAccountParameter & GetContextParameter) => - Promise> - `); - const methodName = camelCase(n.name); - return dedent` - ${methodName}(${argsParamString}) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError("SmartAccountClient", "${methodName}", client); - } - - const uo = encodeFunctionData({ - abi: ${executionAbiConst}, - functionName: "${n.name}", - ${argsEncodeString} - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - } - `; - }); - - addType( - `ExecutionActions< - TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = UserOperationContext | undefined, - TEntryPointVersion extends GetEntryPointFromAccount = GetEntryPointFromAccount - >`, - dedent`{ - ${providerFunctionDefs.join(";\n\n")} - }`, - ); - - const { hasReadMethods } = await asyncPipe( - ManagementActionsGenPhase, - AccountReadActionsGenPhase, - )({ - ...input, - content: providerFunctions, - }); - - addType( - `${pluginConfig.name}Actions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = UserOperationContext | undefined>`, - dedent` - ExecutionActions & ManagementActions & ReadAndEncodeActions${ - hasReadMethods ? "" : "" - } - `, - true, - ); - - input.content.push(dedent` - export const ${camelCase(pluginConfig.name)}Actions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = UserOperationContext | undefined - >( - client: Client - ) => ${ - pluginConfig.name - }Actions = (client) => ({ ${providerFunctions.join( - ",\n", - )} }); - `); - - return input; -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/plugin-actions/management-actions.ts b/account-kit/plugingen/src/commands/generate/phases/plugin-actions/management-actions.ts deleted file mode 100644 index aa89050db0..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/plugin-actions/management-actions.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { kebabCase } from "change-case"; -import dedent from "dedent"; -import type { PluginConfig } from "../../../../config"; -import type { Phase, PhaseInput } from "../../types"; - -export const ManagementActionsGenPhase: Phase = async (input) => { - const { addImport, pluginConfig, addType } = input; - if (pluginConfig.installConfig != null) { - addImports( - addImport, - pluginConfig.installConfig.dependencies?.map((x) => x.plugin) ?? [], - ); - - const initArgs = pluginConfig.installConfig.initAbiParams ?? []; - - addType("InstallArgs", JSON.stringify(initArgs)); - addType( - `Install${pluginConfig.name}Params`, - dedent`{ - args: Parameters>[1]; - pluginAddress?: Address; - dependencyOverrides?: FunctionReference[]; - }`, - true, - ); - addType( - `ManagementActions< - TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, - TContext extends UserOperationContext | undefined = Record | undefined, - TEntryPointVersion extends GetEntryPointFromAccount = GetEntryPointFromAccount - >`, - dedent`{ - install${pluginConfig.name}: (args: - UserOperationOverridesParameter & - Install${pluginConfig.name}Params & GetAccountParameter & GetContextParameter) => - Promise> - }`, - ); - - const dependencies = (pluginConfig.installConfig.dependencies ?? []).map( - (x) => dedent` - (() => { - const pluginAddress = ${x.plugin.name}.meta.addresses[chain.id]; - if (!pluginAddress) { - throw new Error("missing ${x.plugin.name} address for chain " + chain.name); - } - - return encodePacked( - ["address", "uint8"], - [pluginAddress, ${x.functionId}] - ); - })() - `, - ); - - const installMethodName = `install${pluginConfig.name}`; - - input.content.push(dedent` - ${installMethodName}({account = client.account, overrides, context, ...params}) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError("SmartAccountClient", "${installMethodName}", client); - } - - const chain = client.chain; - if (!chain) { - throw new ChainNotFoundError(); - } - - const dependencies = params.dependencyOverrides ?? [${dependencies.join( - ",\n\n", - )}]; - const pluginAddress = params.pluginAddress ?? ${ - pluginConfig.name - }.meta.addresses[chain.id] as Address | undefined; - - if (!pluginAddress) { - throw new Error("missing ${ - pluginConfig.name - } address for chain " + chain.name); - } - - return installPlugin_(client, { - pluginAddress, - pluginInitData: encodeAbiParameters(${JSON.stringify( - initArgs, - )}, params.args), - dependencies, - overrides, - account, - context, - }); - } - `); - } - - return input; -}; - -const addImports = ( - addImport: PhaseInput["addImport"], - deps?: PluginConfig[], -) => { - if (deps != null && deps.length > 0) { - addImport("viem", { name: "encodePacked" }); - deps.forEach((x) => { - addImport( - `../${kebabCase(x.name.replaceAll(/[pP]lugin/g, ""))}/plugin.js`, - { - name: x.name, - }, - ); - }); - } - - addImport("@aa-sdk/core", { name: "ChainNotFoundError" }); - addImport("viem", { name: "encodeAbiParameters" }); - addImport("@account-kit/smart-contracts", { - name: "installPlugin as installPlugin_", - }); - addImport("@aa-sdk/core", { - name: "GetAccountParameter", - isType: true, - }); - addImport("@aa-sdk/core", { - name: "GetEntryPointFromAccount", - isType: true, - }); - addImport("@aa-sdk/core", { - name: "UserOperationContext", - isType: true, - }); - addImport("@account-kit/smart-contracts", { - name: "FunctionReference", - isType: true, - }); - addImport("@aa-sdk/core", { name: "GetContextParameter", isType: true }); -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/plugin-actions/read-actions.ts b/account-kit/plugingen/src/commands/generate/phases/plugin-actions/read-actions.ts deleted file mode 100644 index 9ca409873a..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/plugin-actions/read-actions.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { pascalCase } from "change-case"; -import dedent from "dedent"; -import type { Phase } from "../../types"; -import { extractExecutionAbi } from "../../utils.js"; - -export const AccountReadActionsGenPhase: Phase = async (input) => { - const { pluginConfig, contract, addImport, addType } = input; - const { executionFunctions } = await contract.read.pluginManifest(); - const executionAbiConst = `${pluginConfig.name}ExecutionFunctionAbi`; - const executionAbi = extractExecutionAbi( - executionFunctions, - pluginConfig.abi, - ); - - addImport("viem", { name: "EncodeFunctionDataParameters", isType: true }); - addImport("viem", { name: "encodeFunctionData" }); - addImport("viem", { name: "Hex", isType: true }); - - const accountFunctionActionDefs: string[] = []; - - const accountFunctions = executionAbi.map((n) => { - const methodContent: string[] = []; - const argsParamString = n.inputs.length > 0 ? `{ args }` : ""; - const argsEncodeString = n.inputs.length > 0 ? "args," : ""; - const isViewFunction = n.stateMutability === "view"; - - const encodeMethodName = `encode${pascalCase(n.name)}`; - accountFunctionActionDefs.push( - dedent`${encodeMethodName}: (args: Pick, "args">) => Hex`, - ); - methodContent.push(dedent` - ${encodeMethodName}(${argsParamString}) { - return encodeFunctionData({ - abi: ${executionAbiConst}, - functionName: "${n.name}", - ${argsEncodeString} - }); - } - `); - - const readArgsParamString = - n.inputs.length > 0 - ? `{ args, account = client.account }` - : "{ account = client.account }"; - if (isViewFunction) { - addImport("viem", { name: "ReadContractReturnType", isType: true }); - input.hasReadMethods = true; - const readMethodName = `read${pascalCase(n.name)}`; - accountFunctionActionDefs.push( - n.inputs.length > 0 - ? dedent`${readMethodName}: ( - args: Pick, "args"> & - GetAccountParameter - ) => Promise>` - : dedent`${readMethodName}: (args: GetAccountParameter) => - Promise>`, - ); - - methodContent.push(dedent` - async ${readMethodName} (${readArgsParamString}) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError("SmartAccountClient", "${readMethodName}", client); - } - - return client.readContract({ - address: account.address, - abi: ${executionAbiConst}, - functionName: "${n.name}", - ${argsEncodeString} - }); - } - `); - } - - return methodContent.join(",\n\n"); - }); - - const typeName = input.hasReadMethods - ? `ReadAndEncodeActions< - TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, - >` - : "ReadAndEncodeActions"; - - addType( - typeName, - dedent`{ - ${accountFunctionActionDefs.join(";\n\n")} - }`, - ); - input.content.push(...accountFunctions); - - return input; -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/plugin-generator/get-contract-gen.ts b/account-kit/plugingen/src/commands/generate/phases/plugin-generator/get-contract-gen.ts deleted file mode 100644 index c76f18e27c..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/plugin-generator/get-contract-gen.ts +++ /dev/null @@ -1,30 +0,0 @@ -import dedent from "dedent"; -import type { Phase } from "../../types"; - -export const GetContractGenPhase: Phase = async (input) => { - const { content, pluginConfig, addImport } = input; - - addImport("viem", { name: "getContract", isType: false }); - addImport("viem", { name: "GetContractReturnType", isType: true }); - addImport("viem", { name: "Address", isType: true }); - addImport("viem", { name: "Transport", isType: true }); - addImport("viem", { name: "PublicClient", isType: true }); - addImport("viem", { name: "Client", isType: true }); - addImport("@aa-sdk/core", { name: "ChainNotFoundError" }); - - content.push(dedent` - getContract: ( - client: C, - address?: Address - ): GetContractReturnType => { - if (!client.chain) throw new ChainNotFoundError(); - - return getContract({ - address: address || addresses[client.chain.id], - abi: ${pluginConfig.name}Abi, - client: client, - }) as GetContractReturnType; - }`); - - return input; -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/plugin-generator/index.ts b/account-kit/plugingen/src/commands/generate/phases/plugin-generator/index.ts deleted file mode 100644 index 8992b1804b..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/plugin-generator/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { asyncPipe } from "@aa-sdk/core"; -import dedent from "dedent"; -import type { Phase } from "../../types"; -import { GetContractGenPhase } from "./get-contract-gen.js"; -import { MetaGenPhase } from "./meta-gen.js"; - -export const PluginGeneratorPhase: Phase = async (input) => { - const pluginPhases: Phase[] = [MetaGenPhase, GetContractGenPhase]; - const { pluginConfig, addImport } = input; - - const result = await asyncPipe(...pluginPhases)({ - ...input, - content: [], - }); - - addImport("@account-kit/smart-contracts", { name: "Plugin", isType: true }); - - input.content.push(dedent` - export const ${pluginConfig.name}: Plugin = { - ${result.content.join(",\n")} - }; - `); - - return input; -}; diff --git a/account-kit/plugingen/src/commands/generate/phases/plugin-generator/meta-gen.ts b/account-kit/plugingen/src/commands/generate/phases/plugin-generator/meta-gen.ts deleted file mode 100644 index 3df3140082..0000000000 --- a/account-kit/plugingen/src/commands/generate/phases/plugin-generator/meta-gen.ts +++ /dev/null @@ -1,26 +0,0 @@ -import dedent from "dedent"; -import type { Phase } from "../../types"; - -export const MetaGenPhase: Phase = async (input) => { - const { contract, content } = input; - const { name, version } = await contract.read.pluginMetadata(); - - content.push(dedent` - meta: { - name: ${toTsString(name)}, - version: ${toTsString(version)}, - addresses, - } - `); - - return input; -}; - -function toTsString(v: string) { - return ( - JSON.stringify(v) - // These two are valid in JSON but can behave badly in JS source in some contexts (e.g. in template strings) - .replace(/\u2028/g, "\\u2028") - .replace(/\u2029/g, "\\u2029") - ); -} diff --git a/account-kit/plugingen/src/commands/generate/types.ts b/account-kit/plugingen/src/commands/generate/types.ts deleted file mode 100644 index a746dd6569..0000000000 --- a/account-kit/plugingen/src/commands/generate/types.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { GetContractReturnType, PublicClient } from "viem"; -import type { Config, PluginConfig } from "../../config.js"; -import type { IPluginAbi } from "../../IPlugin.js"; - -export type PhaseInput = { - content: string[]; - addImport: ( - moduleName: string, - member: { name: string; isType?: boolean }, - ) => void; - addType: (typeName: string, typeDef: string, isPublic?: boolean) => void; - pluginConfig: PluginConfig; - config: Config; - contract: GetContractReturnType; - hasReadMethods?: boolean; -}; - -export type Phase = (input: PhaseInput) => Promise; diff --git a/account-kit/plugingen/src/commands/generate/utils.ts b/account-kit/plugingen/src/commands/generate/utils.ts deleted file mode 100644 index f39248b5ed..0000000000 --- a/account-kit/plugingen/src/commands/generate/utils.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { type AbiFunction } from "abitype"; -import { getAbiItem, type Abi, type AbiItem, type Address } from "viem"; - -export const executionAbiConst = (name: string) => - `${name}ExecutionFunctionAbi`; - -export const extractExecutionAbi = ( - executionFunctions: readonly Address[], - abi: Abi, -): AbiFunction[] => { - return executionFunctions.map((f) => { - const item = getAbiItem({ - abi: abi, - name: f, - }) as AbiItem; - - if (item.type !== "function") { - throw new Error( - "execution function not mapping to a function in the ABI", - { cause: JSON.stringify(item, null, 2) }, - ); - } - - return item; - }); -}; diff --git a/account-kit/plugingen/src/commands/init.ts b/account-kit/plugingen/src/commands/init.ts deleted file mode 100644 index e0966430ed..0000000000 --- a/account-kit/plugingen/src/commands/init.ts +++ /dev/null @@ -1,93 +0,0 @@ -// borrows heavily from https://github.com/wevm/wagmi/blob/main/packages/cli/src/commands/init.ts -import dedent from "dedent"; -import { default as fs } from "fs-extra"; -import { relative, resolve } from "pathe"; -import pc from "picocolors"; -import z from "zod"; -import { fromZodError } from "../errors.js"; -import * as logger from "../logger.js"; -import { findConfig } from "../utils/findConfig.js"; -import { format } from "../utils/format.js"; -import { getIsUsingTypeScript } from "../utils/isUsingTypescript.js"; - -export type InitOptions = { - /** Path to config file */ - config?: string; - /** Directory to init config file */ - root?: string; -}; - -const InitSchema = z.object({ - config: z.string().optional(), - root: z.string().optional(), -}); - -export async function init(options: InitOptions = {}) { - try { - options = await InitSchema.parseAsync(options); - } catch (error) { - if (error instanceof z.ZodError) - throw fromZodError(error, { prefix: "Invalid option" }); - throw error; - } - - // Check for existing config file - const configPath = await findConfig(options); - if (configPath) { - logger.info( - `Config already exists at ${pc.gray(relative(process.cwd(), configPath))}`, - ); - return configPath; - } - - const spinner = logger.spinner(); - spinner.start("Creating config"); - // Check if project is using TypeScript - const isUsingTypeScript = await getIsUsingTypeScript(); - const rootDir = resolve(options.root || process.cwd()); - let outPath: string; - if (options.config) { - outPath = resolve(rootDir, options.config); - } else { - const extension = isUsingTypeScript ? "ts" : "js"; - outPath = resolve(rootDir, `plugingen.config.${extension}`); - } - - let content: string; - if (isUsingTypeScript) { - content = dedent(` - import { defineConfig } from '@account-kit/plugingen'; - import { sepolia } from "viem/chains"; - - export default defineConfig({ - outDir: "./src/generated", - chain: sepolia, - rpcUrl: "https://ethereum-sepolia.publicnode.com", - plugins: [], - }); - `); - } else { - content = dedent(` - // @ts-check - - /** @type {import('@account-kit/plugingen').Config} */ - export default ${dedent` - { - outDir: "./src/generated", - chain: sepolia, - rpcUrl: "https://ethereum-sepolia.publicnode.com", - plugins: [], - } - `.replace(/"(\d*)":/gm, "$1:")} - `); - } - - const formatted = await format(content); - await fs.writeFile(outPath, formatted); - spinner.succeed(); - logger.success( - `Config created at ${pc.gray(relative(process.cwd(), outPath))}`, - ); - - return outPath; -} diff --git a/account-kit/plugingen/src/config.ts b/account-kit/plugingen/src/config.ts deleted file mode 100644 index b517d4de7b..0000000000 --- a/account-kit/plugingen/src/config.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { Abi, Address, Chain, Hex, parseAbiParameters } from "viem"; -import type { Evaluate, MaybeArray, MaybePromise } from "./types"; - -export type ContractConfig< - chainId extends number = number, - requiredChainId extends number | undefined = undefined, -> = { - /** - * Contract ABI - */ - abi: Abi; - /** - * Contract address or addresses. - * - * Accepts an object `{ [chainId]: address }` to support multiple chains. - * - * @example - * '0x314159265dd8dbb310642f98f50c066173c1259b' - * - * @example - * { - * 1: '0x314159265dd8dbb310642f98f50c066173c1259b', - * 5: '0x112234455c3a32fd11230c42e7bccd4a84e02010', - * } - */ - address?: - | Address - | (requiredChainId extends number - ? Record & Partial> - : Record) - | undefined; - /** - * Name of contract. - */ - name: string; -}; - -export type Contract = Evaluate< - ContractConfig & { - /** Generated string content */ - content: string; - /** Meta info about contract */ - meta: { - abiName: string; - addressName?: string | undefined; - configName?: string | undefined; - }; - } ->; - -export type PluginConfig = { - abi: Abi; - addresses: Record; - // allows you to override the root config chain - chain?: Chain; - // allows you to override the root config rpcUrl - rpcUrl?: string; - name: string; - installConfig?: { - initAbiParams: ReturnType | []; - dependencies?: { - plugin: PluginConfig; - functionId: Hex; - }[]; - }; -}; - -export type Config = { - chain: Chain; - rpcUrl: string; - outDir?: string; - plugins: PluginConfig[]; -}; - -export function defineConfig( - config: MaybeArray | (() => MaybePromise>), -) { - return config; -} diff --git a/account-kit/plugingen/src/errors.ts b/account-kit/plugingen/src/errors.ts deleted file mode 100644 index b3e1617bad..0000000000 --- a/account-kit/plugingen/src/errors.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { type z } from "zod"; - -// from https://github.com/wevm/wagmi/blob/main/packages/cli/src/errors.ts -class ValidationError extends Error { - details: z.ZodIssue[]; - - constructor( - message: string, - options: { - details: z.ZodIssue[]; - }, - ) { - super(message); - this.details = options.details; - } -} - -// From https://github.com/causaly/zod-validation-error -export function fromZodError( - zError: z.ZodError, - { - maxIssuesInMessage = 99, - issueSeparator = "\n- ", - prefixSeparator = "\n- ", - prefix = "Validation Error", - }: { - maxIssuesInMessage?: number; - issueSeparator?: string; - prefixSeparator?: string; - prefix?: string; - } = {}, -): ValidationError { - function joinPath(arr: (string | number)[]): string { - return arr.reduce((acc: string, value: string | number) => { - if (typeof value === "number") return `${acc}[${value}]`; - const separator = acc === "" ? "" : "."; - return acc + separator + value; - }, ""); - } - - const reason = zError.errors - // limit max number of issues printed in the reason section - .slice(0, maxIssuesInMessage) - // format error message - .map((issue) => { - const { message, path } = issue; - if (path.length > 0) return `${message} at \`${joinPath(path)}\``; - return message; - }) - // concat as string - .join(issueSeparator); - - const message = reason ? [prefix, reason].join(prefixSeparator) : prefix; - - return new ValidationError(message, { - details: zError.errors, - }); -} diff --git a/account-kit/plugingen/src/exports/config.ts b/account-kit/plugingen/src/exports/config.ts deleted file mode 100644 index fb2b230bf2..0000000000 --- a/account-kit/plugingen/src/exports/config.ts +++ /dev/null @@ -1 +0,0 @@ -export { defineConfig, type Config, type PluginConfig } from "../config.js"; diff --git a/account-kit/plugingen/src/exports/index.ts b/account-kit/plugingen/src/exports/index.ts deleted file mode 100644 index c2e794f65d..0000000000 --- a/account-kit/plugingen/src/exports/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { defineConfig, type Config, type PluginConfig } from "../config.js"; - -export * as logger from "../logger.js"; - -export { loadEnv } from "../utils/loadEnv.js"; - -export { VERSION } from "../version.js"; diff --git a/account-kit/plugingen/src/exports/types.ts b/account-kit/plugingen/src/exports/types.ts deleted file mode 100644 index acb9bfdfb3..0000000000 --- a/account-kit/plugingen/src/exports/types.ts +++ /dev/null @@ -1 +0,0 @@ -export { IPluginAbi } from "../IPlugin.js"; diff --git a/account-kit/plugingen/src/logger.ts b/account-kit/plugingen/src/logger.ts deleted file mode 100644 index 63d5b4ac0f..0000000000 --- a/account-kit/plugingen/src/logger.ts +++ /dev/null @@ -1,36 +0,0 @@ -import ora from "ora"; -import pc from "picocolors"; -import { format as utilFormat } from "util"; - -function format(args: any[]) { - return utilFormat(...args) - .split("\n") - .join("\n"); -} - -export function success(...args: any[]) { - console.log(pc.green(format(args))); -} - -export function info(...args: any[]) { - console.info(pc.blue(format(args))); -} - -export function log(...args: any[]) { - console.log(pc.white(format(args))); -} - -export function warn(...args: any[]) { - console.warn(pc.yellow(format(args))); -} - -export function error(...args: any[]) { - console.error(pc.red(format(args))); -} - -export function spinner() { - return ora({ - color: "yellow", - spinner: "dots", - }); -} diff --git a/account-kit/plugingen/src/types.ts b/account-kit/plugingen/src/types.ts deleted file mode 100644 index 07d999b300..0000000000 --- a/account-kit/plugingen/src/types.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Source: https://github.com/wevm/wagmi/blob/main/packages/cli/src/types.ts -export type Evaluate = { [key in keyof type]: type[key] } & unknown; - -export type MaybeArray = T | T[]; - -export type MaybePromise = T | Promise; - -export type RequiredBy = Required< - Pick -> & - Omit; diff --git a/account-kit/plugingen/src/utils/findConfig.ts b/account-kit/plugingen/src/utils/findConfig.ts deleted file mode 100644 index fc27a1f4b6..0000000000 --- a/account-kit/plugingen/src/utils/findConfig.ts +++ /dev/null @@ -1,37 +0,0 @@ -// source: https://github.com/wevm/wagmi/blob/main/packages/cli/src/utils/findConfig.ts -import { findUp } from "find-up"; -import { default as fs } from "fs-extra"; -import { resolve } from "pathe"; - -// Do not reorder -// In order of preference files are checked -const configFiles = [ - "plugingen.config.ts", - "plugingen.config.js", - "plugingen.config.mjs", - "plugingen.config.mts", -]; - -type FindConfigParameters = { - /** Config file name */ - config?: string; - /** Config file directory */ - root?: string; -}; - -/** - * Resolves path to plugingen CLI config file. - * - * @param {FindConfigParameters | undefined} parameters - optional override parameters for finding the config object - * @returns {string} the path to the config file - */ -export async function findConfig(parameters: FindConfigParameters = {}) { - const { config, root } = parameters; - const rootDir = resolve(root || process.cwd()); - if (config) { - const path = resolve(rootDir, config); - if (fs.pathExistsSync(path)) return path; - return; - } - return findUp(configFiles, { cwd: rootDir }); -} diff --git a/account-kit/plugingen/src/utils/format.ts b/account-kit/plugingen/src/utils/format.ts deleted file mode 100644 index d46649bda2..0000000000 --- a/account-kit/plugingen/src/utils/format.ts +++ /dev/null @@ -1,11 +0,0 @@ -// https://github.com/wevm/wagmi/blob/main/packages/cli/src/utils/format.ts -import prettier from "prettier"; - -export async function format(content: string) { - const config = await prettier.resolveConfig(process.cwd()); - return prettier.format(content, { - parser: "typescript", - ...config, - plugins: [], - }); -} diff --git a/account-kit/plugingen/src/utils/isUsingTypescript.ts b/account-kit/plugingen/src/utils/isUsingTypescript.ts deleted file mode 100644 index 132df23f41..0000000000 --- a/account-kit/plugingen/src/utils/isUsingTypescript.ts +++ /dev/null @@ -1,22 +0,0 @@ -// https://github.com/wevm/wagmi/blob/main/packages/cli/src/utils/getIsUsingTypeScript.ts -import { findUp } from "find-up"; - -export async function getIsUsingTypeScript() { - try { - const cwd = process.cwd(); - const tsconfig = await findUp("tsconfig.json", { cwd }); - if (tsconfig) return true; - - const plugingenConfig = await findUp( - ["plugingenConfig.config.ts", "plugingenConfig.config.mts"], - { - cwd, - }, - ); - if (plugingenConfig) return true; - - return false; - } catch { - return false; - } -} diff --git a/account-kit/plugingen/src/utils/loadEnv.ts b/account-kit/plugingen/src/utils/loadEnv.ts deleted file mode 100644 index 0796d0c0e6..0000000000 --- a/account-kit/plugingen/src/utils/loadEnv.ts +++ /dev/null @@ -1,91 +0,0 @@ -// https://github.com/wevm/wagmi/blob/main/packages/cli/src/utils/loadEnv.ts -import { parse } from "dotenv"; -import { expand } from "dotenv-expand"; - -import { existsSync, readFileSync, statSync } from "node:fs"; -import { dirname, join } from "node:path"; - -// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/env.ts#L7 -export function loadEnv( - config: { - mode?: string; - envDir?: string; - } = {}, -): Record { - const mode = config.mode; - if (mode === "local") { - throw new Error( - `"local" cannot be used as a mode name because it conflicts with the .local postfix for .env files.`, - ); - } - - const envFiles = [ - /** default file */ ".env", - /** local file */ ".env.local", - ...(mode - ? [ - /** mode file */ `.env.${mode}`, - /** mode local file */ `.env.${mode}.local`, - ] - : []), - ]; - - const envDir = config.envDir ?? process.cwd(); - const parsed = Object.fromEntries( - envFiles.flatMap((file) => { - const path = lookupFile(envDir, [file], { - pathOnly: true, - rootDir: envDir, - }); - if (!path) return []; - return Object.entries(parse(readFileSync(path))); - }), - ); - - try { - // let environment variables use each other - expand({ parsed }); - } catch (error) { - // custom error handling until https://github.com/motdotla/dotenv-expand/issues/65 is fixed upstream - // check for message "TypeError: Cannot read properties of undefined (reading 'split')" - if ((error as Error).message.includes("split")) { - throw new Error( - "dotenv-expand failed to expand env vars. Maybe you need to escape `$`?", - ); - } - throw error; - } - - return parsed; -} - -function lookupFile( - dir: string, - formats: string[], - options?: { - pathOnly?: boolean; - rootDir?: string; - predicate?: (file: string) => boolean; - }, -): string | undefined { - for (const format of formats) { - const fullPath = join(dir, format); - if (existsSync(fullPath) && statSync(fullPath).isFile()) { - const result = options?.pathOnly - ? fullPath - : readFileSync(fullPath, "utf-8"); - if (!options?.predicate || options.predicate(result)) { - return result; - } - } - } - - const parentDir = dirname(dir); - if ( - parentDir !== dir && - (!options?.rootDir || parentDir.startsWith(options?.rootDir)) - ) - return lookupFile(parentDir, formats, options); - - return undefined; -} diff --git a/account-kit/plugingen/src/utils/resolveConfig.ts b/account-kit/plugingen/src/utils/resolveConfig.ts deleted file mode 100644 index 3a8cb6ba4f..0000000000 --- a/account-kit/plugingen/src/utils/resolveConfig.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { bundleRequire } from "bundle-require"; -import type { Config } from "../config"; -import type { MaybeArray } from "../types"; - -type ResolveConfigParameters = { - /** Path to config file */ - configPath: string; -}; - -/** - * Bundles and returns config object from path. - * - * @param {ResolveConfigParameters} parameters - Parameters to resolve config - * @returns {Promise>} an array of the config objects - */ -export async function resolveConfig( - parameters: ResolveConfigParameters, -): Promise> { - const { configPath } = parameters; - const res = await bundleRequire({ filepath: configPath }); - let config = res.mod.default; - if (config.default) config = config.default; - if (typeof config !== "function") return config; - return await config(); -} diff --git a/account-kit/plugingen/src/version.ts b/account-kit/plugingen/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/plugingen/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/plugingen/tsconfig.build.json b/account-kit/plugingen/tsconfig.build.json deleted file mode 100644 index 5de5b77262..0000000000 --- a/account-kit/plugingen/tsconfig.build.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "**/*/*.e2e.test.ts", - "vitest.config.ts", - "vitest.config.e2e.ts" - ], - "include": ["src"], - "compilerOptions": { - "sourceMap": true - } -} diff --git a/account-kit/plugingen/tsconfig.json b/account-kit/plugingen/tsconfig.json deleted file mode 100644 index 748018d6a6..0000000000 --- a/account-kit/plugingen/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "typescript-template/base.json" -} diff --git a/account-kit/plugingen/vitest.config.ts b/account-kit/plugingen/vitest.config.ts deleted file mode 100644 index 526d6b104c..0000000000 --- a/account-kit/plugingen/vitest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/plugingen", - }, - }), -); diff --git a/account-kit/privy-integration/CHANGELOG.md b/account-kit/privy-integration/CHANGELOG.md deleted file mode 100644 index 5d70f30a7c..0000000000 --- a/account-kit/privy-integration/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -### Features - -- update wallet_sendPreparedCalls to use new call id ([#2340](https://github.com/alchemyplatform/aa-sdk/issues/2340)) ([7bcd59a](https://github.com/alchemyplatform/aa-sdk/commit/7bcd59a8c71a5e64ab055d2ff5ddba0d0269d96b)) - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -### Features - -- add react native expo support to the privy integration sdk ([#2215](https://github.com/alchemyplatform/aa-sdk/issues/2215)) ([e37426e](https://github.com/alchemyplatform/aa-sdk/commit/e37426e5ffda79f6f210276eceb394d9c8444e3a)) - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -### Features - -- support non-7702 mode in the privy integration ([#2196](https://github.com/alchemyplatform/aa-sdk/issues/2196)) ([9909265](https://github.com/alchemyplatform/aa-sdk/commit/9909265cbdc241e35c590657e746619d74fe9816)) - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -### Features - -- make solana treeshakeable ([#2189](https://github.com/alchemyplatform/aa-sdk/issues/2189)) ([941484d](https://github.com/alchemyplatform/aa-sdk/commit/941484d29da7fcc8664d22f9084cfc20eb3ddacf)) - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -### Features - -- add solana hook to the privy integration ([#2186](https://github.com/alchemyplatform/aa-sdk/issues/2186)) ([ee614a6](https://github.com/alchemyplatform/aa-sdk/commit/ee614a6fbccbd142ef952e60c8947bc31fd08d4e)) - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/privy-integration - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/privy-integration - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -### Features - -- adds an sdk to seamlessly integrate privy with Alchemy's infra ([#2154](https://github.com/alchemyplatform/aa-sdk/issues/2154)) ([46019a4](https://github.com/alchemyplatform/aa-sdk/commit/46019a442750ceb0de7cc06c8f2a9abf0145f6e7)) - -## 4.66.4 (2025-01-03) - -### Features - -- **privy-integration:** Initial release of @account-kit/privy-integration package -- Add Privy signer implementation for Account Kit -- Add authentication configuration helpers -- Add Privy provider for seamless integration -- Add utility functions for Privy operations diff --git a/account-kit/privy-integration/README.md b/account-kit/privy-integration/README.md deleted file mode 100644 index f7c4346572..0000000000 --- a/account-kit/privy-integration/README.md +++ /dev/null @@ -1,704 +0,0 @@ -# @account-kit/privy-integration - -Add gas sponsorship and smart wallet features to your Privy app in under 5 minutes. Works with **React Web** and **React Native (Expo)**. - -## What This Package Does - -If you're already using [Privy](https://privy.io) for authentication, this package lets you upgrade your users' wallets with: - -- **🔄 EIP-7702 Delegation** - Upgrade your wallets to smart accounts without migration -- **⛽ Gas Sponsorship** - Pay gas fees for your users via Alchemy Gas Manager (EVM & Solana) -- **💱 Token Swaps** - Execute swaps through Alchemy's swap infrastructure -- **🚀 Batched Transactions** - Send multiple operations in a single transaction using `sendTransaction([...])` -- **☀️ Solana Support** - Send sponsored Solana transactions with Privy's embedded Solana wallets (Web only) -- **📱 React Native Support** - Full EVM support for React Native apps using `@privy-io/expo` - -All while keeping Privy as your authentication provider. No need to change your auth flow or migrate user accounts. - -## Why Use This? - -**Already using Privy?** Add smart account features without changing your existing setup: - -- Drop-in React hooks that replace Privy's transaction hooks -- Automatic EIP-7702 delegation to upgrade wallets on-the-fly -- Route transactions through Alchemy's infrastructure for sponsorship and reliability - -## Installation - -### React Web - -```bash -npm install @account-kit/privy-integration -# or -yarn add @account-kit/privy-integration -# or -pnpm add @account-kit/privy-integration -``` - -### React Native (Expo) - -```bash -npm install @account-kit/privy-integration @privy-io/expo -# or -yarn add @account-kit/privy-integration @privy-io/expo -# or -pnpm add @account-kit/privy-integration @privy-io/expo -``` - -### Optional: Solana Support (Web Only) - -To use Solana features (like `useAlchemySolanaTransaction`), you'll need to install the Solana Web3.js library: - -```bash -npm install @solana/web3.js -# or -yarn add @solana/web3.js -# or -pnpm add @solana/web3.js -``` - -Then import from the `/solana` export: - -```tsx -import { useAlchemySolanaTransaction } from "@account-kit/privy-integration/solana"; -``` - -> **Note:** The Solana functionality is completely optional and currently only available for React web. If you only need EVM features, you don't need to install `@solana/web3.js`. - -## Quick Start - -Choose your platform: - -
-React Web - -### 1. Wrap Your App with Both Providers - -**Important:** `AlchemyProvider` must be nested **inside** `PrivyProvider` to access authentication state. - -```tsx -import { PrivyProvider } from "@privy-io/react-auth"; -import { AlchemyProvider } from "@account-kit/privy-integration"; - -function App() { - return ( - - - - - - ); -} -``` - -### 2. Send Gasless Transactions - -```tsx -import { useAlchemySendTransaction } from "@account-kit/privy-integration"; - -function SendButton() { - const { sendTransaction, isLoading, error, data } = - useAlchemySendTransaction(); - - const handleSend = async () => { - try { - // Single transaction - const result = await sendTransaction({ - to: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb", - data: "0x...", - value: "0xde0b6b3a7640000", // 1 ETH in hex (also accepts decimal string or bigint) - }); - - console.log("Transaction hash:", result.txnHash); - } catch (err) { - console.error("Transaction failed:", err); - } - }; - - const handleBatch = async () => { - try { - // Batch transactions - const result = await sendTransaction([ - { to: "0x...", data: "0x...", value: "0xde0b6b3a7640000" }, // 1 ETH - { to: "0x...", data: "0x..." }, - { to: "0x...", data: "0x..." }, - ]); - - console.log("Batch transaction hash:", result.txnHash); - } catch (err) { - console.error("Batch transaction failed:", err); - } - }; - - return ( - <> - - - - ); -} -``` - -### 3. Execute Token Swaps - -```tsx -import { - useAlchemyPrepareSwap, - useAlchemySubmitSwap, -} from "@account-kit/privy-integration"; - -function SwapButton() { - const { prepareSwap } = useAlchemyPrepareSwap(); - const { submitSwap, isLoading } = useAlchemySubmitSwap(); - - const handleSwap = async () => { - try { - // Step 1: Get quote and prepare swap - // Two modes available: - - // Option A: Specify exact amount to swap FROM - const preparedSwap = await prepareSwap({ - fromToken: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH - toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC - fromAmount: "0xde0b6b3a7640000", // Swap exactly 1 ETH - }); - - // Option B: Specify minimum amount to receive TO - /* const preparedSwap = await prepareSwap({ - fromToken: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH - toToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC - minimumToAmount: "0x5f5e100", // Receive at least 100 USDC (6 decimals) - }); */ - - console.log( - "Quote expiry:", - new Date(parseInt(preparedSwap.quote.expiry) * 1000), - ); - - // Step 2: Execute swap - const result = await submitSwap(preparedSwap); - console.log("Swap confirmed:", result.txnHash); - } catch (err) { - console.error("Swap failed:", err); - } - }; - - return ( - - ); -} -``` - -### 4. Send Solana Transactions - -```tsx -import { useAlchemySolanaTransaction } from "@account-kit/privy-integration/solana"; - -function SolanaSendButton() { - const { sendTransactionAsync, isPending, error, data } = - useAlchemySolanaTransaction({ - rpcUrl: "https://solana-mainnet.g.alchemy.com/v2/your-api-key", - policyId: "your-solana-policy-id", // optional, for gas sponsorship - }); - - const handleTransfer = async () => { - try { - // Simple SOL transfer - const result = await sendTransactionAsync({ - transfer: { - amount: 1_000_000_000, // 1 SOL in lamports - toAddress: "recipient-base58-address", - }, - }); - - console.log("Transaction hash:", result.hash); - } catch (err) { - console.error("Transaction failed:", err); - } - }; - - const handleCustomInstructions = async () => { - try { - // Custom instructions - import { SystemProgram, PublicKey } from "@solana/web3.js"; - - const instruction = SystemProgram.transfer({ - fromPubkey: new PublicKey(walletAddress), - toPubkey: new PublicKey(recipientAddress), - lamports: 1_000_000, - }); - - const result = await sendTransactionAsync({ - instructions: [instruction], - }); - - console.log("Transaction hash:", result.hash); - } catch (err) { - console.error("Transaction failed:", err); - } - }; - - return ( - <> - - - - ); -} -``` - -
- -
-React Native (Expo) - -### 1. Wrap Your App with Both Providers - -**Important:** Use `@privy-io/expo` and import from `/react-native` for React Native apps. - -```tsx -import { PrivyProvider } from "@privy-io/expo"; -import { AlchemyProvider } from "@account-kit/privy-integration/react-native"; - -function App() { - return ( - - - - - - ); -} -``` - -### 2. Send Gasless Transactions - -```tsx -import { useAlchemySendTransaction } from "@account-kit/privy-integration/react-native"; -import { Button } from "react-native"; - -function SendButton() { - const { sendTransaction, isLoading, error, data } = - useAlchemySendTransaction(); - - const handleSend = async () => { - try { - // Single transaction - const result = await sendTransaction({ - to: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb", - data: "0x...", - value: "0xde0b6b3a7640000", // 1 ETH in hex (also accepts decimal string or bigint) - }); - - console.log("Transaction hash:", result.txnHash); - } catch (err) { - console.error("Transaction failed:", err); - } - }; - - const handleBatch = async () => { - try { - // Batch transactions - const result = await sendTransaction([ - { to: "0x...", data: "0x...", value: "0xde0b6b3a7640000" }, // 1 ETH - { to: "0x...", data: "0x..." }, - { to: "0x...", data: "0x..." }, - ]); - - console.log("Batch transaction hash:", result.txnHash); - } catch (err) { - console.error("Batch transaction failed:", err); - } - }; - - return ( - <> -
- -## Configuration - -### AlchemyProvider Props - -| Prop | Type | Required | Description | -| -------------------- | ---------------------- | ------------- | -------------------------------------------------------------------------------------------------------- | -| `apiKey` | `string` | Conditional\* | Your Alchemy API key for @account-kit/infra transport | -| `jwt` | `string` | Conditional\* | JWT token for authentication (alternative to `apiKey`) | -| `rpcUrl` | `string` | Conditional\* | Custom RPC URL for EVM chains (can be used alone or with `jwt`) | -| `solanaRpcUrl` | `string` | No | Custom RPC URL for Solana (separate from EVM `rpcUrl`) | -| `policyId` | `string \| string[]` | No | Gas Manager policy ID(s) for EVM sponsorship. If array is provided, backend uses first applicable policy | -| `solanaPolicyId` | `string \| string[]` | No | Gas Manager policy ID(s) for Solana sponsorship | -| `disableSponsorship` | `boolean` | No | Set to `true` to disable gas sponsorship by default (default: `false`) | -| `accountAuthMode` | `'eip7702' \| 'owner'` | No | Authorization mode for EVM smart accounts (default: `'eip7702'`) | -| `walletAddress` | `string` | No | Specific wallet address to use if user has multiple wallets (defaults to first wallet) | - -\* **Required configuration (pick one):** - -- `apiKey` alone -- `jwt` alone -- `rpcUrl` alone -- `rpcUrl` + `jwt` together - -### Transaction Options - -Control sponsorship per transaction: - -```tsx -// Sponsored transaction (default if policyId is set and disableSponsorship is not true) -await sendTransaction({ to: "0x...", data: "0x..." }); - -// Disable sponsorship for this specific transaction -await sendTransaction( - { to: "0x...", data: "0x..." }, - { disableSponsorship: true }, -); -``` - -## API Reference - -### Hooks - -#### `useAlchemySendTransaction()` - -Send single or batch EVM transactions with optional gas sponsorship. - -**Returns:** - -- `sendTransaction(input, options?)` - Send a single transaction or batch of transactions - - `input` - Single `UnsignedTransactionRequest` or array of them - - `options` - Optional `SendTransactionOptions` -- `isLoading` - Loading state -- `error` - Error object if failed -- `data` - Transaction result with `txnHash` -- `reset()` - Reset hook state - -#### `useAlchemyPrepareSwap()` - -Request swap quotes and prepare swap calls. - -**Returns:** - -- `prepareSwap(request)` - Get quote and prepare swap (returns full response with `quote` and call data) -- `isLoading` - Loading state -- `error` - Error object if failed -- `data` - Prepared swap result -- `reset()` - Reset hook state - -#### `useAlchemySubmitSwap()` - -Sign and submit prepared swap calls. - -**Returns:** - -- `submitSwap(preparedSwap)` - Execute prepared swap (accepts result from `prepareSwap`) -- `isLoading` - Loading state -- `error` - Error object if failed -- `data` - Swap result with `txnHash` -- `reset()` - Reset hook state - -#### `useAlchemySolanaTransaction(options?)` - -Send Solana transactions with optional gas sponsorship via Alchemy. - -**Parameters:** - -- `options.rpcUrl` - Solana RPC URL (overrides provider config) -- `options.policyId` - Gas sponsorship policy ID (overrides provider config) -- `options.walletAddress` - Specific wallet address to use (defaults to first wallet) -- `options.confirmationOptions` - Transaction confirmation options - -**Returns:** - -- `sendTransactionAsync(params)` - Send transaction and await result (throws on error) - - `params.transfer` - Simple SOL transfer with `amount` (lamports) and `toAddress` - - `params.instructions` - Custom Solana transaction instructions array -- `sendTransaction(params)` - Send transaction (fire-and-forget, errors caught internally) -- `connection` - Active Solana connection instance -- `isPending` - Whether a transaction is currently being sent -- `error` - Error object if failed -- `data` - Transaction result with `hash` (base58 signature) -- `reset()` - Reset hook state - -#### `useAlchemyClient()` - -Get the underlying smart wallet client and account (advanced use cases). - -**Returns:** - -- `getClient()` - Async function that returns `{ client: SmartWalletClient, account: SmartContractAccount }` - - `client` - The smart wallet client instance - - `account` - The smart account with address and other account info - -## How It Works - -### EIP-7702 Delegation (Default) - -This package uses [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) to upgrade your users' Privy wallets into smart accounts **without requiring them to deploy new contracts or migrate funds**. - -When a user sends their first transaction: - -1. Their wallet signs an EIP-7702 authorization -2. The authorization delegates to Alchemy's smart account implementation -3. The transaction is executed with smart account features (batching, sponsorship, etc.) -4. Gas is optionally sponsored by your Gas Manager policy - -### Smart Wallet Client - -Under the hood, this package: - -1. Connects to your user's Privy embedded wallet -2. Wraps it with `WalletClientSigner` from `@aa-sdk/core` -3. Creates a `SmartWalletClient` with EIP-7702 support (default) or traditional smart account support -4. Routes transactions through Alchemy infrastructure -5. Automatically handles sponsorship via Gas Manager policies - -### Authorization Modes - -The package supports two authorization modes via the `accountAuthMode` prop: - -- **`'eip7702'` (default, recommended)**: Uses EIP-7702 to delegate the Privy wallet to a smart account. No separate deployment needed, funds stay at the wallet address. This is the recommended mode for most applications. -- **`'owner'`**: Uses a traditional smart account with the Privy wallet as the owner/signer. The smart account has a separate address from the owner wallet. Use this if you need compatibility with environments that don't support EIP-7702 yet. - -```tsx -// Default behavior (EIP-7702) - - - - -// Traditional smart account mode - - - -``` - -**Getting the Smart Account Address:** - -When using `owner` mode, the smart account has a different address from your Privy signer. Access it via `useAlchemyClient`: - -```tsx -import { useAlchemyClient } from "@account-kit/privy-integration"; - -function MyComponent() { - const { getClient } = useAlchemyClient(); - - const getSmartAccountAddress = async () => { - const { account } = await getClient(); - console.log("Smart account address:", account.address); - // This is different from the Privy signer address in owner mode - }; -} -``` - -## Get Your API Keys - -### Alchemy API Key - -1. Go to [Alchemy Dashboard](https://dashboard.alchemy.com/) -2. Create or select an app -3. Copy your API key - -### Gas Manager Policy ID (Optional) - -1. Go to [Gas Manager](https://dashboard.alchemy.com/gas-manager) -2. Create a new policy with your desired rules -3. Copy the policy ID - -### Privy App ID - -1. Go to [Privy Dashboard](https://dashboard.privy.io/) -2. Create or select an app -3. Copy your app ID - -## Migration from Privy Transactions - -If you're currently using Privy's `useSendTransaction` hook: - -### Before - -```tsx -import { useSendTransaction } from "@privy-io/react-auth"; - -const { sendTransaction } = useSendTransaction({ - onSuccess: (txHash) => console.log(txHash), -}); -``` - -### After - -```tsx -import { useAlchemySendTransaction } from "@account-kit/privy-integration"; - -const { sendTransaction, data } = useAlchemySendTransaction(); - -// Now with gas sponsorship! -``` - -The API is nearly identical, making migration seamless. - -## Advanced Usage - -### Access the Smart Wallet Client - -For advanced use cases, access the underlying client and account directly: - -```tsx -import { useAlchemyClient } from "@account-kit/privy-integration"; - -function AdvancedComponent() { - const { getClient } = useAlchemyClient(); - - const doAdvancedOperation = async () => { - const { client, account } = await getClient(); - - // Access the smart account address - console.log("Smart account address:", account.address); - - // Direct access to sendCalls with full control - await client.sendCalls({ - from: account.address, - calls: [ - { to: "0x...", data: "0x..." }, - { to: "0x...", data: "0x..." }, - ], - capabilities: { - eip7702Auth: true, // Set to true for EIP-7702 mode - paymasterService: { policyId: "your-policy-id" }, - }, - }); - - // Note: For most cases, use useAlchemySendTransaction instead - }; - - return ; -} -``` - -## Troubleshooting - -### TypeScript error: "Type ... is not assignable to type 'AlchemyProviderConfig'" - -The provider requires exactly one valid transport configuration. Valid combinations: - -- `apiKey` only -- `jwt` only -- `rpcUrl` only -- `rpcUrl` + `jwt` together - -Invalid combinations like `apiKey` + `jwt` will now show TypeScript errors. - -### Swaps failing with "Received raw calls" - -The swap API should return prepared calls by default. This error means the API returned raw calls. Ensure you're not setting `returnRawCalls: true` in the request. - -## Examples - -Check out the [`examples/`](../../examples/) directory for complete applications: - -- **Privy Integration Demo** - Demos sponsored transactions and sponsored swaps - -## Resources - -- [Alchemy Smart Wallet Documentation](https://www.alchemy.com/docs/wallets/) -- [EIP-7702 Specification](https://eips.ethereum.org/EIPS/eip-7702) -- [Gas Manager Dashboard](https://dashboard.alchemy.com/services/gas-manager/overview) - -## Support - -- [Discord](https://discord.gg/alchemy) -- [GitHub Issues](https://github.com/alchemyplatform/aa-sdk/issues) -- [Alchemy Support](https://www.alchemy.com/support) - -## License - -MIT diff --git a/account-kit/privy-integration/inject-version.ts b/account-kit/privy-integration/inject-version.ts deleted file mode 100644 index 05e1caae82..0000000000 --- a/account-kit/privy-integration/inject-version.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync, writeFileSync } from "fs"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const VERSION_FILE_PATH = "src/version.ts"; - -const packageJSON = JSON.parse(readFileSync("./package.json").toString()); - -writeFileSync( - resolve(__dirname, VERSION_FILE_PATH), - `// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "${packageJSON.version}"; -`, -); -console.log(`Wrote version to ${VERSION_FILE_PATH}.`); diff --git a/account-kit/privy-integration/package.json b/account-kit/privy-integration/package.json deleted file mode 100644 index 2a42fc442a..0000000000 --- a/account-kit/privy-integration/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "name": "@account-kit/privy-integration", - "version": "4.84.1", - "description": "Use Alchemy gas sponsorship, swaps and more with Privy", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "react-native": { - "main": "./dist/esm/react-native.js", - "./dist/esm/adapters/web.js": "./dist/esm/adapters/web.native.js", - "./dist/esm/providers/WebProvider.js": "./dist/esm/providers/WebProvider.native.js", - "./dist/esm/Provider.js": "./dist/esm/Provider.native.js", - "@privy-io/react-auth": false, - "@privy-io/react-auth/solana": false - }, - "files": [ - "dist", - "src/**/*.ts", - "src/**/*.tsx", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "react-native": "./dist/esm/react-native.js", - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - }, - "./react-native": { - "types": "./dist/types/react-native.d.ts", - "import": "./dist/esm/react-native.js", - "default": "./dist/esm/react-native.js" - }, - "./solana": { - "types": "./dist/types/solana.d.ts", - "import": "./dist/esm/solana.js", - "default": "./dist/esm/solana.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest --passWithNoTests", - "test:run": "vitest run --passWithNoTests" - }, - "devDependencies": { - "@privy-io/expo": "0.58.1", - "@privy-io/react-auth": "3.3.0", - "typescript-template": "*" - }, - "dependencies": { - "@account-kit/infra": "^4.84.1", - "@account-kit/wallet-client": "^4.84.1" - }, - "peerDependencies": { - "@privy-io/expo": "^0.58.1", - "@privy-io/react-auth": "^2.3.1 || ^3.0.0", - "viem": "^2.45.0" - }, - "peerDependenciesMeta": { - "@privy-io/react-auth": { - "optional": true - }, - "@privy-io/expo": { - "optional": true - }, - "@solana/web3.js": { - "optional": true - } - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d" -} diff --git a/account-kit/privy-integration/src/Provider.native.tsx b/account-kit/privy-integration/src/Provider.native.tsx deleted file mode 100644 index a55775393c..0000000000 --- a/account-kit/privy-integration/src/Provider.native.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * React Native stub for web Provider - * This file prevents Metro from importing web-specific code - */ - -export function AlchemyProvider() { - throw new Error( - "This module requires @privy-io/react-auth which is not available in React Native. " + - 'Import from "@account-kit/privy-integration/react-native" instead.', - ); -} - -export function useAlchemyConfig() { - throw new Error( - "This module requires @privy-io/react-auth which is not available in React Native. " + - 'Import from "@account-kit/privy-integration/react-native" instead.', - ); -} diff --git a/account-kit/privy-integration/src/Provider.tsx b/account-kit/privy-integration/src/Provider.tsx deleted file mode 100644 index c571fea243..0000000000 --- a/account-kit/privy-integration/src/Provider.tsx +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Web-specific exports - * Re-exports the web provider and hooks for React applications - */ -export { AlchemyProvider } from "./providers/WebProvider.js"; -export { useAlchemyConfig } from "./context/AlchemyContext.js"; diff --git a/account-kit/privy-integration/src/adapters/react-native.ts b/account-kit/privy-integration/src/adapters/react-native.ts deleted file mode 100644 index 896c489b7f..0000000000 --- a/account-kit/privy-integration/src/adapters/react-native.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { useCallback } from "react"; -import { - usePrivy, - useEmbeddedEthereumWallet, - type PrivyEmbeddedWalletProvider, -} from "@privy-io/expo"; -import { isAddressEqual, parseSignature, type Authorization } from "viem"; -import { hashAuthorization } from "viem/utils"; -import type { AuthorizationRequest } from "@aa-sdk/core"; -import type { PrivyAdapter, EmbeddedWallet, PrivyAuthState } from "./types.js"; - -/** - * Wallet type from @privy-io/expo - * Based on the example app structure - */ -interface ExpoEmbeddedWallet { - address: string; - chainId?: string; - getProvider?: () => Promise; -} - -/** - * React Native (Expo) adapter for @privy-io/expo - * Implements platform-specific hooks for React Native applications - */ -export const reactNativeAdapter: PrivyAdapter = { - useEmbeddedWallet(preferredAddress?: string) { - const { wallets } = useEmbeddedEthereumWallet(); - - const getEmbeddedWallet = useCallback((): EmbeddedWallet => { - if (!wallets || wallets.length === 0) { - throw new Error( - "Privy embedded wallet not found. Please ensure the user is authenticated and has created a wallet.", - ); - } - - // If a preferred address is specified, find that wallet - const wallet = preferredAddress - ? wallets.find((w) => - isAddressEqual( - w.address as `0x${string}`, - preferredAddress as `0x${string}`, - ), - ) - : wallets[0]; - - if (!wallet) { - throw new Error( - preferredAddress - ? `Privy embedded wallet with address ${preferredAddress} not found.` - : "Privy embedded wallet not found. Please ensure the user is authenticated and has created a wallet.", - ); - } - - return adaptExpoWallet(wallet); - }, [wallets, preferredAddress]); - - return getEmbeddedWallet; - }, - - usePrivyAuth(): PrivyAuthState { - const { user } = usePrivy(); - return { authenticated: !!user, user }; - }, - - useWalletAddress(preferredAddress?: string): string | undefined { - const { wallets } = useEmbeddedEthereumWallet(); - - if (!wallets || wallets.length === 0) { - return undefined; - } - - // If a preferred address is specified, find that wallet - if (preferredAddress) { - const wallet = wallets.find((w) => - isAddressEqual( - w.address as `0x${string}`, - preferredAddress as `0x${string}`, - ), - ); - return wallet?.address; - } - - // Otherwise return the first wallet - return wallets[0]?.address; - }, - - useAuthorizationSigner(preferredAddress?: string) { - const { wallets } = useEmbeddedEthereumWallet(); - - const signAuthorization = useCallback( - async ( - unsignedAuth: AuthorizationRequest, - ): Promise> => { - if (!wallets || wallets.length === 0) { - throw new Error( - "Privy embedded wallet not found. Please ensure the user is authenticated and has created a wallet.", - ); - } - - // If a preferred address is specified, find that wallet - const wallet = preferredAddress - ? wallets.find((w) => - isAddressEqual( - w.address as `0x${string}`, - preferredAddress as `0x${string}`, - ), - ) - : wallets[0]; - - if (!wallet) { - throw new Error( - preferredAddress - ? `Privy embedded wallet with address ${preferredAddress} not found.` - : "Privy embedded wallet not found. Please ensure the user is authenticated and has created a wallet.", - ); - } - - const provider = await wallet.getProvider?.(); - if (!provider) { - throw new Error( - "Provider not available on this wallet. Ensure you're using the embedded Ethereum wallet.", - ); - } - - // Extract the implementation address (handle both 'address' and 'contractAddress' fields) - const implementationAddress = - unsignedAuth.address ?? unsignedAuth.contractAddress; - - if (!implementationAddress) { - throw new Error( - "Implementation address is required for EIP-7702 authorization", - ); - } - - // Create the authorization structure (matches Privy's implementation) - const authorization = { - chainId: unsignedAuth.chainId, - address: implementationAddress, - nonce: unsignedAuth.nonce, - }; - - // Hash the authorization using viem (same as Privy does) - const authorizationHash = hashAuthorization(authorization); - - // Sign the hash directly with secp256k1_sign (same as Privy) - const signature = (await provider.request({ - method: "secp256k1_sign", - params: [authorizationHash], - })) as `0x${string}`; - - // Parse the signature using viem (same as Privy) - const parsedSignature = parseSignature(signature); - - return { - chainId: unsignedAuth.chainId, - address: implementationAddress, - nonce: unsignedAuth.nonce, - ...parsedSignature, - }; - }, - [wallets, preferredAddress], - ); - - return signAuthorization; - }, -}; - -/** - * Adapts an Expo wallet to the common EmbeddedWallet interface - * - * @param {ExpoEmbeddedWallet} wallet - The Expo embedded wallet to adapt - * @returns {EmbeddedWallet} The adapted wallet following the common interface - */ -function adaptExpoWallet(wallet: ExpoEmbeddedWallet): EmbeddedWallet { - // Use closure to maintain up-to-date chain ID across chain switches - let cachedChainId = wallet.chainId || "1"; - - return { - address: wallet.address as `0x${string}`, - get chainId() { - return cachedChainId; - }, - getEthereumProvider: async () => { - if (!wallet.getProvider) { - throw new Error( - "getProvider is not available on this wallet. Ensure you're using the embedded Ethereum wallet.", - ); - } - const provider = await wallet.getProvider(); - - // Always fetch current chain ID when provider is accessed - // This ensures we have the latest chain after wallet_switchEthereumChain calls - try { - const currentChainId = (await provider.request({ - method: "eth_chainId", - params: [], - })) as string; - - // Convert hex to decimal string format (e.g., "0x1" -> "1") - cachedChainId = parseInt(currentChainId, 16).toString(); - } catch { - // Fall back to cached value if fetch fails - // Chain ID fetch errors are non-critical and can happen during initialization - } - - return provider; - }, - }; -} diff --git a/account-kit/privy-integration/src/adapters/types.ts b/account-kit/privy-integration/src/adapters/types.ts deleted file mode 100644 index 06d2a49f4c..0000000000 --- a/account-kit/privy-integration/src/adapters/types.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { Address, Authorization } from "viem"; -import type { AuthorizationRequest } from "@aa-sdk/core"; - -/** - * Platform-agnostic embedded wallet interface - * Abstracts differences between @privy-io/react-auth and @privy-io/expo - */ -export interface EmbeddedWallet { - /** Wallet address */ - address: Address; - - /** Chain ID as a string (may be CAIP-2 format like "eip155:1" or numeric string like "1") */ - chainId: string; - - /** Get EVM provider for the wallet */ - getEthereumProvider(): Promise; -} - -/** - * Platform-agnostic Privy auth state - */ -export interface PrivyAuthState { - /** Whether user is authenticated */ - authenticated: boolean; - - /** User object (platform-specific, used for cache invalidation) */ - user: any; -} - -/** - * Adapter interface that each platform must implement - * Provides platform-specific Privy functionality - */ -export interface PrivyAdapter { - /** - * Hook to get embedded wallet - * Must be called as a React hook (follows rules of hooks) - * - * @param preferredAddress - Optional address to find a specific wallet - */ - useEmbeddedWallet(preferredAddress?: string): () => EmbeddedWallet; - - /** - * Hook to get Privy authentication state - * Must be called as a React hook (follows rules of hooks) - */ - usePrivyAuth(): PrivyAuthState; - - /** - * Hook to get current wallet address (for cache invalidation) - * Returns undefined if no wallet is available - * Must be called as a React hook (follows rules of hooks) - * - * @param preferredAddress - Optional address to find a specific wallet - */ - useWalletAddress(preferredAddress?: string): string | undefined; - - /** - * Hook to get EIP-7702 authorization signer (optional, web only) - * Must be called as a React hook (follows rules of hooks) - * - * @param preferredAddress - Optional address to find a specific wallet - */ - useAuthorizationSigner?( - preferredAddress?: string, - ): - | (( - auth: AuthorizationRequest, - ) => Promise>) - | null; -} diff --git a/account-kit/privy-integration/src/adapters/web.native.ts b/account-kit/privy-integration/src/adapters/web.native.ts deleted file mode 100644 index 466b2ad5b4..0000000000 --- a/account-kit/privy-integration/src/adapters/web.native.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * React Native stub for web adapter - * This file prevents Metro from importing @privy-io/react-auth - */ - -export const webAdapter = null; diff --git a/account-kit/privy-integration/src/adapters/web.ts b/account-kit/privy-integration/src/adapters/web.ts deleted file mode 100644 index 6c64fb1c43..0000000000 --- a/account-kit/privy-integration/src/adapters/web.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { useCallback } from "react"; -import { - useWallets, - usePrivy, - useSign7702Authorization, - type ConnectedWallet as PrivyWallet, -} from "@privy-io/react-auth"; -import { isAddressEqual, type Authorization } from "viem"; -import type { AuthorizationRequest } from "@aa-sdk/core"; -import type { PrivyAdapter, EmbeddedWallet, PrivyAuthState } from "./types.js"; - -/** - * Web adapter for @privy-io/react-auth - * Implements platform-specific hooks for React web applications - */ -export const webAdapter: PrivyAdapter = { - useEmbeddedWallet(preferredAddress?: string) { - const { wallets } = useWallets(); - - const getEmbeddedWallet = useCallback((): EmbeddedWallet => { - const privyWallets = wallets.filter( - (w) => w.walletClientType === "privy", - ); - - if (privyWallets.length === 0) { - throw new Error( - "Privy embedded wallet not found. Please ensure the user is authenticated.", - ); - } - - // If a preferred address is specified, find that wallet - const embedded = preferredAddress - ? privyWallets.find((w) => - isAddressEqual( - w.address as `0x${string}`, - preferredAddress as `0x${string}`, - ), - ) - : privyWallets[0]; - - if (!embedded) { - throw new Error( - preferredAddress - ? `Privy embedded wallet with address ${preferredAddress} not found.` - : "Privy embedded wallet not found. Please ensure the user is authenticated.", - ); - } - - return adaptWebWallet(embedded); - }, [wallets, preferredAddress]); - - return getEmbeddedWallet; - }, - - usePrivyAuth(): PrivyAuthState { - const { user } = usePrivy(); - return { authenticated: !!user, user }; - }, - - useWalletAddress(preferredAddress?: string): string | undefined { - const { wallets } = useWallets(); - const privyWallets = wallets.filter((w) => w.walletClientType === "privy"); - - // If a preferred address is specified, find that wallet - if (preferredAddress) { - const wallet = privyWallets.find((w) => - isAddressEqual( - w.address as `0x${string}`, - preferredAddress as `0x${string}`, - ), - ); - return wallet?.address; - } - - // Otherwise return the first embedded wallet - return privyWallets[0]?.address; - }, - - useAuthorizationSigner(_preferredAddress?: string) { - const { signAuthorization } = useSign7702Authorization(); - - return useCallback( - async ( - unsignedAuth: AuthorizationRequest, - ): Promise> => { - const signature = await signAuthorization({ - ...unsignedAuth, - contractAddress: unsignedAuth.address ?? unsignedAuth.contractAddress, - }); - - return { - ...unsignedAuth, - ...signature, - }; - }, - [signAuthorization], - ); - }, -}; - -/** - * Adapts a Privy web wallet to the common EmbeddedWallet interface - * - * @param {PrivyWallet} wallet - The Privy web wallet to adapt - * @returns {EmbeddedWallet} The adapted wallet following the common interface - */ -function adaptWebWallet(wallet: PrivyWallet): EmbeddedWallet { - return { - address: wallet.address as `0x${string}`, - chainId: wallet.chainId || "1", - getEthereumProvider: () => wallet.getEthereumProvider(), - }; -} diff --git a/account-kit/privy-integration/src/context/AlchemyContext.tsx b/account-kit/privy-integration/src/context/AlchemyContext.tsx deleted file mode 100644 index 7200cb1f50..0000000000 --- a/account-kit/privy-integration/src/context/AlchemyContext.tsx +++ /dev/null @@ -1,185 +0,0 @@ -import { - type PropsWithChildren, - createContext, - useContext, - useRef, - useEffect, -} from "react"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import type { SmartContractAccount } from "@aa-sdk/core"; -import type { AlchemyProviderConfig } from "../types.js"; -import type { PrivyAdapter } from "../adapters/types.js"; - -/** - * Normalized config with defaults applied - * - * @internal - */ -export type NormalizedAlchemyConfig = AlchemyProviderConfig & - Required>; - -/** - * Context for Alchemy configuration - */ -const AlchemyConfigContext = createContext( - null, -); - -/** - * Context for the platform adapter - */ -const AdapterContext = createContext(null); - -/** - * Client cache stored in React tree (similar to QueryClient in React Query) - * - * @internal - */ -interface ClientCache { - client: SmartWalletClient | null; - account: SmartContractAccount | null; - cacheKey: string | null; -} - -const ClientCacheContext = createContext(null); - -/** - * Props for AlchemyContextProvider - */ -interface AlchemyContextProviderProps extends PropsWithChildren { - config: AlchemyProviderConfig; - adapter: PrivyAdapter; -} - -/** - * Internal provider component that manages Alchemy context - * Used by both web and React Native providers - * - * @internal - * @param {AlchemyContextProviderProps} props - Component props - * @param {React.ReactNode} props.children - React children to wrap with context - * @param {AlchemyProviderConfig} props.config - Alchemy configuration - * @param {PrivyAdapter} props.adapter - Platform adapter - * @returns {JSX.Element} Context provider component - */ -export function AlchemyContextProvider({ - children, - config, - adapter, -}: AlchemyContextProviderProps) { - const { authenticated } = adapter.usePrivyAuth(); - const walletAddress = adapter.useWalletAddress(config.walletAddress); - - // Normalize config with default values - const normalizedConfig: NormalizedAlchemyConfig = { - ...config, - accountAuthMode: config.accountAuthMode ?? "eip7702", - }; - - // Store cache in a ref - persists across renders but scoped to this component instance - // This makes it SSR-safe (each request gets its own cache) and React StrictMode-safe - const cache = useRef({ - client: null, - account: null, - cacheKey: null, - }); - - // Track previous state to detect logout and wallet changes - const prevAuthenticatedRef = useRef(authenticated); - const prevWalletAddressRef = useRef(walletAddress); - - // Automatically reset cache when user logs out or switches wallets - useEffect(() => { - const wasAuthenticated = prevAuthenticatedRef.current; - const prevWalletAddress = prevWalletAddressRef.current; - const currentWalletAddress = walletAddress; - - // Reset cache on logout - if (wasAuthenticated && !authenticated) { - cache.current.client = null; - cache.current.account = null; - cache.current.cacheKey = null; - } - - // Reset cache on wallet address change (account switching) - if ( - authenticated && - prevWalletAddress && - currentWalletAddress && - prevWalletAddress !== currentWalletAddress - ) { - cache.current.client = null; - cache.current.account = null; - cache.current.cacheKey = null; - } - - // Update refs for next render - prevAuthenticatedRef.current = authenticated; - prevWalletAddressRef.current = currentWalletAddress; - }, [authenticated, walletAddress]); - - return ( - - - - {children} - - - - ); -} - -/** - * Hook to access Alchemy provider configuration - * Must be used within an component - * - * @returns {NormalizedAlchemyConfig} The current Alchemy configuration with defaults applied - * @throws {Error} If used outside of AlchemyProvider - * - * @example - * ```tsx - * const config = useAlchemyConfig(); - * console.log('Policy ID:', config.policyId); - * console.log('Auth Mode:', config.accountAuthMode); // Always defined - * ``` - */ -export function useAlchemyConfig(): NormalizedAlchemyConfig { - const context = useContext(AlchemyConfigContext); - if (!context) { - throw new Error("useAlchemyConfig must be used within "); - } - return context; -} - -/** - * Hook to access the platform adapter - * Must be used within an component - * - * @internal - * @returns {PrivyAdapter} The platform adapter - */ -export function useAdapter(): PrivyAdapter { - const context = useContext(AdapterContext); - if (!context) { - throw new Error( - "useAdapter must be used within . Make sure AlchemyProvider is nested inside PrivyProvider.", - ); - } - return context; -} - -/** - * Hook to access the client cache (internal use only) - * - * @internal - * @returns {ClientCache} The client cache object - */ -export function useClientCache(): ClientCache { - const context = useContext(ClientCacheContext); - if (!context) { - throw new Error( - "useClientCache must be used within . Make sure AlchemyProvider is nested inside PrivyProvider.", - ); - } - return context; -} diff --git a/account-kit/privy-integration/src/hooks/internal/useEmbeddedWallet.ts b/account-kit/privy-integration/src/hooks/internal/useEmbeddedWallet.ts deleted file mode 100644 index 79bc978877..0000000000 --- a/account-kit/privy-integration/src/hooks/internal/useEmbeddedWallet.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useAdapter, useAlchemyConfig } from "../../context/AlchemyContext.js"; - -/** - * Internal hook to get the Privy embedded wallet - * Uses the platform adapter to abstract differences between web and React Native - * - * @internal - * @returns {() => EmbeddedWallet} Function that returns the embedded wallet - * @throws {Error} If embedded wallet is not found - */ -export function useEmbeddedWallet() { - const adapter = useAdapter(); - const config = useAlchemyConfig(); - return adapter.useEmbeddedWallet(config.walletAddress); -} diff --git a/account-kit/privy-integration/src/hooks/useAlchemyClient.ts b/account-kit/privy-integration/src/hooks/useAlchemyClient.ts deleted file mode 100644 index 3c06abf6c9..0000000000 --- a/account-kit/privy-integration/src/hooks/useAlchemyClient.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { useCallback } from "react"; -import { - WalletClientSigner, - ConnectionConfigSchema, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { createWalletClient, custom, type Address } from "viem"; -import { - createSmartWalletClient, - type SmartWalletClient, -} from "@account-kit/wallet-client"; -import { alchemy } from "@account-kit/infra"; -import { - useAlchemyConfig, - useClientCache, - useAdapter, -} from "../context/AlchemyContext.js"; -import { getChain } from "../util/getChain.js"; -import { useEmbeddedWallet } from "./internal/useEmbeddedWallet.js"; - -export type AlchemyClientResult = { - client: SmartWalletClient; - account: SmartContractAccount; -}; - -/** - * Hook to get and memoize a SmartWalletClient instance with its associated account - * The client and account are cached in the AlchemyProvider context (React tree scoped) - * Automatically clears cache on logout via the provider - * - * @returns {{ getClient: () => Promise }} Object containing the smart wallet client and account getter - * - * @example - * ```tsx - * const { getClient } = useAlchemyClient(); - * const { client, account } = await getClient(); - * ``` - */ -export function useAlchemyClient() { - const adapter = useAdapter(); - const config = useAlchemyConfig(); - const signAuthorizationFn = - adapter.useAuthorizationSigner?.(config.walletAddress) || null; - const cache = useClientCache(); - const getEmbeddedWallet = useEmbeddedWallet(); - - const getClient = useCallback(async (): Promise => { - const embeddedWallet = getEmbeddedWallet(); - - // IMPORTANT: Get provider FIRST to ensure chain ID is updated - // The provider fetch triggers chain ID update in the adapter - const provider = await embeddedWallet.getEthereumProvider(); - - // NOW get the chain from the SAME wallet instance with updated chain ID - // Handle CAIP-2 format like "eip155:1" - const chainIdStr = embeddedWallet.chainId?.toString(); - - if (!chainIdStr) { - throw new Error( - "Embedded wallet chainId is not set. Please ensure the wallet is connected to a network.", - ); - } - const numericChainId = chainIdStr.includes(":") - ? chainIdStr.split(":")[1] - : chainIdStr; - const parsedChainId = Number(numericChainId); - if (isNaN(parsedChainId)) { - throw new Error( - `Failed to parse chainId from embedded wallet. Received: ${chainIdStr}`, - ); - } - - const chain = getChain(parsedChainId); - - // Generate a cache key based on configuration and wallet address - // IMPORTANT: Include whether authorization signing is supported in cache key - const currentCacheKey = JSON.stringify({ - address: embeddedWallet.address, - chainId: chain.id, - apiKey: config.apiKey, - jwt: config.jwt, - rpcUrl: config.rpcUrl, - policyId: config.policyId, - accountAuthMode: config.accountAuthMode, - supportsSignAuthorization: !!signAuthorizationFn, - }); - - // Return cached client and account if configuration hasn't changed - if (cache.client && cache.account && cache.cacheKey === currentCacheKey) { - return { client: cache.client, account: cache.account }; - } - - // Create base signer from Privy wallet - const baseSigner = new WalletClientSigner( - createWalletClient({ - account: embeddedWallet.address as Address, - chain, - transport: custom(provider), - }), - "privy", - ); - - // Optionally extend signer with EIP-7702 authorization support - const signer = - config.accountAuthMode === "eip7702" && !!signAuthorizationFn - ? { - ...baseSigner, - signAuthorization: signAuthorizationFn, - } - : baseSigner; - - // Determine transport configuration using schema validation - // This properly handles combinations like rpcUrl + jwt together - const transportConfig = ConnectionConfigSchema.parse({ - rpcUrl: config.rpcUrl, - apiKey: config.apiKey, - jwt: config.jwt, - }); - - const transport = alchemy(transportConfig); - - transport.updateHeaders({ - "X-Alchemy-Client-Breadcrumb": "privyIntegrationSdk", - }); - - // Create and cache the smart wallet client in provider context - cache.client = createSmartWalletClient({ - chain, - transport, - signer, - policyIds: config.policyId - ? Array.isArray(config.policyId) - ? config.policyId - : [config.policyId] - : undefined, - }); - - // Request the account to properly initialize the smart wallet - // Pass a creation hint based on auth mode to ensure different accounts for different modes - // This prevents 7702 accounts from being reused in owner mode and vice versa - cache.account = - config.accountAuthMode === "eip7702" - ? await cache.client.requestAccount({ - creationHint: { accountType: "7702" }, - }) - : await cache.client.requestAccount({ - creationHint: { accountType: "sma-b" }, - }); - - // Store the cache key - cache.cacheKey = currentCacheKey; - - return { client: cache.client, account: cache.account }; - }, [ - getEmbeddedWallet, - signAuthorizationFn, - config.apiKey, - config.jwt, - config.rpcUrl, - config.policyId, - cache, - config.accountAuthMode, - ]); - - return { getClient }; -} diff --git a/account-kit/privy-integration/src/hooks/useAlchemyPrepareSwap.ts b/account-kit/privy-integration/src/hooks/useAlchemyPrepareSwap.ts deleted file mode 100644 index 2c2f109995..0000000000 --- a/account-kit/privy-integration/src/hooks/useAlchemyPrepareSwap.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { useCallback, useState } from "react"; -import { type Address } from "viem"; -import { swapActions } from "@account-kit/wallet-client/experimental"; -import { useAlchemyClient } from "./useAlchemyClient.js"; -import type { - PrepareSwapRequest, - PrepareSwapResult, - UsePrepareSwapResult, -} from "../types"; - -/** - * Hook to request swap quotes and prepare swap calls - * Part of the two-step swap process: prepare → submit - * Use with `useAlchemySubmitSwap()` to execute the prepared swap - * - * Supports two modes: - * 1. Specify exact amount to swap FROM (`fromAmount`) - * 2. Specify minimum amount to receive TO (`minimumToAmount`) - * - * @returns {UsePrepareSwapResult} Hook result with prepareSwap function and state - * - * @example Complete swap flow - * ```tsx - * const { prepareSwap } = useAlchemyPrepareSwap(); - * const { submitSwap } = useAlchemySubmitSwap(); - * - * // Step 1: Prepare the swap (get quote) - * const preparedSwap = await prepareSwap({ - * fromToken: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', - * toToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', - * fromAmount: '0xde0b6b3a7640000', // 1 ETH in hex - * }); - * - * // Step 2: Execute the swap - * const result = await submitSwap(preparedSwap); - * ``` - * - * @example Swap for minimum amount TO - * ```tsx - * const { prepareSwap } = useAlchemyPrepareSwap(); - * - * // Swap ETH to get at least 100 USDC - * const result = await prepareSwap({ - * fromToken: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', - * toToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', - * minimumToAmount: '0x5f5e100', // 100 USDC (6 decimals) in hex - * }); - * console.log('Quote expiry:', new Date(parseInt(result.quote.expiry, 16) * 1000)); - * ``` - */ -export function useAlchemyPrepareSwap(): UsePrepareSwapResult { - const { getClient } = useAlchemyClient(); - - const [isLoading, setIsLoading] = useState(false); - const [error, setError] = useState(null); - const [data, setData] = useState(null); - - const prepareSwap = useCallback( - async (request: PrepareSwapRequest): Promise => { - setIsLoading(true); - setError(null); - - try { - const { client, account } = await getClient(); - - // Extend client with swap actions - const swapClient = client.extend(swapActions); - - // Request the swap quote - // Note: Gas sponsorship capabilities are configured on the client itself - const response = await swapClient.requestQuoteV0({ - ...request, - from: request.from || (account.address as Address), - }); - - // Validate that we got prepared calls, not raw calls - if (response.rawCalls) { - throw new Error( - "Received raw calls instead of prepared calls. Ensure returnRawCalls is not set to true.", - ); - } - - setData(response); - return response; - } catch (err) { - const errorObj = - err instanceof Error ? err : new Error("Failed to prepare swap"); - setError(errorObj); - throw errorObj; - } finally { - setIsLoading(false); - } - }, - [getClient], - ); - - const reset = useCallback(() => { - setError(null); - setData(null); - setIsLoading(false); - }, []); - - return { - prepareSwap, - isLoading, - error, - data, - reset, - }; -} diff --git a/account-kit/privy-integration/src/hooks/useAlchemySendTransaction.ts b/account-kit/privy-integration/src/hooks/useAlchemySendTransaction.ts deleted file mode 100644 index 0494dd4a29..0000000000 --- a/account-kit/privy-integration/src/hooks/useAlchemySendTransaction.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { useCallback, useState } from "react"; -import { type Hex, isHex } from "viem"; -import { useAlchemyClient } from "./useAlchemyClient.js"; -import { useAlchemyConfig } from "../context/AlchemyContext.js"; -import type { - UnsignedTransactionRequest, - SendTransactionOptions, - SendTransactionResult, - UseSendTransactionResult, -} from "../types"; - -/** - * Normalize value to hex format - * Accepts bigint, number, decimal string, or hex string - * - * @param {string | number | bigint} value - Value to normalize - * @returns {Hex} Hex string representation of the value - */ -function normalizeValue(value: string | number | bigint): Hex { - if (typeof value === "bigint") { - return `0x${value.toString(16)}`; - } - if (typeof value === "number") { - return `0x${BigInt(value).toString(16)}`; - } - if (isHex(value)) { - return value; - } - // Assume decimal string - return `0x${BigInt(value).toString(16)}`; -} - -/** - * Hook to send transactions with optional gas sponsorship via Alchemy - * Supports both single transactions and batch transactions - * Drop-in alternative to Privy's useSendTransaction hook - * - * @returns {UseSendTransactionResult} Hook result with sendTransaction function and state - * - * @example Single transaction - * ```tsx - * const { sendTransaction, isLoading, error, data } = useAlchemySendTransaction(); - * - * const handleSend = async () => { - * try { - * const result = await sendTransaction({ - * to: '0x...', - * data: '0x...', - * value: '1000000000000000000', // 1 ETH - * }); - * console.log('Transaction hash:', result.txnHash); - * } catch (err) { - * console.error('Transaction failed:', err); - * } - * }; - * ``` - * - * @example Batch transactions - * ```tsx - * const { sendTransaction } = useAlchemySendTransaction(); - * - * const result = await sendTransaction([ - * { to: '0x...', data: '0x...', value: '1000000000000000000' }, - * { to: '0x...', data: '0x...' }, - * ]); - * ``` - */ -export function useAlchemySendTransaction(): UseSendTransactionResult { - const { getClient } = useAlchemyClient(); - const config = useAlchemyConfig(); - - const [isLoading, setIsLoading] = useState(false); - const [error, setError] = useState(null); - const [data, setData] = useState(null); - - const sendTransaction = useCallback( - async ( - input: UnsignedTransactionRequest | UnsignedTransactionRequest[], - options?: SendTransactionOptions, - ): Promise => { - setIsLoading(true); - setError(null); - - try { - const { client, account } = await getClient(); - - // Determine if transaction should be sponsored - const hasPolicyId = !!config.policyId; - const enableSponsorship = !config.disableSponsorship; - const shouldSponsor = - options?.disableSponsorship !== undefined - ? !options.disableSponsorship - : hasPolicyId && enableSponsorship; - - // Format the transaction call(s) - const inputs = Array.isArray(input) ? input : [input]; - const formattedCalls = inputs.map((txn) => ({ - to: txn.to, - data: txn.data, - value: txn.value ? normalizeValue(txn.value) : undefined, - })); - - // Build capabilities based on sponsorship and auth mode - const policyId = Array.isArray(config.policyId) - ? config.policyId[0] - : config.policyId; - - type Capabilities = - | { eip7702Auth: true; paymasterService?: { policyId: string } } - | { paymasterService?: { policyId: string } }; - const capabilities: Capabilities = - config.accountAuthMode === "eip7702" ? { eip7702Auth: true } : {}; - - if (shouldSponsor && policyId) { - capabilities.paymasterService = { policyId }; - } - - // Send the transaction(s) from the smart account address - const result = await client.sendCalls({ - from: account.address, - calls: formattedCalls, - capabilities, - }); - - if (!result.id) { - throw new Error("No call ID returned from transaction submission"); - } - - // Wait for the transaction to be confirmed - const txStatus = await client.waitForCallsStatus({ - id: result.id, - timeout: 60_000, - }); - - const txnHash = txStatus.receipts?.[0]?.transactionHash; - if (!txnHash) { - throw new Error("Transaction hash not found in receipt"); - } - - const txResult: SendTransactionResult = { txnHash }; - setData(txResult); - return txResult; - } catch (err) { - const errorObj = - err instanceof Error ? err : new Error("Transaction failed"); - setError(errorObj); - throw errorObj; - } finally { - setIsLoading(false); - } - }, - [ - getClient, - config.policyId, - config.disableSponsorship, - config.accountAuthMode, - ], - ); - - const reset = useCallback(() => { - setError(null); - setData(null); - setIsLoading(false); - }, []); - - return { - sendTransaction, - isLoading, - error, - data, - reset, - }; -} diff --git a/account-kit/privy-integration/src/hooks/useAlchemySolanaTransaction.ts b/account-kit/privy-integration/src/hooks/useAlchemySolanaTransaction.ts deleted file mode 100644 index eae494e1d7..0000000000 --- a/account-kit/privy-integration/src/hooks/useAlchemySolanaTransaction.ts +++ /dev/null @@ -1,402 +0,0 @@ -import { useCallback, useMemo, useState } from "react"; -import { - Connection, - PublicKey, - SystemProgram, - Transaction, - TransactionInstruction, - VersionedTransaction, -} from "@solana/web3.js"; -import { useAlchemyConfig } from "../context/AlchemyContext.js"; -import { createSolanaSponsoredTransaction } from "../util/createSolanaSponsoredTransaction.js"; -import { useSignTransaction, useWallets } from "@privy-io/react-auth/solana"; -import { createSolanaTransaction } from "../util/createSolanaTransaction.js"; - -/** - * Type helper for values that can be synchronous or asynchronous - * - * @template T - The value type - */ -export type PromiseOrValue = T | Promise; - -/** - * Callback to modify a transaction before it's signed - * Useful for adding additional signatures or metadata - * - * @param transaction - The unsigned transaction to modify - * @returns The modified transaction - */ -export type PreSend = ( - this: void, - transaction: VersionedTransaction | Transaction, -) => PromiseOrValue; - -/** - * Callback to transform instructions into a custom transaction - * Useful for advanced transaction construction (e.g., multi-sig, custom versioning) - * - * @param instructions - Array of Solana transaction instructions - * @returns Constructed transaction (legacy or versioned) - */ -export type TransformInstruction = ( - this: void, - instructions: TransactionInstruction[], -) => PromiseOrValue; - -/** - * Optional transaction lifecycle hooks for advanced use cases - */ -export type SolanaTransactionParamOptions = { - /** Hook called before signing the transaction */ - preSend?: PreSend; - /** Custom transaction builder from instructions */ - transformInstruction?: TransformInstruction; -}; - -/** - * Parameters for sending a Solana transaction - * Supports either a simple transfer or custom instructions - */ -export type SolanaTransactionParams = - | { - /** Simple SOL transfer parameters */ - transfer: { - /** Amount in lamports (accepts number or bigint) */ - amount: number | bigint; - /** Recipient's base58-encoded address */ - toAddress: string; - }; - /** Optional transaction lifecycle hooks */ - transactionComponents?: SolanaTransactionParamOptions; - /** Options for confirming the transaction on-chain */ - confirmationOptions?: Parameters[1]; - } - | { - /** Custom Solana transaction instructions */ - instructions: TransactionInstruction[]; - /** Optional transaction lifecycle hooks */ - transactionComponents?: SolanaTransactionParamOptions; - /** Options for confirming the transaction on-chain */ - confirmationOptions?: Parameters[1]; - }; - -/** - * Result of a successful Solana transaction - */ -export interface SolanaTransactionResult { - /** Base58-encoded transaction signature (hash) */ - hash: string; -} - -/** - * Configuration options for useAlchemySolanaTransaction hook - */ -export interface UseAlchemySolanaTransactionOptions { - /** Solana RPC URL (overrides provider config) */ - rpcUrl?: string; - /** Gas sponsorship policy ID (overrides provider config) */ - policyId?: string | void; - /** Transaction confirmation options */ - confirmationOptions?: Parameters[1]; - /** Specific wallet address to use (defaults to first available wallet) */ - walletAddress?: string; -} - -/** - * Return type of useAlchemySolanaTransaction hook - */ -export interface UseAlchemySolanaTransactionResult { - /** Active Solana connection instance */ - readonly connection: Connection | null; - /** Transaction result if successful */ - readonly data: void | SolanaTransactionResult; - /** Whether a transaction is currently being sent */ - readonly isPending: boolean; - /** Error if transaction failed */ - readonly error: Error | null; - /** Reset hook state (clears error, data, isPending) */ - reset(): void; - /** Send transaction (fire-and-forget, errors caught internally) */ - sendTransaction(params: SolanaTransactionParams): void; - /** Send transaction and await result (throws on error) */ - sendTransactionAsync( - params: SolanaTransactionParams, - ): Promise; -} - -/** - * Hook to send Solana transactions with optional gas sponsorship via Alchemy - * Works with Privy's Solana wallet integration for signing transactions - * Supports both simple transfers and custom instruction sets - * - * @param {UseAlchemySolanaTransactionOptions} [opts] - Configuration options - * @param {string} [opts.rpcUrl] - Solana RPC URL (overrides provider config) - * @param {string} [opts.policyId] - Gas sponsorship policy ID (overrides provider config) - * @param {string} [opts.walletAddress] - Specific wallet address to use (defaults to first wallet) - * @param {Parameters[1]} [opts.confirmationOptions] - Transaction confirmation options - * @returns {UseAlchemySolanaTransactionResult} Hook result with transaction functions and state - * - * @example Simple SOL transfer - * ```tsx - * const { sendTransactionAsync, isPending, error, data } = useAlchemySolanaTransaction({ - * rpcUrl: 'https://solana-mainnet.g.alchemy.com/v2/your-api-key', - * policyId: 'your-policy-id', // Optional: for gas sponsorship - * }); - * - * const handleTransfer = async () => { - * try { - * const result = await sendTransactionAsync({ - * transfer: { - * amount: 1_000_000_000, // 1 SOL in lamports - * toAddress: 'recipient-address', - * }, - * }); - * console.log('Transaction hash:', result.hash); - * } catch (err) { - * console.error('Transaction failed:', err); - * } - * }; - * ``` - * - * @example Custom instructions - * ```tsx - * import { SystemProgram, PublicKey } from '@solana/web3.js'; - * - * const { sendTransactionAsync } = useAlchemySolanaTransaction(); - * - * // Build your custom instructions - * const transferIx = SystemProgram.transfer({ - * fromPubkey: new PublicKey(walletAddress), - * toPubkey: new PublicKey(recipientAddress), - * lamports: 1_000_000, - * }); - * - * // Pass instructions array to the hook - * const result = await sendTransactionAsync({ - * instructions: [transferIx], - * }); - * ``` - * - * @example With provider configuration - * ```tsx - * // In your provider setup - * - * - * - * - * // In your component - uses provider config automatically - * const { sendTransactionAsync } = useAlchemySolanaTransaction(); - * ``` - */ -export function useAlchemySolanaTransaction( - opts: UseAlchemySolanaTransactionOptions = {}, -): UseAlchemySolanaTransactionResult { - const config = useAlchemyConfig(); - const { wallets } = useWallets(); - const { signTransaction } = useSignTransaction(); - - // Resolve the Privy Solana wallet to use - const embeddedWallet = useMemo(() => { - if (opts.walletAddress) { - const w = wallets.find((w) => w.address === opts.walletAddress); - if (!w) throw new Error("Specified Solana wallet not found"); - return w; - } - return wallets[0]; - }, [wallets, opts.walletAddress]); - - // Build Solana connection from rpcUrl (hook override or provider default) - const connection = useMemo(() => { - const url = opts.rpcUrl || config.solanaRpcUrl; - return url ? new Connection(url) : null; - }, [opts.rpcUrl, config.solanaRpcUrl]); - - const [isPending, setIsPending] = useState(false); - const [error, setError] = useState(null); - const [data, setData] = useState(undefined); - - const resolvedPolicyId = useMemo(() => { - if (opts.policyId != null) return opts.policyId || undefined; - // Use solanaPolicyId from config, fallback to policyId for backwards compat - const configPolicy = config.solanaPolicyId || config.policyId; - return Array.isArray(configPolicy) ? configPolicy[0] : configPolicy; - }, [opts.policyId, config.solanaPolicyId, config.policyId]); - - const mapTransformInstructions = useMemo(() => { - const addSponsorship: TransformInstruction = async (instructions) => { - const policyId = resolvedPolicyId; - if (!policyId) - throw new Error( - "Gas sponsorship requires a policyId (see provider or hook options).", - ); - const localConnection = connection || missing("connection"); - const fromAddress = embeddedWallet?.address; - if (!fromAddress) throw new Error("No embedded Solana wallet connected"); - return createSolanaSponsoredTransaction( - instructions, - localConnection, - policyId, - fromAddress, - ); - }; - const createTx: TransformInstruction = async (instructions) => { - const localConnection = connection || missing("connection"); - const fromAddress = embeddedWallet?.address; - if (!fromAddress) throw new Error("No embedded Solana wallet connected"); - return createSolanaTransaction( - instructions, - localConnection, - fromAddress, - ); - }; - const defaultTransform = - !!resolvedPolicyId && !config.disableSponsorship - ? addSponsorship - : createTx; - return { - addSponsorship, - createTransaction: createTx, - default: defaultTransform, - } as const; - }, [ - resolvedPolicyId, - config.disableSponsorship, - connection, - embeddedWallet?.address, - ]); - - const buildInstructions = useCallback( - ( - params: SolanaTransactionParams, - fromAddress: string, - ): TransactionInstruction[] => { - if ("instructions" in params) return params.instructions; - return [ - SystemProgram.transfer({ - fromPubkey: new PublicKey(fromAddress), - toPubkey: new PublicKey(params.transfer.toAddress), - lamports: - typeof params.transfer.amount === "bigint" - ? Number(params.transfer.amount) // web3.js currently expects number; callers can pass bigint safely - : params.transfer.amount, - }), - ]; - }, - [], - ); - - function toUnsignedBytes(tx: VersionedTransaction | Transaction): Uint8Array { - // Serialize the full transaction structure (with placeholder signatures) - // Privy expects the complete transaction format, not just the message - if (tx instanceof VersionedTransaction) { - // VersionedTransaction.serialize() includes signature slots - return tx.serialize(); - } - // Legacy Transaction: serialize without requiring all signatures - const buf = tx.serialize({ - requireAllSignatures: false, - verifySignatures: false, - }); - return buf instanceof Uint8Array ? buf : new Uint8Array(buf); - } - - const sendTransactionAsync = useCallback( - async ( - params: SolanaTransactionParams, - ): Promise => { - setIsPending(true); - setError(null); - try { - const localConnection = connection || missing("connection"); - if (!embeddedWallet?.address) { - throw new Error("No Solana wallet connected via Privy"); - } - - const fromAddress = embeddedWallet.address; - const { - transactionComponents: { preSend, transformInstruction } = {}, - confirmationOptions, - } = params; - - const instructions = buildInstructions(params, fromAddress); - - let transaction: VersionedTransaction | Transaction; - if (transformInstruction) { - transaction = await transformInstruction(instructions); - } else { - transaction = await mapTransformInstructions.default(instructions); - } - - transaction = (await preSend?.(transaction)) || transaction; - - // Sign the transaction using Privy's useSignTransaction hook - const unsignedBytes = toUnsignedBytes(transaction); - const { signedTransaction } = await signTransaction({ - transaction: unsignedBytes, - wallet: embeddedWallet, - }); - - // Broadcast the signed transaction - const hash = await localConnection.sendRawTransaction( - signedTransaction, - { skipPreflight: false }, - ); - - if (confirmationOptions || opts.confirmationOptions) { - await localConnection.confirmTransaction( - hash, - confirmationOptions || opts.confirmationOptions, - ); - } - - setData({ hash }); - return { hash }; - } catch (err) { - const e = err instanceof Error ? err : new Error(String(err)); - setError(e); - throw e; - } finally { - setIsPending(false); - } - }, - [ - embeddedWallet, - connection, - buildInstructions, - mapTransformInstructions, - opts.confirmationOptions, - signTransaction, - ], - ); - - const sendTransaction = useCallback( - (params: SolanaTransactionParams) => { - // Prevent unhandled rejection warnings; error state is already set in sendTransactionAsync - sendTransactionAsync(params).catch(() => {}); - }, - [sendTransactionAsync], - ); - - const reset = useCallback(() => { - setIsPending(false); - setError(null); - setData(undefined); - }, []); - - return { - connection, - data, - isPending, - error, - reset, - sendTransaction, - sendTransactionAsync, - }; -} - -function missing(message: string): never { - throw new Error(message); -} diff --git a/account-kit/privy-integration/src/hooks/useAlchemySubmitSwap.ts b/account-kit/privy-integration/src/hooks/useAlchemySubmitSwap.ts deleted file mode 100644 index 282a081cce..0000000000 --- a/account-kit/privy-integration/src/hooks/useAlchemySubmitSwap.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { useCallback, useState } from "react"; -import { swapActions } from "@account-kit/wallet-client/experimental"; -import { useAlchemyClient } from "./useAlchemyClient.js"; -import type { - PrepareSwapResult, - SubmitSwapResult, - UseSubmitSwapResult, -} from "../types.js"; - -/** - * Hook to sign and submit prepared swap calls - * Part of the two-step swap process: prepare → submit - * - * @returns {UseSubmitSwapResult} Hook result with submitSwap function and state - * - * @example - * ```tsx - * const { prepareSwap } = useAlchemyPrepareSwap(); - * const { submitSwap, isLoading, error, data } = useAlchemySubmitSwap(); - * - * const handleSwap = async () => { - * try { - * // Step 1: Prepare the swap - * const preparedSwap = await prepareSwap({ - * fromToken: '0x...', - * toToken: '0x...', - * fromAmount: '0x...', - * }); - * - * // Step 2: Submit the swap - * const result = await submitSwap(preparedSwap); - * console.log('Swap confirmed:', result.txnHash); - * } catch (err) { - * console.error('Swap failed:', err); - * } - * }; - * ``` - */ -export function useAlchemySubmitSwap(): UseSubmitSwapResult { - const { getClient } = useAlchemyClient(); - - const [isLoading, setIsLoading] = useState(false); - const [error, setError] = useState(null); - const [data, setData] = useState(null); - - const submitSwap = useCallback( - async (preparedSwap: PrepareSwapResult): Promise => { - setIsLoading(true); - setError(null); - - try { - const { client } = await getClient(); - - // Extend client with swap actions - const swapClient = client.extend(swapActions); - - // Sign the prepared calls - const signedCalls = await swapClient.signPreparedCalls(preparedSwap); - - // Send the signed calls - const { id } = await swapClient.sendPreparedCalls(signedCalls); - - if (!id) { - throw new Error("No call ID returned from swap submission"); - } - - // Wait for the swap to be confirmed - const callStatusResult = await swapClient.waitForCallsStatus({ - id, - timeout: 60_000, - }); - - // Validate the transaction was successful - if ( - callStatusResult.status !== "success" || - !callStatusResult.receipts || - !callStatusResult.receipts[0] - ) { - throw new Error( - `Swap failed with status ${ - callStatusResult.status - }. Full receipt:\n${JSON.stringify(callStatusResult, null, 2)}`, - ); - } - - const txnHash = callStatusResult.receipts[0].transactionHash; - if (!txnHash) { - throw new Error("Transaction hash not found in receipt"); - } - - const result: SubmitSwapResult = { txnHash }; - setData(result); - return result; - } catch (err) { - const errorObj = - err instanceof Error ? err : new Error("Failed to submit swap"); - setError(errorObj); - throw errorObj; - } finally { - setIsLoading(false); - } - }, - [getClient], - ); - - const reset = useCallback(() => { - setError(null); - setData(null); - setIsLoading(false); - }, []); - - return { - submitSwap, - isLoading, - error, - data, - reset, - }; -} diff --git a/account-kit/privy-integration/src/index.ts b/account-kit/privy-integration/src/index.ts deleted file mode 100644 index bf5e6b3c68..0000000000 --- a/account-kit/privy-integration/src/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Provider -export { AlchemyProvider, useAlchemyConfig } from "./Provider.js"; - -// Hooks -export { useAlchemyClient } from "./hooks/useAlchemyClient.js"; -export { useAlchemySendTransaction } from "./hooks/useAlchemySendTransaction.js"; -export { useAlchemyPrepareSwap } from "./hooks/useAlchemyPrepareSwap.js"; -export { useAlchemySubmitSwap } from "./hooks/useAlchemySubmitSwap.js"; - -// Types -export type { - AlchemyProviderConfig, - UnsignedTransactionRequest, - SendTransactionOptions, - SendTransactionResult, - UseSendTransactionResult, - PrepareSwapRequest, - PrepareSwapResult, - UsePrepareSwapResult, - SubmitSwapResult, - UseSubmitSwapResult, - SwapQuote, -} from "./types.js"; diff --git a/account-kit/privy-integration/src/providers/ReactNativeProvider.tsx b/account-kit/privy-integration/src/providers/ReactNativeProvider.tsx deleted file mode 100644 index f1a01233bd..0000000000 --- a/account-kit/privy-integration/src/providers/ReactNativeProvider.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import type { PropsWithChildren } from "react"; -import { AlchemyContextProvider } from "../context/AlchemyContext.js"; -import { reactNativeAdapter } from "../adapters/react-native.js"; -import type { AlchemyProviderConfig } from "../types.js"; - -/** - * Provider component for React Native (Expo) applications - * Must be nested INSIDE PrivyProvider from @privy-io/expo - * - * @param {PropsWithChildren} props - Component props - * @param {React.ReactNode} props.children - React children to wrap with Alchemy configuration - * @param {string} [props.apiKey] - Your Alchemy API key - * @param {string} [props.jwt] - JWT token for authentication - * @param {string} [props.rpcUrl] - Custom RPC URL for EVM chains - * @param {string} [props.solanaRpcUrl] - Custom RPC URL for Solana - * @param {string | string[]} [props.policyId] - Gas Manager policy ID(s) for EVM chains - * @param {string | string[]} [props.solanaPolicyId] - Gas Manager policy ID(s) for Solana - * @param {boolean} [props.disableSponsorship] - Set to true to disable sponsorship by default (default: false) - * @param {'eip7702' | 'owner'} [props.accountAuthMode] - Authorization mode for EVM smart accounts (default: 'eip7702') - * @param {string} [props.walletAddress] - Optional: Specify which wallet address to use (defaults to first wallet in array) - * @returns {JSX.Element} Provider component - * - * @example - * ```tsx - * import { PrivyProvider } from '@privy-io/expo'; - * import { AlchemyProvider } from '@account-kit/privy-integration/react-native'; - * - * - * - * - * - * - * ``` - */ -export function AlchemyProvider({ - children, - ...config -}: PropsWithChildren) { - return ( - - {children} - - ); -} diff --git a/account-kit/privy-integration/src/providers/WebProvider.native.tsx b/account-kit/privy-integration/src/providers/WebProvider.native.tsx deleted file mode 100644 index cafa0b08ff..0000000000 --- a/account-kit/privy-integration/src/providers/WebProvider.native.tsx +++ /dev/null @@ -1,11 +0,0 @@ -/** - * React Native stub for WebProvider - * This file prevents Metro from importing web-specific code - */ - -export function AlchemyProvider() { - throw new Error( - "This module requires @privy-io/react-auth which is not available in React Native. " + - 'Import from "@account-kit/privy-integration/react-native" instead.', - ); -} diff --git a/account-kit/privy-integration/src/providers/WebProvider.tsx b/account-kit/privy-integration/src/providers/WebProvider.tsx deleted file mode 100644 index ae72acac45..0000000000 --- a/account-kit/privy-integration/src/providers/WebProvider.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import type { PropsWithChildren } from "react"; -import { AlchemyContextProvider } from "../context/AlchemyContext.js"; -import { webAdapter } from "../adapters/web.js"; -import type { AlchemyProviderConfig } from "../types.js"; - -/** - * Provider component for React web applications - * Must be nested INSIDE PrivyProvider from @privy-io/react-auth - * - * @param {PropsWithChildren} props - Component props - * @param {React.ReactNode} props.children - React children to wrap with Alchemy configuration - * @param {string} [props.apiKey] - Your Alchemy API key - * @param {string} [props.jwt] - JWT token for authentication - * @param {string} [props.rpcUrl] - Custom RPC URL for EVM chains - * @param {string} [props.solanaRpcUrl] - Custom RPC URL for Solana - * @param {string | string[]} [props.policyId] - Gas Manager policy ID(s) for EVM chains - * @param {string | string[]} [props.solanaPolicyId] - Gas Manager policy ID(s) for Solana - * @param {boolean} [props.disableSponsorship] - Set to true to disable sponsorship by default (default: false) - * @param {'eip7702' | 'owner'} [props.accountAuthMode] - Authorization mode for EVM smart accounts (default: 'eip7702') - * @param {string} [props.walletAddress] - Optional: Specify which wallet address to use (defaults to first embedded wallet) - * @returns {JSX.Element} Provider component - * - * @example - * ```tsx - * import { PrivyProvider } from '@privy-io/react-auth'; - * import { AlchemyProvider } from '@account-kit/privy-integration'; - * - * - * - * - * - * - * ``` - */ -export function AlchemyProvider({ - children, - ...config -}: PropsWithChildren) { - return ( - - {children} - - ); -} diff --git a/account-kit/privy-integration/src/react-native.ts b/account-kit/privy-integration/src/react-native.ts deleted file mode 100644 index 63eaa316fd..0000000000 --- a/account-kit/privy-integration/src/react-native.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * React Native (Expo) entry point - * Import from '@account-kit/privy-integration/react-native' in Expo apps - */ - -// Provider -export { AlchemyProvider } from "./providers/ReactNativeProvider.js"; -export { useAlchemyConfig } from "./context/AlchemyContext.js"; - -// Hooks -export { useAlchemyClient } from "./hooks/useAlchemyClient.js"; -export { useAlchemySendTransaction } from "./hooks/useAlchemySendTransaction.js"; -export { useAlchemyPrepareSwap } from "./hooks/useAlchemyPrepareSwap.js"; -export { useAlchemySubmitSwap } from "./hooks/useAlchemySubmitSwap.js"; - -// Types -export type { - AlchemyProviderConfig, - UnsignedTransactionRequest, - SendTransactionOptions, - SendTransactionResult, - UseSendTransactionResult, - PrepareSwapRequest, - PrepareSwapResult, - UsePrepareSwapResult, - SubmitSwapResult, - UseSubmitSwapResult, - SwapQuote, -} from "./types.js"; diff --git a/account-kit/privy-integration/src/solana.ts b/account-kit/privy-integration/src/solana.ts deleted file mode 100644 index d1c3eefc41..0000000000 --- a/account-kit/privy-integration/src/solana.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Solana-specific exports -// Import from '@account-kit/privy-integration/solana' to use Solana functionality -// This ensures @solana/web3.js is only loaded when explicitly needed - -export { useAlchemySolanaTransaction } from "./hooks/useAlchemySolanaTransaction.js"; - -export type { - PromiseOrValue, - PreSend, - TransformInstruction, - SolanaTransactionParamOptions, - SolanaTransactionParams, - SolanaTransactionResult, - UseAlchemySolanaTransactionOptions, - UseAlchemySolanaTransactionResult, -} from "./hooks/useAlchemySolanaTransaction.js"; diff --git a/account-kit/privy-integration/src/types.ts b/account-kit/privy-integration/src/types.ts deleted file mode 100644 index eb55e6a5de..0000000000 --- a/account-kit/privy-integration/src/types.ts +++ /dev/null @@ -1,179 +0,0 @@ -import type { Address, Hash, Hex } from "viem"; -import type { swapActions } from "@account-kit/wallet-client/experimental"; -import { ConnectionConfigSchema } from "@aa-sdk/core"; -import type { z } from "zod"; - -/** - * Configuration for the Alchemy provider - * Uses ConnectionConfigSchema to ensure valid transport configuration - */ -export type AlchemyProviderConfig = z.infer & { - /** Policy ID(s) for EVM gas sponsorship */ - policyId?: string | string[]; - - /** Policy ID(s) for Solana gas sponsorship */ - solanaPolicyId?: string | string[]; - - /** Solana RPC URL (separate from EVM rpcUrl) */ - solanaRpcUrl?: string; - - /** - * How EVM smart account calls should be authorized. - * - 'eip7702' (default): delegated authorization via EIP-7702. - * - 'owner': sign as the account owner (Privy embedded wallet), no 7702. - */ - accountAuthMode?: "eip7702" | "owner"; - - /** - * Set to true to disable gas sponsorship by default - * Default: false (sponsorship enabled when policyId is provided) - */ - disableSponsorship?: boolean; - - /** - * Optional: Specify which wallet address to use - * - If provided, will use the wallet matching this address - * - If not provided, defaults to the first embedded wallet (web) or first wallet in array (React Native) - */ - walletAddress?: string; -}; - -/** - * Unsigned transaction request - */ -export interface UnsignedTransactionRequest { - /** Recipient address */ - to: Address; - - /** Transaction data (calldata) */ - data?: Hex; - - /** Transaction value - accepts string | number | bigint */ - value?: string | number | bigint; -} - -/** - * Options for sending a transaction - */ -export interface SendTransactionOptions { - /** - * Set to true to disable sponsorship for this specific transaction - * Default: false (follows provider's disableSponsorship setting) - */ - disableSponsorship?: boolean; -} - -/** - * Result of a successful transaction - */ -export interface SendTransactionResult { - /** EVM transaction hash (first receipt hash) */ - txnHash: Hash; -} - -/** - * Hook result for sending transactions - */ -export interface UseSendTransactionResult { - /** Whether the transaction is currently being sent */ - isLoading: boolean; - - /** Error if transaction failed */ - error: Error | null; - - /** Transaction result if successful */ - data: SendTransactionResult | null; - - /** Reset the hook state */ - reset(): void; - - /** Send a single transaction or batch of transactions */ - sendTransaction( - input: UnsignedTransactionRequest | UnsignedTransactionRequest[], - options?: SendTransactionOptions, - ): Promise; -} - -/** - * Request parameters for preparing a swap - * Derived directly from the SDK to ensure type safety - * - * Note: Provide either `fromAmount` OR `minimumToAmount`, not both. - * - Use `fromAmount` to specify exact amount to swap FROM - * - Use `minimumToAmount` to specify minimum amount to receive TO - */ -export type PrepareSwapRequest = Parameters< - ReturnType["requestQuoteV0"] ->[0]; - -/** - * Response from requestQuoteV0 - * Derived directly from the SDK to ensure type safety - */ -export type RequestQuoteV0Result = Awaited< - ReturnType["requestQuoteV0"]> ->; - -/** - * Swap quote information extracted from prepared swap calls - * Derived directly from the SDK response - */ -export type SwapQuote = NonNullable; - -/** - * Result of preparing a swap (full response from requestQuoteV0) - * Contains quote and prepared calls ready for signing - */ -export type PrepareSwapResult = Extract< - RequestQuoteV0Result, - { rawCalls?: false | undefined } ->; - -/** - * Hook result for preparing swaps - */ -export interface UsePrepareSwapResult { - /** Whether the swap is being prepared */ - isLoading: boolean; - - /** Error if preparation failed */ - error: Error | null; - - /** Prepared swap data if successful */ - data: PrepareSwapResult | null; - - /** Reset the hook state */ - reset(): void; - - /** Request a swap quote and prepare calls */ - prepareSwap(request: PrepareSwapRequest): Promise; -} - -/** - * Result of submitting a swap - * Simplified wrapper that extracts the transaction hash - */ -export interface SubmitSwapResult { - /** Transaction hash of the swap */ - txnHash: Hash; -} - -/** - * Hook result for submitting swaps - */ -export interface UseSubmitSwapResult { - /** Whether the swap is being submitted */ - isLoading: boolean; - - /** Error if submission failed */ - error: Error | null; - - /** Swap submission result if successful */ - data: SubmitSwapResult | null; - - /** Reset the hook state */ - reset(): void; - - /** Sign and submit prepared swap calls */ - submitSwap(preparedSwap: PrepareSwapResult): Promise; -} diff --git a/account-kit/privy-integration/src/util/createSolanaSponsoredTransaction.ts b/account-kit/privy-integration/src/util/createSolanaSponsoredTransaction.ts deleted file mode 100644 index b03449b950..0000000000 --- a/account-kit/privy-integration/src/util/createSolanaSponsoredTransaction.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { TransactionInstruction } from "@solana/web3.js"; -import { - Connection, - PublicKey, - TransactionMessage, - VersionedTransaction, -} from "@solana/web3.js"; - -/** - * This function wraps instructions in a sponsored transaction using Alchemy's fee payer service - * - * @param {TransactionInstruction[]} instructions - The instructions to add sponsorship to - * @param {Connection} connection - The connection to use - * @param {string} policyId - The policy id to use - * @param {string} address - The address to use - * @returns {Promise} - The sponsored transaction - */ -export async function createSolanaSponsoredTransaction( - instructions: TransactionInstruction[], - connection: Connection, - policyId: string, - address: string, -): Promise { - const { blockhash } = await connection.getLatestBlockhash({ - commitment: "finalized", - }); - const message = new TransactionMessage({ - // Right now the backend will rewrite this payer Key to the server's address - payerKey: new PublicKey(address), - recentBlockhash: blockhash, - instructions, - }).compileToV0Message(); - const versionedTransaction = new VersionedTransaction(message); - const serializedTransaction = Buffer.from( - versionedTransaction.serialize(), - ).toString("base64"); - const body = JSON.stringify({ - id: - crypto?.randomUUID() ?? - `${Date.now()}-${Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)}`, - jsonrpc: "2.0", - method: "alchemy_requestFeePayer", - params: [ - { - policyId, - serializedTransaction, - }, - ], - }); - const options = { - method: "POST", - headers: { - accept: "application/json", - "content-type": "application/json", - "X-Alchemy-Client-Breadcrumb": "privyIntegrationSdk", - }, - body, - }; - - const response = await fetch(connection.rpcEndpoint, options); - const jsonResponse = await response.json(); - if (!jsonResponse?.result?.serializedTransaction) - throw new Error( - `Response doesn't include the serializedTransaction ${JSON.stringify( - jsonResponse, - )}`, - ); - return VersionedTransaction.deserialize( - decodeBase64(jsonResponse.result.serializedTransaction), - ); -} - -function decodeBase64(serializedTransaction: string): Uint8Array { - return Buffer.from(serializedTransaction, "base64"); -} diff --git a/account-kit/privy-integration/src/util/createSolanaTransaction.ts b/account-kit/privy-integration/src/util/createSolanaTransaction.ts deleted file mode 100644 index d09bb1cd18..0000000000 --- a/account-kit/privy-integration/src/util/createSolanaTransaction.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { TransactionInstruction } from "@solana/web3.js"; -import { - Connection, - PublicKey, - TransactionMessage, - VersionedTransaction, -} from "@solana/web3.js"; - -/** - * Creates a regular (non-sponsored) Solana transaction from instructions - * - * @param {TransactionInstruction[]} instructions - The instructions to create transaction from - * @param {Connection} connection - The connection to use - * @param {string} address - The payer address - * @returns {Promise} - The transaction - */ -export async function createSolanaTransaction( - instructions: TransactionInstruction[], - connection: Connection, - address: string, -): Promise { - const { blockhash } = await connection.getLatestBlockhash({ - commitment: "finalized", - }); - const message = new TransactionMessage({ - payerKey: new PublicKey(address), - recentBlockhash: blockhash, - instructions, - }).compileToV0Message(); - return new VersionedTransaction(message); -} diff --git a/account-kit/privy-integration/src/util/getChain.ts b/account-kit/privy-integration/src/util/getChain.ts deleted file mode 100644 index 6cde26f9a2..0000000000 --- a/account-kit/privy-integration/src/util/getChain.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { - arbitrum, - arbitrumGoerli, - arbitrumNova, - arbitrumSepolia, - base, - baseGoerli, - baseSepolia, - fraxtal, - fraxtalSepolia, - goerli, - mainnet, - optimism, - optimismGoerli, - optimismSepolia, - polygon, - polygonAmoy, - polygonMumbai, - sepolia, - shape, - shapeSepolia, - worldChain, - worldChainSepolia, - zora, - zoraSepolia, - beraChainBartio, - opbnbMainnet, - opbnbTestnet, - soneiumMinato, - soneiumMainnet, - unichainMainnet, - unichainSepolia, - inkMainnet, - inkSepolia, - mekong, - monadTestnet, - openlootSepolia, - gensynTestnet, - riseTestnet, - storyMainnet, - storyAeneid, - celoMainnet, - teaSepolia, - bobaSepolia, - bobaMainnet, - hyperliquid, - hyperliquidEvmTestnet, -} from "@account-kit/infra"; - -export function getChain(chainId: number) { - switch (chainId) { - case sepolia.id: - return sepolia; - case mainnet.id: - return mainnet; - case arbitrum.id: - return arbitrum; - case arbitrumGoerli.id: - return arbitrumGoerli; - case arbitrumNova.id: - return arbitrumNova; - case arbitrumSepolia.id: - return arbitrumSepolia; - case base.id: - return base; - case baseGoerli.id: - return baseGoerli; - case baseSepolia.id: - return baseSepolia; - case fraxtal.id: - return fraxtal; - case fraxtalSepolia.id: - return fraxtalSepolia; - case goerli.id: - return goerli; - case optimism.id: - return optimism; - case optimismGoerli.id: - return optimismGoerli; - case optimismSepolia.id: - return optimismSepolia; - case polygon.id: - return polygon; - case polygonAmoy.id: - return polygonAmoy; - case polygonMumbai.id: - return polygonMumbai; - case shape.id: - return shape; - case shapeSepolia.id: - return shapeSepolia; - case worldChain.id: - return worldChain; - case worldChainSepolia.id: - return worldChainSepolia; - case zora.id: - return zora; - case zoraSepolia.id: - return zoraSepolia; - case beraChainBartio.id: - return beraChainBartio; - case opbnbMainnet.id: - return opbnbMainnet; - case opbnbTestnet.id: - return opbnbTestnet; - case soneiumMinato.id: - return soneiumMinato; - case soneiumMainnet.id: - return soneiumMainnet; - case unichainMainnet.id: - return unichainMainnet; - case unichainSepolia.id: - return unichainSepolia; - case inkMainnet.id: - return inkMainnet; - case inkSepolia.id: - return inkSepolia; - case mekong.id: - return mekong; - case monadTestnet.id: - return monadTestnet; - case openlootSepolia.id: - return openlootSepolia; - case gensynTestnet.id: - return gensynTestnet; - case riseTestnet.id: - return riseTestnet; - case storyMainnet.id: - return storyMainnet; - case storyAeneid.id: - return storyAeneid; - case celoMainnet.id: - return celoMainnet; - case teaSepolia.id: - return teaSepolia; - case bobaSepolia.id: - return bobaSepolia; - case bobaMainnet.id: - return bobaMainnet; - case hyperliquid.id: - return hyperliquid; - case hyperliquidEvmTestnet.id: - return hyperliquidEvmTestnet; - - default: - throw new Error(`Unsupported chainId: ${chainId}`); - } -} diff --git a/account-kit/privy-integration/src/version.ts b/account-kit/privy-integration/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/privy-integration/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/privy-integration/tsconfig.json b/account-kit/privy-integration/tsconfig.json deleted file mode 100644 index ece75e6070..0000000000 --- a/account-kit/privy-integration/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "typescript-template/base.json", - "compilerOptions": { - "jsx": "preserve" - } -} diff --git a/account-kit/privy-integration/vitest.config.ts b/account-kit/privy-integration/vitest.config.ts deleted file mode 100644 index 064ae1d793..0000000000 --- a/account-kit/privy-integration/vitest.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/privy-integration", - environment: "jsdom", - }, - }), -); diff --git a/account-kit/react-native/CHANGELOG.md b/account-kit/react-native/CHANGELOG.md deleted file mode 100644 index e0fe37392d..0000000000 --- a/account-kit/react-native/CHANGELOG.md +++ /dev/null @@ -1,516 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -### Bug Fixes - -- prevent useSmartWalletClient infinite render loop if address is specified while client loading ([#2146](https://github.com/alchemyplatform/aa-sdk/issues/2146)) ([6015e46](https://github.com/alchemyplatform/aa-sdk/commit/6015e4623617bc59a2795711de9b33a20b141de2)) - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -### Bug Fixes - -- **react-native:** re-export hooks for auth update ([#2046](https://github.com/alchemyplatform/aa-sdk/issues/2046)) ([992fbcb](https://github.com/alchemyplatform/aa-sdk/commit/992fbcb451b354af32cc10065782e049779fb44b)) - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -### Features - -- signer email/sms verification ([#1964](https://github.com/alchemyplatform/aa-sdk/issues/1964)) ([07d3bff](https://github.com/alchemyplatform/aa-sdk/commit/07d3bff1578c4f043c871da5edcab8feeb8cb105)) - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -### Bug Fixes - -- re-export react hook types from react-native package ([#1789](https://github.com/alchemyplatform/aa-sdk/issues/1789)) ([f7744f9](https://github.com/alchemyplatform/aa-sdk/commit/f7744f9f792f9373f238ecd5131c8951e7696f44)) - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -### Features - -- add react native hooks for solana ([#1755](https://github.com/alchemyplatform/aa-sdk/issues/1755)) ([bcc6fa8](https://github.com/alchemyplatform/aa-sdk/commit/bcc6fa859125f91bee4e25c7a6d9d0d50768edfa)) - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -### Features - -- add RN hooks docs and guides ([#1437](https://github.com/alchemyplatform/aa-sdk/issues/1437)) ([b749c1a](https://github.com/alchemyplatform/aa-sdk/commit/b749c1a7e9a7978aa0327d408a9c7cc724b8cd0f)) - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/react-native - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/react-native - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Features - -- add react-native core files ([#1402](https://github.com/alchemyplatform/aa-sdk/issues/1402)) ([060e1ab](https://github.com/alchemyplatform/aa-sdk/commit/060e1ab231db8455a71f25452e1a4cddace60dbd)) diff --git a/account-kit/react-native/inject-version.ts b/account-kit/react-native/inject-version.ts deleted file mode 100644 index 05e1caae82..0000000000 --- a/account-kit/react-native/inject-version.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync, writeFileSync } from "fs"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const VERSION_FILE_PATH = "src/version.ts"; - -const packageJSON = JSON.parse(readFileSync("./package.json").toString()); - -writeFileSync( - resolve(__dirname, VERSION_FILE_PATH), - `// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "${packageJSON.version}"; -`, -); -console.log(`Wrote version to ${VERSION_FILE_PATH}.`); diff --git a/account-kit/react-native/package.json b/account-kit/react-native/package.json deleted file mode 100644 index da5d30ca4f..0000000000 --- a/account-kit/react-native/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@account-kit/react-native", - "version": "4.84.1", - "description": "React Native Components and Hooks for using Smart Wallets", - "license": "MIT", - "author": "Alchemy", - "private": false, - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "src/**/*.tsx", - "!.env" - ], - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - } - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist" - }, - "devDependencies": { - "@tanstack/react-query": "^5.28.9", - "react": "^18.2.0", - "typescript": "^5.0.4", - "typescript-template": "*" - }, - "dependencies": { - "@account-kit/core": "^4.84.1", - "@account-kit/infra": "^4.84.1", - "@account-kit/react": "^4.84.1", - "@account-kit/react-native-signer": "^4.84.1", - "@account-kit/signer": "^4.84.1", - "@noble/hashes": "1.7.1", - "crypto-browserify": "^3.12.1", - "node-libs-react-native": "^1.2.1", - "react-native-get-random-values": "^1.11.0", - "stream-browserify": "^3.0.0", - "zustand": "^5.0.0-rc.2" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme" -} diff --git a/account-kit/react-native/src/context.tsx b/account-kit/react-native/src/context.tsx deleted file mode 100644 index 5bfe01706b..0000000000 --- a/account-kit/react-native/src/context.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import type { - AlchemyAccountsConfig, - AlchemyClientState, -} from "@account-kit/core"; -import { AlchemyAccountContext } from "@account-kit/react/alchemy-account-context"; -import { QueryClientProvider, type QueryClient } from "@tanstack/react-query"; -import { useMemo } from "react"; -import { Hydrate } from "@account-kit/react/hydrate"; - -export type AlchemyAccountContextProps = { - config: AlchemyAccountsConfig; - queryClient: QueryClient; -}; - -export type AlchemyAccountsProviderProps = { - config: AlchemyAccountsConfig; - initialState?: AlchemyClientState; - queryClient: QueryClient; -}; - -// NOTE: This is a copy of the AlchemyAccountProvider from @account-kit/react -// We are doing so because the version from @account-kit/react imports and renders some DOM elements -// which are not supported in React Native. -/** - * Provider for Alchemy accounts. - * - * @example - * ```tsx - * import { AlchemyAccountProvider, createConfig } from "@account-kit/react"; - * import { sepolia } from "@account-kit/infra"; - * import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; - * - * const config = createConfig({ - * apiKey: "your-api-key", - * chain: sepolia, - * }); - * - * const queryClient = new QueryClient(); - * - * function App({ children }: React.PropsWithChildren) { - * return ( - * - * - * {children} - * - * - * ); - * } - * ``` - * - * @param {React.PropsWithChildren} props alchemy accounts provider props - * @param {AlchemyAccountsConfig} props.config the acccount config generated using `createConfig` - * @param {QueryClient} props.queryClient the react-query query client to use - * @param {AlchemyAccountsUIConfig} props.uiConfig optional UI configuration - * @param {React.ReactNode | undefined} props.children react components that should have this accounts context - * @returns {React.JSX.Element} The element to wrap your application in for Alchemy Accounts context. - */ -export const AlchemyAccountProvider = ( - props: React.PropsWithChildren, -) => { - const { config, queryClient, children } = props; - - const initialContext = useMemo( - () => ({ - config, - queryClient, - }), - [config, queryClient], - ); - - return ( - - - - {children} - - - - ); -}; diff --git a/account-kit/react-native/src/createConfig.ts b/account-kit/react-native/src/createConfig.ts deleted file mode 100644 index c8adf1f77d..0000000000 --- a/account-kit/react-native/src/createConfig.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { RNAlchemySigner } from "@account-kit/react-native-signer"; -import { - createConfig as createCoreConfig, - type AlchemyAccountsConfig, - type BaseCreateConfigProps, - type ClientStoreConfig, -} from "@account-kit/core"; - -/** - * Creates an AlchemyAccountsConfig by using the provided parameters to configure the core settings, including the required transport. It includes a signer creation function internally. - * - * @param {BaseCreateConfigProps} params The base properties required for creating the config and establishing client store settings - * @returns {AlchemyAccountsConfig} An object of type AlchemyAccountsConfig containing the configured properties - */ -export const createConfig = ( - params: BaseCreateConfigProps, -): AlchemyAccountsConfig => { - const createSigner = (config: ClientStoreConfig) => RNAlchemySigner(config); - - if (!params.transport) { - throw new Error("transport is required"); - } - - return createCoreConfig({ - ...params, - ssr: false, - _internal: { createSigner }, - }); -}; diff --git a/account-kit/react-native/src/index.ts b/account-kit/react-native/src/index.ts deleted file mode 100644 index 89aa3b46b7..0000000000 --- a/account-kit/react-native/src/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import "react-native-get-random-values"; -// Add Polyfills & global shims -import "./polyfills/index.js"; -import "node-libs-react-native/globals.js"; - -export { - useAccount, - useAddOauthProvider, - useAddPasskey, - useAuthenticate, - useAuthError, - useBundlerClient, - useChain, - useConnection, - useDropAndReplaceUserOperation, - useExportAccount, - useListAuthMethods, - useLogout, - useRemoveEmail, - useRemoveOauthProvider, - useRemovePasskey, - useSendUserOperation, - useSendVerificationCode, - useSetEmail, - useSigner, - useSignerStatus, - useSignMessage, - useSignTypedData, - useSmartAccountClient, - useSolanaConnection, - useSolanaSigner, - useSolanaTransaction, - useUser, - useWaitForUserOperationTransaction, -} from "@account-kit/react/hooks"; -export type * from "@account-kit/react/hooks"; -export * from "./context.js"; -export { createConfig } from "./createConfig.js"; diff --git a/account-kit/react-native/src/polyfills/buffer-polyfill.ts b/account-kit/react-native/src/polyfills/buffer-polyfill.ts deleted file mode 100644 index e8304986da..0000000000 --- a/account-kit/react-native/src/polyfills/buffer-polyfill.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Buffer } from "buffer"; - -if (!global.Buffer) { - global.Buffer = Buffer; -} diff --git a/account-kit/react-native/src/polyfills/custom-event-polyfill.ts b/account-kit/react-native/src/polyfills/custom-event-polyfill.ts deleted file mode 100644 index 07f7626563..0000000000 --- a/account-kit/react-native/src/polyfills/custom-event-polyfill.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Define EventInit type if not available -interface EventInit { - bubbles?: boolean; - cancelable?: boolean; - composed?: boolean; -} - -interface CustomEventInit extends EventInit { - detail?: T; -} - -class Event { - type: string; - bubbles: boolean; - cancelable: boolean; - - constructor(type: string, eventInitDict?: EventInit) { - this.type = type; - this.bubbles = eventInitDict?.bubbles ?? false; - this.cancelable = eventInitDict?.cancelable ?? false; - } -} - -export class CustomEvent extends Event { - detail: T; - constructor(type: string, eventInitDict?: CustomEventInit) { - super(type, eventInitDict); - this.detail = eventInitDict?.detail as T; - } - - initCustomEvent(_: string, __?: boolean, ___?: boolean, detail?: T): void { - this.detail = detail as T; - } -} - -global.Event = Event as any; -global.CustomEvent = CustomEvent as any; diff --git a/account-kit/react-native/src/polyfills/index.ts b/account-kit/react-native/src/polyfills/index.ts deleted file mode 100644 index 08c127af27..0000000000 --- a/account-kit/react-native/src/polyfills/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import "./window-polyfill.js"; -import "./mmkv-localstorage-polyfill.js"; -import "./buffer-polyfill.js"; -import "./custom-event-polyfill.js"; diff --git a/account-kit/react-native/src/polyfills/mmkv-localstorage-polyfill.ts b/account-kit/react-native/src/polyfills/mmkv-localstorage-polyfill.ts deleted file mode 100644 index fcb69d33c2..0000000000 --- a/account-kit/react-native/src/polyfills/mmkv-localstorage-polyfill.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { MMKV } from "react-native-mmkv"; - -class MMKVLocalStorage { - private storage; - constructor() { - this.storage = new MMKV({ id: "mmkv-localstorage" }); - } - - // implement the Storage interface - getItem(key: string) { - return this.storage.getString(key) ?? null; - } - - setItem(key: string, value: string) { - return this.storage.set(key, value); - } - - removeItem(key: string) { - if (this.storage.contains(key)) { - this.storage.delete(key); - } - } - - clear() { - this.storage.clearAll(); - } - - get length() { - return this.storage.getAllKeys().length; - } - - key(index: number) { - const keys = this.storage.getAllKeys(); - return keys[index] || null; - } -} - -if (!global.localStorage) { - const mmkvLocalStorage = new MMKVLocalStorage(); - global.localStorage = mmkvLocalStorage; -} diff --git a/account-kit/react-native/src/polyfills/window-polyfill.ts b/account-kit/react-native/src/polyfills/window-polyfill.ts deleted file mode 100644 index 51729ceace..0000000000 --- a/account-kit/react-native/src/polyfills/window-polyfill.ts +++ /dev/null @@ -1,53 +0,0 @@ -// window-polyfill.ts - -type EventCallback = (event?: any) => void; - -const eventListeners: Record = {}; - -const windowPolyfill: Partial = { - document: { - createElement: () => ({ style: {} }), - } as unknown as Document, - - location: { - href: "", - } as Location, - - requestAnimationFrame: (callback: FrameRequestCallback) => - setTimeout(callback, 16), - cancelAnimationFrame: (id: number) => clearTimeout(id), - - setTimeout: global.setTimeout, - clearTimeout: global.clearTimeout, - setInterval: global.setInterval, - clearInterval: global.clearInterval, - - fetch: global.fetch, - - addEventListener: (type: string, callback: EventCallback) => { - if (!eventListeners[type]) { - eventListeners[type] = []; - } - eventListeners[type].push(callback); - }, - - removeEventListener: (type: string, callback: EventCallback) => { - if (eventListeners[type]) { - eventListeners[type] = eventListeners[type].filter( - (cb) => cb !== callback, - ); - } - }, - - dispatchEvent: (event: { type: string; [key: string]: any }) => { - if (eventListeners[event.type]) { - eventListeners[event.type]?.forEach((callback) => callback(event)); - } - return true; - }, -}; - -// Merge the polyfill into the global object -global.window = windowPolyfill as Window & typeof globalThis; - -export default global.window; diff --git a/account-kit/react-native/src/version.ts b/account-kit/react-native/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/react-native/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/react-native/tsconfig.build.json b/account-kit/react-native/tsconfig.build.json deleted file mode 100644 index 35b51fb5c4..0000000000 --- a/account-kit/react-native/tsconfig.build.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "include": ["src"], - "compilerOptions": { - "jsx": "react-jsx", - "sourceMap": true, - "allowUnreachableCode": false - } -} diff --git a/account-kit/react-native/tsconfig.json b/account-kit/react-native/tsconfig.json deleted file mode 100644 index 97e6122d03..0000000000 --- a/account-kit/react-native/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "typescript-template/base.json", - "compilerOptions": { - "jsx": "react-native", - "module": "ESNext", - "moduleResolution": "Bundler" - } -} diff --git a/account-kit/react-native/typedoc.json b/account-kit/react-native/typedoc.json deleted file mode 100644 index 85b76d5183..0000000000 --- a/account-kit/react-native/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["src/index.ts"], - "tsconfig": "./tsconfig.build.json", - "plugin": ["typedoc-plugin-markdown"], - "fileExtension": ".mdx" -} diff --git a/account-kit/react/.storybook/main.ts b/account-kit/react/.storybook/main.ts deleted file mode 100644 index 2dbdb5d8fd..0000000000 --- a/account-kit/react/.storybook/main.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { dirname, join } from "path"; -import type { StorybookConfig } from "@storybook/react-vite"; -import react from "@vitejs/plugin-react"; -import { mergeConfig } from "vite"; - -const config: StorybookConfig = { - stories: ["../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))"], - addons: [ - getAbsolutePath("@storybook/addon-essentials"), - getAbsolutePath("@storybook/addon-interactions"), - ], - framework: { - name: getAbsolutePath("@storybook/react-vite"), - options: {}, - }, - - viteFinal: async (config) => - mergeConfig(config, { - define: { "process.env": {} }, - plugins: [react()], - }), -}; - -export default config; - -function getAbsolutePath(value: string): any { - return dirname(require.resolve(join(value, "package.json"))); -} diff --git a/account-kit/react/.storybook/preview.tsx b/account-kit/react/.storybook/preview.tsx deleted file mode 100644 index c52bea1293..0000000000 --- a/account-kit/react/.storybook/preview.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import "./tailwind.css"; - -import { alchemy, sepolia } from "@account-kit/infra"; -import type { Preview } from "@storybook/react"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { initialize, mswLoader } from "msw-storybook-addon"; -import React, { useEffect } from "react"; -import { AlchemyAccountProvider } from "../src/context.js"; -import { createConfig } from "../src/index.js"; - -const queryClient = new QueryClient(); - -initialize(); - -const config = createConfig( - { - transport: alchemy({ rpcUrl: "/api/rpc" }), - chain: sepolia, - ssr: true, - }, - { - illustrationStyle: "outline", - auth: { - sections: [[{ type: "email" as const }], [{ type: "passkey" as const }]], - addPasskeyOnSignup: true, - }, - }, -); - -const preview: Preview = { - decorators: [ - (Story, { args }) => { - // Sync CSS variables - useEffect(() => { - const root = document.querySelector(":root") as HTMLElement; - if (args.isLight === false) { - root.classList.remove("light"); - root.classList.add("dark"); - } else { - root.classList.remove("dark"); - root.classList.add("light"); - } - }, [args]); - return ( - - - - - - ); - }, - ], - args: { - isLight: true, - }, - loaders: [mswLoader], - tags: ["autodocs"], -}; - -export default preview; diff --git a/account-kit/react/.storybook/tailwind.css b/account-kit/react/.storybook/tailwind.css deleted file mode 100644 index b5c61c9567..0000000000 --- a/account-kit/react/.storybook/tailwind.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/account-kit/react/CHANGELOG.md b/account-kit/react/CHANGELOG.md deleted file mode 100644 index d722d55bd3..0000000000 --- a/account-kit/react/CHANGELOG.md +++ /dev/null @@ -1,1128 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/react - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -### Features - -- update wallet_sendPreparedCalls to use new call id ([#2340](https://github.com/alchemyplatform/aa-sdk/issues/2340)) ([7bcd59a](https://github.com/alchemyplatform/aa-sdk/commit/7bcd59a8c71a5e64ab055d2ff5ddba0d0269d96b)) - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/react - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/react - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/react - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/react - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/react - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/react - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -### Bug Fixes - -- auth modal won't open after session expires ([#2287](https://github.com/alchemyplatform/aa-sdk/issues/2287)) ([39cb964](https://github.com/alchemyplatform/aa-sdk/commit/39cb9644a2606df44dbf279eb6ff8cb56b48110d)) - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/react - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/react - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/react - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/react - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/react - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/react - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -### Features - -- support webauthn signers in wallet client ([#2214](https://github.com/alchemyplatform/aa-sdk/issues/2214)) ([4297dc3](https://github.com/alchemyplatform/aa-sdk/commit/4297dc3dc631f2aa0a7230260af2d71ab90856b6)) - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -### Bug Fixes - -- 'Continue' button color on dark ([#2205](https://github.com/alchemyplatform/aa-sdk/issues/2205)) ([f678a77](https://github.com/alchemyplatform/aa-sdk/commit/f678a77bb72eadcf21fa2ae88cb7c54febd9b9b9)) - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/react - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/react - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/react - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/react - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/react - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/react - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/react - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/react - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -### Bug Fixes - -- use wallet apis to wait for call status in useSendUserOperation ([#2162](https://github.com/alchemyplatform/aa-sdk/issues/2162)) ([958378d](https://github.com/alchemyplatform/aa-sdk/commit/958378de001ecda7cb50b2aaacd8fc0e9e75d423)) - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/react - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -### Features - -- add swap react hooks to SDKv4 ([#2148](https://github.com/alchemyplatform/aa-sdk/issues/2148)) ([427f725](https://github.com/alchemyplatform/aa-sdk/commit/427f725b55ed192f39777bdc6d3590355677e6b0)) - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/react - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/react - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -### Bug Fixes - -- prevent useSmartWalletClient infinite render loop if address is specified while client loading ([#2146](https://github.com/alchemyplatform/aa-sdk/issues/2146)) ([6015e46](https://github.com/alchemyplatform/aa-sdk/commit/6015e4623617bc59a2795711de9b33a20b141de2)) - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/react - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @account-kit/react - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/react - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/react - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/react - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -### Bug Fixes - -- update broken links ([#2041](https://github.com/alchemyplatform/aa-sdk/issues/2041)) ([eafc0a0](https://github.com/alchemyplatform/aa-sdk/commit/eafc0a00a3aaa12e41b8e6359377e73e3f630f4e)) - -### Features - -- add flashblocks support to react ([#2037](https://github.com/alchemyplatform/aa-sdk/issues/2037)) ([ac88279](https://github.com/alchemyplatform/aa-sdk/commit/ac88279e53a70be7e38e3fad364d741e3f7536fe)) - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -### Bug Fixes - -- don't wait for call status until call id is defined ([#2034](https://github.com/alchemyplatform/aa-sdk/issues/2034)) ([3c6a7da](https://github.com/alchemyplatform/aa-sdk/commit/3c6a7da7c5ecb06e9550f71861e2e268d2dd92c4)) - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/react - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -### Features - -- signer email/sms verification ([#1964](https://github.com/alchemyplatform/aa-sdk/issues/1964)) ([07d3bff](https://github.com/alchemyplatform/aa-sdk/commit/07d3bff1578c4f043c871da5edcab8feeb8cb105)) - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -### Features - -- export wallet ([#1858](https://github.com/alchemyplatform/aa-sdk/issues/1858)) ([bc856e1](https://github.com/alchemyplatform/aa-sdk/commit/bc856e1bcc8138cb22db296ffd81e90c43eda9f9)) - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/react - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -### Bug Fixes - -- **wallet-client:** handle permits in sendCalls action, add clarifying docs ([50039e0](https://github.com/alchemyplatform/aa-sdk/commit/50039e01d6a4137db4fa5668c52442deda3cc12e)) - -### Features - -- new hooks accept old client for account ([#1974](https://github.com/alchemyplatform/aa-sdk/issues/1974)) ([19d0365](https://github.com/alchemyplatform/aa-sdk/commit/19d036564bca2ea5adf912c3122e619cbf69fb5a)) - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/react - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -### Features - -- **wallet-client:** add support for erc20 paymaster in wallet-client and useSendCalls ([7b0f092](https://github.com/alchemyplatform/aa-sdk/commit/7b0f0929254c707fd009ae90e392b39b9cb029a2)) - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/react - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/react - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/react - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/react - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -### Features - -- update external wallet support to include Solana wallets ([#1847](https://github.com/alchemyplatform/aa-sdk/issues/1847)) ([7e33d35](https://github.com/alchemyplatform/aa-sdk/commit/7e33d35fdede8358d240fe919af54486f8b10edd)) - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/react - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -### Features - -- unpin viem version ([#1851](https://github.com/alchemyplatform/aa-sdk/issues/1851)) ([e387e0e](https://github.com/alchemyplatform/aa-sdk/commit/e387e0ead087b893d315b072c24b3c2725ff86b6)) - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/react - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @account-kit/react - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/react - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @account-kit/react - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/react - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/react - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/react - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/react - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/react - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -### Features - -- add initial smart wallet client actions ([#1648](https://github.com/alchemyplatform/aa-sdk/issues/1648)) ([a3d8ab2](https://github.com/alchemyplatform/aa-sdk/commit/a3d8ab2f698ca08f62d04423262b3497b46551af)), closes [#1649](https://github.com/alchemyplatform/aa-sdk/issues/1649) [#1733](https://github.com/alchemyplatform/aa-sdk/issues/1733) [#1742](https://github.com/alchemyplatform/aa-sdk/issues/1742) - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -### Features - -- add react native hooks for solana ([#1755](https://github.com/alchemyplatform/aa-sdk/issues/1755)) ([bcc6fa8](https://github.com/alchemyplatform/aa-sdk/commit/bcc6fa859125f91bee4e25c7a6d9d0d50768edfa)) - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/react - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @account-kit/react - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/react - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/react - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @account-kit/react - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/react - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/react - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/react - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) -- list, add, and remove oauth providers ([#1666](https://github.com/alchemyplatform/aa-sdk/issues/1666)) ([e9add26](https://github.com/alchemyplatform/aa-sdk/commit/e9add26907c4151a85f0a4f98efc2a18694faa62)), closes [#1669](https://github.com/alchemyplatform/aa-sdk/issues/1669) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/react - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/react - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -### Features - -- add erc20 sponsorship card ([#1631](https://github.com/alchemyplatform/aa-sdk/issues/1631)) ([a827c70](https://github.com/alchemyplatform/aa-sdk/commit/a827c70f2e8eaacb852f61ef1f0c1cb72acbc38b)) - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -**Note:** Version bump only for package @account-kit/react - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/react - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/react - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @account-kit/react - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @account-kit/react - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/react - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Features - -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -### Features - -- link auth when a user logs in with Google with an existing email ([#1581](https://github.com/alchemyplatform/aa-sdk/issues/1581)) ([dd44ea9](https://github.com/alchemyplatform/aa-sdk/commit/dd44ea9be47b1e8cdd29999e80b81d5d3ccb8077)) -- solana demo ([#1583](https://github.com/alchemyplatform/aa-sdk/issues/1583)) ([d471359](https://github.com/alchemyplatform/aa-sdk/commit/d471359104d0ad55f1c3d4e26d694edc88acffec)), closes [#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578) [#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578) [#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578) [#1582](https://github.com/alchemyplatform/aa-sdk/issues/1582) [#1584](https://github.com/alchemyplatform/aa-sdk/issues/1584) - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/react - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/react - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -### Features - -- solana nft demo ([#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578)) ([7ad9c20](https://github.com/alchemyplatform/aa-sdk/commit/7ad9c20d5c005ddaad542ba3aaf31d6d795b88f2)) - -### Reverts - -- Revert "feat: solana nft demo (#1578)" (#1582) ([4691730](https://github.com/alchemyplatform/aa-sdk/commit/469173054560a558b2b705374cc484226b368cf3)), closes [#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578) [#1582](https://github.com/alchemyplatform/aa-sdk/issues/1582) - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -### Features - -- move to use the alchemy store for web3 communication ([#1562](https://github.com/alchemyplatform/aa-sdk/issues/1562)) ([f86a815](https://github.com/alchemyplatform/aa-sdk/commit/f86a815412cb532de12a405b1cfb143da2e22b77)) - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/react - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/react - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/react - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/react - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -### Features - -- add mfa methods to rn-signer ([#1542](https://github.com/alchemyplatform/aa-sdk/issues/1542)) ([c41ba79](https://github.com/alchemyplatform/aa-sdk/commit/c41ba792f78fc71395df0c16bbb8184e51272981)) - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -### Features - -- solana hooks ([#1543](https://github.com/alchemyplatform/aa-sdk/issues/1543)) ([0157185](https://github.com/alchemyplatform/aa-sdk/commit/015718534c77813e36a20323b22a83b4fbd1b260)) - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @account-kit/react - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/react - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @account-kit/react - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/react - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -### Features - -- add mfa on sign in with an authenticator app ([#1398](https://github.com/alchemyplatform/aa-sdk/issues/1398)) ([b9315c5](https://github.com/alchemyplatform/aa-sdk/commit/b9315c5cdd9f2674f53cc8d1bebbdb3b569e36ae)) - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -### Features - -- tracing added for imply and open telemetry ([#1424](https://github.com/alchemyplatform/aa-sdk/issues/1424)) ([1caf63b](https://github.com/alchemyplatform/aa-sdk/commit/1caf63bbe4150b7eb66ee7aef7ccf2e228336ba6)) - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -### Bug Fixes - -- onSignup not call for new user after logging out and back in ([#1492](https://github.com/alchemyplatform/aa-sdk/issues/1492)) ([2ca4926](https://github.com/alchemyplatform/aa-sdk/commit/2ca4926b2fe9bb18a49f211776e8c16cf84fa41f)) - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -### Bug Fixes - -- resolve import path immediately for tailwind plugin ([#1494](https://github.com/alchemyplatform/aa-sdk/issues/1494)) ([5abffd2](https://github.com/alchemyplatform/aa-sdk/commit/5abffd2c3b29dd46e79e4c8aed86f7c69723c5c1)) - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/react - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -### Features - -- add twitch integration ([#1443](https://github.com/alchemyplatform/aa-sdk/issues/1443)) ([fcecf39](https://github.com/alchemyplatform/aa-sdk/commit/fcecf3909f9b1ffd6d5294400d054c155e4efa78)) - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -### Bug Fixes - -- support using ui config with tailwind v4 ([#1460](https://github.com/alchemyplatform/aa-sdk/issues/1460)) ([3b969f7](https://github.com/alchemyplatform/aa-sdk/commit/3b969f7285a71f9f0d2dc625a26b72dca7387bff)) - -### Features - -- pull email mode from server ([#1441](https://github.com/alchemyplatform/aa-sdk/issues/1441)) ([3034db4](https://github.com/alchemyplatform/aa-sdk/commit/3034db49aab29d1b9bbd8474056a1f9cdfc98ef7)) - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @account-kit/react - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/react - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/react - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/react - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Features - -- add react-native core files ([#1402](https://github.com/alchemyplatform/aa-sdk/issues/1402)) ([060e1ab](https://github.com/alchemyplatform/aa-sdk/commit/060e1ab231db8455a71f25452e1a4cddace60dbd)) - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -### Features - -- playwright in ui-demo ([#1359](https://github.com/alchemyplatform/aa-sdk/issues/1359)) ([f7c7911](https://github.com/alchemyplatform/aa-sdk/commit/f7c7911cdc1f690db4107e21956469955c990bc8)) - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @account-kit/react - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @account-kit/react - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -### Bug Fixes - -- add logoUrlDark for auth0 provider logos ([#1298](https://github.com/alchemyplatform/aa-sdk/issues/1298)) ([80a0132](https://github.com/alchemyplatform/aa-sdk/commit/80a0132916cd1c89c8c622f5dfafca0b7a1a9508)) -- otp new styles and flow ([#1250](https://github.com/alchemyplatform/aa-sdk/issues/1250)) ([7295249](https://github.com/alchemyplatform/aa-sdk/commit/72952498d91056fdf4086557ed3963c18a5d5879)) - -### Features - -- adding delay after OTP code validation ([#1288](https://github.com/alchemyplatform/aa-sdk/issues/1288)) ([afc60ad](https://github.com/alchemyplatform/aa-sdk/commit/afc60ad795c04e30d4728d3d9cc1fb428d722e7a)) -- enable discord social auth ([#1281](https://github.com/alchemyplatform/aa-sdk/issues/1281)) ([1772da9](https://github.com/alchemyplatform/aa-sdk/commit/1772da972f2cc78dde3786fb9ebe3ec19f01e78b)) -- enable twitter social auth ([#1230](https://github.com/alchemyplatform/aa-sdk/issues/1230)) ([f4e8533](https://github.com/alchemyplatform/aa-sdk/commit/f4e8533ae0d79e22c939b4fa84da6801f6626bec)) - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -**Note:** Version bump only for package @account-kit/react - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -**Note:** Version bump only for package @account-kit/react - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -### Features - -- add email OTP support ([#1163](https://github.com/alchemyplatform/aa-sdk/issues/1163)) ([76720d9](https://github.com/alchemyplatform/aa-sdk/commit/76720d9b647d5e65a78726935520c41d94c1f6ff)) - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -### Bug Fixes - -- correctly align protected by copy ([#1186](https://github.com/alchemyplatform/aa-sdk/issues/1186)) ([63be696](https://github.com/alchemyplatform/aa-sdk/commit/63be696199882b42fbad7eb7fa22aa823984c225)) - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Bug Fixes - -- refactor connection error ([#1156](https://github.com/alchemyplatform/aa-sdk/issues/1156)) ([83ea665](https://github.com/alchemyplatform/aa-sdk/commit/83ea665514f49131565441f1b43e4e6e5b0fd68c)) -- update email completing string to be more generic ([#1173](https://github.com/alchemyplatform/aa-sdk/issues/1173)) ([18d0827](https://github.com/alchemyplatform/aa-sdk/commit/18d082798ab6c83417d2a2f155f4f7c655e1e6a4)) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -### Bug Fixes - -- changing protected by to powered by alchemy footer ([#1164](https://github.com/alchemyplatform/aa-sdk/issues/1164)) ([7c08a66](https://github.com/alchemyplatform/aa-sdk/commit/7c08a66b718aefce80629824d58893898c757b41)) -- oauth working, email still broken ([#1170](https://github.com/alchemyplatform/aa-sdk/issues/1170)) ([196905d](https://github.com/alchemyplatform/aa-sdk/commit/196905d4abbfd07ccb83e38484bab6eb0ea0d502)) - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -### Bug Fixes - -- **wc:** wc connection should persist across refreshes ([#1162](https://github.com/alchemyplatform/aa-sdk/issues/1162)) ([a22f3d9](https://github.com/alchemyplatform/aa-sdk/commit/a22f3d92e5daaee46c6da7fe6a51488ea70f334f)) - -### Features - -- oauth add passkey after signup (popup flow) ([#1151](https://github.com/alchemyplatform/aa-sdk/issues/1151)) ([844a481](https://github.com/alchemyplatform/aa-sdk/commit/844a48123ce8d74a877f23ccbf10d367a9a9551b)) - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -### Bug Fixes - -- don't show error view when cancelling oauth ([#1087](https://github.com/alchemyplatform/aa-sdk/issues/1087)) ([e1fddd8](https://github.com/alchemyplatform/aa-sdk/commit/e1fddd8a4e7818bc163efceda15d95ee9d6a37c3)) - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -### Features - -- add exit animation to mobile dialog drawer ([#1108](https://github.com/alchemyplatform/aa-sdk/issues/1108)) ([afa37ea](https://github.com/alchemyplatform/aa-sdk/commit/afa37ea15bc5f911b405af5b82ebcc747359ef69)) -- change auth card navigation sizes on mobile ([#1122](https://github.com/alchemyplatform/aa-sdk/issues/1122)) ([eae2877](https://github.com/alchemyplatform/aa-sdk/commit/eae28776b55fe7cb436edba9b462ff195ad9a238)) -- oauth add passkey after signup (redirect flow) ([#1140](https://github.com/alchemyplatform/aa-sdk/issues/1140)) ([6d5e229](https://github.com/alchemyplatform/aa-sdk/commit/6d5e229e24402344b214df9689ca18d8f5954922)) - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -**Note:** Version bump only for package @account-kit/react - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -### Bug Fixes - -- button nav size ([#1114](https://github.com/alchemyplatform/aa-sdk/issues/1114)) ([2ddd4fc](https://github.com/alchemyplatform/aa-sdk/commit/2ddd4fc11e311610707365bdb0ccf19d9c301e24)) -- define process.env for storybook ([#1116](https://github.com/alchemyplatform/aa-sdk/issues/1116)) ([509827a](https://github.com/alchemyplatform/aa-sdk/commit/509827a77ed7c5e0a6284fa37526f66202ba9904)) -- passkey icon is now using brand color ([#1123](https://github.com/alchemyplatform/aa-sdk/issues/1123)) ([a3238ec](https://github.com/alchemyplatform/aa-sdk/commit/a3238ecf5d1f4a8d402377444d773376bffd5f58)) -- repair pt on maincard ([#1117](https://github.com/alchemyplatform/aa-sdk/issues/1117)) ([711bed5](https://github.com/alchemyplatform/aa-sdk/commit/711bed54c7f7990162ab031eb91f40ab4ac3aac9)) -- show Oauth errors in from UI components ([#1118](https://github.com/alchemyplatform/aa-sdk/issues/1118)) ([8331372](https://github.com/alchemyplatform/aa-sdk/commit/833137251afad161f1fd982f6062160232b8340c)) - -### Features - -- added dev:build script to improve dev experience ([#1120](https://github.com/alchemyplatform/aa-sdk/issues/1120)) ([0f024e7](https://github.com/alchemyplatform/aa-sdk/commit/0f024e75876c82addf8a389658b42dadc36ecefe)) - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -### Bug Fixes - -- facebook logo ([#1113](https://github.com/alchemyplatform/aa-sdk/issues/1113)) ([da8f0f5](https://github.com/alchemyplatform/aa-sdk/commit/da8f0f5e3ba3c116270c295173aa0b3b05979c90)) -- new responsive design ([#1104](https://github.com/alchemyplatform/aa-sdk/issues/1104)) ([061ba2a](https://github.com/alchemyplatform/aa-sdk/commit/061ba2a5e1f68c64229234a64a3c66d643e7d7ac)) - -### Features - -- add custom error messages for chainId errors ([#1101](https://github.com/alchemyplatform/aa-sdk/issues/1101)) ([150525a](https://github.com/alchemyplatform/aa-sdk/commit/150525a9245d26029105509de51c175b61d6e4ab)) -- add akui to common class names ([#1107](https://github.com/alchemyplatform/aa-sdk/issues/1107)) ([86e4dfb](https://github.com/alchemyplatform/aa-sdk/commit/86e4dfb6068761606d7aac611c935b6ee18281db)) - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @account-kit/react - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -### Features - -- add back button to auth authentication screens ([#1094](https://github.com/alchemyplatform/aa-sdk/issues/1094)) ([ef73033](https://github.com/alchemyplatform/aa-sdk/commit/ef7303333830df53a9106ba37ce015675a276cd9)) - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -**Note:** Version bump only for package @account-kit/react - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -### Bug Fixes - -- update z-indexes of wallet connect and our mobile modal ([#1068](https://github.com/alchemyplatform/aa-sdk/issues/1068)) ([e1963b9](https://github.com/alchemyplatform/aa-sdk/commit/e1963b949ad68f047174356160c7e1fe30bf1e2e)) - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -### Bug Fixes - -- change fontsize on desktop, border radius, border color ([#1053](https://github.com/alchemyplatform/aa-sdk/issues/1053)) ([3270553](https://github.com/alchemyplatform/aa-sdk/commit/3270553e27fa781bcea3dfb82fa293c05a9385d6)) -- design qa feedback ([#1033](https://github.com/alchemyplatform/aa-sdk/issues/1033)) ([c00381a](https://github.com/alchemyplatform/aa-sdk/commit/c00381a7d80a53ec235ad1cdf0b8d0cb2b4fb827)) -- drawer animation, zoom on input, clip path error ([#1042](https://github.com/alchemyplatform/aa-sdk/issues/1042)) ([5571849](https://github.com/alchemyplatform/aa-sdk/commit/5571849c8d932fa25b1ef101bf035c9a5ff98924)) -- fix animation up bug ([#1048](https://github.com/alchemyplatform/aa-sdk/issues/1048)) ([d51bbfd](https://github.com/alchemyplatform/aa-sdk/commit/d51bbfd49079409285568c4d3739418d4a30601f)) -- open the auth modal upon email return ([#1059](https://github.com/alchemyplatform/aa-sdk/issues/1059)) ([bf0915f](https://github.com/alchemyplatform/aa-sdk/commit/bf0915ff42d1f65dbcdef7e6f4a03fec9f02f63d)) -- update default auth ([#1049](https://github.com/alchemyplatform/aa-sdk/issues/1049)) ([81019a2](https://github.com/alchemyplatform/aa-sdk/commit/81019a2fe7e22b81baf12e114e7418f4dbd4255a)) - -### Features - -- add cancel buttons to auth loading states ([#1029](https://github.com/alchemyplatform/aa-sdk/issues/1029)) ([368629f](https://github.com/alchemyplatform/aa-sdk/commit/368629f2abf4c0f13d1eec52242a43c24395b1d9)) -- add google auth components and demo support (extension of linnas pr) ([#1032](https://github.com/alchemyplatform/aa-sdk/issues/1032)) ([cb91914](https://github.com/alchemyplatform/aa-sdk/commit/cb91914c8da0a7c3e7519bf98bc55d2848062e9f)), closes [#1024](https://github.com/alchemyplatform/aa-sdk/issues/1024) [#1035](https://github.com/alchemyplatform/aa-sdk/issues/1035) [#1036](https://github.com/alchemyplatform/aa-sdk/issues/1036) -- add logger schemas to infra, react, core ([65fac7d](https://github.com/alchemyplatform/aa-sdk/commit/65fac7dbf2c63232199607b801db49ee96294b41)) -- add react events logging ([7a7f230](https://github.com/alchemyplatform/aa-sdk/commit/7a7f2309ab664fc0f3602e85516de2d3f309bf84)) -- enable facebook oauth in ui-demo ([#1041](https://github.com/alchemyplatform/aa-sdk/issues/1041)) ([38bb51a](https://github.com/alchemyplatform/aa-sdk/commit/38bb51a98d15e1342dea02a48386c44768599c23)), closes [#1024](https://github.com/alchemyplatform/aa-sdk/issues/1024) [#1035](https://github.com/alchemyplatform/aa-sdk/issues/1035) [#1036](https://github.com/alchemyplatform/aa-sdk/issues/1036) - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -### Bug Fixes - -- allow users to log back in after logout ([#1023](https://github.com/alchemyplatform/aa-sdk/issues/1023)) ([0ff156b](https://github.com/alchemyplatform/aa-sdk/commit/0ff156b172eedc0337f3649c0a4b4c41c3834ca8)) -- supportURL wired into config ([#1006](https://github.com/alchemyplatform/aa-sdk/issues/1006)) ([5b9cf48](https://github.com/alchemyplatform/aa-sdk/commit/5b9cf48da9122f1c63ae85f15c43b8b9859217c2)) -- try again button on passkey error screen ([#1030](https://github.com/alchemyplatform/aa-sdk/issues/1030)) ([158b698](https://github.com/alchemyplatform/aa-sdk/commit/158b69865d76f6f4aa9e4f4f7fb9d95fe219550c)) - -### Features - -- add dialog sheet for bottom sheet on mobile ([#1002](https://github.com/alchemyplatform/aa-sdk/issues/1002)) ([566b206](https://github.com/alchemyplatform/aa-sdk/commit/566b20644de425710dcdb6e8871c331016c5fd96)) -- expose signer error messages ([#1019](https://github.com/alchemyplatform/aa-sdk/issues/1019)) ([998c75c](https://github.com/alchemyplatform/aa-sdk/commit/998c75c61fcd67741bb8d4e25221423441cdd1d6)) -- new colors for light theme and sidebar controls ([#1026](https://github.com/alchemyplatform/aa-sdk/issues/1026)) ([ff3b9e8](https://github.com/alchemyplatform/aa-sdk/commit/ff3b9e803761548318ae617d6d44f95d7812e05d)) - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -### Features - -- add mobile splash page with buttons to trigger auth flow ([#1000](https://github.com/alchemyplatform/aa-sdk/issues/1000)) ([aac08ab](https://github.com/alchemyplatform/aa-sdk/commit/aac08abb3abf2a2464407b939deab279d2742339)) -- use updated error state icons in authCard ([#986](https://github.com/alchemyplatform/aa-sdk/issues/986)) ([9d95676](https://github.com/alchemyplatform/aa-sdk/commit/9d95676088c96547b9643c781542ae6dd64319b0)) - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -### Bug Fixes - -- make add passkey modal icons the same color ([#975](https://github.com/alchemyplatform/aa-sdk/issues/975)) ([bedbc20](https://github.com/alchemyplatform/aa-sdk/commit/bedbc2044fb35c8c80cc305ff3722a1428d227c4)) -- prevent modal from opening if modal is closed ([#985](https://github.com/alchemyplatform/aa-sdk/issues/985)) ([014a9e8](https://github.com/alchemyplatform/aa-sdk/commit/014a9e8ed73c4ed3545612edc1b7944897bce87e)) -- resize email icon in auth methods and fix lint warning ([#966](https://github.com/alchemyplatform/aa-sdk/issues/966)) ([d3b6777](https://github.com/alchemyplatform/aa-sdk/commit/d3b677766884f707ce40d8157bf74551ef450526)) -- **ui-components:** ensure the passkey prompt always shows up when qp is present ([#978](https://github.com/alchemyplatform/aa-sdk/issues/978)) ([81f1580](https://github.com/alchemyplatform/aa-sdk/commit/81f15806e704bcffca6435eccb293923ff64d0e9)) - -### Features - -- allow passkey flow in demo app ([#969](https://github.com/alchemyplatform/aa-sdk/issues/969)) ([bacf9bd](https://github.com/alchemyplatform/aa-sdk/commit/bacf9bd017b57427e5c601ea86099ad256384b0f)) - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -### Bug Fixes - -- allow useLogout without authModalContext ([#972](https://github.com/alchemyplatform/aa-sdk/issues/972)) ([8175962](https://github.com/alchemyplatform/aa-sdk/commit/8175962a509cb6e51ced22b1cd199a57fb7305a4)) -- fixed bad svg prop names ([#968](https://github.com/alchemyplatform/aa-sdk/issues/968)) ([fdf7025](https://github.com/alchemyplatform/aa-sdk/commit/fdf7025aec20aca76f4285769d1f650f3636b78e)) - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -**Note:** Version bump only for package @account-kit/react - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -### Features - -- add support for social login ([#942](https://github.com/alchemyplatform/aa-sdk/issues/942)) ([aa00dc7](https://github.com/alchemyplatform/aa-sdk/commit/aa00dc7d880f6d9cf9ae29e63941a9552faa9dd5)) - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @account-kit/react - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -**Note:** Version bump only for package @account-kit/react - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -### Bug Fixes - -- remove focus outline on add passkey modal and update dependencies ([#947](https://github.com/alchemyplatform/aa-sdk/issues/947)) ([43367cf](https://github.com/alchemyplatform/aa-sdk/commit/43367cf2ecc369f8d8811ad00cb8ffe42b94d3fe)) - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Bug Fixes - -- add missing react-remove-scroll dep ([#804](https://github.com/alchemyplatform/aa-sdk/issues/804)) ([09d9217](https://github.com/alchemyplatform/aa-sdk/commit/09d92176dfa480ef9b9d9e76299a244c48e8bc6f)) -- add use client to a bunch of hooks that was misisng it ([#829](https://github.com/alchemyplatform/aa-sdk/issues/829)) ([9be5834](https://github.com/alchemyplatform/aa-sdk/commit/9be583400cdcdd766048b30788185dc56a895ee2)) -- exporting queryClient and typing uiConfig in example ([#844](https://github.com/alchemyplatform/aa-sdk/issues/844)) ([f6cc40e](https://github.com/alchemyplatform/aa-sdk/commit/f6cc40e8884bab927167099d8116e53494fd355b)) -- lowercase strings in the UI components ([#784](https://github.com/alchemyplatform/aa-sdk/issues/784)) ([58422c3](https://github.com/alchemyplatform/aa-sdk/commit/58422c399daeb342e3f664be4f82c5f500421ea2)) -- merge base into this ([e41b396](https://github.com/alchemyplatform/aa-sdk/commit/e41b396fdf331d2dd7d4e6b608b90dcab37f8386)) -- **react:** fix sign in header hiding itself ([#851](https://github.com/alchemyplatform/aa-sdk/issues/851)) ([90b3e20](https://github.com/alchemyplatform/aa-sdk/commit/90b3e20c073044c3b7af2cc359c8b515f8838b64)) -- **ui-demo:** signer state was being cleared when ui config changed ([#838](https://github.com/alchemyplatform/aa-sdk/issues/838)) ([cc5db85](https://github.com/alchemyplatform/aa-sdk/commit/cc5db859647c3ac434a929ccab52b898f4f04e7f)) -- **ui-modal:** don't render ui modal if no ui config is passed in ([#943](https://github.com/alchemyplatform/aa-sdk/issues/943)) ([65b1584](https://github.com/alchemyplatform/aa-sdk/commit/65b1584c6f3bf5226bcf457d3736bda3543d6219)) -- use updated package path in prettier config ([#741](https://github.com/alchemyplatform/aa-sdk/issues/741)) ([918d65f](https://github.com/alchemyplatform/aa-sdk/commit/918d65f64bd4de40f092b7cf8fb5a2605d376939)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([02f2f16](https://github.com/alchemyplatform/aa-sdk/commit/02f2f1623803480b8dc496491d2232c6fe5c219c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([55e6632](https://github.com/alchemyplatform/aa-sdk/commit/55e663208aae63e6092cbf2335c58f1448bd0dc3)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- add ability to customize border radius in ui demo ([#785](https://github.com/alchemyplatform/aa-sdk/issues/785)) ([2ce7d2d](https://github.com/alchemyplatform/aa-sdk/commit/2ce7d2d2d0534f50d6a94eb4d210c4ef49e50642)) -- add border radius to account kit theme config ([#781](https://github.com/alchemyplatform/aa-sdk/issues/781)) ([dcd2ac1](https://github.com/alchemyplatform/aa-sdk/commit/dcd2ac194a9bcb4e0de1d7edfcc8b298d3d19cb0)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([a389f65](https://github.com/alchemyplatform/aa-sdk/commit/a389f656a6e4feb14e13ecfc84880e4e0d93d786)) -- add injected wallets to the UX ([#841](https://github.com/alchemyplatform/aa-sdk/issues/841)) ([9de08b3](https://github.com/alchemyplatform/aa-sdk/commit/9de08b3ab76471298cd84fc65cc3d5a8dd35ba08)) -- add UI config defaults, better back navigation to auth UI ([#827](https://github.com/alchemyplatform/aa-sdk/issues/827)) ([bf9157c](https://github.com/alchemyplatform/aa-sdk/commit/bf9157ca382b41a2ee28fb3c71c6a4e7789a151f)) -- add wallet connect to injected wallet setup ([e00166d](https://github.com/alchemyplatform/aa-sdk/commit/e00166d2030b5b2f8bf666481a95a33cec9fad9f)) -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([85548c8](https://github.com/alchemyplatform/aa-sdk/commit/85548c86fe52262bfc761a5b3c0eb5d050bd8568)) -- enable linting class methods from exported classes ([1b87a51](https://github.com/alchemyplatform/aa-sdk/commit/1b87a51f5cafada625180b386e9b7e4e58f6e4d7)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([4be87d3](https://github.com/alchemyplatform/aa-sdk/commit/4be87d3147e1cdd70d2034479dcf0973c2820ea8)) -- icon animations ([#717](https://github.com/alchemyplatform/aa-sdk/issues/717)) ([0368570](https://github.com/alchemyplatform/aa-sdk/commit/0368570ff94ba2cf79602085306fbe800e93b0fd)) -- make it easier to start with account-kit/core ([#933](https://github.com/alchemyplatform/aa-sdk/issues/933)) ([6d98643](https://github.com/alchemyplatform/aa-sdk/commit/6d9864334f3c8e98ddb2f5885dbc705dc78587ba)) -- new and improved auth modal ([#761](https://github.com/alchemyplatform/aa-sdk/issues/761)) ([2296917](https://github.com/alchemyplatform/aa-sdk/commit/2296917bf01bba8fb20e58f587ae6aa1ed40ffcb)) -- **react:** enable multi-owner la usage in core and react ([#893](https://github.com/alchemyplatform/aa-sdk/issues/893)) ([43464da](https://github.com/alchemyplatform/aa-sdk/commit/43464daf59e6b653a5332662c4098cb2174f65d3)) -- read auth card props from context, simplify UI config ([#789](https://github.com/alchemyplatform/aa-sdk/issues/789)) ([e7eae44](https://github.com/alchemyplatform/aa-sdk/commit/e7eae44e8f6e6fdf0b01c5c7a920271b248b4022)) -- respect OS or root class for dark mode ([#759](https://github.com/alchemyplatform/aa-sdk/issues/759)) ([66aade5](https://github.com/alchemyplatform/aa-sdk/commit/66aade569c28a94aab58fa941bf3fd9ed2d767a8)) -- smaller footer in UI components ([#811](https://github.com/alchemyplatform/aa-sdk/issues/811)) ([ef89ccd](https://github.com/alchemyplatform/aa-sdk/commit/ef89ccdab0aa3c7af23f160cf77db46f7991d311)) -- some UI component polish from sync with product ([#831](https://github.com/alchemyplatform/aa-sdk/issues/831)) ([37a98c0](https://github.com/alchemyplatform/aa-sdk/commit/37a98c01716e1ade73395eb8b4fecfb3a2f6f4b9)) -- support different illustration styles ([#767](https://github.com/alchemyplatform/aa-sdk/issues/767)) ([37296d3](https://github.com/alchemyplatform/aa-sdk/commit/37296d3003cae6c3d2bb96c34f1c628a4669572c)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([593e84c](https://github.com/alchemyplatform/aa-sdk/commit/593e84c027a697b757e3fd954564ff40cd1e11b0)) -- use brand accent color as icon colors ([#780](https://github.com/alchemyplatform/aa-sdk/issues/780)) ([d3d62b3](https://github.com/alchemyplatform/aa-sdk/commit/d3d62b35232f488fc0202de08922eca10416da5b)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -### Features - -- make it easier to start with account-kit/core ([#933](https://github.com/alchemyplatform/aa-sdk/issues/933)) ([b5714b6](https://github.com/alchemyplatform/aa-sdk/commit/b5714b6be15a4d7cb41c45911ca3cb42482aa85f)) - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Bug Fixes - -- add missing react-remove-scroll dep ([#804](https://github.com/alchemyplatform/aa-sdk/issues/804)) ([b5a1508](https://github.com/alchemyplatform/aa-sdk/commit/b5a1508d3cb19236b95d85f47aba385c6d9f3853)) -- add use client to a bunch of hooks that was misisng it ([#829](https://github.com/alchemyplatform/aa-sdk/issues/829)) ([ea06e81](https://github.com/alchemyplatform/aa-sdk/commit/ea06e81341c886714ec073892f8b3a3e81285931)) -- exporting queryClient and typing uiConfig in example ([#844](https://github.com/alchemyplatform/aa-sdk/issues/844)) ([b5f9fa5](https://github.com/alchemyplatform/aa-sdk/commit/b5f9fa5e3d70e6a4f9fc63972ee2b9ec757b695d)) -- lowercase strings in the UI components ([#784](https://github.com/alchemyplatform/aa-sdk/issues/784)) ([3b3b932](https://github.com/alchemyplatform/aa-sdk/commit/3b3b9326cd1219b175b21cc78ac583f701933d93)) -- merge base into this ([f9a6b2d](https://github.com/alchemyplatform/aa-sdk/commit/f9a6b2d801b909146c0e10bb072369992163ea69)) -- **react:** fix sign in header hiding itself ([#851](https://github.com/alchemyplatform/aa-sdk/issues/851)) ([2d13b05](https://github.com/alchemyplatform/aa-sdk/commit/2d13b054c6640cf44e0ec49a63c8fb0590c75a23)) -- **ui-demo:** signer state was being cleared when ui config changed ([#838](https://github.com/alchemyplatform/aa-sdk/issues/838)) ([5859449](https://github.com/alchemyplatform/aa-sdk/commit/58594490ec7c66a07053f94272f9fea5c30d2945)) -- use updated package path in prettier config ([#741](https://github.com/alchemyplatform/aa-sdk/issues/741)) ([6677ce8](https://github.com/alchemyplatform/aa-sdk/commit/6677ce833c5ab4385dc35da850897f44f363e1d1)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([b643981](https://github.com/alchemyplatform/aa-sdk/commit/b643981e900d9cabf6e273b5f7e9e75cd0c32c7d)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cb9d92](https://github.com/alchemyplatform/aa-sdk/commit/9cb9d9283db899d5a2f632767993c04135eb1de8)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- add ability to customize border radius in ui demo ([#785](https://github.com/alchemyplatform/aa-sdk/issues/785)) ([84e44e6](https://github.com/alchemyplatform/aa-sdk/commit/84e44e64eb8c6784e56f1d88c1bacfbd6dfa2502)) -- add border radius to account kit theme config ([#781](https://github.com/alchemyplatform/aa-sdk/issues/781)) ([e379588](https://github.com/alchemyplatform/aa-sdk/commit/e3795888e7acfb8920f2287bbfa9fa45a2df8fcc)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([3cdea84](https://github.com/alchemyplatform/aa-sdk/commit/3cdea8457d0a1fabd63d6d318a7bd1f62883d5b4)) -- add injected wallets to the UX ([#841](https://github.com/alchemyplatform/aa-sdk/issues/841)) ([1836333](https://github.com/alchemyplatform/aa-sdk/commit/1836333dce86e5efca7e61ea806fb964511a04d6)) -- add UI config defaults, better back navigation to auth UI ([#827](https://github.com/alchemyplatform/aa-sdk/issues/827)) ([def2112](https://github.com/alchemyplatform/aa-sdk/commit/def21124546e5ba48dbb3bb9b1fb90c2eaae4ee1)) -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([0a5a4ae](https://github.com/alchemyplatform/aa-sdk/commit/0a5a4ae7cc6914b05d471d010a161c7a8a8f303b)) -- enable linting class methods from exported classes ([4968d83](https://github.com/alchemyplatform/aa-sdk/commit/4968d838e903218d255bff0610babebd37c13413)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([4e645e9](https://github.com/alchemyplatform/aa-sdk/commit/4e645e97a745bfdd11d6174cb32c7f2eb556f803)) -- icon animations ([#717](https://github.com/alchemyplatform/aa-sdk/issues/717)) ([5126a9b](https://github.com/alchemyplatform/aa-sdk/commit/5126a9bad200720f173e738a7d3d4c26dd8ba3c9)) -- new and improved auth modal ([#761](https://github.com/alchemyplatform/aa-sdk/issues/761)) ([f32b499](https://github.com/alchemyplatform/aa-sdk/commit/f32b4992186023d928b9039e78fa2a7a521bfbce)) -- **react:** enable multi-owner la usage in core and react ([#893](https://github.com/alchemyplatform/aa-sdk/issues/893)) ([6d1bfc5](https://github.com/alchemyplatform/aa-sdk/commit/6d1bfc5ffde1a9ba814c06983939994ccceaa9f6)) -- read auth card props from context, simplify UI config ([#789](https://github.com/alchemyplatform/aa-sdk/issues/789)) ([2bfeff8](https://github.com/alchemyplatform/aa-sdk/commit/2bfeff88e1cc09f5abd5435c77b65756c0ba10bb)) -- respect OS or root class for dark mode ([#759](https://github.com/alchemyplatform/aa-sdk/issues/759)) ([5fec28e](https://github.com/alchemyplatform/aa-sdk/commit/5fec28ee00667f2f7a828e3858ea46a109dcfdb4)) -- smaller footer in UI components ([#811](https://github.com/alchemyplatform/aa-sdk/issues/811)) ([f4c889b](https://github.com/alchemyplatform/aa-sdk/commit/f4c889b373727987d7126292eaf3a50076945754)) -- some UI component polish from sync with product ([#831](https://github.com/alchemyplatform/aa-sdk/issues/831)) ([7a72dda](https://github.com/alchemyplatform/aa-sdk/commit/7a72dda8d8f2c075caf0bc23e7e7eab68d6b5295)) -- support different illustration styles ([#767](https://github.com/alchemyplatform/aa-sdk/issues/767)) ([6e4d1d7](https://github.com/alchemyplatform/aa-sdk/commit/6e4d1d74772ca78409e1e659904962483751584f)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([45582b1](https://github.com/alchemyplatform/aa-sdk/commit/45582b14e7116903f9b91cdd4bf2bb04de14ffa4)) -- use brand accent color as icon colors ([#780](https://github.com/alchemyplatform/aa-sdk/issues/780)) ([e26e858](https://github.com/alchemyplatform/aa-sdk/commit/e26e858e32139c2acc2130511b669448413a94d4)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @account-kit/react - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Bug Fixes - -- add missing react-remove-scroll dep ([#804](https://github.com/alchemyplatform/aa-sdk/issues/804)) ([8da7858](https://github.com/alchemyplatform/aa-sdk/commit/8da7858dc1be58661f6814d892515918e4ed4794)) -- add use client to a bunch of hooks that was misisng it ([#829](https://github.com/alchemyplatform/aa-sdk/issues/829)) ([77825b0](https://github.com/alchemyplatform/aa-sdk/commit/77825b0244bacaa61a380b5539d28dd4135e7860)) -- exporting queryClient and typing uiConfig in example ([#844](https://github.com/alchemyplatform/aa-sdk/issues/844)) ([289e5c1](https://github.com/alchemyplatform/aa-sdk/commit/289e5c19fbc88a96ec46297f67f96785e403797f)) -- lowercase strings in the UI components ([#784](https://github.com/alchemyplatform/aa-sdk/issues/784)) ([71a8b74](https://github.com/alchemyplatform/aa-sdk/commit/71a8b74d9b758381aa0de3565453d6e7484c9474)) -- merge base into this ([1409772](https://github.com/alchemyplatform/aa-sdk/commit/140977220c6e9cd32820a64e573c2d8070e9b603)) -- **react:** fix sign in header hiding itself ([#851](https://github.com/alchemyplatform/aa-sdk/issues/851)) ([a9a51e0](https://github.com/alchemyplatform/aa-sdk/commit/a9a51e0a54ce0bb294e32fafcd53f26b823ca278)) -- **ui-demo:** signer state was being cleared when ui config changed ([#838](https://github.com/alchemyplatform/aa-sdk/issues/838)) ([10274e4](https://github.com/alchemyplatform/aa-sdk/commit/10274e4be37cd32d0c6fe4a6327214bc854b8e3a)) -- use updated package path in prettier config ([#741](https://github.com/alchemyplatform/aa-sdk/issues/741)) ([622fe54](https://github.com/alchemyplatform/aa-sdk/commit/622fe543f17d125641d4bef056c16cb4ddf59dc7)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([8ef751e](https://github.com/alchemyplatform/aa-sdk/commit/8ef751eab7a2357caaa6d5d63cbc1907e90c39cb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cf1b77](https://github.com/alchemyplatform/aa-sdk/commit/9cf1b77e2ac738996af258e38879173184805a1c)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- add ability to customize border radius in ui demo ([#785](https://github.com/alchemyplatform/aa-sdk/issues/785)) ([b12c1f6](https://github.com/alchemyplatform/aa-sdk/commit/b12c1f66bb0d2a04a3aeb9765f91cfd10eea441a)) -- add border radius to account kit theme config ([#781](https://github.com/alchemyplatform/aa-sdk/issues/781)) ([9abbb88](https://github.com/alchemyplatform/aa-sdk/commit/9abbb88854a6ccf28eecdbf21aa828ad4d6d45b7)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([e177533](https://github.com/alchemyplatform/aa-sdk/commit/e17753377757b4e75f289224fe7e1c4575875286)) -- add injected wallets to the UX ([#841](https://github.com/alchemyplatform/aa-sdk/issues/841)) ([5686986](https://github.com/alchemyplatform/aa-sdk/commit/5686986a2be54cd7752ca5a037ed7cc0068cabd0)) -- add UI config defaults, better back navigation to auth UI ([#827](https://github.com/alchemyplatform/aa-sdk/issues/827)) ([08565dc](https://github.com/alchemyplatform/aa-sdk/commit/08565dc15698f37c5b5160258040fbbe4a041f65)) -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([cffda84](https://github.com/alchemyplatform/aa-sdk/commit/cffda8493deaf7cb29d4f93d40aa88cd63eb5b75)) -- enable linting class methods from exported classes ([2ee9eb9](https://github.com/alchemyplatform/aa-sdk/commit/2ee9eb979e1c079ae68a76e9156d6e143c0ce909)) -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([0020257](https://github.com/alchemyplatform/aa-sdk/commit/002025791b57b6aa3f5efd9858593ccb25918d97)) -- icon animations ([#717](https://github.com/alchemyplatform/aa-sdk/issues/717)) ([74c5425](https://github.com/alchemyplatform/aa-sdk/commit/74c542597bc0a30de9960a3069da413bbd494435)) -- new and improved auth modal ([#761](https://github.com/alchemyplatform/aa-sdk/issues/761)) ([02c33ea](https://github.com/alchemyplatform/aa-sdk/commit/02c33ea52b1466ca1428f6da1fde7786ddf837e3)) -- read auth card props from context, simplify UI config ([#789](https://github.com/alchemyplatform/aa-sdk/issues/789)) ([de6fff5](https://github.com/alchemyplatform/aa-sdk/commit/de6fff552bb746c22cc02dfd47b184df38795150)) -- respect OS or root class for dark mode ([#759](https://github.com/alchemyplatform/aa-sdk/issues/759)) ([30cfd28](https://github.com/alchemyplatform/aa-sdk/commit/30cfd2805c250be9f99af848bf57fe3bbed60872)) -- smaller footer in UI components ([#811](https://github.com/alchemyplatform/aa-sdk/issues/811)) ([9c1eaee](https://github.com/alchemyplatform/aa-sdk/commit/9c1eaeecee4cceae318ed13bce48dfe64bebec3d)) -- some UI component polish from sync with product ([#831](https://github.com/alchemyplatform/aa-sdk/issues/831)) ([f0f5922](https://github.com/alchemyplatform/aa-sdk/commit/f0f59223b242a4e189d627cc021e27fb68e19053)) -- support different illustration styles ([#767](https://github.com/alchemyplatform/aa-sdk/issues/767)) ([6e61d87](https://github.com/alchemyplatform/aa-sdk/commit/6e61d87ce466116be573a63d7b2a50b2388184ff)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c550465](https://github.com/alchemyplatform/aa-sdk/commit/c55046525d790001db4a9a305cade6f0d06ca90b)) -- use brand accent color as icon colors ([#780](https://github.com/alchemyplatform/aa-sdk/issues/780)) ([933dd13](https://github.com/alchemyplatform/aa-sdk/commit/933dd13c08a1f7ac94a5d3891668c58aa5afb620)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -### Bug Fixes - -- **react:** fix sign in header hiding itself ([#851](https://github.com/alchemyplatform/aa-sdk/issues/851)) ([f960fc6](https://github.com/alchemyplatform/aa-sdk/commit/f960fc6afeb39bfb13de920eb6878fe906e4e97e)) - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -### Bug Fixes - -- exporting queryClient and typing uiConfig in example ([#844](https://github.com/alchemyplatform/aa-sdk/issues/844)) ([52ca509](https://github.com/alchemyplatform/aa-sdk/commit/52ca5098f6a9e1ebe83db0be43856d2d0e702f00)) - -### Features - -- **erc7677:** create a new middle ware for erc7677 to replace gasManager middleWare ([#840](https://github.com/alchemyplatform/aa-sdk/issues/840)) ([62e2b59](https://github.com/alchemyplatform/aa-sdk/commit/62e2b59579e44f1825ae8224fb182aebd3c4f7e0)) - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Bug Fixes - -- add missing react-remove-scroll dep ([#804](https://github.com/alchemyplatform/aa-sdk/issues/804)) ([51bfd62](https://github.com/alchemyplatform/aa-sdk/commit/51bfd62d7d6f05adfd93ba2777655ff13b9b69ef)) -- add use client to a bunch of hooks that was misisng it ([#829](https://github.com/alchemyplatform/aa-sdk/issues/829)) ([160a336](https://github.com/alchemyplatform/aa-sdk/commit/160a336c9212f0ca6b69ef18fb68a86f8d3a7f6d)) -- lowercase strings in the UI components ([#784](https://github.com/alchemyplatform/aa-sdk/issues/784)) ([2a047e0](https://github.com/alchemyplatform/aa-sdk/commit/2a047e03ff24e58d4bdbabbaaeab45cf3cda065c)) -- merge base into this ([ea9ce2c](https://github.com/alchemyplatform/aa-sdk/commit/ea9ce2cabc407eec69aebe459446630142108f06)) -- **ui-demo:** signer state was being cleared when ui config changed ([#838](https://github.com/alchemyplatform/aa-sdk/issues/838)) ([4fc5509](https://github.com/alchemyplatform/aa-sdk/commit/4fc55096f9486d6598f2c71b6366a221a3b74aa8)) -- use updated package path in prettier config ([#741](https://github.com/alchemyplatform/aa-sdk/issues/741)) ([5c53efc](https://github.com/alchemyplatform/aa-sdk/commit/5c53efcbf2b4d983d9dcf2e831ef2ced2e9f7c50)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([3060a05](https://github.com/alchemyplatform/aa-sdk/commit/3060a05e895e6d6fef363276665f0d3d06c161fb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([22b8183](https://github.com/alchemyplatform/aa-sdk/commit/22b8183ae297648d43594f59578163da6b0ae9bc)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- add ability to customize border radius in ui demo ([#785](https://github.com/alchemyplatform/aa-sdk/issues/785)) ([08e47af](https://github.com/alchemyplatform/aa-sdk/commit/08e47af7c42cc379803cde5ebf50e8accfd2c139)) -- add border radius to account kit theme config ([#781](https://github.com/alchemyplatform/aa-sdk/issues/781)) ([9d308f8](https://github.com/alchemyplatform/aa-sdk/commit/9d308f814db1481a098aeddcde24bcf94c7cdbee)) -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([4102ae0](https://github.com/alchemyplatform/aa-sdk/commit/4102ae051a5a8ac03fb88f08adc8b3bca0f9737e)) -- add UI config defaults, better back navigation to auth UI ([#827](https://github.com/alchemyplatform/aa-sdk/issues/827)) ([0902810](https://github.com/alchemyplatform/aa-sdk/commit/090281067aff306536a2482df39f8da8f428e101)) -- clean up UI state on log out ([#832](https://github.com/alchemyplatform/aa-sdk/issues/832)) ([eb87340](https://github.com/alchemyplatform/aa-sdk/commit/eb8734031b0b8132b7d1e7d19f7b57dfeda920c3)) -- enable linting class methods from exported classes ([20df68e](https://github.com/alchemyplatform/aa-sdk/commit/20df68ecc722ee4c87b75f1880debe4591be5bb5)) -- icon animations ([#717](https://github.com/alchemyplatform/aa-sdk/issues/717)) ([e98a3e2](https://github.com/alchemyplatform/aa-sdk/commit/e98a3e25f795a5b6a4a05441df8734b431e23211)) -- new and improved auth modal ([#761](https://github.com/alchemyplatform/aa-sdk/issues/761)) ([4ba79d2](https://github.com/alchemyplatform/aa-sdk/commit/4ba79d2ca1c8c1b087cae8beb12a3b28c23c3978)) -- read auth card props from context, simplify UI config ([#789](https://github.com/alchemyplatform/aa-sdk/issues/789)) ([4b17859](https://github.com/alchemyplatform/aa-sdk/commit/4b178596431035a75a47b8ccd02c1f9201009b38)) -- respect OS or root class for dark mode ([#759](https://github.com/alchemyplatform/aa-sdk/issues/759)) ([b00e739](https://github.com/alchemyplatform/aa-sdk/commit/b00e739b07191c0791e044e2c9513022c662662f)) -- smaller footer in UI components ([#811](https://github.com/alchemyplatform/aa-sdk/issues/811)) ([0960dfe](https://github.com/alchemyplatform/aa-sdk/commit/0960dfe010607950797f59076e44cf23b5581adb)) -- some UI component polish from sync with product ([#831](https://github.com/alchemyplatform/aa-sdk/issues/831)) ([4d30643](https://github.com/alchemyplatform/aa-sdk/commit/4d306432ae5830cecaeb41097ceb52e78d41d9eb)) -- support different illustration styles ([#767](https://github.com/alchemyplatform/aa-sdk/issues/767)) ([119fb04](https://github.com/alchemyplatform/aa-sdk/commit/119fb046da61ca9139c664c42ed6a6d0184493fa)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([637bb95](https://github.com/alchemyplatform/aa-sdk/commit/637bb953d59bfd931652286dfc73497b0e0e288f)) -- use brand accent color as icon colors ([#780](https://github.com/alchemyplatform/aa-sdk/issues/780)) ([c42bf43](https://github.com/alchemyplatform/aa-sdk/commit/c42bf431ac3a43e9a6dcc41e140880266f674b45)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -### Bug Fixes - -- add use client to a bunch of hooks that was misisng it ([#829](https://github.com/alchemyplatform/aa-sdk/issues/829)) ([768505e](https://github.com/alchemyplatform/aa-sdk/commit/768505ef8122991067afbaa1a8977dd900bcea92)) - -### Features - -- smaller footer in UI components ([#811](https://github.com/alchemyplatform/aa-sdk/issues/811)) ([dfab5c8](https://github.com/alchemyplatform/aa-sdk/commit/dfab5c839dc782b21ba4d05f1892982133606cec)) - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -### Features - -- read auth card props from context, simplify UI config ([#789](https://github.com/alchemyplatform/aa-sdk/issues/789)) ([ac44833](https://github.com/alchemyplatform/aa-sdk/commit/ac448334ed87b3937c5401820d6fec06be80d529)) - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -**Note:** Version bump only for package @account-kit/react - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Bug Fixes - -- add missing react-remove-scroll dep ([#804](https://github.com/alchemyplatform/aa-sdk/issues/804)) ([1b97980](https://github.com/alchemyplatform/aa-sdk/commit/1b9798026cea202c797554bd4000f32958481507)) -- lowercase strings in the UI components ([#784](https://github.com/alchemyplatform/aa-sdk/issues/784)) ([e840d78](https://github.com/alchemyplatform/aa-sdk/commit/e840d78c1da9b032b780904b6419635bd464ff64)) -- use updated package path in prettier config ([#741](https://github.com/alchemyplatform/aa-sdk/issues/741)) ([e950d58](https://github.com/alchemyplatform/aa-sdk/commit/e950d580b01d1f862119f500a318c8469269c37d)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([0601453](https://github.com/alchemyplatform/aa-sdk/commit/060145386572026905f5720866722c5a20c9d7db)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([b2b7cc6](https://github.com/alchemyplatform/aa-sdk/commit/b2b7cc680860f3d416d11b66d626e715fae4cf8b)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- add ability to customize border radius in ui demo ([#785](https://github.com/alchemyplatform/aa-sdk/issues/785)) ([475a0e2](https://github.com/alchemyplatform/aa-sdk/commit/475a0e239f9100cc0ecddc324030647625b0bb7f)) -- add border radius to account kit theme config ([#781](https://github.com/alchemyplatform/aa-sdk/issues/781)) ([9493ed4](https://github.com/alchemyplatform/aa-sdk/commit/9493ed4e491afea8cbf9ffb707de638677e71202)) -- icon animations ([#717](https://github.com/alchemyplatform/aa-sdk/issues/717)) ([a4f9107](https://github.com/alchemyplatform/aa-sdk/commit/a4f9107571933fe26e3102dae0da3076f3c4a249)) -- new and improved auth modal ([#761](https://github.com/alchemyplatform/aa-sdk/issues/761)) ([43f103f](https://github.com/alchemyplatform/aa-sdk/commit/43f103f87b1e5358d6f7211dca9337097a30f200)) -- respect OS or root class for dark mode ([#759](https://github.com/alchemyplatform/aa-sdk/issues/759)) ([6a43fe6](https://github.com/alchemyplatform/aa-sdk/commit/6a43fe63639a825c168eac2ef03b189044755690)) -- support different illustration styles ([#767](https://github.com/alchemyplatform/aa-sdk/issues/767)) ([97d0009](https://github.com/alchemyplatform/aa-sdk/commit/97d00098961ea8bed47fd6c963fcf3980b950a10)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([4c0b2f1](https://github.com/alchemyplatform/aa-sdk/commit/4c0b2f19a59272940b3fe40c610c06ad8c49d70e)) -- use brand accent color as icon colors ([#780](https://github.com/alchemyplatform/aa-sdk/issues/780)) ([a91dd04](https://github.com/alchemyplatform/aa-sdk/commit/a91dd04fe1c7b175ffdae2773a0aa56fac9ae3c8)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Bug Fixes - -- lowercase strings in the UI components ([#784](https://github.com/alchemyplatform/aa-sdk/issues/784)) ([1bd922c](https://github.com/alchemyplatform/aa-sdk/commit/1bd922c68c005134b88e9b7a99aa3065dcea56f4)) -- use updated package path in prettier config ([#741](https://github.com/alchemyplatform/aa-sdk/issues/741)) ([420b9ee](https://github.com/alchemyplatform/aa-sdk/commit/420b9ee1eb768f0b4124ee1f872fabc851ca35b9)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([9d81aaf](https://github.com/alchemyplatform/aa-sdk/commit/9d81aafe89b2dc49e2ab2c44556c81c3010c1fa2)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([c92a07f](https://github.com/alchemyplatform/aa-sdk/commit/c92a07fdb39d652fe5c95326d47a929b3b3278ed)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- add border radius to account kit theme config ([#781](https://github.com/alchemyplatform/aa-sdk/issues/781)) ([49d869c](https://github.com/alchemyplatform/aa-sdk/commit/49d869cb665dd508b6426c6efff9f1425bda113a)) -- icon animations ([#717](https://github.com/alchemyplatform/aa-sdk/issues/717)) ([dab1237](https://github.com/alchemyplatform/aa-sdk/commit/dab1237feaf2d6e11c19f44720090dd830669866)) -- new and improved auth modal ([#761](https://github.com/alchemyplatform/aa-sdk/issues/761)) ([2795e69](https://github.com/alchemyplatform/aa-sdk/commit/2795e6938006a853b737fa0404bc21883c416072)) -- respect OS or root class for dark mode ([#759](https://github.com/alchemyplatform/aa-sdk/issues/759)) ([ecd5b01](https://github.com/alchemyplatform/aa-sdk/commit/ecd5b0187b1cba9c0f7a9a9777aebac580ad60e0)) -- support different illustration styles ([#767](https://github.com/alchemyplatform/aa-sdk/issues/767)) ([278e478](https://github.com/alchemyplatform/aa-sdk/commit/278e478bd83aecabc8e74ef122d380a5ce0ef9d8)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([082d363](https://github.com/alchemyplatform/aa-sdk/commit/082d363923684ae3bc45edf544c8536ff3c42379)) -- use brand accent color as icon colors ([#780](https://github.com/alchemyplatform/aa-sdk/issues/780)) ([10fd04d](https://github.com/alchemyplatform/aa-sdk/commit/10fd04d42e11817c67f8903c4ec277fc0163ac1c)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Bug Fixes - -- use updated package path in prettier config ([#741](https://github.com/alchemyplatform/aa-sdk/issues/741)) ([dccda3a](https://github.com/alchemyplatform/aa-sdk/commit/dccda3a738ceabe6ed2703cb66d0aec5e595abcd)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([d2f97c5](https://github.com/alchemyplatform/aa-sdk/commit/d2f97c56fdf63871296dd81b10cbc60b61b34d6c)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([6c41e22](https://github.com/alchemyplatform/aa-sdk/commit/6c41e22233932ee98c6214f2ffdf3e8f928f880f)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- icon animations ([#717](https://github.com/alchemyplatform/aa-sdk/issues/717)) ([710e647](https://github.com/alchemyplatform/aa-sdk/commit/710e64750c18b46390585e343ca4f1638feb67a5)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c5465ee](https://github.com/alchemyplatform/aa-sdk/commit/c5465eee5c957afcb02d3e0d82c5821dd7819b5f)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages diff --git a/account-kit/react/inject-version.ts b/account-kit/react/inject-version.ts deleted file mode 100644 index 05e1caae82..0000000000 --- a/account-kit/react/inject-version.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync, writeFileSync } from "fs"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const VERSION_FILE_PATH = "src/version.ts"; - -const packageJSON = JSON.parse(readFileSync("./package.json").toString()); - -writeFileSync( - resolve(__dirname, VERSION_FILE_PATH), - `// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "${packageJSON.version}"; -`, -); -console.log(`Wrote version to ${VERSION_FILE_PATH}.`); diff --git a/account-kit/react/package.json b/account-kit/react/package.json deleted file mode 100644 index eb0be75841..0000000000 --- a/account-kit/react/package.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "name": "@account-kit/react", - "version": "4.84.1", - "description": "React components and hooks for using Smart Wallets", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "src/**/*.tsx", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - }, - "./styles.css": "./dist/styles.css", - "./tailwind": { - "types": "./dist/types/tailwind/index.d.ts", - "import": "./dist/esm/tailwind/index.js", - "default": "./dist/esm/tailwind/index.js" - }, - "./alchemy-account-context": { - "types": "./dist/types/AlchemyAccountContext.d.ts", - "import": "./dist/esm/AlchemyAccountContext.js", - "default": "./dist/esm/AlchemyAccountContext.js" - }, - "./hydrate": { - "types": "./dist/types/hydrate.d.ts", - "import": "./dist/esm/hydrate.js", - "default": "./dist/esm/hydrate.js" - }, - "./hooks": { - "types": "./dist/types/hooks/index.d.ts", - "import": "./dist/esm/hooks/index.js", - "default": "./dist/esm/hooks/index.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "dev": "storybook dev", - "build": "yarn clean && yarn build:css && yarn build:esm && yarn build:types", - "build:css": "postcss src/styles/index.css -o dist/styles.css", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest --passWithNoTests", - "test:run": "vitest run --passWithNoTests" - }, - "devDependencies": { - "@storybook/addon-essentials": "^8.5.3", - "@storybook/addon-interactions": "^8.5.3", - "@storybook/core-server": "^8.5.3", - "@storybook/jest": "^0.2.3", - "@storybook/react-vite": "^8.5.3", - "@storybook/test": "^8.5.3", - "@storybook/testing-library": "^0.2.2", - "@tanstack/react-query": "^5.28.9", - "@types/bs58": "^4.0.4", - "autoprefixer": "^10.4.20", - "msw": "^2.4.4", - "msw-storybook-addon": "^2.0.4", - "postcss": "^8.4.45", - "postcss-cli": "^11.0.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "storybook": "^8.5.3", - "tailwindcss": "^3.4.3", - "typescript-template": "*" - }, - "dependencies": { - "@account-kit/core": "^4.84.1", - "@account-kit/infra": "^4.84.1", - "@account-kit/logging": "^4.84.1", - "@account-kit/signer": "^4.84.1", - "@account-kit/wallet-client": "^4.84.1", - "@solana/wallet-adapter-react": "^0.15.39", - "@solana/wallet-adapter-wallets": "^0.19.37", - "@solana/web3.js": "^1.98.0", - "@tanstack/react-form": "^0.33.0", - "@tanstack/zod-form-adapter": "^0.33.0", - "@wagmi/connectors": "^5.1.15", - "bs58": "^6.0.0", - "react-remove-scroll": "^2.5.10", - "zod": "^3.22.4", - "zustand": "^5.0.0-rc.2" - }, - "peerDependencies": { - "@tanstack/react-query": "^5.28.9", - "react": ">=18.2.0", - "react-dom": ">=18.2.0", - "viem": "^2.45.0", - "wagmi": "^2.15.5" - }, - "resolutions": { - "viem": "^2.45.0" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d", - "optionalDependencies": { - "alchemy-sdk": "^3.0.0" - }, - "msw": { - "workerDirectory": [ - "public" - ] - } -} diff --git a/account-kit/react/postcss.config.js b/account-kit/react/postcss.config.js deleted file mode 100644 index a982c6414e..0000000000 --- a/account-kit/react/postcss.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const config = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; - -export default config; diff --git a/account-kit/react/public/mockServiceWorker.js b/account-kit/react/public/mockServiceWorker.js deleted file mode 100644 index 0a291a3e29..0000000000 --- a/account-kit/react/public/mockServiceWorker.js +++ /dev/null @@ -1,284 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ - -/** - * Mock Service Worker. - * @see https://github.com/mswjs/msw - * - Please do NOT modify this file. - * - Please do NOT serve this file on production. - */ - -const PACKAGE_VERSION = "2.4.4"; -const INTEGRITY_CHECKSUM = "26357c79639bfa20d64c0efca2a87423"; -const IS_MOCKED_RESPONSE = Symbol("isMockedResponse"); -const activeClientIds = new Set(); - -self.addEventListener("install", function () { - self.skipWaiting(); -}); - -self.addEventListener("activate", function (event) { - event.waitUntil(self.clients.claim()); -}); - -self.addEventListener("message", async function (event) { - const clientId = event.source.id; - - if (!clientId || !self.clients) { - return; - } - - const client = await self.clients.get(clientId); - - if (!client) { - return; - } - - const allClients = await self.clients.matchAll({ - type: "window", - }); - - switch (event.data) { - case "KEEPALIVE_REQUEST": { - sendToClient(client, { - type: "KEEPALIVE_RESPONSE", - }); - break; - } - - case "INTEGRITY_CHECK_REQUEST": { - sendToClient(client, { - type: "INTEGRITY_CHECK_RESPONSE", - payload: { - packageVersion: PACKAGE_VERSION, - checksum: INTEGRITY_CHECKSUM, - }, - }); - break; - } - - case "MOCK_ACTIVATE": { - activeClientIds.add(clientId); - - sendToClient(client, { - type: "MOCKING_ENABLED", - payload: true, - }); - break; - } - - case "MOCK_DEACTIVATE": { - activeClientIds.delete(clientId); - break; - } - - case "CLIENT_CLOSED": { - activeClientIds.delete(clientId); - - const remainingClients = allClients.filter((client) => { - return client.id !== clientId; - }); - - // Unregister itself when there are no more clients - if (remainingClients.length === 0) { - self.registration.unregister(); - } - - break; - } - } -}); - -self.addEventListener("fetch", function (event) { - const { request } = event; - - // Bypass navigation requests. - if (request.mode === "navigate") { - return; - } - - // Opening the DevTools triggers the "only-if-cached" request - // that cannot be handled by the worker. Bypass such requests. - if (request.cache === "only-if-cached" && request.mode !== "same-origin") { - return; - } - - // Bypass all requests when there are no active clients. - // Prevents the self-unregistered worked from handling requests - // after it's been deleted (still remains active until the next reload). - if (activeClientIds.size === 0) { - return; - } - - // Generate unique request ID. - const requestId = crypto.randomUUID(); - event.respondWith(handleRequest(event, requestId)); -}); - -async function handleRequest(event, requestId) { - const client = await resolveMainClient(event); - const response = await getResponse(event, client, requestId); - - // Send back the response clone for the "response:*" life-cycle events. - // Ensure MSW is active and ready to handle the message, otherwise - // this message will pend indefinitely. - if (client && activeClientIds.has(client.id)) { - (async function () { - const responseClone = response.clone(); - - sendToClient( - client, - { - type: "RESPONSE", - payload: { - requestId, - isMockedResponse: IS_MOCKED_RESPONSE in response, - type: responseClone.type, - status: responseClone.status, - statusText: responseClone.statusText, - body: responseClone.body, - headers: Object.fromEntries(responseClone.headers.entries()), - }, - }, - [responseClone.body], - ); - })(); - } - - return response; -} - -// Resolve the main client for the given event. -// Client that issues a request doesn't necessarily equal the client -// that registered the worker. It's with the latter the worker should -// communicate with during the response resolving phase. -async function resolveMainClient(event) { - const client = await self.clients.get(event.clientId); - - if (client?.frameType === "top-level") { - return client; - } - - const allClients = await self.clients.matchAll({ - type: "window", - }); - - return allClients - .filter((client) => { - // Get only those clients that are currently visible. - return client.visibilityState === "visible"; - }) - .find((client) => { - // Find the client ID that's recorded in the - // set of clients that have registered the worker. - return activeClientIds.has(client.id); - }); -} - -async function getResponse(event, client, requestId) { - const { request } = event; - - // Clone the request because it might've been already used - // (i.e. its body has been read and sent to the client). - const requestClone = request.clone(); - - function passthrough() { - const headers = Object.fromEntries(requestClone.headers.entries()); - - // Remove internal MSW request header so the passthrough request - // complies with any potential CORS preflight checks on the server. - // Some servers forbid unknown request headers. - delete headers["x-msw-intention"]; - - return fetch(requestClone, { headers }); - } - - // Bypass mocking when the client is not active. - if (!client) { - return passthrough(); - } - - // Bypass initial page load requests (i.e. static assets). - // The absence of the immediate/parent client in the map of the active clients - // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet - // and is not ready to handle requests. - if (!activeClientIds.has(client.id)) { - return passthrough(); - } - - // Notify the client that a request has been intercepted. - const requestBuffer = await request.arrayBuffer(); - const clientMessage = await sendToClient( - client, - { - type: "REQUEST", - payload: { - id: requestId, - url: request.url, - mode: request.mode, - method: request.method, - headers: Object.fromEntries(request.headers.entries()), - cache: request.cache, - credentials: request.credentials, - destination: request.destination, - integrity: request.integrity, - redirect: request.redirect, - referrer: request.referrer, - referrerPolicy: request.referrerPolicy, - body: requestBuffer, - keepalive: request.keepalive, - }, - }, - [requestBuffer], - ); - - switch (clientMessage.type) { - case "MOCK_RESPONSE": { - return respondWithMock(clientMessage.data); - } - - case "PASSTHROUGH": { - return passthrough(); - } - } - - return passthrough(); -} - -function sendToClient(client, message, transferrables = []) { - return new Promise((resolve, reject) => { - const channel = new MessageChannel(); - - channel.port1.onmessage = (event) => { - if (event.data && event.data.error) { - return reject(event.data.error); - } - - resolve(event.data); - }; - - client.postMessage( - message, - [channel.port2].concat(transferrables.filter(Boolean)), - ); - }); -} - -async function respondWithMock(response) { - // Setting response status code to 0 is a no-op. - // However, when responding with a "Response.error()", the produced Response - // instance will have status code set to 0. Since it's not possible to create - // a Response instance with status code 0, handle that use-case separately. - if (response.status === 0) { - return Response.error(); - } - - const mockedResponse = new Response(response.body, response); - - Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, { - value: true, - enumerable: true, - }); - - return mockedResponse; -} diff --git a/account-kit/react/src/AlchemyAccountContext.ts b/account-kit/react/src/AlchemyAccountContext.ts deleted file mode 100644 index 2f37e2cf92..0000000000 --- a/account-kit/react/src/AlchemyAccountContext.ts +++ /dev/null @@ -1,14 +0,0 @@ -"use client"; - -import type { AlchemyAccountsConfig } from "@account-kit/core"; -import { type QueryClient } from "@tanstack/react-query"; -import { createContext } from "react"; - -export type AlchemyAccountContextProps = { - config: AlchemyAccountsConfig; - queryClient: QueryClient; -}; - -export const AlchemyAccountContext = createContext< - AlchemyAccountContextProps | undefined ->(undefined); diff --git a/account-kit/react/src/AlchemyAccountProvider.tsx b/account-kit/react/src/AlchemyAccountProvider.tsx deleted file mode 100644 index ac893b7e03..0000000000 --- a/account-kit/react/src/AlchemyAccountProvider.tsx +++ /dev/null @@ -1,131 +0,0 @@ -"use client"; - -import { AlchemySignerStatus } from "@account-kit/signer"; -import { QueryClientProvider } from "@tanstack/react-query"; -import { useCallback, useEffect, useMemo, useState } from "react"; -import { AuthModalContext, type AuthStep } from "./components/auth/context.js"; -import { AuthModal } from "./components/auth/modal.js"; -import { IS_SIGNUP_QP } from "./components/constants.js"; -import { useSignerStatus } from "./hooks/useSignerStatus.js"; -import { UiConfigProvider } from "./hooks/useUiConfig.js"; -import { Hydrate } from "./hydrate.js"; -import { AlchemyAccountContext } from "./AlchemyAccountContext.js"; -import { SolanaWalletProvider } from "./components/SolanaWalletProvider.js"; -import type { AlchemyClientState } from "@account-kit/core"; -import { type QueryClient } from "@tanstack/react-query"; -import type { AlchemyAccountsConfigWithUI } from "./createConfig.js"; - -export type AlchemyAccountsProviderProps = { - config: AlchemyAccountsConfigWithUI; - initialState?: AlchemyClientState; - queryClient: QueryClient; -}; - -/** - * Provider for Alchemy accounts. - * - * @example - * ```tsx - * import { AlchemyAccountProvider, createConfig } from "@account-kit/react"; - * import { sepolia } from "@account-kit/infra"; - * import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; - * - * const config = createConfig({ - * apiKey: "your-api-key", - * chain: sepolia, - * }); - * - * const queryClient = new QueryClient(); - * - * function App({ children }: React.PropsWithChildren) { - * return ( - * - * - * {children} - * - * - * ); - * } - * ``` - * - * @param {React.PropsWithChildren} props alchemy accounts provider props - * @param {AlchemyAccountsConfig} props.config the acccount config generated using `createConfig` - * @param {QueryClient} props.queryClient the react-query query client to use - * @param {AlchemyAccountsUIConfig} props.uiConfig optional UI configuration - * @param {React.ReactNode | undefined} props.children react components that should have this accounts context - * @returns {React.JSX.Element} The element to wrap your application in for Alchemy Accounts context. - */ -export const AlchemyAccountProvider = ( - props: React.PropsWithChildren, -) => { - const { config, queryClient, children } = props; - - const clearSignupParam = () => { - const url = new URL(window.location.href); - url.searchParams.delete(IS_SIGNUP_QP); - window.history.replaceState(window.history.state, "", url.toString()); - }; - - /** - * Reset the auth step to the initial state. This also clears the email auth query params from the URL. - */ - const resetAuthStep = useCallback(() => { - setAuthStep({ type: "initial" }); - - clearSignupParam(); - }, []); - - const initialContext = useMemo(() => { - return { - config, - queryClient, - }; - }, [config, queryClient]); - - const { status } = useSignerStatus(initialContext); - - const [authStep, setAuthStep] = useState(() => { - if (status === AlchemySignerStatus.AUTHENTICATING_EMAIL) { - return { - type: "email_completing", - }; - } - - return { - type: "initial", - }; - }); - - useEffect(() => { - if (authStep.type === "complete") { - clearSignupParam(); - } - }, [authStep]); - - return ( - - - - - {config.ui ? ( - - - {children} - - - - ) : ( - children - )} - - - - - ); -}; diff --git a/account-kit/react/src/components/SolanaWalletProvider.tsx b/account-kit/react/src/components/SolanaWalletProvider.tsx deleted file mode 100644 index b046b98b87..0000000000 --- a/account-kit/react/src/components/SolanaWalletProvider.tsx +++ /dev/null @@ -1,35 +0,0 @@ -"use client"; - -import { - WalletProvider, - ConnectionProvider, -} from "@solana/wallet-adapter-react"; -import { useSolanaAdapters } from "../hooks/useSolanaAdapters.js"; -import { useAlchemyAccountContext } from "../hooks/useAlchemyAccountContext.js"; -import type { ReactNode } from "react"; - -interface SolanaWalletProviderProps { - children: ReactNode; -} - -export function SolanaWalletProvider({ children }: SolanaWalletProviderProps) { - const solana = useAlchemyAccountContext().config.solana; - const walletsAdapters = useSolanaAdapters(); - - // Short-circuit if no Solana adapters - don't load the connection provider or wallet provider - if ( - !solana || - !solana.adapters || - (Array.isArray(solana.adapters) && solana.adapters.length === 0) - ) { - return <>{children}; - } - - return ( - - - {children} - - - ); -} diff --git a/account-kit/react/src/components/auth/card/add-passkey.tsx b/account-kit/react/src/components/auth/card/add-passkey.tsx deleted file mode 100644 index 6de8a97b7a..0000000000 --- a/account-kit/react/src/components/auth/card/add-passkey.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { useAddPasskey } from "../../../hooks/useAddPasskey.js"; -import { AddPasskeyIllustration } from "../../../icons/illustrations/add-passkey.js"; -import { - PasskeyShieldIllustration, - PasskeySmileyIllustration, -} from "../../../icons/illustrations/passkeys.js"; -import { ReactLogger } from "../../../metrics.js"; -import { ls } from "../../../strings.js"; -import { Button } from "../../button.js"; -import { useAuthContext } from "../context.js"; -import { ConnectionError } from "./error/connection-error.js"; -import { ConnectionFailed as PasskeyConnectionFailed } from "../../../icons/connectionFailed.js"; - -const BENEFITS = [ - { - icon: PasskeySmileyIllustration, - title: ls.addPasskey.simplerLoginTitle, - description: ls.addPasskey.simplerLoginDescription, - }, - { - icon: PasskeyShieldIllustration, - title: ls.addPasskey.enhancedSecurityTitle, - description: ls.addPasskey.enhancedSecurityDescription, - }, -]; - -export const AddPasskey = () => { - const { setAuthStep, authStep } = useAuthContext("passkey_create"); - const { addPasskey, isAddingPasskey } = useAddPasskey({ - onSuccess: () => { - ReactLogger.trackEvent({ - name: "add_passkey_on_signup_success", - }); - - setAuthStep({ type: "passkey_create_success" }); - }, - onError: () => { - setAuthStep({ - type: "passkey_create", - error: new Error("Failed to add passkey"), - }); - }, - }); - - if (authStep.error) { - return ( - } - shouldDisconnect={false} - handleTryAgain={addPasskey} - handleSkip={() => setAuthStep({ type: "complete" })} - /> - ); - } - - return ( -
-
- -
- -

{ls.addPasskey.title}

- -
- {BENEFITS.map(({ title, icon: Icon, description }) => ( -
-
- -
-
-

{title}

-

{description}

-
-
- ))} -
- -
- - -
-
- ); -}; diff --git a/account-kit/react/src/components/auth/card/content.tsx b/account-kit/react/src/components/auth/card/content.tsx deleted file mode 100644 index 46c890f952..0000000000 --- a/account-kit/react/src/components/auth/card/content.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import type { ReactNode } from "react"; - -interface CardContentProps { - header: ReactNode | string; - icon?: ReactNode; - description: ReactNode | string; - error?: Error | string; - className?: string; - secondaryButton?: { - title: string; - onClick: () => void; - }; -} - -// eslint-disable-next-line jsdoc/require-jsdoc -export const CardContent = ({ - header, - icon, - description, - secondaryButton, - className, -}: CardContentProps) => { - return ( - <> -
- {icon && ( -
- {icon} -
- )} - {header} - {typeof description === "string" ? ( -

- {description} -

- ) : ( - description - )} -
- {secondaryButton && ( - - )} - - ); -}; diff --git a/account-kit/react/src/components/auth/card/eoa.tsx b/account-kit/react/src/components/auth/card/eoa.tsx deleted file mode 100644 index 72bb841bf1..0000000000 --- a/account-kit/react/src/components/auth/card/eoa.tsx +++ /dev/null @@ -1,389 +0,0 @@ -// eoa.tsx -"use client"; - -import { walletConnect } from "wagmi/connectors"; -import { useChain } from "../../../hooks/useChain.js"; -import { Spinner } from "../../../icons/spinner.js"; -import { WalletConnectIcon } from "../../../icons/walletConnectIcon.js"; -import { ls } from "../../../strings.js"; -import { useAuthContext } from "../context.js"; -import { useConnectEOA } from "../hooks/useConnectEOA.js"; -import { useWalletConnectAuthConfig } from "../hooks/useWalletConnectAuthConfig.js"; -import { CardContent } from "./content.js"; -import { ConnectionError } from "./error/connection-error.js"; -import { WalletIcon } from "./error/icons/wallet-icon.js"; -import { useConnectSolanaEOA } from "../hooks/useConnectSolanaEOA.js"; -import { - WalletButton, - WalletConnectButton, - SolanaWalletButton, -} from "../wallet-buttons/index.js"; -import { useWalletAvailability } from "../../../hooks/internal/useWalletDeduplication.js"; -import { getWalletIcon } from "../wallet-buttons/walletIcons.js"; -import { useUiConfig } from "../../../hooks/useUiConfig.js"; -import { useMemo } from "react"; - -export const WALLET_CONNECT = "walletConnect"; - -const norm = (s?: string) => (s ?? "").toLowerCase(); -const isWC = (name: string) => { - const n = norm(name); - return ( - n === "wallet_connect" || n === "wallet connect" || n === "walletconnect" - ); -}; -const orderChains = (chains: string[]) => - [...chains].sort((a, b) => - a === "evm" && b === "svm" ? -1 : a === "svm" && b === "evm" ? 1 : 0, - ); - -// Find the external_wallets section whether it's at config.sections or nested in config.auth.sections (possibly grouped) -const getExternalWalletsSection = ( - cfg: any, -): - | { type: "external_wallets"; wallets?: string[]; chainType?: string[] } - | undefined => { - const pick = (arr: any[]) => - arr?.find( - (s) => s && typeof s === "object" && s.type === "external_wallets", - ); - - if (Array.isArray(cfg?.sections)) { - const sec = pick(cfg.sections); - if (sec) return sec; - } - if (Array.isArray(cfg?.auth?.sections)) { - const groups = cfg.auth.sections; - const flat = groups.flat(); - const sec = pick(flat); - if (sec) return sec; - } - return undefined; -}; -// --------------------------------------------- - -export const EoaConnectCard = () => { - const { setAuthStep, authStep } = useAuthContext("eoa_connect"); - const { connect: connectEvm } = useConnectEOA(); - const { connect: connectSolana } = useConnectSolanaEOA(); - const { chain } = useChain(); - - const connector = - authStep.chain === "evm" - ? { icon: authStep.connector.icon, name: authStep.connector.name } - : { - icon: authStep.wallet.adapter.icon, - name: authStep.wallet.adapter.name, - }; - - if (authStep.error) { - const errorMessage = getErrorMessage(authStep.error, connector.name); - - return ( - } - headerText={errorMessage.heading} - bodyText={errorMessage.body} - tryAgainCTA={errorMessage.tryAgainCTA} - handleTryAgain={() => { - setAuthStep({ - type: "eoa_connect", - ...(authStep.chain === "evm" - ? { connector: authStep.connector, chain: "evm" } - : { wallet: authStep.wallet, chain: "svm" }), - }); - - if (authStep.chain === "evm") { - connectEvm({ - connector: authStep.connector, - chainId: chain.id, - }); - } else { - connectSolana(authStep.wallet); - } - }} - handleUseAnotherMethod={() => setAuthStep({ type: "pick_eoa" })} - /> - ); - } - - return ( - - {connector?.icon ? ( - {connector.name} - ) : ( - (() => { - const IconComponent = getWalletIcon(connector.name); - return IconComponent ? ( - - ) : ( -
- ); - })() - )} -
- -
-
- } - description="Please follow the instructions in your wallet to connect." - error={authStep.error} - secondaryButton={{ - title: "Cancel", - onClick: async () => { - setAuthStep({ type: "initial" }); - }, - }} - /> - ); -}; - -export const WalletConnectCard = () => { - const { setAuthStep, authStep } = useAuthContext("wallet_connect"); - const { walletConnectParams } = useWalletConnectAuthConfig(); - const { chain } = useChain(); - - const walletConnectConnector = walletConnectParams - ? walletConnect(walletConnectParams) - : null; - - const { connect } = useConnectEOA(); - - if (!walletConnectConnector) { - setAuthStep({ - type: "wallet_connect", - error: new Error("WalletConnect params not found"), - }); - - return null; - } - - if (authStep.error) { - const errorMessage = getErrorMessage(authStep.error, "WalletConnect"); - - return ( - } - handleTryAgain={() => { - setAuthStep({ type: "wallet_connect" }); - // Re-try wallet connect's connection... - connect({ - connector: walletConnectConnector, - chainId: chain.id, - }); - }} - handleUseAnotherMethod={() => setAuthStep({ type: "pick_eoa" })} - /> - ); - } - - // If error render the error card here? - return ( - - -
- -
- - } - description={"Please follow the instructions in the popup to connect."} - error={authStep.error} - secondaryButton={{ - title: "Cancel", - onClick: async () => { - // Ensure to stop all inflight requests - setAuthStep({ type: "initial" }); - }, - }} - /> - ); -}; - -export const EoaPickCard = () => { - const { walletConnectParams } = useWalletConnectAuthConfig(); - const { uniqueConnectors, filteredSolanaWallets } = useWalletAvailability(); - - // Pull the external_wallets section (wallet list + chainType) - const uiConfig = useUiConfig(); - const externalSection = useMemo( - () => getExternalWalletsSection(uiConfig), - [uiConfig], - ); - - const preferredWalletNames = useMemo( - () => externalSection?.wallets ?? [], - [externalSection], - ); - - // Chains allowed by config (default to both); keep EVM before SVM for join - const allowedChains = useMemo( - () => - Array.isArray(externalSection?.chainType) && - (externalSection!.chainType as string[]).length > 0 - ? (externalSection!.chainType as string[]) - : ["evm", "svm"], - [externalSection], - ); - - const orderedChains = useMemo( - () => orderChains(allowedChains), - [allowedChains], - ); - - // Build the ordered, joined list of wallet buttons: - const buttons = useMemo(() => { - const out: JSX.Element[] = []; - const counted = new Set(); - - const allNamesInEnv: string[] = []; - - // Respect chain filter when discovering names - if (allowedChains.includes("evm")) { - uniqueConnectors.forEach((c) => { - const n = norm(c.name); - if (!allNamesInEnv.includes(n)) allNamesInEnv.push(n); - }); - // WalletConnect is EVM-only - if (walletConnectParams) { - allNamesInEnv.push("wallet_connect"); - } - } - - if (allowedChains.includes("svm")) { - filteredSolanaWallets.forEach((w) => { - const n = norm(w.adapter.name); - if (!allNamesInEnv.includes(n)) allNamesInEnv.push(n); - }); - } - - const pushByName = (nameRaw: string) => { - const n = norm(nameRaw); - if (counted.has(n)) return; - - // WalletConnect (EVM-only) - if (isWC(n)) { - if (walletConnectParams && allowedChains.includes("evm")) { - out.push(); - counted.add(n); - } - return; - } - - const elems: JSX.Element[] = []; - for (const chain of orderedChains) { - if (chain === "evm") { - const conn = uniqueConnectors.find((c) => norm(c.name) === n); - if (conn) - elems.push( - , - ); - } else if (chain === "svm") { - const sol = filteredSolanaWallets.find( - (w) => norm(w.adapter.name) === n, - ); - if (sol) - elems.push( - , - ); - } - } - - if (elems.length) { - out.push(...elems); // join both if available under allowed chains - counted.add(n); - } - }; - - // 1) Preferred order from config (no cap) - for (const name of preferredWalletNames) { - pushByName(name); - } - - // 2) Append any remaining wallets not listed in config - for (const name of allNamesInEnv) { - if (!counted.has(norm(name))) pushByName(name); - } - - return out; - }, [ - preferredWalletNames, - orderedChains, - uniqueConnectors, - filteredSolanaWallets, - walletConnectParams, - allowedChains, - ]); - - const hasAnyVisibleWallets = useMemo(() => { - const evmVisible = - allowedChains.includes("evm") && - (uniqueConnectors.length > 0 || !!walletConnectParams); - const svmVisible = - allowedChains.includes("svm") && filteredSolanaWallets.length > 0; - return evmVisible || svmVisible; - }, [ - allowedChains, - uniqueConnectors, - filteredSolanaWallets, - walletConnectParams, - ]); - - return ( - {buttons} - ) : ( - "No wallets available" - ) - } - /> - ); -}; - -const getErrorMessage = (error: Error, walletName: string) => { - if (error.message.includes("ChainId not found")) { - return ls.error.customErrorMessages.eoa.walletConnect.chainIdNotFound; - } - - if (error.message.includes("WalletConnect params not found")) { - return ls.error.customErrorMessages.eoa.walletConnect - .walletConnectParamsNotFound; - } - - // Use default error message - return { - ...ls.error.customErrorMessages.eoa.default, - heading: `${ls.error.customErrorMessages.eoa.default.heading} ${walletName}`, - }; -}; diff --git a/account-kit/react/src/components/auth/card/error/connection-error.stories.tsx b/account-kit/react/src/components/auth/card/error/connection-error.stories.tsx deleted file mode 100644 index 9d89d620e9..0000000000 --- a/account-kit/react/src/components/auth/card/error/connection-error.stories.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import type { Meta, StoryObj } from "@storybook/react"; -import { ConnectionError } from "./connection-error.jsx"; -import { ConnectionFailed } from "../../../../icons/connectionFailed.jsx"; -import { ls } from "../../../../strings.js"; -import { OAuthConnectionFailed } from "../../../../icons/oauth.jsx"; -import { WalletIcon } from "./icons/wallet-icon.jsx"; -import { WALLET_CONNECT } from "../eoa.jsx"; - -const meta: Meta = { - title: "Errors/ConnectionError", - component: ConnectionError, -}; -export default meta; -type Story = StoryObj; - -export const Passkey: Story = { - args: { - icon: , - headerText: ls.error.connection.passkeyTitle, - bodyText: ls.error.connection.passkeyBody, - }, -}; -export const OAuthGoogle: Story = { - args: { - headerText: `${ls.error.connection.oauthTitle} Google`, - bodyText: ls.error.connection.oauthBody, - icon: , - handleUseAnotherMethod: () => {}, - }, -}; - -export const OAuthFacebook: Story = { - args: { - headerText: `${ls.error.connection.oauthTitle} Apple`, - bodyText: ls.error.connection.oauthBody, - icon: , - handleUseAnotherMethod: () => {}, - }, -}; - -export const EOAWalletConnect: Story = { - args: { - headerText: ls.error.connection.walletTitle, - bodyText: ls.error.connection.walletBody, - icon: , - handleUseAnotherMethod: () => {}, - }, -}; - -export const EOAMetamask: Story = { - args: { - headerText: `${ls.error.connection.walletTitle} MetaMask`, - bodyText: ls.error.connection.walletBody, - icon: ( - - ), - handleUseAnotherMethod: () => {}, - }, -}; diff --git a/account-kit/react/src/components/auth/card/error/connection-error.tsx b/account-kit/react/src/components/auth/card/error/connection-error.tsx deleted file mode 100644 index f962dc15ac..0000000000 --- a/account-kit/react/src/components/auth/card/error/connection-error.tsx +++ /dev/null @@ -1,70 +0,0 @@ -"use client"; -import { useEffect } from "react"; -import { ls } from "../../../../strings.js"; -import { Button } from "../../../button.js"; -import { disconnect } from "@account-kit/core"; -import { useAlchemyAccountContext } from "../../../../hooks/useAlchemyAccountContext.js"; - -type ConnectionErrorProps = { - headerText: string; - bodyText: string; - tryAgainCTA?: string; - icon: React.ReactNode; - handleTryAgain?: () => void; - handleUseAnotherMethod?: () => void; - shouldDisconnect?: boolean; - handleSkip?: () => void; -}; - -export const ConnectionError = ({ - headerText, - bodyText, - tryAgainCTA, - icon, - handleTryAgain, - handleUseAnotherMethod, - shouldDisconnect = true, - handleSkip, -}: ConnectionErrorProps) => { - const { config } = useAlchemyAccountContext(); - - useEffect(() => { - // Terminate any inflight authentication on Error... - if (shouldDisconnect) { - disconnect(config); - } - }, [config, shouldDisconnect]); - - return ( -
-
-
- {icon} -
-
-

{headerText}

-

{bodyText}

- - {handleUseAnotherMethod && ( - - )} - {handleSkip && ( - - )} -
- ); -}; diff --git a/account-kit/react/src/components/auth/card/error/general-error.stories.tsx b/account-kit/react/src/components/auth/card/error/general-error.stories.tsx deleted file mode 100644 index 0c59e7117f..0000000000 --- a/account-kit/react/src/components/auth/card/error/general-error.stories.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import type { Meta, StoryObj } from "@storybook/react"; -import { GeneralError } from "./general-error.js"; - -const Container = () => { - return ( -
-
- -
-
- ); -}; -const meta: Meta = { - title: "Errors/General Error", - component: Container, -}; -export default meta; - -type Story = StoryObj; -export const Default: Story = {}; diff --git a/account-kit/react/src/components/auth/card/error/general-error.tsx b/account-kit/react/src/components/auth/card/error/general-error.tsx deleted file mode 100644 index 3d00673b6e..0000000000 --- a/account-kit/react/src/components/auth/card/error/general-error.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Warning } from "../../../../icons/warning.js"; -import { ls } from "../../../../strings.js"; - -export const GeneralError = () => { - return ( -
- -
-

- {ls.error.general.title} -

-

{ls.error.general.body}

-
-
- ); -}; diff --git a/account-kit/react/src/components/auth/card/error/icons/wallet-icon.tsx b/account-kit/react/src/components/auth/card/error/icons/wallet-icon.tsx deleted file mode 100644 index ee333fecf2..0000000000 --- a/account-kit/react/src/components/auth/card/error/icons/wallet-icon.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { EOAConnectionFailed } from "../../../../../icons/EOAConnectionFailed.js"; -import { WalletConnectIcon } from "../../../../../icons/walletConnectIcon.js"; -import { getWalletIcon } from "../../../wallet-buttons/walletIcons.js"; - -import { WALLET_CONNECT } from "../../eoa.js"; -export const WalletIcon = ({ - connector, -}: { - connector: { icon: string | undefined; name: string } | typeof WALLET_CONNECT; -}) => { - const isWalletConnect = connector === WALLET_CONNECT; - return ( -
- -
- {isWalletConnect ? ( - - ) : ( - <> - {connector?.icon ? ( - {connector.name} - ) : ( - // Try to use built-in icon as fallback - (() => { - const IconComponent = getWalletIcon(connector.name); - return IconComponent ? ( - - ) : ( - // If no built-in icon exists, render a blank space with dimensions -
- ); - })() - )} - - )} -
-
- -
-
- ); -}; diff --git a/account-kit/react/src/components/auth/card/footer/email-not-reveived.tsx b/account-kit/react/src/components/auth/card/footer/email-not-reveived.tsx deleted file mode 100644 index 841cfc07c5..0000000000 --- a/account-kit/react/src/components/auth/card/footer/email-not-reveived.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { useEffect, useMemo, useState } from "react"; -import { useAuthenticate } from "../../../../hooks/useAuthenticate.js"; -import { ls } from "../../../../strings.js"; -import { - AuthStepStatus, - useAuthContext, - type AuthStep, -} from "../../context.js"; -import { Button } from "../../../button.js"; - -type EmailNotReceivedDisclaimerProps = { - authStep: Extract; -}; -export const EmailNotReceivedDisclaimer = ({ - authStep, -}: EmailNotReceivedDisclaimerProps) => { - const { setAuthStep } = useAuthContext(); - const [emailResent, setEmailResent] = useState(false); - const { authenticate } = useAuthenticate({ - onSuccess: () => { - setAuthStep({ type: "complete" }); - }, - }); - - const isOTPVerifying = useMemo(() => { - return ( - authStep.type === "otp_verify" && - (authStep.status === AuthStepStatus.verifying || - authStep.status === AuthStepStatus.success) - ); - }, [authStep]); - - useEffect(() => { - if (emailResent) { - // set the text back to "Resend" after 2 seconds - setTimeout(() => { - setEmailResent(false); - }, 2000); - } - }, [emailResent]); - - return ( -
- - {ls.loadingEmail.emailNotReceived} - - -
- ); -}; diff --git a/account-kit/react/src/components/auth/card/footer/help-text.tsx b/account-kit/react/src/components/auth/card/footer/help-text.tsx deleted file mode 100644 index fbd5dcd592..0000000000 --- a/account-kit/react/src/components/auth/card/footer/help-text.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { useUiConfig } from "../../../../hooks/useUiConfig.js"; -import { ls } from "../../../../strings.js"; - -export const HelpText = () => { - const supportUrl = useUiConfig(({ supportUrl }) => supportUrl); - - if (!supportUrl) return null; - return ( -
- ); -}; diff --git a/account-kit/react/src/components/auth/card/footer/oauth-contact-support.tsx b/account-kit/react/src/components/auth/card/footer/oauth-contact-support.tsx deleted file mode 100644 index f27e6ab2ed..0000000000 --- a/account-kit/react/src/components/auth/card/footer/oauth-contact-support.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { useUiConfig } from "../../../../hooks/useUiConfig.js"; -import { ls } from "../../../../strings.js"; - -export const OAuthContactSupport = () => { - const { supportUrl } = useUiConfig(({ supportUrl }) => ({ supportUrl })); - return ( - supportUrl && ( -
- - {ls.oauthContactSupport.title} - - - {ls.oauthContactSupport.body} - -
- ) - ); -}; diff --git a/account-kit/react/src/components/auth/card/footer/protected-by.tsx b/account-kit/react/src/components/auth/card/footer/protected-by.tsx deleted file mode 100644 index cab5a78101..0000000000 --- a/account-kit/react/src/components/auth/card/footer/protected-by.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { AlchemyLogo } from "../../../../icons/alchemy.js"; -import { ls } from "../../../../strings.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const ProtectedBy = () => ( - // eslint-disable-next-line react/jsx-no-target-blank - - {ls.protectedBy.title} - - -); diff --git a/account-kit/react/src/components/auth/card/footer/registration-disclaimer.tsx b/account-kit/react/src/components/auth/card/footer/registration-disclaimer.tsx deleted file mode 100644 index 6a4c66f6b0..0000000000 --- a/account-kit/react/src/components/auth/card/footer/registration-disclaimer.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { ls } from "../../../../strings.js"; - -export const RegistrationDisclaimer = () => ( -
- {ls.login.tosPrefix} - - {ls.login.tosLink} - -
-); diff --git a/account-kit/react/src/components/auth/card/index.stories.tsx b/account-kit/react/src/components/auth/card/index.stories.tsx deleted file mode 100644 index af3ca0a1d8..0000000000 --- a/account-kit/react/src/components/auth/card/index.stories.tsx +++ /dev/null @@ -1,147 +0,0 @@ -import type { Meta, StoryObj } from "@storybook/react"; -import { http, HttpResponse } from "msw"; -import { useEffect } from "react"; -import { useUiConfig } from "../../../hooks/useUiConfig.js"; -import type { AuthType } from "../types.js"; -import { AuthCard } from "./index.jsx"; -const Test = (props: any) => { - const { updateConfig } = useUiConfig(({ updateConfig }) => ({ - updateConfig, - })); - - let sections: AuthType[][] = [ - [{ type: "email" as const }], - [{ type: "passkey" as const }], - ]; - if (props.authType === "email") { - sections = [[{ type: "email" as const }]]; - } - if (props.authType === "passkey") { - sections = [[{ type: "passkey" as const }]]; - } - if (props.authType === "email-passkey") { - sections = [[{ type: "email" as const }], [{ type: "passkey" as const }]]; - } - if (props.authType === "external_wallets") { - sections = [ - [ - { - type: "external_wallets", - walletConnect: { - projectId: "30e7ffaff99063e68cc9870c105d905b", - }, - }, - ], - ]; - } - if (props.authType === "all") { - sections = [ - [{ type: "email" as const }], - [{ type: "passkey" as const }], - [ - { - type: "external_wallets", - walletConnect: { - projectId: "30e7ffaff99063e68cc9870c105d905b", - }, - }, - ], - ]; - } - - const ui = { - theme: "dark", - primaryColor: { - light: "red", - dark: "#9AB7FF", - }, - borderRadius: "sm", - illustrationStyle: "outline", - logoLight: undefined, - logoDark: undefined, - }; - useEffect(() => { - const uiConfig = { - auth: { - showEmail: true, - showExternalWallets: false, - showPasskey: true, - addPasskey: true, - sections, - }, - ui, - }; - - updateConfig(uiConfig); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [props.authType]); - - return ( -
- -
- ); -}; - -const meta: Meta = { - title: "AuthCard", - component: Test, - argTypes: { - authType: { - options: ["email", "passkey", "email-passkey", "external_wallets", "all"], - control: { type: "radio" }, - }, - }, - args: { - authType: "email-passkey", - }, - parameters: { - msw: { - handlers: [ - http.post("/api/rpc/signer/v1/lookup", () => { - return HttpResponse.json({ - orgId: "483c1263-a6e3-4db1-a8b0-894e4902e404", - }); - }), - ], - }, - }, -}; -export default meta; - -type Story = StoryObj; -export const Default: Story = { - args: { - authType: "email", - }, -}; - -export const withLookupError: Story = { - parameters: { - msw: { - handlers: [ - http.post("/api/rpc/signer/v1/lookup", () => { - return new HttpResponse(null, { - status: 500, - statusText: "MSW server error from Storybook", - }); - }), - ], - }, - }, -}; - -export const withSignupError: Story = { - parameters: { - msw: { - handlers: [ - http.post("/api/rpc/signer/v1/signup", () => { - return new HttpResponse(null, { - status: 500, - statusText: "MSW server error from Storybook", - }); - }), - ], - }, - }, -}; diff --git a/account-kit/react/src/components/auth/card/index.tsx b/account-kit/react/src/components/auth/card/index.tsx deleted file mode 100644 index ddf9ed0b5e..0000000000 --- a/account-kit/react/src/components/auth/card/index.tsx +++ /dev/null @@ -1,184 +0,0 @@ -"use client"; - -import { disconnect } from "@account-kit/core"; -import { - useCallback, - useEffect, - useMemo, - useRef, - type PropsWithChildren, -} from "react"; -import { useAlchemyAccountContext } from "../../../hooks/useAlchemyAccountContext.js"; -import { useAuthConfig } from "../../../hooks/internal/useAuthConfig.js"; -import { useAuthModal } from "../../../hooks/useAuthModal.js"; -import { useElementHeight } from "../../../hooks/useElementHeight.js"; -import { useSignerStatus } from "../../../hooks/useSignerStatus.js"; -import { Navigation } from "../../navigation.js"; -import { useAuthContext } from "../context.js"; -import { Footer } from "../sections/Footer.js"; -import { Step } from "./steps.js"; -export type AuthCardProps = { - className?: string; -}; - -/** - * React component containing an Auth view with configured auth methods - * and options based on the config passed to the AlchemyAccountProvider - * - * @example - * ```tsx - * import { AuthCard, useAlchemyAccountContext } from "@account-kit/react"; - * - * function ComponentWithAuthCard() { - * // assumes you've passed in a UI config to the Account Provider - * // you can also directly set the properties on the AuthCard component - * const { uiConfig } = useAlchemyAccountContext(); - * - * return ( - * - * ); - * } - * ``` - * - * @param {AuthCardProps} props Card Props - * @returns {JSX.Element} a react component containing the AuthCard - */ -export const AuthCard = (props: AuthCardProps) => { - return ; -}; - -// this isn't used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export const AuthCardContent = ({ - className, - showClose = false, -}: { - className?: string; - showClose?: boolean; -}) => { - const { openAuthModal, closeAuthModal } = useAuthModal(); - const { status, isAuthenticating, isConnected } = useSignerStatus(); - const { authStep, setAuthStep } = useAuthContext(); - const { config } = useAlchemyAccountContext(); - - const didGoBack = useRef(false); - - const { onAuthSuccess, addPasskeyOnSignup } = useAuthConfig( - ({ onAuthSuccess, addPasskeyOnSignup }) => ({ - onAuthSuccess, - addPasskeyOnSignup, - }), - ); - - const canGoBack = useMemo(() => { - return [ - "email_verify", - "otp_verify", - "passkey_verify", - "passkey_create", - "pick_eoa", - "wallet_connect", - "eoa_connect", - "oauth_completing", - ].includes(authStep.type); - }, [authStep]); - - const onBack = useCallback(() => { - switch (authStep.type) { - case "email_verify": - case "otp_verify": - case "passkey_verify": - case "passkey_create": - case "oauth_completing": - disconnect(config); // Terminate any inflight authentication - didGoBack.current = true; - setAuthStep({ type: "initial" }); - break; - case "wallet_connect": - case "eoa_connect": - setAuthStep({ type: "pick_eoa" }); - break; - case "pick_eoa": - setAuthStep({ type: "initial" }); - break; - default: - console.warn("Unhandled back action for auth step", authStep); - } - }, [authStep, setAuthStep, config]); - - const onClose = useCallback(() => { - if (!isConnected) { - // Terminate any inflight authentication - disconnect(config); - } - - if (authStep.type === "passkey_create") { - setAuthStep({ type: "complete" }); - } else { - setAuthStep({ type: "initial" }); - } - closeAuthModal(); - }, [isConnected, authStep.type, closeAuthModal, config, setAuthStep]); - - useEffect(() => { - if (isConnected && authStep.type === "complete") { - didGoBack.current = false; - closeAuthModal(); - onAuthSuccess?.(); - } else if (authStep.type !== "initial") { - didGoBack.current = false; - } - }, [ - authStep, - status, - isAuthenticating, - setAuthStep, - onAuthSuccess, - openAuthModal, - closeAuthModal, - addPasskeyOnSignup, - isConnected, - ]); - - return ( -
- {/* Wrapper container that sizes its height dynamically */} - - {(canGoBack || showClose) && ( - - )} -
- -
-
- -
- ); -}; - -const DynamicHeight = ({ children }: PropsWithChildren) => { - const contentRef = useRef(null); - const { height } = useElementHeight(contentRef); - - return ( -
-
- {children} -
-
- ); -}; diff --git a/account-kit/react/src/components/auth/card/loading/email.tsx b/account-kit/react/src/components/auth/card/loading/email.tsx deleted file mode 100644 index f0226f3ff2..0000000000 --- a/account-kit/react/src/components/auth/card/loading/email.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { useEffect, useState } from "react"; -import { useSignerStatus } from "../../../../hooks/useSignerStatus.js"; -import { EmailIllustration } from "../../../../icons/illustrations/email.js"; -import { Spinner } from "../../../../icons/spinner.js"; -import { ls } from "../../../../strings.js"; -import { useAuthContext } from "../../context.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const LoadingEmail = () => { - const { authStep } = useAuthContext("email_verify"); - // yup, re-sent and resent. I'm not fixing it - const [emailResent, setEmailResent] = useState(false); - - useEffect(() => { - if (emailResent) { - // set the text back to "Resend" after 2 seconds - setTimeout(() => { - setEmailResent(false); - }, 2000); - } - }, [emailResent]); - - return ( -
-
- -
- -

{ls.loadingEmail.title}

-

- {ls.loadingEmail.verificationSent} -
- {authStep.email} -

-
- ); -}; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const CompletingEmailAuth = () => { - const { isConnected } = useSignerStatus(); - const { setAuthStep } = useAuthContext("email_completing"); - - useEffect(() => { - if (isConnected) { - setAuthStep({ type: "complete" }); - } - }, [isConnected, setAuthStep]); - - return ( -
-
- -
- -

- {ls.completingEmail.body} -

-
- ); -}; diff --git a/account-kit/react/src/components/auth/card/loading/oauth.tsx b/account-kit/react/src/components/auth/card/loading/oauth.tsx deleted file mode 100644 index c87ee2684b..0000000000 --- a/account-kit/react/src/components/auth/card/loading/oauth.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { OauthCancelledError } from "@account-kit/signer"; -import { useEffect } from "react"; -import { useSignerStatus } from "../../../../hooks/useSignerStatus.js"; -import { - ContinueWithOAuth, - OAuthConnectionFailed, -} from "../../../../icons/oauth.js"; -import { useAuthContext } from "../../context.js"; -import { useOAuthVerify } from "../../hooks/useOAuthVerify.js"; -import { ConnectionError } from "../error/connection-error.js"; -import { ls } from "../../../../strings.js"; -import { getSocialProviderDisplayName } from "../../types.js"; - -export const CompletingOAuth = () => { - const { isConnected } = useSignerStatus(); - const { setAuthStep, authStep } = useAuthContext("oauth_completing"); - const { authenticate } = useOAuthVerify({ config: authStep.config }); - const oauthWasCancelled = authStep.error instanceof OauthCancelledError; - - useEffect(() => { - if (isConnected) { - setAuthStep({ type: "complete" }); - } else if (oauthWasCancelled) { - setAuthStep({ type: "initial" }); - } - }, [isConnected, oauthWasCancelled, setAuthStep]); - - if (authStep.error && !oauthWasCancelled) { - return ( - setAuthStep({ type: "initial" })} - icon={ - - } - /> - ); - } - - const providerDisplayName = getSocialProviderDisplayName(authStep.config); - return ( -
-
- -
- -

{`Continue with ${providerDisplayName}`}

-

- {`Follow the steps in the pop up window to sign in with ${providerDisplayName}`} -

-
- ); -}; diff --git a/account-kit/react/src/components/auth/card/loading/otp.stories.tsx b/account-kit/react/src/components/auth/card/loading/otp.stories.tsx deleted file mode 100644 index 5265359e41..0000000000 --- a/account-kit/react/src/components/auth/card/loading/otp.stories.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/* eslint-disable react-hooks/rules-of-hooks */ -import { useEffect } from "react"; -import { useAuthContext } from "../../context.js"; - -import { LoadingOtp } from "./otp.js"; -import type { Meta, StoryObj } from "@storybook/react"; - -const meta: Meta = { - title: "OTP/LoadingOTP", - component: LoadingOtp, - parameters: {}, - render: () => { - const { authStep, setAuthStep } = useAuthContext(); - useEffect(() => { - setAuthStep({ type: "otp_verify", email: "test@alchemy.com" }); - }, [setAuthStep]); - if (authStep.type === "otp_verify") { - return ; - } - - return

initializing story

; - }, -}; -export default meta; - -type Story = StoryObj; -export const Default: Story = {}; diff --git a/account-kit/react/src/components/auth/card/loading/otp.tsx b/account-kit/react/src/components/auth/card/loading/otp.tsx deleted file mode 100644 index 3151b4a974..0000000000 --- a/account-kit/react/src/components/auth/card/loading/otp.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import { useState, useEffect } from "react"; -import { EmailIllustration } from "../../../../icons/illustrations/email.js"; -import { ls } from "../../../../strings.js"; -import { - OTPInput, - type OTPCodeType, - initialOTPValue, - isOTPCodeType, -} from "../../../otp-input/otp-input.js"; -import { Spinner } from "../../../../icons/spinner.js"; -import { AuthStepStatus, useAuthContext } from "../../context.js"; -import { useAuthenticate } from "../../../../hooks/useAuthenticate.js"; -import { useSignerStatus } from "../../../../hooks/useSignerStatus.js"; -import { AlchemySignerStatus } from "@account-kit/signer"; - -const AUTH_DELAY = 1000; - -export const LoadingOtp = () => { - const { isConnected, status } = useSignerStatus(); - const { setAuthStep, authStep } = useAuthContext("otp_verify"); - const [otpCode, setOtpCode] = useState(initialOTPValue); - const [errorText, setErrorText] = useState(authStep.error?.message || ""); - const [titleText, setTitleText] = useState(ls.loadingOtp.title); - - const resetOTP = (errorText = "") => { - setOtpCode(initialOTPValue); - setErrorText(errorText); - setTitleText(ls.loadingOtp.title); - }; - const { authenticate } = useAuthenticate({ - onError: (error: any) => { - console.error(error); - - setAuthStep({ ...authStep, error, status: AuthStepStatus.base }); - resetOTP(getUserErrorMessage(error)); - }, - onSuccess: () => { - if (isConnected) { - setAuthStep({ ...authStep, status: AuthStepStatus.success }); - setTitleText(ls.loadingOtp.verified); - - // Wait 3 seconds before completing the auth step - setTimeout(() => { - setAuthStep({ type: "complete" }); - }, AUTH_DELAY); - } - }, - }); - - const setValue = async (otpCode: OTPCodeType) => { - setOtpCode(otpCode); - if (isOTPCodeType(otpCode)) { - const otp = otpCode.join(""); - - setAuthStep({ ...authStep, status: AuthStepStatus.verifying }); - setTitleText(ls.loadingOtp.verifying); - - authenticate({ type: "otp", otpCode: otp }); - } - }; - - useEffect(() => { - if (status === AlchemySignerStatus.AWAITING_MFA_AUTH) { - setAuthStep({ - type: "totp_verify", - previousStep: "otp", - }); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [status]); - - return ( -
-
- - -
-

- {titleText} -

-

- {ls.loadingOtp.body} -

-

- {authStep.email} -

- -
- ); -}; - -function getUserErrorMessage(error: Error | undefined): string { - if (!error) { - return ""; - } - // Errors from Alchemy have a JSON message. - try { - const message = JSON.parse(error.message).error; - if (message === "invalid OTP code") { - return ls.error.otp.invalid; - } - return message; - } catch (e) { - // Ignore - } - return error.message; -} diff --git a/account-kit/react/src/components/auth/card/loading/passkey.tsx b/account-kit/react/src/components/auth/card/loading/passkey.tsx deleted file mode 100644 index c1f46842f0..0000000000 --- a/account-kit/react/src/components/auth/card/loading/passkey.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { ConnectionFailed } from "../../../../icons/connectionFailed.js"; -import { LoadingPasskey } from "../../../../icons/passkey.js"; -import { ls } from "../../../../strings.js"; -import { useAuthContext } from "../../context.js"; -import { usePasskeyVerify } from "../../hooks/usePasskeyVerify.js"; -import { ConnectionError } from "../error/connection-error.js"; - -export const LoadingPasskeyAuth = () => { - const { setAuthStep, authStep } = useAuthContext("passkey_verify"); - const { authenticate } = usePasskeyVerify(); - - if (authStep.error) { - return ( - } - handleTryAgain={authenticate} - handleUseAnotherMethod={() => setAuthStep({ type: "initial" })} - /> - ); - } - - return ( -
-
- -
- -

{ls.loadingPasskey.title}

-

- {ls.loadingPasskey.body} -

- -
- {/* Hidden until we can read in support URLs from the config */} - {/*
-

- {ls.loadingPasskey.supportText} -

- -
*/} -
- -
- ); -}; diff --git a/account-kit/react/src/components/auth/card/loading/totp.tsx b/account-kit/react/src/components/auth/card/loading/totp.tsx deleted file mode 100644 index ac43177b7d..0000000000 --- a/account-kit/react/src/components/auth/card/loading/totp.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { useState, useEffect } from "react"; -import { useSignerStatus } from "../../../../hooks/useSignerStatus.js"; -import { AlchemySignerStatus } from "@account-kit/signer"; -import { useAuthContext } from "../../context.js"; -import { useSigner } from "../../../../hooks/useSigner.js"; -import { useAuthenticate } from "../../../../hooks/useAuthenticate.js"; -import { - OTPInput, - initialOTPValue, - isOTPCodeType, - type OTPCodeType, -} from "../../../otp-input/otp-input.js"; -import { Spinner } from "../../../../icons/spinner.js"; -import { ThreeStarsIcon } from "../../../../icons/threeStars.js"; - -export const LoadingTotp = () => { - const signer = useSigner(); - const { status } = useSignerStatus(); - const { authStep, setAuthStep } = useAuthContext("totp_verify"); - const [totpCode, setTotpCode] = useState(initialOTPValue); - const [errorText, setErrorText] = useState(authStep.error?.message || ""); - const [isSubmitting, setIsSubmitting] = useState(false); - const { authenticateAsync } = useAuthenticate({ - onSuccess: () => { - setIsSubmitting(false); - setAuthStep({ type: "complete" }); - }, - onError: (err) => { - setIsSubmitting(false); - setTotpCode(initialOTPValue); - - if ((err as Error).message.includes("Invalid MFA code")) { - setErrorText("The code you entered is incorrect"); - } else { - setErrorText("An error occurred while verifying the code"); - console.error("TOTP verify error", err); - } - }, - }); - - useEffect(() => { - if ( - authStep.previousStep === "magicLink" && - status === AlchemySignerStatus.AWAITING_EMAIL_AUTH - ) { - setAuthStep({ type: "email_verify", email: authStep.email }); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [status]); - - const setValue = async (otpCode: OTPCodeType) => { - setTotpCode(otpCode); - if (isOTPCodeType(otpCode)) { - setIsSubmitting(true); - const otp = otpCode.join(""); - handleVerify(otp); - } - }; - - // Called when all digits are typed or user hits "Verify" button - const handleVerify = async (codeString: string) => { - try { - if (authStep.previousStep === "magicLink") { - await authenticateAsync({ - type: "email", - email: authStep.email, - emailMode: "magicLink", - redirectParams: new URLSearchParams(), - multiFactors: [ - { - multiFactorId: authStep.factorId, - multiFactorCode: codeString, - }, - ], - }); - } else if (authStep.previousStep === "otp") { - await signer?.validateMultiFactors({ - multiFactorCode: codeString, - }); - setIsSubmitting(false); - setAuthStep({ type: "complete" }); - } else { - throw new Error("Invalid previous step"); - } - } catch (err) { - if ((err as Error).message.includes("Invalid MFA code")) { - setIsSubmitting(false); - setTotpCode(initialOTPValue); - setErrorText("The code you entered is incorrect"); - } else { - console.error("TOTP submission error", err); - } - } - }; - - return ( -
-
- - -
-

- Enter authenticator app code -

- setTotpCode(initialOTPValue)} - /> -
- ); -}; diff --git a/account-kit/react/src/components/auth/card/main.tsx b/account-kit/react/src/components/auth/card/main.tsx deleted file mode 100644 index 88fbadb3dc..0000000000 --- a/account-kit/react/src/components/auth/card/main.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { Fragment } from "react"; -import { useAuthConfig } from "../../../hooks/internal/useAuthConfig.js"; -import { Divider } from "../../divider.js"; -import { useAuthContext } from "../context.js"; -import { AuthSection } from "../sections/AuthSection.js"; -import { GeneralError } from "./error/general-error.js"; - -export const MainAuthContent = () => { - const { authStep } = useAuthContext(); - const isError = authStep.type === "initial" && authStep.error; - const { header, sections, hideSignInText } = useAuthConfig( - ({ header, sections, hideSignInText }) => ({ - header, - sections, - hideSignInText, - }), - ); - - return ( - <> - {header} - {!hideSignInText &&

Sign in

} - {isError && } - {sections?.map((section, idx) => { - return ( - - - {idx !== sections.length - 1 ? ( - - ) : null} - - ); - })} - - ); -}; diff --git a/account-kit/react/src/components/auth/card/passkey-added.tsx b/account-kit/react/src/components/auth/card/passkey-added.tsx deleted file mode 100644 index 58207b8523..0000000000 --- a/account-kit/react/src/components/auth/card/passkey-added.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { AddedPasskeyIllustration } from "../../../icons/illustrations/added-passkey.js"; -import { useAuthContext } from "../context.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export function PasskeyAdded() { - const { setAuthStep } = useAuthContext(); - - setTimeout(() => { - setAuthStep({ type: "complete" }); - }, 5000); - - return ( -
-
- -
-

Passkey added!

-

- You can use this passkey to sign in next time. -

-
- ); -} diff --git a/account-kit/react/src/components/auth/card/passkey.stories.tsx b/account-kit/react/src/components/auth/card/passkey.stories.tsx deleted file mode 100644 index f001eb5e1d..0000000000 --- a/account-kit/react/src/components/auth/card/passkey.stories.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import type { Meta, StoryObj } from "@storybook/react"; -import { http, HttpResponse } from "msw"; -import { useEffect } from "react"; -import { useUiConfig } from "../../../hooks/useUiConfig.js"; -import { useAuthContext } from "../context.js"; -import type { AuthType } from "../types.js"; -import { AuthCard } from "./index.jsx"; - -const PasskeyStory = (props: any) => { - const { updateConfig } = useUiConfig(({ updateConfig }) => ({ - updateConfig, - })); - - let sections: AuthType[][] = [[{ type: "passkey" as const }]]; - - const ui = { - theme: "dark", - primaryColor: { - light: "red", - dark: "#9AB7FF", - }, - borderRadius: "sm", - illustrationStyle: "outline", - logoLight: undefined, - logoDark: undefined, - }; - - useEffect(() => { - const uiConfig = { - auth: { - showEmail: true, - showExternalWallets: false, - showPasskey: true, - addPasskey: true, - sections, - }, - ui, - supportUrl: "#", - }; - - updateConfig(uiConfig); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [props.authType]); - - const { setAuthStep } = useAuthContext(); - useEffect(() => { - setAuthStep({ type: "passkey_create" }); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - return ; -}; - -const meta: Meta = { - title: "Passkey", - component: PasskeyStory, - args: { - authType: "passkey", - }, - - parameters: { - msw: { - handlers: [ - http.post("/api/rpc/signer/v1/lookup", () => { - return HttpResponse.json({ - orgId: "483c1263-a6e3-4db1-a8b0-894e4902e404", - }); - }), - ], - }, - }, -}; -export default meta; - -type Story = StoryObj; -export const Default: Story = {}; diff --git a/account-kit/react/src/components/auth/card/steps.tsx b/account-kit/react/src/components/auth/card/steps.tsx deleted file mode 100644 index 2017c92892..0000000000 --- a/account-kit/react/src/components/auth/card/steps.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { useAuthContext } from "../context.js"; -import { AddPasskey } from "./add-passkey.js"; -import { EoaConnectCard, EoaPickCard, WalletConnectCard } from "./eoa.js"; -import { CompletingEmailAuth, LoadingEmail } from "./loading/email.js"; -import { CompletingOAuth } from "./loading/oauth.js"; -import { LoadingPasskeyAuth } from "./loading/passkey.js"; -import { MainAuthContent } from "./main.js"; -import { PasskeyAdded } from "./passkey-added.js"; -import { LoadingOtp } from "./loading/otp.js"; -import { LoadingTotp } from "./loading/totp.js"; - -export const Step = () => { - const { authStep } = useAuthContext(); - switch (authStep.type) { - case "email_verify": - return ; - case "totp_verify": - return ; - case "otp_verify": - return ; - case "passkey_verify": - return ; - case "email_completing": - return ; - case "oauth_completing": - return ; - case "passkey_create": - return ; - case "passkey_create_success": - return ; - case "eoa_connect": - return ; - case "pick_eoa": - return ; - case "wallet_connect": - return ; - case "complete": - case "initial": - default: - return ; - } -}; diff --git a/account-kit/react/src/components/auth/context.ts b/account-kit/react/src/components/auth/context.ts deleted file mode 100644 index ac0e455106..0000000000 --- a/account-kit/react/src/components/auth/context.ts +++ /dev/null @@ -1,109 +0,0 @@ -"use client"; - -import { createContext, useContext } from "react"; -import type { AuthType } from "./types"; -import type { Wallet } from "@solana/wallet-adapter-react"; -import type { Connector } from "wagmi"; - -export enum AuthStepStatus { - base = "base", - success = "success", - error = "error", - verifying = "verifying", -} - -type EoaConnectAuthStep = { - type: "eoa_connect"; - error?: Error; -} & ({ chain: "svm"; wallet: Wallet } | { chain: "evm"; connector: Connector }); - -export type AuthStep = - | { type: "email_verify"; email: string } - | { - type: "otp_verify"; - email: string; - error?: Error; - status?: AuthStepStatus; - } - | { - type: "totp_verify"; - previousStep: "magicLink"; - factorId: string; - email: string; - error?: Error; - } - | { - type: "totp_verify"; - previousStep: "otp"; - error?: Error; - } - | { type: "passkey_verify"; error?: Error } - | { type: "passkey_create"; error?: Error } - | { type: "passkey_create_success" } - | { type: "email_completing" } - | { - type: "oauth_completing"; - config: Extract; - error?: Error; - } - | { type: "initial"; error?: Error } - | { type: "complete" } - | EoaConnectAuthStep - | { type: "wallet_connect"; error?: Error } - | { type: "pick_eoa" }; - -type AuthContextType< - TType extends AuthStep["type"] | undefined = AuthStep["type"] | undefined, -> = TType extends undefined - ? { - authStep: AuthStep; - setAuthStep: (step: AuthStep) => void; - resetAuthStep: () => void; - } - : { - authStep: Extract }>; - setAuthStep: (step: AuthStep) => void; - resetAuthStep: () => void; - }; - -export const AuthModalContext = createContext( - undefined, -); - -export function useAuthContext< - TType extends AuthStep["type"] | undefined = AuthStep["type"] | undefined, ->(type?: TType): AuthContextType; - -/** - * A custom hook that provides the authentication context based on the specified authentication step type. It ensures that the hook is used within an `AuthModalProvider` and throws an error if the context is not available or if the current auth step type does not match the expected type. - * - * @example - * ```tsx twoslash - * import { useAuthContext } from "@account-kit/react"; - * - * const { authStep } = useAuthContext(); - * ``` - * - * @param {AuthStep["type"]} [type] Optional type of authentication step to validate against the current context - * @returns {AuthContextType} The authentication context for the current component - * @throws Will throw an error if the hook is not used within an `AuthModalProvider` or if the current auth step type does not match the expected type - */ export function useAuthContext( - type?: AuthStep["type"] | undefined, -): AuthContextType { - const context = useOptionalAuthContext(); - - if (!context) { - throw new Error( - "useAuthModalContext must be used within a AuthModalProvider", - ); - } - - if (type && context.authStep.type !== type) { - throw new Error(`expected authstep to be ${type}`); - } - - return context; -} - -export const useOptionalAuthContext = (): AuthContextType | undefined => - useContext(AuthModalContext); diff --git a/account-kit/react/src/components/auth/hooks/useConnectEOA.ts b/account-kit/react/src/components/auth/hooks/useConnectEOA.ts deleted file mode 100644 index 9ec974e812..0000000000 --- a/account-kit/react/src/components/auth/hooks/useConnectEOA.ts +++ /dev/null @@ -1,32 +0,0 @@ -"use client"; - -import { useConnect } from "../../../hooks/useConnect.js"; -import { useAuthContext } from "../context.js"; - -export const useConnectEOA = () => { - const { setAuthStep } = useAuthContext(); - const { connectors, connect } = useConnect({ - onMutate: ({ connector }) => { - if (typeof connector === "function") { - setAuthStep({ type: "wallet_connect" }); - } else { - setAuthStep({ type: "eoa_connect", connector, chain: "evm" }); - } - }, - onError: (error, { connector }) => { - if (typeof connector === "function") { - setAuthStep({ type: "wallet_connect", error }); - } else { - setAuthStep({ type: "eoa_connect", connector, error, chain: "evm" }); - } - }, - onSuccess: () => { - setAuthStep({ type: "complete" }); - }, - }); - - return { - connect, - connectors, - }; -}; diff --git a/account-kit/react/src/components/auth/hooks/useConnectSolanaEOA.ts b/account-kit/react/src/components/auth/hooks/useConnectSolanaEOA.ts deleted file mode 100644 index f49bfc561e..0000000000 --- a/account-kit/react/src/components/auth/hooks/useConnectSolanaEOA.ts +++ /dev/null @@ -1,30 +0,0 @@ -"use client"; - -import { type Wallet } from "@solana/wallet-adapter-react"; -import { useAuthContext } from "../context.js"; -import { useCallback, useEffect } from "react"; -import { useSolanaWallet } from "../../../hooks/useSolanaWallet.js"; - -export const useConnectSolanaEOA = () => { - const { setAuthStep, authStep } = useAuthContext(); - const { disconnect, select, publicKey } = useSolanaWallet(); - - const connect = useCallback( - (wallet: Wallet) => { - disconnect().then(async () => { - select(wallet.adapter.name); - setAuthStep({ type: "eoa_connect", chain: "svm", wallet }); - }); - }, - [select, setAuthStep, disconnect], - ); - - useEffect(() => { - if (publicKey && authStep.type !== "complete") - setAuthStep({ type: "complete" }); - }, [publicKey, setAuthStep, authStep.type]); - - return { - connect, - }; -}; diff --git a/account-kit/react/src/components/auth/hooks/useOAuthVerify.ts b/account-kit/react/src/components/auth/hooks/useOAuthVerify.ts deleted file mode 100644 index 3957c14862..0000000000 --- a/account-kit/react/src/components/auth/hooks/useOAuthVerify.ts +++ /dev/null @@ -1,50 +0,0 @@ -"use client"; -import { useCallback } from "react"; -import { useAuthenticate } from "../../../hooks/useAuthenticate.js"; -import { useAuthContext } from "../context.js"; -import type { AuthType } from "../types.js"; - -export type UseOAuthVerifyReturnType = { - authenticate: () => void; - isPending: boolean; -}; - -export const useOAuthVerify = ({ - config, -}: { - config: Extract; -}): UseOAuthVerifyReturnType => { - const { setAuthStep } = useAuthContext(); - - const { authenticate: authenticate_, isPending } = useAuthenticate({ - onMutate: () => { - setAuthStep({ - config, - type: "oauth_completing", - }); - }, - onError: (err) => { - console.error(err); - setAuthStep({ - type: "oauth_completing", - config, - error: err, - }); - }, - onSuccess: () => { - setAuthStep({ type: "complete" }); - }, - }); - - const authenticate = useCallback(() => { - authenticate_({ - ...config, - type: "oauth", - }); - }, [authenticate_, config]); - - return { - isPending, - authenticate, - }; -}; diff --git a/account-kit/react/src/components/auth/hooks/usePasskeyVerify.ts b/account-kit/react/src/components/auth/hooks/usePasskeyVerify.ts deleted file mode 100644 index 576dd40d06..0000000000 --- a/account-kit/react/src/components/auth/hooks/usePasskeyVerify.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { useCallback } from "react"; -import { useAuthenticate } from "../../../hooks/useAuthenticate.js"; -import { useAuthContext } from "../context.js"; - -export type UsePasskeyVerifyReturnType = { - authenticate: () => void; - isPending: boolean; -}; - -/** - * Internal UI component hook used to complete passkey verification. - * - * This is used to log in with a passkey, not create a new passkey - * - * @returns {UsePasskeyVerifyReturnType} an authenticate function to do passkey verification and a boolean indicating if the operation is pending - */ -export const usePasskeyVerify = (): UsePasskeyVerifyReturnType => { - const { setAuthStep } = useAuthContext(); - const { authenticate: authenticate_, isPending } = useAuthenticate({ - onMutate: () => { - setAuthStep({ type: "passkey_verify" }); - }, - onError: (err) => { - setAuthStep({ type: "passkey_verify", error: err }); - }, - onSuccess: () => { - setAuthStep({ type: "complete" }); - }, - }); - - const authenticate = useCallback( - () => authenticate_({ type: "passkey", createNew: false }), - [authenticate_], - ); - - return { - isPending, - authenticate, - }; -}; diff --git a/account-kit/react/src/components/auth/hooks/useWalletConnectAuthConfig.tsx b/account-kit/react/src/components/auth/hooks/useWalletConnectAuthConfig.tsx deleted file mode 100644 index 3bf81da0f9..0000000000 --- a/account-kit/react/src/components/auth/hooks/useWalletConnectAuthConfig.tsx +++ /dev/null @@ -1,31 +0,0 @@ -"use client"; - -import type { WalletConnectParameters } from "wagmi/connectors"; -import { useAuthConfig } from "../../../hooks/internal/useAuthConfig.js"; -import { getWalletConnectParams } from "../../../utils.js"; -import type { AuthType } from "../types.js"; - -export const useWalletConnectAuthConfig = (): { - walletConnectParams: WalletConnectParameters | undefined; - walletConnectAuthConfig: - | Extract["walletConnect"] - | undefined; -} => { - const walletConnectAuthConfig = useAuthConfig((auth) => { - const externalWalletSection = auth.sections - .find((x) => x.some((y) => y.type === "external_wallets")) - ?.find((x) => x.type === "external_wallets") as - | Extract - | undefined; - - return externalWalletSection?.walletConnect; - }); - - // Add z-index to the wallet connect modal if not already set - const walletConnectParams = getWalletConnectParams(walletConnectAuthConfig); - - return { - walletConnectParams, - walletConnectAuthConfig, - }; -}; diff --git a/account-kit/react/src/components/auth/modal.tsx b/account-kit/react/src/components/auth/modal.tsx deleted file mode 100644 index 2d452a5eea..0000000000 --- a/account-kit/react/src/components/auth/modal.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { useCallback } from "react"; -import { useNewUserSignup } from "../../hooks/internal/useNewUserSignup.js"; -import { useAuthModal } from "../../hooks/useAuthModal.js"; -import { useUiConfig } from "../../hooks/useUiConfig.js"; -import { useSignerStatus } from "../../hooks/useSignerStatus.js"; -import { Dialog } from "../dialog/dialog.js"; -import { AuthCardContent } from "./card/index.js"; -import { useAuthContext } from "./context.js"; -import { useEmailAuthLinkingRequired } from "../../hooks/internal/useEmailAuthLinkingRequired.js"; - -export const AuthModal = () => { - const { isConnected } = useSignerStatus(); - const { modalBaseClassName, addPasskeyOnSignup, uiMode } = useUiConfig( - ({ modalBaseClassName, auth, uiMode = "modal" }) => ({ - modalBaseClassName, - addPasskeyOnSignup: auth?.addPasskeyOnSignup, - uiMode, - }), - ); - - const { setAuthStep, authStep } = useAuthContext(); - const { isOpen, closeAuthModal, openAuthModal } = useAuthModal(); - - const handleSignup = useCallback(() => { - if (addPasskeyOnSignup) { - openAuthModal(); - setAuthStep({ - type: "passkey_create", - }); - } - }, [addPasskeyOnSignup, openAuthModal, setAuthStep]); - useNewUserSignup( - handleSignup, - isConnected && - (authStep.type === "complete" || authStep.type === "initial") && - !isOpen, - ); - - useEmailAuthLinkingRequired((email) => { - if (uiMode === "modal") { - openAuthModal(); - } - setAuthStep({ type: "otp_verify", email }); - }); - - return ( - -
- -
-
- ); -}; diff --git a/account-kit/react/src/components/auth/sections/AuthSection.tsx b/account-kit/react/src/components/auth/sections/AuthSection.tsx deleted file mode 100644 index 00c907cef1..0000000000 --- a/account-kit/react/src/components/auth/sections/AuthSection.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import type { AuthType } from "../types.js"; -import { EmailAuth } from "./EmailAuth.js"; -import { ExternalWalletsAuth } from "./InjectedProvidersAuth.js"; -import { OAuth } from "./OAuth.js"; -import { PasskeyAuth } from "./PasskeyAuth.js"; - -type AuthSectionProps = { - authTypes: AuthType[]; -}; - -// This is not used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export const AuthSection = ({ authTypes, ...props }: AuthSectionProps) => { - return ( -
- {authTypes.map((authType, index) => { - switch (authType.type) { - case "email": - return ; - case "passkey": - return ; - case "social": - return ; - case "external_wallets": - return ; - default: - throw new Error("Not implemented"); - } - })} -
- ); -}; diff --git a/account-kit/react/src/components/auth/sections/EmailAuth.tsx b/account-kit/react/src/components/auth/sections/EmailAuth.tsx deleted file mode 100644 index 675d0e8876..0000000000 --- a/account-kit/react/src/components/auth/sections/EmailAuth.tsx +++ /dev/null @@ -1,176 +0,0 @@ -import { useForm } from "@tanstack/react-form"; -import { zodValidator } from "@tanstack/zod-form-adapter"; -import { memo, useEffect } from "react"; -import { z } from "zod"; -import { useAuthenticate } from "../../../hooks/useAuthenticate.js"; -import { useSigner } from "../../../hooks/useSigner.js"; -import { ChevronRight } from "../../../icons/chevron.js"; -import { MailIcon } from "../../../icons/mail.js"; -import { ls } from "../../../strings.js"; -import { Button } from "../../button.js"; -import { IS_SIGNUP_QP } from "../../constants.js"; -import { Input } from "../../input.js"; -import { useAuthContext } from "../context.js"; -import type { AuthType } from "../types.js"; -import { useSignerStatus } from "../../../hooks/useSignerStatus.js"; -import { AlchemySignerStatus, MfaRequiredError } from "@account-kit/signer"; - -type EmailAuthProps = Extract; - -// this is not used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export const EmailAuth = memo( - ({ - emailMode: legacyEmailMode, - hideButton = false, - buttonLabel = ls.login.email.button, - placeholder = ls.login.email.placeholder, - }: EmailAuthProps) => { - const { status } = useSignerStatus(); - const { setAuthStep } = useAuthContext(); - const signer = useSigner(); - const { authenticate, isPending } = useAuthenticate({ - onMutate: async (params) => { - const cfg = await signer?.getConfig(); - if (params.type === "email" && "email" in params) { - const emailMode = cfg?.email.mode - ? cfg?.email.mode - : params.emailMode === "magicLink" - ? "MAGIC_LINK" - : "OTP"; - - if (emailMode === "OTP") { - setAuthStep({ type: "otp_verify", email: params.email }); - } - } - }, - onSuccess: async (_data, params) => { - const cfg = await signer?.getConfig(); - if (params.type === "email" && "email" in params) { - const emailMode = cfg?.email.mode - ? cfg?.email.mode - : params.emailMode === "magicLink" - ? "MAGIC_LINK" - : "OTP"; - - if (emailMode === "MAGIC_LINK") { - setAuthStep({ type: "email_verify", email: params.email }); - return; - } - } - }, - onError: (e, params) => { - console.error(e); - if (e instanceof MfaRequiredError && "email" in params) { - const { multiFactorId } = e.multiFactors[0]; - setAuthStep({ - type: "totp_verify", - previousStep: "magicLink", - factorId: multiFactorId, - email: params.email, - }); - return; - } - - const error = e instanceof Error ? e : new Error("An Unknown error"); - setAuthStep({ type: "initial", error }); - }, - }); - - const form = useForm({ - defaultValues: { - email: "", - }, - onSubmit: async ({ value: { email } }) => { - const existingUser = await signer?.getUser(email); - const redirectParams = new URLSearchParams(); - - if (existingUser == null) { - redirectParams.set(IS_SIGNUP_QP, "true"); - } - - authenticate({ - type: "email", - email, - emailMode: legacyEmailMode, - redirectParams, - }); - }, - validatorAdapter: zodValidator(), - }); - - useEffect(() => { - if ( - status === AlchemySignerStatus.AWAITING_EMAIL_AUTH && - form.state.values.email - ) { - setAuthStep({ type: "email_verify", email: form.state.values.email }); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [status]); - - return ( -
{ - e.stopPropagation(); - e.preventDefault(); - form.handleSubmit(); - }} - > -
- - {(field) => ( - field.handleChange(e.target.value)} - onBlur={field.handleBlur} - placeholder={placeholder} - type="email" - iconLeft={} - iconRight={ - hideButton ? ( - - ) : undefined - } - disabled={isPending} - /> - )} - - [ - state.canSubmit, - state.isSubmitting, - state.values.email, - ]} - > - {([canSubmit, isSubmitting, email]) => - !hideButton ? ( - - ) : null - } - -
-
- ); - }, -); diff --git a/account-kit/react/src/components/auth/sections/FeaturedExternalWallets.tsx b/account-kit/react/src/components/auth/sections/FeaturedExternalWallets.tsx deleted file mode 100644 index 0a2ee0598d..0000000000 --- a/account-kit/react/src/components/auth/sections/FeaturedExternalWallets.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import React, { useMemo } from "react"; -import { useSolanaWallet } from "../../../hooks/useSolanaWallet.js"; -import { useDeduplicatedConnectors } from "../../../hooks/internal/useWalletDeduplication.js"; -import { - WalletButton, - SolanaWalletButton, - WalletConnectButton, -} from "../wallet-buttons/index.js"; -import { useWalletConnectAuthConfig } from "../hooks/useWalletConnectAuthConfig.js"; -import type { AuthType } from "../types.js"; -import type { ChainType } from "../../../configForExternalWallets.js"; - -interface InlineWalletButtonsProps { - config: Extract; -} - -const orderChains = (chains: ChainType[]) => - [...chains].sort((a, b) => - a === "evm" && b === "svm" ? -1 : a === "svm" && b === "evm" ? 1 : 0, - ); - -const norm = (s: string) => s.toLowerCase(); - -export const FeaturedExternalWallets = ({ - config, -}: InlineWalletButtonsProps) => { - const { wallets } = useSolanaWallet(); // Solana adapters - const connectors = useDeduplicatedConnectors(); // EVM connectors - const { walletConnectParams } = useWalletConnectAuthConfig(); - - const limit = config.numFeaturedWallets ?? Infinity; - - const orderedChains = useMemo( - () => orderChains((config.chainType ?? ["evm", "svm"]) as ChainType[]), - [config.chainType], - ); - - // Render both chains (if present) for each wallet name, but count the name once. - const buttons = useMemo(() => { - const names = config.wallets ?? []; - const out: React.ReactNode[] = []; - let counted = 0; - - for (const nameRaw of names) { - if (counted >= limit) break; - - const name = norm(nameRaw); - const elems: React.ReactNode[] = []; - - // Handle all wallets including WalletConnect - for (const chain of orderedChains) { - if (chain === "evm") { - // Special case for WalletConnect (EVM only) - if (name === "wallet_connect" || name === "wallet connect") { - if (walletConnectParams) { - elems.push( - , - ); - } - } else { - // Regular EVM wallets - const connector = connectors.find((c) => norm(c.name) === name); - if (connector) { - elems.push( - , - ); - } - } - } else if (chain === "svm") { - // Solana wallets only (WalletConnect is not supported on Solana) - if (!(name === "wallet_connect" || name === "wallet connect")) { - const wallet = wallets.find((w) => norm(w.adapter.name) === name); - if (wallet) { - elems.push( - , - ); - } - } - } - } - - if (elems.length > 0) { - out.push(...elems); // show both EVM + SVM if available - counted += 1; // but only count this wallet name once - } - } - - return out; - }, [ - config.wallets, - orderedChains, - connectors, - wallets, - limit, - walletConnectParams, - ]); - - return <>{buttons}; -}; diff --git a/account-kit/react/src/components/auth/sections/Footer.tsx b/account-kit/react/src/components/auth/sections/Footer.tsx deleted file mode 100644 index 82bf09be3f..0000000000 --- a/account-kit/react/src/components/auth/sections/Footer.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { EmailNotReceivedDisclaimer } from "../card/footer/email-not-reveived.js"; -import { HelpText } from "../card/footer/help-text.js"; -import { OAuthContactSupport } from "../card/footer/oauth-contact-support.js"; -import { ProtectedBy } from "../card/footer/protected-by.js"; -import { RegistrationDisclaimer } from "../card/footer/registration-disclaimer.js"; -import type { AuthStep } from "../context.js"; - -type FooterProps = { - authStep: AuthStep; -}; - -const RenderFooterText = ({ authStep }: FooterProps) => { - switch (authStep.type) { - case "initial": - return ; - case "email_verify": - case "otp_verify": - return ; - case "passkey_create": - case "wallet_connect": - case "passkey_verify": - return ; - case "oauth_completing": - return ; - case "email_completing": - case "totp_verify": - case "passkey_create_success": - case "eoa_connect": - case "pick_eoa": - case "complete": - return null; - } -}; -export const Footer = ({ authStep }: FooterProps) => { - return ( -
- -
- -
-
- ); -}; diff --git a/account-kit/react/src/components/auth/sections/InjectedProvidersAuth.tsx b/account-kit/react/src/components/auth/sections/InjectedProvidersAuth.tsx deleted file mode 100644 index 84e7adc26a..0000000000 --- a/account-kit/react/src/components/auth/sections/InjectedProvidersAuth.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { Button } from "../../button.js"; -import { useAuthContext } from "../context.js"; -import { WalletIcon } from "../../../icons/wallet.js"; -import { FeaturedExternalWallets } from "./FeaturedExternalWallets.js"; -import type { AuthType } from "../types.js"; - -interface ExternalWalletsAuthProps { - config: Extract; -} - -export const ExternalWalletsAuth = ({ config }: ExternalWalletsAuthProps) => { - const { setAuthStep } = useAuthContext(); - - // Show featured section if numFeaturedWallets is defined and > 1 - const hasFeaturedWallets = - typeof config.numFeaturedWallets === "number" && - config.numFeaturedWallets > 0; - - // If featured wallets are configured, render them above the button - if (hasFeaturedWallets) { - const buttonText = config.moreButtonText ?? "More wallets"; - - return ( -
- - {!config.hideMoreButton && ( - - )} -
- ); - } - - // Default behavior - show single "Continue with a wallet" button - return ( - - ); -}; diff --git a/account-kit/react/src/components/auth/sections/OAuth.tsx b/account-kit/react/src/components/auth/sections/OAuth.tsx deleted file mode 100644 index b754282c65..0000000000 --- a/account-kit/react/src/components/auth/sections/OAuth.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import { memo } from "react"; -import { - AppleIcon, - FacebookIcon, - GoogleIcon, - TwitchIcon, -} from "../../../icons/auth-icons/index.js"; -import { assertNever } from "../../../utils.js"; -import { Button } from "../../button.js"; -import { useOAuthVerify } from "../hooks/useOAuthVerify.js"; -import type { AuthType } from "../types.js"; - -type Props = Extract; - -// Not used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export const OAuth = memo(({ ...config }: Props) => { - const { authenticate } = useOAuthVerify({ config }); - - switch (config.authProviderId) { - case "google": - return ( - - ); - case "facebook": - return ( - - ); - case "apple": - return ( - - ); - case "twitch": - return ( - - ); - case "auth0": - return ( - - ); - default: - assertNever( - config, - `unhandled authProviderId ${ - (config as any).authProviderId - } passed into auth sections`, - ); - } -}); diff --git a/account-kit/react/src/components/auth/sections/PasskeyAuth.tsx b/account-kit/react/src/components/auth/sections/PasskeyAuth.tsx deleted file mode 100644 index 9abdd41931..0000000000 --- a/account-kit/react/src/components/auth/sections/PasskeyAuth.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { memo } from "react"; -import { PasskeyIcon } from "../../../icons/passkey.js"; -import { ls } from "../../../strings.js"; -import { Button } from "../../button.js"; -import { usePasskeyVerify } from "../hooks/usePasskeyVerify.js"; - -type Props = { - label?: string; -}; - -// Not used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export const PasskeyAuth = memo( - ({ label = ls.login.passkey.button }: Props) => { - const { authenticate } = usePasskeyVerify(); - - return ( - - ); - }, -); diff --git a/account-kit/react/src/components/auth/types.ts b/account-kit/react/src/components/auth/types.ts deleted file mode 100644 index 8d9b0cb686..0000000000 --- a/account-kit/react/src/components/auth/types.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { - KnownAuthProvider, - OauthRedirectConfig, -} from "@account-kit/signer"; -import { capitalize } from "../../utils.js"; -import type { - ChainType, - // ExternalWalletUIConfig, -} from "../../configForExternalWallets.js"; - -export type AuthType = - | { - // TODO: this should support setting redirectParams which will be added to the email redirect - type: "email"; - /** @deprecated This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. */ - emailMode?: "magicLink" | "otp"; - hideButton?: boolean; - buttonLabel?: string; - placeholder?: string; - } - | { type: "passkey" } - | { - type: "external_wallets"; - // New simplified shape - wallets?: string[]; - chainType?: ChainType[]; - walletConnectProjectId?: string; - // How many from wallets to feature on landing - numFeaturedWallets?: number; - walletConnect?: import("wagmi/connectors").WalletConnectParameters; - moreButtonText?: string; - hideMoreButton?: boolean; - } - | ({ type: "social"; scope?: string; claims?: string } & ( - | { - authProviderId: "auth0"; - isCustomProvider?: false; - auth0Connection?: string; - displayName: string; - logoUrl: string; - logoUrlDark?: string; - } - | { - authProviderId: KnownAuthProvider; - isCustomProvider?: false; - auth0Connection?: never; - displayName?: never; - logoUrl?: never; - logoUrlDark?: never; - } - ) & - OauthRedirectConfig); - -export function getSocialProviderDisplayName( - authType: Extract, -): string { - return authType.displayName ?? capitalize(authType.authProviderId); -} diff --git a/account-kit/react/src/components/auth/wallet-buttons/SolanaWalletButton.tsx b/account-kit/react/src/components/auth/wallet-buttons/SolanaWalletButton.tsx deleted file mode 100644 index cf9bf2a0d1..0000000000 --- a/account-kit/react/src/components/auth/wallet-buttons/SolanaWalletButton.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import type { Wallet } from "@solana/wallet-adapter-react"; -import { Button } from "../../button.js"; -import { useConnectSolanaEOA } from "../hooks/useConnectSolanaEOA.js"; -import type { WalletButtonProps } from "./types.js"; -import { getWalletIcon } from "./walletIcons.js"; - -interface SolanaWalletButtonProps extends WalletButtonProps { - wallet: Wallet; -} - -export const SolanaWalletButton = ({ - wallet, - className, - onClick, -}: SolanaWalletButtonProps) => { - const { connect } = useConnectSolanaEOA(); - - const handleClick = () => { - if (onClick) { - onClick(); - } - connect(wallet); - }; - - // Get the built-in icon component for this adapter - const IconComponent = getWalletIcon(wallet.adapter.name); - - // Fallback to wallet.adapter.icon if no built-in icon is available - const fallbackIconSrc = wallet.adapter.icon; - - const renderIcon = () => { - if (IconComponent) { - return ; - } - - if (fallbackIconSrc) { - return ( - {wallet.adapter.name} - ); - } - - return null; - }; - - return ( - - ); -}; diff --git a/account-kit/react/src/components/auth/wallet-buttons/WalletButton.tsx b/account-kit/react/src/components/auth/wallet-buttons/WalletButton.tsx deleted file mode 100644 index 20d676c54e..0000000000 --- a/account-kit/react/src/components/auth/wallet-buttons/WalletButton.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import type { Connector } from "wagmi"; -import { Button } from "../../button.js"; -import { useConnectEOA } from "../hooks/useConnectEOA.js"; -import { useChain } from "../../../hooks/useChain.js"; -import type { WalletButtonProps } from "./types.js"; -import { getWalletIcon } from "./walletIcons.js"; - -interface EVMWalletButtonProps extends WalletButtonProps { - connector: Connector; -} - -export const WalletButton = ({ - connector, - className, - onClick, -}: EVMWalletButtonProps) => { - const { chain } = useChain(); - const { connect } = useConnectEOA(); - - const handleClick = () => { - if (onClick) { - onClick(); - } - connect({ connector, chainId: chain.id }); - }; - - // Get the built-in icon component for this connector type - const IconComponent = getWalletIcon(connector.name); - - // Fallback to connector.icon if no built-in icon is available - const fallbackIconSrc = connector.icon; - - const renderIcon = () => { - if (IconComponent) { - return ; - } - - if (fallbackIconSrc) { - return ( - {connector.name} - ); - } - - return null; - }; - - return ( - - ); -}; diff --git a/account-kit/react/src/components/auth/wallet-buttons/WalletConnectButton.tsx b/account-kit/react/src/components/auth/wallet-buttons/WalletConnectButton.tsx deleted file mode 100644 index 9445b5a77a..0000000000 --- a/account-kit/react/src/components/auth/wallet-buttons/WalletConnectButton.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { walletConnect } from "wagmi/connectors"; -import { WalletConnectIcon } from "../../../icons/walletConnectIcon.js"; -import { Button } from "../../button.js"; -import { useConnectEOA } from "../hooks/useConnectEOA.js"; -import { useChain } from "../../../hooks/useChain.js"; -import { useAuthContext } from "../context.js"; -import { useWalletConnectAuthConfig } from "../hooks/useWalletConnectAuthConfig.js"; -import type { WalletButtonProps } from "./types.js"; - -export const WalletConnectButton = ({ - className, - onClick, -}: WalletButtonProps) => { - const { chain } = useChain(); - const { connect } = useConnectEOA(); - const { setAuthStep } = useAuthContext(); - const { walletConnectParams } = useWalletConnectAuthConfig(); - - const walletConnectConnector = walletConnectParams - ? walletConnect(walletConnectParams) - : null; - - const handleClick = () => { - if (onClick) { - onClick(); - } - - // If walletConnectConnector is not found, set the error and return - if (!walletConnectConnector) { - return setAuthStep({ - type: "wallet_connect", - error: new Error("WalletConnect params not found"), - }); - } - - connect({ - connector: walletConnectConnector, - chainId: chain.id, - }); - }; - - if (!walletConnectConnector) { - return null; - } - - return ( - - ); -}; diff --git a/account-kit/react/src/components/auth/wallet-buttons/index.ts b/account-kit/react/src/components/auth/wallet-buttons/index.ts deleted file mode 100644 index fe7b1f56eb..0000000000 --- a/account-kit/react/src/components/auth/wallet-buttons/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { WalletButton } from "./WalletButton.js"; -export { WalletConnectButton } from "./WalletConnectButton.js"; -export { SolanaWalletButton } from "./SolanaWalletButton.js"; -export type { WalletButtonProps } from "./types.js"; diff --git a/account-kit/react/src/components/auth/wallet-buttons/types.ts b/account-kit/react/src/components/auth/wallet-buttons/types.ts deleted file mode 100644 index 03bc8563a6..0000000000 --- a/account-kit/react/src/components/auth/wallet-buttons/types.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { WalletAdapter } from "@solana/wallet-adapter-base"; -import type { Connector, CreateConnectorFn } from "wagmi"; - -export interface WalletButtonProps { - className?: string; - onClick?: () => void; -} - -export interface WalletInfo { - id: string; - name: string; - icon?: string; - type: "evm" | "solana" | "walletconnect"; - // Store the actual objects for direct access - adapter?: WalletAdapter; - connector?: Connector; -} - -export type WalletReference = - | WalletAdapter - | Connector - | CreateConnectorFn - | string; diff --git a/account-kit/react/src/components/auth/wallet-buttons/walletIcons.tsx b/account-kit/react/src/components/auth/wallet-buttons/walletIcons.tsx deleted file mode 100644 index 5a4fa05c4d..0000000000 --- a/account-kit/react/src/components/auth/wallet-buttons/walletIcons.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react"; -import { MetaMaskIcon } from "../../../icons/metaMaskIcon.js"; -import { CoinbaseIcon } from "../../../icons/coinbaseIcon.js"; -import { WalletConnectIcon } from "../../../icons/walletConnectIcon.js"; - -type IconComponent = React.ComponentType< - React.JSX.IntrinsicAttributes & React.SVGProps ->; - -export const getWalletIcon = (walletName: string): IconComponent | null => { - switch (walletName.toLowerCase()) { - case "metamask": - return MetaMaskIcon; - case "coinbasewallet": - case "coinbase wallet": - return CoinbaseIcon; - case "walletconnect": - return WalletConnectIcon; - default: - return null; - } -}; diff --git a/account-kit/react/src/components/button.stories.tsx b/account-kit/react/src/components/button.stories.tsx deleted file mode 100644 index d412d9803b..0000000000 --- a/account-kit/react/src/components/button.stories.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import type { Meta, StoryObj } from "@storybook/react"; -import { Button } from "./button.js"; - -const meta: Meta = { - component: Button, - title: "Button", - args: { - variant: "primary", - disabled: false, - }, - argTypes: { - variant: { - control: { - type: "radio", - options: ["primary", "secondary", "social"], - }, - }, - disabled: { - control: { - type: "boolean", - }, - }, - onClick: { - action: "clicked", - }, - }, -}; -export default meta; -type Story = StoryObj; - -export const Default: Story = { - render: (args) => { - return ; - }, -}; diff --git a/account-kit/react/src/components/button.tsx b/account-kit/react/src/components/button.tsx deleted file mode 100644 index e1139e2f03..0000000000 --- a/account-kit/react/src/components/button.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { - type ButtonHTMLAttributes, - type DetailedHTMLProps, - type ReactNode, -} from "react"; - -type ButtonProps = ( - | { variant?: "primary" | "secondary" | "link"; icon?: never } - | { variant: "social"; icon?: string | ReactNode } -) & - Omit< - DetailedHTMLProps< - ButtonHTMLAttributes, - HTMLButtonElement - >, - "variant" | "ref" - > & { - fullWidthContent?: boolean; - }; - -export const Button = ({ - variant, - children, - icon, - className, - fullWidthContent, - ...props -}: ButtonProps) => { - const btnClass = (() => { - switch (variant) { - case "secondary": - return "akui-btn-secondary"; - case "social": - return "akui-btn-auth"; - case "link": - return "akui-btn-link"; - case "primary": - default: - return "akui-btn-primary"; - } - })(); - - return ( - - ); -}; diff --git a/account-kit/react/src/components/constants.ts b/account-kit/react/src/components/constants.ts deleted file mode 100644 index e668c4eef8..0000000000 --- a/account-kit/react/src/components/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const IS_SIGNUP_QP = "aa-is-signup"; diff --git a/account-kit/react/src/components/dialog/dialog.tsx b/account-kit/react/src/components/dialog/dialog.tsx deleted file mode 100644 index 57a2c40caa..0000000000 --- a/account-kit/react/src/components/dialog/dialog.tsx +++ /dev/null @@ -1,107 +0,0 @@ -"use client"; - -import { - useCallback, - useEffect, - useLayoutEffect, - useRef, - useState, - type ReactNode, -} from "react"; -import { createPortal } from "react-dom"; -import { RemoveScroll } from "react-remove-scroll"; -import { FocusTrap } from "./focustrap.js"; - -type DialogProps = { - isOpen: boolean; - onClose: () => void; - children: ReactNode; - fullWidth?: boolean; -}; - -/** - * Dialog component that renders a modal dialog. - * - * @param {DialogProps} props - The props for the Dialog component. - * @returns {JSX.Element | null} The rendered Dialog component. - */ -export const Dialog = ({ - isOpen, - onClose, - children, - fullWidth = false, -}: DialogProps) => { - const [isScrollLocked, setScrollLocked] = useState(false); - - const [renderPortal, setRenderPortal] = useState(false); - - const dialogCardRef = useRef(null); - - const handleBackgroundClick = useCallback(() => { - onClose(); - }, [onClose]); - - useLayoutEffect(() => { - const dialogCard = dialogCardRef.current; - - if (isOpen) { - setRenderPortal(true); - return; - } - - const renderPortalHandler = () => { - setRenderPortal(false); - }; - - dialogCard?.addEventListener("animationend", renderPortalHandler); - - return () => { - dialogCard?.removeEventListener("animationend", renderPortalHandler); - }; - }, [isOpen]); - - useEffect(() => { - const handleEscape = (event: KeyboardEvent) => { - if (event.key === "Escape" && isOpen) { - onClose(); - } - }; - - document.addEventListener("keydown", handleEscape); - return () => document.removeEventListener("keydown", handleEscape); - }, [isOpen, onClose]); - - useEffect(() => { - // Has to run in the browser - setScrollLocked(getComputedStyle(document.body).overflow !== "hidden"); - }, []); - - return renderPortal - ? createPortal( - - {/* Overlay */} -
- -
event.stopPropagation()} - > - {children} -
-
-
-
, - document.body, - ) - : null; -}; diff --git a/account-kit/react/src/components/dialog/focustrap.tsx b/account-kit/react/src/components/dialog/focustrap.tsx deleted file mode 100644 index dcb2cb2130..0000000000 --- a/account-kit/react/src/components/dialog/focustrap.tsx +++ /dev/null @@ -1,80 +0,0 @@ -// Adapted from: https://hiddedevries.nl/en/blog/2017-01-29-using-javascript-to-trap-focus-in-an-element - -import { useRef, useEffect, type PropsWithChildren } from "react"; - -function useTrapFocus() { - const ref = useRef(null); - - const handleKeyDown = (event: KeyboardEvent) => { - if (!ref.current) { - return; - } - - // Elements that can receive focus - const focusableElements = ref.current.querySelectorAll(` - a[href]:not([disabled]), - button:not([disabled]), - textarea:not([disabled]), - input[type="text"]:not([disabled]), - input[type="radio"]:not([disabled]), - input[type="checkbox"]:not([disabled]), - select:not([disabled]) - `); - - const firstFocusableElement = focusableElements[0]; - const lastFocusableElement = - focusableElements[focusableElements.length - 1]; - - const isPressingTab = event.key === "Tab"; - - if (!isPressingTab) { - return; - } - - if (event.shiftKey) { - // Shift + tab - if (document.activeElement === firstFocusableElement) { - lastFocusableElement.focus(); - event.preventDefault(); - } - } else { - // Just tab - if (document.activeElement === lastFocusableElement) { - firstFocusableElement.focus(); - event.preventDefault(); - } - } - }; - - useEffect(() => { - const el = ref.current; - if (!el) { - return; - } - - el.addEventListener("keydown", handleKeyDown); - el.focus({ preventScroll: true }); - - return () => { - el.removeEventListener("keydown", handleKeyDown); - }; - }, []); - - return { ref }; -} - -export const FocusTrap = ({ children }: PropsWithChildren<{}>) => { - const { ref } = useTrapFocus(); - - useEffect(() => { - if (ref.current) { - ref.current.focus({ preventScroll: true }); - } - }, [ref]); - - return ( -
- {children} -
- ); -}; diff --git a/account-kit/react/src/components/divider.tsx b/account-kit/react/src/components/divider.tsx deleted file mode 100644 index a224195ada..0000000000 --- a/account-kit/react/src/components/divider.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { ls } from "../strings.js"; - -// this isn't used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export const Divider = () => { - return ( -
-
-

{ls.login.or}

-
-
- ); -}; diff --git a/account-kit/react/src/components/error.tsx b/account-kit/react/src/components/error.tsx deleted file mode 100644 index 05307a63ab..0000000000 --- a/account-kit/react/src/components/error.tsx +++ /dev/null @@ -1,17 +0,0 @@ -interface ErrorContainerProps { - error?: Error | string; -} - -// eslint-disable-next-line jsdoc/require-jsdoc -export const ErrorContainer = ({ error }: ErrorContainerProps) => { - return ( -
-
- Error -
-
- {error != null ? error.toString() : "Oops! Something went wrong"} -
-
- ); -}; diff --git a/account-kit/react/src/components/input.tsx b/account-kit/react/src/components/input.tsx deleted file mode 100644 index f8a61b0228..0000000000 --- a/account-kit/react/src/components/input.tsx +++ /dev/null @@ -1,48 +0,0 @@ -type BaseProps = { - iconLeft?: React.ReactNode; - iconRight?: React.ReactNode; - error?: string; -} & Omit, "ref">; - -type Props = { - label?: string; - hint?: string; -} & BaseProps; - -const BaseInput = ({ - iconLeft, - iconRight, - error, - className, - ...props -}: BaseProps) => { - return ( - - ); -}; - -// this isn't used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export const Input = ({ label, hint, ...props }: Props) => { - if (label || hint || props.error) { - return ( - - ); - } - - return ; -}; diff --git a/account-kit/react/src/components/navigation.tsx b/account-kit/react/src/components/navigation.tsx deleted file mode 100644 index 16f7b6d9fe..0000000000 --- a/account-kit/react/src/components/navigation.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { BackArrow, X } from "../icons/nav.js"; -import { Button } from "./button.js"; - -interface NavigationProps { - onBack?: () => void; - onClose: () => void; - showBack?: boolean; - showClose: boolean; -} - -// eslint-disable-next-line jsdoc/require-jsdoc -export const Navigation = ({ - showBack = false, - showClose, - onBack, - onClose, -}: NavigationProps) => { - return ( -
- - - -
- ); -}; diff --git a/account-kit/react/src/components/notification.tsx b/account-kit/react/src/components/notification.tsx deleted file mode 100644 index 208ae50e56..0000000000 --- a/account-kit/react/src/components/notification.tsx +++ /dev/null @@ -1,29 +0,0 @@ -type NotificationProps = { - type: "success" | "warning" | "error"; - message: string; - className?: string; -}; - -// this isn't used externally -// eslint-disable-next-line jsdoc/require-jsdoc -export function Notification({ className, type, message }: NotificationProps) { - const bgColor = (() => { - switch (type) { - case "success": - return "bg-bg-surface-success"; - case "warning": - return "bg-bg-surface-warning"; - case "error": - return "bg-bg-surface-error"; - } - })(); - return ( -
- {message} -
- ); -} diff --git a/account-kit/react/src/components/otp-input/otp-input.stories.tsx b/account-kit/react/src/components/otp-input/otp-input.stories.tsx deleted file mode 100644 index d1bcd10d62..0000000000 --- a/account-kit/react/src/components/otp-input/otp-input.stories.tsx +++ /dev/null @@ -1,167 +0,0 @@ -/* eslint-disable react-hooks/rules-of-hooks */ -import type { Meta, StoryObj } from "@storybook/react"; -import { initialOTPValue, OTPInput, type OTPCodeType } from "./otp-input.jsx"; -import { userEvent, within, expect, waitFor } from "@storybook/test"; -import { useState } from "react"; - -const meta: Meta = { - component: OTPInput, - title: "OTP/OTPInput", - render: (args) => { - const [value, setValue] = useState(initialOTPValue); - const [errorText, setErrorText] = useState(""); - const handleReset = () => { - setErrorText(""); - setValue(initialOTPValue); - }; - return ( - - ); - }, -}; -export default meta; -type Story = StoryObj; - -export const Default: Story = {}; - -export const TestTyping: Story = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const inputs = canvas.getAllByRole("textbox"); - - // Test typing individual numbers - await userEvent.type(inputs[0], "1"); - await userEvent.type(inputs[1], "2"); - await userEvent.type(inputs[2], "3"); - await userEvent.type(inputs[3], "4"); - await userEvent.type(inputs[4], "5"); - await userEvent.type(inputs[5], "6"); - - // Verify values - expect(inputs[0]).toHaveValue("1"); - expect(inputs[1]).toHaveValue("2"); - expect(inputs[2]).toHaveValue("3"); - expect(inputs[3]).toHaveValue("4"); - expect(inputs[4]).toHaveValue("5"); - expect(inputs[5]).toHaveValue("6"); - }, -}; - -export const TestPasting: Story = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const inputs = canvas.getAllByRole("textbox"); - - // Simulate paste event - const clipboardData = new DataTransfer(); - clipboardData.setData("text/plain", "123456"); - - const pasteEvent = new ClipboardEvent("paste", { - clipboardData, - bubbles: true, - cancelable: true, - }); - - inputs[0].dispatchEvent(pasteEvent); - - await waitFor(() => { - expect(inputs[0]).toHaveValue("1"); - expect(inputs[1]).toHaveValue("2"); - expect(inputs[2]).toHaveValue("3"); - expect(inputs[3]).toHaveValue("4"); - expect(inputs[4]).toHaveValue("5"); - expect(inputs[5]).toHaveValue("6"); - }); - }, -}; - -export const TestKeyboardNavigation: Story = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const inputs = canvas.getAllByRole("textbox"); - - // Focus first input - await userEvent.click(inputs[0]); - expect(document.activeElement).toBe(inputs[0]); - - // Test right arrow - await userEvent.keyboard("{ArrowRight}"); - expect(document.activeElement).toBe(inputs[1]); - - // Test left arrow - await userEvent.keyboard("{ArrowLeft}"); - expect(document.activeElement).toBe(inputs[0]); - - // Test backspace - await userEvent.type(inputs[0], "1"); - await userEvent.keyboard("{Backspace}"); - await userEvent.keyboard("{Backspace}"); - expect(inputs[0]).toHaveValue(""); - expect(document.activeElement).toBe(inputs[0]); - await userEvent.type(inputs[0], "1"); - await userEvent.keyboard("23456"); - }, -}; - -export const TestAutoFocus: Story = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const inputs = canvas.getAllByRole("textbox"); - - // Check if first input is focused on mount - expect(document.activeElement).toBe(inputs[0]); - }, -}; - -export const TestErrorState: Story = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - - // Test invalid paste - const inputs = canvas.getAllByRole("textbox"); - const clipboardData = new DataTransfer(); - clipboardData.setData("text/plain", "123"); // Invalid length - - const pasteEvent = new ClipboardEvent("paste", { - clipboardData, - bubbles: true, - cancelable: true, - }); - - inputs[0].dispatchEvent(pasteEvent); - - // Check for error message - await waitFor(() => { - const errorMessage = canvas.getByText( - /The code you entered is incorrect/i, - ); - expect(errorMessage).toBeInTheDocument(); - }); - }, -}; - -export const TestDisabledState: Story = { - args: { - disabled: true, - }, - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const inputs = canvas.getAllByRole("textbox"); - - // Verify all inputs are disabled - inputs.forEach((input) => { - expect(input).toBeDisabled(); - }); - - // Try to type (should not work) - await userEvent.type(inputs[0], "1"); - expect(inputs[0]).toHaveValue(""); - }, -}; diff --git a/account-kit/react/src/components/otp-input/otp-input.tsx b/account-kit/react/src/components/otp-input/otp-input.tsx deleted file mode 100644 index 33ccf486fd..0000000000 --- a/account-kit/react/src/components/otp-input/otp-input.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import React, { useEffect, useRef, useState } from "react"; -import { ls } from "../../strings.js"; - -export type OTPCodeType = [string, string, string, string, string, string]; -export const initialOTPValue: OTPCodeType = ["", "", "", "", "", ""]; -const OTP_LENGTH = 6; -type OTPInputProps = { - errorText?: string; - value: OTPCodeType; - setValue: (otpCode: OTPCodeType) => void; - setErrorText: React.Dispatch>; - disabled?: boolean; - handleReset: () => void; - className?: string; - isVerified?: boolean; -}; - -export const isOTPCodeType = (arg: string[]): arg is OTPCodeType => { - return ( - Array.isArray(arg) && - arg.every((item: string) => typeof item === "string" && item !== "") && - arg.length === OTP_LENGTH - ); -}; - -export const OTPInput: React.FC = ({ - value, - setValue, - errorText, - disabled, - setErrorText, - handleReset, - className, - isVerified, -}) => { - const [autoComplete, setAutoComplete] = useState(""); - const [activeElement, setActiveElement] = useState(0); - - const refs = useRef>([]); - // Initialize refs - useEffect(() => { - refs.current = refs.current.slice(0, OTP_LENGTH); - refs.current[0]?.focus(); - }, []); - // Select active element when active element value changes - useEffect(() => { - if (activeElement !== null && refs.current[activeElement]) { - refs.current[activeElement]?.select(); - refs.current[activeElement]?.focus(); - } - }, [activeElement]); - - useEffect(() => { - const newValue = autoComplete.split(""); - if (isOTPCodeType(newValue)) { - setValue(newValue); - } - }, [autoComplete, setValue]); - - const handleChange = (e: React.ChangeEvent, i: number) => { - //Fix for ios chrome autocomplete - if (e.target.value.length === OTP_LENGTH) { - const chromeIOSAutocomplete = e.target.value.split(""); - if (isOTPCodeType(chromeIOSAutocomplete)) { - setValue(chromeIOSAutocomplete); - setActiveElement(null); - return; - } - } - const newValue = [...value] as OTPCodeType; - newValue.splice(i, 1, e.target.value); - setErrorText(""); - setValue(newValue); - focusNextElement(); - }; - - const handleClick = (i: number) => { - refs.current[i]?.select(); - setActiveElement(i); - setErrorText(""); - }; - - const focusNextElement = () => { - const nextElement = activeElement ? activeElement + 1 : 1; - setActiveElement(nextElement); - }; - - const focusPreviousElement = () => { - const previousElement = activeElement ? activeElement - 1 : 0; - setActiveElement(previousElement); - }; - - const handlePaste = (e: React.ClipboardEvent) => { - e.preventDefault(); - const pasteData = e.clipboardData - .getData("text/plain") - .split("") - .slice(0, OTP_LENGTH); - if (isOTPCodeType(pasteData)) { - setValue(pasteData); - } else { - setErrorText(ls.error.otp.invalid); - } - }; - - const handleKeydown = (e: React.KeyboardEvent) => { - if (activeElement === null) return; - switch (e.key) { - case "Backspace": - e.preventDefault(); - const newValue = [...value] as OTPCodeType; - newValue.splice(activeElement, 1, ""); - setValue(newValue); - focusPreviousElement(); - break; - case "ArrowLeft": - e.preventDefault(); - focusPreviousElement(); - break; - case "ArrowRight": - e.preventDefault(); - if (activeElement < OTP_LENGTH - 1) focusNextElement(); - break; - case "Spacebar": { - break; - } - } - }; - - return ( -
- {/* Input for autocomplete, visibility hidden */} - setAutoComplete(e.target.value)} - onClick={handleReset} - /> -
- {initialOTPValue.map((_, i) => ( - (refs.current[i] = el)} - tabIndex={i + 1} - type="text" - aria-label={`One time password input for the ${i + 1} digit`} - inputMode="numeric" - pattern="[0-9]*" - //Fix for ios chrome autocomplete - maxLength={i === 0 ? OTP_LENGTH : 1} - onFocus={() => setActiveElement(i)} - onPaste={handlePaste} - onChange={(e) => handleChange(e, i)} - onClick={() => handleClick(i)} - onInput={focusNextElement} - onKeyDown={handleKeydown} - key={i} - disabled={disabled || isVerified} - value={value[i]} - aria-invalid={!!errorText} - /> - ))} -
- {errorText && ( -

{errorText}

- )} -
- ); -}; diff --git a/account-kit/react/src/configForExternalWallets.ts b/account-kit/react/src/configForExternalWallets.ts deleted file mode 100644 index b90b7b5567..0000000000 --- a/account-kit/react/src/configForExternalWallets.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { metaMask, coinbaseWallet } from "wagmi/connectors"; -import type { CreateConnectorFn } from "wagmi"; -import { SolflareWalletAdapter } from "@solana/wallet-adapter-wallets"; -import type { WalletAdapter } from "@solana/wallet-adapter-base"; - -export type ChainType = "evm" | "svm"; - -export interface ConfigForExternalWalletsParams { - wallets: string[]; - chainType: ChainType[]; - walletConnectProjectId?: string; - moreButtonText?: string; - hideMoreButton?: boolean; - numFeaturedWallets?: number; -} - -interface ConfigForExternalWalletsResult { - connectors: CreateConnectorFn[]; - adapters: WalletAdapter[] | "detect"; - uiConfig: { - walletConnect?: { projectId: string }; - wallets: string[]; - chainType: ChainType[]; - moreButtonText: string; - hideMoreButton: boolean; - numFeaturedWallets?: number; - }; -} - -// Built-in wallet configurations -const WALLETS = { - solflare: { - svm: () => new SolflareWalletAdapter(), - }, - metamask: { - evm: () => metaMask(), - }, - "coinbase wallet": { - evm: () => coinbaseWallet(), - }, -}; - -/** - * Configure external wallets for Account Kit with simplified wallet name-based configuration - * Handles both EVM connectors and Solana adapters, returns config for core and UI - * - * @param {ConfigForExternalWalletsParams} root0 - Configuration parameters object - * @param {SupportedWallet[]} root0.wallets - Array of wallet names in display order - * @param {ChainType[]} root0.chainType - Array of supported chain types - * @param {string} [root0.walletConnectProjectId] - Project ID for WalletConnect - * @param {string} [root0.moreButtonText] - Text for the "more wallets" button - * @param {boolean} [root0.hideMoreButton] - Whether to hide the more button - * @param {number} [root0.numFeaturedWallet] - Number of wallets to show as featured - * @returns {ConfigForExternalWalletsResult} Object containing connectors, adapters, and UI config - */ -export const configForExternalWallets = ({ - wallets, - chainType, - walletConnectProjectId, - moreButtonText = "More wallets", - hideMoreButton = false, - numFeaturedWallets, -}: ConfigForExternalWalletsParams): ConfigForExternalWalletsResult => { - if (!wallets.length) { - throw new Error("No wallets provided"); - } - - if (!chainType.length) { - throw new Error("No chain types provided"); - } - - const connectors: CreateConnectorFn[] = []; - const adaptersList: WalletAdapter[] = []; - - // Sort chain types once: EVM first, then SVM - const sortedChainTypes = [...chainType].sort((a, b) => - a === "evm" && b === "svm" ? -1 : a === "svm" && b === "evm" ? 1 : 0, - ); - - // Process each wallet for each chain type - for (const walletName of wallets) { - const walletConfig = WALLETS[walletName as keyof typeof WALLETS]; - if (!walletConfig) continue; // Unknown wallet, skip - - for (const chain of sortedChainTypes) { - if (chain === "svm" && "svm" in walletConfig && walletConfig.svm) { - adaptersList.push(walletConfig.svm()); - } else if (chain === "evm" && "evm" in walletConfig && walletConfig.evm) { - connectors.push(walletConfig.evm()); - } - } - } - - const shouldDetectSolana = - chainType.includes("svm") && adaptersList.length === 0; - - return { - connectors, - adapters: shouldDetectSolana ? "detect" : adaptersList, - uiConfig: { - ...(walletConnectProjectId && { - walletConnect: { projectId: walletConnectProjectId }, - }), - wallets, - chainType, - moreButtonText, - hideMoreButton, - ...(typeof numFeaturedWallets === "number" && { - numFeaturedWallets, - }), - }, - }; -}; diff --git a/account-kit/react/src/createConfig.ts b/account-kit/react/src/createConfig.ts deleted file mode 100644 index ead25d3605..0000000000 --- a/account-kit/react/src/createConfig.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { - type AlchemyAccountsConfig, - type CreateConfigProps, -} from "@account-kit/core"; -import { createConfig as createCoreConfig } from "@account-kit/core"; -import { walletConnect } from "wagmi/connectors"; -import type { AuthType } from "./components/auth/types.js"; -import { ReactLogger } from "./metrics.js"; -import type { AlchemyAccountsUIConfig } from "./types"; -import { getWalletConnectParams } from "./utils.js"; -import { WALLET_CONNECT } from "./components/auth/card/eoa.js"; - -export type AlchemyAccountsConfigWithUI = AlchemyAccountsConfig & { - ui?: AlchemyAccountsUIConfig; -}; - -/** - * Wraps the `createConfig` that is exported from `@aa-sdk/core` to allow passing - * an additional argument, the configuration object for the Auth Components UI - * (the modal and AuthCard). - * - * @example - * ```ts - * import { sepolia, alchemy } from "@account-kit/infra" - * import { AlchemyAccountsUIConfig, createConfig } from "@account-kit/react" - * import { QueryClient } from "@tanstack/react-query"; - * - * const uiConfig: AlchemyAccountsUIConfig = { - * illustrationStyle: "linear", - * auth: { - * sections: [[{ type: "email" }], [{ type: "passkey" }]], - * addPasskeyOnSignup: true, - * }, - * } - * - * const config = createConfig({ - * transport: alchemy({ apiKey: "your_api_key" }) - * chain: sepolia, - * ssr: true, - * sessionConfig: { - * expirationTimeMs: 1000 * 60 * 60, // 1 hour (defaults to 15 min) - * }, - * }, uiConfig) - * - * export const queryClient = new QueryClient(); - * ``` - * - * @param {CreateConfigProps} props for creating an alchemy account config - * @param {AlchemyAccountsUIConfig} ui (optional) configuration to use for the Auth Components UI - * @returns {AlchemyAccountsConfigWithUI} an alchemy account config object containing the core and client store, as well as the UI config - */ -export const createConfig = ( - props: CreateConfigProps, - ui?: AlchemyAccountsUIConfig, -): AlchemyAccountsConfigWithUI => { - if ( - ui?.auth?.sections.some((x) => - x.some((y) => y.type === "social" && y.mode === "popup"), - ) - ) { - props.enablePopupOauth = true; - } - - const externalWalletSection = ui?.auth?.sections - .find((x) => x.some((y) => y.type === "external_wallets")) - ?.find((x) => x.type === "external_wallets") as - | Extract - | undefined; - - // Simplified external wallets support: automatically add WalletConnect connector if needed - if (externalWalletSection?.walletConnectProjectId) { - // configForExternalWallets() provides other connectors but relies on SDK to handle WalletConnect - if ( - !props.connectors?.some((x) => "type" in x && x.type === WALLET_CONNECT) - ) { - const walletConnectParams = getWalletConnectParams({ - projectId: externalWalletSection.walletConnectProjectId, - })!; - props.connectors ??= []; - props.connectors.push(walletConnect(walletConnectParams)); - } - } - - const config = createCoreConfig(props); - - ReactLogger.trackEvent({ - name: "config_created", - data: - ui == null - ? { noUi: true } - : // we can't log react components so we need to strip out the header if it exists - { - ...ui, - auth: ui.auth - ? { - ...ui.auth, - header: ui.auth.header ? "custom" : "default", - } - : undefined, - }, - }); - - return { - ...config, - ui, - }; -}; diff --git a/account-kit/react/src/errors.ts b/account-kit/react/src/errors.ts deleted file mode 100644 index 21e8300b29..0000000000 --- a/account-kit/react/src/errors.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { BaseError as CoreBaseError } from "@aa-sdk/core"; -import { VERSION } from "./version.js"; - -/** - * Abstract BaseError class that extends from CoreBaseError. - * This class redefines a version which may differ from the `aa-core` version. - */ -export abstract class BaseError extends CoreBaseError { - // This version could be different from the aa-core version so we overwrite this here. - override version = VERSION; -} - -/** - * Error thrown when a hook is called without a AlchemyAccountProvider. - * - * @param hookName The name of the hook. - */ -export class NoAlchemyAccountContextError extends BaseError { - /** - * Constructs an error message indicating that a specific hook must be used within an AlchemyAccountProvider. - * - * @param {string} hookName The name of the hook that must be used within the AlchemyAccountProvider - */ - constructor(hookName: string) { - super(`${hookName} must be used within a AlchemyAccountProvider`); - } -} - -/** - * Error thrown when a hook is called without a client. - * - * @param hookName The name of the hook. - */ -export class ClientUndefinedHookError extends BaseError { - /** - * Initializes an error message indicating that the client must be defined for the specified hook name. - * - * @param {string} hookName The name of the hook where the client is required - */ - constructor(hookName: string) { - super(`client must be defined in ${hookName}`); - } -} - -/** - * An error thrown by hooks that require a uiConfig to be supplied to the AlchemyAccountProvider. - */ -export class MissingUiConfigError extends BaseError { - /** - * @param {string} hookName the name of the hook that is throwing this error - */ - constructor(hookName: string) { - super( - `${hookName}: uiConfig must be supplied to AlchemyAccountProvider to use this hook`, - ); - } -} - -/** - * An error thrown when connected to an EOA and trying to execute an action that is not supported. - */ -export class UnsupportedEOAActionError extends BaseError { - /** - * @param {string} hookName the hook that threw the error - * @param {string} action the action not supported by an EOA - */ - constructor(hookName: string, action: string) { - super(`${hookName}: ${action} is not supported for EOA accounts`); - } -} diff --git a/account-kit/react/src/hooks/index.ts b/account-kit/react/src/hooks/index.ts deleted file mode 100644 index 78410cdda8..0000000000 --- a/account-kit/react/src/hooks/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -export * from "./useAccount.js"; -export * from "./useAddOauthProvider.js"; -export * from "./useAddPasskey.js"; -export * from "./useAlchemyAccountContext.js"; -export * from "./useAuthenticate.js"; -export * from "./useAuthError.js"; -export * from "./useBundlerClient.js"; -export * from "./useChain.js"; -export * from "./useClientActions.js"; -export * from "./useConnect.js"; -export * from "./useConnectedUser.js"; -export * from "./useConnection.js"; -export * from "./useDropAndReplaceUserOperation.js"; -export * from "./useElementHeight.js"; -export * from "./useExportAccount.js"; -export * from "./useListAuthMethods.js"; -export * from "./useLogout.js"; -export * from "./useMFA.js"; -export * from "./useRemoveEmail.js"; -export * from "./useRemoveOauthProvider.js"; -export * from "./useRemovePasskey.js"; -export * from "./useResizeObserver.js"; -export * from "./useSendUserOperation.js"; -export * from "./useSendVerificationCode.js"; -export * from "./useSetEmail.js"; -export * from "./useSigner.js"; -export * from "./useSignerStatus.js"; -export * from "./useSignMessage.js"; -export * from "./useSignTypedData.js"; -export * from "./useSmartAccountClient.js"; -export * from "./useSolanaSigner.js"; -export * from "./useSolanaTransaction.js"; -export * from "./useSolanaConnection.js"; -export * from "./useSolanaWallet.js"; -export * from "./useUiConfig.js"; -export * from "./useUser.js"; -export * from "./useWaitForUserOperationTransaction.js"; diff --git a/account-kit/react/src/hooks/internal/useAuthConfig.ts b/account-kit/react/src/hooks/internal/useAuthConfig.ts deleted file mode 100644 index 83f55c427f..0000000000 --- a/account-kit/react/src/hooks/internal/useAuthConfig.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { useUiConfig, type UiConfigStore } from "../useUiConfig.js"; - -export function useAuthConfig< - T extends unknown | undefined = NonNullable, ->(selector?: (state: NonNullable) => T): T; - -export function useAuthConfig( - selector?: ( - state: NonNullable, - ) => NonNullable | undefined, -): NonNullable | undefined { - const state = useUiConfig((state) => { - if (!state.auth) { - throw new Error("Auth config expected to be present in UiConfigStore"); - } - return selector ? selector(state.auth) : state.auth; - }); - - return state; -} diff --git a/account-kit/react/src/hooks/internal/useEmailAuthLinkingRequired.ts b/account-kit/react/src/hooks/internal/useEmailAuthLinkingRequired.ts deleted file mode 100644 index 9af0ae6e68..0000000000 --- a/account-kit/react/src/hooks/internal/useEmailAuthLinkingRequired.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { useEffect, useRef } from "react"; -import { useSigner } from "../useSigner.js"; - -export function useEmailAuthLinkingRequired( - onLinkingRequired: (email: string) => void, - enabled = true, -) { - const signer = useSigner(); - - // Use a reference to the latest value of the callback. We don't want - // `useEffect` to depend on the callback, as the callback can be a new - // instance on every call if the caller doesn't memoize and the signer will - // trigger the event immediately if we resubscribe, potentially leading to an - // infinite loop of events. - const onLinkingRequiredRef = useRef(onLinkingRequired); - onLinkingRequiredRef.current = onLinkingRequired; - - useEffect(() => { - if (enabled && signer) { - const cancel = signer.on("emailAuthLinkingRequired", (email) => { - onLinkingRequiredRef.current(email); - }); - return cancel; - } - return undefined; - }, [signer, enabled]); -} diff --git a/account-kit/react/src/hooks/internal/useIllustrationStyle.ts b/account-kit/react/src/hooks/internal/useIllustrationStyle.ts deleted file mode 100644 index 49a6abaa6e..0000000000 --- a/account-kit/react/src/hooks/internal/useIllustrationStyle.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { useUiConfig } from "../useUiConfig.js"; - -export function useIllustrationStyle() { - return useUiConfig(({ illustrationStyle }) => ({ - illustrationStyle: illustrationStyle ?? "outline", - })); -} diff --git a/account-kit/react/src/hooks/internal/useNewUserSignup.ts b/account-kit/react/src/hooks/internal/useNewUserSignup.ts deleted file mode 100644 index 722ace3324..0000000000 --- a/account-kit/react/src/hooks/internal/useNewUserSignup.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { useEffect, useRef, useState } from "react"; -import { useSigner } from "../useSigner.js"; - -export function useNewUserSignup(onSignup: () => void, enabled = true) { - const hasHandled = useRef(false); - const [isNewUser, setIsNewUser] = useState(false); - const signer = useSigner(); - useEffect(() => { - const stopListening = signer?.on("newUserSignup", () => { - setIsNewUser(true); - }); - return stopListening; - }, [signer]); - - useEffect(() => { - const stopListening = signer?.on("disconnected", () => { - hasHandled.current = false; - }); - return stopListening; - }, [signer]); - - useEffect(() => { - if (!enabled) return; - if (!signer) return; - if (hasHandled.current) return; - if (isNewUser) { - onSignup(); - hasHandled.current = true; - } - }, [enabled, isNewUser, onSignup, signer]); -} diff --git a/account-kit/react/src/hooks/internal/useWalletDeduplication.ts b/account-kit/react/src/hooks/internal/useWalletDeduplication.ts deleted file mode 100644 index b531872e77..0000000000 --- a/account-kit/react/src/hooks/internal/useWalletDeduplication.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Custom hooks for wallet deduplication and filtering logic - */ - -import { useMemo } from "react"; -import { useSolanaWallet } from "../useSolanaWallet.js"; -import { useConnectEOA } from "../../components/auth/hooks/useConnectEOA.js"; -import { useWalletConnectAuthConfig } from "../../components/auth/hooks/useWalletConnectAuthConfig.js"; - -/** - * Hook to deduplicate EVM connectors - * - * @returns {Array} Array of unique EVM connectors - */ -export function useDeduplicatedConnectors() { - const { connectors } = useConnectEOA(); - - return useMemo(() => { - const uniqueMap = new Map(); - - connectors - .filter((x) => x.type !== "walletConnect") - .forEach((connector) => { - const key = connector.name.toLowerCase(); - - // If we already have this connector, prefer the explicit one over auto-detected - // Auto-detected connectors typically have generic IDs, explicit ones have specific types - if (!uniqueMap.has(key) || connector.type !== "injected") { - uniqueMap.set(key, connector); - } - }); - - return Array.from(uniqueMap.values()); - }, [connectors]); -} - -/** - * Hook to filter and deduplicate Solana wallets - * - * @returns {Array} Array of filtered Solana wallets - */ -export function useFilteredSolanaWallets() { - const { wallets } = useSolanaWallet(); - - return useMemo(() => { - // Deduplicate Solana wallets, prioritizing installed ones - const uniqueMap = new Map(); - - wallets.forEach((wallet) => { - const key = wallet.adapter.name.toLowerCase(); - const existing = uniqueMap.get(key); - - if (!existing) { - uniqueMap.set(key, wallet); - } else if ( - wallet.readyState === "Installed" && - existing.readyState !== "Installed" - ) { - // Replace with installed version if current one is installed and existing isn't - uniqueMap.set(key, wallet); - } - // If both are installed or both are not installed, keep the first one - }); - - const uniqueWallets = Array.from(uniqueMap.values()); - return uniqueWallets; - }, [wallets]); -} - -/** - * Hook to check if wallets are available for display - * - * @returns {object} Object with wallet availability flags and filtered wallets - */ -export function useWalletAvailability() { - const { walletConnectParams } = useWalletConnectAuthConfig(); - const uniqueConnectors = useDeduplicatedConnectors(); - const filteredSolanaWallets = useFilteredSolanaWallets(); - - return useMemo(() => { - const hasWalletConnect = walletConnectParams != null; - const hasEvmConnectors = uniqueConnectors.length > 0; - const hasSolanaWallets = filteredSolanaWallets.length > 0; - const hasAnyWallets = - hasWalletConnect || hasEvmConnectors || hasSolanaWallets; - - return { - hasWalletConnect, - hasEvmConnectors, - hasSolanaWallets, - hasAnyWallets, - uniqueConnectors, - filteredSolanaWallets, - }; - }, [walletConnectParams, uniqueConnectors, filteredSolanaWallets]); -} diff --git a/account-kit/react/src/hooks/useAccount.ts b/account-kit/react/src/hooks/useAccount.ts deleted file mode 100644 index 049e4aca17..0000000000 --- a/account-kit/react/src/hooks/useAccount.ts +++ /dev/null @@ -1,100 +0,0 @@ -"use client"; - -import { - createAccount, - getAccount, - watchAccount, - type GetAccountParams, - type SupportedAccount, - type SupportedAccounts, - type SupportedAccountTypes, -} from "@account-kit/core"; -import { useMutation } from "@tanstack/react-query"; -import { useEffect, useSyncExternalStore } from "react"; -import type { Address } from "viem"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSignerStatus } from "./useSignerStatus.js"; - -export type UseAccountMutationArgs = - BaseHookMutationArgs | SupportedAccounts, void>; - -export type UseAccountResult = { - account?: SupportedAccount; - address?: Address; - isLoadingAccount: boolean; -}; - -export type UseAccountProps = - GetAccountParams & { - skipCreate?: boolean; - } & UseAccountMutationArgs; - -/** - * [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAccount.ts) to subscribe to account state and interactions, including creation, connection, and status monitoring. It synchronizes with external store updates and provides status-dependent results. - * The supported account types are: LightAccount, MultiOwnerLightAccount, MultiOwnerModularAccount, and ModularAccountV2. Primarily used to get the smart account address before deployment. Dependent on the signer: if the signer has not been initialized and authenticated, `address` and `isLoadingAccount` return null. - * - * If using a smart contract account, returns instance of a smart contract account that the user is connected to. Returns address of smart contract account, not address of the signer. - * - * If using an EOA, returns address of signer - * - * @template {SupportedAccountTypes} TAccount The type of account to use - * @param {UseAccountProps} params The parameters required for account management, including account type, specific account parameters, and optional mutation arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAccount.ts#L28) - * @returns {UseAccountResult} An object containing the account information, address, and loading state. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAccount.ts#L22) - * - * @example - * ```ts twoslash - * import { useAccount } from "@account-kit/react"; - * - * const { account, address, isLoadingAccount } = useAccount({ - * type: "LightAccount" - * }); - * ``` - */ -export function useAccount( - params: UseAccountProps, -): UseAccountResult { - const { type, accountParams, skipCreate, ...mutationArgs } = params; - const { config, queryClient } = useAlchemyAccountContext(); - const status = useSignerStatus(); - const account = useSyncExternalStore( - watchAccount(type, config), - () => getAccount(params, config), - () => getAccount(params, config), - ); - - const { mutate, isPending } = useMutation( - { - mutationFn: async () => { - if (account.status !== "RECONNECTING" && account?.account) { - return account.account; - } - - return createAccount(params, config); - }, - mutationKey: ["createAccount", type], - ...mutationArgs, - }, - queryClient, - ); - - useEffect(() => { - if (!skipCreate && status.isConnected && !account?.account && !isPending) { - mutate(); - } - }, [account, isPending, mutate, skipCreate, status.isConnected]); - - return { - account: account.status === "READY" ? account?.account : undefined, - address: - account.status === "RECONNECTING" || account.status === "READY" - ? account.account.address - : undefined, - isLoadingAccount: - isPending || - account?.status === "INITIALIZING" || - account?.status === "RECONNECTING" || - status.isAuthenticating || - status.isInitializing, - }; -} diff --git a/account-kit/react/src/hooks/useAddOauthProvider.ts b/account-kit/react/src/hooks/useAddOauthProvider.ts deleted file mode 100644 index 49a8b99dec..0000000000 --- a/account-kit/react/src/hooks/useAddOauthProvider.ts +++ /dev/null @@ -1,106 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateFunction, - type UseMutateAsyncFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; -import type { - AuthMethods, - AuthParams, - OauthProviderInfo, -} from "@account-kit/signer"; -import { ReactLogger } from "../metrics.js"; -import { useUser } from "./useUser.js"; -import { getListAuthMethodsQueryKey } from "./useListAuthMethods.js"; - -export type UseAddOauthProviderMutationArgs = BaseHookMutationArgs< - OauthProviderInfo, - Omit, "type"> ->; - -export type UseAddOauthProviderResult = { - addOauthProvider: UseMutateFunction< - OauthProviderInfo, - Error, - Omit, "type">, - unknown - >; - addOauthProviderAsync: UseMutateAsyncFunction< - OauthProviderInfo, - Error, - Omit, "type">, - unknown - >; - isAddingOauthProvider: boolean; - error: Error | null; -}; - -/** - * A custom hook to handle adding an OAuth provider to an already authenticated account, which includes executing a mutation with optional parameters. - * - * @param {UseAddOauthProviderMutationArgs} [mutationArgs] Optional arguments for the mutation used for adding an OAuth provider. - * @returns {UseAddOauthProviderResult} An object containing the `addOauthProvider` function, `addOauthProviderAsync` for async execution, a boolean `isAddingOauthProvider` to track the mutation status, and any error encountered. - * - * @example - * ```ts twoslash - * import { useAddOauthProvider } from "@account-kit/react"; - * - * const { addOauthProvider, isAddingOauthProvider, error } = useAddOauthProvider({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useAddOauthProvider( - mutationArgs?: UseAddOauthProviderMutationArgs, -): UseAddOauthProviderResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const user = useUser(); - - const { - mutate: addOauthProvider, - mutateAsync: addOauthProviderAsync, - isPending: isAddingOauthProvider, - error, - } = useMutation( - { - mutationFn: async ( - params: Omit, "type">, - ) => { - const providerInfo = await signer!.addOauthProvider(params); - queryClient.setQueryData( - getListAuthMethodsQueryKey(user), - (authMethods?: AuthMethods): AuthMethods | undefined => - authMethods && { - ...authMethods, - oauthProviders: [...authMethods.oauthProviders, providerInfo], - }, - ); - return providerInfo; - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - addOauthProvider: ReactLogger.profiled( - "addOauthProvider", - addOauthProvider, - ), - addOauthProviderAsync: ReactLogger.profiled( - "addOauthProviderAsync", - addOauthProviderAsync, - ), - isAddingOauthProvider, - error, - }; -} diff --git a/account-kit/react/src/hooks/useAddPasskey.ts b/account-kit/react/src/hooks/useAddPasskey.ts deleted file mode 100644 index 5e23edc26b..0000000000 --- a/account-kit/react/src/hooks/useAddPasskey.ts +++ /dev/null @@ -1,90 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateFunction, - type UseMutateAsyncFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; -import { ReactLogger } from "../metrics.js"; -import { useUser } from "./useUser.js"; -import { getListAuthMethodsQueryKey } from "./useListAuthMethods.js"; - -export type UseAddPasskeyMutationArgs = BaseHookMutationArgs< - string[], - CredentialCreationOptions | undefined | void ->; - -export type UseAddPasskeyResult = { - addPasskey: UseMutateFunction< - string[], - Error, - CredentialCreationOptions | undefined | void, - unknown - >; - addPasskeyAsync: UseMutateAsyncFunction< - string[], - Error, - CredentialCreationOptions | undefined | void, - unknown - >; - isAddingPasskey: boolean; - error: Error | null; -}; - -/** - * A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts) to handle the addition of a passkey to an already authenticated account, which includes executing a mutation with optional parameters. - * - * @param {UseAddPasskeyMutationArgs} [mutationArgs] Optional arguments for the mutation used for adding a passkey. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts#L8) - * @returns {UseAddPasskeyResult} An object containing the `addPasskey` function, `addPasskeyAsync` for async execution, a boolean `isAddingPasskey` to track the mutation status, and any error encountered. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts#L13) - * - * @example - * ```ts twoslash - * import { useAddPasskey } from "@account-kit/react"; - * - * const { addPasskey, isAddingPasskey, error } = useAddPasskey({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useAddPasskey( - mutationArgs?: UseAddPasskeyMutationArgs, -): UseAddPasskeyResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const user = useUser(); - - const { - mutate: addPasskey, - mutateAsync: addPasskeyAsync, - isPending: isAddingPasskey, - error, - } = useMutation( - { - mutationFn: async ( - params: CredentialCreationOptions | undefined | void, - ) => { - const authenticatorIds = await signer!.addPasskey(params ?? undefined); - queryClient.invalidateQueries({ - queryKey: getListAuthMethodsQueryKey(user), - }); - return authenticatorIds; - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - addPasskey: ReactLogger.profiled("addPasskey", addPasskey), - addPasskeyAsync: ReactLogger.profiled("addPasskeyAsync", addPasskeyAsync), - isAddingPasskey, - error, - }; -} diff --git a/account-kit/react/src/hooks/useAlchemyAccountContext.ts b/account-kit/react/src/hooks/useAlchemyAccountContext.ts deleted file mode 100644 index e9ec2ed751..0000000000 --- a/account-kit/react/src/hooks/useAlchemyAccountContext.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { AlchemyAccountContext } from "../AlchemyAccountContext.js"; -import { NoAlchemyAccountContextError } from "../errors.js"; -import { useContext } from "react"; -import type { AlchemyAccountContextProps } from "../AlchemyAccountContext.js"; - -/** - * Internal Only hook used to access the alchemy account context. - * This hook is meant to be consumed by other hooks exported by this package. - * - * @example - * ```ts twoslash - * import { useAlchemyAccountContext } from "@account-kit/react"; - * - * const { config, queryClient } = useAlchemyAccountContext(); - * ``` - * - * @param {AlchemyAccountContextProps} override optional context override that can be used to return a custom context - * @returns {AlchemyAccountContextProps} The alchemy account context if one exists - * @throws if used outside of the AlchemyAccountProvider - */ -export const useAlchemyAccountContext = ( - override?: AlchemyAccountContextProps, -): AlchemyAccountContextProps => { - const context = useContext(AlchemyAccountContext); - if (override != null) return override; - - if (context == null) { - throw new NoAlchemyAccountContextError("useAlchemyAccountContext"); - } - - return context; -}; diff --git a/account-kit/react/src/hooks/useAuthError.ts b/account-kit/react/src/hooks/useAuthError.ts deleted file mode 100644 index 3fa032b036..0000000000 --- a/account-kit/react/src/hooks/useAuthError.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { useAuthContext } from "../components/auth/context.js"; - -export type UseAuthErrorResult = Error | undefined; - -/** - * Returns the error returned from the current auth step, if it exists - * - * @returns {UseAuthErrorResult} the current Error object - * - * @example - * ```ts twoslash - * import { useAuthError } from "@account-kit/react"; - * - * const error = useAuthError(); - * - * if (error) { - * console.error("Error occurred during auth step", error); - * } - * ``` - */ -export function useAuthError(): UseAuthErrorResult { - const { authStep } = useAuthContext(); - if ("error" in authStep) { - return authStep.error; - } - - return undefined; -} diff --git a/account-kit/react/src/hooks/useAuthModal.ts b/account-kit/react/src/hooks/useAuthModal.ts deleted file mode 100644 index 9d675b75fa..0000000000 --- a/account-kit/react/src/hooks/useAuthModal.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { useCallback } from "react"; -import { useUiConfig } from "./useUiConfig.js"; - -export type UseAuthModalResult = { - openAuthModal: () => void; - closeAuthModal: () => void; -}; - -/** - * A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthModal.ts) that returns the open and close functions for the Auth Modal if uiConfig - * is enabled on the Account Provider - * - * @returns {UseAuthModalResult} an object containing methods for opening or closing the auth modal. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthModal.ts#L4) - * - * @example - * ```tsx twoslash - * import React from 'react'; - * import { useAuthModal } from "@account-kit/react"; - * - * const ComponentWithAuthModal = () => { - * const { openAuthModal } = useAuthModal(); - * - * return ( - *
- * - *
- * ); - * }; - * ``` - */ -export const useAuthModal = () => { - const { isOpen, setModalOpen } = useUiConfig( - ({ isModalOpen, setModalOpen }) => ({ isOpen: isModalOpen, setModalOpen }), - ); - - const openAuthModal = useCallback(() => setModalOpen(true), [setModalOpen]); - const closeAuthModal = useCallback(() => { - setModalOpen(false); - }, [setModalOpen]); - - return { - isOpen, - openAuthModal, - closeAuthModal, - }; -}; diff --git a/account-kit/react/src/hooks/useAuthenticate.ts b/account-kit/react/src/hooks/useAuthenticate.ts deleted file mode 100644 index 976ac7657a..0000000000 --- a/account-kit/react/src/hooks/useAuthenticate.ts +++ /dev/null @@ -1,85 +0,0 @@ -"use client"; - -import { ClientOnlyPropertyError } from "@account-kit/core"; -import type { AuthParams, User } from "@account-kit/signer"; -import { - useMutation, - type UseMutateAsyncFunction, - type UseMutateFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; - -export type UseAuthenticateMutationArgs = BaseHookMutationArgs< - User, - AuthParams ->; - -export type UseAuthenticateResult = { - authenticate: UseMutateFunction; - authenticateAsync: UseMutateAsyncFunction; - isPending: boolean; - error: Error | null; -}; - -/** - * [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthenticate.ts) that provides functions and state for authenticating a user using a signer. It includes methods for both synchronous and asynchronous mutations. - * Useful if building your own UI components and want to control the authentication flow. - * For authenticate vs authenticateAsync, use authenticate when you want the hook the handle state changes for you, authenticateAsync when you need to wait for the result to finish processing. - * - * This can be complex for magic link or OTP flows: OPT calls authenticate twice, but this should be handled by the signer. - * - * @param {UseAuthenticateMutationArgs} [mutationArgs] Optional mutation arguments to configure the authentication mutation. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthenticate.ts#L15) - * @returns {UseAuthenticateResult} An object containing functions and state for handling user authentication, including methods for synchronously and asynchronously executing the authentication. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthenticate.ts#L20) - * - * @example - * ```ts twoslash - * import { useAuthenticate } from "@account-kit/react"; - * - * const { authenticate, authenticateAsync, isPending, error } = useAuthenticate({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useAuthenticate( - mutationArgs?: UseAuthenticateMutationArgs, -): UseAuthenticateResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - - const { - mutate: authenticate, - mutateAsync: authenticateAsync, - isPending, - error, - } = useMutation( - { - mutationFn: async (authParams: AuthParams) => { - if (!signer) { - throw new ClientOnlyPropertyError("signer"); - } - - return signer.authenticate(authParams); - }, - mutationKey: ["authenticate"], - ...mutationArgs, - }, - queryClient, - ); - - return { - authenticate: ReactLogger.profiled("authenticate", authenticate), - authenticateAsync: ReactLogger.profiled( - "authenticateAsync", - authenticateAsync, - ), - isPending, - error, - }; -} diff --git a/account-kit/react/src/hooks/useBundlerClient.ts b/account-kit/react/src/hooks/useBundlerClient.ts deleted file mode 100644 index 2e8a47c384..0000000000 --- a/account-kit/react/src/hooks/useBundlerClient.ts +++ /dev/null @@ -1,33 +0,0 @@ -"use client"; - -import { getBundlerClient, watchBundlerClient } from "@account-kit/core"; -import type { ClientWithAlchemyMethods } from "@account-kit/infra"; -import { useSyncExternalStore } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -export type UseBundlerClientResult = ClientWithAlchemyMethods; - -/** - * Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useBundlerClient.ts) to get a bundler client using the Alchemy account context. - * It uses `useSyncExternalStore` to watch for any changes in the bundler client configuration and provides the updated bundler client. React hooks don’t handle their own state management directly, so they rely on external stores, like `useSyncExternalStore`, to manage state. `useBundlerClient`’s only job is to call the bundler JSON RPC methods directly; it does not do additional processing, unlike `useSmartAccountClient`. For example, if you call `sendUserOperation`, it expects a fully formed user operation. - * It is an extension of [Viem’s Public Client](https://viem.sh/docs/clients/public) and provides access to public actions, talking to public RPC APIs like `getBlock`, `eth_call`, etc. It does not require an account as context. - * Use cases: connecting with a EOA or checking for gas eligibility. - * - * @returns {BundlerClient} The bundler client based on the current Alchemy account configuration. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/client/bundlerClient.ts#L24) - * - * @example - * ```ts twoslash - * import { useBundlerClient } from "@account-kit/react"; - * - * const bundlerClient = useBundlerClient(); - * ``` - */ -export const useBundlerClient = () => { - const { config } = useAlchemyAccountContext(); - - return useSyncExternalStore( - watchBundlerClient(config), - () => getBundlerClient(config), - () => getBundlerClient(config), - ); -}; diff --git a/account-kit/react/src/hooks/useCallsStatus.ts b/account-kit/react/src/hooks/useCallsStatus.ts deleted file mode 100644 index 60cbdc273d..0000000000 --- a/account-kit/react/src/hooks/useCallsStatus.ts +++ /dev/null @@ -1,90 +0,0 @@ -"use client"; - -import { BaseError, clientHeaderTrack } from "@aa-sdk/core"; -import type { getCallsStatus } from "@account-kit/wallet-client"; -import { - useQuery, - type UseQueryOptions, - type UseQueryResult, -} from "@tanstack/react-query"; -import type { Hex } from "viem"; -import { ClientUndefinedHookError } from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; - -export type UseCallsStatusParams = { - client: UseSmartAccountClientResult["client"] | undefined; - callId: Hex | undefined; - queryOptions?: Omit, "queryKey" | "queryFn">; -}; - -type QueryResult = Awaited>; - -export type UseCallsStatusResult = UseQueryResult; - -/** - * Hook to retrieve the status of prepared calls from the Wallet API. - * - * This hook queries the status of a specific call ID that was returned from `wallet_sendPreparedCalls`. - * The status indicates whether the batch of calls has been processed, confirmed, or failed on-chain. - * - * @example - * ```tsx twoslash - * import { useCallsStatus } from "@account-kit/react"; - * - * function MyComponent() { - * const { data: callsStatus, isLoading, error } = useCallsStatus({ - * client: smartWalletClient, - * callId: "0x1234...", // The call ID from sendPreparedCalls - * queryOptions: { - * // Refetch every 2 sec while pending. - * refetchInterval: (q) => q.state.data?.status === 100 ? 2000 : false, - * } - * }); - * } - * ``` - * - * @param {UseCallsStatusParams} params - Parameters for the hook - * @param {GetSmartWalletClientResult
| undefined} params.client - Smart wallet client instance. The hook will not fetch until this is defined. - * @param {Hex | undefined} params.callId - A call ID (hex string) returned from `sendPreparedCalls`. The hook will not fetch until this is defined. - * - * @returns {UseCallsStatusResult} Query result - */ -export function useCallsStatus( - params: UseCallsStatusParams, -): UseCallsStatusResult { - const { callId } = params; - const { queryClient } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: params.client?.account.address, - }); - - return useQuery( - { - queryKey: ["useCallsStatus", params.callId], - queryFn: ReactLogger.profiled( - "useCallsStatus", - async (): Promise => { - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useCallsStatus"); - } - if (!callId) { - throw new BaseError("Expected callId to be defined"); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUseCallsStatus", - ); - - return await _smartWalletClient.getCallsStatus(callId); - }, - ), - enabled: !!params.client && !!params.callId && !!smartWalletClient, - ...params.queryOptions, - }, - queryClient, - ); -} diff --git a/account-kit/react/src/hooks/useChain.ts b/account-kit/react/src/hooks/useChain.ts deleted file mode 100644 index 1f09a426f4..0000000000 --- a/account-kit/react/src/hooks/useChain.ts +++ /dev/null @@ -1,71 +0,0 @@ -"use client"; - -import { - getChain, - setChain as setChainInternal, - watchChain, -} from "@account-kit/core"; -import { useMutation } from "@tanstack/react-query"; -import { useSyncExternalStore } from "react"; -import type { Chain } from "viem"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -export type UseChainParams = BaseHookMutationArgs; - -export interface UseChainResult { - chain: Chain; - setChain: (params: { chain: Chain }) => void; - isSettingChain: boolean; -} - -/** - * A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useChain.ts) that returns the current chain as well as a function to set the chain. - * Note: when calling `setChain` the chain that's passed in must be defined in - * your initial `createConfig` call. Calling `setChain` causes the chain to change across the board. For example, if you use set chain then use `useSmartAccountClient`, the client will flip to the loading state and address for the account on the changed chain. - * - * For switching chains, you can also use [createBundlerClient](https://www.alchemy.com/docs/wallets/reference/aa-sdk/core/functions/createBundlerClient#createbundlerclient) or [createSmartAccoutClient](https://www.alchemy.com/docs/wallets/reference/aa-sdk/core/functions/createSmartAccountClient) directly and create a different client for each chain. You would have to manage different clients, but you wouldn't have to wait for any hooks to complete and can run these queries in parallel. This way the chain set in the config that the smart account client and other hooks inherit is not also affected. - * - * @param {UseChainParams} mutationArgs optional properties which contain mutation arg overrides. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useChain.ts#L14) - * @returns {UseChainResult} an object containing the current chain and a function to set the chain as well as loading state of setting the chain. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useChain.ts#L16) - * - * @example - * ```tsx twoslash - * import React from 'react'; - * import { useChain } from "@account-kit/react"; - * // Assuming the chain sepolia is defined in your initial createConfig call - * import { sepolia } from "@account-kit/infra"; - * - * function ComponentUsingChain() { - * const { chain, setChain, isSettingChain } = useChain(); - * - * return ( - *
- *

Current Chain: {chain.id}

- * - *
- * ); - * } - * ``` - */ -export function useChain(mutationArgs?: UseChainParams): UseChainResult { - const { config } = useAlchemyAccountContext(); - - const chain = useSyncExternalStore( - watchChain(config), - () => getChain(config), - () => getChain(config), - ); - - const { mutate: setChain, isPending } = useMutation({ - mutationFn: ({ chain }: { chain: Chain }) => - setChainInternal(config, chain), - ...mutationArgs, - }); - - return { - chain, - setChain, - isSettingChain: isPending, - }; -} diff --git a/account-kit/react/src/hooks/useClientActions.ts b/account-kit/react/src/hooks/useClientActions.ts deleted file mode 100644 index 1c0b5968a5..0000000000 --- a/account-kit/react/src/hooks/useClientActions.ts +++ /dev/null @@ -1,173 +0,0 @@ -"use client"; - -import type { SupportedAccounts } from "@account-kit/core"; -import { useMutation } from "@tanstack/react-query"; -import { useCallback } from "react"; -import type { Chain, Client, Transport } from "viem"; -import { ClientUndefinedHookError } from "../errors.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient"; - -export type UseClientActionsProps< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TActions extends { [x: string]: (...args: any[]) => unknown } = { - [x: string]: (...args: any[]) => unknown; - }, -> = { - client?: UseSmartAccountClientResult["client"]; - actions: (client: Client) => TActions; -}; - -export type UseClientActionsResult< - TActions extends { [x: string]: (...args: any[]) => unknown } = { - [x: string]: (...args: any[]) => unknown; - }, -> = { - executeAction: >( - params: ClientActionParameters, - ) => void; - executeActionAsync: >( - params: ClientActionParameters, - ) => Promise>; - data: ReturnType | undefined; - isExecutingAction: boolean; - error?: Error | null; -}; - -export type ExecutableFunctionName< - TActions extends { [x: string]: (...args: any[]) => unknown } = { - [x: string]: (...args: any[]) => unknown; - }, -> = keyof TActions extends infer functionName extends string - ? [functionName] extends [never] - ? string - : functionName - : string; - -export type ExecuteableFunctionResult< - TFunctionName extends ExecutableFunctionName, - TActions extends { [x: string]: (...args: any[]) => unknown } = { - [x: string]: (...args: any[]) => unknown; - }, -> = ReturnType; - -export type ExecutableFunctionArgs< - TActions extends { [x: string]: (...args: any[]) => unknown } = { - [x: string]: (...args: any[]) => unknown; - }, - TFunctionName extends - ExecutableFunctionName = ExecutableFunctionName, -> = Parameters; - -// All of this is based one how viem's `encodeFunctionData` works -export type ClientActionParameters< - TActions extends { [x: string]: (...args: any[]) => unknown } = { - [x: string]: (...args: any[]) => unknown; - }, - TFunctionName extends - ExecutableFunctionName = ExecutableFunctionName, - allArgs = ExecutableFunctionArgs< - TActions, - TFunctionName extends ExecutableFunctionName - ? TFunctionName - : ExecutableFunctionName - >, -> = { - functionName: TFunctionName; - args: allArgs; -}; - -/** - * A [hook](https://github.com/alchemyplatform/aa-sdk/blob/4c3956c01ce5ae3c157f006bf58fffde758e5d1b/account-kit/react/src/hooks/useClientActions.ts) that allows you to leverage client decorators to execute actions - * and await them in your UX. This is particularly useful for using Plugins - * with Modular Accounts. - * - * @param {UseClientActionsProps} args the hooks arguments highlighted below. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useClientActions.ts#L10) - * @param {SmartAccountClient} args.client the smart account client returned from useSmartAccountClient - * @param {object} args.actions the smart account client decorator you want to execute actions from - * @returns {UseClientActionsResult} an object containing methods to execute the actions as well loading and error states [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useClientActions.ts#L21) - * - * @example - * ```tsx twoslash - * import React from 'react'; - * import { useSmartAccountClient } from "@account-kit/react"; - * import { sessionKeyPluginActions } from "@account-kit/smart-contracts"; - * import { useClientActions } from "@account-kit/react"; - * - * const Foo = () => { - * const { client } = useSmartAccountClient({ type: "MultiOwnerModularAccount" }); - * const { executeAction } = useClientActions({ - * client: client, - * actions: sessionKeyPluginActions, - * }); - * - * executeAction({ - * functionName: "isAccountSessionKey", - * args: [{ key: "0x0" }], - * }); - * }; - * ``` - */ -export function useClientActions< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TActions extends { [x: string]: (...args: any[]) => any } = { - [x: string]: (...args: any[]) => any; - }, ->( - args: UseClientActionsProps, -): UseClientActionsResult { - const { client, actions } = args; - - const { - mutate, - isPending: isExecutingAction, - error, - mutateAsync, - data, - } = useMutation< - ReturnType, - Error, - ClientActionParameters> - >({ - mutationFn: async >({ - functionName, - args, - }: ClientActionParameters) => { - if (!client) { - throw new ClientUndefinedHookError("useClientActions"); - } - - const actions_ = actions(client); - return actions_[functionName](...args); - }, - }); - - const executeAction = useCallback( - >( - params: ClientActionParameters, - ) => { - const { functionName, args } = params; - return mutate({ functionName, args }); - }, - [mutate], - ); - - const executeActionAsync = useCallback( - async >( - params: ClientActionParameters, - ) => { - const { functionName, args } = params; - return mutateAsync({ functionName, args }); - }, - [mutateAsync], - ); - - return { - executeAction, - executeActionAsync, - data, - isExecutingAction, - error, - }; -} diff --git a/account-kit/react/src/hooks/useConnect.ts b/account-kit/react/src/hooks/useConnect.ts deleted file mode 100644 index 6309287a2e..0000000000 --- a/account-kit/react/src/hooks/useConnect.ts +++ /dev/null @@ -1,55 +0,0 @@ -"use client"; - -import type { Config } from "@wagmi/core"; -import { - useConnect as wagmi_useConnect, - type UseConnectParameters, - type UseConnectReturnType, -} from "wagmi"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; - -/** - * Re-exported [wagmi hook](https://wagmi.sh/react/api/hooks/useConnect) for connecting an EOA. This hook - * uses the internal wagmi config though so that the state - * is in sync with the rest of the Alchemy Account hook state. - * Useful if you wnat to connect to an EOA. - * - * @param {UseMutationParameters} params mutation parameters to use for the connect mutation - * @returns {UseConnectReturnType} the wagmi useConnect return type - * - * @example - * ```ts twoslash - * import { useConnect } from "@account-kit/react"; - * - * const { connectors, connect } = useConnect({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export const useConnect = ( - params?: UseConnectParameters["mutation"], -): UseConnectReturnType => { - const { - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - - return wagmi_useConnect({ - config: wagmiConfig, - mutation: { - ...params, - onSuccess: (...args) => { - ReactLogger.trackEvent({ - name: "eoa_connected", - }); - params?.onSuccess?.(...args); - }, - }, - }); -}; diff --git a/account-kit/react/src/hooks/useConnectedUser.ts b/account-kit/react/src/hooks/useConnectedUser.ts deleted file mode 100644 index 964119a0d7..0000000000 --- a/account-kit/react/src/hooks/useConnectedUser.ts +++ /dev/null @@ -1,95 +0,0 @@ -"use client"; - -import { getUser, watchUser } from "@account-kit/core"; -import type { User } from "@account-kit/signer"; -import { useMemo, useSyncExternalStore } from "react"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { useSolanaWallet } from "./useSolanaWallet.js"; -import { type Address } from "viem"; - -export type ConnectedUser = Omit & { - address?: Address; - orgId?: string; - userId?: string; -}; -export type UseConnectedUserResult = - | (ConnectedUser & { type: "eoa" | "sca" }) - | null; - -/** - * A React hook that returns the currently connected user across external wallets (EVM or Solana) - * or the smart account user from the client store. It prioritizes the EVM wallet connection, then - * Solana, and finally the smart account user. - * - * Useful for building UI that needs a single "connected user" concept regardless of whether a - * smart account session exists. - * - * - If an EVM wallet is connected, returns `{ address, type: "eoa", orgId?, userId? }`. - * - If a Solana wallet is connected, returns `{ solanaAddress, type: "eoa", orgId?, userId? }` and - * `address` may be undefined. `orgId` and `userId` may also be undefined. - * - Otherwise, returns the smart account user from the store with `type: "sca"`, or `null` if no - * user exists. - * - * @returns {UseConnectedUserResult} The connected user, or `null` if no user is available. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useConnectedUser.ts) - * - * @example - * ```ts twoslash - * import { useConnectedUser } from "@account-kit/react"; - * - * const user = useConnectedUser(); - * - * if (user?.type === "eoa") { - * // EVM wallets expose `address`; Solana wallets expose `solanaAddress`. - * console.log("Connected EOA:", user.address ?? user.solanaAddress); - * } - * ``` - */ -export function useConnectedUser(): UseConnectedUserResult { - const { config } = useAlchemyAccountContext(); - const { - _internal: { wagmiConfig }, - } = config; - - const account = wagmi_useAccount({ config: wagmiConfig }); - const { connected: solanaConnected, publicKey: solanaPublicKey } = - useSolanaWallet(); - const user = useSyncExternalStore( - watchUser(config), - () => getUser(config) ?? null, - () => getUser(config) ?? null, - ); - - const eoaUser = useMemo(() => { - if (account.status !== "connected" && account.status !== "reconnecting") { - return null; - } - - if (!account.address) { - return null; - } - - return { - address: account.address, - type: "eoa" as const, - }; - }, [account.address, account.status]); - - const solanaEoaUser = useMemo(() => { - if (!solanaConnected || !solanaPublicKey) { - return null; - } - - const solanaAddress = solanaPublicKey.toBase58(); - - return { - solanaAddress, - type: "eoa" as const, - }; - }, [solanaConnected, solanaPublicKey]); - - if (eoaUser) return eoaUser; - if (solanaEoaUser) return solanaEoaUser; - - return user; -} diff --git a/account-kit/react/src/hooks/useConnection.ts b/account-kit/react/src/hooks/useConnection.ts deleted file mode 100644 index 3decce4d80..0000000000 --- a/account-kit/react/src/hooks/useConnection.ts +++ /dev/null @@ -1,23 +0,0 @@ -"use client"; - -import { - getConnection, - watchConnection, - type Connection, -} from "@account-kit/core"; -import { useSyncExternalStore } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -/** - * A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useConnection.ts) that returns the current connection including chain, policy, and transport that you’re currently using. - * - * @returns {Connection} the current connection. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/types.ts#L56) - */ -export function useConnection(): Connection { - const { config } = useAlchemyAccountContext(); - return useSyncExternalStore( - watchConnection(config), - () => getConnection(config), - () => getConnection(config), - ); -} diff --git a/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts b/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts deleted file mode 100644 index 0920ab341b..0000000000 --- a/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts +++ /dev/null @@ -1,149 +0,0 @@ -"use client"; - -import type { - DropAndReplaceUserOperationParameters, - GetEntryPointFromAccount, - SendUserOperationResult, -} from "@aa-sdk/core"; -import type { SupportedAccounts } from "@account-kit/core"; -import { useMutation, type UseMutateFunction } from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ClientUndefinedHookError } from "../errors.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; - -export type UseDropAndReplaceUserOperationMutationArgs< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, -> = BaseHookMutationArgs< - SendUserOperationResult, - DropAndReplaceUserOperationParameters ->; - -export type UseDropAndReplaceUserOperationArgs< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, -> = { - client: UseSmartAccountClientResult["client"] | undefined; -} & UseDropAndReplaceUserOperationMutationArgs; - -export type UseDropAndReplaceUserOperationResult< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, -> = { - dropAndReplaceUserOperation: UseMutateFunction< - SendUserOperationResult, - Error, - DropAndReplaceUserOperationParameters, - unknown - >; - dropAndReplaceUserOperationResult: - | SendUserOperationResult - | undefined; - isDroppingAndReplacingUserOperation: boolean; - error: Error | null; -}; - -/** - * Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts) that handles the drop and replace user operation for a given client and mutation arguments. - * - * @param {UseDropAndReplaceUserOperationArgs} config The configuration parameters including the client and other mutation arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L23) - * @returns {UseDropAndReplaceUserOperationResult} The result containing the mutation function, result data, loading state, and any error. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L30) - * - * @example - * ```tsx twoslash - * import React from 'react'; - * import { - * useDropAndReplaceUserOperation, - * useSendUserOperation, - * useSmartAccountClient, - * } from "@account-kit/react"; - * - * export function ComponentWithDropAndReplaceUO() { - * const { client } = useSmartAccountClient({}); - * - * const { sendUserOperationAsync, isSendingUserOperation } = - * useSendUserOperation({ - * client, - * }); - * const { dropAndReplaceUserOperation, isDroppingAndReplacingUserOperation } = - * useDropAndReplaceUserOperation({ - * client, - * onSuccess: ({ hash, request }) => { - * // [optional] Do something with the hash and request - * }, - * onError: (error) => { - * // [optional] Do something with the error - * }, - * // [optional] ...additional mutationArgs - * }); - * - * return ( - *
- * - *
- * ); - * } - * ``` - */ -export function useDropAndReplaceUserOperation< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, ->({ - client, - ...mutationArgs -}: UseDropAndReplaceUserOperationArgs< - TEntryPointVersion, - TAccount ->): UseDropAndReplaceUserOperationResult { - const { queryClient } = useAlchemyAccountContext(); - - const { - mutate: dropAndReplaceUserOperation, - data: dropAndReplaceUserOperationResult, - isPending: isDroppingAndReplacingUserOperation, - error, - } = useMutation( - { - mutationFn: async ( - params: DropAndReplaceUserOperationParameters, - ) => { - if (!client) { - throw new ClientUndefinedHookError("useDropAndReplaceUserOperation"); - } - - return client.dropAndReplaceUserOperation(params); - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - dropAndReplaceUserOperation, - dropAndReplaceUserOperationResult, - isDroppingAndReplacingUserOperation, - error, - }; -} diff --git a/account-kit/react/src/hooks/useElementHeight.ts b/account-kit/react/src/hooks/useElementHeight.ts deleted file mode 100644 index b794d1a856..0000000000 --- a/account-kit/react/src/hooks/useElementHeight.ts +++ /dev/null @@ -1,27 +0,0 @@ -"use client"; - -import { type MutableRefObject, useLayoutEffect, useState } from "react"; -import { useResizeObserver } from "./useResizeObserver.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export function useElementHeight( - target: MutableRefObject, -) { - const [height, setHeight] = useState(); - - useLayoutEffect(() => { - if (target.current) { - setHeight(target.current.getBoundingClientRect().height); - } - }, [target]); - - useResizeObserver({ - ref: target, - box: "border-box", - onResize: (size) => { - setHeight(size.height); - }, - }); - - return { height }; -} diff --git a/account-kit/react/src/hooks/useExportAccount.ts b/account-kit/react/src/hooks/useExportAccount.ts deleted file mode 100644 index 6adf95564e..0000000000 --- a/account-kit/react/src/hooks/useExportAccount.ts +++ /dev/null @@ -1,127 +0,0 @@ -"use client"; - -import { DEFAULT_IFRAME_CONTAINER_ID } from "@account-kit/core"; -import type { - AlchemyWebSigner, - ExportWalletParams as ExportAccountParams, - ExportWalletOutput, -} from "@account-kit/signer"; -import { useMutation, type UseMutateFunction } from "@tanstack/react-query"; -import { createElement, useCallback, type CSSProperties } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; - -export type UseExportAccountMutationArgs = { - params?: ExportAccountParams; -} & BaseHookMutationArgs; - -/** - * Props for the `ExportAccountComponent` component. This component is - * returned from the `useExportAccount` hook and should be rendered in the - * parent component to display the account recovery details in an iframe. - * - * iframeCss [optional] - CSS to apply to the iframe. - * - * className [optional] - Class name to apply to the container div. - * - * isExported - Whether the account has been exported. - */ -export type ExportAccountComponentProps = { - iframeCss?: CSSProperties; - className?: string; - isExported: boolean; -}; - -export type UseExportAccountResult = { - exportAccount: UseMutateFunction; - isExported: boolean; - isExporting: boolean; - error: Error | null; - ExportAccountComponent: (props: ExportAccountComponentProps) => JSX.Element; -}; - -/** - * A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts) used to export the private key for an account. It returns the mutation functions to kick off the export process, as well as a component to render the account recovery details in an iframe. - * What is returned is dependent on what you used most recently used to authenticate. If your session was initiated with a passkey, then a private key is returned. Otherwise, a seed phrase. - * - * @param {UseExportAccountMutationArgs} args Optional arguments for the mutation and export parameters. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts#L11) - * @returns {UseExportAccountResult} An object containing the export state, possible error, and the export account function and component. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts#L32)* - * - * @example - * ```ts twoslash - * import { useExportAccount } from "@account-kit/react"; - * - * const { - * exportAccount, - * isExported, - * isExporting, - * error, - * ExportAccountComponent - * } = useExportAccount({ - * params: { - * iframeContainerId: "my-iframe-container", - * }, - * }); - * ``` - */ -export function useExportAccount( - args?: UseExportAccountMutationArgs, -): UseExportAccountResult { - const { params, ...mutationArgs } = args ?? {}; - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const { iframeContainerId } = params ?? { - iframeContainerId: DEFAULT_IFRAME_CONTAINER_ID, - }; - - const { - mutate: exportAccount, - isPending, - error, - data, - } = useMutation( - { - mutationFn: async () => - signer!.exportWallet(params ?? { iframeContainerId }), - ...mutationArgs, - }, - queryClient, - ); - - const ExportAccountComponent = useCallback( - ({ iframeCss, className, isExported }: ExportAccountComponentProps) => { - const iframeCssString = Object.entries(iframeCss ?? {}).reduce( - (acc, [key, value]) => { - const kebabKey = key - .replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2") - .toLocaleLowerCase(); - - return `${acc}\n${kebabKey}: ${value};`; - }, - "", - ); - - return createElement( - "div", - { - className, - style: { - display: !isExported ? "none" : "block", - }, - id: iframeContainerId, - }, - createElement("style", {}, `iframe { ${iframeCssString} } `), - ); - }, - [iframeContainerId], - ); - - return { - isExported: !!data, - exportAccount, - isExporting: isPending, - error, - ExportAccountComponent, - }; -} diff --git a/account-kit/react/src/hooks/useGrantPermissions.ts b/account-kit/react/src/hooks/useGrantPermissions.ts deleted file mode 100644 index 7c042a7147..0000000000 --- a/account-kit/react/src/hooks/useGrantPermissions.ts +++ /dev/null @@ -1,157 +0,0 @@ -"use client"; - -import { AccountNotFoundError, clientHeaderTrack } from "@aa-sdk/core"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import { - useMutation, - type UseMutateAsyncFunction, - type UseMutateFunction, -} from "@tanstack/react-query"; -import { type Address, type Prettify } from "viem"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { - ClientUndefinedHookError, - UnsupportedEOAActionError, -} from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; - -export type UseGrantPermissionsParams = { - client: UseSmartAccountClientResult["client"] | undefined; -}; - -type MutationParams = Prettify< - Omit< - Parameters["grantPermissions"]>[0], - "entityId" | "account" - > ->; - -type MutationResult = Awaited< - ReturnType["grantPermissions"]> ->; - -export type UseGrantPermissionsResult = { - grantPermissions: UseMutateFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - grantPermissionsAsync: UseMutateAsyncFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - grantPermissionsResult: MutationResult | undefined; - isGrantingPermissions: boolean; - error: Error | null; -}; - -/** - * React hook for granting permissions on the smart account to a given keypair - * This enables dapps to request specific permissions from smart accounts, such as spending limits or execution permissions. - * Returns an error if called with an EOA wallet connection. - * - * @example - * ```tsx twoslash - * import { useGrantPermissions, useSmartAccountClient } from "@account-kit/react"; - * - * function PermissionsComponent() { - * const { client } = useSmartAccountClient({}); - * const { - * grantPermissions, - * isGrantingPermissions, - * } = useGrantPermissions({ client }); - * - * const handleGrantPermissions = () => { - * grantPermissions({ - * permissions: [ - * { - * type: "native-token-spending-limit", - * data: { - * amount: "1000000000000000000", // 1 ETH in wei - * }, - * }, - * ], - * expiry: Math.floor(Date.now() / 1000) + 3600, // 1 hour from now - * }); - * }; - * - * return ( - * - * ); - * } - * ``` - * - * @param {UseGrantPermissionsParams} params Configuration object containing the smart account client - * @returns {UseGrantPermissionsResult} Object containing mutation functions, loading state, result, and error - */ -export function useGrantPermissions( - params: UseGrantPermissionsParams, -): UseGrantPermissionsResult { - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: params.client?.account.address, - }); - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: grantPermissions, - mutateAsync: grantPermissionsAsync, - data: grantPermissionsResult, - isPending: isGrantingPermissions, - error, - } = useMutation( - { - mutationFn: async (params: MutationParams): Promise => { - if (isConnected) { - throw new UnsupportedEOAActionError("useGrantPermissions", "mutate"); - } - - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useGrantPermissions"); - } - - if (!smartWalletClient.account) { - throw new AccountNotFoundError(); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUseGrantPermissions", - ); - - return _smartWalletClient.grantPermissions(params); - }, - }, - queryClient, - ); - - return { - grantPermissions: ReactLogger.profiled( - "grantPermissions", - grantPermissions, - ), - grantPermissionsAsync: ReactLogger.profiled( - "grantPermissionsAsync", - grantPermissionsAsync, - ), - grantPermissionsResult, - isGrantingPermissions, - error, - }; -} diff --git a/account-kit/react/src/hooks/useListAuthMethods.ts b/account-kit/react/src/hooks/useListAuthMethods.ts deleted file mode 100644 index 6f24566e56..0000000000 --- a/account-kit/react/src/hooks/useListAuthMethods.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { AuthMethods } from "@account-kit/signer"; -import { useQuery, type UseQueryResult } from "@tanstack/react-query"; -import type { UseUserResult } from "./useUser"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { useUser } from "./useUser.js"; -import { useSigner } from "./useSigner.js"; -import { useSignerStatus } from "./useSignerStatus.js"; - -/** - * A hook to list the authentication methods for a user. - * - * @returns {UseQueryResult} The authentication methods for the user. - */ -export const useListAuthMethods = (): UseQueryResult => { - const { queryClient } = useAlchemyAccountContext(); - const user = useUser(); - const signer = useSigner(); - const { isConnected: isSignerConnected } = useSignerStatus(); - - return useQuery( - { - queryKey: getListAuthMethodsQueryKey(user), - queryFn: async (): Promise => { - if (!signer || !isSignerConnected) { - throw new Error("Signer not connected"); - } - return signer.listAuthMethods(); - }, - enabled: !!user && !!signer && isSignerConnected, - }, - queryClient, - ); -}; - -export const getListAuthMethodsQueryKey = (user: UseUserResult) => [ - "list-auth-methods", - user?.orgId, -]; diff --git a/account-kit/react/src/hooks/useLogout.ts b/account-kit/react/src/hooks/useLogout.ts deleted file mode 100644 index d6a0dc10b5..0000000000 --- a/account-kit/react/src/hooks/useLogout.ts +++ /dev/null @@ -1,66 +0,0 @@ -"use client"; - -import { disconnect } from "@account-kit/core"; -import { useMutation, type UseMutateFunction } from "@tanstack/react-query"; -import { useSolanaWallet } from "./useSolanaWallet.js"; -import { useOptionalAuthContext } from "../components/auth/context.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; - -export type UseLogoutMutationArgs = BaseHookMutationArgs; - -export type UseLogoutResult = { - logout: UseMutateFunction; - isLoggingOut: boolean; - error: Error | null; -}; - -/** - * Provides a [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useLogout.ts) to log out a user, disconnecting the signer and triggering the disconnectAsync function. - * This will disconnect both EVM and Solana wallets. - * - * @param {UseLogoutMutationArgs} [mutationArgs] optional arguments to customize the mutation behavior - * @returns {UseLogoutResult} an object containing the logout function, a boolean indicating if logout is in progress, and any error encountered during logout - * - * @example - * ```ts twoslash - * import { useLogout } from "@account-kit/react"; - * - * const { logout, isLoggingOut, error } = useLogout({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useLogout( - mutationArgs?: UseLogoutMutationArgs, -): UseLogoutResult { - const { queryClient, config } = useAlchemyAccountContext(); - const authContext = useOptionalAuthContext(); - const { disconnect: disconnectSolana } = useSolanaWallet(); - - const { - mutate: logout, - isPending: isLoggingOut, - error, - } = useMutation( - { - mutationFn: async () => { - // Disconnect from both EVM and Solana wallets - await Promise.all([disconnect(config), disconnectSolana()]); - authContext?.resetAuthStep(); - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - logout, - isLoggingOut, - error, - }; -} diff --git a/account-kit/react/src/hooks/useMFA.ts b/account-kit/react/src/hooks/useMFA.ts deleted file mode 100644 index 3b85a86800..0000000000 --- a/account-kit/react/src/hooks/useMFA.ts +++ /dev/null @@ -1,124 +0,0 @@ -"use client"; - -import { useMutation, type UseMutationResult } from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { useSigner } from "./useSigner.js"; -import { useSignerStatus } from "./useSignerStatus.js"; -import type { - AddMfaParams, - AddMfaResult, - MfaFactor, - RemoveMfaParams, - VerifyMfaParams, -} from "@account-kit/signer"; - -export type UseMFAResult = { - addMFA: UseMutationResult; - verifyMFA: UseMutationResult< - { multiFactors: MfaFactor[] }, - Error, - VerifyMfaParams - >; - removeMFA: UseMutationResult< - { multiFactors: MfaFactor[] }, - Error, - RemoveMfaParams - >; - getMFAFactors: UseMutationResult<{ multiFactors: MfaFactor[] }, Error, void>; - isReady: boolean; -}; - -/** - * [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useMFA.ts) that provides functions and state for managing multi-factor authentication (MFA) operations. - * Handles adding, verifying, removing, and getting MFA factors for an authenticated account. - * - * The hook checks if the signer is connected before allowing MFA operations and provides an `isReady` flag - * to indicate whether MFA operations can be performed. - * - * @returns {UseMFAResult} An object containing functions and state for handling MFA operations - * - * @example - * ```ts twoslash - * import { useMFA } from "@account-kit/react"; - * - * const { - * addMFA, - * verifyMFA, - * removeMFA, - * getMFAFactors, - * isReady - * } = useMFA(); - * ``` - */ -export function useMFA(): UseMFAResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const { isConnected } = useSignerStatus(); - - const isReady = isConnected && !!signer; - const ensureMfaAvailable = () => { - if (!isReady) { - throw new Error("Signer not connected or initialized"); - } - }; - - const addMFA = useMutation( - { - mutationKey: ["addMFA"], - mutationFn: async (params) => { - ensureMfaAvailable(); - return signer!.addMfa(params); - }, - }, - queryClient, - ); - - const verifyMFA = useMutation< - { multiFactors: MfaFactor[] }, - Error, - VerifyMfaParams - >( - { - mutationKey: ["verifyMFA"], - mutationFn: async (params) => { - ensureMfaAvailable(); - return signer!.verifyMfa(params); - }, - }, - queryClient, - ); - - const removeMFA = useMutation< - { multiFactors: MfaFactor[] }, - Error, - RemoveMfaParams - >( - { - mutationKey: ["removeMFA"], - mutationFn: async (params) => { - ensureMfaAvailable(); - return signer!.removeMfa(params); - }, - }, - queryClient, - ); - - const getMFAFactors = useMutation<{ multiFactors: MfaFactor[] }, Error, void>( - { - mutationKey: ["getMFAFactors"], - mutationFn: async () => { - ensureMfaAvailable(); - return signer!.getMfaFactors(); - }, - }, - queryClient, - ); - - return { - addMFA, - verifyMFA, - removeMFA, - getMFAFactors, - isReady, - }; -} diff --git a/account-kit/react/src/hooks/usePrepareCalls.ts b/account-kit/react/src/hooks/usePrepareCalls.ts deleted file mode 100644 index 4a15aefccc..0000000000 --- a/account-kit/react/src/hooks/usePrepareCalls.ts +++ /dev/null @@ -1,146 +0,0 @@ -"use client"; - -import { type Address, type Prettify } from "viem"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import { - type UseMutateAsyncFunction, - type UseMutateFunction, - useMutation, -} from "@tanstack/react-query"; -import { clientHeaderTrack, AccountNotFoundError } from "@aa-sdk/core"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { - ClientUndefinedHookError, - UnsupportedEOAActionError, -} from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; - -export type UsePrepareCallsParams = { - client: UseSmartAccountClientResult["client"] | undefined; -}; - -type MutationParams = Prettify< - Parameters["prepareCalls"]>[0] ->; - -type MutationResult = Awaited< - ReturnType["prepareCalls"]> ->; - -export type UsePrepareCallsResult = { - prepareCalls: UseMutateFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - prepareCallsAsync: UseMutateAsyncFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - preparedCalls: MutationResult | undefined; - isPreparingCalls: boolean; - error: Error | null; -}; - -/** - * Hook for preparing calls to a smart account. - * - * This hook provides functionality to prepare calls for execution on a smart account. - * It handles the preparation step of the Account Abstraction flow, but does not support EOA wallets. - * - * @param {UsePrepareCallsParams} params - Configuration parameters for the hook - * @param {GetSmartWalletClientResult
} [params.client] - Smart wallet client instance - * - * @returns {UsePrepareCallsResult} An object containing: - * - `prepareCalls`: Function to prepare calls synchronously (returns void) - * - `prepareCallsAsync`: Async function to prepare calls (returns Promise) - * - `preparedCalls`: The result of the last successful call preparation - * - `isPreparingCalls`: Boolean indicating if calls are currently being prepared - * - `error`: Error from the last failed call preparation, if any - * - * @example - * ```ts twoslash - * import { usePrepareCalls } from "@account-kit/react"; - * - * const { prepareCalls, prepareCallsAsync, isPreparingCalls, error } = usePrepareCalls(); - * - * // Prepare calls - * await prepareCallsAsync({ - * calls: [{ - * to: "0x...", - * data: "0x...", - * value: "0x0" - * }] - * }); - * ``` - * - * @remarks - * - This hook only works with smart accounts and does not support EOA wallets - * - The hook handles the preparation step of the Account Abstraction flow - * - Prepared calls must be signed, then can be used with `useSendPreparedCalls` to complete the execution - */ -export function usePrepareCalls( - params: UsePrepareCallsParams, -): UsePrepareCallsResult { - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: params.client?.account.address, - }); - - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: prepareCalls, - mutateAsync: prepareCallsAsync, - data: preparedCalls, - isPending: isPreparingCalls, - error, - } = useMutation( - { - mutationFn: async (params: MutationParams): Promise => { - if (isConnected) { - throw new UnsupportedEOAActionError("usePrepareCalls", "mutate"); - } - if (!smartWalletClient) { - throw new ClientUndefinedHookError("usePrepareCalls"); - } - - if (!smartWalletClient.account) { - throw new AccountNotFoundError(); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUsePrepareCalls", - ); - - const preparedCalls = await _smartWalletClient.prepareCalls(params); - - return preparedCalls; - }, - }, - queryClient, - ); - - return { - prepareCalls: ReactLogger.profiled("prepareCalls", prepareCalls), - prepareCallsAsync: ReactLogger.profiled( - "prepareCallsAsync", - prepareCallsAsync, - ), - preparedCalls, - isPreparingCalls, - error, - }; -} diff --git a/account-kit/react/src/hooks/usePrepareSwap.ts b/account-kit/react/src/hooks/usePrepareSwap.ts deleted file mode 100644 index 86ad29c72d..0000000000 --- a/account-kit/react/src/hooks/usePrepareSwap.ts +++ /dev/null @@ -1,144 +0,0 @@ -"use client"; - -import { type Prettify } from "viem"; -import { - type UseMutateAsyncFunction, - type UseMutateFunction, - useMutation, -} from "@tanstack/react-query"; -import { clientHeaderTrack, AccountNotFoundError } from "@aa-sdk/core"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { - ClientUndefinedHookError, - UnsupportedEOAActionError, -} from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; -import { swapActions } from "@account-kit/wallet-client/experimental"; - -export type UsePrepareSwapParams = { - client: UseSmartAccountClientResult["client"] | undefined; -}; - -type MutationParams = Prettify< - Parameters["requestQuoteV0"]>[0] ->; - -type MutationResult = Awaited< - ReturnType["requestQuoteV0"]> ->; - -export type UsePrepareSwapResult = { - prepareSwap: UseMutateFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - prepareSwapAsync: UseMutateAsyncFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - quote: MutationResult | undefined; - isPreparingSwap: boolean; - error: Error | null; -}; - -/** - * Hook for requesting swap quotes from a smart account. - * - * This hook provides functionality to request swap quotes for token swaps. - * - * @param {UsePrepareSwapParams} params - Configuration parameters for the hook - * @param {UseSmartAccountClientResult["client"]} [params.client] - Smart account client instance - * - * @returns {UsePrepareSwapResult} An object containing: - * - `prepareSwap`: Function to request quote and prepare the swap synchronously - * - `prepareSwapAsync`: Async function to request quote and prepare the swap (returns Promise) - * - `quote`: The result of the last successful quote request - * - `isPreparingSwap`: Boolean indicating if a quote is currently being requested - * - `error`: Error from the last failed quote request, if any - * - * @example - * ```ts twoslash - * import { usePrepareSwap } from "@account-kit/react"; - * - * const { prepareSwapAsync, isPreparingSwap, error } = usePrepareSwap(); - * - * // Request a swap quote - * const quote = await prepareSwapAsync({ - * fromToken: "0x...", - * toToken: "0x...", - * minimumToAmount: "0x..." - * }); - * ``` - * - * @remarks - * - This hook only works with smart accounts and does not support EOA wallets - * - The hook handles the quote request step of the swap flow - * - The returned quote can be used with `useSignAndSendPreparedCalls` to complete the swap. - */ -export function usePrepareSwap( - params: UsePrepareSwapParams, -): UsePrepareSwapResult { - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: params.client?.account.address, - }); - - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: requestQuoteV0, - mutateAsync: requestQuoteV0Async, - data: quote, - isPending: isPreparingSwap, - error, - } = useMutation( - { - mutationFn: async (params: MutationParams): Promise => { - if (isConnected) { - throw new UnsupportedEOAActionError("usePrepareSwap", "mutate"); - } - if (!smartWalletClient) { - throw new ClientUndefinedHookError("usePrepareSwap"); - } - - if (!smartWalletClient.account) { - throw new AccountNotFoundError(); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUsePrepareSwap", - ); - - // Extend the client with swap actions - const swapClient = _smartWalletClient.extend(swapActions); - - return swapClient.requestQuoteV0(params); - }, - }, - queryClient, - ); - - return { - prepareSwap: ReactLogger.profiled("prepareSwap", requestQuoteV0), - prepareSwapAsync: ReactLogger.profiled( - "prepareSwapAsync", - requestQuoteV0Async, - ), - quote, - isPreparingSwap, - error, - }; -} diff --git a/account-kit/react/src/hooks/useRemoveEmail.ts b/account-kit/react/src/hooks/useRemoveEmail.ts deleted file mode 100644 index 7dc4a6c469..0000000000 --- a/account-kit/react/src/hooks/useRemoveEmail.ts +++ /dev/null @@ -1,83 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateFunction, - type UseMutateAsyncFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; -import { ReactLogger } from "../metrics.js"; -import { useUser } from "./useUser.js"; -import type { AuthMethods } from "@account-kit/signer"; -import { getListAuthMethodsQueryKey } from "./useListAuthMethods.js"; - -export type UseRemoveEmailMutationArgs = BaseHookMutationArgs; - -export type UseRemoveEmailResult = { - removeEmail: UseMutateFunction; - removeEmailAsync: UseMutateAsyncFunction; - isRemovingEmail: boolean; - error: Error | null; -}; - -/** - * A custom hook to handle the removal of an email from an already authenticated account, which includes executing a mutation with optional parameters. - * - * @param {UseRemoveEmailMutationArgs} [mutationArgs] Optional arguments for the mutation used for removing an email. - * @returns {UseRemoveEmailResult} An object containing the `removeEmail` function, `removeEmailAsync` for async execution, a boolean `isRemovingEmail` to track the mutation status, and any error encountered. - * - * @example - * ```ts twoslash - * import { useRemoveEmail } from "@account-kit/react"; - * - * const { removeEmail, isRemovingEmail, error } = useRemoveEmail({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useRemoveEmail( - mutationArgs?: UseRemoveEmailMutationArgs, -): UseRemoveEmailResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const user = useUser(); - - const { - mutate: removeEmail, - mutateAsync: removeEmailAsync, - isPending: isRemovingEmail, - error, - } = useMutation( - { - mutationFn: async () => { - await signer!.removeEmail(); - queryClient.setQueryData( - getListAuthMethodsQueryKey(user), - (authMethods?: AuthMethods): AuthMethods | undefined => - authMethods && { - ...authMethods, - email: undefined, - }, - ); - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - removeEmail: ReactLogger.profiled("removeEmail", removeEmail), - removeEmailAsync: ReactLogger.profiled( - "removeEmailAsync", - removeEmailAsync, - ), - isRemovingEmail, - error, - }; -} diff --git a/account-kit/react/src/hooks/useRemoveOauthProvider.ts b/account-kit/react/src/hooks/useRemoveOauthProvider.ts deleted file mode 100644 index dd60bac128..0000000000 --- a/account-kit/react/src/hooks/useRemoveOauthProvider.ts +++ /dev/null @@ -1,96 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateFunction, - type UseMutateAsyncFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; -import { ReactLogger } from "../metrics.js"; -import { useUser } from "./useUser.js"; -import type { AuthMethods } from "@account-kit/signer"; -import { getListAuthMethodsQueryKey } from "./useListAuthMethods.js"; - -export type UseRemoveOauthProviderMutationArgs = BaseHookMutationArgs< - void, - string ->; - -export type UseRemoveOauthProviderResult = { - removeOauthProvider: UseMutateFunction; - removeOauthProviderAsync: UseMutateAsyncFunction< - void, - Error, - string, - unknown - >; - isRemovingOauthProvider: boolean; - error: Error | null; -}; - -/** - * A custom hook to handle removing an OAuth provider from an already authenticated account, which includes executing a mutation with optional parameters. - * - * @param {UseRemoveOauthProviderMutationArgs} [mutationArgs] Optional arguments for the mutation used for removing an OAuth provider. - * @returns {UseRemoveOauthProviderResult} An object containing the `removeOauthProvider` function, `removeOauthProviderAsync` for async execution, a boolean `isRemovingOauthProvider` to track the mutation status, and any error encountered. - * - * @example - * ```ts twoslash - * import { useRemoveOauthProvider } from "@account-kit/react"; - * - * const { removeOauthProvider, isRemovingOauthProvider, error } = useRemoveOauthProvider({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useRemoveOauthProvider( - mutationArgs?: UseRemoveOauthProviderMutationArgs, -): UseRemoveOauthProviderResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const user = useUser(); - - const { - mutate: removeOauthProvider, - mutateAsync: removeOauthProviderAsync, - isPending: isRemovingOauthProvider, - error, - } = useMutation( - { - mutationFn: async (providerId: string) => { - await signer!.removeOauthProvider(providerId); - queryClient.setQueryData( - getListAuthMethodsQueryKey(user), - (authMethods?: AuthMethods): AuthMethods | undefined => - authMethods && { - ...authMethods, - oauthProviders: authMethods.oauthProviders.filter( - (provider) => provider.providerId !== providerId, - ), - }, - ); - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - removeOauthProvider: ReactLogger.profiled( - "removeOauthProvider", - removeOauthProvider, - ), - removeOauthProviderAsync: ReactLogger.profiled( - "removeOauthProviderAsync", - removeOauthProviderAsync, - ), - isRemovingOauthProvider, - error, - }; -} diff --git a/account-kit/react/src/hooks/useRemovePasskey.ts b/account-kit/react/src/hooks/useRemovePasskey.ts deleted file mode 100644 index ff2bace360..0000000000 --- a/account-kit/react/src/hooks/useRemovePasskey.ts +++ /dev/null @@ -1,76 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateFunction, - type UseMutateAsyncFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; -import { ReactLogger } from "../metrics.js"; -import { useUser } from "./useUser.js"; -import { getListAuthMethodsQueryKey } from "./useListAuthMethods.js"; -export type UseRemovePasskeyMutationArgs = BaseHookMutationArgs; - -export type UseRemovePasskeyResult = { - removePasskey: UseMutateFunction; - removePasskeyAsync: UseMutateAsyncFunction; - isRemovingPasskey: boolean; - error: Error | null; -}; - -/** - * A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts) to handle the addition of a passkey to an already authenticated account, which includes executing a mutation with optional parameters. - * - * @param {UseRemovePasskeyMutationArgs} [mutationArgs] Optional arguments for the mutation used for removing a passkey. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemovePasskey.ts#L8) - * @returns {UseRemovePasskeyResult} An object containing the `removePasskey` function, `removePasskeyAsync` for async execution, a boolean `isRemovingPasskey` to track the mutation status, and any error encountered. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemovePasskey.ts#L13) - * - * @example - * ```ts twoslash - * import { useRemovePasskey } from "@account-kit/react"; - * - * const { removePasskey, isRemovingPasskey, error } = useRemovePasskey({ - * // these are optional - * onSuccess: () => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useRemovePasskey( - mutationArgs?: UseRemovePasskeyMutationArgs, -): UseRemovePasskeyResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const user = useUser(); - - const { - mutate: removePasskey, - mutateAsync: removePasskeyAsync, - isPending: isRemovingPasskey, - error, - } = useMutation( - { - mutationFn: async (params: string) => { - await signer!.removePasskey(params); - queryClient.invalidateQueries({ - queryKey: getListAuthMethodsQueryKey(user), - }); - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - removePasskey: ReactLogger.profiled("removePasskey", removePasskey), - removePasskeyAsync: ReactLogger.profiled( - "removePasskeyAsync", - removePasskeyAsync, - ), - isRemovingPasskey, - error, - }; -} diff --git a/account-kit/react/src/hooks/useResizeObserver.ts b/account-kit/react/src/hooks/useResizeObserver.ts deleted file mode 100644 index b25ab2ed55..0000000000 --- a/account-kit/react/src/hooks/useResizeObserver.ts +++ /dev/null @@ -1,106 +0,0 @@ -"use client"; - -import type { RefObject } from "react"; -import { useEffect, useRef, useState } from "react"; - -type Size = { - width: number | undefined; - height: number | undefined; -}; - -type UseResizeObserverOptions = { - ref: RefObject; - onResize?: (size: Size) => void; - box?: "border-box" | "content-box" | "device-pixel-content-box"; -}; - -const initialSize: Size = { - width: undefined, - height: undefined, -}; - -// See: https://usehooks-ts.com/react-hook/use-resize-observer -// eslint-disable-next-line jsdoc/require-jsdoc -export function useResizeObserver( - options: UseResizeObserverOptions, -): Size { - const { ref, box = "content-box" } = options; - const [{ width, height }, setSize] = useState(initialSize); - const previousSize = useRef({ ...initialSize }); - const onResize = useRef<((size: Size) => void) | undefined>(undefined); - onResize.current = options.onResize; - - const [isMounted, setIsMounted] = useState(false); - - useEffect(() => { - setIsMounted(true); - return () => setIsMounted(false); - }, []); - - useEffect(() => { - if (!ref.current) return; - - if (typeof window === "undefined" || !("ResizeObserver" in window)) return; - - const observer = new ResizeObserver(([entry]) => { - const boxProp = - box === "border-box" - ? "borderBoxSize" - : box === "device-pixel-content-box" - ? "devicePixelContentBoxSize" - : "contentBoxSize"; - - const newWidth = extractSize(entry, boxProp, "inlineSize"); - const newHeight = extractSize(entry, boxProp, "blockSize"); - - const hasChanged = - previousSize.current.width !== newWidth || - previousSize.current.height !== newHeight; - - if (hasChanged) { - const newSize: Size = { width: newWidth, height: newHeight }; - previousSize.current.width = newWidth; - previousSize.current.height = newHeight; - - if (onResize.current) { - onResize.current(newSize); - } else { - if (isMounted) { - setSize(newSize); - } - } - } - }); - - observer.observe(ref.current, { box }); - - return () => { - observer.disconnect(); - }; - }, [box, ref, isMounted]); - - return { width, height }; -} - -type BoxSizesKey = keyof Pick< - ResizeObserverEntry, - "borderBoxSize" | "contentBoxSize" | "devicePixelContentBoxSize" ->; - -function extractSize( - entry: ResizeObserverEntry, - box: BoxSizesKey, - sizeType: keyof ResizeObserverSize, -): number | undefined { - if (!entry[box]) { - if (box === "contentBoxSize") { - return entry.contentRect[sizeType === "inlineSize" ? "width" : "height"]; - } - return undefined; - } - - return Array.isArray(entry[box]) - ? entry[box][0][sizeType] - : // @ts-ignore Support Firefox's non-standard behavior - (entry[box][sizeType] as number); -} diff --git a/account-kit/react/src/hooks/useSendCalls.ts b/account-kit/react/src/hooks/useSendCalls.ts deleted file mode 100644 index f4deda9192..0000000000 --- a/account-kit/react/src/hooks/useSendCalls.ts +++ /dev/null @@ -1,232 +0,0 @@ -"use client"; - -import { - clientHeaderTrack, - type EntryPointVersion, - type UserOperationRequest, - AccountNotFoundError, -} from "@aa-sdk/core"; -import type { - SignSignatureRequestResult, - SmartWalletClient, -} from "@account-kit/wallet-client"; -import { - useMutation, - type UseMutateAsyncFunction, - type UseMutateFunction, -} from "@tanstack/react-query"; -import { sendTransaction as wagmi_sendTransaction } from "@wagmi/core"; -import { fromHex, type Address, type Hex, type Prettify } from "viem"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { - ClientUndefinedHookError, - UnsupportedEOAActionError, -} from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; - -export type UseSendCallsParams = { - client: UseSmartAccountClientResult["client"] | undefined; -}; - -type MutationParams = Prettify< - Parameters["prepareCalls"]>[0] ->; - -type MutationResult< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = { - ids: Hex[]; - // TODO: deprecate this - request?: UserOperationRequest; -}; - -export type UseSendCallsResult< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = { - sendCalls: UseMutateFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - sendCallsAsync: UseMutateAsyncFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - sendCallsResult: MutationResult | undefined; - isSendingCalls: boolean; - error: Error | null; -}; - -/** - * Hook for sending calls to a smart account or EOA wallet. - * - * This hook provides functionality to execute calls on a smart account using Account Abstraction, - * or fall back to regular EOA transactions when connected to an EOA wallet. It handles the complete - * flow of preparing, signing, and sending calls. - * - * - * If using this hook with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden - * from the user. It is recommended to use the `usePrepareCalls` hook instead to manually handle the permit signature. - * - * - * @template TEntryPointVersion - The entry point version to use for user operations (defaults to EntryPointVersion) - * - * @param {UseSendCallsParams} params - Configuration parameters for the hook - * @param {GetSmartWalletClientResult
} [params.client] - Optional smart wallet client instance (Required if an EOA is not connected) - * - * @returns {UseSendCallsResult} An object containing: - * - `sendCalls`: Function to send calls synchronously (returns void) - * - `sendCallsAsync`: Async function to send calls (returns Promise) - * - `sendCallsResult`: The result of the last successful call execution - * - `isSendingCalls`: Boolean indicating if calls are currently being sent - * - `error`: Error from the last failed call execution, if any - * - * @example - * ```ts twoslash - * import { useSendCalls } from "@account-kit/react"; - * - * const { sendCalls, sendCallsAsync, isSendingCalls, error } = useSendCalls(); - * - * // Send a single call - * await sendCallsAsync({ - * calls: [{ - * to: "0x...", - * data: "0x...", - * value: "0x0" - * }] - * }); - * - * // Send multiple calls (smart account only) - * await sendCallsAsync({ - * calls: [ - * { to: "0x...", data: "0x..." }, - * { to: "0x...", data: "0x..." } - * ] - * }); - * ``` - * - * @remarks - * - When connected to an EOA wallet, only single calls are supported (batch execution is not allowed) - * - For smart accounts, the returned `ids` are the prepared call IDs - * - For EOA wallets, the returned `ids` are transaction hashes - */ -// TODO: remove the entrypoint version generic when we don't need it anymore -export function useSendCalls< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, ->(params: UseSendCallsParams): UseSendCallsResult { - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: params.client?.account.address, - }); - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: sendCalls, - mutateAsync: sendCallsAsync, - data: sendCallsResult, - isPending: isSendingCalls, - error, - } = useMutation( - { - mutationFn: async ( - params: Parameters["prepareCalls"]>[0], - ): Promise> => { - if (isConnected) { - console.warn( - "useSendCalls: connected to an EOA, sending as a transaction instead", - ); - if (params.calls.length !== 1) { - throw new UnsupportedEOAActionError( - "useSendCalls", - "batch execute", - ); - } - - const [call] = params.calls; - - const tx = await wagmi_sendTransaction(wagmiConfig, { - to: call.to, - data: call.data, - value: call.value ? fromHex(call.value, "bigint") : undefined, - }); - - return { - ids: [tx], - }; - } - - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useSendCalls"); - } - - if (!smartWalletClient.account) { - throw new AccountNotFoundError(); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUseSendCalls", - ); - - let preparedCalls = await _smartWalletClient.prepareCalls(params); - - if (preparedCalls.type === "paymaster-permit") { - const signature = (await _smartWalletClient.signSignatureRequest( - preparedCalls.signatureRequest, - // It is not possible to attach a webauthn signer to account-kit/core, so this assertion is safe to make - )) as Exclude; - - const params = { - calls: preparedCalls.modifiedRequest.calls, - capabilities: preparedCalls.modifiedRequest.capabilities, - paymasterPermitSignature: signature, - }; - - preparedCalls = await _smartWalletClient.prepareCalls(params); - } - - const signedCalls = - await _smartWalletClient.signPreparedCalls(preparedCalls); - - const { id } = await _smartWalletClient.sendPreparedCalls(signedCalls); - - const uoCall = - signedCalls.type === "array" - ? signedCalls.data.find( - (it) => - it.type === "user-operation-v060" || - it.type === "user-operation-v070", - )! - : signedCalls; - - return { - ids: [id], - request: { - ...uoCall.data, - signature: uoCall.signature.data, - } as UserOperationRequest, - }; - }, - }, - queryClient, - ); - - return { - sendCalls: ReactLogger.profiled("sendCalls", sendCalls), - sendCallsAsync: ReactLogger.profiled("sendCallsAsync", sendCallsAsync), - sendCallsResult, - isSendingCalls, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSendPreparedCalls.ts b/account-kit/react/src/hooks/useSendPreparedCalls.ts deleted file mode 100644 index 480f18b051..0000000000 --- a/account-kit/react/src/hooks/useSendPreparedCalls.ts +++ /dev/null @@ -1,147 +0,0 @@ -"use client"; - -import { type Address, type Prettify } from "viem"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import { - type UseMutateAsyncFunction, - type UseMutateFunction, - useMutation, -} from "@tanstack/react-query"; -import { clientHeaderTrack, AccountNotFoundError } from "@aa-sdk/core"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { - ClientUndefinedHookError, - UnsupportedEOAActionError, -} from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { UseSmartAccountClientResult } from "../hooks/useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; - -export type UseSendPreparedCallsParams = { - client: UseSmartAccountClientResult["client"] | undefined; -}; - -type MutationParams = Prettify< - Parameters["sendPreparedCalls"]>[0] ->; - -type MutationResult = Awaited< - ReturnType["sendPreparedCalls"]> ->; - -export type UseSendPreparedCallsResult = { - sendPreparedCalls: UseMutateFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - sendPreparedCallsAsync: UseMutateAsyncFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - sendPreparedCallsResult: MutationResult | undefined; - isSendingPreparedCalls: boolean; - error: Error | null; -}; - -/** - * Hook for sending prepared calls to a smart account. - * - * This hook provides functionality to send previously prepared calls to a smart account. - * It handles the signing and sending of prepared calls, but does not support EOA wallets. - * - * @param {UseSendPreparedCallsParams} params - Configuration parameters for the hook - * @param {GetSmartWalletClientResult
} [params.client] - Smart wallet client instance - * - * @returns {UseSendPreparedCallsResult} An object containing: - * - `sendPreparedCalls`: Function to send prepared calls synchronously (returns void) - * - `sendPreparedCallsAsync`: Async function to send prepared calls (returns Promise) - * - `sendPreparedCallsResult`: The result of the last successful prepared call execution - * - `isSendingPreparedCalls`: Boolean indicating if prepared calls are currently being sent - * - `error`: Error from the last failed prepared call execution, if any - * - * @example - * ```ts twoslash - * import { useSendPreparedCalls } from "@account-kit/react"; - * - * const { sendPreparedCalls, sendPreparedCallsAsync, isSendingPreparedCalls, error } = useSendPreparedCalls(); - * - * // Send prepared calls - * await sendPreparedCallsAsync({ - * preparedCalls: [ - * // prepared call objects - * ] - * }); - * ``` - * - * @remarks - * - This hook only works with smart accounts and does not support EOA wallets - * - The hook handles the signing and sending of prepared calls - * - The returned result contains the prepared call IDs - */ -export function useSendPreparedCalls( - params: UseSendPreparedCallsParams, -): UseSendPreparedCallsResult { - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: params.client?.account.address, - }); - - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: sendPreparedCalls, - mutateAsync: sendPreparedCallsAsync, - data: sendPreparedCallsResult, - isPending: isSendingPreparedCalls, - error, - } = useMutation( - { - mutationFn: async (params: MutationParams): Promise => { - if (isConnected) { - throw new UnsupportedEOAActionError("useSendPreparedCalls", "mutate"); - } - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useSendPreparedCalls"); - } - - if (!smartWalletClient.account) { - throw new AccountNotFoundError(); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUseSendPreparedCalls", - ); - - const result = await _smartWalletClient.sendPreparedCalls(params); - - return result; - }, - }, - queryClient, - ); - - return { - sendPreparedCalls: ReactLogger.profiled( - "sendPreparedCalls", - sendPreparedCalls, - ), - sendPreparedCallsAsync: ReactLogger.profiled( - "sendPreparedCallsAsync", - sendPreparedCallsAsync, - ), - sendPreparedCallsResult, - isSendingPreparedCalls, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSendUserOperation.ts b/account-kit/react/src/hooks/useSendUserOperation.ts deleted file mode 100644 index 8fda7797a0..0000000000 --- a/account-kit/react/src/hooks/useSendUserOperation.ts +++ /dev/null @@ -1,265 +0,0 @@ -"use client"; - -import type { - EntryPointVersion, - GetEntryPointFromAccount, - SendUserOperationParameters, - SendUserOperationResult, -} from "@aa-sdk/core"; -import { - SmartAccountClientOptsSchema, - WaitForUserOperationError, -} from "@aa-sdk/core"; -import type { SupportedAccounts } from "@account-kit/core"; -import { - useMutation, - type UseMutateAsyncFunction, - type UseMutateFunction, -} from "@tanstack/react-query"; -import { BaseError, toHex, type Hex } from "viem"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { ClientUndefinedHookError } from "../errors.js"; -import { useSendCalls } from "./useSendCalls.js"; -import { ReactLogger } from "../metrics.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { type UseSmartAccountClientResult } from "./useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; - -export type SendUserOperationWithEOA< - TEntryPointVersion extends EntryPointVersion, -> = - | SendUserOperationResult - | { - hash: Hex; - request?: never; - }; - -export type UseSendUserOperationMutationArgs< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, -> = BaseHookMutationArgs< - SendUserOperationWithEOA, - SendUserOperationParameters ->; - -export type UseSendUserOperationArgs< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, -> = { - client: UseSmartAccountClientResult["client"] | undefined; - waitForTxn?: boolean; - waitForTxnTag?: "pending" | "latest"; -} & UseSendUserOperationMutationArgs; - -export type UseSendUserOperationResult< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, -> = { - sendUserOperation: UseMutateFunction< - SendUserOperationWithEOA, - Error, - SendUserOperationParameters, - unknown - >; - sendUserOperationAsync: UseMutateAsyncFunction< - SendUserOperationWithEOA, - Error, - SendUserOperationParameters, - unknown - >; - sendUserOperationResult: - | SendUserOperationWithEOA - | undefined; - isSendingUserOperation: boolean; - error: Error | null; -}; - -/** - * A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSendUserOperation.ts) that returns functions for sending user operations. - * You can also optionally wait for a user operation to be mined and get the transaction hash before returning using `waitForTx`. - * Like any method that takes a smart account client, throws an error if client undefined or is signer not authenticated. - * - * @param {UseSendUserOperationArgs} params the parameters for the hook including the client, a flag to wait for tx mining, and mutation args. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSendUserOperation.ts#L45) - * @returns {UseSendUserOperationResult} functions and state for sending UOs. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSendUserOperation.ts#L53) - * - * @example - * ```tsx twoslash - * import React from 'react'; - * import { - * useSendUserOperation, - * useSmartAccountClient, - * } from "@account-kit/react"; - * - * function ComponentWithSendUserOperation() { - * const { client } = useSmartAccountClient({}); - * - * const { sendUserOperation, isSendingUserOperation } = useSendUserOperation({ - * client, - * // optional parameter that will wait for the transaction to be mined before returning - * waitForTxn: true, - * onSuccess: ({ hash, request }) => { - * // [optional] Do something with the hash and request - * }, - * onError: (error) => { - * // [optional] Do something with the error - * }, - * // [optional] ...additional mutationArgs - * }); - * - * return ( - *
- * - *
- * ); - * } - * ``` - */ -export function useSendUserOperation< - TEntryPointVersion extends GetEntryPointFromAccount, - TAccount extends SupportedAccounts = SupportedAccounts, ->( - params: UseSendUserOperationArgs, -): UseSendUserOperationResult { - const { - client: _client, - waitForTxn = false, - waitForTxnTag = "latest", - ...mutationArgs - } = params; - - const { sendCallsAsync } = useSendCalls({ - client: _client, - }); - - const smartWalletClient = useSmartWalletClient({ - account: _client?.account.address, - }); - - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: sendUserOperation, - mutateAsync: sendUserOperationAsync, - data: sendUserOperationResult, - isPending: isSendingUserOperation, - error, - } = useMutation( - { - mutationFn: async (params: SendUserOperationParameters) => { - if (typeof params.uo === "string") { - throw new Error("Hex calls are not supported"); - } - - const { ids, request } = await sendCallsAsync({ - calls: (Array.isArray(params.uo) ? params.uo : [params.uo]).map( - (x) => ({ - to: x.target, - data: x.data, - value: x.value ? toHex(x.value) : undefined, - }), - ), - }); - - if (isConnected) { - // Send as a normal transaction if connected to an EOA. - return { - hash: ids[0], - }; - } - - if (!request) { - // This should never be true. We should always have a `request` unless the txn was sent via an EOA. - throw new BaseError( - "Expected request from sendCallsAsync to be defined", - ); - } - - if (!_client || !smartWalletClient) { - throw new ClientUndefinedHookError("useSendUserOperation"); - } - - const hash: Hex = _client.account - .getEntryPoint() - .getUserOperationHash(request); - - if (!waitForTxn) { - return { - hash, - request, - }; - } - - const retryParams = SmartAccountClientOptsSchema.strip().parse(_client); - - const callResult = await smartWalletClient - .waitForCallsStatus({ - id: ids[0], - // Retry options are for bad responses, not pending. - retryCount: retryParams.txMaxRetries, - retryDelay: ({ count }) => - retryParams.txRetryIntervalMs * - retryParams.txRetryMultiplier ** (count - 1), - // Polling interval & timeout are for pending responses. - pollingInterval: retryParams.txRetryIntervalMs, - // This action doesn't support exponential polling intervals, - // so it's probably safest to just poll for the expected - // total duration for backwards compatibility. - timeout: - retryParams.txRetryIntervalMs * - (retryParams.txRetryMultiplier === 1 - ? retryParams.txMaxRetries - : (retryParams.txRetryMultiplier ** retryParams.txMaxRetries - - 1) / - (retryParams.txRetryMultiplier - 1)), - status: ({ statusCode }) => - statusCode === 200 || - (waitForTxnTag === "pending" && statusCode === 110), - }) - .catch((e) => { - throw new WaitForUserOperationError(request, e); - }); - - return { - hash: callResult.receipts![0].transactionHash!, - request, - }; - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - sendUserOperation: ReactLogger.profiled( - "sendUserOperation", - sendUserOperation, - ), - sendUserOperationAsync: ReactLogger.profiled( - "sendUserOperationAsync", - sendUserOperationAsync, - ), - sendUserOperationResult, - isSendingUserOperation, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSendVerificationCode.ts b/account-kit/react/src/hooks/useSendVerificationCode.ts deleted file mode 100644 index c0f3dd49a0..0000000000 --- a/account-kit/react/src/hooks/useSendVerificationCode.ts +++ /dev/null @@ -1,107 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateFunction, - type UseMutateAsyncFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; -import { ReactLogger } from "../metrics.js"; - -export interface SendVerificationCodeParams { - type: "email" | "sms"; - contact: string; -} - -export type UseSendVerificationCodeResult = { - sendVerificationCode: UseMutateFunction< - void, - Error, - SendVerificationCodeParams, - unknown - >; - sendVerificationCodeAsync: UseMutateAsyncFunction< - void, - Error, - SendVerificationCodeParams, - unknown - >; - isSendingCode: boolean; - error: Error | null; -}; - -export type UseSendVerificationCodeMutationArgs = BaseHookMutationArgs< - void, - SendVerificationCodeParams ->; - -/** - * A custom hook to send OTP verification codes to email or SMS for account verification. - * - * @param {UseSendVerificationCodeMutationArgs} [mutationArgs] Optional arguments for the mutation - * @returns {UseSendVerificationCodeResult} An object containing functions and state for sending verification codes - * - * @example - * ```ts twoslash - * import { useSendVerificationCode } from "@account-kit/react"; - * - * const { - * sendVerificationCode, - * isSendingCode, - * error - * } = useSendVerificationCode({ - * onSuccess: (data) => { - * console.log("OTP sent"); - * }, - * onError: (error) => console.error(error), - * }); - * - * // Send verification code to email - * sendVerificationCode({ - * type: "email", - * contact: "user@example.com" - * }); - * - * // Send verification code to SMS - * sendVerificationCodeAsync({ - * type: "sms", - * contact: "+1234567890" - * }); - * ``` - */ -export function useSendVerificationCode( - mutationArgs?: UseSendVerificationCodeMutationArgs, -): UseSendVerificationCodeResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - - const { - mutate: sendVerificationCode, - mutateAsync: sendVerificationCodeAsync, - isPending: isSendingCode, - error, - } = useMutation( - { - mutationFn: async (params: SendVerificationCodeParams) => { - await signer!.sendVerificationCode(params.type, params.contact); - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - sendVerificationCode: ReactLogger.profiled( - "sendVerificationCode", - sendVerificationCode, - ), - sendVerificationCodeAsync: ReactLogger.profiled( - "sendVerificationCodeAsync", - sendVerificationCodeAsync, - ), - isSendingCode, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSetEmail.ts b/account-kit/react/src/hooks/useSetEmail.ts deleted file mode 100644 index cec21d827d..0000000000 --- a/account-kit/react/src/hooks/useSetEmail.ts +++ /dev/null @@ -1,128 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateFunction, - type UseMutateAsyncFunction, -} from "@tanstack/react-query"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSigner } from "./useSigner.js"; -import { ReactLogger } from "../metrics.js"; -import { useUser } from "./useUser.js"; -import type { AuthMethods } from "@account-kit/signer"; -import { getListAuthMethodsQueryKey } from "./useListAuthMethods.js"; - -export type SetEmailParams = - | string // deprecated - | { - verificationCode: string; - }; - -export type UseSetEmailMutationArgs = BaseHookMutationArgs< - void, - SetEmailParams ->; - -export type UseSetEmailResult = { - setEmail: UseMutateFunction; - setEmailAsync: UseMutateAsyncFunction; - isSettingEmail: boolean; - error: Error | null; -}; - -/** - * A custom hook to set an email address for an already authenticated account. - * - * **Note:** You should first use the `useSendVerificationCode` hook to send - * a verification code to the email address before calling this hook. - * - * @param {UseSetEmailMutationArgs} [mutationArgs] Optional arguments for the setEmail mutation - * @returns {UseSetEmailResult} An object containing functions and state for setting the email - * - * @example - * ```ts twoslash - * import { useSetEmail, useSendVerificationCode } from "@account-kit/react"; - * - * // First, send verification code - * const { sendVerificationCode } = useSendVerificationCode(); - * - * const { - * setEmail, - * isSettingEmail, - * error - * } = useSetEmail({ - * onSuccess: () => { - * // do something when email is successfully set - * }, - * onError: (error) => console.error(error), - * }); - * - * // Step 1: Send verification code to email - * await sendVerificationCode({ - * type: "email", - * contact: "user@example.com" - * }); - * - * // Step 2: Update email using verification code - * setEmail({ - * verificationCode: "123456" // code user received - * }); - * - * // DEPRECATED: Use with just email string (for backward compatibility) - * setEmail("user@example.com"); - * ``` - */ -export function useSetEmail( - mutationArgs?: UseSetEmailMutationArgs, -): UseSetEmailResult { - const { queryClient } = useAlchemyAccountContext(); - const signer = useSigner(); - const user = useUser(); - - const { - mutate: setEmail, - mutateAsync: setEmailAsync, - isPending: isSettingEmail, - error, - } = useMutation( - { - mutationFn: async (input: SetEmailParams) => { - if (typeof input === "string") { - // Backward compatibility: just email string - await signer!.setEmail(input); - queryClient.setQueryData( - getListAuthMethodsQueryKey(user), - (authMethods?: AuthMethods): AuthMethods | undefined => - authMethods && { - ...authMethods, - email: input, - }, - ); - } else { - // New OTP-based approach - const email = await signer!.setEmail({ - verificationCode: input.verificationCode, - }); - queryClient.setQueryData( - getListAuthMethodsQueryKey(user), - (authMethods?: AuthMethods): AuthMethods | undefined => - authMethods && { - ...authMethods, - email, - }, - ); - } - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - setEmail: ReactLogger.profiled("setEmail", setEmail), - setEmailAsync: ReactLogger.profiled("setEmailAsync", setEmailAsync), - isSettingEmail, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts b/account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts deleted file mode 100644 index b468d9e36a..0000000000 --- a/account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts +++ /dev/null @@ -1,152 +0,0 @@ -"use client"; - -import { type Address, type Prettify } from "viem"; -import type { SmartWalletClient } from "@account-kit/wallet-client"; -import { - type UseMutateAsyncFunction, - type UseMutateFunction, - useMutation, -} from "@tanstack/react-query"; -import { clientHeaderTrack, AccountNotFoundError } from "@aa-sdk/core"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { - ClientUndefinedHookError, - UnsupportedEOAActionError, -} from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { UseSmartAccountClientResult } from "../hooks/useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; - -export type UseSignAndSendPreparedCallsParams = { - client: UseSmartAccountClientResult["client"] | undefined; -}; - -type MutationParams = Prettify< - Parameters["signPreparedCalls"]>[0] ->; - -type MutationResult = Awaited< - ReturnType["sendPreparedCalls"]> ->; - -export type UseSignAndSendPreparedCallsResult = { - signAndSendPreparedCalls: UseMutateFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - signAndSendPreparedCallsAsync: UseMutateAsyncFunction< - MutationResult, - Error, - MutationParams, - unknown - >; - signAndSendPreparedCallsResult: MutationResult | undefined; - isSigningAndSendingPreparedCalls: boolean; - error: Error | null; -}; - -/** - * Hook for signing and sending prepared calls from a smart account. - * - * This hook provides functionality to sign and send previously prepared calls to a smart account. - * It handles both the signing and sending of prepared calls in a single operation, and does not support EOA wallets. - * - * @param {UseSignAndSendPreparedCallsParams} params - Configuration parameters for the hook - * @param {UseSmartAccountClientResult["client"]} [params.client] - Smart account client instance - * - * @returns {UseSignAndSendPreparedCallsResult} An object containing: - * - `signAndSendPreparedCalls`: Function to sign and send prepared calls synchronously (returns void) - * - `signAndSendPreparedCallsAsync`: Async function to sign and send prepared calls (returns Promise) - * - `signAndSendPreparedCallsResult`: The result of the last successful prepared call execution - * - `isSigningAndSendingPreparedCalls`: Boolean indicating if prepared calls are currently being signed and sent - * - `error`: Error from the last failed prepared call execution, if any - * - * @example - * ```ts twoslash - * import { useSignAndSendPreparedCalls } from "@account-kit/react"; - * - * const { signAndSendPreparedCalls, signAndSendPreparedCallsAsync, isSigningAndSendingPreparedCalls, error } = useSignAndSendPreparedCalls(); - * - * // Sign and send prepared calls - * await signAndSendPreparedCallsAsync({ - * preparedCalls: [ - * // unsigned prepared call objects - * ] - * }); - * ``` - * - * @remarks - * - This hook only works with smart accounts and does not support EOA wallets - * - The hook handles both signing and sending of prepared calls in a single operation - * - The returned result contains the prepared call IDs - */ -export function useSignAndSendPreparedCalls( - params: UseSignAndSendPreparedCallsParams, -): UseSignAndSendPreparedCallsResult { - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: params.client?.account.address, - }); - - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: signAndSendPreparedCalls, - mutateAsync: signAndSendPreparedCallsAsync, - data: signAndSendPreparedCallsResult, - isPending: isSigningAndSendingPreparedCalls, - error, - } = useMutation( - { - mutationFn: async (params: MutationParams): Promise => { - if (isConnected) { - throw new UnsupportedEOAActionError( - "useSignAndSendPreparedCalls", - "mutate", - ); - } - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useSignAndSendPreparedCalls"); - } - - if (!smartWalletClient.account) { - throw new AccountNotFoundError(); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUseSignAndSendPreparedCalls", - ); - - const signedCalls = await _smartWalletClient.signPreparedCalls(params); - - const result = await _smartWalletClient.sendPreparedCalls(signedCalls); - - return result; - }, - }, - queryClient, - ); - - return { - signAndSendPreparedCalls: ReactLogger.profiled( - "signAndSendPreparedCalls", - signAndSendPreparedCalls, - ), - signAndSendPreparedCallsAsync: ReactLogger.profiled( - "signAndSendPreparedCallsAsync", - signAndSendPreparedCallsAsync, - ), - signAndSendPreparedCallsResult, - isSigningAndSendingPreparedCalls, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSignMessage.ts b/account-kit/react/src/hooks/useSignMessage.ts deleted file mode 100644 index ce015021b8..0000000000 --- a/account-kit/react/src/hooks/useSignMessage.ts +++ /dev/null @@ -1,130 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateAsyncFunction, - type UseMutateFunction, -} from "@tanstack/react-query"; -import { useCallback } from "react"; -import type { Address, Hex, SignableMessage } from "viem"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ClientUndefinedHookError } from "../errors.js"; -import { ReactLogger } from "../metrics.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { signMessage as wagmi_signMessage } from "@wagmi/core"; - -export type SignMessageArgs = { message: SignableMessage }; - -export type UseSignMessagedMutationArgs = BaseHookMutationArgs< - Hex, - SignMessageArgs ->; - -export type UseSignMessageArgs = { - client: { account: { address: Address } } | undefined; -} & UseSignMessagedMutationArgs; - -export type UseSignMessageResult = { - signMessage: UseMutateFunction; - signMessageAsync: UseMutateAsyncFunction< - Hex, - Error, - SignMessageArgs, - unknown - >; - signedMessage: Hex | undefined; - isSigningMessage: boolean; - error: Error | null; -}; - -/** - * Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignMessage.ts) to sign a message using the provided client. - * Provides a way to sign messages within the context of an account using Ethereum-specific signature in EIP-191 format. Uses `personal_sign` to sign arbitrary messages (usually strings). Accepts any plain message as input. - * - * Until the method completes, `isSigningMessage` is true and `signedMessage` is null until eventually returning either a 1271 or 6492 signature (if the smart contract account has not been deployed yet), which is useful if you need to render the signature to the UI. `signedMessageAsync` is useful over `signedMessage` if you need to chain calls together. - * - * Using 1271 validation, the mechanisms by which you can validate the smart contract account, we verify the message was signed by the smart contract itself rather than the EOA signer. - * - * To reiterate, the signature that is returned must be verified against the account itself not the signer. The final structure of the signature is dictated by how the account does 1271 validation. You don’t want to be verifying in a different way than the way the account itself structures the signatures to be validated. For example LightAccount has three different ways to validate the account. - * - * @param {UseSignMessageArgs} config The configuration arguments for the hook, including the client and additional mutation arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignMessage.ts#L25) - * @returns {UseSignMessageResult} An object containing methods and state for signing messages. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignMessage.ts#L29) - * - * @example - * ```ts twoslash - * import { useSignMessage, useSmartAccountClient } from "@account-kit/react"; - * const data = "messageToSign" - * const { client } = useSmartAccountClient({}); - * - * const { signMessage, signMessageAsync, signedMessage, isSigningMessage, error } = useSignMessage({ - * client, - * // these are optional - * onSuccess: (result) => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * - * const result = await signMessage({ message: data }); - * ``` - */ -export function useSignMessage( - config: UseSignMessageArgs, -): UseSignMessageResult { - const { client: _client, ...mutationArgs } = config; - const smartWalletClient = useSmartWalletClient({ - account: _client?.account.address, - }); - - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const mutationFn = useCallback( - async (params: SignMessageArgs) => { - if (isConnected) { - return wagmi_signMessage(wagmiConfig, params); - } - - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useSignMessage"); - } - - return smartWalletClient.signMessage(params); - }, - [isConnected, smartWalletClient, wagmiConfig], - ); - - const { - mutate: signMessage, - mutateAsync: signMessageAsync, - data: signedMessage, - isPending: isSigningMessage, - error, - } = useMutation( - { - mutationKey: ["signMessage"], - mutationFn, - ...mutationArgs, - }, - queryClient, - ); - - return { - signMessage: ReactLogger.profiled("signMessage", signMessage), - signMessageAsync: ReactLogger.profiled( - "signMessageAsync", - signMessageAsync, - ), - signedMessage, - isSigningMessage, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSignTypedData.ts b/account-kit/react/src/hooks/useSignTypedData.ts deleted file mode 100644 index 89650e611a..0000000000 --- a/account-kit/react/src/hooks/useSignTypedData.ts +++ /dev/null @@ -1,122 +0,0 @@ -"use client"; - -import { - useMutation, - type UseMutateAsyncFunction, - type UseMutateFunction, -} from "@tanstack/react-query"; -import type { Address, Hex, TypedDataDefinition } from "viem"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ClientUndefinedHookError } from "../errors.js"; -import { ReactLogger } from "../metrics.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; -import { signTypedData as wagmi_signTypedData } from "@wagmi/core"; -import { useAccount as wagmi_useAccount } from "wagmi"; - -export type SignTypedDataArgs = { typedData: TypedDataDefinition }; - -export type UseSignTypedDataMutationArgs = BaseHookMutationArgs< - Hex, - SignTypedDataArgs ->; - -export type UseSignTypedDataArgs = { - client: { account: { address: Address } } | undefined; -} & UseSignTypedDataMutationArgs; - -export type UseSignTypedDataResult = { - signTypedData: UseMutateFunction; - signTypedDataAsync: UseMutateAsyncFunction< - Hex, - Error, - SignTypedDataArgs, - unknown - >; - signedTypedData: Hex | undefined; - isSigningTypedData: boolean; - error: Error | null; -}; - -/** - * Similar to `useSignMessage`, [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignTypedData.ts) for signing typed data, supporting both connected accounts and clients in EIP 712 format. - * - * Uses `eth_signTypedData` to sign structured, typed data. Accepts typed, complex data structures as input. Like `useSignMessage`, this hook also handles deployed (1271) and undeployed accounts (6492). - * - * @param {UseSignTypedDataArgs} args The arguments for the hook, including client and mutation-related arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignTypedData.ts#L24) - * @returns {UseSignTypedDataResult} An object containing methods and state related to the sign typed data mutation process. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignTypedData.ts#L28) - * - * @example - * ```ts twoslash - * import { useSignTypedData, useSmartAccountClient } from "@account-kit/react"; - * const typedData = { - * types: { - * Message: [{ name: "content", type: "string" }], - * }, - * primaryType: "Message", - * message: { content: "Hello" }, - * } - * const { client } = useSmartAccountClient({}); - * const { signTypedData, signTypedDataAsync, signedTypedData, isSigningTypedData, error } = useSignTypedData({ - * client, - * // these are optional - * onSuccess: (result) => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * - * const result = await signTypedData({ typedData }); - * ``` - */ -export function useSignTypedData( - args: UseSignTypedDataArgs, -): UseSignTypedDataResult { - const { client: _client, ...mutationArgs } = args; - const smartWalletClient = useSmartWalletClient({ - account: _client?.account.address, - }); - - const { - queryClient, - config: { - _internal: { wagmiConfig }, - }, - } = useAlchemyAccountContext(); - const { isConnected } = wagmi_useAccount({ config: wagmiConfig }); - - const { - mutate: signTypedData, - mutateAsync: signTypedDataAsync, - data: signedTypedData, - isPending: isSigningTypedData, - error, - } = useMutation( - { - mutationFn: async (params: SignTypedDataArgs) => { - if (isConnected) { - return wagmi_signTypedData(wagmiConfig, params.typedData); - } - - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useSignTypedData"); - } - - return smartWalletClient.signTypedData(params.typedData); - }, - ...mutationArgs, - }, - queryClient, - ); - - return { - signTypedData: ReactLogger.profiled("signTypedData", signTypedData), - signTypedDataAsync: ReactLogger.profiled( - "signTypedDataAsync", - signTypedDataAsync, - ), - signedTypedData, - isSigningTypedData, - error, - }; -} diff --git a/account-kit/react/src/hooks/useSigner.ts b/account-kit/react/src/hooks/useSigner.ts deleted file mode 100644 index 228f9cf603..0000000000 --- a/account-kit/react/src/hooks/useSigner.ts +++ /dev/null @@ -1,36 +0,0 @@ -"use client"; - -import { getSigner, watchSigner, type AlchemySigner } from "@account-kit/core"; -import { useSyncExternalStore } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { AlchemyAccountContextProps } from "../AlchemyAccountContext.js"; - -/** - * [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSigner.ts) for accessing the current Alchemy signer within a React component. It uses a synchronous external store for updates. - * This is a good use case if you want to use the signer as an EOA, giving you direct access to it. The signer returned from `useSigner` just does a `personal_sign` or `eth_signTypedData` without any additional logic, but a smart contract account might have additional logic for creating signatures for 1271 validation so `useSignMessage` or `useSignTypeData` instead. - * - * @param {AlchemyAccountContextProps} [override] optional configuration to override the default context. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/AlchemyAccountContext.ts#L7) - * @returns {AlchemySigner | null} The current Alchemy signer or null if none is available. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/signer/src/client/index.ts#L50) - * - * @example - * ```ts twoslash - * import { useSigner } from "@account-kit/react"; - * import type { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer : AlchemyWebSigner | null = useSigner(); - * ``` - */ -export const useSigner = ( - override?: AlchemyAccountContextProps, -): T | null => { - const { config } = useAlchemyAccountContext(override); - - // TODO: figure out how to handle this on the server - // I think we need a version of the signer that can be run on the server that essentially no-ops or errors - // for all calls - return useSyncExternalStore( - watchSigner(config), - () => getSigner(config), - () => null, - ); -}; diff --git a/account-kit/react/src/hooks/useSignerStatus.ts b/account-kit/react/src/hooks/useSignerStatus.ts deleted file mode 100644 index 5587b8fdd8..0000000000 --- a/account-kit/react/src/hooks/useSignerStatus.ts +++ /dev/null @@ -1,34 +0,0 @@ -"use client"; - -import type { SignerStatus } from "@account-kit/core"; -import { getSignerStatus, watchSignerStatus } from "@account-kit/core"; -import { useSyncExternalStore } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { AlchemyAccountContextProps } from "../AlchemyAccountContext.js"; - -export type UseSignerStatusResult = SignerStatus; - -/** - * [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignerStatus.ts) to get the signer status, optionally using an override configuration, useful if you’re building your own login. - * - * @param {AlchemyAccountContextProps} [override] optional configuration to override the default context. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/AlchemyAccountContext.ts#L7) - * @returns {UseSignerStatusResult} the current state of the signer. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/store/types.ts#L53) - * - * @example - * ```ts twoslash - * import { useSignerStatus } from "@account-kit/react"; - * - * const signerStatus = useSignerStatus(); - * ``` - */ -export const useSignerStatus = ( - override?: AlchemyAccountContextProps, -): UseSignerStatusResult => { - const { config } = useAlchemyAccountContext(override); - - return useSyncExternalStore( - watchSignerStatus(config), - () => getSignerStatus(config), - () => getSignerStatus(config), - ); -}; diff --git a/account-kit/react/src/hooks/useSmartAccountClient.ts b/account-kit/react/src/hooks/useSmartAccountClient.ts deleted file mode 100644 index 6721a768d2..0000000000 --- a/account-kit/react/src/hooks/useSmartAccountClient.ts +++ /dev/null @@ -1,105 +0,0 @@ -"use client"; -import { type OptionalFields } from "@aa-sdk/core"; -import type { - GetSmartAccountClientParams, - GetSmartAccountClientResult, - SupportedAccount, - SupportedAccounts, - SupportedAccountTypes, -} from "@account-kit/core"; -import { - getSmartAccountClient, - watchSmartAccountClient, -} from "@account-kit/core"; -import { useMemo, useSyncExternalStore } from "react"; -import type { Chain } from "viem"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -export type UseSmartAccountClientProps< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SupportedAccountTypes | undefined = - | SupportedAccountTypes - | undefined, -> = OptionalFields< - GetSmartAccountClientParams< - TChain, - TAccount extends undefined ? "ModularAccountV2" : TAccount - >, - "type" ->; - -export type UseSmartAccountClientResult< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SupportedAccounts = SupportedAccounts, -> = GetSmartAccountClientResult; - -export function useSmartAccountClient< - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SupportedAccountTypes | undefined = "ModularAccountV2", ->( - args: UseSmartAccountClientProps, -): UseSmartAccountClientResult< - TChain, - SupportedAccount ->; - -/** - * [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSmartAccountClient.ts) that uses the provided smart account client parameters to create or retrieve an existing smart account client, handling different types of accounts including LightAccount, MultiOwnerLightAccount, and MultiOwnerModularAccount. - * Under the hood, Smart Account Client takes care of all the necessary middleware operations needed to populate a user operation such as gas estimation and paymaster data. - * - * If passing in an undefined client, Smart Account Client will treat the connected account as an EOA. - * - * If using with an EOA, Smart Account Client won’t throw an error, but the client itself will stay undefined forever. We recommend useBundlerClient instead when using an EOA. The EOA must also be connected or authenticated with a signer. - * - * @param {UseSmartAccountClientProps} props The properties required to use the smart account client, including optional [account parameters](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/actions/createAccount.ts#L23), type, and additional client parameters. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSmartAccountClient.ts#L19) - * @returns {UseSmartAccountClientResult} An object containing the smart account client, the address, and a loading state. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSmartAccountClient.ts#L24) - * - * @example - * ```ts twoslash - * import { useSmartAccountClient } from "@account-kit/react"; - * - * const { client, address, isLoadingClient } = useSmartAccountClient({}); - * ``` - */ -export function useSmartAccountClient({ - accountParams, - type = "ModularAccountV2", - ...clientParams -}: UseSmartAccountClientProps): UseSmartAccountClientResult { - const { - config: { - _internal: { wagmiConfig }, - }, - config, - } = useAlchemyAccountContext(); - - const result = useSyncExternalStore( - watchSmartAccountClient({ type, accountParams, ...clientParams }, config), - () => - getSmartAccountClient({ type, accountParams, ...clientParams }, config), - () => - getSmartAccountClient({ type, accountParams, ...clientParams }, config), - ); - - const { isConnected, address: eoaAddress } = wagmi_useAccount({ - config: wagmiConfig, - }); - - const eoaClient = useMemo(() => { - if (!isConnected) return null; - console.warn("EOA is connected, will not return an SCA client"); - - return { - client: undefined, - address: eoaAddress, - isLoadingClient: false, - }; - }, [eoaAddress, isConnected]); - - if (eoaClient) { - return eoaClient; - } - - return result; -} diff --git a/account-kit/react/src/hooks/useSmartWalletClient.ts b/account-kit/react/src/hooks/useSmartWalletClient.ts deleted file mode 100644 index 1ee57a5a8d..0000000000 --- a/account-kit/react/src/hooks/useSmartWalletClient.ts +++ /dev/null @@ -1,73 +0,0 @@ -"use client"; - -import { - getSmartWalletClient, - watchSmartWalletClient, - type GetSmartWalletClientParams, -} from "@account-kit/core"; -import { useEffect, useSyncExternalStore } from "react"; -import type { Address } from "viem"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -/** - * React hook that provides a Smart Wallet Client instance. - * Returns undefined if an EOA wallet is connected via wagmi, as Smart Wallet Clients are only for smart accounts. - * The hook automatically subscribes to changes in signer status and chain configuration. - * - * @example - * ```tsx twoslash - * import { useSmartWalletClient } from "@account-kit/react"; - * - * function MyComponent() { - * const client = useSmartWalletClient(); - * - * // With specific account address - * const clientWithAccount = useSmartWalletClient({ - * account: "0x1234..." - * }); - * - * if (client) { - * // Use the client for wallet operations - * console.log("Smart Wallet Client ready:", client); - * } - * - * return
...
; - * } - * ``` - * - * @param {GetSmartWalletClientParams} params Parameters for getting the smart wallet client, including optional account address - * @returns {GetSmartWalletClientResult} The Smart Wallet Client instance or undefined if an EOA is connected or client is unavailable - */ -export function useSmartWalletClient< - TAccount extends Address | undefined = Address | undefined, ->(params: GetSmartWalletClientParams) { - const { - config: { - _internal: { wagmiConfig }, - }, - config, - } = useAlchemyAccountContext(); - - const result = useSyncExternalStore( - watchSmartWalletClient(config), - () => getSmartWalletClient(config, params), - () => getSmartWalletClient(config, params), - ); - - const { isConnected } = wagmi_useAccount({ - config: wagmiConfig, - }); - - useEffect(() => { - if (!isConnected) return; - - console.warn("EOA is connected, will not return an SCA client"); - }, [isConnected]); - - if (isConnected) { - return undefined; - } - - return result; -} diff --git a/account-kit/react/src/hooks/useSolanaAdapters.ts b/account-kit/react/src/hooks/useSolanaAdapters.ts deleted file mode 100644 index 1da3049679..0000000000 --- a/account-kit/react/src/hooks/useSolanaAdapters.ts +++ /dev/null @@ -1,27 +0,0 @@ -"use client"; - -import { useMemo } from "react"; -import type { WalletAdapter } from "@solana/wallet-adapter-base"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -/** - * Hook to get configured Solana wallet adapters - * Supports both explicit adapter arrays and "detect" mode for auto-detection - * - * @returns {WalletAdapter[]} Array of configured wallet adapters - */ -export function useSolanaAdapters(): WalletAdapter[] { - const { config } = useAlchemyAccountContext(); - - return useMemo(() => { - const solanaConfig = config.solana; - - if (!solanaConfig) { - return []; - } - - return ( - Array.isArray(solanaConfig.adapters) ? solanaConfig.adapters : [] - ) as WalletAdapter[]; - }, [config.solana]); -} diff --git a/account-kit/react/src/hooks/useSolanaConnection.ts b/account-kit/react/src/hooks/useSolanaConnection.ts deleted file mode 100644 index 142c40c991..0000000000 --- a/account-kit/react/src/hooks/useSolanaConnection.ts +++ /dev/null @@ -1,56 +0,0 @@ -"use client"; - -import * as solanaNetwork from "../solanaNetwork.js"; -import { SolanaSigner } from "@account-kit/signer"; -import { useSolanaSigner } from "./useSolanaSigner.js"; -import { getSolanaConnection, watchSolanaConnection } from "@account-kit/core"; -import { useSyncExternalStore } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -/** - * Returned from the solana connection. - */ -export interface SolanaConnection { - /** The solana signer used to send the transaction */ - readonly signer: SolanaSigner | null; - /** The solana connection used to send the transaction */ - readonly connection: solanaNetwork.Connection | null; -} - -/** - * The parameters for the SolanaConnectionHookParams hook. - */ -export type SolanaConnectionHookParams = { - signer?: SolanaSigner; -}; - -/** - * This hook is used for establishing a connection to Solana and returns the connection object and the signer object. - * - * @example - * ```ts twoslash - * import { useSolanaConnection } from "@account-kit/react"; - * - * const { connection } = useSolanaConnection(); - * ``` - * @param {SolanaConnectionHookParams} opts Options for the hook to get setup - * @returns {SolanaConnection} The transaction hook. - */ -export function useSolanaConnection( - opts: SolanaConnectionHookParams = {}, -): SolanaConnection { - const { config } = useAlchemyAccountContext(); - const fallbackSigner: null | SolanaSigner = useSolanaSigner(); - const connection = - useSyncExternalStore( - watchSolanaConnection(config), - () => getSolanaConnection(config), - () => getSolanaConnection(config), - )?.connection || null; - const signer: null | SolanaSigner = opts?.signer || fallbackSigner; - - return { - connection, - signer, - }; -} diff --git a/account-kit/react/src/hooks/useSolanaSignMessage.ts b/account-kit/react/src/hooks/useSolanaSignMessage.ts deleted file mode 100644 index 3753d83397..0000000000 --- a/account-kit/react/src/hooks/useSolanaSignMessage.ts +++ /dev/null @@ -1,106 +0,0 @@ -"use client"; - -import { useMutation } from "@tanstack/react-query"; -import { toBytes, toHex, type ByteArray, type Hex } from "viem"; -import { useSolanaWallet } from "./useSolanaWallet.js"; -import type { SolanaSigner } from "@account-kit/signer"; -import type { BaseHookMutationArgs } from "../types"; -import { useSolanaSigner } from "./useSolanaSigner.js"; - -export type MutationParams = { - message: string | ByteArray; -}; -/** - * There are cases where we might want to sign a message, used for other - * messages or anything else. A use case would be sign something for audit reasons? - * - * Uses the useMutation for the return type plus a few more. - * - * @see {@link useSolanaTransaction} - * @see {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation | TanStack Query useMutation} - */ -export interface SolanaSignedMessage { - readonly signer: SolanaSigner | null; - readonly data: Hex | undefined; - readonly isPending: boolean; - readonly error: Error | null; - reset(): void; - signMessage(args: MutationParams): void; - signMessageAsync(args: MutationParams): Promise; -} - -/** - * The parameters for the useSolanaSignMessage hook. - */ -export type UseSolanaSignMessageParams = { - signer?: SolanaSigner; - /** - * Override the default mutation options - * - * @see {@link BaseHookMutationArgs} - */ - mutation?: BaseHookMutationArgs; -}; - -/** - * This is the hook that will be used to sign a message. It will prioritize external - * connected Solana wallets, falling back to the internal signer when not connected. - * - * @example - * ```ts twoslash - * import { useSolanaSignMessage } from "@account-kit/react"; - * - * const { - * isPending: isSigningMessage, - * mutate: signHello, - * data: signature, - * reset, - * } = useSolanaSignMessage({}); - * - * signHello({ message: "Hello" }); - * ``` - * @param {UseSolanaSignMessageParams} opts - Options for the hook to get setup. - * @returns {SolanaSignedMessage} This should be hook mutations plus a few more. Used to get the end result of the signing and the callbacks. - */ -export function useSolanaSignMessage( - opts: UseSolanaSignMessageParams, -): SolanaSignedMessage { - const fallbackSigner = useSolanaSigner({}); - const { connected: isWalletConnected, signMessage: walletSignMessage } = - useSolanaWallet(); - const signer = opts.signer || fallbackSigner; - - const mutation = useMutation({ - mutationFn: async (args: MutationParams) => { - const messageBytes = - typeof args.message === "string" ? toBytes(args.message) : args.message; - - // Use external wallet if connected - if (isWalletConnected && walletSignMessage) { - try { - const signature = await walletSignMessage(messageBytes); - return toHex(signature); - } catch (error) { - throw new Error(`External wallet signing failed: ${error}`); - } - } - - // Fall back to internal signer - if (!signer) { - throw new Error( - "No Solana wallet connected and no internal signer available", - ); - } - - return await signer.signMessage(messageBytes).then(toHex); - }, - ...opts.mutation, - }); - - return { - signer, - ...mutation, - signMessage: mutation.mutate, - signMessageAsync: mutation.mutateAsync, - }; -} diff --git a/account-kit/react/src/hooks/useSolanaSigner.ts b/account-kit/react/src/hooks/useSolanaSigner.ts deleted file mode 100644 index ace9da8c62..0000000000 --- a/account-kit/react/src/hooks/useSolanaSigner.ts +++ /dev/null @@ -1,58 +0,0 @@ -"use client"; - -import type { AlchemySigner, SignerStatus } from "@account-kit/core"; -import { useSigner } from "./useSigner.js"; -import { useSignerStatus } from "./useSignerStatus.js"; -import * as web3 from "@solana/web3.js"; -import { useMemo } from "react"; -import type { SolanaSigner } from "@account-kit/signer"; -export interface TransactionSigner { - readonly state: "pending" | "ready"; - signTransaction(transaction: web3.Transaction): Promise; -} - -export interface MessageSigner { - readonly state: "pending" | "ready"; - signMessage: (message: string) => Promise<{ signedMessage: unknown }>; -} - -export type SignerSet = { - signer: AlchemySigner | null; - signerStatus: SignerStatus; -}; - -/** - * This hook is used to create a SolanaSigner instance. - * It is used to sign transactions and messages for the Solana blockchain. - * - * @param {object?} opts - The options for the useSolanaSigner hook. - * @param {SignerSet} [opts.signerSet] - The signer set to use. - * @returns {object} A SolanaSigner instance. - */ -export const useSolanaSigner = ( - opts: { - signerSet?: SignerSet; // Used to set a shared signer - } = {}, -): null | SolanaSigner => { - const fallbackSigner = useSigner(); - const fallbackSignerStatus = useSignerStatus(); - const solanaSigner: SolanaSigner | null = useMemo(() => { - const signer = opts.signerSet?.signer || fallbackSigner; - const signerStatus = opts.signerSet?.signerStatus || fallbackSignerStatus; - if (!signer) return null; - if (!signerStatus.isConnected) return null; - try { - return signer.toSolanaSigner(); - } catch (error) { - console.log(error); - return null; - } - }, [ - opts.signerSet?.signer, - opts.signerSet?.signerStatus, - fallbackSigner, - fallbackSignerStatus, - ]); - - return solanaSigner; -}; diff --git a/account-kit/react/src/hooks/useSolanaTransaction.ts b/account-kit/react/src/hooks/useSolanaTransaction.ts deleted file mode 100644 index 2023b84b5a..0000000000 --- a/account-kit/react/src/hooks/useSolanaTransaction.ts +++ /dev/null @@ -1,292 +0,0 @@ -"use client"; - -import * as solanaNetwork from "../solanaNetwork.js"; -import { useMutation } from "@tanstack/react-query"; -import { SolanaSigner } from "@account-kit/signer"; -import { useSolanaWallet } from "./useSolanaWallet.js"; -import { - createSolanaSponsoredTransaction, - createSolanaTransaction, -} from "@account-kit/signer"; -import type { BaseHookMutationArgs } from "../types.js"; -import { - PublicKey, - SystemProgram, - Transaction, - TransactionInstruction, - VersionedTransaction, -} from "@solana/web3.js"; -import { useSolanaSigner } from "./useSolanaSigner.js"; -import { getSolanaConnection, watchSolanaConnection } from "@account-kit/core"; -import { useSyncExternalStore } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import type { PromiseOrValue } from "../../../../aa-sdk/core/dist/types/types.js"; - -/** Used right before we send the transaction out, this is going to be the signer. */ -export type PreSend = ( - this: void, - transaction: VersionedTransaction | Transaction, -) => PromiseOrValue; -/** - * Used in the sendTransaction, will transform either the instructions (or the transfer -> instructions) into a transaction - */ -export type TransformInstruction = ( - this: void, - instructions: TransactionInstruction[], -) => PromiseOrValue; -export type SolanaTransactionParamOptions = { - preSend?: PreSend; - transformInstruction?: TransformInstruction; -}; -export type SolanaTransactionParams = - | { - transfer: { - amount: number; - toAddress: string; - }; - transactionComponents?: SolanaTransactionParamOptions; - confirmationOptions?: solanaNetwork.ConfirmationOptions; - } - | { - instructions: TransactionInstruction[]; - transactionComponents?: SolanaTransactionParamOptions; - confirmationOptions?: solanaNetwork.ConfirmationOptions; - }; -/** - * We wanted to make sure that this will be using the same useMutation that the - * useSendUserOperation does. - * We are going to flatten it to make sure that we are abstracting it, and that we have - * the flattened version here for readability. - * - * @see {@link useSendUserOperation} - * @see {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation | TanStack Query useMutation} - */ -export interface SolanaTransaction { - /** The solana signer used to send the transaction */ - readonly signer: SolanaSigner | null; - /** The solana connection used to send the transaction */ - readonly connection: solanaNetwork.Connection | null; - /** The result of the transaction */ - readonly data: void | { hash: string }; - /** Is the use sending a transaction */ - readonly isPending: boolean; - /** The error that occurred */ - readonly error: Error | null; - reset(): void; - /** Send the transaction */ - sendTransaction(params: SolanaTransactionParams): void; - /** Send the transaction asynchronously */ - sendTransactionAsync( - params: SolanaTransactionParams, - ): Promise<{ hash: string }>; -} - -/** - * The parameters for the useSolanaTransaction hook. - */ -export type SolanaTransactionHookParams = { - signer?: SolanaSigner; - connection?: solanaNetwork.Connection; - policyId?: string | void; - confirmationOptions?: solanaNetwork.ConfirmationOptions; - /** - * Override the default mutation options - * - * @see {@link BaseHookMutationArgs} - */ - mutation?: BaseHookMutationArgs<{ hash: string }, SolanaTransactionParams>; -}; - -/** - * This is the hook that will be used to send a transaction. It will prioritize external - * connected Solana wallets, falling back to the internal signer when not connected. - * Supports sponsorship for both external wallets and internal signers. - * - * @example - * ```ts twoslash - * import { useSolanaTransaction } from "@account-kit/react"; - * - * const { mutate } = useSolanaTransaction({ - * policyId: "", - * }); - * - * mutate({ - * transfer: { - * amount: 0, - * toAddress: "", - * }, - * }); - * ``` - * - * @param {SolanaTransactionHookParams} opts Options for the hook to get setup, The transaction is required. - * @returns {SolanaTransaction} The transaction hook. - */ -export function useSolanaTransaction( - opts: SolanaTransactionHookParams = {}, -): SolanaTransaction { - const { config } = useAlchemyAccountContext(); - const fallbackSigner: null | SolanaSigner = useSolanaSigner(); - const { - connected: isWalletConnected, - publicKey: walletPublicKey, - sendTransaction: walletSendTransaction, - } = useSolanaWallet(); - const backupConnection = useSyncExternalStore( - watchSolanaConnection(config), - () => getSolanaConnection(config), - () => getSolanaConnection(config), - ); - - const mutation = useMutation({ - mutationFn: async ({ - transactionComponents: { preSend, transformInstruction } = {}, - confirmationOptions, - ...params - }: SolanaTransactionParams) => { - const localConnection = connection || missing("connection"); - const instructions = getInstructions(); - - // Use external wallet if connected - if (isWalletConnected && walletSendTransaction && walletPublicKey) { - try { - const fromAddress = walletPublicKey.toBase58(); - - // Use custom transform if provided, otherwise use sponsorship-aware defaults - let transaction: VersionedTransaction | Transaction; - if (transformInstruction) { - transaction = await transformInstruction(instructions); - } else if (policyId) { - // Use sponsorship utility for external wallets - transaction = await createSolanaSponsoredTransaction( - instructions, - localConnection, - policyId, - fromAddress, - ); - } else { - // Use regular transaction utility for external wallets - transaction = await createSolanaTransaction( - instructions, - localConnection, - fromAddress, - ); - } - - transaction = (await preSend?.(transaction)) || transaction; - - const signature = await walletSendTransaction( - transaction, - localConnection, - ); - return { hash: signature }; - } catch (error) { - throw new Error(`External wallet transaction failed: ${error}`); - } - } - - // Fall back to internal signer flow - if (!signer) { - throw new Error( - "No Solana wallet connected and no internal signer available", - ); - } - - const defaultTransformInstruction = mapTransformInstructions.default; - const finalTransformInstruction = - transformInstruction || defaultTransformInstruction; - - let transaction: VersionedTransaction | Transaction = - await finalTransformInstruction(instructions); - transaction = (await preSend?.(transaction)) || transaction; - - if (needsSignerToSign()) { - await signer.addSignature(transaction); - } - - const finalConfirmationOptions = { - ...opts.confirmationOptions, - ...confirmationOptions, - }; - - const hash = await solanaNetwork.broadcast( - localConnection, - transaction, - finalConfirmationOptions, - ); - return { hash }; - - function getInstructions() { - if ("instructions" in params) { - return params.instructions; - } - - const fromAddress = - isWalletConnected && walletPublicKey - ? walletPublicKey.toBase58() - : signer?.address || missing("signer.address"); - - return [ - SystemProgram.transfer({ - fromPubkey: new PublicKey(fromAddress), - toPubkey: new PublicKey(params.transfer.toAddress), - lamports: params.transfer.amount, - }), - ]; - } - - function needsSignerToSign() { - if ("message" in transaction) { - const message = transaction.message; - return message.staticAccountKeys.some( - (key, index) => - key.toBase58() === signer?.address && - message?.isAccountSigner(index), - ); - } - return transaction.instructions.some((x) => - x.keys.some( - (x) => x.pubkey.toBase58() === signer?.address && x.isSigner, - ), - ); - } - }, - ...opts.mutation, - }); - - const signer: null | SolanaSigner = opts?.signer || fallbackSigner; - const connection = opts?.connection || backupConnection?.connection || null; - const policyId = - "policyId" in opts ? opts.policyId : backupConnection?.policyId; - const mapTransformInstructions: Record = { - async addSponsorship(instructions: TransactionInstruction[]) { - return await (signer || missing("signer")).addSponsorship( - instructions, - connection || missing("connection"), - policyId || missing("policyId"), - ); - }, - async createTransaction(instructions: TransactionInstruction[]) { - return await (signer || missing("signer")).createTransaction( - instructions, - connection || missing("connection"), - ); - }, - get default() { - return policyId - ? mapTransformInstructions.addSponsorship - : mapTransformInstructions.createTransaction; - }, - }; - - return { - connection, - signer, - ...mutation, - sendTransaction: mutation.mutate, - sendTransactionAsync: mutation.mutateAsync, - }; -} - -function missing(message: string): never { - throw new Error(message); -} diff --git a/account-kit/react/src/hooks/useSolanaWallet.ts b/account-kit/react/src/hooks/useSolanaWallet.ts deleted file mode 100644 index b4dad004e8..0000000000 --- a/account-kit/react/src/hooks/useSolanaWallet.ts +++ /dev/null @@ -1,93 +0,0 @@ -"use client"; - -import { - WalletContext, - type WalletContextState, -} from "@solana/wallet-adapter-react"; -import { useContext } from "react"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -const rejectNotAvailable = () => - Promise.reject(new Error("Solana wallet not available")); - -/** - * A frozen, no-op implementation of `WalletContextState` returned when Solana - * support is not configured in the current app. All imperative methods either - * resolve immediately or reject with a clear error, and connection flags are - * set to their safe defaults. - */ -export const EMPTY_WALLET_CONTEXT_STATE: WalletContextState = Object.freeze({ - // connection flags - connected: false, - connecting: false, - disconnecting: false, - - // wallet identity - publicKey: null, - wallets: [], - wallet: null, - signIn: rejectNotAvailable, - - // imperative helpers - select: () => {}, - connect: rejectNotAvailable, - disconnect: () => Promise.resolve(), - sendTransaction: rejectNotAvailable, - signTransaction: rejectNotAvailable, - signAllTransactions: rejectNotAvailable, - signMessage: rejectNotAvailable, - - // misc - autoConnect: false, -}); - -/** - * A React hook that mirrors the behavior and return type of - * `useWallet` from `@solana/wallet-adapter-react`, but safely degrades when - * Solana is not enabled for your application. - * - * Context: - * - This repository is an external SDK that supports multiple chains. To avoid - * forcing Solana dependencies on apps that do not use Solana, the Solana - * wallet context is only considered "active" if Solana has been initialized - * in the `AlchemyAccountProvider` configuration. - * - If Solana is not initialized, this hook returns a stable, frozen - * `EMPTY_WALLET_CONTEXT_STATE` instead of reading from `WalletContext`. This - * prevents runtime errors when the Solana provider is not present and keeps - * type-safe parity with `useWallet` consumers. - * - * Behavior: - * - When Solana is configured (i.e. adapters are provided or set to "detect"), - * this hook returns the live `WalletContext` from - * `@solana/wallet-adapter-react`. - * - Otherwise, it returns `EMPTY_WALLET_CONTEXT_STATE` where actions such as - * `signMessage`, `sendTransaction`, etc., will reject with - * "Solana wallet not available". - * - * @returns {WalletContextState} The Solana wallet context when enabled; a - * frozen, safe no-op context when Solana is not configured. - * - * @example - * ```ts twoslash - * import { useSolanaWallet } from "@account-kit/react"; - * - * const wallet = useSolanaWallet(); - * - * if (wallet.connected) { - * // Safe to use wallet.publicKey, sendTransaction, etc. - * } else { - * // Solana not configured or not connected; UI can conditionally render. - * } - * ``` - */ -export function useSolanaWallet(): WalletContextState { - const solana = useAlchemyAccountContext().config.solana; - const ctx = useContext(WalletContext); - const adapters = solana?.adapters; - - // Use a module-level constant for stable identity when Solana is not configured - if ((adapters && adapters.length > 0) || adapters === "detect") { - return ctx; - } - return EMPTY_WALLET_CONTEXT_STATE; -} diff --git a/account-kit/react/src/hooks/useUiConfig.tsx b/account-kit/react/src/hooks/useUiConfig.tsx deleted file mode 100644 index c611f6aa0b..0000000000 --- a/account-kit/react/src/hooks/useUiConfig.tsx +++ /dev/null @@ -1,108 +0,0 @@ -"use client"; - -import { - createContext, - useContext, - useRef, - type PropsWithChildren, -} from "react"; -import { create, useStore, type StoreApi } from "zustand"; -import { useShallow } from "zustand/react/shallow"; -import type { - AlchemyAccountsUIConfig, - AuthIllustrationStyle, -} from "../types.js"; - -type AlchemyAccountsUIConfigWithDefaults = Omit< - Required, - "auth" -> & { - auth: NonNullable>; -}; - -export type UiConfigStore = AlchemyAccountsUIConfig & { - isModalOpen: boolean; - setModalOpen: (isOpen: boolean) => void; - updateConfig: (config: AlchemyAccountsUIConfig) => void; -}; - -export const DEFAULT_UI_CONFIG: AlchemyAccountsUIConfigWithDefaults = { - illustrationStyle: "flat" as AuthIllustrationStyle, - auth: { - addPasskeyOnSignup: false, - header: null, - hideError: false, - sections: [[{ type: "email" }], [{ type: "passkey" }]], - onAuthSuccess: () => {}, - hideSignInText: false, - }, - modalBaseClassName: "", - supportUrl: "", - uiMode: "modal", -}; - -export function createUiConfigStore( - initialConfig: AlchemyAccountsUIConfig = DEFAULT_UI_CONFIG, -) { - return create((set) => ({ - ...initialConfig, - isModalOpen: false, - setModalOpen: (isOpen: boolean) => { - set({ isModalOpen: isOpen }); - }, - updateConfig: (config: AlchemyAccountsUIConfig) => { - set(() => ({ ...config })); - }, - })); -} - -const UiConfigContext = createContext | undefined>( - undefined, -); - -export function useUiConfig( - selector?: (state: UiConfigStore) => T, -): T; - -/** - * A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx) for accessing UI configuration from the `UiConfigContext`. Allows optional selection of specific parts of the UI config state using a selector function. - * For editing and updating the underlying UI config on the fly. - * - * @param {(state: UiConfigStore) => T} [selector] - An optional function to select specific parts of the UI config state. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx#L23) - * @returns {T} - The selected state passed through the selector function or the entire state if no selector is provided - * @throws Will throw an error if the `UiConfigContext` is not present in the component tree - * - * @example - * ```ts twoslash - * import { useUiConfig } from "@account-kit/react"; - * - * const { illustrationStyle, auth } = useUiConfig(({ illustrationStyle, auth }) => ({ illustrationStyle, auth })); - * ``` - */ -export function useUiConfig( - selector?: (state: UiConfigStore) => UiConfigStore, -): UiConfigStore { - const store = useContext(UiConfigContext); - - if (!store) { - throw new Error("UiConfigContext must be present in root"); - } - - return useStore(store, useShallow(selector ?? ((state) => state))); -} - -export function UiConfigProvider({ - children, - initialConfig, -}: PropsWithChildren<{ initialConfig?: AlchemyAccountsUIConfig }>) { - const storeRef = useRef>(); - if (!storeRef.current) { - storeRef.current = createUiConfigStore(initialConfig); - } - - return ( - - {children} - - ); -} diff --git a/account-kit/react/src/hooks/useUser.ts b/account-kit/react/src/hooks/useUser.ts deleted file mode 100644 index 2bf53a913e..0000000000 --- a/account-kit/react/src/hooks/useUser.ts +++ /dev/null @@ -1,65 +0,0 @@ -"use client"; - -import { getUser, watchUser } from "@account-kit/core"; -import type { User } from "@account-kit/signer"; -import { useMemo, useSyncExternalStore } from "react"; -import { useAccount as wagmi_useAccount } from "wagmi"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; - -export type UseUserResult = (User & { type: "eoa" | "sca" }) | null; - -/** - * A React [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUser.ts) that returns the current user information, either from an External Owned Account (EOA) or from the client store. It uses the Alchemy account context and synchronizes with external store updates. - * The best way to check if user is logged in for both smart account contract users and EOA. - * - * If using smart contract account, returns address of the signer. If only using smart account contracts then you can use [useSignerStatus](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useSignerStatus#usesignerstatus) or [useAccount](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useAccount#useaccount) to see if the account is defined. - * - * @returns {UseUserResult} The user information, including address, orgId, userId, and type. If the user is not connected, it returns null. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUser.ts#L9) - * - * @example - * ```ts twoslash - * import { useUser } from "@account-kit/react"; - * import type { User } from "@account-kit/signer"; - * type UseUserResult = (User & { type: "eoa" | "sca" }) | null; - * - * const user = useUser(); - * ``` - */ - -export const useUser = (): UseUserResult => { - const { config } = useAlchemyAccountContext(); - const { - _internal: { wagmiConfig }, - } = config; - - const account = wagmi_useAccount({ config: wagmiConfig }); - const user = useSyncExternalStore( - watchUser(config), - () => getUser(config) ?? null, - () => getUser(config) ?? null, - ); - - const eoaUser = useMemo(() => { - if (account.status !== "connected" && account.status !== "reconnecting") { - return null; - } - - if (!account.address) { - return null; - } - - return { - address: account.address, - // for backwards compat - // TODO: when we upgrade to v4 we should fix this with a breaking change - orgId: account.address, - userId: account.address, - type: "eoa" as const, - }; - }, [account.address, account.status]); - - // Prioritize EVM wallet connection, then smart account - if (eoaUser) return eoaUser; - - return user; -}; diff --git a/account-kit/react/src/hooks/useWaitForCallsStatus.ts b/account-kit/react/src/hooks/useWaitForCallsStatus.ts deleted file mode 100644 index 3b47728a4f..0000000000 --- a/account-kit/react/src/hooks/useWaitForCallsStatus.ts +++ /dev/null @@ -1,84 +0,0 @@ -"use client"; - -import { clientHeaderTrack, BaseError } from "@aa-sdk/core"; -import type { waitForCallsStatus } from "@account-kit/wallet-client"; -import { useQuery, type UseQueryResult } from "@tanstack/react-query"; -import { ClientUndefinedHookError } from "../errors.js"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ReactLogger } from "../metrics.js"; -import type { WaitForCallsStatusParameters } from "viem/actions"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; -import type { Hex } from "viem"; - -export interface UseWaitForCallsStatusParams - extends Omit { - client: UseSmartAccountClientResult["client"] | undefined; - id: Hex | undefined; -} - -type QueryResult = Awaited>; - -export type UseWaitForCallsStatusResult = UseQueryResult; - -/** - * Hook to wait for calls status to be confirmed. - * It will poll until the calls reach the desired status or until a timeout occurs. - * - * @example - * ```tsx twoslash - * import { useWaitForCallsStatus } from "@account-kit/react"; - * - * function MyComponent() { - * const { data: result, isLoading, error } = useWaitForCallsStatus({ - * client: smartWalletClient, - * id: "0x1234...", // The call ID from sendPreparedCalls - * timeout: 30_000, // 30 second timeout - * }); - * } - * ``` - * - * @param {UseWaitForCallsStatusParams} params - Parameters for the hook - * @param {GetSmartWalletClientResult
| undefined} params.client - Smart wallet client instance. The hook will not fetch until this is defined. - * - * @returns {UseWaitForCallsStatusResult} Query result containing the final status - */ -export function useWaitForCallsStatus({ - client, - id, - ...params -}: UseWaitForCallsStatusParams): UseWaitForCallsStatusResult { - const { queryClient } = useAlchemyAccountContext(); - const smartWalletClient = useSmartWalletClient({ - account: client?.account.address, - }); - - return useQuery( - { - queryKey: ["useWaitForCallsStatus", id], - queryFn: ReactLogger.profiled( - "useWaitForCallsStatus", - async (): Promise => { - if (!smartWalletClient) { - throw new ClientUndefinedHookError("useWaitForCallsStatus"); - } - if (!id) { - throw new BaseError("Expected callId to be defined"); - } - - const _smartWalletClient = clientHeaderTrack( - smartWalletClient, - "reactUseWaitForCallsStatus", - ); - - return await _smartWalletClient.waitForCallsStatus({ - ...params, - id, - }); - }, - ), - enabled: !!(client && smartWalletClient && id), - }, - queryClient, - ); -} diff --git a/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts b/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts deleted file mode 100644 index 8fac43b37d..0000000000 --- a/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts +++ /dev/null @@ -1,139 +0,0 @@ -"use client"; - -import { - FailedToFindTransactionError, - Logger, - SmartAccountClientOptsSchema, - type WaitForUserOperationTxParameters, -} from "@aa-sdk/core"; -import { useMutation, type UseMutateFunction } from "@tanstack/react-query"; -import { concatHex, numberToHex, pad, type Hash } from "viem"; -import { useAlchemyAccountContext } from "./useAlchemyAccountContext.js"; -import { ClientUndefinedHookError } from "../errors.js"; -import { ReactLogger } from "../metrics.js"; -import type { BaseHookMutationArgs } from "../types.js"; -import { useSmartWalletClient } from "./useSmartWalletClient.js"; -import type { UseSmartAccountClientResult } from "./useSmartAccountClient.js"; - -export type UseWaitForUserOperationTransactionMutationArgs = - BaseHookMutationArgs; - -export type UseWaitForUserOperationTransactionArgs = { - client: UseSmartAccountClientResult["client"] | undefined; -} & UseWaitForUserOperationTransactionMutationArgs; - -export type UseWaitForUserOperationTransactionResult = { - waitForUserOperationTransaction: UseMutateFunction< - Hash, - Error, - WaitForUserOperationTxParameters, - unknown - >; - waitForUserOperationTransactionResult: Hash | undefined; - isWaitingForUserOperationTransaction: boolean; - error: Error | null; -}; - -/** - * Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts) to wait for a user operation transaction and manage its state (pending, error, result). - * - * @param {UseWaitForUserOperationTransactionArgs} config Configuration object containing the client. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L15) - * @returns {UseWaitForUserOperationTransactionResult} An object containing methods and state related to waiting for a user operation transaction. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L19) - * - * @example - * ```ts twoslash - * import { useWaitForUserOperationTransaction, useSmartAccountClient } from "@account-kit/react"; - * - * const { client } = useSmartAccountClient({}); - * const { - * waitForUserOperationTransaction, - * waitForUserOperationTransactionResult, - * isWaitingForUserOperationTransaction, - * error - * } = useWaitForUserOperationTransaction({ - * client, - * // these are optional - * onSuccess: (result) => { - * // do something on success - * }, - * onError: (error) => console.error(error), - * }); - * ``` - */ -export function useWaitForUserOperationTransaction( - config: UseWaitForUserOperationTransactionArgs, -): UseWaitForUserOperationTransactionResult { - const { client } = config; - const smartWalletClient = useSmartWalletClient({ - account: client?.account.address, - }); - const { queryClient } = useAlchemyAccountContext(); - - const { - mutate: waitForUserOperationTransaction, - data: waitForUserOperationTransactionResult, - isPending: isWaitingForUserOperationTransaction, - error, - } = useMutation( - { - mutationFn: async (params: WaitForUserOperationTxParameters) => { - if (!smartWalletClient || !client) { - throw new ClientUndefinedHookError( - "useWaitForUserOperationTransaction", - ); - } - - const clientOptions = - SmartAccountClientOptsSchema.passthrough().parse(client); - const { - hash, - retries = { - maxRetries: clientOptions.txMaxRetries, - intervalMs: clientOptions.txRetryIntervalMs, - multiplier: clientOptions.txRetryMultiplier, - }, - } = params; - - const chainIdPadded = pad(numberToHex(smartWalletClient.chain.id), { - size: 32, - }); - const callId = concatHex([chainIdPadded, hash]); - - for (let i = 0; i < retries.maxRetries; i++) { - const txRetryIntervalWithJitterMs = - retries.intervalMs * Math.pow(retries.multiplier, i) + - Math.random() * 100; - - await new Promise((resolve) => - setTimeout(resolve, txRetryIntervalWithJitterMs), - ); - - const result = await smartWalletClient - .getCallsStatus(callId) - .catch((err) => { - Logger.error( - `[useWaitForUserOperationTransaction] error fetching calls status for call ${callId}: ${err}`, - ); - }); - - if (result?.receipts?.length) { - return result.receipts[0].transactionHash; - } - } - - throw new FailedToFindTransactionError(hash); - }, - }, - queryClient, - ); - - return { - waitForUserOperationTransaction: ReactLogger.profiled( - "waitForUserOperationTransaction", - waitForUserOperationTransaction, - ), - waitForUserOperationTransactionResult, - isWaitingForUserOperationTransaction, - error, - }; -} diff --git a/account-kit/react/src/hydrate.ts b/account-kit/react/src/hydrate.ts deleted file mode 100644 index 3860ecba7a..0000000000 --- a/account-kit/react/src/hydrate.ts +++ /dev/null @@ -1,52 +0,0 @@ -"use client"; - -import { - hydrate, - type AlchemyAccountsConfig, - type AlchemyClientState, -} from "@account-kit/core"; -import { useEffect, useRef, type PropsWithChildren } from "react"; - -export type HydrateProps = { - config: AlchemyAccountsConfig; - initialState?: AlchemyClientState; -}; - -/** - * A react component that can be used to hydrate the client store with the provided initial state. - * This method will use `hydrate` to hydrate the client store with the provided initial state if one is provided. - * If ssr is set on the account config, then it will run the onMount function within a useEffect hook. Otherwise, - * It will run onMount as soon as the compoonent is rendered. - * - * based on https://github.com/wevm/wagmi/blob/main/packages/react/src/hydrate.ts - * - * @param {PropsWithChildren} props component props containing the config and initial state as well as children to render - * @param {AlchemyAccountsConfig} props.config the account config containing the client store - * @param {AlchemyClientState | undefined} props.initialState optional param detailing the initial ClientState - * @param {React.ReactNode} props.children the children to render - * @returns {React.ReactNode} the children to render - */ -export function Hydrate(props: PropsWithChildren) { - const { children, config, initialState } = props; - - const { onMount } = hydrate(config, initialState); - - // Hydrate for Non-SSR - if (!config._internal.ssr) { - onMount(); - } - - // Hydrate for SSR - const active = useRef(true); - useEffect(() => { - if (!active.current) return; - if (!config._internal.ssr) return; - onMount(); - return () => { - active.current = false; - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - return children; -} diff --git a/account-kit/react/src/icons/EOAConnectionFailed.tsx b/account-kit/react/src/icons/EOAConnectionFailed.tsx deleted file mode 100644 index ace4625631..0000000000 --- a/account-kit/react/src/icons/EOAConnectionFailed.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../hooks/internal/useIllustrationStyle.js"; - -const Ring = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - const isRingGrey = - illustrationStyle === "filled" || illustrationStyle === "flat"; - - return ( - - - - ); -}; - -const Cross = () => ( - - - - -); - -export const EOAConnectionFailed = { - Ring, - Cross, -}; diff --git a/account-kit/react/src/icons/alchemy.tsx b/account-kit/react/src/icons/alchemy.tsx deleted file mode 100644 index 541d08d671..0000000000 --- a/account-kit/react/src/icons/alchemy.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import type { SVGProps } from "react"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const AlchemyLogo = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - - - - - -); diff --git a/account-kit/react/src/icons/auth-icons/apple.tsx b/account-kit/react/src/icons/auth-icons/apple.tsx deleted file mode 100644 index bb2e4e13c7..0000000000 --- a/account-kit/react/src/icons/auth-icons/apple.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import type { SVGProps } from "react"; - -export const AppleIcon = ( - props: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ); -}; diff --git a/account-kit/react/src/icons/auth-icons/discord.tsx b/account-kit/react/src/icons/auth-icons/discord.tsx deleted file mode 100644 index 31482bbda9..0000000000 --- a/account-kit/react/src/icons/auth-icons/discord.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import type { SVGProps } from "react"; - -export const DiscordIcon = ({ - fill, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/account-kit/react/src/icons/auth-icons/facebook.tsx b/account-kit/react/src/icons/auth-icons/facebook.tsx deleted file mode 100644 index cb63a2a9df..0000000000 --- a/account-kit/react/src/icons/auth-icons/facebook.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import type { SVGProps } from "react"; - -export const FacebookIcon = ( - props: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - - - - ); -}; diff --git a/account-kit/react/src/icons/auth-icons/google.tsx b/account-kit/react/src/icons/auth-icons/google.tsx deleted file mode 100644 index 259a38c7c9..0000000000 --- a/account-kit/react/src/icons/auth-icons/google.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import type { SVGProps } from "react"; - -export const GoogleIcon = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - return ( - - - - - - - ); -}; diff --git a/account-kit/react/src/icons/auth-icons/index.ts b/account-kit/react/src/icons/auth-icons/index.ts deleted file mode 100644 index 5790138152..0000000000 --- a/account-kit/react/src/icons/auth-icons/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { DiscordIcon } from "./discord.js"; -import { FacebookIcon } from "./facebook.js"; -import { GoogleIcon } from "./google.js"; -import { AppleIcon } from "./apple.js"; -import { TwitchIcon } from "./twitch.js"; - -export { DiscordIcon, GoogleIcon, FacebookIcon, AppleIcon, TwitchIcon }; diff --git a/account-kit/react/src/icons/auth-icons/twitch.tsx b/account-kit/react/src/icons/auth-icons/twitch.tsx deleted file mode 100644 index cc1ed916a5..0000000000 --- a/account-kit/react/src/icons/auth-icons/twitch.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import type { SVGProps } from "react"; - -export const TwitchIcon = ( - props: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - - - ); -}; diff --git a/account-kit/react/src/icons/chevron.tsx b/account-kit/react/src/icons/chevron.tsx deleted file mode 100644 index 68a2dda07a..0000000000 --- a/account-kit/react/src/icons/chevron.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { SVGProps } from "react"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const ChevronRight = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/account-kit/react/src/icons/coinbaseIcon.tsx b/account-kit/react/src/icons/coinbaseIcon.tsx deleted file mode 100644 index 68b4ee8028..0000000000 --- a/account-kit/react/src/icons/coinbaseIcon.tsx +++ /dev/null @@ -1,26 +0,0 @@ -export const CoinbaseIcon = ({ - className, - ...props -}: React.JSX.IntrinsicAttributes & React.SVGProps) => { - return ( -
- - - - -
- ); -}; diff --git a/account-kit/react/src/icons/coinbaseWallet.tsx b/account-kit/react/src/icons/coinbaseWallet.tsx deleted file mode 100644 index a07e679f24..0000000000 --- a/account-kit/react/src/icons/coinbaseWallet.tsx +++ /dev/null @@ -1,38 +0,0 @@ -export const CoinbaseWallet = ({ - className, - ...props -}: React.JSX.IntrinsicAttributes & React.SVGProps) => ( -
- - - - - - - - - - - -
-); diff --git a/account-kit/react/src/icons/connectionFailed.tsx b/account-kit/react/src/icons/connectionFailed.tsx deleted file mode 100644 index d345a549b4..0000000000 --- a/account-kit/react/src/icons/connectionFailed.tsx +++ /dev/null @@ -1,144 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../hooks/internal/useIllustrationStyle.js"; - -export const ConnectionFailed = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - - )} - {illustrationStyle === "filled" && ( - - )} - {illustrationStyle === "linear" && ( - - )} - {illustrationStyle === "flat" && ( - - )} - - ); -}; - -const ConnectionFailedOutline = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); - -const ConnectionFailedFilled = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); -const ConnectionFailedLinear = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const ConnectionFailedFlat = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); diff --git a/account-kit/react/src/icons/illustrations/add-passkey.tsx b/account-kit/react/src/icons/illustrations/add-passkey.tsx deleted file mode 100644 index bbc635944a..0000000000 --- a/account-kit/react/src/icons/illustrations/add-passkey.tsx +++ /dev/null @@ -1,319 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../../hooks/internal/useIllustrationStyle.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const AddPasskeyIllustration = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - <> - - - - )} - {illustrationStyle === "linear" && ( - <> - - - - )} - {illustrationStyle === "filled" && ( - <> - - - - )} - {illustrationStyle === "flat" && ( - <> - - - - )} - - ); -}; - -const AddPasskeyOutlineLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); - -const AddPasskeyLinearLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - -); - -const AddPasskeyFilledLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - -); - -const AddPasskeyFlatLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - -); - -const AddPasskeyOutlineDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); - -const AddPasskeyLinearDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - -); - -const AddPasskeyFilledDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - -); - -const AddPasskeyFlatDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - -); diff --git a/account-kit/react/src/icons/illustrations/added-passkey.tsx b/account-kit/react/src/icons/illustrations/added-passkey.tsx deleted file mode 100644 index 3f8e027b7c..0000000000 --- a/account-kit/react/src/icons/illustrations/added-passkey.tsx +++ /dev/null @@ -1,377 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../../hooks/internal/useIllustrationStyle.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const AddedPasskeyIllustration = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - <> - - - - )} - {illustrationStyle === "linear" && ( - <> - - - - )} - {illustrationStyle === "filled" && ( - <> - - - - )} - {illustrationStyle === "flat" && ( - <> - - - - )} - - ); -}; - -const AddedPasskeyOutlineLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const AddedPasskeyLinearLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - - -); - -const AddedPasskeyFilledLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const AddedPasskeyFlatLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - - -); - -const AddedPasskeyOutlineDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const AddedPasskeyLinearDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - - -); - -const AddedPasskeyFilledDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const AddedPasskeyFlatDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - - -); diff --git a/account-kit/react/src/icons/illustrations/email.tsx b/account-kit/react/src/icons/illustrations/email.tsx deleted file mode 100644 index 9ac1b09f3f..0000000000 --- a/account-kit/react/src/icons/illustrations/email.tsx +++ /dev/null @@ -1,371 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../../hooks/internal/useIllustrationStyle.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const EmailIllustration = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - <> - - - - )} - {illustrationStyle === "linear" && ( - <> - - - - )} - {illustrationStyle === "filled" && ( - <> - - - - )} - {illustrationStyle === "flat" && ( - <> - - - - )} - - ); -}; - -const EmailOutlineLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - -); - -const EmailLinearLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const EmailFilledLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const EmailFlatLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const EmailOutlineDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - -); - -const EmailLinearDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const EmailFilledDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const EmailFlatDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); diff --git a/account-kit/react/src/icons/illustrations/passkey.tsx b/account-kit/react/src/icons/illustrations/passkey.tsx deleted file mode 100644 index afb8ffa001..0000000000 --- a/account-kit/react/src/icons/illustrations/passkey.tsx +++ /dev/null @@ -1,271 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../../hooks/internal/useIllustrationStyle.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const PasskeyIllustration = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - <> - - - - )} - {illustrationStyle === "linear" && ( - <> - - - - )} - {illustrationStyle === "filled" && ( - <> - - - - )} - {illustrationStyle === "flat" && ( - <> - - - - )} - - ); -}; - -const PasskeyOutlineLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyLinearLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const PasskeyFilledLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyFlatLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const PasskeyOutlineDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyLinearDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); - -const PasskeyFilledDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyFlatDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - -); diff --git a/account-kit/react/src/icons/illustrations/passkeys.tsx b/account-kit/react/src/icons/illustrations/passkeys.tsx deleted file mode 100644 index b011623061..0000000000 --- a/account-kit/react/src/icons/illustrations/passkeys.tsx +++ /dev/null @@ -1,496 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../../hooks/internal/useIllustrationStyle.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const PasskeySmileyIllustration = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - <> - - - - )} - {illustrationStyle === "linear" && ( - <> - - - - )} - {illustrationStyle === "filled" && ( - <> - - - - )} - {illustrationStyle === "flat" && ( - <> - - - - )} - - ); -}; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const PasskeyShieldIllustration = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - <> - - - - )} - {illustrationStyle === "linear" && ( - <> - - - - )} - {illustrationStyle === "filled" && ( - <> - - - - )} - {illustrationStyle === "flat" && ( - <> - - - - )} - - ); -}; - -const PasskeySmileyOutlineLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeySmileyLinearLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeySmileyFilledLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeySmileyFlatLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const PasskeySmileyOutlineDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeySmileyLinearDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeySmileyFilledDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeySmileyFlatDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const PasskeyShieldOutlineLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyShieldLinearLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyShieldFilledLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyShieldFlatLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const PasskeyShieldOutlineDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyShieldLinearDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyShieldFilledDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const PasskeyShieldFlatDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); diff --git a/account-kit/react/src/icons/illustrations/success.tsx b/account-kit/react/src/icons/illustrations/success.tsx deleted file mode 100644 index 938ad8daa8..0000000000 --- a/account-kit/react/src/icons/illustrations/success.tsx +++ /dev/null @@ -1,265 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../../hooks/internal/useIllustrationStyle.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const SuccessIllustration = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - <> - - - - )} - {illustrationStyle === "linear" && ( - <> - - - - )} - {illustrationStyle === "filled" && ( - <> - - - - )} - {illustrationStyle === "flat" && ( - <> - - - - )} - - ); -}; - -const SuccessOutlineLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); - -const SuccessLinearLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const SuccessFilledLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const SuccessFlatLight = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); - -const SuccessOutlineDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); - -const SuccessLinearDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const SuccessFilledDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -const SuccessFlatDark = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - -); diff --git a/account-kit/react/src/icons/mail.tsx b/account-kit/react/src/icons/mail.tsx deleted file mode 100644 index 610f835b72..0000000000 --- a/account-kit/react/src/icons/mail.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { SVGProps } from "react"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const MailIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/account-kit/react/src/icons/metaMaskIcon.tsx b/account-kit/react/src/icons/metaMaskIcon.tsx deleted file mode 100644 index 18da2e3fbd..0000000000 --- a/account-kit/react/src/icons/metaMaskIcon.tsx +++ /dev/null @@ -1,53 +0,0 @@ -export const MetaMaskIcon = ({ - className, - ...props -}: React.JSX.IntrinsicAttributes & React.SVGProps) => { - return ( -
- - - - - - - - - - - - - - - - -
- ); -}; diff --git a/account-kit/react/src/icons/metamask.tsx b/account-kit/react/src/icons/metamask.tsx deleted file mode 100644 index 7cf91a979a..0000000000 --- a/account-kit/react/src/icons/metamask.tsx +++ /dev/null @@ -1,138 +0,0 @@ -export const MetaMask = ({ - className, - ...props -}: React.JSX.IntrinsicAttributes & React.SVGProps) => { - return ( -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ); -}; diff --git a/account-kit/react/src/icons/nav.tsx b/account-kit/react/src/icons/nav.tsx deleted file mode 100644 index d3257e3f77..0000000000 --- a/account-kit/react/src/icons/nav.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import type { SVGProps } from "react"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const BackArrow = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); - -// eslint-disable-next-line jsdoc/require-jsdoc -export const X = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/account-kit/react/src/icons/oauth.tsx b/account-kit/react/src/icons/oauth.tsx deleted file mode 100644 index cc22c2d693..0000000000 --- a/account-kit/react/src/icons/oauth.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import type { KnownAuthProvider } from "@account-kit/signer"; -import { Spinner } from "./spinner.js"; -import { GoogleIcon, FacebookIcon, TwitchIcon } from "./auth-icons/index.js"; - -interface ContinueWithOAuthProps { - provider: KnownAuthProvider; -} - -interface OAuthConnectionFailedWithProps { - provider: KnownAuthProvider; - logoUrl?: string; - logoUrlDark?: string; - auth0Connection?: string; -} - -// TO DO: extend for BYO auth provider -export function ContinueWithOAuth({ provider }: ContinueWithOAuthProps) { - return ( -
- - {(provider === "google" && ) || - (provider === "facebook" && ) || - (provider === "twitch" && )} -
- ); -} - -// TO DO: extend for BYO auth provider -export function OAuthConnectionFailed({ - provider, - logoUrl, - logoUrlDark, - auth0Connection, -}: OAuthConnectionFailedWithProps) { - return ( -
-
- - - - - -
- {(provider === "google" && ) || - (provider === "facebook" && ) || - (provider === "auth0" && logoUrl && ( - <> - {auth0Connection} - {auth0Connection} - - ))} -
- ); -} diff --git a/account-kit/react/src/icons/passkey.tsx b/account-kit/react/src/icons/passkey.tsx deleted file mode 100644 index d072813835..0000000000 --- a/account-kit/react/src/icons/passkey.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import type { SVGProps } from "react"; -import { Spinner } from "./spinner.js"; -import { PasskeyIllustration } from "./illustrations/passkey.js"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export function LoadingPasskey() { - return ( -
- - -
- ); -} - -// eslint-disable-next-line jsdoc/require-jsdoc -export const PasskeyIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); diff --git a/account-kit/react/src/icons/spinner.tsx b/account-kit/react/src/icons/spinner.tsx deleted file mode 100644 index abe51c2f8d..0000000000 --- a/account-kit/react/src/icons/spinner.tsx +++ /dev/null @@ -1,24 +0,0 @@ -// This spinner icon has to be in png format because svg does not support angular gradients -const SpinnerLightModeBase64 = - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABTvSURBVHgB7V0NchzHdX6vZwECjmQuEosSE0rYtSWVJUsBkIplp0oJF7mAqFwAoC9AygcQAF1AhC9AMBcQlQtgWamKosQxwNAOy4kpLCyVKZJ27VKkCBC70y+vu1/39A4AEj+7AEjOxyJ2ZnZ2Zre/ea/fX3cjPCFYudmsAMG4UlCBVI9pxDIQVgCpjIDHiWjEn8vbAIgtPr/Fuw3kQxroKm+vatLLhNR6/dSJZXgCgHBE8eXNZk0jjPEXrJH5r5kIRNv23N7oXgXmV8i+OYHPA4pOoHgDZZfgLgEt87mfGtJee/mFOhxBHBmCVlaa5dIQjJOCKW68M/z/OEnTM6Lv6dhwZDmi0IgIuea3L9R97a5dOVGuZU521yZsgII6aPr01Ve+dxmOCA6dICMphOo9QD3NjVS2B6XVrRS4px4g2zRNjLnTMJYiKyV8LJMi9ya5P+6zEU1EkPs4kwVU10rPH7YqPDSCfn+reYal4By3Sk3UlntjswC4wxQxZeEkyKozcCJGQoqXLn9VzDSfvxRmd5S/Qra7MEQnKu6z0vnXXzmxAIeAAyfo9zeb09wSM3zjiohD1OwUS0rUd0QSlUN8iKBbYqwoOTacOgzvYny+kyoMhPML936A0e0N2dhQCcy+eup7l+AAcWAEfXmnWUONF/mWldDQ9okN+st/F/uulwArIZqCGHjEkhHdxvNt3zOv2jR6/jyM+zVHhJDinxno7vfsF7GCyscbCarZV0cPhqi+E3Sz2aykbSaGsNalnkw/ErRalxhsten2M4NA9mN+XUdE+ZMgVp72L/pzzelae6kJhIiae5Q1aE+5rKn0wRvVkQb0EX0l6OadezMa9DnT+bsGEENL7k2+FbO2xdCw7om1ImYaUGv7hDe4zeosUFdBs4+TQIPPbMA6tKrVkVZ8b2MVwtB6GTpDlZRSY6KPg6IxJFXhq47Z79PFXGZw+H7MX0uHcyPy5X0FMPfa6Atz0Cf0haCb7FTqRH3Cm+OQM5NtY1u1g7k+ICJIenPergOq5ZT0p0zCcp6EvWJlZaXcKT03zir3DCo8zd9nXG4Ivt+KkLfSMfOlQr/WIEon36iebECP0XOCvv7T3XOphln+CWU55PUQUvj9tl+INVxk+mKd37+iARaqJ/urPjxY2iptaNdUkswQ6IoYciLNwVfq6sf8l3Y/yTLWBEo/+mH1pQvQQ/SUoD/cufcxf+Xz+SdQDKnoruJPGsly36DFG5dZj116+eRIHQ4R//vV7XHQ6hx/rSmzL+a9GIJe0sWACX1eZJ0AXvhh9YUPoEfoCUErTSof69wzKq2W9bFd3j+FPsjpbu9EtljBz3fW4UKv1FevcH3lZkVBMssqcMof890QQbevFVwDDMGkZYL0/V6ovH0TdLO5VqH2xiJ/u4rZdx2svTRJZ+s27L2curABAtLznTWYPWrE5GGIShSrPoJp+/0zveYjHSI4GPxly5TWqxwd2Xe/tC+CHDltJoedTvcceQcvhFm8NZR59tzHpOncYauy3cIQhZgsslqrmH3KxYciFzkz9In2TdKeCTLkQMrkAIyKp22/Z2AIwFpr2SeoxQfmTr000tNO9KBxfeXWrEL1ofHjELoevmAv+GdTXIbGfkjaE0GBHLKSE0dUwH1h786HNxqY6smTB2SV9Rtemszv945cgOuMcn0w/34cnNyLU6tglzDkoBZyhJLM/ET7XykkTw6/f+nht3riaSHHwEjDMRqYAIWiDdzvFoPPsuVVu0jZKMHGovG/YJfYtQSxKb3E9x6PTUzfaVqQt3ZsIGDur148PgtPMa7fuDXLRH2ITqdLP7sJvqe68ub3X5qEXWBXEvT1n+59rAw5aGNp7ikJ5NgnJTw9GvDs006OwRs/eHGWndufk0TE/XGf2/BwISSs/c+NOx/DLrBjCbrdvH+OA4vm4rGFlj0bkXOaEpw9deK7C/AM4frK7WluhIux9NCmHJYDH/ngzR/sLOKwI4JMv5NQ51d8v3IWAvH9YS4SrOFnJ58xcjzYeJgGSC76wol8BCWKQ7aU0hM7sex2pOJQp4t8LyFHOkD+LwEqjHydnz+r5Bhwgy/wy1mzTT4Nb+GNCN9WdJyD85/s5JqPJehW894MUz4K4XGQbgYcUcF8I5z7yxeOP9E+Ti/wRvXEAkdJ5gDiDCH5MBC4aIPtxMev3bg5+7jrPVLFGdWmdGclu034UMjxO8Zw/qW/eK5nAcKnAb/53a2L3FDTpo00ZRGi7nw+tpLk0arukRJUIu0sDicuhACZw5OJ7+qaas9BgS5sJIP8wFIDQq7C+URO67hXPlrupKYMYHtsS9DtP96fZhv6PbvjqA9BQbOrfL+j2pPVkaMd8DwMTHAQWCma1LZAEiC2ul09n09ZQO3a/92sbXed7SVIwQxIurnLUvTJNneDuZMjT0+EoNcwqiuFdM7lviJisgS6BTfotlK0ZR90+4/fTHO8Jv8h6rLYEBsvjvzZ96HAY/Hr331tIv6nITiz5KIOiJEdrs6+9eqJS/nPbi1BSs1EexnRKoveatj4RyiwI3B7mT5aknvkzW3ICo1Mp6RntvrsJoKM9PBnK106My7uYCQsXYVq2znefu1k3SQofTYZXdkZxJlnlqjqf//21pn8ZzcRhIk6J1ve57EmW0xYG9RHUGBX6CQPZ9ncNiMqICr5Ql9eZq07pc/lP9dFEMfbTPnROAWrDa2zI8M+JJ0Ll06ODDegwK4wUa22uB0vRB2GrQRwRoOXJDydt+hU9w5aBpXCLFwAEJXhAqZQ+Dx7RUcNznPv03I5NGcNS2rcl52ZeFCXmsuruBpAlsIVZwp96JyNhIWi79k7jG9kxh9lRzCr1gIJPKOaihN7gaDmN98ap7SSi/A53YiWJeB0wzwU2Be4GRf8NtkKp+ASSXkzle93hsb9OYGg1Ixqs1cAn6oVx8qaGoafxomR556IcZ1HGcai45e63xfthC6eir42asq/n6k4TTVxQkWfORVnpcccUmoWCvQELCpXpKYuHBKpED8TQz9kCbrTvFfjdysSIvfeE4rfY/PaSQpXoEBPoLVasBviq3ZVRNnxMXR86bqz5ixBSiVjoWyVNxSqrBzPJeiWRgrTumeYeONkA+0gAfDlhHbDhn9cIMgEbWw/ZAliTs5E1gSSswmcnW3TS1hIT49BkF6FrpipeJq2m7FyctoctQSxdTbuY9+R0+NHXPH7+CkU6Ck0Jnaov6/KdfQ4nWf6Jy0uj2py9IAl5LgfEgISfhAP1x4owXphvfUaJd+mfpCB2SaKxiCVuR+qKGN3+xyPB2ZBBNaFsDxSJOR6DhP6YTIaPhFK0D1AzFrUisaVVsm4OyEMpoIwRtOImoZVKNAXcINfCeWE3aVzdtQ5G2ujLEG6EldBuqhqFoJABYV66xM4uh3aNkyyAc7UltexEmfhxrrYk4SsNRBYv2mggqB+gXTLSIAbDxpTFE4YKflNHz7wJrnPWZBWRf/TNyQN8GP6owFvlHlHFUNfBcX2jkYo2Ai2+VcCOxdBgf6gIWkHgji140MLRGXF75YlGJqNVAhTGBgMFRLULwyt27aNMqwBUv1TxuY3D+QtX8SQvRqx+/Pj30Eo0Dcs/fYPGrpn5gK/baAgzL7lihhicrCgpu8gP1tJVucehpCa/yquGLXb4tIW5BwM0BFAoTZBjkuho6ngFf+UZIC2xLQBCoYOAuRiPRIFjbxWCY6aYGkzEygK9XQo3lCzSbse+FpgZ1haWSnLQGsfo0a/71wjainev+tqDiCaH82XavGGmdKrQH+wPmTb1jk0YWYW8DOBsfw0zSCFFnRXlsh/twsdqECBPqFTMX8ltIOepDDhIOlVVnGqkfsUQRy6w4KgfiEl8hIkkxf62UsyR5RVHN11iTyx3rIOSSZjwELF9QmIyZh5jSbDdVOFisvDlCwrpsgEQ4P+s/a4lPuCDWbjGBToC0i7MussDxRZ0gA21aMSTFYAoxPC3KLektM1KNAfIFX8prPkQojH+kUaaVmlSl/tTjdI4DTEh3C0MLV7j6UlW947LpHpOG1HYcLhBFtqZHi4wUy2ovFECCEh5BzdUml9HAr0FJ2hkrQpgpuzO8BFt9n9eef1U8tSdpXUUSoRXOjB2Qne0taAZ6BAT4GpLbWWSlJ7KK6SMyJlE6XKnZBeAQimW1dUVZzYwlDoNRBPy6BiX/+BvuRKJgixpW6uspQwpLVz4mYvxf9rzbW1ChToCUw5lak3iA5JJ4RSh6hRp5RJ0PPPD9eZtaZUkYY5EEIxCb+UtJqCAj1BW7drsHU02vufjR+//XLdbIfRDZr0v/gYQjYKOa6/L8ztHmLGjSbOW2/Bvan7EwNBitzAIgxxBAK/AIbMblW7t7ZWgwL7wn/85iszW+WojbT5GRpDJNsx1TFLIQgCQZ3O0LJVc5DZb3bbRbid6BVqbt/gBrfjgKN5XomyAT9mv/GTN1+5HJ3vMDJiVk2kf4Yuh8ilwJU4r0zTmcJp3Ts+u75S0UTToUgnikv7aLaKRt8ZdA8iJrrsy7TMLka2tlyoPDi0cQ4K7AmJNot3+NoPAwyShJKi09DuGge8yZK492B9kQ+flto4AsjW8LEncPS7/XCwaiWuwI5hpCdJS19ISiHLKLhkt5+Q9uo7P3p5Iv7cpplG+Nx58LEgiKaIk4I6RnngWHsGCuwKmFrpCRUgofaDwkz9Zn6KTTNWbmWLw/0HD1dM2WnXCdniEc5XApwcHh6oQ4HHwkiPSpMvghkQD9YW1cZ7jXd+9Eo1/9ktZ7tiT3ZOyoFknoSMHHtFl/0rpGiHwFQtQrRyl8zXYzdJcqSKth5FvyVB331ueIFfVnNTLgeyxPSuPXiwfh4KPBKfX/tyhlusYncoysaBjMlyr42/fevUpa0+v+2Mi2xPnKX8UpVROtxGUZWaWStidNvCqDaObc5mjg5J/UG0pLWxwDTMbXeNbQl6fni4zpepS6FcWMU3OsXco0yYLDap8I3yMDVv0FaLcSwHURFBtEyow+V3/vqVhe2u88hZfxOgs+AKGykqbCTfycksJqNDG+mu1iN4FvDwnprhBhoNHqSfeiwrG7WGl+6kj5zO+pEEDXO2VQP9ArIrQjR3jzwc9sZTaw8L09vj82urJhh6nrJlPL0VbLdAqkd1qj/6u4lq41HXQtgBvl1v/4ovOuHz56Hq1F4Ag2FfUmp6cLB0CZ5h/Pu1L8+Rm2/cZQQoKqryC165CUIaP31rs1mdx47WblDU+Se+YCu2DwC8kyV1doxU64WNjc4UPKP4/NdfTbGLYpxN9OsrBXK6Am/UonY6uZNr7oggo+oQ2DdyGjSy5OLKBVfTkBI9kyR9fnV1KtXpRalrt3+jfE8YxWClR8Hc41Sbx44XePrO0NAFDXABMAv0uRtTqOUCZ0WQkaT19WfHR/rMkANwMYtfunSC1mFoYyBK63T+p2+N7ngRkh31QTHW1jeM6VjDaMHa6EnJnFpDFj8pxwYG5uApBpNjDIJZ8CEbiNI1uVFwZtaWn7w9OgG7QAl2ifVjA+8PPWwvgV0B0S+Bks2iTr6uy5CnYXZ9o10+NlBi9fh0Rb9N4eG3CB+b/I7ZlxC11y5RWCzomoZO6X3YJXYtQQY2esAOqgmo5p+S/EVl3P8qDSSTw4gNeArw2dJKJUVYNKlriFIxWbQ68+dlDZ8G67bJnfY7MXa9TKeBMRqABibRrg+aLUspwdX4y7kHiKii2p2Vh+30ifeV/u3q6jnub5b4Z1XAV2/IohkutRMHW/ZHjlxh7/CSxERUALrqHbtvIjlDKW9Y1QPqiZOmf11aqfHPmDHFM2ZffihlliyFEcDye83eKu6DnOg+e4clScka1z4tgfjIC4u5vjAwkJi+qQFHGL6vAbPYOsYpnG7H00f+o+V89k2Owb4JMjAkYTL4CZAeDymKEBySQAOK8ZBNZ283FOJCkqgjR5Qh5r6pwCEw7kIZcHPfCl35TK/trKqrDxO9PzFR3bdh1BOCPDbaqbFqzvvFIiBzbDffGONtS+OC1mp+cBAPdXYto8q45adkiv6yUhyBZn/GTtHmJcSnYVAi1FqjlyINev7dsWrP1vPrKUEG6xsb5zk/+CFvjkDUL8kktfLjMLwVpTHsQZaoBv+ZSwCuHJRUGausw6SYJCTYuUL9k4WUxUxCuCakrS1hKiyMYcrW5t6dqPZ0JcyeE2Swtkas8tJFbuzR7ChFfkL2W3N5JvTzM0iLXOWP1ZWylf7LvfKlFs3gqQ6MJyV4jxvVDEOsmeNKZpSK+hPn2/n0DcUGQCZFfHyZH6j399vfbIW+EOTx8GF7FpWVJgxTMGSLdYi+xig90hWRsI2AvujFzYBvpjI2pr1Rg7xtArh2urRWnrxFN4KtbKcRoLTCFy/zdxmTGvNKdD8vEdCdj4wiAvIdMTOC/CvnKukXfz9RnYU+oa8EGRgDolQa+JgfwvcgZP1crEphtohUqL3LKodIHl85HlfEZOvruvqysLYe1n/5xTafs3+lgkYEIgtTeRUmmU9/dQz7QYycWW2uc6UNcHayD1ITo+8EeXCEe5p/4gyrK6f2IrUhv9uHiSDnmVNUT+a+NEYb7kNB8hb/8wYE3ySjURo6W94a/L48LH4/PCCZUQDhW7qwTYPPOMtSU4cDwJ4iCXsBJ/IWjg0mVbaIfmZDP159KIz6n4wYClIC3rfYxh4MqWSRTqTAfMj5gpcYzFUpbbqWT6ZkE42DFHnAClsE0+/+TbV6UOTY7wiHBCNRdr08siPNgopx3yr0vy7oGhVZ5EZoboqks4qDUD2TWZBBOv1nJG0fLoVh5RGnet3yCPbWV5jS+X+YqF6GQ8ChEeSxsbExzpGI88quVWCsvmx6SEkNk8+zbHaAu/oQ+379v76AbDIiiNRgdj5JR++OEMbmmFTjssGhL7FfdnnyxwcnLVvh0AmK0el0jHN4hlXJaf5mo1E4Jd9fWWy2+rgP+uUNOYDBBENfWJOTIrcVzP+7fOrlVHcuQam0PNmDKEAvcKQIitFuU00pEzpS7/FTbuYUkImHQjtLB+9Xq4RgxXVJhTdAjPCoyEw2JjrhFX6vrgmuHrakbIcjS1AeRhXiwEBZaT3O4RdjCfrJNSrgyLMEGitOwi5NDsHcBaVazF2DLCHsOyE1IEmW+20e9wr/D98onfy1+T0bAAAAAElFTkSuQmCC"; - -const SpinnerDarkModeBase64 = - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAYAAACKuMJNAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADCjSURBVHgB7X0JkBzXed7/XvfM3rgWBAhAEEkAS1IExQsL8BApAiApyhRtR46hVKrsRK5KFDmlcspVTspxJSWqUpVIcSkpOYotx7mcRJaLjMNYIqkLF0kYIk6KoMBrcZACCUJYXIs9Z6b7/f6P97p7FiAJgDj26I8cTF/Tszvz7fef7z0DJQRPvnhwVpepzDON4VkIlZkGoTUy6SywUSugawUXGQduFhpnLVh0zhlLWwzaOQ3WIqRuACI6hukpRHsKDIw5SI9gHcc+de+Nh6EEfSTTDP9j08HWni43r2FhHjqYD+gfxtFnETF5DPOI9uSzIZbRM/rPydIWnadnJhw9gTHWMO0Sh0JAQ8f5tUJF2uf70UVGX23epfc61UgbB1tt6+H7Vl1zAKYZpjzhmGBL5lavSuqjPcSi+QZwsVECZL+7kMIKewwTho85BCVUuI4IJQRCOu/0HMOYcJ+INvm1fMLJ//wKvpG1fIbv7a/VSwwyFQEPEFMPp5i+8kBvz36Y4piShGOSXds5uizF6vKYlIx+y1bn5JSqllccVqmMUEHRmAOeEYiBVvoqVTcG8QhU6fgYs4lIRbxF2aAbK9nyl+r70HHnj2TmmGxvfp0do/ffT2Z8b23s9IFP33PzCZhimDKEe+aZvpbWubCMNpeTpHzE0Jfv/O8npo6I4Zx+6SD7JvzuQgYhJF2DYv+Q+BIZ2XegJpYVjo0iH/VkCxDSWH4N81EuFubKLZXD8r7yPoWfCbForotqqc/o8ADdeMfqVUt3wBTBpCfcppf6PoK1eCl5UcvJP2olN4x5Yvz37r9c8F8uf/XoFSycd54U/B85/sgvVjKywqGImFzi1TEnHOuVEZZZISQG5ULnTWfuw6mpFj7qffTnAecJJ38UqPcm6gYlJi7zeTMGJtmLMT77wG03vAOTGJOWcM/uevNjqUlvMiksRig68hZFUxxmpOMv0zkXFIRUixz8SK+3gRTB9zKRJ5vz3AkKpyTOieJVToJSbxatVfIS4VQwWShtrqr55234DyBXzlzdnAQforFNahdeS38Th1Nnn31g5ZLtMAkxqQgnZnMe3kaO0m0kDK3Mj5T+s4alSaRCzR6ZOFQTJ2a0YKoCMtLptieccZkfF6JUvgLPVDjw/psGo6J2xui18kpROznHZEfMSeMDjiLBgqkG9fBMTjaXqbG8lglKJ4W66E6Spv5gbe/122ASYVIQjonWeVV0a2LdbaQMLSZ8acF0oqYh1GdybDWJcOrER+qcB0c+i04LkSpq8GB98JCb1JDeUB+vSIxChIvOK6hGsRKpYlAja1ya6nEfCWeqiv7vA8J9nf/jQEm0OAwnnaVt/VMyNv+D8H4ivdkJNPH31/ZeNymIN+EJt3H3gVtJvlYRK1p4XzyiQDj+vDkDYVQJxH3zaQ1OwBpvrhyoytmCX6dulXz5xBnnZYTNacovhpDi0ESvN6kAeR4uRKkYEsDGm1FVOMhycv51LhBTEiQFc+nfWhXONJlSpi5CUySNLvf5nJJb5deYE43Eff+hu3pegAmMCUu4DVtfX0Qf7b1RXJnrv1xWIv12ovw6612poHLiuEMhccsUyUiW+1CFL/2M9AhKmkPvKfZLXTBQrmRmzjSpG8gb+z+Agt9ljBKSzb9LNGow6C/N1S38XPyPJ10evfqgJviFSjb//oXPTLhJxKNb/tXaO5a8BBMQE45wW17r72oMD32CvvUlCX2gyq3IK8q4CkAwqwwhCF9vVeUiPdicHgEfCeaEc7nygMlyZ6pwwaRmPlwhaOAfgdWO3UUhskMlrc3TIiYjEKdNcnXzZJN7yD9iKl1GNtnz74Nexawk+jQQEoVlshmfiGYKQ2agjc86b3Ou9ekH7/zIcZhAmFCEe3bPoY9Dkq5Mk0Yrkqkz4tP4zL/3q+RvPVW1Qvm8nY2YkF55TCFH5rJo1VNVAgpXMLPNCWD6Uk8lieuHKBowjcZApaUy1jAwcNqYAb7us7dfd+psP/cmqsMODw2aSrU6y8a21dbsbFM1s4n5s501s+ldF4b3Cf6bVY4JaQFy3874NAn7bRwpczxk+Df1XxWKW6fEyg5qaGMQxyklqR2RlEjX8xOYIJgQhNuy5bWupK26OkVcFJITfDw42voBoxTN5bBR5fOZjiaFs4WoLqghfeg2BBVRpEleIuogyeChNKr/3CTJ0UOjnQO/tea6MbhE+NGW1xbGbfECErsllEdZZDwJNT0yPpiQKMdyGlB/DzXBGMwputxk62/r1VE/L5Zdjj6c1s/of+xzadufTwS1u+KEe/6n+69PUryHPpsW0TPwGbGiX9X0IWv6QfyySE2rKaqfZ1ZIWSjEb6pDGu0DM/r2m0Nt+y4luc4Fz+95a3aSJEshwaVEo6X0G8wJZINxuTc2yWQ/kdUtmNPgq2L2u4dgJgPbWYNZYhmO095Tq++4smp3xQj3zDPPtFS7e+4g0/Jx3peUKyjRmHiczkg1a2uClKEk19Bm9UzxiSDzvHQ/8kQVx6sOEO+1mO6/f9WyQzCBsWFn31L6VVfS77DMYDQn5N18ricjjqRcfKhgvP8myefQVOCRBUXGqyj4oANhY5c99b3e3t4RuAK4IoRjE9pob/kMpumM7KD1gQCIa9P8l+6CqSj4c2ZcFOdCwpb/0qO3oVp9YfSd0f5HHumpwSTDhh2vryK1WkkWtEeqDi5rBZAAoqhuEihgnnIBm7sUrJi+POYDeHk9k/e4te7ra3pvOAaXGZedcM/tfHMBmYQH0aQtIbdlChGdZMHOlrLwZjWS8DMvRWV5uSgaSxvJnsYJeHEykuxs2Lr10Jyxav3TmLoeMqndctDYTNmaItPsjxIzD4NDXtStTB15X4NtGIkS/J/339PzIlxGXFbCkdm4w2J0u39nzsKHWHGcE6wqF3y5rA7JpjWKNNelCRI2oTXAxktjR81PpwrRxoOJl1Qay1LAR4g13cHPhWK5rUg4NZ/oiZWb4tDDF/r5OKAA9921K3u+C5cJl41wz+98485aam6OLHv6aUHBjObMfKrD/1A+lxb5Xf/DZmkSvgfUKHWwp9afvjRViXY2bN6x75foI7uLCNSdk0jyK1nAhRAiK6NplKxmoZUKn+njF4aqCZPur+Ey4LIQbv22A/dRWq2HfTHJrwm1Ut6V0pLspa7JtOY/oZagxCexmiawDnaMHHN7phPRili/7dVua6ur6S9wre+/y9QN8wg3sxhKLXU90GR+nQktzZq/s3+zduXS/w6XGJeUcHv37q0eGWl5gP7IrpY3M8Xuh5B0TbOe/6z0FAIIJhuZXSstR/wp2XerXbWN99544yCUEOJFtvLrRJ1bg+9WTK2IyPk2qLSpNxB9R4PP8wWfGN2hGXbga5cygr1khGOy/WKk+mn65bqlVMTRo6Q1nNVAS2qIlOmMROrzonserYa/UGOjehzj1ntvXfI6lDgD67f13R1Z8xn6UOcWolJorik31Wk12NByGif45M9fgloAIl37V3t7F14S0l0SwjHZ+ofbHk7BSWTFbhsJmWFHzdeTTEY6cFlxXUIA3xjpfzjyOaI3x46/uvmRRx6ZlubzXCFqB5VH6SO9GzUF3uT7aq7Op1F83TZErfKFZF0t8rqfz7CnvnoplO6SEG7Trv2PUga9O3R1OKm7p6CN//rXR0V2aNCJyO9B1pCohXeKZutJ3e1+6J6lL0OJc8aPt7/+oLXxo1RDbg+jzvJ0HHrXzuZJJfANAz6CRe0kJbcO31i7quffwUXGRSfcxp/s+wT9wMuKLUSh4A6Z0o3353wPmTev9FsPna4lT//qvaWvdiFYv+3tbmNqv0f0mWuL/Uucu8Msh1moSnCHDRa6ZRRkmbc8sGrJn8FFhIWLiI3bXr8VY1xCfy6OC3/8kBMJ8IA7dGnhja3FphcT2VK6gD6PvtH+N54syXbh4CL9sD35b4hKW3nfdxcbzFqrmgbqGE3S+dRJASQK967f3vcbcBFx0RTuuV0HbiE+3cL+Ao8zCN24xf59hpRHRek0n5bn3siXS+DFB+7u2Q0lLho27jjwK+TO/Gqmar48UWxA9WY0jGzLVKjQR/jk6hXLnoSLgIuicM9u37eYshe38HYKuYxFQc9TfYRheXIOtEilKujAxva5kmwXH2tXLvkuOcrf0T2LzWQzIUgoQhpUsxYxVkZnfo1HycFFwIcm3KZNezvJEN4t1AHISMR+Z6qjm1B2yIRyu1cwpSjn6XAEdYPxM/ffvrQPSlwSrLlj6foUom8Sg0Zt01eOoaMkN7fsy+W5vAxp2vjd53b3XQUfEh+KcOQbVNL2lgfpL6iiP1RKwSmgduNG4sa5zDmVMX2qaKnvurGmXmupfn/NquuOQIlLiodWXvtiYuDf07cxyqqWKVvzEEoZvOak3dM09RmSX96eov2DH/7wpQ74EPhQhNu0bf8tlci0B7PIiMAHC1wh4KizAFY6zWhzJ6Gr11urP/j0zYun3PwZExUP9S79Of2tf81aM1z02Tyy7UAKjmiztnXuBkhhXjyn/dfgQ+CCCffj519fArG5IfHkYpNJSdtgVlHdtlRMp1hUCKYUuFOfyNZWku0KgEnXINIR1zipm5XBpA4roWuhXZ3hZybQZLKc/6WN2/vuhwvEBRHupZeOdESt9mbpeeZaqHZ1ACZppmhMOiag2FUyr4F8fGWMuKUk25WDKF0j/U9+15gwD48HyvDIbAC5N6vI43v0+zXwmxfqz10Q4U4lQ3fST9guQz7450s90TzxQmCQpjJsD1MpwEfID/ob2THR272nAx66+/pX6Xv6M83H+aZ9LTH4yQYAwpx58kDjq0SSo+9IEvvbcAE4b8I9u+216yi9MS8kP5hc3OOGBdOa+ltHYkFz0tHxPWt6r3sNSkwIrF6x5HkqAT0pLUoGCsMMXfO8dYxs2oswqgxv2rhj/yNwnjgvwv2QTKmDCk+LxeGAqhhAZipFwTglIlWGFGXQC1UddECLOfDgiiV7oMSEwtpV1/8/qvBskcHbGR284vlGOsTmPkXU+ak4zfV3n9v97nmZ1vMiXFwfWU5OW/vZzmleDULzbtMWmnho5sqpM6neVMOsqPN/k9PWL5UInZ7AhAo3K5otxLI8Z562MqF1KXYm6fDn4TxwzoTbsPXQIoPptbztuFYqAQG6oHQgyoYOfQJYUiDk0zk09e5q2/peYxpQYkKCe99GR92/pXTJCGRz06KQzTVXvMWb00307MGVz+1+66Zzfa9zJpyp1G8Njj/vh2YQJl5T0ddXGSSgkJn66i/feuvVw1BiQuORT/b0Ryb6K6l7IehwRO4WNjoQR/0jlIqEjnMVx08CjiRtfP5c3+ecCLdh94FrqGLQro5/yuEnhMhTErysdhGGkNmEgMKYyoG1K28su3QnCe5bcd0PiEK7IG8kCdZLlM0GN06GMpmsLk4ac93Gnfs/cy7vcU6Ei1InkhmCgrAtuTXaZ/L5N8YsoLBmqFFp+xmUmFTogvY/ISaN+Ib0rMaKMsW2pkhCx7DxzcJWOrfNunMpe30g4VjdiD8doVLAPR4Z8XyUoEqn28GHqyeNvQ+XpnTSgf05h+5/8ZfYVPoqFPR1KGLewOnkdNpZmdv1gSr3gYRjdeOARN5Ty6QYTGsgGu8bE0nTJR9LXPrOw3feeBBKTEqsXdXzLCnWq1nS16ivpmNRwrRn3rfTeftCvfUznDp7v3u/L+E27H7lGooy22RHTKn3ziLpisfQ+4Yy2XxqAvlc29hlnT6gxMVHFLk/DvpmxzUrYRgLps4V7+szus5qbejR97vv+xLOYOVG3fKZNR+hinm1wZcjVYt4AKCaWVOJ3nj41ltLUzrJ8ck7evpJx56QTmwsDNn0GRMdRK3zRWi0GqaYMBdGuC0793+U8n9t0tbmkyCpLysI2VLltPpsSsg4qgw3+gf3QYkpgVpl8BntKuGxxKFVSUwsou8ukQulAVIHXBMnOjZs27f2ve75noRLAJfysw6G4TlCKamLPvUhjZRYyL9F4t9RPuathx8u1W2qgC0V6c3TOqjVhKBUJuqDUNNHnRasOJcdldbXvNc9z0q4H+/cP5PYNYOTay6VG2TPEqASopivlCYk9PmQkQfv6nkFSkwpjLWMPE3qdsaAaOmdQ50oR+aMxHyKW9q+edOOfTef7X5nJVw1jpboVsKj5tVX889YqCow+WxI+NZtSbYpCFE5Gz2FYYA+Yj4tbmhPl9VxFGHKV4pd7zrb/c5KuLRRW0Dq5QkmeoY+tyt+HFc9ErK5aUL7CV/khme2tPZDiSmJsXjwaWtwWCZqMlmoIC2a1uj0YEJIl9tdg27t2VIkZxDu2e3vLKbDcfPRhNdME3CezfdZCvFE+dAcu1STn5S48pCsA5qnMvkyWvZikjUV920QPAkmOiq14TNU7gzCJTC6GDErYaFXOowgDIhJuPuN+yzlwYo3I25/FUpMadRbhp+SCa+8mkFWOgfflwl+JiaZsl+GP5AqnhGtNhHuuzsPt9vIzIHCYGbp+MAoJHk9CZP8Bhb6S3Wb+mCVIzXbG/Zx/KwNIUmsyTLx81LEj483q02Ea3Ej3TwFg5XRV4VhfjL2L8qSu2RWHT9Y/VJjyvEJ0wRElr8ECJNrZg8IOTlTWJiOrSsv1zTerDYRropmvpAt0ZYjqZfyvohbCvn0WzxdakrOYzLKI4CgxLRAvdrJ9XHJswaCyRhp40d4FYZVu2yYITxQvEcT4RJw3ZLojbySMemIfCjpD5u3IUkymK+plJHpNAJ3/xC9NsoCib5kz8TSheiUSg7zadhkII5zS4tmNSMcz6BIl8QF902IJaKWBKL5pZZRy1kpVkpzOs1AIeM259vQc3I5nTtYJ6wuTAMmBa+O1sbwkvD6wujXeL7lEVbW1w6ypkqveEmKMt8RJUyiOKK6qRmeaEsjlrj0IBfqZQpWh3XYoK796nMk2YxM+fRsKEV9Ch7uDq/PCGdj7FIXLVGRs1qyKj5jJAVTeZCklmSbpiAl2yaBginOshSmc80Sc9nIQuLjmQpHxnKOrkkaZ127jKjpnTwBuckySkvCTVMYtDzv8hnRqj9rdBC1gTDohjZuCX6cEG7rzw7NsQhhltTQVifPyVmOMVrmtJaEm6aot3TIEpg6YXVIjeQpEj2n41mNH/XVloxI95EQbmBwSFb1C0MAGTLPm0WXDQfkW0aBdDhwz+LFo1BiWkKjVTiaV7o078b2j4cVSn01+HR+yGGKTsyqEK69rW22ptqkB4kzv066QPwEgtZ393Ic4Vf7Ow0lpjVSBz/LivfYpHSMJtXjfbo+V7iGg1ZLkWgi6Q4qWyVcuvL1ez9jg/XE4+ckTsqptqY7jN3jCVVM+Pp6atNxWQPG+oZeYZVxja5QSJCifRQpVXlQVuIDh9j/Qzu1MSyntJ/moJTFfl4tzk/Jn1GraR457WOyfpVWVbgtr73WJS3ikUyBpOMXONFLj4jrp1njZeQ74xAfuaunNKnTHPHw0FHUJVn95Dea+JV1g+WZiVdIm5DurX/5wHw7dCKpSKYtKd6NH1HIyPFUln6BjxSSuhuCEtMea9YsJx6YX4SVIFG7fg1kExxanaEafGcJHa+MuqW2s9rWmXDyIwoKBtlz5LtFosJ8cA5qZXRaQkAytp+HEWr7OS8RD9lgaR7h5WReQD/Mi49F8fx41CVxDDFqhphUzSQmkplpslm4sjfgw1FbW9n7VkJALDqqoxmcLyvoYoWh2gUAfoi0FCBMmqZXWzKSbVSyx8TbVIuRY5Mq+z5QDedkAq7GaKlwJQQO0l/ws2+69LzKFroxksoNA6hZ5yLsjKuupZUPRDy3uCcYsoUV1iXGxrEzCQWyfDqJTWRtSbgSisQMYwWagwMMISqAH/eQHeeVwf3QGG0IESFL8ugBxdTycyLn+NnE1QRKlGBE0RHQsakKnfuXt4rLoRvQCarZyHZYKhu0Sq5XXs/E88MDI8yRHaPkcNdHS4UrITBmlE2q8StLB3JpjODJhmEfJLXbFTOveLHJQDoFR6kxqVkidOXjluqqlAQ2UKLEWaClVPAJ4MLEciabBp3TxMYmpHA6IEbW9fDJX66bJia0j0QyyyX5fHRuzXVmDEqUIKxZtfxImEEOtWhvfH2VBzqY8YNQSefm87BmHqtgWMGCwjEBpfLgwcd0v3mxthIlwnBBC/kI/GzcKurofN8BzP/amFMeVFRAIRuGQDWB0FOX+hhXiMmTDpYoMQ7eT8vMqn/OqwyQtQKbmH01TfkyEuGhBBBOVtQ0lp5TmaEpQYtxqXAlmqCZ3pB3U2BgXeg3l1SJpOcwbgoVpIiV5msw+DJDFBHRkjIbUuJMNI3AxzDHUkHlhHwZ+4xYUIxz34yb4rKVgD1k7Az9ayApTWqJZmC+XkOe/sBslsxgVwPBLBo3KuoVHqAEjPxDZrb0x20UuU2bDrZCiRKETdsPXi0bJsz3qzN1aXjKJlS7RjIY+IXOYxnFWSqEt5MCI6PIhxHCxwbpXBVKlAjQoS+GF7yUUpbxDZkuL2pxjkQSwUJFB7bBROIHp0P4GTy55IZZakT3ky7XAiVKAOfbkgWag8N8xJYXOGvDmFTN0+m+eTeuUu7X+bXqmYKicES2OI4BCyyV43xNYtikDkCJaQ+0UWc2I6Ff8hLVYfMdIv66rLjP3SMRZJWDpkRvAbzPflzM090k9QhKlCC4NF2AMoAB8zqq730Dn+8t/ke6d8TWGzx3Qw5x9XypK4CPV1t4aaMIW7qgNKklBGQ7F4St/CnvHglE9M985AjlctuaaqNB0aI45qnxMdRTvUsHYw1TEq5EwNV+KgeTFxSyp6aR+EI6dEPWnhiuZXM8+AdfkDSo6EUkiytc1uJ1GWI5FzdsO5QowbBmgfEjUI2fTwSCadWiqs0dOTCRgT5bvyYeYjLxMVW1oHAFH67CRxrq11loeWzTphhKTHtQ0fMGCCtFg067ilgo4OtVXICQ9vPGWDJsH+npqcnhkPpo6HYwoYnsM/vUxHLx6+45c0qzOs2xftv+6/2MIlmbr8zra/K5RmQlpEJr3IP3fewNSQMn9TE/bysPXIilY0TIFRfNbCLnWe2qrVe1QYlpDRtBj1Aqq4OabI4RXTkk0DFUV1EW/dPZgONoWMxqI4zOkkalTOX0WJylS+KBxgwoMc2Bd4QBz1hYyFeK9n4gjQQU+QyERwA84ayLh5ls6AMDfdZpHdS/U+bJWZK4Bo51QYlpDefwBkR3RjMHGlOc3sGgT7BF1u7mZyHcqEtGXMS5N/bhlFxC1krhRoQGnWfS2WpcLQOH6Yvndr65gOTsemtCjFokntPZk/yy5ZnyIfbxWSHcL925LPPh8oi0XswHo0atsRzllMn9XQtnQYlpiQTSO3TL97lpF5KfajVbV7CJiJ/s7ckVjviXOpsM6otJKB06TZF40+pNbd6sGUM9xdKsTlOQnew1YQigjjn1kWmIEqyPJfwpA7vDazOXrq01GtahqBylqrXEer5GapokRkgoC4ags2lUKtx0BdoVxV1T6PpFv3R0OC6kTF22LH3eHRc1Tqp+6UwiomgV3WfXzkZ5fdUkxkTW2C1bXitVbpph4659KygUWDiuLs+JXytkC0uSe4jqoXk22w8bn7jhhpGKcUlQMTnY4LJWjH6cTd5Bouk6bHR1zoQS0wrGmV/OqgjedZNt1Kp9CFLRE492B9fetWxXeH1GOPbj0lo6AiH3xhUGLTDkTXH+WCwnKohjw92PP45lu9I0gkNYkVXoUVeaAchULuSAs+fU4YvF1zeNje6odB4LJBOi+TJXPK43riGsbHBuxV61vL+sOkwTbNzR9ytEuUWmMCQQiqO2oJl0ukQDPlu8RxPh3lq16BRzKfYUi31RPys4VPhcBYnlFE8w2+n8wOmrocS0AFnBX7ahYOVLVr6q4FMikI9IBe2MS+vpruI9mgj3OU6PmMZgA8J4hoYQjkmmDyZasepA17Tajscff7w0q1McP9r984XErV5Kmvm1UrU7xPrlxvka7grBMEWXjqTZ/al7bzxcvI8989ZdxwPBVMWUZDwhIe8H9WO5C/7dVdeuvApKTGnESf2LGhOE1G0YGshwEo3aYg8mcGbDfm/8fc4g3Im3Fp1q2LE0MQ15JRNMBgY2tKzFZpWzJVkwwaUwk84tVW7qYsPW1xfR00oqoIJOlZ8DIZ/FnIUvtCfR8aHVK5Z8MOE+9zkyu43oBCsbk43Nq1OHTluXCsEDm1gXVzBNEzvno71zocSUhLG2lwzlQt8VIskOyYFw8T6sBm3CKtAy5J67ezef7V72bAfbuuqnspSbJ5oqHGDN5+jEn2vUs9dUKnZOqXJTFNb8Nvh+joKkZWNQpZ/XFJMhFlzF/MVZb3W2g2uWLx+qJPUhsZ2SAdFAIdDLZWyscDYOK/Q8RjnjmYvu6IYSUwobt/f9U+LVQuEUhiGBRstZYf5oJh8vSx66ew2+sfbWJa+f7X72vd6oRu4cqxiPh2azyQ8+HgjG2+zb1et1ISJvt7bG3aXKTR2I72bsr6JfSpzHPMusIbwNsiCDzeb3DekSK71v336ve74n4T59z80nqH5KNXsNHoDMZ8X7bnX/cCJylcyvS9OGLVVu6sBW498gWi3ypNJMrm8jt4VhgEZL70ZMq3Pv3n/Hku++5z3f7w3HxtJjURS7ijefTDB+sJplebhCEMGIIpz7+N695Yw3kxysbvRl/4PiQrum0BeCGFbT0qOS9dUp9L/1fvd9X8Kd+Pl1x9LYuWAyE1+ZdQWCBbhYzS9vd9faFkCJyY1K9Pv8lKXWbOh/88GDr53qI6iefWftyp6/fr/bvi/hOEXixqJjsVe2yDlpUZJIgX25Cvt2IA+2seTOQUVMrG3/8c79ZSfJJMWmnQf/Dj09EGZFyoMBfWAY6FxI8so6IJB+64PubT/oghM/33nM2jgN+2I+iVhxXMWxsbpsc6xKPBMCchAhZjeqzvP1tRKTCBt+eoh8NvelkO0QI6nrt4Ffvz50h0Dx+6WU8LsfpG4A50C4z33uc2mjffRo0U9jRWNiBeh2VZ45iOCQIk0aduNLb5SmdZLB1se+hOAWoS4nk3fuGk37MmOwWd78TEnxH5/T/c/logc/9rHjxGWZ9IaVLSTkWNEY1WqIWHNSss9nGtj51PN7ZkOJSYH12/b9QyLaZyUGkOjT6vwgPkBg6Eh6LjIo8XRqB3N47crrPlDdGOds8mZCx7tRVHGsXsF8huChGER4704L/xTfxlF7986dOytQYkKDTWlkzZcglEKhMDm0V7ugeFbbLXX+N86PYPK1c32fcyZcb+/CEbKTQ0wmKMzzqya0Ck0m19XEp5M3sHUzGHUvKv25iYsXXuibYeq1/0PCMdMzzYQJGmRUlrQc+VH248wsHfj/a1fdsOFc3+u8SNBhlx6xSZpKdYEeWMjFsfIxGZ3MJlyFWo2UkHhYqVTR1lxlw7aDZQvTBMWotX9AhYJFftfPfIRhQDMW5k71uV9JhTDfDmMjPSffLeC8CNfbaxoz27r72VeL4tixzlU82XyhC0LFtVKtCvkaDWM4c2zitPMHW382B0pMKGzcue93iDm/7ge85HkOXdrZp0Cypkpfu9eUL33z//mBe254B84D523mbrll1skEkhFjGoarqOzIsa/GRIviCnGsiqxsUNPr2bTyMdmutsze8lp/ObRwgmDD9jd+i76p3ykeC6TzbeO6XpEcQFPMxtGXvuOBO5c9CeeJC/KrZsPouzbh3FwVGlTbaGnRAKF4DataIB23ArRCC13jsDZ0at6mg1guLnKFsXnHgYeMsf8K8zGkmbrl09yDjvfzpAtD/+jxDrS4fwkXgAsiXG9vb6MenzxaEXVDGVSTmdKKHhOytWgEW3VV79tRkJGSCh4+OH9vWW+9Yli/u+8mZ/APw2IdAM05tXCdtcXqqZa0ZCeCbz5w2/mZ0uyecIF4qLd3ACvuZNhns1mr5eeJY1hMl4zRf9WWFiVdp7UnR+HqknSXH+tf6LvJpvY79IXNNFmX7hmXBSUzPjGSjW4m7fvzB1acvykN+FCpivtuX3Y8hUi6MzU3p74aFIjH6paRzc+X7kYQa7bNHBtuKZXuMoKVzcZENoQZfsZKga/FW8CmMaZyiv9Bb2Ipkn1nLE2/CR8CH4pwJLHuzejY20mqRX3KhYjSsbrxbiCbYExVDrIHQBJbezSpztt66FA5mPoSY/22vruj1PwlsSxrqtDpKnXFcBn+1/ySJt+OrNWgi6u/+chdPafhQ8DARcDWrYfaTkNtEQmc+Gt8LBCNzapECK2tomyBbI4Uj4+z3R2l57bOxsl7b7xxEEpcdGzY2bfOOPN1NNmwePRrSqIfIs/9QOG48ctQ6nJYYRVUNF9cs2rpeviQuCjZ/3vuWUycGTvB23WqLITjVSFVq1DMjYwiKPOEbDCqlGSyVYl06el4Fme8ocRFxeYd+3/Xovk6mOZ2IoEpdO1my082QxiJ8EcXg2z6lhcR2159u3vsdCKksaZmhFhjYxRAtODY2JgnoKoaX5P6Z9fSSgQk6rW1QXw6Hb733o8OsLmGEheMF144PmMkOvEYfcXr/KrMxc8TsydWM6dLT2qKRHt5fUGBX/SNB1ct/QZcJFxUwjGe2913FUaVTiYYo1ogG+9zeoQdtqBsfGyssM25OrSVJBp96/iaNWvKdc8vAM9u37c4NeYJ4s5H5IBPo+lZE2ypP2VQFz0VIYD8Gp4SP/q/a1cu+RdwEXHRC+qfvKOn3zRGhG0h9xayvC2ebKxsGcFayJxyLq+1VR5yfTWOoOPauT986UgHlDgvbNj++j9ODf6IZGuxb5PUE74iarLiu8lXYSvMNm5MGPpnXr3YZNP3vQTgzpC/efHQ1Y1aWmX9CsSDtlbZblI2MqccWKjqjWRmttUp+dLBk6P9q28b5Il2oMR7gk3osD3+DWuih9EnPDDkOaR7Mlv+Fv14ZlmlGXU/qB94gu5tT/Hv3/UhI9Kz4ZK0DLH/tf72xUcaLVGd/biWgjl148yoJIdHRpRsQ4jRGP36I3ofIV/HrNar3nh3NkfCUOKs2LR9398btid2GhN9WufLCuUDoz6a9Yt05CFqaB5vysR5XDKy6c90CfEYKd1du96a3wlpJfhsgWh1qsGK0rVx6qSVzOowRpbnC6M0CqnbCLGOly1MXRudG6IPpgOiloFa/22l2gWwr5YY+CNizt2avIDMPZMgwJfd5eKs6mP8+WzC8ODj8ct/0pbiFy4V2fx7XHqs3/Z2N0a1Dla3VopE3fAIUubaJNUWxwSLxkZN2tpGRHMcYBjX6rCFiMavTdvYx3PYSdtD/n7VeMZI/97NozzeAqYheERchPgF2vznmHVE+tyZ55UnXJ7LzeMEJpvTSkNmSdmsPrGmd9nvwSXGZSEc44W+4zMGTp6cmQULPkAAUrJALo5Qw/WDpHjtpHFMOBgm4hEz22h7dJQnIybpjFvTejUa+xXuRJ4mEKKl6T+hqvoXiD4zM5OIPgr1K13p1TrGDxFh3HW6lYOTcP9tzcqlX4HLgMtGOMYLfX0zRkfaZnDOTQg3olwRX629EChwIpjIJao2zOk5h0yy0cgYknxRPL6uPe3AwyP9acto5+jQ0IvJVFU8JlqcwhfRkqpxaUqGGEATkfI0R54CyXJromgegXRGt+ij/o8P3tnzH+Ay4bISjvH441vbZi2cM7uzs8MMOQ0Y2tvbM3Ub8YoXlI3B6sbPbWJeO2hbK2DtHR1CxNPkccyt1tPjx4eST33qltGpkjQWogF8kejyRfqlZ0Bwy4Kv5ns4vK75sS4YzGsoS3nIFZiNMbUw4FL8R0S2n8BlxGUnHIMH8W/e8cpVjTiSKFmVbUQCBN7X6JQIRiQc8o4bk42329qVcEzC9o5OBCLbaRiAjrQLk05vkqsdyTzory9fvrwOkwyeZB+nz+j3SZo+EXw059MZmeOVO/p5ZDDeZMq8gYF0QRIdzzpzqIG47uFVyw7BZcYVGUnFa0I8+8wTR83xyjCTjQMFkJhUg4TIjhoxpxnZOpA329rZtOqjC7pgZHjICNk6u9ijgeGhQf0DOvpOfHi0tW3T3qOdBw8ebN00CVY+3LztwH0btu//auTwZWLIU3ToXq2t+6F5UmxyOtBAFU4oh2Fmo3CjMOhF1S70sYUX8aSo/7U9nfWpK0E2+fHgCoPza4Mdta5qLcrIX22hRAhv0D+dnUo8PhbOB3VjwiVkU4vq1kXnuCu0aybtHwdIZqXYoGu6Zs92R4eH00MDA+7dp55KH3vssStqdp988eCsWc59hhKR9xFxHiVGzMhTFCb3ytTXwoI6aZ1TEfrDpevaaGZNbzPOvNJrT8cW/vX9K3oehyuIK044xuMkajP2vj0zHmpUQBy3jiwqDdekhQiWfbdByRQNwli94WbOnAkJ+3mnTkFX1wwhXCPR62cQ4eAY3bVrFhHsF1BrXKXE7K65/h0jDtbdlK7TSO2SEZDJNRPxGkzhFjDpfcbZ++iT/yiA1ygwwfLpz1AkXlaa8tsSCLhQgspTHVAsL2QzU4bsx09I4v/Z/VdI1YqYEIQLYLWrVaOOamXENvluoP5cmnbIB5lQoBBHQ4ZVjomY+KAiPDOYcDNmzcLjx44Dz5DYaKRYn9ONtYbDhcDzoaT4NhyCq2oL5DXz5o24vXsBliwZxRUrVujULc3pg7zOOA7ff/Hgtfzc0oBrIkPEMkD6itcaJpXDW5Gfi/5Vfp/ApizazIpLeWRZSGmEaEHndc68t/H3y9Ik5G8AfH3tymX/BSYIJhThGDxla+dHb+/orPIQHEXqydblu+UGTw8Cm1LeZv+tSDTeHq9ujdlzcA4dO0IK100Kdxh0rYq59flYW5DgaJLI9UP1OoIn3eDgCoTVAP30xbECfoWyVF/+sq6wzZKxacd+59MO3l+CoEZat9Qfx1vJYBbzCoB3w5yKWlAyE6LPnEBB7cJ8uhnBsNjykUev4b0sfD9yZEIngKoVMeGmX+BcGrcxd7csG6gTc1jpRqksEUXDhomWnkRUss3UYGEgDxaKxBMQ2Y7z89F+OHHiOF0zPzvFZAvbbW/Hhsm2HJhsN8nxN7p2Gdi8Obv+ppueCM2KmdIF0cnER3H2P+Km7kcjPM1ZpBM1F1QQAMarKRbzbuATHPkxEy6Bn9HTZ9f2Lvv8RCMbY8JGb8uXG05pHN+06WBrHNu22igHFYOcjaL/Z8KJkydxgMjG/psEDZ5sXaRkJ8JN5gJ0H9OJ2OeQOT1y5Bdw/Gr6ThoL6VqfI36TCP2RBDv7qgauWea/5BX03y5YsXq17D/xBJhXXnklKJRekqUlTEHcGCJ6oU07S/2b/GyorftjITEG4CeI8a/P4oZs2vDCe/gQ1Erk6gfznaIX/+Galcv+FCYwJpxJfS/09fW1vD0Ut6X1sSiYUyYZjwhJvFnlecEST7gZ5Ogx4RppMKcMNansv/Feraam9CNEuL4+gGuuqVPp7CYyp+Gr3Qz9TDpi3Lp165p8uk0796cmDyG19cLPiwDZOAE4i/MvZjk3xQDFICA3qRpqevZCQd3y4EGfYIA2vpUa86cP9S4dgAmOSUO4gGeIePMGbOtoNbbjgwVOhZw4rr7bcVK2GeS7sTmVc12zHXtucz3ZQsDA6iYXFAgHpG6Dg4MZuVavXu3Yh3vssdw537hjH3ryaCZCo0Mo+FbNvhho02MwyXhGPdPPza29axq+YghUhH0YwgTQ7twBuuGfTBaiBUw6wgUw8Waks6qN0aHobOrGvpsQjtz+etKNQd34teMj1KBw8+Ytc4FsXV1dhgOH1avVq4dxUWsWNISqkiw1JVwR+2jymgD40VJ+r9DV0ZTa8AWFPPb0JryZePQmWwym31l75/V/AZMQk5ZwARzVti65twXHTkfz48gEwjU82RhFwtXnk8J5V7oYoV7DESrcBKOju5AX+Lyeo1RCfz9/8WpSC2kR3Lh9X0HBClGqN4dNkSrvW39NYe7GzGSGqFOp6fILfDkL2D+TpYSeXtO7dAtMYkx6whXBM20ehoWVOUQ+Jlzl5AnTRQlfjlAHyaQCpUNCKqTl3dgI4V5NsKeHVW8Z7t37iqZEVhDZNvMdN7M5DSpEqZGvmC9/+ctCvI2kcMHU6burOSwU2LNZYhwUFK6YHtFCKeYTFuG4e5nn6dS3Kbx5ejKZzffDlCJcAJWt7KOPPhq9PNgdLZxzOrqa0iEcocLV5MvNmeNY4ZhsIUJl/43BJjUPGBgUNPRrpLpuXWZShU4UNDiTsctTRE2iJv1zpz4nnPFjpKAwYWgxaYt4inb2WDDfTiw8NVVIVsSUJNx4sNldvnx5VK1WTX9/qxX/bcECJdyoT/peE5K+HKVulmOsbk9QhKopkS9L0KBBpJGgISdc8MvCO2pMoCoGWl6C5gRwuJAezxFz98TWfu/k6YGXP7vm9lMwhTEtCDcefr5hs2vXLsv+2uKjMy0TbglFqLsoaLi+YFJV4ZrTIkwkDhp8N23u4ENWbspUK1c4PudeMhb20N5LDt2e05XKns/eft2UJth4TPi2nUuBQqG+uOCJYR+NlewLK4hi/WDWrVvtS1rrsPBaDNdnyV/Et6zhoZ3I5DlFF73JiVgL+Cafc1H00to7lrwFJeBvAaCHjhUm02WnAAAAAElFTkSuQmCC"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export function Spinner({ className }: { className?: string }) { - return ( - <> - Loading - Loading - - ); -} diff --git a/account-kit/react/src/icons/threeStars.tsx b/account-kit/react/src/icons/threeStars.tsx deleted file mode 100644 index 7d855ea0b6..0000000000 --- a/account-kit/react/src/icons/threeStars.tsx +++ /dev/null @@ -1,30 +0,0 @@ -export function ThreeStarsIcon({ className }: { className?: string }) { - return ( - - - - - - - - - - ); -} diff --git a/account-kit/react/src/icons/timeout.tsx b/account-kit/react/src/icons/timeout.tsx deleted file mode 100644 index 33463cc728..0000000000 --- a/account-kit/react/src/icons/timeout.tsx +++ /dev/null @@ -1,181 +0,0 @@ -import { type SVGProps } from "react"; -import { useIllustrationStyle } from "../hooks/internal/useIllustrationStyle.js"; - -export const Timeout = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const { illustrationStyle } = useIllustrationStyle(); - - return ( - <> - {illustrationStyle === "outline" && ( - - )} - {illustrationStyle === "filled" && ( - - )} - {illustrationStyle === "linear" && ( - - )} - {illustrationStyle === "flat" && ( - - )} - - ); -}; -const TimedOutIconOutline = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); - -const TimedOutIconFilled = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); -const TimedOutIconLinear = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - -); - -const TimedOutIconFlat = ({ - className, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); diff --git a/account-kit/react/src/icons/wallet.tsx b/account-kit/react/src/icons/wallet.tsx deleted file mode 100644 index fbf1c84c80..0000000000 --- a/account-kit/react/src/icons/wallet.tsx +++ /dev/null @@ -1,20 +0,0 @@ -const SvgComponent = ({ - fill = "currentColor", - ...props -}: React.JSX.IntrinsicAttributes & React.SVGProps) => ( - - - -); -export { SvgComponent as WalletIcon }; diff --git a/account-kit/react/src/icons/walletConnect.tsx b/account-kit/react/src/icons/walletConnect.tsx deleted file mode 100644 index 9e155e67a5..0000000000 --- a/account-kit/react/src/icons/walletConnect.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import * as React from "react"; - -const SvgComponent = ({ - className, - ...props -}: React.JSX.IntrinsicAttributes & React.SVGProps) => ( -
- - - - -
-); -export { SvgComponent as WalletConnectIcon }; diff --git a/account-kit/react/src/icons/walletConnectIcon.tsx b/account-kit/react/src/icons/walletConnectIcon.tsx deleted file mode 100644 index d99a8b6b72..0000000000 --- a/account-kit/react/src/icons/walletConnectIcon.tsx +++ /dev/null @@ -1,22 +0,0 @@ -export const WalletConnectIcon = ({ - className, - ...props -}: React.JSX.IntrinsicAttributes & React.SVGProps) => { - return ( -
- - - -
- ); -}; diff --git a/account-kit/react/src/icons/warning.tsx b/account-kit/react/src/icons/warning.tsx deleted file mode 100644 index 65c5f8e2a4..0000000000 --- a/account-kit/react/src/icons/warning.tsx +++ /dev/null @@ -1,18 +0,0 @@ -export const Warning = () => { - return ( - - - - ); -}; diff --git a/account-kit/react/src/index.ts b/account-kit/react/src/index.ts deleted file mode 100644 index e79c676509..0000000000 --- a/account-kit/react/src/index.ts +++ /dev/null @@ -1,121 +0,0 @@ -export { cookieStorage, type CreateConfigProps } from "@account-kit/core"; -export type * from "./AlchemyAccountProvider.js"; -export { AlchemyAccountProvider } from "./AlchemyAccountProvider.js"; -export type * from "./AlchemyAccountContext.js"; -export { AlchemyAccountContext } from "./AlchemyAccountContext.js"; -export { - createConfig, - type AlchemyAccountsConfigWithUI, -} from "./createConfig.js"; -export { NoAlchemyAccountContextError } from "./errors.js"; - -// Hooks -export { useAlchemyAccountContext } from "./hooks/useAlchemyAccountContext.js"; -export type * from "./hooks/useAccount.js"; -export { useAccount } from "./hooks/useAccount.js"; -export type * from "./hooks/useAddOauthProvider.js"; -export { useAddOauthProvider } from "./hooks/useAddOauthProvider.js"; -export type * from "./hooks/useAddPasskey.js"; -export { useAddPasskey } from "./hooks/useAddPasskey.js"; -export type * from "./hooks/useAuthenticate.js"; -export { useAuthenticate } from "./hooks/useAuthenticate.js"; -export type * from "./hooks/useAuthError.js"; -export { useAuthError } from "./hooks/useAuthError.js"; -export type * from "./hooks/useBundlerClient.js"; -export { useBundlerClient } from "./hooks/useBundlerClient.js"; -export type * from "./hooks/useChain.js"; -export { useChain } from "./hooks/useChain.js"; -export type * from "./hooks/useClientActions.js"; -export { useClientActions } from "./hooks/useClientActions.js"; -export type * from "./hooks/useConnect.js"; -export { useConnect } from "./hooks/useConnect.js"; -export type * from "./hooks/useConnection.js"; -export { useConnection } from "./hooks/useConnection.js"; -export type * from "./hooks/useDropAndReplaceUserOperation.js"; -export { useDropAndReplaceUserOperation } from "./hooks/useDropAndReplaceUserOperation.js"; -export type * from "./hooks/useExportAccount.js"; -export { useExportAccount } from "./hooks/useExportAccount.js"; -export type * from "./hooks/useListAuthMethods.js"; -export { useListAuthMethods } from "./hooks/useListAuthMethods.js"; -export type * from "./hooks/useLogout.js"; -export { useLogout } from "./hooks/useLogout.js"; -export type * from "./hooks/useMFA.js"; -export { useMFA } from "./hooks/useMFA.js"; -export type * from "./hooks/useRemoveEmail.js"; -export { useRemoveEmail } from "./hooks/useRemoveEmail.js"; -export type * from "./hooks/useRemoveOauthProvider.js"; -export { useRemoveOauthProvider } from "./hooks/useRemoveOauthProvider.js"; -export type * from "./hooks/useRemovePasskey.js"; -export { useRemovePasskey } from "./hooks/useRemovePasskey.js"; -export type * from "./hooks/useSendUserOperation.js"; -export { useSendUserOperation } from "./hooks/useSendUserOperation.js"; -export type * from "./hooks/useSendVerificationCode.js"; -export { useSendVerificationCode } from "./hooks/useSendVerificationCode.js"; -export type * from "./hooks/useSetEmail.js"; -export { useSetEmail } from "./hooks/useSetEmail.js"; -export type * from "./hooks/useSigner.js"; -export { useSigner } from "./hooks/useSigner.js"; -export type * from "./hooks/useSignerStatus.js"; -export { useSignerStatus } from "./hooks/useSignerStatus.js"; -export type * from "./hooks/useSignMessage.js"; -export { useSignMessage } from "./hooks/useSignMessage.js"; -export type * from "./hooks/useSignTypedData.js"; -export { useSignTypedData } from "./hooks/useSignTypedData.js"; -export type * from "./hooks/useSmartAccountClient.js"; -export { useSmartAccountClient } from "./hooks/useSmartAccountClient.js"; -export type * from "./hooks/useUiConfig.js"; -export { DEFAULT_UI_CONFIG, useUiConfig } from "./hooks/useUiConfig.js"; -export type * from "./hooks/useUser.js"; -export { useUser } from "./hooks/useUser.js"; -export type * from "./hooks/useWaitForUserOperationTransaction.js"; -export { useWaitForUserOperationTransaction } from "./hooks/useWaitForUserOperationTransaction.js"; -export { useCallsStatus } from "./hooks/useCallsStatus.js"; -export type * from "./hooks/useCallsStatus.js"; -export { useGrantPermissions } from "./hooks/useGrantPermissions.js"; -export type * from "./hooks/useGrantPermissions.js"; -export { usePrepareCalls } from "./hooks/usePrepareCalls.js"; -export type * from "./hooks/usePrepareCalls.js"; -export { usePrepareSwap } from "./hooks/usePrepareSwap.js"; -export type * from "./hooks/usePrepareSwap.js"; -export { useSendCalls } from "./hooks/useSendCalls.js"; -export type * from "./hooks/useSendCalls.js"; -export { useSendPreparedCalls } from "./hooks/useSendPreparedCalls.js"; -export type * from "./hooks/useSendPreparedCalls.js"; -export { useSignAndSendPreparedCalls } from "./hooks/useSignAndSendPreparedCalls.js"; -export type * from "./hooks/useSignAndSendPreparedCalls.js"; -export { useSmartWalletClient } from "./hooks/useSmartWalletClient.js"; -export type * from "./hooks/useSmartWalletClient.js"; -export { useWaitForCallsStatus } from "./hooks/useWaitForCallsStatus.js"; -export type * from "./hooks/useWaitForCallsStatus.js"; -export { type AlchemyAccountsUIConfig } from "./types.js"; -export { Dialog } from "./components/dialog/dialog.js"; - -// These are the actual components that should be exported later -export { AuthCard } from "./components/auth/card/index.js"; -export type * from "./components/auth/types.js"; -export { useAuthModal } from "./hooks/useAuthModal.js"; -export { useAuthContext } from "./components/auth/context.js"; -export { Hydrate } from "./hydrate.js"; -export { - useSolanaTransaction, - type SolanaTransaction, -} from "./hooks/useSolanaTransaction.js"; -export { - useSolanaConnection, - type SolanaConnection, -} from "./hooks/useSolanaConnection.js"; -export { - useConnectedUser, - type ConnectedUser, - type UseConnectedUserResult, -} from "./hooks/useConnectedUser.js"; - -export { useSolanaSignMessage } from "./hooks/useSolanaSignMessage.js"; - -export { useSolanaWallet } from "./hooks/useSolanaWallet.js"; - -export { - configForExternalWallets, - type ChainType, - type ConfigForExternalWalletsParams, -} from "./configForExternalWallets.js"; diff --git a/account-kit/react/src/metrics.ts b/account-kit/react/src/metrics.ts deleted file mode 100644 index 7be083345e..0000000000 --- a/account-kit/react/src/metrics.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { createLogger } from "@account-kit/logging"; -import type { AlchemyAccountsUIConfig } from "./types.js"; -import { VERSION } from "./version.js"; - -export type ReactEventsSchema = readonly [ - { - EventName: "config_created"; - EventData: AlchemyAccountsUIConfig | { noUi: true }; - }, - { - EventName: "add_passkey_on_signup_success"; - EventData: undefined; - }, - { - EventName: "add_passkey_on_signup_skip"; - EventData: undefined; - }, - { - EventName: "eoa_connected"; - EventData: undefined; - }, -]; - -export const ReactLogger = createLogger({ - package: "@account-kit/react", - version: VERSION, -}); diff --git a/account-kit/react/src/solanaNetwork.ts b/account-kit/react/src/solanaNetwork.ts deleted file mode 100644 index ff2c380f9d..0000000000 --- a/account-kit/react/src/solanaNetwork.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { - Connection, - LAMPORTS_PER_SOL, - PublicKey, - sendAndConfirmRawTransaction, - Transaction, - type TransactionConfirmationStrategy, - VersionedTransaction, -} from "@solana/web3.js"; -import bs58 from "bs58"; - -export { Connection }; - -export interface ConfirmationOptions { - /** - * Whether to use polling instead of WebSocket subscriptions for transaction confirmation. - * Useful for environments where WebSocket connections are unreliable (e.g., React Native). - * - * @default false - */ - enablePolling?: boolean; - pollingInterval?: number; - maxPollingAttempts?: number; - commitment?: "processed" | "confirmed" | "finalized"; -} - -export async function balance( - connection: Connection, - address: string, -): Promise { - const publicKey = new PublicKey(address); - - return await connection.getBalance(publicKey); -} - -/** - * NOTE: this doesn't work because the devnet address giving solana doesn't have the funds to - * airdrop 1 SOL. (at the time of writing) - * - * @param {Connection} connection The Solana connection instance - * @param {string} solanaAddress The Solana address to receive the airdrop - * @returns {Promise} The transaction confirmation result - */ -export async function dropTokens( - connection: Connection, - solanaAddress: string, -) { - const publicKey = new PublicKey(solanaAddress); - - console.log(`Dropping 1 SOL into ${solanaAddress}...`); - - const airdropSignature = await connection.requestAirdrop( - publicKey, - LAMPORTS_PER_SOL, - ); - const confirmationStrategy = await getConfirmationStrategy( - connection, - airdropSignature, - ); - - return await connection.confirmTransaction(confirmationStrategy); -} - -export async function broadcast( - connection: Connection, - signedTransaction: Transaction | VersionedTransaction, - options: ConfirmationOptions = {}, -) { - const { - enablePolling = false, - pollingInterval = 1000, - maxPollingAttempts = 30, - commitment = "confirmed", - } = options; - - const signature = - "version" in signedTransaction - ? signedTransaction.signatures[0]! - : signedTransaction.signature!; - - if (enablePolling) { - return await broadcastWithPolling( - connection, - signedTransaction, - pollingInterval, - maxPollingAttempts, - commitment, - ); - } else { - const confirmationStrategy = await getConfirmationStrategy( - connection, - bs58.encode(signature), - ); - const transactionHash = await sendAndConfirmRawTransaction( - connection, - Buffer.from(signedTransaction.serialize()), - confirmationStrategy, - { commitment }, - ); - - return transactionHash; - } -} - -async function broadcastWithPolling( - connection: Connection, - signedTransaction: Transaction | VersionedTransaction, - pollingInterval: number, - maxPollingAttempts: number, - commitment: "processed" | "confirmed" | "finalized", -): Promise { - const txSignature = - "version" in signedTransaction - ? await connection.sendTransaction(signedTransaction) - : await connection.sendRawTransaction(signedTransaction.serialize()); - - for (let attempt = 0; attempt < maxPollingAttempts; attempt++) { - try { - const status = await connection.getSignatureStatus(txSignature); - - if (status.value?.confirmationStatus) { - const confirmationStatus = status.value.confirmationStatus; - - const isConfirmed = - commitment === "processed" || - (commitment === "confirmed" && - (confirmationStatus === "confirmed" || - confirmationStatus === "finalized")) || - (commitment === "finalized" && confirmationStatus === "finalized"); - - if (isConfirmed) { - if (status.value.err) { - throw new Error( - `Transaction failed: ${JSON.stringify(status.value.err)}`, - ); - } - return txSignature; - } - } - - await new Promise((resolve) => setTimeout(resolve, pollingInterval)); - } catch (pollError) { - console.log(`Polling attempt ${attempt + 1} failed: `, pollError); - await new Promise((resolve) => setTimeout(resolve, pollingInterval)); - } - } - - throw new Error( - `Transaction confirmation timed out after ${maxPollingAttempts} attempts. ` + - `Transaction may still be processed. Signature: ${txSignature}`, - ); -} - -export async function recentBlockhash(connection: Connection): Promise { - const blockhash = await connection.getLatestBlockhash(); - return blockhash.blockhash; -} - -export async function getConfirmationStrategy( - connection: Connection, - signature: string, -): Promise { - const latestBlockHash = await connection.getLatestBlockhash(); - - return { - blockhash: latestBlockHash.blockhash, - lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, - signature, - }; -} diff --git a/account-kit/react/src/strings.ts b/account-kit/react/src/strings.ts deleted file mode 100644 index b37469d59d..0000000000 --- a/account-kit/react/src/strings.ts +++ /dev/null @@ -1,112 +0,0 @@ -const STRINGS = { - "en-US": { - login: { - tosPrefix: "By signing in, you agree to the", - tosLink: "Terms of Service", - email: { - placeholder: "Email", - button: "Continue", - }, - passkey: { - button: "I have a passkey", - }, - or: "or", - }, - addPasskey: { - title: "Add a passkey", - continue: "Continue", - skip: "Skip", - simplerLoginTitle: "Simpler login", - simplerLoginDescription: - "Create a passkey to enable quick and easy login with Face ID or Touch ID.", - enhancedSecurityTitle: "Enhanced security", - enhancedSecurityDescription: - "Prevent phishing and theft by registering a passkey with your device.", - }, - loadingEmail: { - title: "Check your email", - verificationSent: "We sent a verification link to", - emailNotReceived: "Didn't receive the email?", - resend: "Resend", - resent: "Done!", - }, - loadingOtp: { - title: "Enter verification code", - body: "We sent a verification code to", - notReceived: "Didn't receive code?", - resend: "Resend", - verifying: "Verifying...", - verified: "Verified!", - }, - completingEmail: { - body: "Completing login. Please wait a few seconds for this to screen to update.", - }, - completingOtp: { - title: "Verifying...", - body: "It may take a moment to complete authentication.", - }, - loadingPasskey: { - title: "Continue with passkey", - body: "Follow the prompt to verify your passkey.", - supportText: "Having trouble?", - supportLink: "Contact support", - }, - protectedBy: { - title: "protected by", - }, - error: { - general: { - title: "Permission denied", - body: "The request is currently not allowed by the agent or the platform. Try again later.", - }, - connection: { - passkeyTitle: "Connection failed", - passkeyBody: - "Passkey request timed out or canceled by the agent. You may have to use another method to register a passkey for your account.", - oauthTitle: "Couldn't connect to ", - oauthBody: "The connection failed or canceled", - otpTitle: "Connection failed", - otpBody: "The code could not be verified", - walletTitle: "Couldn't connect to ", - walletBody: "The wallet’s connection failed or canceled", - timedOutTitle: "Connection timed out", - timedOutBody: "It looks like you need more time.", - }, - cta: { - tryAgain: "Try again", - useAnotherMethod: "Use another method", - skip: "Skip", - }, - customErrorMessages: { - eoa: { - walletConnect: { - chainIdNotFound: { - heading: "The connected wallet does not support this network", - body: "The wallet connection failed.", - tryAgainCTA: "Try again with a different wallet", - }, - walletConnectParamsNotFound: { - heading: "Couldn't connect to WalletConnect", - body: "The WalletConnect configuration is missing or incorrect.", - tryAgainCTA: "Try again", - }, - }, - default: { - heading: "Couldn't connect to ", - body: "The wallet's connection failed or was canceled.", - tryAgainCTA: "Try again", - }, - }, - }, - otp: { - invalid: "The code you entered is incorrect", - }, - }, - oauthContactSupport: { - title: "Need help?", - body: "Contact support", - }, - }, -}; - -export const ls = STRINGS["en-US"]; diff --git a/account-kit/react/src/styles/index.css b/account-kit/react/src/styles/index.css deleted file mode 100644 index b5c61c9567..0000000000 --- a/account-kit/react/src/styles/index.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/account-kit/react/src/tailwind/components/border-vars.ts b/account-kit/react/src/tailwind/components/border-vars.ts deleted file mode 100644 index 4aaabba50d..0000000000 --- a/account-kit/react/src/tailwind/components/border-vars.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { AccountKitTheme, ComponentDef } from "../types"; -import { getBorderRadiusBaseVariableName } from "../utils.js"; - -export function getBorderRadiusValue( - borderRadius: AccountKitTheme["borderRadius"], -): string { - switch (borderRadius) { - case "lg": - return "24px"; - case "md": - return "16px"; - case "xs": - return "4px"; - case "none": - return "0px"; - case "sm": - default: - return "8px"; - } -} - -export function borderRadiusVariables(theme: AccountKitTheme): ComponentDef { - return { - ":root": { - [getBorderRadiusBaseVariableName()]: getBorderRadiusValue( - theme.borderRadius, - ), - }, - }; -} diff --git a/account-kit/react/src/tailwind/components/buttons.ts b/account-kit/react/src/tailwind/components/buttons.ts deleted file mode 100644 index 2959fd56f1..0000000000 --- a/account-kit/react/src/tailwind/components/buttons.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { ComponentDef } from "../types"; - -export const buttonComponents: ComponentDef = { - ".akui-btn-group": { - "@apply flex flex-row gap-3 flex-wrap": {}, - " > .akui-btn:first-child": { - "@apply grow shrink-0 min-w-full": {}, - }, - " > .akui-btn:not(:first-child)": { - "@apply flex-1": {}, - }, - "&:has(> :nth-child(4)) > .akui-btn:not(:first-child) > .akui-btn-content": - { - display: "none", - }, - }, - ".akui-btn": { - "@apply max-h-[40px]": {}, - "@apply p-3 inline-flex h-10 font-semibold text-base sm:text-sm": {}, - "@apply gap-2": {}, - "@apply items-center justify-center": {}, - "@apply shrink-0": {}, - "@apply cursor-pointer": {}, - "@apply transition-shadow": {}, - "@apply radius": {}, - "&:hover": { - // this is simpler than using the hover: with apply directive - boxShadow: "2.8px 2.8px 8.8px 0px rgba(22, 22, 22, 0.14)", - }, - "@apply disabled:cursor-not-allowed disabled:opacity-25 disabled:shadow-none": - {}, - "@apply active:shadow-none": {}, - }, - ".akui-btn-primary": { - "@apply bg-btn-primary text-fg-btn-primary": {}, - }, - ".akui-btn-secondary": { - "@apply bg-btn-secondary text-fg-primary": {}, - }, - ".akui-btn-auth": { - "@apply bg-btn-auth text-fg-primary": {}, - "@apply static-border": {}, - }, - ".akui-btn-link": { - // clear out the default button styles - "@apply appearance-none active:appearance-none hover:appearance-none": {}, - "@apply p-0 h-[unset]": {}, - "@apply cursor-pointer": {}, - "@apply text-fg-accent-brand": {}, - "@apply disabled:cursor-not-allowed disabled:opacity-25 disabled:shadow-none": - {}, - "&:hover": { - // this is simpler than using the hover: with apply directive - boxShadow: "unset", - }, - "@apply active:opacity-25": {}, - }, -}; diff --git a/account-kit/react/src/tailwind/components/colorsvars.ts b/account-kit/react/src/tailwind/components/colorsvars.ts deleted file mode 100644 index 1e2d934c70..0000000000 --- a/account-kit/react/src/tailwind/components/colorsvars.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { - AccountKitTheme, - AccountKitThemeColor, - ComponentDef, -} from "../types"; -import { getColorVariableName } from "../utils.js"; - -/** - * Converts the color configs in the account kit theme to CSS variables. - * - * @param {AccountKitTheme} theme the account kit theme - * @returns {ComponentDef} a CSS rules object which adds the color variables to the root element - */ -export const colorVariables = (theme: AccountKitTheme): ComponentDef => { - // This assumes that the colors object is a flat object of type { [name: string]: ColorVariantRecord } - const { colors } = theme; - const rules = Object.entries(colors).reduce( - (accum, [name_, variant]) => { - const name = name_ as AccountKitThemeColor; - accum[ - `@apply [${getColorVariableName(name)}:${variant.light.replaceAll( - " ", - "_", - )}] dark:[${getColorVariableName(name)}:${variant.dark.replaceAll( - " ", - "_", - )}]` - ] = {}; - - return accum; - }, - {} as Record, - ); - - return { - ":root": { - ...rules, - }, - }; -}; diff --git a/account-kit/react/src/tailwind/components/form-controls.ts b/account-kit/react/src/tailwind/components/form-controls.ts deleted file mode 100644 index b75a5a879d..0000000000 --- a/account-kit/react/src/tailwind/components/form-controls.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ComponentDef } from "../types.js"; - -export const formControlComponents: ComponentDef = { - ".akui-form-controls": { - "@apply flex flex-col gap-2": {}, - "@apply text-fg-secondary": {}, - }, - ".akui-form-label": { - "@apply text-sm font-medium": {}, - }, - ".akui-form-hint": { - "@apply text-xs font-normal": {}, - }, - ".akui-input-error + .akui-form-hint, .akui-input[error] + .akui-form-hint": { - "@apply text-critical": {}, - }, -}; diff --git a/account-kit/react/src/tailwind/components/input.ts b/account-kit/react/src/tailwind/components/input.ts deleted file mode 100644 index 62cfb503b4..0000000000 --- a/account-kit/react/src/tailwind/components/input.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { ComponentDef } from "../types"; - -export const inputComponents: ComponentDef = { - ".akui-input": { - // container styling - "@apply p-3 inline-flex gap-2 h-10 items-center": {}, - "@apply static-border": {}, - "@apply text-fg-primary text-sm": {}, - "@apply bg-bg-surface-default": {}, - "&-disabled, &:disabled, &[disabled]": { - "@apply static-border pointer-events-none": {}, - [`@apply bg-bg-surface-inset`]: {}, - input: { - "@apply bg-bg-surface-inset cursor-not-allowed": {}, - "@apply placeholder-fg-disabled": {}, - }, - "svg > *": { - "@apply !fill-fg-disabled": {}, - // fill: `var(${getColorVariableName("fg-disabled")}) !important`, - }, - }, - "svg > *": { - "@apply fill-fg-primary": {}, - // fill: `var(${getColorVariableName("fg-primary")})`, - }, - "&:focus, &:focus-visible, &:focus-within, &:active": { - "@apply active-border": {}, - }, - "@apply radius": {}, - "&-error, &[error]": { - "@apply critical-border": {}, - }, - - // input field styling - input: { - "@apply appearance-none grow bg-inherit": {}, - "&:focus, &:focus-visible, &:focus-within, &:active": { - "@apply outline-none": {}, - }, - }, - - // utility class that matches the input fields state - // here we use this to style something following the input based - // on if the placeholder is shown - ".akui-input:placeholder-shown + .match-input": { - // for svg we want to set the fill to the disabled color - // this makes a lot of assumptions about how our svgs are structured - // pretty brittle so fix this later - "> *": { - "@apply fill-fg-disabled": {}, - }, - "@apply text-fg-disabled": {}, - }, - }, -}; diff --git a/account-kit/react/src/tailwind/components/modal.ts b/account-kit/react/src/tailwind/components/modal.ts deleted file mode 100644 index 9166cc6c17..0000000000 --- a/account-kit/react/src/tailwind/components/modal.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ComponentDef } from "../types"; - -export const modalComponents: ComponentDef = { - ".akui-modal": { - "@apply radius-t-2 md:radius-2": {}, - "@apply bg-bg-surface-default": {}, - }, -}; diff --git a/account-kit/react/src/tailwind/index.ts b/account-kit/react/src/tailwind/index.ts deleted file mode 100644 index f97b901502..0000000000 --- a/account-kit/react/src/tailwind/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { accountKitUi } from "./plugin.js"; -export { getAccountKitContentPath, withAccountKitUi } from "./plugin.js"; -export type * from "./types.js"; -export { - createColorSet, - getColorVariableName, - getBorderRadiusBaseVariableName, -} from "./utils.js"; -export { getBorderRadiusValue } from "./components/border-vars.js"; - -export default accountKitUi; diff --git a/account-kit/react/src/tailwind/plugin.ts b/account-kit/react/src/tailwind/plugin.ts deleted file mode 100644 index 0ca97e9d5c..0000000000 --- a/account-kit/react/src/tailwind/plugin.ts +++ /dev/null @@ -1,194 +0,0 @@ -import type { Config as TailwindConfig } from "tailwindcss"; -import plugin from "tailwindcss/plugin"; -import { borderRadiusVariables } from "./components/border-vars.js"; -import { buttonComponents } from "./components/buttons.js"; -import { colorVariables } from "./components/colorsvars.js"; -import { formControlComponents } from "./components/form-controls.js"; -import { inputComponents } from "./components/input.js"; -import { modalComponents } from "./components/modal.js"; -import { createDefaultTheme } from "./theme.js"; -import type { AccountKitThemeColor, AccountKitThemeOverride } from "./types.js"; -import { - borderRadiusUtilities, - borderRadiusValues, - borderUtilities, -} from "./utilities/borders.js"; -import { apply, getColorVariableName } from "./utils.js"; - -type TailWindPlugin = ReturnType; - -const pathToMe = (() => { - try { - return require.resolve("@account-kit/react"); - } catch { - // Fallback for build time - return __filename; - } -})(); - -/** - * Get the path to the @account-kit/react package and the tailwind content. - * This is used within the tailwind.config.js to include the @account-kit content. - * - * @example - * ```ts - * - * import accountKitUi, { getAccountKitContentPath } from "@account-kit/react/tailwind"; - * import type { Config } from "tailwindcss"; - * - * const config: Config = { - * content: [ - * ...otheContetPaths - * getAccountKitContentPath() - * ], - * theme: {}, - * plugins: [accountKitUi()], - * }; - * - * export default config; - * ``` - * @returns {string} The resolved path to the @account-kit/react package and the tailwind content - */ -export const getAccountKitContentPath = () => { - const contentPath = `${pathToMe.replace( - "index.js", - "", - )}**/*.{js,ts,jsx,tsx,mdx}`; - - return contentPath; -}; - -/** - * Given an optional theme override, returns a tailwind plugin that - * creates all of the necessary css to use the account kit ui components. - * - * @example - * ```ts - * - * import accountKitUi, { getAccountKitContentPath } from "@account-kit/react/tailwind"; - * import type { Config } from "tailwindcss"; - * - * const config: Config = { - * content: [ - * ...otheContetPaths - * getAccountKitContentPath() - * ], - * theme: {}, - * plugins: [accountKitUi()], - * }; - * - * export default config; - * ``` - * @param {AccountKitThemeOverride} themeOverride optional parameter that allows for overriding any of the default account kit theme values - * @returns {TailWindPlugin} a TailwindPlugin to be used within the tailwind.config.js - */ -export const accountKitUi: ( - themeOverride?: AccountKitThemeOverride, -) => TailWindPlugin = (themeOverride) => { - const defaultTheme = createDefaultTheme(); - const accountKitTheme = apply(defaultTheme, themeOverride); - const { colors, borderRadius, ...rest } = accountKitTheme; - - return plugin( - ({ addComponents, addUtilities, matchUtilities, addBase }) => { - // base - addBase(colorVariables(accountKitTheme)); - addBase(borderRadiusVariables(accountKitTheme)); - - // utilities - addUtilities(borderUtilities); - - // components - addComponents(buttonComponents); - addComponents(inputComponents); - addComponents(formControlComponents); - addComponents(modalComponents); - matchUtilities(borderRadiusUtilities, { - values: borderRadiusValues, - }); - }, - { - theme: { - extend: { - ...rest, - colors: Object.keys(colors).reduce( - (acc, key) => ({ - ...acc, - [key]: `var(${getColorVariableName( - key as AccountKitThemeColor, - )})`, - }), - {} as Record, - ), - keyframes: { - "fade-in": { - "0%": { opacity: "0" }, - "100%": { opacity: "1" }, - }, - "slide-up": { - "0%": { - transform: "translateY(100%)", - opacity: "0", - }, - "100%": { - transform: "translateY(0%)", - opacity: "1", - }, - }, - "fade-out": { - "0%": { opacity: "1" }, - "100%": { opacity: "0" }, - }, - "slide-down": { - "0%": { - transform: "translateY(0%)", - opacity: "1", - }, - "100%": { - transform: "translateY(100%)", - opacity: "0", - }, - }, - }, - animation: { - "fade-in": "fade-in 150ms ease", - "slide-up": "slide-up 350ms cubic-bezier(.15,1.15,0.6,1.00)", - "fade-out": "fade-out 150ms ease", - "slide-down": "slide-down 350ms cubic-bezier(.15,1.15,0.6,1.00)", - }, - }, - }, - }, - ); -}; - -/** - * A utility function for augmenting an existing tailwind config with the account kit ui components - * - * @param {TailwindConfig} config the existing tailwind config - * @param {AccountKitThemeOverride} themeOverride optional parameter that allows overrides to Account Kit UI theme styles - * @returns {TailwindConfig} the augmented tailwind config - */ -export const withAccountKitUi = ( - config: Partial, - themeOverride?: AccountKitThemeOverride, -): TailwindConfig => ({ - darkMode: [ - "variant", - [ - "@media (prefers-color-scheme: dark) { &:not(.light, .light *) }", - "&:is(.dark, .dark *)", - ], - ], - ...config, - content: Array.isArray(config.content) - ? [...config.content, getAccountKitContentPath()] - : { - ...config.content, - files: [ - ...(Array.isArray(config.content?.files) ? config.content.files : []), - getAccountKitContentPath(), - ], - }, - plugins: [...(config.plugins ?? []), accountKitUi(themeOverride)], -}); diff --git a/account-kit/react/src/tailwind/theme.ts b/account-kit/react/src/tailwind/theme.ts deleted file mode 100644 index 9316702439..0000000000 --- a/account-kit/react/src/tailwind/theme.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { AccountKitTheme } from "./types.js"; -import { createColorSet } from "./utils.js"; - -/** - * Creates a default Tailwind theme object containing the default settings for the Account Kit UI. - * - * @returns {AccountKitTheme} The default theme object. - */ -export function createDefaultTheme(): AccountKitTheme { - return { - colors: { - active: createColorSet("#94A3B8", "#94A3B8"), - static: createColorSet("#CBD5E1", "#374151"), - critical: createColorSet("#F87171", "#DC2626"), - - // button colors - "btn-primary": createColorSet("#E82594", "#FF66CC"), - "btn-secondary": createColorSet("#E2E8F0", "#374151"), - "btn-auth": createColorSet("#FFF", "argb(255, 255, 255, 0.05)"), - - // fg colors - "fg-primary": createColorSet("#020617", "#fff"), - "fg-secondary": createColorSet("#475569", "#E2E8F0"), - "fg-tertiary": createColorSet("#94A3B8", "#94A3B8"), - "fg-invert": createColorSet("#FFF", "#020617"), - "fg-btn-primary": createColorSet("#FFF", "#FFF"), - "fg-disabled": createColorSet("#CBD5E1", "#475569"), - "fg-accent-brand": createColorSet("#E82594", "#FF66CC"), - "fg-critical": createColorSet("#B91C1C", "#F87171"), - "fg-success": createColorSet("#16A34A", "#86EFAC"), - - // surface colors - "bg-surface-default": createColorSet("#fff", "#020617"), - "bg-surface-subtle": createColorSet("#FBFDFF", "#0F172A"), - "bg-surface-inset": createColorSet("#EFF4F9", "#1F2937"), - "bg-surface-critical": createColorSet("#FEF2F2", "#FEF2F2"), - "bg-surface-error": createColorSet("#DC2626", "#F87171"), - "bg-surface-success": createColorSet("#16A34A", "#86EFAC"), - "bg-surface-warning": createColorSet("#EA580C", "#FDBA74"), - }, - borderRadius: "sm", - }; -} diff --git a/account-kit/react/src/tailwind/types.ts b/account-kit/react/src/tailwind/types.ts deleted file mode 100644 index 06a7b66049..0000000000 --- a/account-kit/react/src/tailwind/types.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { type PluginAPI } from "tailwindcss/types/config"; - -export type ColorVariant = "dark" | "light"; -export type ColorVariantRecord = Record; - -export interface AccountKitTheme { - colors: { - active: ColorVariantRecord; - static: ColorVariantRecord; - critical: ColorVariantRecord; - - // button colors - "btn-primary": ColorVariantRecord; - "btn-secondary": ColorVariantRecord; - "btn-auth": ColorVariantRecord; - - // fg colors - "fg-primary": ColorVariantRecord; - "fg-secondary": ColorVariantRecord; - "fg-tertiary": ColorVariantRecord; - "fg-invert": ColorVariantRecord; - "fg-btn-primary": ColorVariantRecord; - "fg-disabled": ColorVariantRecord; - "fg-accent-brand": ColorVariantRecord; - "fg-critical": ColorVariantRecord; - "fg-success": ColorVariantRecord; - - // surface colors - "bg-surface-default": ColorVariantRecord; - "bg-surface-subtle": ColorVariantRecord; - "bg-surface-inset": ColorVariantRecord; - "bg-surface-critical": ColorVariantRecord; - "bg-surface-success": ColorVariantRecord; - "bg-surface-warning": ColorVariantRecord; - "bg-surface-error": ColorVariantRecord; - }; - // these define the border radius base for the various components. - // the mapped value applies to the smallest value used and everything scales up from there by multiple of 2 - borderRadius: "none" | "xs" | "sm" | "md" | "lg"; -} - -export type AccountKitThemeColor = keyof AccountKitTheme["colors"]; - -export type DeepPartial = T extends object - ? { - [K in keyof T]?: DeepPartial; - } - : T; - -export type AccountKitThemeOverride = DeepPartial; - -export type ComponentDef = Parameters[0]; -export type UtilityDef = Parameters[0]; -export type ThemeFn = PluginAPI["theme"]; diff --git a/account-kit/react/src/tailwind/utilities/borders.ts b/account-kit/react/src/tailwind/utilities/borders.ts deleted file mode 100644 index ef71387f48..0000000000 --- a/account-kit/react/src/tailwind/utilities/borders.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { UtilityDef } from "../types.js"; -import { getColorVariableName, getScaledBorderRadius } from "../utils.js"; - -/** - * A utility function for generating the account kit border utilities - * - * @returns a utility definition object - */ -export const borderUtilities: UtilityDef = { - ".active-border": { - borderWidth: "1px", - borderStyle: "solid", - borderColor: `var(${getColorVariableName("active")})`, - }, - ".static-border": { - borderWidth: "1px", - borderStyle: "solid", - borderColor: `var(${getColorVariableName("static")})`, - }, - ".critical-border": { - borderWidth: "1px", - borderStyle: "solid", - borderColor: `var(${getColorVariableName("critical")})`, - }, - // default border radius - ".radius": { - borderRadius: getScaledBorderRadius(1), - }, -}; - -export const borderRadiusValues = { - "1": 1, - "2": 2, - "4": 4, -}; - -export const borderRadiusUtilities = { - radius: (value: string | number) => ({ - borderRadius: - typeof value === "string" ? value : getScaledBorderRadius(value), - }), - "radius-t": (value: string | number) => ({ - borderTopLeftRadius: - typeof value === "string" ? value : getScaledBorderRadius(value), - borderTopRightRadius: - typeof value === "string" ? value : getScaledBorderRadius(value), - }), -}; diff --git a/account-kit/react/src/tailwind/utils.test.ts b/account-kit/react/src/tailwind/utils.test.ts deleted file mode 100644 index a64d791817..0000000000 --- a/account-kit/react/src/tailwind/utils.test.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { createDefaultTheme } from "./theme.js"; -import type { AccountKitThemeOverride } from "./types.js"; -import { apply, createColorSet } from "./utils.js"; - -describe("tailwind utils test", () => { - describe("merge tests", () => { - it("should correctly override items in the default theme", () => { - const theme = createDefaultTheme(); - const override: AccountKitThemeOverride = { - colors: { - border: { - active: createColorSet("light", "dark"), - }, - "bg-btn-primary": createColorSet("btn", "primary"), - }, - }; - - expect(apply(theme, override)).toMatchInlineSnapshot(` - { - "borderRadius": "sm", - "colors": { - "active": { - "dark": "#94A3B8", - "light": "#94A3B8", - }, - "bg-surface-critical": { - "dark": "#FEF2F2", - "light": "#FEF2F2", - }, - "bg-surface-default": { - "dark": "#020617", - "light": "#fff", - }, - "bg-surface-error": { - "dark": "#F87171", - "light": "#DC2626", - }, - "bg-surface-inset": { - "dark": "#1F2937", - "light": "#EFF4F9", - }, - "bg-surface-subtle": { - "dark": "#0F172A", - "light": "#FBFDFF", - }, - "bg-surface-success": { - "dark": "#86EFAC", - "light": "#16A34A", - }, - "bg-surface-warning": { - "dark": "#FDBA74", - "light": "#EA580C", - }, - "btn-auth": { - "dark": "argb(255, 255, 255, 0.05)", - "light": "#FFF", - }, - "btn-primary": { - "dark": "#FF66CC", - "light": "#E82594", - }, - "btn-secondary": { - "dark": "#374151", - "light": "#E2E8F0", - }, - "critical": { - "dark": "#DC2626", - "light": "#F87171", - }, - "fg-accent-brand": { - "dark": "#FF66CC", - "light": "#E82594", - }, - "fg-btn-primary": { - "dark": "#FFF", - "light": "#FFF", - }, - "fg-critical": { - "dark": "#F87171", - "light": "#B91C1C", - }, - "fg-disabled": { - "dark": "#475569", - "light": "#CBD5E1", - }, - "fg-invert": { - "dark": "#020617", - "light": "#FFF", - }, - "fg-primary": { - "dark": "#fff", - "light": "#020617", - }, - "fg-secondary": { - "dark": "#E2E8F0", - "light": "#475569", - }, - "fg-success": { - "dark": "#86EFAC", - "light": "#16A34A", - }, - "fg-tertiary": { - "dark": "#94A3B8", - "light": "#94A3B8", - }, - "static": { - "dark": "#374151", - "light": "#CBD5E1", - }, - }, - } - `); - }); - - it("should correctly return the original theme if no override is passed", () => { - const defaultTheme = createDefaultTheme(); - - expect(apply(defaultTheme)).toBe(defaultTheme); - }); - }); -}); diff --git a/account-kit/react/src/tailwind/utils.ts b/account-kit/react/src/tailwind/utils.ts deleted file mode 100644 index 91d3b6aee6..0000000000 --- a/account-kit/react/src/tailwind/utils.ts +++ /dev/null @@ -1,77 +0,0 @@ -import type { - AccountKitThemeColor, - ColorVariantRecord, - DeepPartial, -} from "./types"; - -/** - * Creates a color object to be used within account kit utilities, components, and themes - * - * @param {string} light the light mode color value - * @param {string} dark the dark mode color value - * @returns {ColorVariantRecord} the color set object - */ -export const createColorSet = ( - light: string, - dark: string, -): ColorVariantRecord => ({ - light, - dark, -}); - -/** - * Overwrites the values in S with values in T if they exist - * - * @template {Record} S the source object type - * @param {S} source the source object to replace values with those from target - * @param {DeepPartial} target the target object to use as a source of truth - * @returns {S} the deeply merged object of S and T - */ -export const apply = >( - source: S, - target?: DeepPartial, -): S => { - if (!target) return source; - - for (const key in source) { - if (target[key] == null) { - continue; - } else if (typeof source[key] !== "object") { - source[key] = target[key]; - } else { - apply(source[key], target[key]); - } - } - - return source; -}; - -/** - * Given an Account Kit theme color name, returns the css variable name - * - * @param {AccountKitThemeColor} name one of the Account Kit theme color names - * @returns {string} the css variable name - */ -export const getColorVariableName = (name: AccountKitThemeColor): string => { - // add a prefix to the color variable name to avoid conflicts - return `--akui-${name}`; -}; - -/** - * Used to get the css variable name for the base border radius - * - * @returns {string} the css variable name for the base border radius - */ -export const getBorderRadiusBaseVariableName = (): string => { - return "--akui-border-radius-base"; -}; - -/** - * Returns a css value for scaling the base border radius - * - * @param {number} scale the scale factor to apply to the base border radius - * @returns {string} Returns a css value for scaling the base border radius - */ -export const getScaledBorderRadius = (scale: number) => { - return `calc(var(${getBorderRadiusBaseVariableName()}) * ${scale})`; -}; diff --git a/account-kit/react/src/types.ts b/account-kit/react/src/types.ts deleted file mode 100644 index 30881f4d2e..0000000000 --- a/account-kit/react/src/types.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { UseMutationOptions } from "@tanstack/react-query"; -import type { ReactNode } from "react"; -import type { AuthType } from "./components/auth/types.js"; - -export type AlchemyAccountsUIConfig = { - auth?: { - /** - * If this is true, then auth components will prompt users to add - * a passkey after signing in for the first time - */ - addPasskeyOnSignup?: boolean; - header?: ReactNode; - /** - * If hideError is true, then the auth component will not - * render the global error component - */ - hideError?: boolean; - onAuthSuccess?: () => void; - /** - * Each section can contain multiple auth types which will be grouped together - * and separated by an OR divider - */ - sections: AuthType[][]; - /** - * Whether to show the "Sign in" header text in the first auth step - */ - hideSignInText?: boolean; - }; - illustrationStyle?: "outline" | "linear" | "filled" | "flat" | undefined; - /** - * This class name will be applied to any modals that are rendered - */ - modalBaseClassName?: string; - /** - * This is the URL that will be used to link to the support page - */ - supportUrl?: string | undefined; - /** - * Set to "embedded" if the auth component will be rendered within a parent - * component in your UI. The default "modal" should be used if the auth component will be rendered in a modal overlay. - */ - uiMode?: "modal" | "embedded"; -}; - -export type AuthIllustrationStyle = NonNullable< - AlchemyAccountsUIConfig["illustrationStyle"] ->; - -/** - * Base hook mutation arguments. - * - * @template TData The mutation data type. - * @template TVariable The mutation variable type. - */ -export type BaseHookMutationArgs< - TData extends any = void, - TVariable extends any = void, -> = Partial< - Omit< - UseMutationOptions, - "mutationFn" | "mutationKey" - > ->; diff --git a/account-kit/react/src/utils.ts b/account-kit/react/src/utils.ts deleted file mode 100644 index 995a320962..0000000000 --- a/account-kit/react/src/utils.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { WalletConnectParameters } from "wagmi/connectors"; - -export function capitalize(str: string) { - return str - .split(" ") - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(" "); -} - -export function assertNever(_: never, message: string): never { - throw new Error(message); -} - -export function getWalletConnectParams( - walletConnectAuthConfig: WalletConnectParameters | undefined, -): WalletConnectParameters | undefined { - if (!walletConnectAuthConfig) return undefined; - - return walletConnectAuthConfig - ? ({ - ...walletConnectAuthConfig, - qrModalOptions: { - ...walletConnectAuthConfig.qrModalOptions, - themeVariables: { - "--wcm-z-index": "1000000", - ...walletConnectAuthConfig.qrModalOptions?.themeVariables, - }, - }, - } as WalletConnectParameters) - : undefined; -} diff --git a/account-kit/react/src/version.ts b/account-kit/react/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/react/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/react/tailwind.config.js b/account-kit/react/tailwind.config.js deleted file mode 100644 index 01dee20c95..0000000000 --- a/account-kit/react/tailwind.config.js +++ /dev/null @@ -1,10 +0,0 @@ -// eslint-disable-next-line import/extensions -import { withAccountKitUi } from "./src/tailwind/plugin"; - -export default withAccountKitUi({ - content: ["./src/**/*.{js,ts,jsx,tsx}", "./.storybook/**/*.{js,ts,jsx,tsx}"], - theme: { - extend: {}, - }, - plugins: [], -}); diff --git a/account-kit/react/tsconfig.build.json b/account-kit/react/tsconfig.build.json deleted file mode 100644 index 8c0c953a27..0000000000 --- a/account-kit/react/tsconfig.build.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "**/*/*.e2e.test.ts", - "vitest.config.ts", - "vitest.config.e2e.ts", - "tailwind.config.js", - ".storybook/**/*" - ], - "include": ["src"], - "compilerOptions": { - "sourceMap": true, - "jsx": "react-jsx" - } -} diff --git a/account-kit/react/tsconfig.json b/account-kit/react/tsconfig.json deleted file mode 100644 index ec6b52b3c0..0000000000 --- a/account-kit/react/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "typescript-template/base.json", - "compilerOptions": { - "jsx": "preserve" - }, - "exclude": [ - "**/*.stories.ts", - "**/*.stories.js", - "**/*.stories.jsx", - "**/*.stories.tsx" - ], - "references": [ - { - "path": "./tsconfig.storybook.json" - } - ] -} diff --git a/account-kit/react/tsconfig.storybook.json b/account-kit/react/tsconfig.storybook.json deleted file mode 100644 index 76cb4c347c..0000000000 --- a/account-kit/react/tsconfig.storybook.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "composite": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "outDir": "" - }, - "exclude": [ - "src/**/*.spec.ts", - "src/**/*.test.ts", - "src/**/*.test-d.ts", - "src/**/*.spec.js", - "src/**/*.test.js", - "src/**/*.spec.tsx", - "src/**/*.test.tsx", - "src/**/*.spec.jsx", - "src/**/*.test.js" - ], - "include": [ - "src/**/*.stories.ts", - "src/**/*.stories.js", - "src/**/*.stories.jsx", - "src/**/*.stories.tsx", - "src/**/*.tsx", - "src/**/*.ts", - "src/**/*.js", - "src/**/*.jsx", - "src/**/*.stories.mdx", - "**/*.stories.tsx", - ".storybook/*.js", - ".storybook/*.ts" - ] -} diff --git a/account-kit/react/turbo.json b/account-kit/react/turbo.json deleted file mode 100644 index 84d5751410..0000000000 --- a/account-kit/react/turbo.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "dev": { - "dependsOn": ["^build", "build"], - "persistent": true, - "cache": false, - "interruptible": false - } - } -} diff --git a/account-kit/react/typedoc.json b/account-kit/react/typedoc.json deleted file mode 100644 index 85b76d5183..0000000000 --- a/account-kit/react/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["src/index.ts"], - "tsconfig": "./tsconfig.build.json", - "plugin": ["typedoc-plugin-markdown"], - "fileExtension": ".mdx" -} diff --git a/account-kit/react/vitest.config.ts b/account-kit/react/vitest.config.ts deleted file mode 100644 index c1615b37cf..0000000000 --- a/account-kit/react/vitest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/react", - }, - }), -); diff --git a/account-kit/rn-signer/.watchmanconfig b/account-kit/rn-signer/.watchmanconfig deleted file mode 100644 index 0967ef424b..0000000000 --- a/account-kit/rn-signer/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/account-kit/rn-signer/CHANGELOG.md b/account-kit/rn-signer/CHANGELOG.md deleted file mode 100644 index b090ba9905..0000000000 --- a/account-kit/rn-signer/CHANGELOG.md +++ /dev/null @@ -1,588 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -### Bug Fixes - -- **rn-signer:** switch back to session stamper after using passkey ([#2147](https://github.com/alchemyplatform/aa-sdk/issues/2147)) ([42e0ebf](https://github.com/alchemyplatform/aa-sdk/commit/42e0ebf1604d1aee7a14666bd54108d7d40acd62)) - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -### Bug Fixes - -- fix addOauthProvider in react-native ([#2025](https://github.com/alchemyplatform/aa-sdk/issues/2025)) ([6921fe9](https://github.com/alchemyplatform/aa-sdk/commit/6921fe91f941381843c97fad7cf46fa5806d7d90)) - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -### Features - -- signer email/sms verification ([#1964](https://github.com/alchemyplatform/aa-sdk/issues/1964)) ([07d3bff](https://github.com/alchemyplatform/aa-sdk/commit/07d3bff1578c4f043c871da5edcab8feeb8cb105)) - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -### Features - -- export wallet ([#1858](https://github.com/alchemyplatform/aa-sdk/issues/1858)) ([bc856e1](https://github.com/alchemyplatform/aa-sdk/commit/bc856e1bcc8138cb22db296ffd81e90c43eda9f9)) - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -### Bug Fixes - -- add zod as rn-signer dep ([#1992](https://github.com/alchemyplatform/aa-sdk/issues/1992)) ([07c419e](https://github.com/alchemyplatform/aa-sdk/commit/07c419ed79319eb558616ade66ff4adefd790fdb)) - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -### Bug Fixes - -- react native ios passkeys ([#1986](https://github.com/alchemyplatform/aa-sdk/issues/1986)) ([8c9f473](https://github.com/alchemyplatform/aa-sdk/commit/8c9f47330fb926bafbbf24239c69a03521ed2bd3)) - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -### Features - -- add accessToken field to user object ([#1879](https://github.com/alchemyplatform/aa-sdk/issues/1879)) ([7483563](https://github.com/alchemyplatform/aa-sdk/commit/748356306e9aaf597b1b2e55218ec04c222983eb)) - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -### Features - -- add jwt auth with docs ([#1712](https://github.com/alchemyplatform/aa-sdk/issues/1712)) ([8a201d9](https://github.com/alchemyplatform/aa-sdk/commit/8a201d9d485f9544ae5249b5d253835361794224)) - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -### Features - -- unpin viem version ([#1851](https://github.com/alchemyplatform/aa-sdk/issues/1851)) ([e387e0e](https://github.com/alchemyplatform/aa-sdk/commit/e387e0ead087b893d315b072c24b3c2725ff86b6)) - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -### Features - -- sms auth beta ([#1835](https://github.com/alchemyplatform/aa-sdk/issues/1835)) ([b9eebf7](https://github.com/alchemyplatform/aa-sdk/commit/b9eebf7a935fa4666cf4b692692a4f14848994ac)) - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -### Features - -- **rn-signer:** support passkeys in React Native ([#1653](https://github.com/alchemyplatform/aa-sdk/issues/1653)) ([f9ce59c](https://github.com/alchemyplatform/aa-sdk/commit/f9ce59c9874e863e80df8219bfa8d76960bfa82a)) - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -### Features - -- add mfa methods to rn-signer ([#1542](https://github.com/alchemyplatform/aa-sdk/issues/1542)) ([c41ba79](https://github.com/alchemyplatform/aa-sdk/commit/c41ba792f78fc71395df0c16bbb8184e51272981)) - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -### Bug Fixes - -- mfa demo ui feedback updates ([#1527](https://github.com/alchemyplatform/aa-sdk/issues/1527)) ([5caf1d9](https://github.com/alchemyplatform/aa-sdk/commit/5caf1d933c19d5023b4d62ef2784fb3d9dc53224)) - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -### Features - -- add mfa on sign in with an authenticator app ([#1398](https://github.com/alchemyplatform/aa-sdk/issues/1398)) ([b9315c5](https://github.com/alchemyplatform/aa-sdk/commit/b9315c5cdd9f2674f53cc8d1bebbdb3b569e36ae)) - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -### Bug Fixes - -- ensure session persistence on IOS ([#1457](https://github.com/alchemyplatform/aa-sdk/issues/1457)) ([c2fc412](https://github.com/alchemyplatform/aa-sdk/commit/c2fc412d0853b4ba72d7900977912ad78c71e46c)), closes [#1454](https://github.com/alchemyplatform/aa-sdk/issues/1454) - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -### Features - -- add RN hooks docs and guides ([#1437](https://github.com/alchemyplatform/aa-sdk/issues/1437)) ([b749c1a](https://github.com/alchemyplatform/aa-sdk/commit/b749c1a7e9a7978aa0327d408a9c7cc724b8cd0f)) - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/react-native-signer - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Features - -- add react-native core files ([#1402](https://github.com/alchemyplatform/aa-sdk/issues/1402)) ([060e1ab](https://github.com/alchemyplatform/aa-sdk/commit/060e1ab231db8455a71f25452e1a4cddace60dbd)) - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -### Features - -- change order of sidebar ([#1374](https://github.com/alchemyplatform/aa-sdk/issues/1374)) ([ab04ec6](https://github.com/alchemyplatform/aa-sdk/commit/ab04ec6215d98d51ab8167f75c3968f8a452ad48)) - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @account-kit/react-native-signer - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -### Features - -- add oauth support to react native signer ([#1273](https://github.com/alchemyplatform/aa-sdk/issues/1273)) ([61984bd](https://github.com/alchemyplatform/aa-sdk/commit/61984bdd65d5432a0abf8b5ce3549423438abe4e)) - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -### Features - -- add better error handling to prevent crashes when creating sharedPreferences ([#1267](https://github.com/alchemyplatform/aa-sdk/issues/1267)) ([2d5dae9](https://github.com/alchemyplatform/aa-sdk/commit/2d5dae9545b13d21c3d5d432509f95e3cc275317)) - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -### Features - -- add expo example ([#1204](https://github.com/alchemyplatform/aa-sdk/issues/1204)) ([bccb6e7](https://github.com/alchemyplatform/aa-sdk/commit/bccb6e7172fed90a24b5a875502cef3d0f660a8b)) -- add OTP authentication capabilities to RN Signer ([#1231](https://github.com/alchemyplatform/aa-sdk/issues/1231)) ([6ebfca5](https://github.com/alchemyplatform/aa-sdk/commit/6ebfca58a7ef617d0915661171038daa0b497068)) -- add otp example to bare rn app ([#1235](https://github.com/alchemyplatform/aa-sdk/issues/1235)) ([dbf4db9](https://github.com/alchemyplatform/aa-sdk/commit/dbf4db90b58220b184db388f43b2b2bded54d873)) -- **rn:** add iOS support ([#1210](https://github.com/alchemyplatform/aa-sdk/issues/1210)) ([2e3892c](https://github.com/alchemyplatform/aa-sdk/commit/2e3892cac57c517cb93d0349297feedd2ca07dfb)) -- **rn:** implement RN iOS stamper ([#1213](https://github.com/alchemyplatform/aa-sdk/issues/1213)) ([f9e3e91](https://github.com/alchemyplatform/aa-sdk/commit/f9e3e912700c35456ecdf97fa68bd1beb182f0bf)) - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -### Features - -- add email OTP support ([#1163](https://github.com/alchemyplatform/aa-sdk/issues/1163)) ([76720d9](https://github.com/alchemyplatform/aa-sdk/commit/76720d9b647d5e65a78726935520c41d94c1f6ff)) - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -### Bug Fixes - -- rn stamper was returning stamp instead of response ([#1201](https://github.com/alchemyplatform/aa-sdk/issues/1201)) ([70a18df](https://github.com/alchemyplatform/aa-sdk/commit/70a18dfc2a5a751e3e08830673d0d293bbca05e2)) - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) diff --git a/account-kit/rn-signer/README.md b/account-kit/rn-signer/README.md deleted file mode 100644 index 64dd141f60..0000000000 --- a/account-kit/rn-signer/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# @account-kit/react-native-signer (Alpha) - -React Native compatible Alchemy signer impl - -## ⚠️ Alpha ⚠️ - -This is an alpha release of the library. Only the **Android** platform is supported at this time. - -## Installation - -```sh -npm install @account-kit/react-native-signer -``` - -## Usage - -This package requires several packages containing native modules to be installed in your project. Check out their docs at the following links for installation instructions. - -- [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv) -- [react-native-get-random-values](https://github.com/LinusU/react-native-get-random-values) -- [react-native-passkey](https://github.com/f-23/react-native-passkey) - -#### Passkeys - -If using passkeys, there are iOS- and Android-specific steps to link your app to an associated domain to which the passkeys will be connected. This means hosting specific JSON files from a domain you control. For details on this, see the [instructions in the react-native-passkey README](https://github.com/f-23/react-native-passkey?tab=readme-ov-file#configuration). - -#### Deep Linking - -We recommend using emails containing OTP codes (the default setting) to avoid the need for this step. - -If using emails with magic links, your app will need to be configured to handle deep linking. Check out the React Native [docs](https://reactnative.dev/docs/linking#enabling-deep-links) for more information. -You will also need a way to trigger the deep link via a http or https url. This can be done in a viarety of ways ranging from universal links to setting up a custom redirect server. - -See the [example app](./example) for usage information. - -## Contributing - -1. Clone the repo -1. run `yarn` in the root of the repo -1. make changes in `rn-signer/src` -1. cd into `account-kit/rn-signer/example` -1. add a `.env` file which contains `API_KEY={alchemy_api_key}`. This API Key needs to correspond to an app that has Smart Wallets enabled (https://dashboard.alchemy.com/apps/latest/services/smart-wallets). -1. run `yarn android` to start the example app. You will need to make sure you do the env setup here: https://reactnative.dev/docs/set-up-your-environment to be able to run the app on android - ---- - -Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob) diff --git a/account-kit/rn-signer/account-kit-react-native-signer.podspec b/account-kit/rn-signer/account-kit-react-native-signer.podspec deleted file mode 100644 index 5a5d9194f7..0000000000 --- a/account-kit/rn-signer/account-kit-react-native-signer.podspec +++ /dev/null @@ -1,41 +0,0 @@ -require "json" - -package = JSON.parse(File.read(File.join(__dir__, "package.json"))) -folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' - -Pod::Spec.new do |s| - s.name = "account-kit-react-native-signer" - s.version = package["version"] - s.summary = package["description"] - s.homepage = package["homepage"] - s.license = package["license"] - s.authors = package["author"] - - s.platforms = { :ios => "17.0" } - s.source = { :git => "https://github.com/alchemyplatform/aa-sdk.git", :tag => "#{s.version}" } - - s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" - s.private_header_files = "ios/**/*.h" - - # spm_dependency(s, url: "https://github.com/tkhq/swift-sdk", requirement: {kind: 'upToNextMajorVersion', minimumVersion: '1.2.0'}, products: ["TurnkeySDK"]) - s.dependency "Base58Swift" - - # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. - # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. - if respond_to?(:install_modules_dependencies, true) - install_modules_dependencies(s) - else - s.dependency "React-Core" - s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" - s.pod_target_xcconfig = { - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", - "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" - } - s.dependency "React-Codegen" - s.dependency "RCT-Folly" - s.dependency "RCTRequired" - s.dependency "RCTTypeSafety" - s.dependency "ReactCommon/turbomodule/core" - end -end diff --git a/account-kit/rn-signer/android/build.gradle b/account-kit/rn-signer/android/build.gradle deleted file mode 100644 index f852697f61..0000000000 --- a/account-kit/rn-signer/android/build.gradle +++ /dev/null @@ -1,192 +0,0 @@ -import groovy.json.JsonSlurper -import com.vanniktech.maven.publish.AndroidSingleVariantLibrary -import com.vanniktech.maven.publish.SonatypeHost - -buildscript { - // Buildscript is evaluated before everything else so we can't use getExtOrDefault - def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["ReactNativeSigner_kotlinVersion"] - - repositories { - google() - mavenCentral() - } - - dependencies { - classpath "com.android.tools.build:gradle:7.2.1" - // noinspection DifferentKotlinGradleVersion - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -plugins { - id 'org.jetbrains.kotlin.plugin.serialization' version "$ReactNativeSigner_kotlinVersion" - id("com.vanniktech.maven.publish") version "0.30.0" -} - -def kotlin_version = getExtOrDefault("kotlinVersion") - -def reactNativeArchitectures() { - def value = rootProject.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] -} - -def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" -} - -apply plugin: "com.android.library" -apply plugin: "kotlin-android" - -if (isNewArchitectureEnabled()) { - apply plugin: "com.facebook.react" -} - -def getExtOrDefault(name) { - return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["ReactNativeSigner_" + name] -} - -def getExtOrIntegerDefault(name) { - return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["ReactNativeSigner_" + name]).toInteger() -} - -def supportsNamespace() { - def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') - def major = parsed[0].toInteger() - def minor = parsed[1].toInteger() - - // Namespace support was added in 7.3.0 - return (major == 7 && minor >= 3) || major >= 8 -} - -android { - if (supportsNamespace()) { - namespace "com.accountkit.reactnativesigner" - - sourceSets { - main { - manifest.srcFile "src/main/AndroidManifestNew.xml" - } - } - } - - compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") - - defaultConfig { - minSdkVersion getExtOrIntegerDefault("minSdkVersion") - targetSdkVersion getExtOrIntegerDefault("targetSdkVersion") - buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() - - } - - buildFeatures { - buildConfig true - } - - buildTypes { - release { - minifyEnabled false - } - } - - lintOptions { - disable "GradleCompatible" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - sourceSets { - main { - if (isNewArchitectureEnabled()) { - java.srcDirs += [ - "generated/java", - "generated/jni" - ] - } - } - } -} - -def getLibraryVersion() { - def packageFile = file("../package.json") - def packageJson = new JsonSlurper().parseText(packageFile.getText()) as Map - return packageJson["version"] as String -} - -mavenPublishing { - configure(new AndroidSingleVariantLibrary("release", true, true)) - publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) - signAllPublications() - - coordinates("com.alchemy.accountkit", "reactnativesigner", getLibraryVersion()) - - pom { - name = "Account Kit React Native Stamper" - description = "React Native Android module for Stamping requests with the Alchemy Signer" - inceptionYear = "2024" - url = "https://github.com/alchemyplatform/aa-sdk/" - licenses { - license { - name = "MIT License" - url = "https://github.com/alchemyplatform/aa-sdk/blob/main/LICENSE" - distribution = "https://github.com/alchemyplatform/aa-sdk/blob/main/LICENSE" - } - } - developers { - // TODO: this needs to be like alchemyplatform or something - developer { - id = "moldy530" - name = "Michael Moldoveanu" - url = "https://github.com/moldy530" - } - } - scm { - url = "https://github.com/alchemyplatform/aa-sdk/" - connection = "scm:git:git://github.com/alchemyplatform/aa-sdk.git" - developerConnection = "scm:git:ssh://git@github.com/alchemyplatform/aa-sdk.git" - } - } -} - -repositories { - mavenCentral() - google() -} - -dependencies { - // For < 0.71, this will be from the local maven repo - // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin - // TODO: 1) we should assume folks are on > 0.71 (they have to be for new arch) and then we should read the correct version from pkg.json - // of the dependency - // we can't use "com.facebook.react:react-native:+" here because it won't publish to maven if we do - //noinspection GradleDynamicVersion - implementation "com.facebook.react:react-android:0.76" - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - api "javax.xml.bind:jaxb-api:2.4.0-b180830.0359" - api "xerces:xercesImpl:2.12.2" - api "androidx.security:security-crypto:1.1.0" - api "com.google.crypto.tink:tink-android:1.18.0" - api "org.bitcoinj:bitcoinj-core:0.17" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1" -} - -if (isNewArchitectureEnabled()) { - react { - jsRootDir = file("../src/") - libraryName = "ReactNativeSigner" - codegenJavaPackageName = "com.accountkit.reactnativesigner" - } -} - -task extractJar(type: Copy) { - def aarFile = file("$buildDir/outputs/aar/${project.name}-release.aar") - def outputDir = file("$buildDir/libs") - from(zipTree(aarFile)) { - include "classes.jar" - } - into(outputDir) - rename { "${project.name}.jar" } -} -extractJar.dependsOn("assembleRelease") diff --git a/account-kit/rn-signer/android/gradle.properties b/account-kit/rn-signer/android/gradle.properties deleted file mode 100644 index 242ed549b8..0000000000 --- a/account-kit/rn-signer/android/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -ReactNativeSigner_kotlinVersion=1.7.0 -ReactNativeSigner_minSdkVersion=21 -ReactNativeSigner_targetSdkVersion=31 -ReactNativeSigner_compileSdkVersion=31 -ReactNativeSigner_ndkversion=21.4.7075529 diff --git a/account-kit/rn-signer/android/src/main/AndroidManifest.xml b/account-kit/rn-signer/android/src/main/AndroidManifest.xml deleted file mode 100644 index 603a94fddc..0000000000 --- a/account-kit/rn-signer/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/NativeTEKStamperModule.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/NativeTEKStamperModule.kt deleted file mode 100644 index 21d000d72f..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/NativeTEKStamperModule.kt +++ /dev/null @@ -1,66 +0,0 @@ -package com.accountkit.reactnativesigner - -import com.accountkit.reactnativesigner.core.TEKStamper -import com.facebook.react.bridge.Arguments -import com.facebook.react.bridge.Promise -import com.facebook.react.bridge.ReactApplicationContext -import com.facebook.react.module.annotations.ReactModule - -@ReactModule(name = NativeTEKStamperModule.NAME) -class NativeTEKStamperModule(reactContext: ReactApplicationContext) : - NativeTEKStamperSpec(reactContext) { - - private val stamper = TEKStamper(reactContext.applicationContext) - - override fun getName(): String { - return NAME - } - - override fun init(promise: Promise) { - try { - val tekPublicKey = stamper.init() - - return promise.resolve(tekPublicKey) - } catch (e: Exception) { - promise.reject(e) - } - } - - override fun clear() { - stamper.clear() - } - - override fun publicKey(): String? { - return stamper.publicKey() - } - - override fun injectCredentialBundle(bundle: String, promise: Promise) { - try { - stamper.injectCredentialBundle(bundle) - - return promise.resolve(true) - } catch (e: Exception) { - promise.reject(e) - } - } - - override fun stamp(payload: String, promise: Promise) { - try { - val stamp = stamper.stamp(payload) - - val response = Arguments.createMap() - response.putString("stampHeaderName", stamp.stampHeaderName) - response.putString( - "stampHeaderValue", - stamp.stampHeaderValue - ) - return promise.resolve(response) - } catch (e: Exception) { - promise.reject(e) - } - } - - companion object { - const val NAME = "NativeTEKStamper" - } -} diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/ReactNativeSignerPackage.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/ReactNativeSignerPackage.kt deleted file mode 100644 index 02d55a5cbf..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/ReactNativeSignerPackage.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.accountkit.reactnativesigner - -import com.facebook.react.TurboReactPackage -import com.facebook.react.bridge.NativeModule -import com.facebook.react.bridge.ReactApplicationContext -import com.facebook.react.module.model.ReactModuleInfo -import com.facebook.react.module.model.ReactModuleInfoProvider -import java.util.HashMap - -class ReactNativeSignerPackage : TurboReactPackage() { - override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? { - return if (name == NativeTEKStamperModule.NAME) { - NativeTEKStamperModule(reactContext) - } else { - null - } - } - - override fun getReactModuleInfoProvider(): ReactModuleInfoProvider { - return ReactModuleInfoProvider { - val moduleInfos: MutableMap = HashMap() - moduleInfos[NativeTEKStamperModule.NAME] = ReactModuleInfo( - NativeTEKStamperModule.NAME, - NativeTEKStamperModule.NAME, - false, // canOverrideExistingModule - false, // needsEagerInit - false, // isCxxModule - true // isTurboModule - ) - moduleInfos - } - } -} diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/KeyExtensions.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/KeyExtensions.kt deleted file mode 100644 index fe25c47724..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/KeyExtensions.kt +++ /dev/null @@ -1,77 +0,0 @@ -package com.accountkit.reactnativesigner.core - -import com.google.crypto.tink.CleartextKeysetHandle -import com.google.crypto.tink.InsecureSecretKeyAccess -import com.google.crypto.tink.KeysetHandle -import com.google.crypto.tink.hybrid.HpkeParameters -import com.google.crypto.tink.hybrid.HpkePrivateKey -import com.google.crypto.tink.hybrid.HpkePublicKey -import com.google.crypto.tink.subtle.EllipticCurves -import com.google.crypto.tink.util.Bytes -import com.google.crypto.tink.util.SecretBytes -import java.security.interfaces.ECPublicKey -import javax.xml.bind.DatatypeConverter -import com.google.crypto.tink.proto.HpkePrivateKey as ProtoHpkePrivateKey -import com.google.crypto.tink.proto.HpkePublicKey as ProtoHpkePublicKey - -// Keyset Handle Extensions -fun KeysetHandle.toHpkePublicKey(hpkeParameters: HpkeParameters): HpkePublicKey { - val keySet = CleartextKeysetHandle.getKeyset(this.publicKeysetHandle) - val protoKey = ProtoHpkePublicKey.parseFrom(keySet.keyList[0].keyData.value) - - return HpkePublicKey.create( - hpkeParameters, - Bytes.copyFrom(protoKey.publicKey.toByteArray()), - null - ) -} - -fun KeysetHandle.toHpkePrivateKey(hpkeParams: HpkeParameters): HpkePrivateKey { - val publicKey = this.toHpkePublicKey(hpkeParams) - val pkKs = CleartextKeysetHandle.getKeyset(this) - val pkKeyData = pkKs.keyList[0].keyData - check(pkKeyData.typeUrl == "type.googleapis.com/google.crypto.tink.HpkePrivateKey") { - "invalid key type" - } - - return HpkePrivateKey.create( - HpkePublicKey.create( - hpkeParams, - Bytes.copyFrom(publicKey.toByteArray()), - null - ), - SecretBytes.copyFrom( - ProtoHpkePrivateKey.parseFrom(pkKeyData.value).privateKey.toByteArray(), - InsecureSecretKeyAccess.get() - ) - ) -} - -// HPKE Public Key Extensions -fun HpkePublicKey.toHex(): String { - return this.toByteArray().toHex() -} - -fun HpkePublicKey.toByteArray(): ByteArray { - return this.publicKeyBytes.toByteArray() -} - -// ECPublicKey Extensions -fun ECPublicKey.toBytes( - pfType: EllipticCurves.PointFormatType -): ByteArray { - return EllipticCurves.pointEncode( - this.params.curve, - pfType, - this.w - ) -} - -// Conversions from Hex <-> byte[] -fun String.fromHex(): ByteArray { - return DatatypeConverter.parseHexBinary(this) -} - -fun ByteArray.toHex(): String { - return DatatypeConverter.printHexBinary(this) -} \ No newline at end of file diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/TEKManager.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/TEKManager.kt deleted file mode 100644 index d53f1037e3..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/TEKManager.kt +++ /dev/null @@ -1,89 +0,0 @@ -package com.accountkit.reactnativesigner.core - -import android.content.SharedPreferences -import com.accountkit.reactnativesigner.core.errors.NoTEKException -import com.google.crypto.tink.InsecureSecretKeyAccess -import com.google.crypto.tink.KeyTemplate -import com.google.crypto.tink.KeysetHandle -import com.google.crypto.tink.TinkJsonProtoKeysetFormat -import com.google.crypto.tink.hybrid.HpkeParameters -import com.google.crypto.tink.hybrid.HpkePublicKey -import com.google.crypto.tink.hybrid.internal.HpkeContext -import com.google.crypto.tink.hybrid.internal.HpkeKemKeyFactory -import com.google.crypto.tink.hybrid.internal.HpkePrimitiveFactory - -private const val TEK_STORAGE_KEY = "TEK_STORAGE_KEY" -private val hpkeParams = HpkeParameters.builder() - .setKemId(HpkeParameters.KemId.DHKEM_P256_HKDF_SHA256) - .setKdfId(HpkeParameters.KdfId.HKDF_SHA256) - .setAeadId(HpkeParameters.AeadId.AES_256_GCM) - .setVariant(HpkeParameters.Variant.NO_PREFIX) - .build() - -class HpkeTEKManager(private val sharedPreferences: SharedPreferences) { - fun hpkeDecrypt( - encapsulatePublicKey: ByteArray, - cipherText: ByteArray, - info: ByteArray, - aad: ByteArray - ): ByteArray { - // Why do we hve to do all this rather than doing: - // val hybridDecrypt = tekHandle.getPrimitive(HybridDecrypt::class.java) - // val decryptedKey = hybridDecrypt.decrypt(ciphertext, "turnkey_hpke".toByteArray()) - // the hybridDecrypt.decrypt that google exposes doesn't allow us to pass in - // the aad that's needed to complete decryption - val keyHandle = getKeysetHandle() ?: throw NoTEKException() - - val recipient = HpkeContext.createRecipientContext( - encapsulatePublicKey, - HpkeKemKeyFactory.createPrivate(keyHandle.toHpkePrivateKey(hpkeParams)), - HpkePrimitiveFactory.createKem(hpkeParams.kemId), - HpkePrimitiveFactory.createKdf(hpkeParams.kdfId), - HpkePrimitiveFactory.createAead(hpkeParams.aeadId), - info - ) - - return recipient.open(cipherText, aad) - } - - fun createTEK(): HpkePublicKey { - val existingPublicKey = publicKey() - if (existingPublicKey != null) { - return existingPublicKey - } - - val keysetHandle = KeysetHandle.generateNew(KeyTemplate.createFrom(hpkeParams)) - - sharedPreferences - .edit() - .putString( - TEK_STORAGE_KEY, - TinkJsonProtoKeysetFormat.serializeKeyset( - keysetHandle, - InsecureSecretKeyAccess.get() - ) - ) - .apply() - - return keysetHandle.toHpkePublicKey(hpkeParams) - } - - fun publicKey(): HpkePublicKey? { - val ksHandle = getKeysetHandle() ?: return null - - return ksHandle.toHpkePublicKey(hpkeParams) - } - - fun publicKeyHex(): String? { - return publicKey()?.toHex() - } - - private fun getKeysetHandle(): KeysetHandle? { - val storageVal = sharedPreferences.getString(TEK_STORAGE_KEY, null) ?: return null - - return TinkJsonProtoKeysetFormat.parseKeyset( - storageVal, - InsecureSecretKeyAccess.get() - ) - } -} \ No newline at end of file diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/TEKStamper.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/TEKStamper.kt deleted file mode 100644 index 95b9e2150d..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/TEKStamper.kt +++ /dev/null @@ -1,258 +0,0 @@ -package com.accountkit.reactnativesigner.core - -import android.content.Context -import android.content.SharedPreferences -import androidx.security.crypto.EncryptedSharedPreferences -import androidx.security.crypto.MasterKey -import com.accountkit.reactnativesigner.core.errors.NoInjectedBundleException -import com.accountkit.reactnativesigner.core.errors.StamperNotInitializedException -import com.google.crypto.tink.config.TinkConfig -import com.google.crypto.tink.subtle.Base64 -import com.google.crypto.tink.subtle.EllipticCurves -import kotlinx.serialization.Serializable -import kotlinx.serialization.encodeToString -import kotlinx.serialization.json.Json -import org.bitcoinj.base.Base58 -import org.bouncycastle.jce.ECNamedCurveTable -import org.bouncycastle.jce.provider.BouncyCastleProvider -import org.bouncycastle.jce.spec.ECPublicKeySpec -import java.nio.ByteBuffer -import java.security.KeyFactory -import java.security.Security -import java.security.Signature -import java.security.KeyStore -import java.security.KeyStoreException - -@Serializable -data class ApiStamp(val publicKey: String, val scheme: String, val signature: String) - -data class Stamp(val stampHeaderName: String, val stampHeaderValue: String) - -private const val BUNDLE_PRIVATE_KEY = "BUNDLE_PRIVATE_KEY" -private const val BUNDLE_PUBLIC_KEY = "BUNDLE_PUBLIC_KEY" -private const val MASTER_KEY_ALIAS = "tek_master_key" -private const val ENCRYPTED_SHARED_PREFERENCES_FILENAME = "tek_stamper_shared_prefs" - -class TEKStamper(context: Context) { - // This is how the docs for EncryptedSharedPreferences recommend creating this setup - // NOTE: we can further customize the permissions around accessing this master key and the keys - // used to generate it by using the .setKeyGenParameterSpec() method on this builder - // this would allow us to further specify the access requirements to this key - // - // we should explore the best practices on how to do this once we reach a phase of further - // cleanup - - /** - * We are using EncryptedSharedPreferences to store 2 pieces of data - * 1. the TEK keypair - this is the ephemeral key-pair that Turnkey will use to encrypt the - * bundle with - * 2. the decrypted private key for a session - * - * The reason we are not using the android key store for either of these things is because - * 1. For us to be able to import the private key in the bundle into the KeyStore, Turnkey has - * to return the key in a different format (AFAIK): - * https://developer.android.com/privacy-and-security/keystore#ImportingEncryptedKeys - * 2. If we store the TEK in the KeyStore, then we have to roll our own HPKE decrypt function as - * there's no off the shelf solution (that I could find) to do the HPKE decryption. Rolling our - * own decryption feels wrong given we are not experts on this and don't have a good way to - * verify our implementation (and I don't trust the ChatGPT output to be correct. Even if it is, - * there's no guarantee we can test all the edge cases since those are unknown unknowns) - * - * NOTE: this isn't too far off from how Turnkey recommends doing it in Swift - * https://github.com/tkhq/swift-sdk/blob/5817374a7cbd4c99b7ea90b170363dc2bf6c59b9/docs/email-auth.md#email-authentication - * - * The open question is if the storage of the decrypted private key is secure enough though - */ - - - - - - - private lateinit var tekManager: HpkeTEKManager - private lateinit var sharedPreferences: SharedPreferences - - init { - try { - TinkConfig.register() - - sharedPreferences = getSharedPreferences(context) - tekManager = HpkeTEKManager(sharedPreferences) - - if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME).javaClass != - BouncyCastleProvider::class.java - ) { - Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME) - } - - if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { - Security.addProvider(BouncyCastleProvider()) - } - } catch (e: Exception){ - throw RuntimeException("Error creating master key", e) - } - - } - - fun init(): String { - return tekManager.createTEK().toHex() - } - - fun clear() { - sharedPreferences.edit().clear().apply() - } - - fun publicKey(): String? { - return tekManager.publicKeyHex() - } - - fun injectCredentialBundle(bundle: String) { - val tekPublicKey = - tekManager.publicKey() - ?: throw StamperNotInitializedException() - - val decodedBundle = Base58.decodeChecked(bundle) - val buffer = ByteBuffer.wrap(decodedBundle) - val ephemeralPublicKeyLength = 33 - val ephemeralPublicKeyBytes = ByteArray(ephemeralPublicKeyLength) - buffer.get(ephemeralPublicKeyBytes) - val ephemeralPublicKey = - EllipticCurves.getEcPublicKey( - EllipticCurves.CurveType.NIST_P256, - EllipticCurves.PointFormatType.COMPRESSED, - ephemeralPublicKeyBytes, - ) - .toBytes(EllipticCurves.PointFormatType.UNCOMPRESSED) - - val ciphertext = ByteArray(buffer.remaining()) - buffer.get(ciphertext) - - val aad = ephemeralPublicKey + tekPublicKey.toByteArray() - - val decryptedKey = - tekManager.hpkeDecrypt( - ephemeralPublicKey, - ciphertext, - "turnkey_hpke".toByteArray(), - aad - ) - - val (publicKeyBytes, privateKeyBytes) = privateKeyToKeyPair(decryptedKey) - - sharedPreferences - .edit() - .putString(BUNDLE_PRIVATE_KEY, privateKeyBytes.toHex().lowercase()) - .apply() - - sharedPreferences - .edit() - .putString(BUNDLE_PUBLIC_KEY, publicKeyBytes.toHex().lowercase()) - .apply() - } - - fun stamp(payload: String): Stamp { - val signingKeyHex = - sharedPreferences.getString(BUNDLE_PRIVATE_KEY, null) - ?: throw NoInjectedBundleException() - - val publicSigningKeyHex = - sharedPreferences.getString(BUNDLE_PUBLIC_KEY, null) - ?: throw NoInjectedBundleException() - - val ecPrivateKey = - EllipticCurves.getEcPrivateKey( - EllipticCurves.CurveType.NIST_P256, - signingKeyHex.fromHex() - ) - - val signer = Signature.getInstance("SHA256withECDSA") - signer.initSign(ecPrivateKey) - signer.update(payload.toByteArray()) - val signature = signer.sign() - - val apiStamp = - ApiStamp(publicSigningKeyHex, "SIGNATURE_SCHEME_TK_API_P256", signature.toHex()) - - return Stamp( - "X-Stamp", - Base64.urlSafeEncode(Json.encodeToString(apiStamp).toByteArray()) - ) - } - - private fun privateKeyToKeyPair(privateKey: ByteArray): Pair { - val ecPrivateKey = - EllipticCurves.getEcPrivateKey(EllipticCurves.CurveType.NIST_P256, privateKey) - - // compute the public key - val s = ecPrivateKey.s - val bcSpec = ECNamedCurveTable.getParameterSpec("secp256r1") - val pubSpec = ECPublicKeySpec(bcSpec.g.multiply(s).normalize(), bcSpec) - val keyFactory = KeyFactory.getInstance("EC", BouncyCastleProvider.PROVIDER_NAME) - - val ecPublicKey = EllipticCurves.getEcPublicKey(keyFactory.generatePublic(pubSpec).encoded) - - // verify the key pair - EllipticCurves.validatePublicKey(ecPublicKey, ecPrivateKey) - - // compress it to match turnkey expectations - val compressedPublicKey = - ecPublicKey.toBytes( - EllipticCurves.PointFormatType.COMPRESSED, - ) - return Pair(compressedPublicKey, privateKey) - } - - private fun createSharedPreferences(masterKey: MasterKey, context: Context): SharedPreferences { - return EncryptedSharedPreferences.create( - context, - ENCRYPTED_SHARED_PREFERENCES_FILENAME, - masterKey, - EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV, - EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM - ) - } - - private fun createMasterKey(context: Context): MasterKey { - return MasterKey.Builder(context.applicationContext, MASTER_KEY_ALIAS) - .setKeyScheme(MasterKey.KeyScheme.AES256_GCM) - .setUserAuthenticationRequired(false) - .build() - } - - - private fun getSharedPreferences(context: Context): SharedPreferences { - try { - // Attempt to create or load the EncryptedSharedPreferences file - val masterKey = createMasterKey(context) - - return createSharedPreferences(masterKey, context) - } catch(e: Exception) { - // Log the Exception - e.printStackTrace() - } - - // An error occured creating or retrieving the Shared Preferences file. - // Delete the existing master key and EncryptedSharedPreferences - - // first delete the MasterKey - try { - val keyStore = KeyStore.getInstance("AndroidKeyStore") - keyStore.load(null) - keyStore.deleteEntry(MASTER_KEY_ALIAS) - } catch (keyStoreDeletionException: Exception) { - throw RuntimeException("An error occured deleting the Master Key", keyStoreDeletionException) - } - - // attempt to recreate a new EncryptedSharedPreferences file - try { - // Create a new MasterKey - val newMasterKey = createMasterKey(context) - context.getSharedPreferences(ENCRYPTED_SHARED_PREFERENCES_FILENAME, Context.MODE_PRIVATE).edit().clear().apply() - context.deleteSharedPreferences(ENCRYPTED_SHARED_PREFERENCES_FILENAME) - - return createSharedPreferences(newMasterKey, context) - } catch(retryException: Exception) { - throw RuntimeException("Couldn't create the required shared preferences file. Ensure you are properly authenticated on this device.", retryException) - } - } -} \ No newline at end of file diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/NoInjectedBundleException.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/NoInjectedBundleException.kt deleted file mode 100644 index 43b8baf2d4..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/NoInjectedBundleException.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.accountkit.reactnativesigner.core.errors - -class NoInjectedBundleException: IllegalStateException("No injected bundle, did you complete auth?") \ No newline at end of file diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/NoTEKException.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/NoTEKException.kt deleted file mode 100644 index c7481d4629..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/NoTEKException.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.accountkit.reactnativesigner.core.errors - -class NoTEKException: IllegalStateException("No TEK found!") \ No newline at end of file diff --git a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/StamperNotInitialized.kt b/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/StamperNotInitialized.kt deleted file mode 100644 index a46dc492e6..0000000000 --- a/account-kit/rn-signer/android/src/main/java/com/accountkit/reactnativesigner/core/errors/StamperNotInitialized.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.accountkit.reactnativesigner.core.errors - -class StamperNotInitializedException: IllegalStateException("Stamper has not been initialized") \ No newline at end of file diff --git a/account-kit/rn-signer/babel.config.js b/account-kit/rn-signer/babel.config.js deleted file mode 100644 index cf231eecd0..0000000000 --- a/account-kit/rn-signer/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - ["module:react-native-builder-bob/babel-preset", { modules: "commonjs" }], - ], -}; diff --git a/account-kit/rn-signer/example/.bundle/config b/account-kit/rn-signer/example/.bundle/config deleted file mode 100644 index 848943bb52..0000000000 --- a/account-kit/rn-signer/example/.bundle/config +++ /dev/null @@ -1,2 +0,0 @@ -BUNDLE_PATH: "vendor/bundle" -BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/account-kit/rn-signer/example/.env.example b/account-kit/rn-signer/example/.env.example deleted file mode 100644 index 66bfaaef0d..0000000000 --- a/account-kit/rn-signer/example/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -API_KEY="" -RP_ID="example.com" diff --git a/account-kit/rn-signer/example/.watchmanconfig b/account-kit/rn-signer/example/.watchmanconfig deleted file mode 100644 index 0967ef424b..0000000000 --- a/account-kit/rn-signer/example/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/account-kit/rn-signer/example/Gemfile b/account-kit/rn-signer/example/Gemfile deleted file mode 100644 index 85d7f68286..0000000000 --- a/account-kit/rn-signer/example/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source 'https://rubygems.org' - -# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby ">= 2.6.10" - -# Exclude problematic versions of cocoapods and activesupport that causes build failures. -gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' -gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' -gem 'xcodeproj', '< 1.26.0' diff --git a/account-kit/rn-signer/example/Gemfile.lock b/account-kit/rn-signer/example/Gemfile.lock deleted file mode 100644 index 14eb822040..0000000000 --- a/account-kit/rn-signer/example/Gemfile.lock +++ /dev/null @@ -1,117 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - activesupport (7.2.2.1) - base64 - benchmark (>= 0.3) - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - atomos (0.1.3) - base64 (0.2.0) - benchmark (0.4.0) - bigdecimal (3.1.8) - claide (1.1.0) - cocoapods (1.15.2) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.15.2) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 2.1, < 3.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.6.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.15.2) - activesupport (>= 5.0, < 8) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (2.1) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) - colored2 (3.1.2) - concurrent-ruby (1.3.4) - connection_pool (2.4.1) - drb (2.2.1) - escape (0.0.4) - ethon (0.16.0) - ffi (>= 1.15.0) - ffi (1.17.0) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - httpclient (2.8.3) - i18n (1.14.6) - concurrent-ruby (~> 1.0) - json (2.9.0) - logger (1.6.2) - minitest (5.25.4) - molinillo (0.8.0) - nanaimo (0.3.0) - nap (1.1.0) - netrc (0.11.0) - nkf (0.2.0) - public_suffix (4.0.7) - rexml (3.3.9) - ruby-macho (2.5.1) - securerandom (0.4.0) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - xcodeproj (1.25.1) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (>= 3.3.6, < 4.0) - -PLATFORMS - ruby - -DEPENDENCIES - activesupport (>= 6.1.7.5, != 7.1.0) - cocoapods (>= 1.13, != 1.15.1, != 1.15.0) - xcodeproj (< 1.26.0) - -RUBY VERSION - ruby 3.3.1p55 - -BUNDLED WITH - 2.5.9 diff --git a/account-kit/rn-signer/example/README.md b/account-kit/rn-signer/example/README.md deleted file mode 100644 index 8bd066df02..0000000000 --- a/account-kit/rn-signer/example/README.md +++ /dev/null @@ -1,79 +0,0 @@ -This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). - -# Getting Started - -> **Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. - -## Step 1: Start the Metro Server - -First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. - -To start Metro, run the following command from the _root_ of your React Native project: - -```bash -# using npm -npm start - -# OR using Yarn -yarn start -``` - -## Step 2: Start your Application - -Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: - -### For Android - -```bash -# using npm -npm run android - -# OR using Yarn -yarn android -``` - -### For iOS - -```bash -# using npm -npm run ios - -# OR using Yarn -yarn ios -``` - -If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. - -This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. - -## Step 3: Modifying your App - -Now that you have successfully run the app, let's modify it. - -1. Open `App.tsx` in your text editor of choice and edit some lines. -2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! - - For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! - -## Congratulations! :tada: - -You've successfully run and modified your React Native App. :partying_face: - -### Now what? - -- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). -- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). - -# Troubleshooting - -If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. - -# Learn More - -To learn more about React Native, take a look at the following resources: - -- [React Native Website](https://reactnative.dev) - learn more about React Native. -- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. -- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. -- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. -- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. diff --git a/account-kit/rn-signer/example/android/app/build.gradle b/account-kit/rn-signer/example/android/app/build.gradle deleted file mode 100644 index 62d8be4190..0000000000 --- a/account-kit/rn-signer/example/android/app/build.gradle +++ /dev/null @@ -1,133 +0,0 @@ -apply plugin: "com.android.application" -apply plugin: "org.jetbrains.kotlin.android" -apply plugin: "com.facebook.react" -apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" - -/** - * This is the configuration block to customize your React Native Android app. - * By default you don't need to apply any configuration, just uncomment the lines you need. - */ -react { - /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '../..' - // root = file("../../") - // The folder where the react-native NPM package is. Default is ../../node_modules/react-native - // reactNativeDir = file("../../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen - // codegenDir = file("../../node_modules/@react-native/codegen") - // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js - // cliFile = file("../../node_modules/react-native/cli.js") - - /* Variants */ - // The list of variants to that are debuggable. For those we're going to - // skip the bundling of the JS bundle and the assets. By default is just 'debug'. - // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. - // debuggableVariants = ["liteDebug", "prodDebug"] - - /* Bundling */ - // A list containing the node command and its flags. Default is just 'node'. - // nodeExecutableAndArgs = ["node"] - // - // The command to run when bundling. By default is 'bundle' - // bundleCommand = "ram-bundle" - // - // The path to the CLI configuration file. Default is empty. - // bundleConfig = file(../rn-cli.config.js) - // - // The name of the generated asset file containing your JS bundle - // bundleAssetName = "MyApplication.android.bundle" - // - // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' - // entryFile = file("../js/MyApplication.android.js") - // - // A list of extra flags to pass to the 'bundle' commands. - // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle - // extraPackagerArgs = [] - - /* Hermes Commands */ - // The hermes compiler command to run. By default it is 'hermesc' - // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" - // - // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" - // hermesFlags = ["-O", "-output-source-map"] - - /* Autolinking */ - autolinkLibrariesWithApp() -} - -/** - * Set this to true to Run Proguard on Release builds to minify the Java bytecode. - */ -def enableProguardInReleaseBuilds = false - -/** - * The preferred build flavor of JavaScriptCore (JSC) - * - * For example, to use the international variant, you can use: - * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` - * - * The international variant includes ICU i18n library and necessary data - * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that - * this variant is about 6MiB larger per architecture than default. - */ -def jscFlavor = 'org.webkit:android-jsc:+' - -android { - ndkVersion rootProject.ext.ndkVersion - buildToolsVersion rootProject.ext.buildToolsVersion - compileSdk rootProject.ext.compileSdkVersion - - namespace "accountkit.reactnativesigner.example" - defaultConfig { - applicationId "accountkit.reactnativesigner.example" - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0" - } - signingConfigs { - debug { - storeFile file('debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - } - buildTypes { - debug { - signingConfig signingConfigs.debug - } - release { - // Caution! In production, you need to generate your own keystore file. - // see https://reactnative.dev/docs/signed-apk-android. - signingConfig signingConfigs.debug - minifyEnabled enableProguardInReleaseBuilds - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - } - } -} - -dependencies { - // The version of react-native is set by the React Native Gradle Plugin - implementation("com.facebook.react:react-android") - - if (hermesEnabled.toBoolean()) { - implementation("com.facebook.react:hermes-android") - } else { - implementation jscFlavor - } -} - -def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" -} - -if (isNewArchitectureEnabled()) { - // Since our library doesn't invoke codegen automatically we need to do it here. - tasks.register('invokeLibraryCodegen', Exec) { - workingDir "$rootDir/../../" - commandLine "npx", "bob", "build", "--target", "codegen" - } - preBuild.dependsOn invokeLibraryCodegen -} \ No newline at end of file diff --git a/account-kit/rn-signer/example/android/app/debug.keystore b/account-kit/rn-signer/example/android/app/debug.keystore deleted file mode 100644 index 364e105ed3..0000000000 Binary files a/account-kit/rn-signer/example/android/app/debug.keystore and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/proguard-rules.pro b/account-kit/rn-signer/example/android/app/proguard-rules.pro deleted file mode 100644 index 11b025724a..0000000000 --- a/account-kit/rn-signer/example/android/app/proguard-rules.pro +++ /dev/null @@ -1,10 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: diff --git a/account-kit/rn-signer/example/android/app/src/debug/AndroidManifest.xml b/account-kit/rn-signer/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index eb98c01afd..0000000000 --- a/account-kit/rn-signer/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/account-kit/rn-signer/example/android/app/src/main/AndroidManifest.xml b/account-kit/rn-signer/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 11b1c1af58..0000000000 --- a/account-kit/rn-signer/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/account-kit/rn-signer/example/android/app/src/main/java/accountkit/reactnativesigner/example/MainActivity.kt b/account-kit/rn-signer/example/android/app/src/main/java/accountkit/reactnativesigner/example/MainActivity.kt deleted file mode 100644 index 5646c05219..0000000000 --- a/account-kit/rn-signer/example/android/app/src/main/java/accountkit/reactnativesigner/example/MainActivity.kt +++ /dev/null @@ -1,27 +0,0 @@ -package accountkit.reactnativesigner.example - -import com.facebook.react.ReactActivity -import com.facebook.react.ReactActivityDelegate -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled -import com.facebook.react.defaults.DefaultReactActivityDelegate -import android.os.Bundle - -class MainActivity : ReactActivity() { - - // Necessary for react-native-screens - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(null) - } - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - override fun getMainComponentName(): String = "ReactNativeSignerExample" - - /** - * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] - * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] - */ - override fun createReactActivityDelegate(): ReactActivityDelegate = - DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) -} diff --git a/account-kit/rn-signer/example/android/app/src/main/java/accountkit/reactnativesigner/example/MainApplication.kt b/account-kit/rn-signer/example/android/app/src/main/java/accountkit/reactnativesigner/example/MainApplication.kt deleted file mode 100644 index bcdab076c4..0000000000 --- a/account-kit/rn-signer/example/android/app/src/main/java/accountkit/reactnativesigner/example/MainApplication.kt +++ /dev/null @@ -1,48 +0,0 @@ -package accountkit.reactnativesigner.example - -import android.app.Application -import com.accountkit.reactnativesigner.NativeTEKStamperModule -import com.accountkit.reactnativesigner.NativeTEKStamperSpec -import com.accountkit.reactnativesigner.ReactNativeSignerPackage -import com.facebook.react.PackageList -import com.facebook.react.ReactApplication -import com.facebook.react.ReactHost -import com.facebook.react.ReactNativeHost -import com.facebook.react.ReactPackage -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load -import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost -import com.facebook.react.defaults.DefaultReactNativeHost -import com.facebook.react.soloader.OpenSourceMergedSoMapping -import com.facebook.soloader.SoLoader - -class MainApplication : Application(), ReactApplication { - - override val reactNativeHost: ReactNativeHost = - object : DefaultReactNativeHost(this) { - override fun getPackages(): List = - PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for - // example: - add(ReactNativeSignerPackage()) - } - - override fun getJSMainModuleName(): String = "index" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - - override val reactHost: ReactHost - get() = getDefaultReactHost(applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, OpenSourceMergedSoMapping) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() - } - } -} diff --git a/account-kit/rn-signer/example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/account-kit/rn-signer/example/android/app/src/main/res/drawable/rn_edit_text_material.xml deleted file mode 100644 index 5c25e728ea..0000000000 --- a/account-kit/rn-signer/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index a2f5908281..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 1b52399808..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index ff10afd6e1..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 115a4c768a..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index dcd3cd8083..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 459ca609d3..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 8ca12fe024..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 8e19b410a1..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index b824ebdd48..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 4c19a13c23..0000000000 Binary files a/account-kit/rn-signer/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/account-kit/rn-signer/example/android/app/src/main/res/values/strings.xml b/account-kit/rn-signer/example/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 809f931eb7..0000000000 --- a/account-kit/rn-signer/example/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - ReactNativeSignerExample - diff --git a/account-kit/rn-signer/example/android/app/src/main/res/values/styles.xml b/account-kit/rn-signer/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 7ba83a2ad5..0000000000 --- a/account-kit/rn-signer/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/account-kit/rn-signer/example/android/build.gradle b/account-kit/rn-signer/example/android/build.gradle deleted file mode 100644 index 1dbaf8aa2a..0000000000 --- a/account-kit/rn-signer/example/android/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -import com.vanniktech.maven.publish.AndroidSingleVariantLibrary -import com.vanniktech.maven.publish.SonatypeHost - -buildscript { - ext { - buildToolsVersion = "35.0.0" - minSdkVersion = 24 - compileSdkVersion = 35 - targetSdkVersion = 34 - ndkVersion = "26.1.10909125" - kotlinVersion = "1.9.24" - } - repositories { - google() - mavenCentral() - } - dependencies { - classpath("com.android.tools.build:gradle") - classpath("com.facebook.react:react-native-gradle-plugin") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") - } -} - -plugins { - id("com.vanniktech.maven.publish") version "0.30.0" -} - -apply plugin: "com.facebook.react.rootproject" - -allprojects { - // Force a compatible version of androidx.browser - configurations.all { - resolutionStrategy { - force 'androidx.browser:browser:1.8.0' - } - } -} diff --git a/account-kit/rn-signer/example/android/gradle.properties b/account-kit/rn-signer/example/android/gradle.properties deleted file mode 100644 index 359159cbfd..0000000000 --- a/account-kit/rn-signer/example/android/gradle.properties +++ /dev/null @@ -1,39 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true - -# Use this property to specify which architecture you want to build. -# You can also override it from the CLI using -# ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 - -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. -newArchEnabled=true - -# Use this property to enable or disable the Hermes JS engine. -# If set to false, you will be using JSC instead. -hermesEnabled=true \ No newline at end of file diff --git a/account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.jar b/account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a4b76b9530..0000000000 Binary files a/account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.properties b/account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 79eb9d003f..0000000000 --- a/account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/account-kit/rn-signer/example/android/gradlew b/account-kit/rn-signer/example/android/gradlew deleted file mode 100755 index f5feea6d6b..0000000000 --- a/account-kit/rn-signer/example/android/gradlew +++ /dev/null @@ -1,252 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/account-kit/rn-signer/example/android/gradlew.bat b/account-kit/rn-signer/example/android/gradlew.bat deleted file mode 100644 index 9d21a21834..0000000000 --- a/account-kit/rn-signer/example/android/gradlew.bat +++ /dev/null @@ -1,94 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/account-kit/rn-signer/example/android/settings.gradle b/account-kit/rn-signer/example/android/settings.gradle deleted file mode 100644 index 1bdfd42e50..0000000000 --- a/account-kit/rn-signer/example/android/settings.gradle +++ /dev/null @@ -1,6 +0,0 @@ -pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } -plugins { id("com.facebook.react.settings") } -extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } -rootProject.name = 'accountkit.reactnativesigner.example' -include ':app' -includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/account-kit/rn-signer/example/app.json b/account-kit/rn-signer/example/app.json deleted file mode 100644 index cb050f87ea..0000000000 --- a/account-kit/rn-signer/example/app.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "ReactNativeSignerExample", - "displayName": "ReactNativeSignerExample" -} diff --git a/account-kit/rn-signer/example/babel.config.js b/account-kit/rn-signer/example/babel.config.js deleted file mode 100644 index 57720332e0..0000000000 --- a/account-kit/rn-signer/example/babel.config.js +++ /dev/null @@ -1,12 +0,0 @@ -const path = require("path"); -const { getConfig } = require("react-native-builder-bob/babel-config"); -const pkg = require("../package.json"); - -const root = path.resolve(__dirname, ".."); - -module.exports = getConfig( - { - presets: ["module:@react-native/babel-preset"], - }, - { root, pkg }, -); diff --git a/account-kit/rn-signer/example/index.js b/account-kit/rn-signer/example/index.js deleted file mode 100644 index 5399deb07e..0000000000 --- a/account-kit/rn-signer/example/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import { AppRegistry } from "react-native"; -// eslint-disable-next-line import/extensions -import App from "./src/App"; -import { name as appName } from "./app.json"; - -AppRegistry.registerComponent(appName, () => App); diff --git a/account-kit/rn-signer/example/ios/.xcode.env b/account-kit/rn-signer/example/ios/.xcode.env deleted file mode 100644 index 3d5782c715..0000000000 --- a/account-kit/rn-signer/example/ios/.xcode.env +++ /dev/null @@ -1,11 +0,0 @@ -# This `.xcode.env` file is versioned and is used to source the environment -# used when running script phases inside Xcode. -# To customize your local environment, you can create an `.xcode.env.local` -# file that is not versioned. - -# NODE_BINARY variable contains the PATH to the node executable. -# -# Customize the NODE_BINARY variable here. -# For example, to use nvm with brew, add the following line -# . "$(brew --prefix nvm)/nvm.sh" --no-use -export NODE_BINARY=$(command -v node) diff --git a/account-kit/rn-signer/example/ios/File.swift b/account-kit/rn-signer/example/ios/File.swift deleted file mode 100644 index 324aa6ad29..0000000000 --- a/account-kit/rn-signer/example/ios/File.swift +++ /dev/null @@ -1,6 +0,0 @@ -// -// File.swift -// ReactNativeSignerExample -// - -import Foundation diff --git a/account-kit/rn-signer/example/ios/Podfile b/account-kit/rn-signer/example/ios/Podfile deleted file mode 100644 index 446e63e7aa..0000000000 --- a/account-kit/rn-signer/example/ios/Podfile +++ /dev/null @@ -1,47 +0,0 @@ -ENV['RCT_NEW_ARCH_ENABLED'] = '1' - -# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command('node', ['-p', - 'require.resolve( - "react-native/scripts/react_native_pods.rb", - {paths: [process.argv[1]]}, - )', __dir__]).strip - -platform :ios, '17.0' -prepare_react_native_project! - -linkage = ENV['USE_FRAMEWORKS'] -if linkage != nil - Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green - use_frameworks! :linkage => linkage.to_sym -end - -target 'ReactNativeSignerExample' do - config = use_native_modules! - - use_react_native!( - :path => config[:reactNativePath], - # An absolute path to your application root. - :app_path => "#{Pod::Config.instance.installation_root}/.." - ) - - target 'ReactNativeSignerExampleTests' do - inherit! :complete - # Pods for testing - end - - - pre_install do |installer| - system("cd ../../ && npx bob build --target codegen") - end - - post_install do |installer| - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false, - # :ccache_enabled => true - ) - end -end diff --git a/account-kit/rn-signer/example/ios/Podfile.lock b/account-kit/rn-signer/example/ios/Podfile.lock deleted file mode 100644 index ce9460b348..0000000000 --- a/account-kit/rn-signer/example/ios/Podfile.lock +++ /dev/null @@ -1,2019 +0,0 @@ -PODS: - - account-kit-react-native-signer (4.36.1): - - Base58Swift - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - Base58Swift (2.1.10): - - BigInt (~> 5.0.0) - - BigInt (5.0.0) - - boost (1.84.0) - - DoubleConversion (1.1.6) - - FBLazyVector (0.76.5) - - fmt (9.1.0) - - glog (0.3.5) - - hermes-engine (0.76.5): - - hermes-engine/Pre-built (= 0.76.5) - - hermes-engine/Pre-built (0.76.5) - - RCT-Folly (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Default (= 2024.01.01.00) - - RCT-Folly/Default (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCTDeprecation (0.76.5) - - RCTRequired (0.76.5) - - RCTTypeSafety (0.76.5): - - FBLazyVector (= 0.76.5) - - RCTRequired (= 0.76.5) - - React-Core (= 0.76.5) - - React (0.76.5): - - React-Core (= 0.76.5) - - React-Core/DevSupport (= 0.76.5) - - React-Core/RCTWebSocket (= 0.76.5) - - React-RCTActionSheet (= 0.76.5) - - React-RCTAnimation (= 0.76.5) - - React-RCTBlob (= 0.76.5) - - React-RCTImage (= 0.76.5) - - React-RCTLinking (= 0.76.5) - - React-RCTNetwork (= 0.76.5) - - React-RCTSettings (= 0.76.5) - - React-RCTText (= 0.76.5) - - React-RCTVibration (= 0.76.5) - - React-callinvoker (0.76.5) - - React-Codegen (0.1.0) - - React-Core (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/CoreModulesHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/Default (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/DevSupport (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-Core/RCTWebSocket (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTActionSheetHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTAnimationHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTBlobHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTImageHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTLinkingHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTNetworkHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTSettingsHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTTextHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTVibrationHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTWebSocket (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-CoreModules (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety (= 0.76.5) - - React-Core/CoreModulesHeaders (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-NativeModulesApple - - React-RCTBlob - - React-RCTImage (= 0.76.5) - - ReactCodegen - - ReactCommon - - SocketRocket (= 0.7.1) - - React-cxxreact (0.76.5): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-debug (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - React-runtimeexecutor (= 0.76.5) - - React-timing (= 0.76.5) - - React-debug (0.76.5) - - React-defaultsnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-domnativemodule - - React-Fabric - - React-featureflags - - React-featureflagsnativemodule - - React-graphics - - React-idlecallbacksnativemodule - - React-ImageManager - - React-microtasksnativemodule - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-domnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/animations (= 0.76.5) - - React-Fabric/attributedstring (= 0.76.5) - - React-Fabric/componentregistry (= 0.76.5) - - React-Fabric/componentregistrynative (= 0.76.5) - - React-Fabric/components (= 0.76.5) - - React-Fabric/core (= 0.76.5) - - React-Fabric/dom (= 0.76.5) - - React-Fabric/imagemanager (= 0.76.5) - - React-Fabric/leakchecker (= 0.76.5) - - React-Fabric/mounting (= 0.76.5) - - React-Fabric/observers (= 0.76.5) - - React-Fabric/scheduler (= 0.76.5) - - React-Fabric/telemetry (= 0.76.5) - - React-Fabric/templateprocessor (= 0.76.5) - - React-Fabric/uimanager (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/animations (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/components/legacyviewmanagerinterop (= 0.76.5) - - React-Fabric/components/root (= 0.76.5) - - React-Fabric/components/view (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric/core (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/dom (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers/events (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-performancetimeline - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/uimanager/consistency (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager/consistency (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-FabricComponents (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components (= 0.76.5) - - React-FabricComponents/textlayoutmanager (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components/inputaccessory (= 0.76.5) - - React-FabricComponents/components/iostextinput (= 0.76.5) - - React-FabricComponents/components/modal (= 0.76.5) - - React-FabricComponents/components/rncore (= 0.76.5) - - React-FabricComponents/components/safeareaview (= 0.76.5) - - React-FabricComponents/components/scrollview (= 0.76.5) - - React-FabricComponents/components/text (= 0.76.5) - - React-FabricComponents/components/textinput (= 0.76.5) - - React-FabricComponents/components/unimplementedview (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/inputaccessory (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/iostextinput (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/modal (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/rncore (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/safeareaview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/scrollview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/text (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/textinput (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/unimplementedview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/textlayoutmanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricImage (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired (= 0.76.5) - - RCTTypeSafety (= 0.76.5) - - React-Fabric - - React-graphics - - React-ImageManager - - React-jsi - - React-jsiexecutor (= 0.76.5) - - React-logger - - React-rendererdebug - - React-utils - - ReactCommon - - Yoga - - React-featureflags (0.76.5) - - React-featureflagsnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-graphics (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-jsi - - React-jsiexecutor - - React-utils - - React-hermes (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.5) - - React-jsi - - React-jsiexecutor (= 0.76.5) - - React-jsinspector - - React-perflogger (= 0.76.5) - - React-runtimeexecutor - - React-idlecallbacksnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-ImageManager (0.76.5): - - glog - - RCT-Folly/Fabric - - React-Core/Default - - React-debug - - React-Fabric - - React-graphics - - React-rendererdebug - - React-utils - - React-jserrorhandler (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-debug - - React-jsi - - React-jsi (0.76.5): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-jsiexecutor (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-perflogger (= 0.76.5) - - React-jsinspector (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-featureflags - - React-jsi - - React-perflogger (= 0.76.5) - - React-runtimeexecutor (= 0.76.5) - - React-jsitracing (0.76.5): - - React-jsi - - React-logger (0.76.5): - - glog - - React-Mapbuffer (0.76.5): - - glog - - React-debug - - React-microtasksnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-config (1.5.3): - - react-native-config/App (= 1.5.3) - - react-native-config/App (1.5.3): - - React-Core - - react-native-get-random-values (1.11.0): - - React-Core - - react-native-mmkv (3.1.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-passkey (3.1.0): - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Codegen - - React-Core - - ReactCommon/turbomodule/core - - react-native-safe-area-context (4.14.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common (= 4.14.0) - - react-native-safe-area-context/fabric (= 4.14.0) - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/common (4.14.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/fabric (4.14.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-nativeconfig (0.76.5) - - React-NativeModulesApple (0.76.5): - - glog - - hermes-engine - - React-callinvoker - - React-Core - - React-cxxreact - - React-jsi - - React-jsinspector - - React-runtimeexecutor - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-perflogger (0.76.5): - - DoubleConversion - - RCT-Folly (= 2024.01.01.00) - - React-performancetimeline (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact - - React-timing - - React-RCTActionSheet (0.76.5): - - React-Core/RCTActionSheetHeaders (= 0.76.5) - - React-RCTAnimation (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTAnimationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTAppDelegate (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-CoreModules - - React-debug - - React-defaultsnativemodule - - React-Fabric - - React-featureflags - - React-graphics - - React-hermes - - React-nativeconfig - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-RCTNetwork - - React-rendererdebug - - React-RuntimeApple - - React-RuntimeCore - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon - - React-RCTBlob (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTBlobHeaders - - React-Core/RCTWebSocket - - React-jsi - - React-jsinspector - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTFabric (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-FabricImage - - React-featureflags - - React-graphics - - React-ImageManager - - React-jsi - - React-jsinspector - - React-nativeconfig - - React-performancetimeline - - React-RCTImage - - React-RCTText - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - Yoga - - React-RCTImage (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTImageHeaders - - React-jsi - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTLinking (0.76.5): - - React-Core/RCTLinkingHeaders (= 0.76.5) - - React-jsi (= 0.76.5) - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - ReactCommon/turbomodule/core (= 0.76.5) - - React-RCTNetwork (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTNetworkHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTSettings (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTSettingsHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTText (0.76.5): - - React-Core/RCTTextHeaders (= 0.76.5) - - Yoga - - React-RCTVibration (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTVibrationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-rendererconsistency (0.76.5) - - React-rendererdebug (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-rncore (0.76.5) - - React-RuntimeApple (0.76.5): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-callinvoker - - React-Core/Default - - React-CoreModules - - React-cxxreact - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-Mapbuffer - - React-NativeModulesApple - - React-RCTFabric - - React-RuntimeCore - - React-runtimeexecutor - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - React-RuntimeCore (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-featureflags - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-performancetimeline - - React-runtimeexecutor - - React-runtimescheduler - - React-utils - - React-runtimeexecutor (0.76.5): - - React-jsi (= 0.76.5) - - React-RuntimeHermes (0.76.5): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-featureflags - - React-hermes - - React-jsi - - React-jsinspector - - React-jsitracing - - React-nativeconfig - - React-RuntimeCore - - React-utils - - React-runtimescheduler (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker - - React-cxxreact - - React-debug - - React-featureflags - - React-jsi - - React-performancetimeline - - React-rendererconsistency - - React-rendererdebug - - React-runtimeexecutor - - React-timing - - React-utils - - React-timing (0.76.5) - - React-utils (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-jsi (= 0.76.5) - - ReactCodegen (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricImage - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-NativeModulesApple - - React-rendererdebug - - React-utils - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - ReactCommon (0.76.5): - - ReactCommon/turbomodule (= 0.76.5) - - ReactCommon/turbomodule (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - ReactCommon/turbomodule/bridging (= 0.76.5) - - ReactCommon/turbomodule/core (= 0.76.5) - - ReactCommon/turbomodule/bridging (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - ReactCommon/turbomodule/core (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-debug (= 0.76.5) - - React-featureflags (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - React-utils (= 0.76.5) - - RNGestureHandler (2.21.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - RNInAppBrowser (3.7.0): - - React-Core - - RNScreens (4.2.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - RNScreens/common (= 4.2.0) - - Yoga - - RNScreens/common (4.2.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - SocketRocket (0.7.1) - - Yoga (0.0.0) - -DEPENDENCIES: - - account-kit-react-native-signer (from `../..`) - - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) - - RCTRequired (from `../node_modules/react-native/Libraries/Required`) - - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../node_modules/react-native/`) - - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - - React-Core (from `../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) - - React-defaultsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) - - React-domnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/dom`) - - React-Fabric (from `../node_modules/react-native/ReactCommon`) - - React-FabricComponents (from `../node_modules/react-native/ReactCommon`) - - React-FabricImage (from `../node_modules/react-native/ReactCommon`) - - React-featureflags (from `../node_modules/react-native/ReactCommon/react/featureflags`) - - React-featureflagsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) - - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) - - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - - React-idlecallbacksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) - - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) - - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`) - - React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`) - - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) - - react-native-config (from `../node_modules/react-native-config`) - - react-native-get-random-values (from `../node_modules/react-native-get-random-values`) - - react-native-mmkv (from `../node_modules/react-native-mmkv`) - - react-native-passkey (from `../node_modules/react-native-passkey`) - - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - - React-performancetimeline (from `../node_modules/react-native/ReactCommon/react/performance/timeline`) - - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) - - React-RCTFabric (from `../node_modules/react-native/React`) - - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - React-rendererconsistency (from `../node_modules/react-native/ReactCommon/react/renderer/consistency`) - - React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`) - - React-rncore (from `../node_modules/react-native/ReactCommon`) - - React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) - - React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - - React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - - React-timing (from `../node_modules/react-native/ReactCommon/react/timing`) - - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - - ReactCodegen (from `build/generated/ios`) - - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - - RNInAppBrowser (from `../node_modules/react-native-inappbrowser-reborn`) - - RNScreens (from `../node_modules/react-native-screens`) - - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) - -SPEC REPOS: - trunk: - - Base58Swift - - BigInt - - React-Codegen - - SocketRocket - -EXTERNAL SOURCES: - account-kit-react-native-signer: - :path: "../.." - boost: - :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" - DoubleConversion: - :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" - FBLazyVector: - :path: "../node_modules/react-native/Libraries/FBLazyVector" - fmt: - :podspec: "../node_modules/react-native/third-party-podspecs/fmt.podspec" - glog: - :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" - hermes-engine: - :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2024-11-12-RNv0.76.2-5b4aa20c719830dcf5684832b89a6edb95ac3d64 - RCT-Folly: - :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" - RCTDeprecation: - :path: "../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" - RCTRequired: - :path: "../node_modules/react-native/Libraries/Required" - RCTTypeSafety: - :path: "../node_modules/react-native/Libraries/TypeSafety" - React: - :path: "../node_modules/react-native/" - React-callinvoker: - :path: "../node_modules/react-native/ReactCommon/callinvoker" - React-Core: - :path: "../node_modules/react-native/" - React-CoreModules: - :path: "../node_modules/react-native/React/CoreModules" - React-cxxreact: - :path: "../node_modules/react-native/ReactCommon/cxxreact" - React-debug: - :path: "../node_modules/react-native/ReactCommon/react/debug" - React-defaultsnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/defaults" - React-domnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/dom" - React-Fabric: - :path: "../node_modules/react-native/ReactCommon" - React-FabricComponents: - :path: "../node_modules/react-native/ReactCommon" - React-FabricImage: - :path: "../node_modules/react-native/ReactCommon" - React-featureflags: - :path: "../node_modules/react-native/ReactCommon/react/featureflags" - React-featureflagsnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" - React-graphics: - :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" - React-hermes: - :path: "../node_modules/react-native/ReactCommon/hermes" - React-idlecallbacksnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" - React-ImageManager: - :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" - React-jserrorhandler: - :path: "../node_modules/react-native/ReactCommon/jserrorhandler" - React-jsi: - :path: "../node_modules/react-native/ReactCommon/jsi" - React-jsiexecutor: - :path: "../node_modules/react-native/ReactCommon/jsiexecutor" - React-jsinspector: - :path: "../node_modules/react-native/ReactCommon/jsinspector-modern" - React-jsitracing: - :path: "../node_modules/react-native/ReactCommon/hermes/executor/" - React-logger: - :path: "../node_modules/react-native/ReactCommon/logger" - React-Mapbuffer: - :path: "../node_modules/react-native/ReactCommon" - React-microtasksnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" - react-native-config: - :path: "../node_modules/react-native-config" - react-native-get-random-values: - :path: "../node_modules/react-native-get-random-values" - react-native-mmkv: - :path: "../node_modules/react-native-mmkv" - react-native-passkey: - :path: "../node_modules/react-native-passkey" - react-native-safe-area-context: - :path: "../node_modules/react-native-safe-area-context" - React-nativeconfig: - :path: "../node_modules/react-native/ReactCommon" - React-NativeModulesApple: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" - React-perflogger: - :path: "../node_modules/react-native/ReactCommon/reactperflogger" - React-performancetimeline: - :path: "../node_modules/react-native/ReactCommon/react/performance/timeline" - React-RCTActionSheet: - :path: "../node_modules/react-native/Libraries/ActionSheetIOS" - React-RCTAnimation: - :path: "../node_modules/react-native/Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../node_modules/react-native/Libraries/AppDelegate" - React-RCTBlob: - :path: "../node_modules/react-native/Libraries/Blob" - React-RCTFabric: - :path: "../node_modules/react-native/React" - React-RCTImage: - :path: "../node_modules/react-native/Libraries/Image" - React-RCTLinking: - :path: "../node_modules/react-native/Libraries/LinkingIOS" - React-RCTNetwork: - :path: "../node_modules/react-native/Libraries/Network" - React-RCTSettings: - :path: "../node_modules/react-native/Libraries/Settings" - React-RCTText: - :path: "../node_modules/react-native/Libraries/Text" - React-RCTVibration: - :path: "../node_modules/react-native/Libraries/Vibration" - React-rendererconsistency: - :path: "../node_modules/react-native/ReactCommon/react/renderer/consistency" - React-rendererdebug: - :path: "../node_modules/react-native/ReactCommon/react/renderer/debug" - React-rncore: - :path: "../node_modules/react-native/ReactCommon" - React-RuntimeApple: - :path: "../node_modules/react-native/ReactCommon/react/runtime/platform/ios" - React-RuntimeCore: - :path: "../node_modules/react-native/ReactCommon/react/runtime" - React-runtimeexecutor: - :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" - React-RuntimeHermes: - :path: "../node_modules/react-native/ReactCommon/react/runtime" - React-runtimescheduler: - :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" - React-timing: - :path: "../node_modules/react-native/ReactCommon/react/timing" - React-utils: - :path: "../node_modules/react-native/ReactCommon/react/utils" - ReactCodegen: - :path: build/generated/ios - ReactCommon: - :path: "../node_modules/react-native/ReactCommon" - RNGestureHandler: - :path: "../node_modules/react-native-gesture-handler" - RNInAppBrowser: - :path: "../node_modules/react-native-inappbrowser-reborn" - RNScreens: - :path: "../node_modules/react-native-screens" - Yoga: - :path: "../node_modules/react-native/ReactCommon/yoga" - -SPEC CHECKSUMS: - account-kit-react-native-signer: 9e3ed5588cc5d6a940756773d637d7676c965693 - Base58Swift: 53d551f0b33d9478fa63b3445e453a772d6b31a7 - BigInt: 74b4d88367b0e819d9f77393549226d36faeb0d8 - boost: 1dca942403ed9342f98334bf4c3621f011aa7946 - DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385 - FBLazyVector: 1bf99bb46c6af9a2712592e707347315f23947aa - fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be - glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a - hermes-engine: 06a9c6900587420b90accc394199527c64259db4 - RCT-Folly: 84578c8756030547307e4572ab1947de1685c599 - RCTDeprecation: fb7d408617e25d7f537940000d766d60149c5fea - RCTRequired: 9aaf0ffcc1f41f0c671af863970ef25c422a9920 - RCTTypeSafety: e9a6e7d48184646eb0610295b74c0dd02768cbb2 - React: fffb3cf1b0d7aee03c4eb4952b2d58783615e9fa - React-callinvoker: 3c6ecc0315d42924e01b3ddc25cf2e49d33da169 - React-Codegen: 4b8b4817cea7a54b83851d4c1f91f79aa73de30a - React-Core: 1a5ddefb00dd72644171dd39bb4bbcd7849c70f0 - React-CoreModules: 8de64f712fe272ed08f37aaf64633ddf793e70d3 - React-cxxreact: e204185e1da1c843fec2bbb10bcc5b5800355dfa - React-debug: 297ed67868a76e8384669ea9b5c65c5d9d9d15d9 - React-defaultsnativemodule: e698063aa99c75546abc7f1c18072b4d753831d8 - React-domnativemodule: bd989e5b531401d419fc598e9cc09ee843d8c2bf - React-Fabric: 925fbb4d56a3c3ef9c12366f43357a913291fdc7 - React-FabricComponents: e598e6f635699237db45e017cbe230d9094915fa - React-FabricImage: ace285e38358f01aa89a5974f5f803db72a2bb9d - React-featureflags: cb3dca1c74ba813f2e578c8c635989d01d14739f - React-featureflagsnativemodule: 8fe6e6279a0ead0735749724e6ecd8e03f3893ca - React-graphics: f7d97c8bcc5f1568fb840b6d8940af0ae89b387c - React-hermes: a12bf33d9915dbe2dcde5b6b781faab6684883fb - React-idlecallbacksnativemodule: 4dfe6da504ae4f7792132ba164c00ae192aa4a57 - React-ImageManager: 28861af68262a45e585eca5491d05cd963ab0071 - React-jserrorhandler: 15bea720b272a2e78b7731df122dbfa6e27b65aa - React-jsi: 217274301608d7fa529bd275c73020b55cf39361 - React-jsiexecutor: 1bcbc63a8c1d698b35c9fb521ee87aa48a3702d2 - React-jsinspector: 1a3345f90762b3ba2d0ab3ff5f91022487b2ed38 - React-jsitracing: 46adf5fbb769aa673145b5c57ed7cd4b7cd08e1c - React-logger: ae95f0effa7e1791bd6f7283caddca323d4fbc1e - React-Mapbuffer: 7eb5d69e1154e7743487ef0c8d7261e5b59afb32 - React-microtasksnativemodule: 01dd998649ff5f8814846b7eee84c4d57f5d3671 - react-native-config: ea75335a7cca1d3326de1da384227e580a7c082e - react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba - react-native-mmkv: eca12be5e3400be2d995a2edaa3c6c2e67b5e3ec - react-native-passkey: 3aac247c18127443ef4a002b59d8e12dc7e99f2e - react-native-safe-area-context: 819935871d06a80e963546208027f839aa972a85 - React-nativeconfig: f7ab6c152e780b99a8c17448f2d99cf5f69a2311 - React-NativeModulesApple: 9aeb901b9bfcc9235e912445fb3cf4780a99baf4 - React-perflogger: 16e049953d21b37e9871ddf0b02f414e12ff14ba - React-performancetimeline: 00d156ec43d1110a2e7dacb168a7ac95a81eccc7 - React-RCTActionSheet: a4388035260b01ac38d3647da0433b0455da9bae - React-RCTAnimation: 9cc9e88ec5f94d573d3b5d5d9702f47774d8603c - React-RCTAppDelegate: b8ca6a50167b71d67c477985597429485f39f964 - React-RCTBlob: f879b05cf702dd4099054c3c3bf05bd4757de701 - React-RCTFabric: 69ac989ccf18904cd6ad79d364cbd50343f125f3 - React-RCTImage: 8fc2b137d17fb8756cdba38d74f4d40fb9499dee - React-RCTLinking: e691e89d8658aaa772c59084a45a96e8c9ef8df1 - React-RCTNetwork: 749cb659702c3faf3efecfcb982150be0f2c834a - React-RCTSettings: 60c431627d37e6d996e0f61a9e84df8e41d898cb - React-RCTText: 74cc248bf8d2f6d07beb6196aa4c7055b3eb1a51 - React-RCTVibration: 81ff3704c7ed66a99e2670167252fd0e9a10980b - React-rendererconsistency: 42f182fe910ad6c9b449cc62adae8d0eaba76f0a - React-rendererdebug: b11083c452ed6f2a03029a9105d0d9ab7d9af1c8 - React-rncore: 85ed76036ff56e2e9c369155027cbbd84db86006 - React-RuntimeApple: 3154e09ccb48d81dcbb13f986a5313686c1d6983 - React-RuntimeCore: 985985d121db1fde5387d4dfedae78e13a5e317d - React-runtimeexecutor: 10fae9492194097c99f6e34cedbb42a308922d32 - React-RuntimeHermes: 3984572bc295675360849b07ab2608bfbd8db35d - React-runtimescheduler: 215d21fbcb922aa469c6adcf5a729e2769d210e4 - React-timing: 1050c6fa44c327f2d7538e10c548fdf521fabdb8 - React-utils: f584a494ac233c7857bab176416b0c49cb4037ba - ReactCodegen: 3a68408bf68d0957abcd13d610f76420005c1d91 - ReactCommon: 5809a8ee421b7219221a475b78180f8f34b5c5ec - RNGestureHandler: e1dcb274c17ca0680a04d7ff357e35e37c384185 - RNInAppBrowser: 6d3eb68d471b9834335c664704719b8be1bfdb20 - RNScreens: 36536f60199b83a4690d54e43a4fb240fd536d06 - SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: fcc198acd4a55599b3468cfb6ebc526baff5f06e - -PODFILE CHECKSUM: 4ca7e735ec18111c6c45ba928821c65bc53d9fe8 - -COCOAPODS: 1.16.2 diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample-Bridging-Header.h b/account-kit/rn-signer/example/ios/ReactNativeSignerExample-Bridging-Header.h deleted file mode 100644 index e11d920b12..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample-Bridging-Header.h +++ /dev/null @@ -1,3 +0,0 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcodeproj/project.pbxproj b/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcodeproj/project.pbxproj deleted file mode 100644 index fab9a4e037..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,729 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* ReactNativeSignerExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactNativeSignerExampleTests.m */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 5B978FF2A8E28AB6F5396AA4 /* libPods-ReactNativeSignerExample-ReactNativeSignerExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 694AE761963DC26F4FA1A9BA /* libPods-ReactNativeSignerExample-ReactNativeSignerExampleTests.a */; }; - 75974C4D0B95A47B9A6645AA /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - A2634D0220370C88D1FE898E /* libPods-ReactNativeSignerExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A2737B8569EE5507B3BFD125 /* libPods-ReactNativeSignerExample.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = ReactNativeSignerExample; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00E356EE1AD99517003FC87E /* ReactNativeSignerExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactNativeSignerExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* ReactNativeSignerExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactNativeSignerExampleTests.m; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* ReactNativeSignerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativeSignerExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ReactNativeSignerExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = ReactNativeSignerExample/AppDelegate.mm; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ReactNativeSignerExample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeSignerExample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativeSignerExample/main.m; sourceTree = ""; }; - 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSignerExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 3B4392A12AC88292D35C810B /* Pods-ReactNativeSignerExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSignerExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample.debug.xcconfig"; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-ReactNativeSignerExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSignerExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.debug.xcconfig"; sourceTree = ""; }; - 694AE761963DC26F4FA1A9BA /* libPods-ReactNativeSignerExample-ReactNativeSignerExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSignerExample-ReactNativeSignerExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeSignerExample/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.release.xcconfig"; sourceTree = ""; }; - A2737B8569EE5507B3BFD125 /* libPods-ReactNativeSignerExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSignerExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5B978FF2A8E28AB6F5396AA4 /* libPods-ReactNativeSignerExample-ReactNativeSignerExampleTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A2634D0220370C88D1FE898E /* libPods-ReactNativeSignerExample.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* ReactNativeSignerExampleTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* ReactNativeSignerExampleTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = ReactNativeSignerExampleTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* ReactNativeSignerExample */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, - 13B07FB71A68108700A75B9A /* main.m */, - 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, - ); - name = ReactNativeSignerExample; - sourceTree = ""; - }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - A2737B8569EE5507B3BFD125 /* libPods-ReactNativeSignerExample.a */, - 694AE761963DC26F4FA1A9BA /* libPods-ReactNativeSignerExample-ReactNativeSignerExampleTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - ); - name = Libraries; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* ReactNativeSignerExample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* ReactNativeSignerExampleTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - BBD78D7AC51CEA395F1C20DB /* Pods */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - usesTabs = 0; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* ReactNativeSignerExample.app */, - 00E356EE1AD99517003FC87E /* ReactNativeSignerExampleTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - BBD78D7AC51CEA395F1C20DB /* Pods */ = { - isa = PBXGroup; - children = ( - 3B4392A12AC88292D35C810B /* Pods-ReactNativeSignerExample.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-ReactNativeSignerExample.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* ReactNativeSignerExampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeSignerExampleTests" */; - buildPhases = ( - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = ReactNativeSignerExampleTests; - productName = ReactNativeSignerExampleTests; - productReference = 00E356EE1AD99517003FC87E /* ReactNativeSignerExampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 13B07F861A680F5B00A75B9A /* ReactNativeSignerExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeSignerExample" */; - buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ReactNativeSignerExample; - productName = ReactNativeSignerExample; - productReference = 13B07F961A680F5B00A75B9A /* ReactNativeSignerExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1210; - TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeSignerExample" */; - compatibilityVersion = "Xcode 12.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* ReactNativeSignerExample */, - 00E356ED1AD99517003FC87E /* ReactNativeSignerExampleTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 75974C4D0B95A47B9A6645AA /* PrivacyInfo.xcprivacy in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/.xcode.env.local", - "$(SRCROOT)/.xcode.env", - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; - }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ReactNativeSignerExample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample/Pods-ReactNativeSignerExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests/Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* ReactNativeSignerExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* ReactNativeSignerExample */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ReactNativeSignerExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = accountkit.reactnativesigner.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeSignerExample.app/ReactNativeSignerExample"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeSignerExample-ReactNativeSignerExampleTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = ReactNativeSignerExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = accountkit.reactnativesigner.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeSignerExample.app/ReactNativeSignerExample"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-ReactNativeSignerExample.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = ReactNativeSignerExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = accountkit.reactnativesigner.example; - PRODUCT_NAME = ReactNativeSignerExample; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-ReactNativeSignerExample.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - INFOPLIST_FILE = ReactNativeSignerExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = accountkit.reactnativesigner.example; - PRODUCT_NAME = ReactNativeSignerExample; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", - "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", - "$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS", - ); - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - "-DFOLLY_HAVE_CLOCK_GETTIME=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; - USE_HERMES = true; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", - "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", - "$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS", - ); - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - "-DFOLLY_HAVE_CLOCK_GETTIME=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - USE_HERMES = true; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeSignerExampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeSignerExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeSignerExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeSignerExample.xcscheme b/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeSignerExample.xcscheme deleted file mode 100644 index 997f832901..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeSignerExample.xcscheme +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcworkspace/contents.xcworkspacedata b/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 46d0fd5d58..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/AppDelegate.h b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/AppDelegate.h deleted file mode 100644 index 5d2808256c..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : RCTAppDelegate - -@end diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/AppDelegate.mm b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/AppDelegate.mm deleted file mode 100644 index 55d5ae0486..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/AppDelegate.mm +++ /dev/null @@ -1,47 +0,0 @@ -#import "AppDelegate.h" - -#import -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.moduleName = @"ReactNativeSignerExample"; - // You can add your custom initial props in the dictionary below. - // They will be passed down to the ViewController used by React Native. - self.initialProps = @{}; - - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ - return [self bundleURL]; -} - -- (NSURL *)bundleURL -{ -#if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; -#else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; -#endif -} - -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - options:(NSDictionary *)options -{ - return [RCTLinkingManager application:application openURL:url options:options]; -} - -- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity - restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler -{ - return [RCTLinkingManager application:application - continueUserActivity:userActivity - restorationHandler:restorationHandler]; -} - -@end diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Images.xcassets/AppIcon.appiconset/Contents.json b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index ddd7fca89e..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images": [ - { - "idiom": "iphone", - "scale": "2x", - "size": "20x20" - }, - { - "idiom": "iphone", - "scale": "3x", - "size": "20x20" - }, - { - "idiom": "iphone", - "scale": "2x", - "size": "29x29" - }, - { - "idiom": "iphone", - "scale": "3x", - "size": "29x29" - }, - { - "idiom": "iphone", - "scale": "2x", - "size": "40x40" - }, - { - "idiom": "iphone", - "scale": "3x", - "size": "40x40" - }, - { - "idiom": "iphone", - "scale": "2x", - "size": "60x60" - }, - { - "idiom": "iphone", - "scale": "3x", - "size": "60x60" - }, - { - "idiom": "ios-marketing", - "scale": "1x", - "size": "1024x1024" - } - ], - "info": { - "author": "xcode", - "version": 1 - } -} diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Images.xcassets/Contents.json b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Images.xcassets/Contents.json deleted file mode 100644 index 97a8662ebd..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info": { - "version": 1, - "author": "xcode" - } -} diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Info.plist b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Info.plist deleted file mode 100644 index e1749b0341..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/Info.plist +++ /dev/null @@ -1,64 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ReactNativeSignerExample - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLName - com.example.signerdemo - CFBundleURLSchemes - - rn-signer-demo - - - - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/LaunchScreen.storyboard b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/LaunchScreen.storyboard deleted file mode 100644 index 529b6dd721..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/LaunchScreen.storyboard +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/PrivacyInfo.xcprivacy b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/PrivacyInfo.xcprivacy deleted file mode 100644 index 41b8317f06..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,37 +0,0 @@ - - - - - NSPrivacyAccessedAPITypes - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryFileTimestamp - NSPrivacyAccessedAPITypeReasons - - C617.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryUserDefaults - NSPrivacyAccessedAPITypeReasons - - CA92.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategorySystemBootTime - NSPrivacyAccessedAPITypeReasons - - 35F9.1 - - - - NSPrivacyCollectedDataTypes - - NSPrivacyTracking - - - diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/main.m b/account-kit/rn-signer/example/ios/ReactNativeSignerExample/main.m deleted file mode 100644 index d645c7246c..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExample/main.m +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExampleTests/Info.plist b/account-kit/rn-signer/example/ios/ReactNativeSignerExampleTests/Info.plist deleted file mode 100644 index ba72822e87..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/account-kit/rn-signer/example/ios/ReactNativeSignerExampleTests/ReactNativeSignerExampleTests.m b/account-kit/rn-signer/example/ios/ReactNativeSignerExampleTests/ReactNativeSignerExampleTests.m deleted file mode 100644 index 7db5543716..0000000000 --- a/account-kit/rn-signer/example/ios/ReactNativeSignerExampleTests/ReactNativeSignerExampleTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface ReactNativeSignerExampleTests : XCTestCase - -@end - -@implementation ReactNativeSignerExampleTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction( - ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/account-kit/rn-signer/example/jest.config.js b/account-kit/rn-signer/example/jest.config.js deleted file mode 100644 index edf194615c..0000000000 --- a/account-kit/rn-signer/example/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - preset: "react-native", -}; diff --git a/account-kit/rn-signer/example/metro.config.js b/account-kit/rn-signer/example/metro.config.js deleted file mode 100644 index 4efbf1da77..0000000000 --- a/account-kit/rn-signer/example/metro.config.js +++ /dev/null @@ -1,45 +0,0 @@ -const path = require("path"); -const { getDefaultConfig } = require("@react-native/metro-config"); -const rnSignerRoot = path.resolve(__dirname, ".."); -const projectRoot = __dirname; -// handles the hoisted modules -const repoRoot = path.resolve(__dirname, "../../.."); - -const config = getDefaultConfig(projectRoot); - -const monorepoPackages = { - "@account-kit/signer": path.resolve(repoRoot, "account-kit/signer"), - "@aa-sdk/core": path.resolve(repoRoot, "aa-sdk/core"), - "@account-kit/logging": path.resolve(repoRoot, "account-kit/logging"), -}; - -config.watchFolders = [ - projectRoot, - rnSignerRoot, - ...Object.values(monorepoPackages), -]; - -// Let Metro know where to resolve packages and in what order -config.resolver.nodeModulesPaths = [ - path.resolve(projectRoot, "node_modules"), - path.resolve(rnSignerRoot, "node_modules"), - path.resolve(repoRoot, "node_modules"), -]; - -// Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths` -config.resolver.disableHierarchicalLookup = true; - -config.resolver.extraNodeModules = { - ...config.resolver.extraNodeModules, - ...require("node-libs-react-native"), - ...monorepoPackages, - crypto: require.resolve("crypto-browserify"), - stream: require.resolve("stream-browserify"), -}; - -/** - * Metro configuration - * https://facebook.github.io/metro/docs/configuration - * - */ -module.exports = config; diff --git a/account-kit/rn-signer/example/package.json b/account-kit/rn-signer/example/package.json deleted file mode 100644 index 2eb7a91753..0000000000 --- a/account-kit/rn-signer/example/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "@account-kit/react-native-signer-example", - "version": "0.0.1", - "private": true, - "scripts": { - "android": "react-native run-android && yarn start:redirect-server", - "ios": "react-native run-ios", - "start": "react-native start", - "start:redirect-server": "tsx ./redirect-server/index.ts", - "build:android": "react-native build-android --extra-params \"--no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a\"", - "build:ios": "react-native build-ios --scheme ReactNativeSignerExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"" - }, - "dependencies": { - "@account-kit/react-native-signer": "^4.16.0", - "@account-kit/signer": "^4.16.0", - "@react-navigation/bottom-tabs": "^7.2.0", - "@react-navigation/native": "7.0.3", - "@react-navigation/native-stack": "7.1.0", - "dotenv": "^16.4.5", - "express": "^4.21.1", - "react": "18.3.1", - "react-native": "0.76.5", - "react-native-config": "1.5.3", - "react-native-gesture-handler": "2.21.2", - "react-native-get-random-values": "^1.11.0", - "react-native-inappbrowser-reborn": "^3.7.0", - "react-native-mmkv": "3.1.0", - "react-native-passkey": "^3.1.0", - "react-native-safe-area-context": "4.14.0", - "react-native-screens": "4.2.0", - "util": "^0.12.5", - "viem": "^2.45.0", - "zustand": "^5.0.1" - }, - "peerDependencies": { - "@types/react": "18.3.1", - "react": "18.3.1", - "react-native": "0.76.5" - }, - "devDependencies": { - "@babel/core": "^7.25.2", - "@babel/preset-env": "^7.25.3", - "@babel/runtime": "^7.25.0", - "@react-native-community/cli": "15.0.1", - "@react-native-community/cli-platform-android": "15.0.1", - "@react-native-community/cli-platform-ios": "15.0.1", - "@react-native/babel-preset": "0.76.5", - "@react-native/metro-config": "0.76.5", - "@react-native/typescript-config": "0.76.5", - "react-native-builder-bob": "^0.30.3", - "tsx": "^4.19.2" - }, - "engines": { - "node": ">=18" - }, - "workspaces": { - "nohoist": [ - "**" - ] - } -} diff --git a/account-kit/rn-signer/example/react-native.config.js b/account-kit/rn-signer/example/react-native.config.js deleted file mode 100644 index 00e6c209e9..0000000000 --- a/account-kit/rn-signer/example/react-native.config.js +++ /dev/null @@ -1,15 +0,0 @@ -const path = require("path"); -const pkg = require("../package.json"); - -module.exports = { - project: { - ios: { - automaticPodsInstallation: true, - }, - }, - dependencies: { - [pkg.name]: { - root: path.join(__dirname, ".."), - }, - }, -}; diff --git a/account-kit/rn-signer/example/redirect-server/index.ts b/account-kit/rn-signer/example/redirect-server/index.ts deleted file mode 100644 index 8689eac56c..0000000000 --- a/account-kit/rn-signer/example/redirect-server/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import dotenv from "dotenv"; -import express from "express"; - -dotenv.config(); - -const app = express(); -const port = process.env.PORT || 5500; -const appScheme = process.env.APP_SCHEME || "rn-signer-demo"; - -app.get("/", (req, res) => { - const bundle = req.query.bundle; - const orgId = req.query.orgId; - - res.redirect( - `${appScheme}://magic-link-auth?bundle=${bundle}&orgId=${orgId}`, - ); -}); - -app.listen(port, () => { - console.log(`Server is running on port ${port}`); -}); diff --git a/account-kit/rn-signer/example/src/App.tsx b/account-kit/rn-signer/example/src/App.tsx deleted file mode 100644 index 6410b052a1..0000000000 --- a/account-kit/rn-signer/example/src/App.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable import/extensions */ -import { createStaticNavigation } from "@react-navigation/native"; -import { Text } from "react-native"; -import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; -import { SafeAreaProvider } from "react-native-safe-area-context"; - -import OtpAuthScreen from "./screens/otp-auth"; -import MagicLinkAuthScreen from "./screens/magic-link-auth"; -import OauthScreen from "./screens/oauth"; -import PasskeyAuthScreen from "./screens/passkey-auth"; - -const linking = { - enabled: "auto" as const /* Automatically generate paths for all screens */, - prefixes: ["rn-signer-demo://"], -}; - -const RootStack = createBottomTabNavigator({ - initialRouteName: "MagicLinkAuth", - screens: { - MagicLinkAuth: { - screen: MagicLinkAuthScreen, - linking: { path: "magic-link-auth" }, - options: { - tabBarLabel: "Magic Link", - tabBarIcon: () => 🪄, - }, - }, - OtpAuth: { - screen: OtpAuthScreen, - linking: { path: "otp-auth" }, - options: { - tabBarLabel: "OTP", - tabBarIcon: () => 🔑, - }, - }, - OAuth: { - screen: OauthScreen, - linking: { path: "oauth" }, - options: { - tabBarLabel: "Oauth", - tabBarIcon: () => 🔐, - }, - }, - Passkey: { - screen: PasskeyAuthScreen, - linking: { path: "passkey" }, - options: { - tabBarLabel: "Passkey", - tabBarIcon: () => 🫆, - }, - }, - }, -}); - -export default function App() { - const Navigation = createStaticNavigation(RootStack); - return ( - - - - ); -} diff --git a/account-kit/rn-signer/example/src/screens/magic-link-auth.tsx b/account-kit/rn-signer/example/src/screens/magic-link-auth.tsx deleted file mode 100644 index 4d4122959e..0000000000 --- a/account-kit/rn-signer/example/src/screens/magic-link-auth.tsx +++ /dev/null @@ -1,151 +0,0 @@ -/* eslint-disable import/extensions */ -import type { User } from "@account-kit/signer"; -import { useCallback, useEffect, useState } from "react"; -import { - Linking, - StyleSheet, - Text, - TextInput, - TouchableOpacity, - View, -} from "react-native"; - -import signer from "../signer"; - -export default function MagicLinkAuthScreen() { - const [email, setEmail] = useState(""); - const [user, setUser] = useState(null); - - const handleUserAuth = ({ bundle }: { bundle: string }) => { - signer - .authenticate({ - bundle, - type: "email", - }) - .then(setUser) - .catch(console.error); - }; - - const handleIncomingURL = useCallback((event: { url: string }) => { - const regex = /[?&]([^=#]+)=([^&#]*)/g; - - let params: Record = {}; - let match: RegExpExecArray | null; - - while ((match = regex.exec(event.url))) { - if (match[1] && match[2]) { - params[match[1]] = match[2]; - } - } - - if (!params.bundle || !params.orgId) { - return; - } - - handleUserAuth({ - bundle: params.bundle ?? "", - }); - }, []); - - useEffect(() => { - // get the user if already logged in - signer.getAuthDetails().then(setUser); - }, []); - - // Add listener for incoming links - useEffect(() => { - const subscription = Linking.addEventListener("url", handleIncomingURL); - - return () => subscription.remove(); - }, [handleIncomingURL]); - - return ( - - {!user ? ( - <> - setEmail(text.toLowerCase())} - value={email} - /> - - { - signer - .authenticate({ - email, - type: "email", - emailMode: "magicLink", - }) - .catch(console.error); - }} - > - Sign in - - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - signer.disconnect().then(() => setUser(null))} - > - Sign out - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/account-kit/rn-signer/example/src/screens/oauth.tsx b/account-kit/rn-signer/example/src/screens/oauth.tsx deleted file mode 100644 index 8c70452819..0000000000 --- a/account-kit/rn-signer/example/src/screens/oauth.tsx +++ /dev/null @@ -1,103 +0,0 @@ -/* eslint-disable import/extensions */ -import type { User } from "@account-kit/signer"; -import { useEffect, useState } from "react"; -import { View, Text, StyleSheet, TouchableOpacity } from "react-native"; - -import signer from "../signer"; - -export default function OAuthScreen() { - const [user, setUser] = useState(null); - - useEffect(() => { - // get the user if already logged in - signer.getAuthDetails().then(setUser); - signer.preparePopupOauth(); - }, []); - - return ( - - {!user ? ( - <> - { - signer - .authenticate({ - type: "oauth", - mode: "redirect", - authProviderId: "google", - redirectUrl: "rn-signer-demo://oauth", - }) - .then((user) => { - // Get user details after a successful authentication - setUser(user); - }) - .catch(console.error); - }} - > - Sign in with OAuth - - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - signer.disconnect().then(() => setUser(null))} - > - Sign out - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/account-kit/rn-signer/example/src/screens/otp-auth.tsx b/account-kit/rn-signer/example/src/screens/otp-auth.tsx deleted file mode 100644 index f2bad271ea..0000000000 --- a/account-kit/rn-signer/example/src/screens/otp-auth.tsx +++ /dev/null @@ -1,146 +0,0 @@ -/* eslint-disable import/extensions */ -import type { User } from "@account-kit/signer"; -import { useEffect, useState } from "react"; -import { - View, - Text, - TextInput, - StyleSheet, - TouchableOpacity, -} from "react-native"; - -import signer from "../signer"; - -export default function OTPAuthScreen() { - const [email, setEmail] = useState(""); - const [user, setUser] = useState(null); - - const [awaitingOtp, setAwaitingOtp] = useState(false); - - const [otpCode, setOtpCode] = useState(""); - - const handleUserAuth = ({ code }: { code: string }) => { - setAwaitingOtp(false); - signer - .authenticate({ - otpCode: code, - type: "otp", - }) - .then((res) => { - console.log("res", res); - setUser(res); - }) - .catch(console.error); - }; - - useEffect(() => { - // get the user if already logged in - signer.getAuthDetails().then(setUser); - }, []); - - return ( - - {awaitingOtp ? ( - <> - - handleUserAuth({ code: otpCode })} - > - Sign in - - - ) : !user ? ( - <> - - { - signer - .authenticate({ - email, - type: "email", - emailMode: "otp", - }) - .catch(console.error); - setAwaitingOtp(true); - }} - > - Sign in - - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - signer.disconnect().then(() => setUser(null))} - > - Sign out - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/account-kit/rn-signer/example/src/screens/passkey-auth.tsx b/account-kit/rn-signer/example/src/screens/passkey-auth.tsx deleted file mode 100644 index 823032187a..0000000000 --- a/account-kit/rn-signer/example/src/screens/passkey-auth.tsx +++ /dev/null @@ -1,140 +0,0 @@ -/* eslint-disable import/extensions */ -import type { User } from "@account-kit/signer"; -import { useEffect, useState } from "react"; -import { View, Text, StyleSheet, TouchableOpacity } from "react-native"; - -import signer from "../signer"; - -export default function PasskeyAuthScreen() { - const [user, setUser] = useState(null); - const [signedMessage, setSignedMessage] = useState(null); - - const handleCreatePasskey = () => { - signer - .authenticate({ - type: "passkey", - createNew: true, - username: "RN-Signer Demo User", - }) - .then(setUser) - .catch(console.error); - }; - - const handleLoginWithPasskey = () => { - signer - .authenticate({ - type: "passkey", - createNew: false, - }) - .then(setUser) - .catch(console.error); - }; - - useEffect(() => { - // get the user if already logged in - signer.getAuthDetails().then(setUser); - }, []); - - return ( - - {!user ? ( - <> - - Create Passkey - - - I have a passkey - - - ) : ( - <> - {signedMessage ? ( - <> - - Signature for the message "out": - - {signedMessage} - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - )} - - signer.disconnect().then(() => { - setUser(null); - setSignedMessage(null); - }) - } - > - Sign out - - - signer - .signMessage("out") - .then(setSignedMessage) - .catch(console.error) - } - > - Sign "out" - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/account-kit/rn-signer/example/src/signer.ts b/account-kit/rn-signer/example/src/signer.ts deleted file mode 100644 index 610769be42..0000000000 --- a/account-kit/rn-signer/example/src/signer.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { RNAlchemySigner } from "@account-kit/react-native-signer"; -import Config from "react-native-config"; - -const signer = RNAlchemySigner({ - client: { - connection: { apiKey: requireConfig("API_KEY") }, - rpId: requireConfig("RP_ID"), - }, -}); - -function requireConfig(key: string) { - const value = Config[key]; - if (!value) { - throw new Error(`${key} should be set in .env`); - } - return value; -} - -export default signer; diff --git a/account-kit/rn-signer/example/turbo.json b/account-kit/rn-signer/example/turbo.json deleted file mode 100644 index 8a37a673a3..0000000000 --- a/account-kit/rn-signer/example/turbo.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "dependsOn": ["build:android"], - "outputs": ["../android/build/**"] - }, - "build:android": { - "dependsOn": ["^build"], - "env": ["ANDROID_HOME", "ORG_GRADLE_PROJECT_newArchEnabled"], - "inputs": [ - "package.json", - "android", - "!android/build", - "src/*.ts", - "src/*.tsx", - "example/package.json", - "example/android", - "!example/android/.gradle", - "!example/android/build", - "!example/android/app/build" - ], - "outputs": ["../android/build/**"] - }, - "build:ios": { - "dependsOn": ["^build"], - "env": ["RCT_NEW_ARCH_ENABLED"], - "inputs": [ - "package.json", - "*.podspec", - "ios", - "src/*.ts", - "src/*.tsx", - "example/package.json", - "example/ios", - "!example/ios/build", - "!example/ios/Pods" - ], - "outputs": [] - } - } -} diff --git a/account-kit/rn-signer/ios/NativeTEKStamper.h b/account-kit/rn-signer/ios/NativeTEKStamper.h deleted file mode 100644 index 8c62b60903..0000000000 --- a/account-kit/rn-signer/ios/NativeTEKStamper.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifdef RCT_NEW_ARCH_ENABLED -#import "NativeTEKStamperSpec.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface NativeTEKStamper : NSObject - -NS_ASSUME_NONNULL_END -@end -#endif // RCT_NEW_ARCH_ENABLED diff --git a/account-kit/rn-signer/ios/NativeTEKStamper.mm b/account-kit/rn-signer/ios/NativeTEKStamper.mm deleted file mode 100644 index 722d03bd37..0000000000 --- a/account-kit/rn-signer/ios/NativeTEKStamper.mm +++ /dev/null @@ -1,70 +0,0 @@ -#ifdef RCT_NEW_ARCH_ENABLED -#import "NativeTEKStamper.h" -#if __has_include("account_kit_react_native_signer/account_kit_react_native_signer-Swift.h") -#import "account_kit_react_native_signer/account_kit_react_native_signer-Swift.h" -#else -#import "account_kit_react_native_signer-Swift.h" -#endif - - -@implementation NativeTEKStamper { - NativeTEKStamperImpl *_stamper; -} -RCT_EXPORT_MODULE() - -- (id) init { - self = [super init]; - if (self) { - _stamper = [NativeTEKStamperImpl new]; - } - - return self; -} - -- (void)clear { - [_stamper clear]; -} - -- (void)init:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject { - [_stamper createWithCompletionHandler:^(NSString * _Nullable result, NSError * _Nullable error) { - if (error) { - return reject([NSString stringWithFormat: @"%ld", (long)error.code], error.description, error); - } - - return resolve(result); - }]; - -} - -- (void)injectCredentialBundle:(NSString *)bundle resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject { - [_stamper injectCredentialBundleWithBundle:bundle completionHandler:^(BOOL success, NSError * _Nullable error) { - if (error) { - return reject([NSString stringWithFormat: @"%ld", (long)error.code], error.description, error); - } - - return resolve(@(success)); - }]; -} - -- (NSString * _Nullable)publicKey { - return [_stamper publicKey]; -} - -- (void)stamp:(NSString *)payload resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject { - [_stamper stampWithPayload:payload completionHandler:^(NSDictionary * _Nullable result, NSError * _Nullable error) { - if (error) { - return reject([NSString stringWithFormat: @"%ld", (long)error.code], error.description, error); - } - - return resolve(result); - }]; -} - -- (std::shared_ptr)getTurboModule: - (const facebook::react::ObjCTurboModule::InitParams &)params -{ - return std::make_shared(params); -} - -@end -#endif // RCT_NEW_ARCH_ENABLED diff --git a/account-kit/rn-signer/ios/implementation/KeychainHelper.swift b/account-kit/rn-signer/ios/implementation/KeychainHelper.swift deleted file mode 100644 index 7271eea9a9..0000000000 --- a/account-kit/rn-signer/ios/implementation/KeychainHelper.swift +++ /dev/null @@ -1,58 +0,0 @@ -import Foundation -import Security -import CryptoKit - -let ACCOUNT_KIT_EPHEMERAL_PRIVATE_KEY = "accountKitEphemeralPrivateKey" - -let save_ephemeral_private_key_query: [String: Any] = [ - kSecClass as String: kSecClassGenericPassword, - kSecAttrAccount as String: ACCOUNT_KIT_EPHEMERAL_PRIVATE_KEY, - kSecAttrAccessible as String: kSecAttrAccessibleAfterFirstUnlock -] - -let get_ephemeral_private_key_query: [String: Any] = [ - kSecClass as String: kSecClassGenericPassword, - kSecAttrAccount as String: ACCOUNT_KIT_EPHEMERAL_PRIVATE_KEY, - kSecReturnData as String: true, - kSecMatchLimit as String: kSecMatchLimitOne -] - -let delete_ephemeral_private_key_query: [String: Any] = [ - kSecClass as String: kSecClassGenericPassword, - kSecAttrAccount as String: ACCOUNT_KIT_EPHEMERAL_PRIVATE_KEY -] - - -struct PrivateKeyChainUtilities { - @available(*, unavailable) private init() {} - - static func savePrivateKeyToKeychain(_ privateKey: P256.KeyAgreement.PrivateKey) { - let keyData = privateKey.rawRepresentation - - var _saveEphemeralPrivateKeyQuery = save_ephemeral_private_key_query - _saveEphemeralPrivateKeyQuery.updateValue(keyData, forKey: kSecValueData as String) - - SecItemDelete(_saveEphemeralPrivateKeyQuery as CFDictionary) - SecItemAdd(_saveEphemeralPrivateKeyQuery as CFDictionary, nil) - } - - static func getPrivateKeyFromKeychain() -> P256.KeyAgreement.PrivateKey? { - var result: AnyObject? - let status = SecItemCopyMatching(get_ephemeral_private_key_query as CFDictionary, &result) - - if status == errSecSuccess, let keyData = result as? Data { - do { - return try P256.KeyAgreement.PrivateKey(rawRepresentation: keyData) - } catch { - print("❌ Failed to decode private key: \(error)") - return nil - } - } - - return nil - } - - static func deletePrivateKeyFromKeychain() { - SecItemDelete(delete_ephemeral_private_key_query as CFDictionary) - } -} diff --git a/account-kit/rn-signer/ios/implementation/NativeTEKStamperImpl.swift b/account-kit/rn-signer/ios/implementation/NativeTEKStamperImpl.swift deleted file mode 100644 index d08a72f83a..0000000000 --- a/account-kit/rn-signer/ios/implementation/NativeTEKStamperImpl.swift +++ /dev/null @@ -1,100 +0,0 @@ - -import CryptoKit -import Foundation - -enum StamperError: Error { - case notInitialized - case invalidPayload - case signatureFailed - case failedToSerializePayloadToJSON(Error) -} - -@objc public class NativeTEKStamperImpl: NSObject { - // TODO: we probably want to keep this longer term somewhere, because the RN session manager will - // hold on to the bundle and try to recreate a session if a user is still logged in - var ephemeralPrivateKey: P256.KeyAgreement.PrivateKey? = nil - - // These can be ephemeral and held in memory because the session manager will handle re-authenticating - var apiPublicKey: P256.Signing.PublicKey? = nil; - var apiPrivateKey: P256.Signing.PrivateKey? = nil; - - @objc public func create() async throws -> NSString { - var _ephemeralPrivateKey: P256.KeyAgreement.PrivateKey? = PrivateKeyChainUtilities.getPrivateKeyFromKeychain() - - if (_ephemeralPrivateKey == nil) { - _ephemeralPrivateKey = P256.KeyAgreement.PrivateKey() - PrivateKeyChainUtilities.savePrivateKeyToKeychain(_ephemeralPrivateKey!) - } - - let targetPublicKey = try _ephemeralPrivateKey!.publicKey.toString(representation: .x963) - ephemeralPrivateKey = _ephemeralPrivateKey - - return NSString(string: targetPublicKey) - } - - @objc public func clear() { - PrivateKeyChainUtilities.deletePrivateKeyFromKeychain() - ephemeralPrivateKey = nil - apiPublicKey = nil - apiPrivateKey = nil - } - - @objc public func publicKey() -> NSString? { - if let ephemeralPrivateKey = ephemeralPrivateKey { - let publicKey = try? ephemeralPrivateKey.publicKey.toString(representation: .x963) - return publicKey != nil ? NSString(string: publicKey!) : nil - } else { - return nil; - } - } - - @objc public func injectCredentialBundle(bundle: NSString) async throws -> ObjCBool { - if let ephemeralPrivateKey = ephemeralPrivateKey { - let (bundlePrivateKey, bundlePublicKey) = try AuthManager.decryptBundle(encryptedBundle: bundle as String, ephemeralPrivateKey: ephemeralPrivateKey) - apiPublicKey = bundlePublicKey - apiPrivateKey = bundlePrivateKey - - return true - } else { - throw StamperError.notInitialized - } - } - - // TODO: we should use the turnkey stamper for all of this, but we need it published as a pod - // and it shouldn't require use_frameworks! - @objc public func stamp(payload: NSString) async throws -> [String: NSString] { - if let apiPublicKey = apiPublicKey, let apiPrivateKey = apiPrivateKey { - guard let payloadData = String(payload).data(using: .utf8) else { - throw StamperError.invalidPayload - } - - let payloadHash = SHA256.hash(data: payloadData) - - guard let signature = try? apiPrivateKey.signature(for: payloadHash) else { - throw StamperError.signatureFailed - } - - let signatureHex = signature.derRepresentation.toHexString() - - let stamp: [String: Any] = [ - "publicKey": apiPublicKey.compressedRepresentation.toHexString(), - "scheme": "SIGNATURE_SCHEME_TK_API_P256", - "signature": signatureHex, - ] - - do { - let jsonData = try JSONSerialization.data(withJSONObject: stamp, options: []) - let base64Stamp = jsonData.base64URLEncodedString() - - return [ - "stampHeaderName": NSString(string: "X-Stamp"), - "stampHeaderValue": NSString(string: base64Stamp), - ] - } catch { - throw StamperError.failedToSerializePayloadToJSON(error) - } - } else { - throw StamperError.notInitialized - } - } -} diff --git a/account-kit/rn-signer/ios/turnkey/AuthManager.swift b/account-kit/rn-signer/ios/turnkey/AuthManager.swift deleted file mode 100644 index c27ed51e86..0000000000 --- a/account-kit/rn-signer/ios/turnkey/AuthManager.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// AuthManager.swift -// -// This file contains the implementation of the AuthManager, which provides functionalities -// for decrypting encrypted bundles using elliptic curve cryptography. -// -// - -import Base58Swift -import CryptoKit -import Foundation - -public enum AuthError: Error { - case invalidCompressedKeyLength - case keyDecryptionFailed(Error) -} - -/// A manager responsible for handling authentication processes, specifically -/// dealing with cryptographic operations related to key decryption. -public struct AuthManager { - - /// Decrypts an encrypted bundle using a given ephemeral private key. - /// - /// This method decodes the encrypted bundle, extracts and processes the encapsulated key, - /// and then decrypts the private key using HPKE (Hybrid Public Key Encryption). - /// - /// - Parameters: - /// - encryptedBundle: The encrypted data as a Base58Check encoded string received by the user via their provided email address during the email authentication process. - /// - ephemeralPrivateKey: The ephemeral private key used for decryption, conforming to `P256.KeyAgreement.PrivateKey`. - /// - Returns: A tuple containing the decrypted `P256.Signing.PrivateKey` and its corresponding `P256.Signing.PublicKey`. - /// - Throws: `AuthError.invalidCompressedKeyLength` if the encapsulated key length is incorrect, - /// `AuthError.keyDecryptionFailed` if any step in the decryption process fails. - public static func decryptBundle( - encryptedBundle: String, ephemeralPrivateKey: P256.KeyAgreement.PrivateKey - ) throws - -> (P256.Signing.PrivateKey, P256.Signing.PublicKey) - { -// let base58Check = Base58Check() - do { - // Decode the encrypted bundle from Base58Check format. - // TODO: need to throw here in case this returns null - let decodedEncryptedBundle = Base58.base58CheckDecode(encryptedBundle)! - - // Extract the first 33 bytes as the compressed encapsulated key. - let compressedEncapsulatedKey = decodedEncryptedBundle.prefix(33) - // The remainder is the encrypted private key. - let encryptedPrivateKey = decodedEncryptedBundle.dropFirst(33) - - guard compressedEncapsulatedKey.count == 33 else { - throw AuthError.invalidCompressedKeyLength - } - - let uncompressedEncapsulatedKey = try P256.KeyAgreement.PublicKey( - compressedRepresentation: compressedEncapsulatedKey - ).x963Representation - - let receiverPublicKey = ephemeralPrivateKey.publicKey.x963Representation - - let ciphersuite = HPKE.Ciphersuite( - kem: HPKE.KEM.P256_HKDF_SHA256, kdf: HPKE.KDF.HKDF_SHA256, aead: HPKE.AEAD.AES_GCM_256) - - var recipient = try HPKE.Recipient( - privateKey: ephemeralPrivateKey, - ciphersuite: ciphersuite, - info: "turnkey_hpke".data(using: .utf8)!, - encapsulatedKey: uncompressedEncapsulatedKey - ) - - // Add the additional authenticated data for the decryption process. - let aad = uncompressedEncapsulatedKey + receiverPublicKey - - // Decrypt the private key using the recipient object. - let compressedPrivateKey = try recipient.open(encryptedPrivateKey, authenticating: aad) - - // Create the signing private key from its raw representation. - let privateKey = try P256.Signing.PrivateKey(rawRepresentation: compressedPrivateKey) - - let publicKey = privateKey.publicKey - - return (privateKey: privateKey, publicKey: publicKey) - } catch { - throw AuthError.keyDecryptionFailed(error) - } - } -} diff --git a/account-kit/rn-signer/ios/turnkey/Data+EncodingExtensions.swift b/account-kit/rn-signer/ios/turnkey/Data+EncodingExtensions.swift deleted file mode 100644 index c61f6e298e..0000000000 --- a/account-kit/rn-signer/ios/turnkey/Data+EncodingExtensions.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// Data+EncodingExtensions.swift -// -// -// - -import CryptoKit -import Foundation - -extension Data { - public init?(hexString: String) { - let len = hexString.count / 2 - var data = Data(capacity: len) - for i in 0.. String { - return map { String(format: "%02x", $0) }.joined() - } - - public func base64URLEncodedString() -> String { - let base64String = self.base64EncodedString() - let base64URLString = - base64String - .replacingOccurrences(of: "+", with: "-") - .replacingOccurrences(of: "/", with: "_") - .trimmingCharacters(in: CharacterSet(charactersIn: "=")) - return base64URLString - } - - /// Initializes `Data` by decoding a base64 URL encoded string. - /// - Parameter base64URLEncoded: The base64 URL encoded string. - /// - Returns: An optional `Data` instance if the string is valid and successfully decoded, otherwise `nil`. - public init?(base64URLEncoded: String) { - let paddedBase64 = - base64URLEncoded - .replacingOccurrences(of: "-", with: "+") - .replacingOccurrences(of: "_", with: "/") - // Adjust the string to ensure it's a multiple of 4 for valid base64 decoding - let paddingLength = (4 - paddedBase64.count % 4) % 4 - let paddedBase64String = paddedBase64 + String(repeating: "=", count: paddingLength) - guard let data = Data(base64Encoded: paddedBase64String) else { - return nil - } - self = data - } - - /// Decodes a hexadecimal string into `Data`. - /// - Parameter hex: The hexadecimal string to decode. - /// - Throws: An error if the string contains non-hexadecimal characters or has an odd length. - /// - Returns: A `Data` object containing the decoded bytes. - public static func decodeHex(_ hex: String) throws -> Data { - guard hex.count % 2 == 0 else { - throw DecodingError.oddLengthString - } - - var data = Data() - var bytePair = "" - - for char in hex { - bytePair += String(char) - if bytePair.count == 2 { - guard let byte = UInt8(bytePair, radix: 16) else { - throw DecodingError.invalidHexCharacter - } - data.append(byte) - bytePair = "" - } - } - - return data - } - - enum DecodingError: Error { - case oddLengthString - case invalidHexCharacter - } -} diff --git a/account-kit/rn-signer/ios/turnkey/P256+String.swift b/account-kit/rn-signer/ios/turnkey/P256+String.swift deleted file mode 100644 index 890ca64c29..0000000000 --- a/account-kit/rn-signer/ios/turnkey/P256+String.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// P256+String.swift -// -// -// - -import CryptoKit -import Foundation - -enum KeyError: Error { - case representationUnavailable(String) -} - -public protocol P256KeyProtocol { - var rawRepresentation: Data { get } - var x963Representation: Data { get } -} - -public protocol P256PublicKeyProtocol: P256KeyProtocol { - @available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, *) - var compressedRepresentation: Data { get } - var compactRepresentation: Data? { get } -} - -extension P256KeyProtocol { - /// Converts the key into the specified string representation. - /// - /// - Parameter representation: The desired representation of the key. - /// - Returns: A string representation of the key in the specified format. - /// - Throws: `KeyError.representationUnavailable` if the desired representation is not available. - public func toString(representation: PrivateKeyRepresentation) throws -> String { - switch representation { - case .raw: - return rawRepresentation.toHexString() - case .x963: - return x963Representation.toHexString() - } - } -} - -extension P256.Signing.PublicKey: P256PublicKeyProtocol {} -extension P256.KeyAgreement.PublicKey: P256PublicKeyProtocol {} - -public enum PublicKeyRepresentation { - case raw - case x963 - case compressed - case compact -} - -extension P256PublicKeyProtocol { - /// Converts the public key into the specified string representation. - /// - /// - Parameter representation: The desired representation of the key. - /// - Returns: A string representation of the public key in the specified format. - /// - Throws: `KeyError.representationUnavailable` if the desired representation is not available. - public func toString(representation: PublicKeyRepresentation) throws -> String { - switch representation { - case .raw: - return rawRepresentation.toHexString() - case .x963: - return x963Representation.toHexString() - case .compressed: - if #available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, *) { - return compressedRepresentation.toHexString() - } else { - throw KeyError.representationUnavailable("Compressed representation is unavailable.") - } - case .compact: - return compactRepresentation?.toHexString() ?? "" - } - } -} - -public enum PrivateKeyRepresentation { - case raw - case x963 -} - -extension P256.Signing.PrivateKey: P256KeyProtocol {} -extension P256.KeyAgreement.PrivateKey: P256KeyProtocol {} - -extension P256.Signing.PrivateKey { - /// Converts the private key into the specified string representation. - /// - /// - Parameter representation: The desired representation of the key. - /// - Returns: A string representation of the private key in the specified format. - /// - Throws: `KeyError.representationUnavailable` if the desired representation is not available. - public func toString(representation: PrivateKeyRepresentation) throws -> String { - switch representation { - case .raw: - return rawRepresentation.toHexString() - case .x963: - return x963Representation.toHexString() - } - } -} diff --git a/account-kit/rn-signer/ios/turnkey/String+Hex.swift b/account-kit/rn-signer/ios/turnkey/String+Hex.swift deleted file mode 100644 index 5b293140a0..0000000000 --- a/account-kit/rn-signer/ios/turnkey/String+Hex.swift +++ /dev/null @@ -1,24 +0,0 @@ -import Foundation - -extension String { - public var hex: some Sequence { - self[...].hex - } - - public var hexData: Data { - return Data(hex) - } -} - -extension Substring { - public var hex: some Sequence { - sequence( - state: self, - next: { remainder in - guard remainder.count > 2 else { return nil } - let nextTwo = remainder.prefix(2) - remainder.removeFirst(2) - return UInt8(nextTwo, radix: 16) - }) - } -} diff --git a/account-kit/rn-signer/package.json b/account-kit/rn-signer/package.json deleted file mode 100644 index 05a84e4d02..0000000000 --- a/account-kit/rn-signer/package.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "name": "@account-kit/react-native-signer", - "version": "4.84.1", - "author": "Alchemy", - "description": "React Native compatible Smart Wallets signer", - "source": "./src/index.tsx", - "main": "./lib/commonjs/index.js", - "module": "./lib/module/index.js", - "exports": { - ".": { - "import": { - "types": "./lib/typescript/module/src/index.d.ts", - "default": "./lib/module/index.js" - }, - "require": { - "types": "./lib/typescript/commonjs/src/index.d.ts", - "default": "./lib/commonjs/index.js" - } - } - }, - "files": [ - "src", - "lib", - "android", - "ios", - "cpp", - "*.podspec", - "react-native.config.js", - "!ios/build", - "!android/build", - "!android/gradle", - "!android/gradlew", - "!android/gradlew.bat", - "!android/local.properties", - "!**/__tests__", - "!**/__fixtures__", - "!**/__mocks__", - "!**/.*" - ], - "scripts": { - "test": "jest", - "typecheck": "tsc", - "build": "yarn typecheck", - "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib", - "prepare": "bob build" - }, - "keywords": [ - "react-native", - "ios", - "android" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "devDependencies": { - "@react-native-community/cli": "15.0.1", - "@react-native/eslint-config": "0.76.5", - "@types/express": "^5.0.0", - "@types/jest": "^29.5.5", - "@types/react": "^18.2.44", - "del-cli": "^5.1.0", - "jest": "^29.7.0", - "react": "18.3.1", - "react-native": "0.76.5", - "react-native-builder-bob": "^0.30.3", - "react-native-get-random-values": "^1.11.0", - "react-native-inappbrowser-reborn": "^3.7.0", - "react-native-mmkv": "^3.1.0", - "react-native-passkey": "^3.1.0", - "typescript-template": "*" - }, - "resolutions": { - "@types/react": "^18.2.44" - }, - "peerDependencies": { - "react": ">=18.2.0", - "react-native": ">=0.76.0", - "react-native-get-random-values": "^1.11.0", - "react-native-inappbrowser-reborn": "^3.7.0", - "react-native-mmkv": "^3.1.0", - "react-native-passkey": "^3.1.0" - }, - "jest": { - "preset": "react-native", - "modulePathIgnorePatterns": [ - "/example/node_modules", - "/lib/" - ] - }, - "react-native-builder-bob": { - "source": "src", - "output": "lib", - "targets": [ - "codegen", - [ - "commonjs", - { - "esm": true - } - ], - [ - "module", - { - "esm": true - } - ], - [ - "typescript", - { - "project": "tsconfig.build.json", - "esm": true - } - ] - ] - }, - "codegenConfig": { - "name": "NativeTEKStamperSpec", - "type": "all", - "jsSrcsDir": "src", - "outputDir": { - "ios": "ios/generated", - "android": "android/generated" - }, - "android": { - "javaPackageName": "com.accountkit.reactnativesigner" - }, - "includesGeneratedCode": true - }, - "create-react-native-library": { - "type": "module-new", - "languages": "kotlin-objc", - "version": "0.42.2" - }, - "dependencies": { - "@aa-sdk/core": "^4.84.1", - "@account-kit/signer": "^4.84.1", - "@turnkey/crypto": "^2.5.0", - "@turnkey/react-native-passkey-stamper": "^1.1.4", - "uuid": "^11.1.0", - "viem": "^2.45.0", - "zod": "^3.22.4" - } -} diff --git a/account-kit/rn-signer/react-native.config.js b/account-kit/rn-signer/react-native.config.js deleted file mode 100644 index e3b3d603aa..0000000000 --- a/account-kit/rn-signer/react-native.config.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - */ -module.exports = { - dependency: { - platforms: { - android: { - cmakeListsPath: "generated/jni/CMakeLists.txt", - }, - }, - }, -}; diff --git a/account-kit/rn-signer/src/NativeTEKStamper.ts b/account-kit/rn-signer/src/NativeTEKStamper.ts deleted file mode 100644 index e408eadb0c..0000000000 --- a/account-kit/rn-signer/src/NativeTEKStamper.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TurboModule } from "react-native"; -import { TurboModuleRegistry } from "react-native"; - -type TStamp = { - stampHeaderName: string; - stampHeaderValue: string; -}; - -export interface Spec extends TurboModule { - /** - * Creates an instance of the stamper and returns the public key of TEK - */ - init(): Promise; - - /** - * Clears the stored bundle and TEK - */ - clear(): void; - - /** - * Returns the public key, or `null` if the stamper isn't properly initialized. - */ - publicKey(): string | null; - - /** - * Function to inject a new credential into the iframe - * The bundle should be encrypted to the stamper's initial public key - * Encryption should be performed with HPKE (RFC 9180). - * This is used during recovery and auth flows. - */ - injectCredentialBundle(bundle: string): Promise; - - /** - * Function to sign a payload with the underlying credential bundle - * Should throw an error if the bundle was never injected - */ - stamp(payload: string): Promise; -} - -export default TurboModuleRegistry.getEnforcing( - "NativeTEKStamper", -) as Spec; diff --git a/account-kit/rn-signer/src/client.ts b/account-kit/rn-signer/src/client.ts deleted file mode 100644 index 75a14b69eb..0000000000 --- a/account-kit/rn-signer/src/client.ts +++ /dev/null @@ -1,559 +0,0 @@ -/* eslint-disable import/extensions */ -import "react-native-get-random-values"; -import "./utils/buffer-polyfill"; -import "./utils/mmkv-localstorage-polyfill"; -import { type ConnectionConfig } from "@aa-sdk/core"; -import { - createPasskey, - PasskeyStamper, -} from "@turnkey/react-native-passkey-stamper"; -import { - stringify as uuidStringify, - parse as uuidParse, - v4 as uuidv4, - validate as uuidValidate, - version as uuidVersion, -} from "uuid"; -import { - BaseSignerClient, - OauthFailedError, - MfaRequiredError, - type AlchemySignerClientEvents, - type AuthenticatingEventMetadata, - type EmailAuthParams, - type GetWebAuthnAttestationResult, - type MfaFactor, - type OauthConfig, - type OauthParams, - type OtpParams, - type JwtParams, - type JwtResponse, - type User, - type SubmitOtpCodeResponse, - type CredentialCreationOptionOverrides, - type SmsAuthParams, - type IdTokenOnly, -} from "@account-kit/signer"; -import { InAppBrowser } from "react-native-inappbrowser-reborn"; -import { z } from "zod"; -import { generateP256KeyPair, hpkeDecrypt } from "@turnkey/crypto"; -import { toHex } from "viem"; -import { InAppBrowserUnavailableError } from "./errors"; -import NativeTEKStamper from "./NativeTEKStamper"; -import { parseSearchParams } from "./utils/parseUrlParams"; -import { parseMfaError } from "./utils/parseMfaError"; - -export const RNSignerClientParamsSchema = z.object({ - connection: z.custom(), - rootOrgId: z.string().optional(), - oauthCallbackUrl: z - .string() - .optional() - .default("https://signer.alchemy.com/callback"), - rpId: z.string().optional(), -}); - -export type RNSignerClientParams = z.input; - -export type ExportWalletParams = { - exportAs?: "PRIVATE_KEY" | "SEED_PHRASE"; -}; - -export type ExportWalletResult = string; - -const SESSION_STAMPER = NativeTEKStamper; - -// TODO: need to emit events -export class RNSignerClient extends BaseSignerClient< - ExportWalletParams, - string -> { - oauthCallbackUrl: string; - rpId: string | undefined; - private validAuthenticatingTypes: AuthenticatingEventMetadata["type"][] = [ - "email", - "otp", - "oauth", - ]; - - constructor(params: RNSignerClientParams) { - const { connection, rootOrgId, oauthCallbackUrl, rpId } = - RNSignerClientParamsSchema.parse(params); - - super({ - stamper: SESSION_STAMPER, - rootOrgId: rootOrgId ?? "24c1acf5-810f-41e0-a503-d5d13fa8e830", - connection, - }); - - this.oauthCallbackUrl = oauthCallbackUrl; - this.rpId = rpId; - } - - override async submitOtpCode( - args: Omit, - ): Promise { - this.eventEmitter.emit("authenticating", { type: "otpVerify" }); - const publicKey = await this.initSessionStamper(); - - const response = await this.request("/v1/otp", { - ...args, - targetPublicKey: publicKey, - }); - - if ("credentialBundle" in response && response.credentialBundle) { - return { - mfaRequired: false, - bundle: response.credentialBundle, - }; - } - - // If the server says "MFA_REQUIRED", pass that data back to the caller: - if ( - response.status === "MFA_REQUIRED" && - response.encryptedPayload && - response.multiFactors - ) { - return { - mfaRequired: true, - encryptedPayload: response.encryptedPayload, - multiFactors: response.multiFactors, - }; - } - - // Otherwise, it's truly an error: - throw new Error( - "Failed to submit OTP code. Server did not return required fields.", - ); - } - - override async initEmailAuth( - params: Omit, - ): Promise<{ orgId: string; otpId?: string; multiFactors?: MfaFactor[] }> { - this.eventEmitter.emit("authenticating", { type: "email" }); - const targetPublicKey = await this.initSessionStamper(); - - try { - return await this.request("/v1/auth", { - email: params.email, - emailMode: params.emailMode, - targetPublicKey, - multiFactors: params.multiFactors, - }); - } catch (error) { - const multiFactors = parseMfaError(error); - - // If MFA is required, and emailMode is Magic Link, the user must submit mfa with the request or - // the server will return an error with the required mfa factors. - if (multiFactors) { - throw new MfaRequiredError(multiFactors); - } - throw error; - } - } - - override async initSmsAuth( - params: Omit, - ): Promise<{ orgId: string; otpId?: string }> { - this.eventEmitter.emit("authenticating", { type: "sms" }); - const { phone } = params; - const targetPublicKey = await this.initSessionStamper(); - - return this.request("/v1/auth", { - phone, - targetPublicKey, - }); - } - - override async submitJwt( - args: Omit, - ): Promise { - this.eventEmitter.emit("authenticating", { type: "custom-jwt" }); - - const publicKey = await this.initSessionStamper(); - return this.request("/v1/auth-jwt", { - jwt: args.jwt, - targetPublicKey: publicKey, - authProvider: args.authProvider, - expirationSeconds: args.expirationSeconds, - }); - } - - override async completeAuthWithBundle(params: { - bundle: string; - orgId: string; - connectedEventName: keyof AlchemySignerClientEvents; - authenticatingType: AuthenticatingEventMetadata["type"]; - idToken?: string; - accessToken?: string; - }): Promise { - if (!this.validAuthenticatingTypes.includes(params.authenticatingType)) { - throw new Error("Unsupported authenticating type"); - } - - this.eventEmitter.emit("authenticating", { - type: params.authenticatingType, - }); - - await this.initSessionStamper(); - - const result = await SESSION_STAMPER.injectCredentialBundle(params.bundle); - - if (!result) { - throw new Error("Failed to inject credential bundle"); - } - - const user = await this.whoami( - params.orgId, - params.idToken, - params.accessToken, - ); - - this.eventEmitter.emit(params.connectedEventName, user, params.bundle); - return user; - } - - override oauthWithRedirect = async ( - args: Extract, - ): Promise => { - // Ensure the In-App Browser required for authentication is available - if (!(await InAppBrowser.isAvailable())) { - throw new InAppBrowserUnavailableError(); - } - - this.eventEmitter.emit("authenticating", { type: "oauth" }); - - const oauthParams = args; - const turnkeyPublicKey = await this.initSessionStamper(); - const oauthCallbackUrl = this.oauthCallbackUrl; - const oauthConfig = await this.getOauthConfig(); - const providerUrl = await this.getOauthProviderUrl({ - oauthParams, - turnkeyPublicKey, - oauthCallbackUrl, - oauthConfig, - usesRelativeUrl: false, - }); - const redirectUrl = args.redirectUrl; - const res = await InAppBrowser.openAuth(providerUrl, redirectUrl); - if (res.type !== "success" || !res.url) { - throw new OauthFailedError("An error occured completing your request"); - } - - const authResult = parseSearchParams(res.url); - const bundle = authResult["alchemy-bundle"] ?? ""; - const orgId = authResult["alchemy-org-id"] ?? ""; - const idToken = authResult["alchemy-id-token"] ?? ""; - const accessToken = authResult["alchemy-access-token"]; - const isSignup = authResult["alchemy-is-signup"]; - const error = authResult["alchemy-error"]; - const status = authResult["alchemy-status"]; - const providerName = authResult["alchemy-auth-provider"]; - - if (error) { - throw new OauthFailedError(error); - } - - if (status === "FETCHED_ID_TOKEN_ONLY") { - // This supports the add auth provider flow - if (idToken && providerName) { - return { - status: "FETCHED_ID_TOKEN_ONLY", - idToken, - accessToken, - providerName, - }; - } - } else { - // This supports the sign in with auth flow - if (bundle && orgId && idToken) { - const user = await this.completeAuthWithBundle({ - bundle, - orgId, - connectedEventName: "connectedOauth", - idToken, - accessToken, - authenticatingType: "oauth", - }); - - if (isSignup) { - this.eventEmitter.emit("newUserSignup"); - } - return user; - } - } - - // Throw the Alchemy error if available, otherwise throw a generic error. - throw new OauthFailedError("An error occured completing your request"); - }; - - override oauthWithPopup( - _args: Extract, - ): Promise { - throw new Error("Method not implemented"); - } - - override async disconnect(): Promise { - this.user = undefined; - SESSION_STAMPER.clear(); - await this.initSessionStamper(); - } - - /** - * Exports the wallet and returns the decrypted private key or seed phrase. - * - * @param {ExportWalletParams} params - exportWallet parameters - * @returns {Promise} The decrypted private key or seed phrase - * @throws {Error} If the user is not authenticated or export fails - */ - async exportWallet(params?: ExportWalletParams): Promise { - if (!this.user) { - throw new Error("User must be authenticated to export wallet"); - } - - const exportAs = params?.exportAs || "PRIVATE_KEY"; - - // Step 1: Generate a P256 key pair for encryption - const embeddedKey = generateP256KeyPair(); - - try { - let exportBundle: string; - - if (exportAs === "PRIVATE_KEY") { - // Step 2a: Export as private key - const { activity } = await this.turnkeyClient.exportWalletAccount({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT", - timestampMs: Date.now().toString(), - parameters: { - address: this.user.address, - targetPublicKey: embeddedKey.publicKeyUncompressed, - }, - }); - - const result = await this.pollActivityCompletion( - activity, - this.user.orgId, - "exportWalletAccountResult", - ); - - if (!result.exportBundle) { - throw new Error("Failed to export wallet: no export bundle returned"); - } - - exportBundle = result.exportBundle; - } else { - // Step 2b: Export as seed phrase (need to find the wallet first) - const { wallets } = await this.turnkeyClient.getWallets({ - organizationId: this.user.orgId, - }); - - const walletAccountResponses = await Promise.all( - wallets.map(({ walletId }) => - this.turnkeyClient.getWalletAccounts({ - organizationId: this.user!.orgId, - walletId, - }), - ), - ); - const walletAccounts = walletAccountResponses.flatMap( - (x) => x.accounts, - ); - - const walletAccount = walletAccounts.find( - (x) => x.address.toLowerCase() === this.user!.address.toLowerCase(), - ); - - if (!walletAccount) { - throw new Error("Could not find wallet account"); - } - - const { activity } = await this.turnkeyClient.exportWallet({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_EXPORT_WALLET", - timestampMs: Date.now().toString(), - parameters: { - walletId: walletAccount.walletId, - targetPublicKey: embeddedKey.publicKeyUncompressed, - }, - }); - - const result = await this.pollActivityCompletion( - activity, - this.user.orgId, - "exportWalletResult", - ); - - if (!result.exportBundle) { - throw new Error("Failed to export wallet: no export bundle returned"); - } - - exportBundle = result.exportBundle; - } - - // Step 3: Parse the export bundle and decrypt using HPKE - // The export bundle is a JSON string containing version, data, etc. - const bundleJson = JSON.parse(exportBundle); - - // The data field contains another JSON string that's hex-encoded - const innerDataHex = bundleJson.data; - const innerDataJson = JSON.parse( - Buffer.from(innerDataHex, "hex").toString(), - ); - - // Extract the encapped public key and ciphertext from the inner data - const encappedPublicKeyHex = innerDataJson.encappedPublic; - const ciphertextHex = innerDataJson.ciphertext; - - const encappedKeyBuf = Buffer.from(encappedPublicKeyHex, "hex"); - const ciphertextBuf = Buffer.from(ciphertextHex, "hex"); - - // Decrypt the data using HPKE - const decryptedData = hpkeDecrypt({ - ciphertextBuf: ciphertextBuf, - encappedKeyBuf: encappedKeyBuf, - receiverPriv: embeddedKey.privateKey, - }); - - // Step 4: Process the decrypted data based on export type - if (exportAs === "PRIVATE_KEY") { - return toHex(decryptedData); - } else { - return new TextDecoder().decode(decryptedData); - } - } finally { - // No cleanup needed - key is only in memory - } - } - - override targetPublicKey(): Promise { - return this.initSessionStamper(); - } - - protected override getWebAuthnAttestation = async ( - options?: CredentialCreationOptionOverrides, - userDetails: { username: string } = { - username: this.user?.email ?? "anonymous", - }, - ): Promise => { - const { username } = userDetails; - const authenticatorUserId = getAuthenticatorUserId(options); - const rpId = this.requireRpId(options); - const authenticatorParams = await createPasskey({ - rp: { - id: rpId, - name: rpId, - ...options?.publicKey?.rp, - }, - user: { - name: username, - displayName: username, - ...options?.publicKey?.user, - id: uuidStringify(bufferSourceToUint8Array(authenticatorUserId)), - }, - authenticatorName: "End-User Passkey", - }); - return { - attestation: authenticatorParams.attestation, - challenge: authenticatorParams.challenge, - authenticatorUserId, - rpId, - }; - }; - - protected override getOauthConfig = async (): Promise => { - const currentStamper = this.turnkeyClient.stamper; - const publicKey = await this.initSessionStamper(); - - // swap the stamper back in case the user logged in with a different stamper (passkeys) - this.setStamper(currentStamper); - const nonce = this.getOauthNonce(publicKey); - return this.request("/v1/prepare-oauth", { nonce }); - }; - - private initSessionStamperPromise: Promise | null = null; - - protected override async initSessionStamper(): Promise { - if (this.initSessionStamperPromise) { - return this.initSessionStamperPromise; - } - - this.initSessionStamperPromise = (async () => { - await SESSION_STAMPER.init(); - this.setStamper(SESSION_STAMPER); - return SESSION_STAMPER.publicKey()!; - })(); - - try { - const result = await this.initSessionStamperPromise; - return result; - } finally { - this.initSessionStamperPromise = null; - } - } - - protected override async initWebauthnStamper( - user: User | undefined = this.user, - options?: CredentialCreationOptionOverrides, - ): Promise { - const rpId = this.requireRpId(options); - this.setStamper( - new PasskeyStamper({ - rpId, - allowCredentials: user?.credentialId - ? [ - { - id: user.credentialId, - type: "public-key", - }, - ] - : undefined, - }), - ); - } - - private requireRpId(options?: CredentialCreationOptionOverrides): string { - const rpId = options?.publicKey?.rp?.id ?? this.rpId; - if (!rpId) { - throw new Error( - "rpId must be set in configuration to use passkeys in React Native", - ); - } - return rpId; - } -} - -function getAuthenticatorUserId( - options?: CredentialCreationOptionOverrides, -): BufferSource { - // Android requires this to be a UUIDv4. - const id = options?.publicKey?.user?.id; - if (id) { - const stringId = uuidStringify(id as Uint8Array); - if (!uuidValidate(stringId) || uuidVersion(stringId) !== 4) { - throw new Error("Challenge must be a valid UUIDv4 to support Android"); - } - return id; - } - return uuidParse(uuidv4()); -} - -function bufferSourceToUint8Array(bufferSource: BufferSource): Uint8Array { - if (bufferSource instanceof Uint8Array) { - return bufferSource; - } - if (bufferSource instanceof ArrayBuffer) { - return new Uint8Array(bufferSource); - } - if (ArrayBuffer.isView(bufferSource)) { - // Any other TypedArray (e.g., Int16Array, Float32Array, etc.) - return new Uint8Array( - bufferSource.buffer, - bufferSource.byteOffset, - bufferSource.byteLength, - ); - } - throw new TypeError( - "Input must be a BufferSource (ArrayBuffer or TypedArray)", - ); -} diff --git a/account-kit/rn-signer/src/errors.ts b/account-kit/rn-signer/src/errors.ts deleted file mode 100644 index c25ca0a4d0..0000000000 --- a/account-kit/rn-signer/src/errors.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BaseError } from "@aa-sdk/core"; - -export class InAppBrowserUnavailableError extends BaseError { - override name = "InAppBrowserUnavailableError"; - constructor() { - super( - "In-App Browser is not available. Please authenticate with a different method.", - ); - } -} diff --git a/account-kit/rn-signer/src/index.tsx b/account-kit/rn-signer/src/index.tsx deleted file mode 100644 index 2e5a5cb749..0000000000 --- a/account-kit/rn-signer/src/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -/* eslint-disable import/extensions */ -export type * from "./signer"; -export { RNAlchemySigner } from "./signer"; -export { RNSignerClient } from "./client"; -export type { ExportWalletParams, ExportWalletResult } from "./client"; diff --git a/account-kit/rn-signer/src/signer.ts b/account-kit/rn-signer/src/signer.ts deleted file mode 100644 index dc0cb62c90..0000000000 --- a/account-kit/rn-signer/src/signer.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* eslint-disable import/extensions */ -import { - BaseAlchemySigner, - SessionManagerParamsSchema, -} from "@account-kit/signer"; -import { z } from "zod"; -import { RNSignerClient, RNSignerClientParamsSchema } from "./client"; - -const RNAlchemySignerParamsSchema = z - .object({ - client: z.custom().or(RNSignerClientParamsSchema), - }) - .extend({ - sessionConfig: SessionManagerParamsSchema.omit({ - client: true, - storage: true, - }).optional(), - }); - -export type RNAlchemySignerParams = z.input; - -export class RNAlchemySignerSingleton extends BaseAlchemySigner { - private static instance: RNAlchemySignerSingleton; - - private constructor(params: RNAlchemySignerParams) { - if (!!RNAlchemySignerSingleton.instance) { - return RNAlchemySignerSingleton.instance; - } - - const { sessionConfig, ...params_ } = - RNAlchemySignerParamsSchema.parse(params); - - let client: RNSignerClient; - - if ("connection" in params_.client) { - client = new RNSignerClient(params_.client); - } else { - client = params_.client; - } - - super({ - client, - sessionConfig, - }); - - this.signerType = "rn-alchemy-signer"; - } - - public static getInstance(params: RNAlchemySignerParams) { - if (!this.instance) { - this.instance = new RNAlchemySignerSingleton(params); - } - return this.instance; - } -} - -/** - * Factory function to create or retrieve a singleton instance of RNAlchemySigner. - * - * @example - * ```ts twoslash - * import { RNAlchemySigner } from "@account-kit/react-native-signer"; - * - * const signer = RNAlchemySigner({ - * client: { - * connection: { - * apiKey: "YOUR_API_KEY" - * }, - * }, - * // optional config to override default session manager configs - * sessionConfig: { - * expirationTimeMs: 1000 * 60 * 60 // 60 minutes - * } - * }); - * ``` - * - * @param {RNAlchemySignerParams} params The parameters required to configure the RNAlchemySigner instance. - * @returns {RNAlchemySignerSingleton} The singleton instance of RNAlchemySigner configured with the provided parameters. - */ -export function RNAlchemySigner(params: RNAlchemySignerParams) { - const instance = RNAlchemySignerSingleton.getInstance(params); - - return instance; -} - -export type RNAlchemySignerType = RNAlchemySignerSingleton; diff --git a/account-kit/rn-signer/src/utils/base64UrlEncode.ts b/account-kit/rn-signer/src/utils/base64UrlEncode.ts deleted file mode 100644 index 8a630b687b..0000000000 --- a/account-kit/rn-signer/src/utils/base64UrlEncode.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Buffer } from "buffer"; - -export const base64UrlEncode = ( - challenge: ArrayBuffer | ArrayBufferLike, -): string => { - return Buffer.from(challenge) - .toString("base64") - .replace(/\+/g, "-") - .replace(/\//g, "_") - .replace(/=/g, ""); -}; diff --git a/account-kit/rn-signer/src/utils/buffer-polyfill.ts b/account-kit/rn-signer/src/utils/buffer-polyfill.ts deleted file mode 100644 index e8304986da..0000000000 --- a/account-kit/rn-signer/src/utils/buffer-polyfill.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Buffer } from "buffer"; - -if (!global.Buffer) { - global.Buffer = Buffer; -} diff --git a/account-kit/rn-signer/src/utils/mmkv-localstorage-polyfill.ts b/account-kit/rn-signer/src/utils/mmkv-localstorage-polyfill.ts deleted file mode 100644 index fcb69d33c2..0000000000 --- a/account-kit/rn-signer/src/utils/mmkv-localstorage-polyfill.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { MMKV } from "react-native-mmkv"; - -class MMKVLocalStorage { - private storage; - constructor() { - this.storage = new MMKV({ id: "mmkv-localstorage" }); - } - - // implement the Storage interface - getItem(key: string) { - return this.storage.getString(key) ?? null; - } - - setItem(key: string, value: string) { - return this.storage.set(key, value); - } - - removeItem(key: string) { - if (this.storage.contains(key)) { - this.storage.delete(key); - } - } - - clear() { - this.storage.clearAll(); - } - - get length() { - return this.storage.getAllKeys().length; - } - - key(index: number) { - const keys = this.storage.getAllKeys(); - return keys[index] || null; - } -} - -if (!global.localStorage) { - const mmkvLocalStorage = new MMKVLocalStorage(); - global.localStorage = mmkvLocalStorage; -} diff --git a/account-kit/rn-signer/src/utils/parseMfaError.ts b/account-kit/rn-signer/src/utils/parseMfaError.ts deleted file mode 100644 index ca0397505b..0000000000 --- a/account-kit/rn-signer/src/utils/parseMfaError.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { MfaFactor } from "@account-kit/signer"; - -export function parseMfaError(error: unknown): MfaFactor[] | null { - if (error instanceof Error) { - try { - const parsed = JSON.parse(error.message); - if (parsed?.data?.multiFactors) { - return parsed.data.multiFactors; - } - } catch { - // ignore JSON parse failures - } - } - return null; -} diff --git a/account-kit/rn-signer/src/utils/parseUrlParams.ts b/account-kit/rn-signer/src/utils/parseUrlParams.ts deleted file mode 100644 index 6decf15180..0000000000 --- a/account-kit/rn-signer/src/utils/parseUrlParams.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const parseSearchParams = (url: string) => { - const regex = /[?&]([^=#]+)=([^&#]*)/g; - - let params: Record = {}; - let match: RegExpExecArray | null; - - while ((match = regex.exec(url))) { - if (match[1] !== undefined && match[2] !== undefined) { - params[match[1]] = match[2]; - } - } - - return params; -}; diff --git a/account-kit/rn-signer/tsconfig.build.json b/account-kit/rn-signer/tsconfig.build.json deleted file mode 100644 index 3c0636adf2..0000000000 --- a/account-kit/rn-signer/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig", - "exclude": ["example", "lib"] -} diff --git a/account-kit/rn-signer/tsconfig.json b/account-kit/rn-signer/tsconfig.json deleted file mode 100644 index 131535092c..0000000000 --- a/account-kit/rn-signer/tsconfig.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": "typescript-template/base.json", - "compilerOptions": { - "rootDir": ".", - "paths": { - "@account-kit/react-native-signer": ["./src/index"] - }, - "allowUnreachableCode": false, - "allowUnusedLabels": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react-jsx", - "lib": ["ESNext"], - "module": "ESNext", - "moduleResolution": "Bundler", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "noImplicitUseStrict": false, - "noStrictGenericChecks": false, - "noUncheckedIndexedAccess": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "ESNext", - "verbatimModuleSyntax": true, - "allowImportingTsExtensions": true - } -} diff --git a/account-kit/rn-signer/turbo.json b/account-kit/rn-signer/turbo.json deleted file mode 100644 index f58ab8a6f8..0000000000 --- a/account-kit/rn-signer/turbo.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "prepare": { - "dependsOn": ["^build"], - "outputs": ["android/generate/**", "ios/generated/**", "lib/**"] - }, - "build": { - "dependsOn": ["^build", "prepare"], - "outputs": ["android/generate/**", "ios/generated/**", "lib/**"] - } - } -} diff --git a/account-kit/rn-signer/typedoc.json b/account-kit/rn-signer/typedoc.json deleted file mode 100644 index 8f2e5387ff..0000000000 --- a/account-kit/rn-signer/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["src/index.tsx"], - "tsconfig": "./tsconfig.build.json", - "plugin": ["typedoc-plugin-markdown"], - "fileExtension": ".mdx" -} diff --git a/account-kit/signer/CHANGELOG.md b/account-kit/signer/CHANGELOG.md deleted file mode 100644 index 5d75397b04..0000000000 --- a/account-kit/signer/CHANGELOG.md +++ /dev/null @@ -1,910 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/signer - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/signer - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/signer - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/signer - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/signer - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/signer - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -### Features - -- key export ([#2249](https://github.com/alchemyplatform/aa-sdk/issues/2249)) ([bfb3789](https://github.com/alchemyplatform/aa-sdk/commit/bfb3789400bb19e00109e22f97b6c791ec61e68d)) - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/signer - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/signer - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/signer - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/signer - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/signer - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/signer - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/signer - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/signer - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/signer - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/signer - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/signer - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/signer - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/signer - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/signer - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/signer - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/signer - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/signer - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/signer - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/signer - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/signer - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/signer - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/signer - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/signer - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/signer - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/signer - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/signer - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @account-kit/signer - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/signer - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/signer - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -**Note:** Version bump only for package @account-kit/signer - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/signer - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -**Note:** Version bump only for package @account-kit/signer - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -### Features - -- server signing ([#2043](https://github.com/alchemyplatform/aa-sdk/issues/2043)) ([8797f63](https://github.com/alchemyplatform/aa-sdk/commit/8797f6342a8934dbe57c5e029599d02d56ce8145)) - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/signer - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/signer - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/signer - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/signer - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -### Bug Fixes - -- add userTagIds to legacy stampUpdateUser request ([#2027](https://github.com/alchemyplatform/aa-sdk/issues/2027)) ([4baa660](https://github.com/alchemyplatform/aa-sdk/commit/4baa66052c1968340353375241edf2b8f3928225)) - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -### Features - -- signer email/sms verification ([#1964](https://github.com/alchemyplatform/aa-sdk/issues/1964)) ([07d3bff](https://github.com/alchemyplatform/aa-sdk/commit/07d3bff1578c4f043c871da5edcab8feeb8cb105)) - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -### Features - -- export wallet ([#1858](https://github.com/alchemyplatform/aa-sdk/issues/1858)) ([bc856e1](https://github.com/alchemyplatform/aa-sdk/commit/bc856e1bcc8138cb22db296ffd81e90c43eda9f9)) - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/signer - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -### Bug Fixes - -- solana address not initialized ([#1985](https://github.com/alchemyplatform/aa-sdk/issues/1985)) ([5a377fa](https://github.com/alchemyplatform/aa-sdk/commit/5a377fadd0bc7b06723199724e156eebe207e1cc)) - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/signer - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/signer - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -### Features - -- add accessToken field to user object ([#1879](https://github.com/alchemyplatform/aa-sdk/issues/1879)) ([7483563](https://github.com/alchemyplatform/aa-sdk/commit/748356306e9aaf597b1b2e55218ec04c222983eb)) - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/signer - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -### Features - -- add jwt auth with docs ([#1712](https://github.com/alchemyplatform/aa-sdk/issues/1712)) ([8a201d9](https://github.com/alchemyplatform/aa-sdk/commit/8a201d9d485f9544ae5249b5d253835361794224)) - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -### Features - -- multi owner delete users ([#1883](https://github.com/alchemyplatform/aa-sdk/issues/1883)) ([df8fb40](https://github.com/alchemyplatform/aa-sdk/commit/df8fb40cacb70ac08d21e7ff7340614ea6692ffe)) - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -### Features - -- update external wallet support to include Solana wallets ([#1847](https://github.com/alchemyplatform/aa-sdk/issues/1847)) ([7e33d35](https://github.com/alchemyplatform/aa-sdk/commit/7e33d35fdede8358d240fe919af54486f8b10edd)) - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/signer - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -### Features - -- unpin viem version ([#1851](https://github.com/alchemyplatform/aa-sdk/issues/1851)) ([e387e0e](https://github.com/alchemyplatform/aa-sdk/commit/e387e0ead087b893d315b072c24b3c2725ff86b6)) - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/signer - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -### Features - -- sms auth beta ([#1835](https://github.com/alchemyplatform/aa-sdk/issues/1835)) ([b9eebf7](https://github.com/alchemyplatform/aa-sdk/commit/b9eebf7a935fa4666cf4b692692a4f14848994ac)) - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/signer - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -### Bug Fixes - -- docspath param in errors ([#1830](https://github.com/alchemyplatform/aa-sdk/issues/1830)) ([2b4ec0a](https://github.com/alchemyplatform/aa-sdk/commit/2b4ec0a38e10b057098ad72c3982ec353f0e9b09)) - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/signer - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/signer - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/signer - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/signer - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/signer - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -**Note:** Version bump only for package @account-kit/signer - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @account-kit/signer - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/signer - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -### Features - -- multi owner api rework ([#1737](https://github.com/alchemyplatform/aa-sdk/issues/1737)) ([3ef63c7](https://github.com/alchemyplatform/aa-sdk/commit/3ef63c73e737076b25cae8b86b16cf5affa53bba)) - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/signer - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/signer - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -**Note:** Version bump only for package @account-kit/signer - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -### Features - -- multi owner signing ([#1708](https://github.com/alchemyplatform/aa-sdk/issues/1708)) ([113dfe7](https://github.com/alchemyplatform/aa-sdk/commit/113dfe76b70361070a120ccedb0f03b11707d392)) - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -### Bug Fixes - -- upgrade TK iframe stamper to properly handle concurrent stamping ([#1685](https://github.com/alchemyplatform/aa-sdk/issues/1685)) ([d53dc65](https://github.com/alchemyplatform/aa-sdk/commit/d53dc65831c4bb1f27d0a84c342ea7f48080ba27)) - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -**Note:** Version bump only for package @account-kit/signer - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) -- list, add, and remove oauth providers ([#1666](https://github.com/alchemyplatform/aa-sdk/issues/1666)) ([e9add26](https://github.com/alchemyplatform/aa-sdk/commit/e9add26907c4151a85f0a4f98efc2a18694faa62)), closes [#1669](https://github.com/alchemyplatform/aa-sdk/issues/1669) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -**Note:** Version bump only for package @account-kit/signer - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/signer - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/signer - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -### Features - -- **rn-signer:** support passkeys in React Native ([#1653](https://github.com/alchemyplatform/aa-sdk/issues/1653)) ([f9ce59c](https://github.com/alchemyplatform/aa-sdk/commit/f9ce59c9874e863e80df8219bfa8d76960bfa82a)) - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -**Note:** Version bump only for package @account-kit/signer - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -### Bug Fixes - -- ensure ordering in events delayed during subscription ([#1645](https://github.com/alchemyplatform/aa-sdk/issues/1645)) ([626fe50](https://github.com/alchemyplatform/aa-sdk/commit/626fe50b3b80225f1396ff6f565e3e1e55028899)) - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -**Note:** Version bump only for package @account-kit/signer - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -**Note:** Version bump only for package @account-kit/signer - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -**Note:** Version bump only for package @account-kit/signer - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Features - -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -### Bug Fixes - -- don't trigger signer subscriptions before subscribe returns ([#1593](https://github.com/alchemyplatform/aa-sdk/issues/1593)) ([6060ca0](https://github.com/alchemyplatform/aa-sdk/commit/6060ca02c7758d975a83379483c3e03cf15424d5)) - -### Features - -- link auth when a user logs in with Google with an existing email ([#1581](https://github.com/alchemyplatform/aa-sdk/issues/1581)) ([dd44ea9](https://github.com/alchemyplatform/aa-sdk/commit/dd44ea9be47b1e8cdd29999e80b81d5d3ccb8077)) -- solana demo ([#1583](https://github.com/alchemyplatform/aa-sdk/issues/1583)) ([d471359](https://github.com/alchemyplatform/aa-sdk/commit/d471359104d0ad55f1c3d4e26d694edc88acffec)), closes [#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578) [#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578) [#1578](https://github.com/alchemyplatform/aa-sdk/issues/1578) [#1582](https://github.com/alchemyplatform/aa-sdk/issues/1582) [#1584](https://github.com/alchemyplatform/aa-sdk/issues/1584) - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/signer - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/signer - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -### Features - -- add replace state filter ([#1579](https://github.com/alchemyplatform/aa-sdk/issues/1579)) ([f243b80](https://github.com/alchemyplatform/aa-sdk/commit/f243b80be5144cfcbe7d961709a022219c3fdd3d)) - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -### Features - -- move to use the alchemy store for web3 communication ([#1562](https://github.com/alchemyplatform/aa-sdk/issues/1562)) ([f86a815](https://github.com/alchemyplatform/aa-sdk/commit/f86a815412cb532de12a405b1cfb143da2e22b77)) - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/signer - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/signer - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/signer - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/signer - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -### Features - -- add mfa methods to rn-signer ([#1542](https://github.com/alchemyplatform/aa-sdk/issues/1542)) ([c41ba79](https://github.com/alchemyplatform/aa-sdk/commit/c41ba792f78fc71395df0c16bbb8184e51272981)) - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -### Features - -- solana hooks ([#1543](https://github.com/alchemyplatform/aa-sdk/issues/1543)) ([0157185](https://github.com/alchemyplatform/aa-sdk/commit/015718534c77813e36a20323b22a83b4fbd1b260)) - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -**Note:** Version bump only for package @account-kit/signer - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/signer - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -**Note:** Version bump only for package @account-kit/signer - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/signer - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -### Features - -- add mfa on sign in with an authenticator app ([#1398](https://github.com/alchemyplatform/aa-sdk/issues/1398)) ([b9315c5](https://github.com/alchemyplatform/aa-sdk/commit/b9315c5cdd9f2674f53cc8d1bebbdb3b569e36ae)) - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -**Note:** Version bump only for package @account-kit/signer - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -### Features - -- allow checking passkey status ([#1497](https://github.com/alchemyplatform/aa-sdk/issues/1497)) ([7ec671b](https://github.com/alchemyplatform/aa-sdk/commit/7ec671bb4552c7fe5f6d9e920035c6d1884acc68)) - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/signer - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/signer - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -### Features - -- allow signer api key creation (experimental) ([#1485](https://github.com/alchemyplatform/aa-sdk/issues/1485)) ([424b27e](https://github.com/alchemyplatform/aa-sdk/commit/424b27e133b5c5c7a9ac08d20e18ce35e705e546)) - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -### Bug Fixes - -- add zustand dependcy to signer sdk ([#1482](https://github.com/alchemyplatform/aa-sdk/issues/1482)) ([3c34d04](https://github.com/alchemyplatform/aa-sdk/commit/3c34d04cd97626f2dabd15572b9526323d1ee89a)) -- send sdk version on signer ([#1472](https://github.com/alchemyplatform/aa-sdk/issues/1472)) ([0f696d6](https://github.com/alchemyplatform/aa-sdk/commit/0f696d64bbc092e9a249ebdffe6db2cce5c73fcc)) - -### Features - -- add twitch integration ([#1443](https://github.com/alchemyplatform/aa-sdk/issues/1443)) ([fcecf39](https://github.com/alchemyplatform/aa-sdk/commit/fcecf3909f9b1ffd6d5294400d054c155e4efa78)) - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -### Features - -- pull email mode from server ([#1441](https://github.com/alchemyplatform/aa-sdk/issues/1441)) ([3034db4](https://github.com/alchemyplatform/aa-sdk/commit/3034db49aab29d1b9bbd8474056a1f9cdfc98ef7)) - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -### Features - -- **signer:** add support for using Solana on new signups ([#1376](https://github.com/alchemyplatform/aa-sdk/issues/1376)) ([e0a092e](https://github.com/alchemyplatform/aa-sdk/commit/e0a092e1e10797a50f99f24cf957cad6153fafad)) - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/signer - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/signer - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/signer - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Bug Fixes - -- disconnect signer when session expires ([#1415](https://github.com/alchemyplatform/aa-sdk/issues/1415)) ([1431168](https://github.com/alchemyplatform/aa-sdk/commit/143116867976bd6005aafa3edafbb80bd1a7e248)) - -### Features - -- add react-native core files ([#1402](https://github.com/alchemyplatform/aa-sdk/issues/1402)) ([060e1ab](https://github.com/alchemyplatform/aa-sdk/commit/060e1ab231db8455a71f25452e1a4cddace60dbd)) - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -### Bug Fixes - -- fb mobile auth ([#1396](https://github.com/alchemyplatform/aa-sdk/issues/1396)) ([c4939ce](https://github.com/alchemyplatform/aa-sdk/commit/c4939ce3dc0e84f1de8fc65575eb9c1c8730a427)) - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -### Features - -- session expiration improvements ([#1291](https://github.com/alchemyplatform/aa-sdk/issues/1291)) ([7cc7b33](https://github.com/alchemyplatform/aa-sdk/commit/7cc7b3371c2d8695ef0ccf34586d8f5079782953)) - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -**Note:** Version bump only for package @account-kit/signer - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -### Features - -- add oauth support to react native signer ([#1273](https://github.com/alchemyplatform/aa-sdk/issues/1273)) ([61984bd](https://github.com/alchemyplatform/aa-sdk/commit/61984bdd65d5432a0abf8b5ce3549423438abe4e)) - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -**Note:** Version bump only for package @account-kit/signer - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -**Note:** Version bump only for package @account-kit/signer - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -### Features - -- add email OTP support ([#1163](https://github.com/alchemyplatform/aa-sdk/issues/1163)) ([76720d9](https://github.com/alchemyplatform/aa-sdk/commit/76720d9b647d5e65a78726935520c41d94c1f6ff)) - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @account-kit/signer - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @account-kit/signer - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -### Features - -- oauth add passkey after signup (popup flow) ([#1151](https://github.com/alchemyplatform/aa-sdk/issues/1151)) ([844a481](https://github.com/alchemyplatform/aa-sdk/commit/844a48123ce8d74a877f23ccbf10d367a9a9551b)) - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -### Bug Fixes - -- **signer:** passkey sessions were being wiped by oauth prep ([#1154](https://github.com/alchemyplatform/aa-sdk/issues/1154)) ([9f0543f](https://github.com/alchemyplatform/aa-sdk/commit/9f0543f0dc3a6a67c725921389778873923ead6c)) - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -### Bug Fixes - -- throw error if no auth providers found ([#1143](https://github.com/alchemyplatform/aa-sdk/issues/1143)) ([aef02e1](https://github.com/alchemyplatform/aa-sdk/commit/aef02e19fd476b187e350111805132e99965829d)) - -### Features - -- oauth add passkey after signup (redirect flow) ([#1140](https://github.com/alchemyplatform/aa-sdk/issues/1140)) ([6d5e229](https://github.com/alchemyplatform/aa-sdk/commit/6d5e229e24402344b214df9689ca18d8f5954922)) - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -**Note:** Version bump only for package @account-kit/signer - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -**Note:** Version bump only for package @account-kit/signer - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -### Bug Fixes - -- **signer:** expire sessions on focus and on timer after init ([#1112](https://github.com/alchemyplatform/aa-sdk/issues/1112)) ([8f28aa4](https://github.com/alchemyplatform/aa-sdk/commit/8f28aa43381d9850682244b4f705d56659f73e56)) - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @account-kit/signer - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -**Note:** Version bump only for package @account-kit/signer - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -### Bug Fixes - -- don't re-initialize unless the user has changed ([#1095](https://github.com/alchemyplatform/aa-sdk/issues/1095)) ([c7768a8](https://github.com/alchemyplatform/aa-sdk/commit/c7768a831b2c9f8e07d36ba940ad81199e4f617c)) - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -### Bug Fixes - -- passkey causes stuck loading state ([#1065](https://github.com/alchemyplatform/aa-sdk/issues/1065)) ([984f34c](https://github.com/alchemyplatform/aa-sdk/commit/984f34ce59ae3edc8f51a8f6a1a10199eaf17987)) - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -### Bug Fixes - -- set error state when authentication fails ([#1038](https://github.com/alchemyplatform/aa-sdk/issues/1038)) ([dfb91d2](https://github.com/alchemyplatform/aa-sdk/commit/dfb91d20924a12d14bb80348b1361d3871f96dfd)) - -### Features - -- add google auth components and demo support (extension of linnas pr) ([#1032](https://github.com/alchemyplatform/aa-sdk/issues/1032)) ([cb91914](https://github.com/alchemyplatform/aa-sdk/commit/cb91914c8da0a7c3e7519bf98bc55d2848062e9f)), closes [#1024](https://github.com/alchemyplatform/aa-sdk/issues/1024) [#1035](https://github.com/alchemyplatform/aa-sdk/issues/1035) [#1036](https://github.com/alchemyplatform/aa-sdk/issues/1036) -- add signer profiling metrics ([b7b0aa3](https://github.com/alchemyplatform/aa-sdk/commit/b7b0aa371e124548c2f2e7693f68e474648ae6c5)) -- log events from signer package ([421d273](https://github.com/alchemyplatform/aa-sdk/commit/421d273240fbbaa8a07303da473e651332577b2e)) - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -### Bug Fixes - -- allow users to log back in after logout ([#1023](https://github.com/alchemyplatform/aa-sdk/issues/1023)) ([0ff156b](https://github.com/alchemyplatform/aa-sdk/commit/0ff156b172eedc0337f3649c0a4b4c41c3834ca8)) - -### Features - -- expose signer error messages ([#1019](https://github.com/alchemyplatform/aa-sdk/issues/1019)) ([998c75c](https://github.com/alchemyplatform/aa-sdk/commit/998c75c61fcd67741bb8d4e25221423441cdd1d6)) -- return id token and claims on user ([#1031](https://github.com/alchemyplatform/aa-sdk/issues/1031)) ([b6e9ccc](https://github.com/alchemyplatform/aa-sdk/commit/b6e9ccc975f8c75ecfb09140cb755fe43ae41e51)) - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -### Bug Fixes - -- ensure openid is included in custom scopes ([#992](https://github.com/alchemyplatform/aa-sdk/issues/992)) ([2492e47](https://github.com/alchemyplatform/aa-sdk/commit/2492e4734ec9eed63624eed15cbc3b50f04faa55)) - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -### Bug Fixes - -- close OAuth popup from parent ([#973](https://github.com/alchemyplatform/aa-sdk/issues/973)) ([b67844c](https://github.com/alchemyplatform/aa-sdk/commit/b67844cc7e58eec8de00dd4504a8265a588ca2b6)) -- **ui-components:** ensure the passkey prompt always shows up when qp is present ([#978](https://github.com/alchemyplatform/aa-sdk/issues/978)) ([81f1580](https://github.com/alchemyplatform/aa-sdk/commit/81f15806e704bcffca6435eccb293923ff64d0e9)) - -### Features - -- add auth0connection param ([#981](https://github.com/alchemyplatform/aa-sdk/issues/981)) ([4fc80e4](https://github.com/alchemyplatform/aa-sdk/commit/4fc80e4e0c675dec51262a761e35d96a30ad100d)) -- improve OAuth error handling ([#982](https://github.com/alchemyplatform/aa-sdk/issues/982)) ([66e85d6](https://github.com/alchemyplatform/aa-sdk/commit/66e85d620e295eae2644cba03ac1f0a9bcc15941)) - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -### Bug Fixes - -- don't ignore oauthCallbackUrl config option ([#971](https://github.com/alchemyplatform/aa-sdk/issues/971)) ([714da46](https://github.com/alchemyplatform/aa-sdk/commit/714da4652f1b55a763d77cc5a509c04054aab384)) - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -### Features - -- add support for social login ([#942](https://github.com/alchemyplatform/aa-sdk/issues/942)) ([aa00dc7](https://github.com/alchemyplatform/aa-sdk/commit/aa00dc7d880f6d9cf9ae29e63941a9552faa9dd5)) - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Bug Fixes - -- merge base into this ([e41b396](https://github.com/alchemyplatform/aa-sdk/commit/e41b396fdf331d2dd7d4e6b608b90dcab37f8386)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([02f2f16](https://github.com/alchemyplatform/aa-sdk/commit/02f2f1623803480b8dc496491d2232c6fe5c219c)) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([a389f65](https://github.com/alchemyplatform/aa-sdk/commit/a389f656a6e4feb14e13ecfc84880e4e0d93d786)) -- allow for passkey + email signup ([#920](https://github.com/alchemyplatform/aa-sdk/issues/920)) ([651a60e](https://github.com/alchemyplatform/aa-sdk/commit/651a60eeafcd3a42dc8ab3e44d5283f52a572ba1)) -- enable linting class methods from exported classes ([1b87a51](https://github.com/alchemyplatform/aa-sdk/commit/1b87a51f5cafada625180b386e9b7e4e58f6e4d7)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([593e84c](https://github.com/alchemyplatform/aa-sdk/commit/593e84c027a697b757e3fd954564ff40cd1e11b0)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Bug Fixes - -- merge base into this ([f9a6b2d](https://github.com/alchemyplatform/aa-sdk/commit/f9a6b2d801b909146c0e10bb072369992163ea69)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([b643981](https://github.com/alchemyplatform/aa-sdk/commit/b643981e900d9cabf6e273b5f7e9e75cd0c32c7d)) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([3cdea84](https://github.com/alchemyplatform/aa-sdk/commit/3cdea8457d0a1fabd63d6d318a7bd1f62883d5b4)) -- allow for passkey + email signup ([#920](https://github.com/alchemyplatform/aa-sdk/issues/920)) ([b196439](https://github.com/alchemyplatform/aa-sdk/commit/b1964397bbfb722bcd306f07a0a3e343af89d1e1)) -- enable linting class methods from exported classes ([4968d83](https://github.com/alchemyplatform/aa-sdk/commit/4968d838e903218d255bff0610babebd37c13413)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([45582b1](https://github.com/alchemyplatform/aa-sdk/commit/45582b14e7116903f9b91cdd4bf2bb04de14ffa4)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Bug Fixes - -- merge base into this ([1409772](https://github.com/alchemyplatform/aa-sdk/commit/140977220c6e9cd32820a64e573c2d8070e9b603)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([8ef751e](https://github.com/alchemyplatform/aa-sdk/commit/8ef751eab7a2357caaa6d5d63cbc1907e90c39cb)) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([e177533](https://github.com/alchemyplatform/aa-sdk/commit/e17753377757b4e75f289224fe7e1c4575875286)) -- enable linting class methods from exported classes ([2ee9eb9](https://github.com/alchemyplatform/aa-sdk/commit/2ee9eb979e1c079ae68a76e9156d6e143c0ce909)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c550465](https://github.com/alchemyplatform/aa-sdk/commit/c55046525d790001db4a9a305cade6f0d06ca90b)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Bug Fixes - -- merge base into this ([ea9ce2c](https://github.com/alchemyplatform/aa-sdk/commit/ea9ce2cabc407eec69aebe459446630142108f06)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([3060a05](https://github.com/alchemyplatform/aa-sdk/commit/3060a05e895e6d6fef363276665f0d3d06c161fb)) - -### Features - -- add doc generator for class methods ([#806](https://github.com/alchemyplatform/aa-sdk/issues/806)) ([4102ae0](https://github.com/alchemyplatform/aa-sdk/commit/4102ae051a5a8ac03fb88f08adc8b3bca0f9737e)) -- enable linting class methods from exported classes ([20df68e](https://github.com/alchemyplatform/aa-sdk/commit/20df68ecc722ee4c87b75f1880debe4591be5bb5)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([637bb95](https://github.com/alchemyplatform/aa-sdk/commit/637bb953d59bfd931652286dfc73497b0e0e288f)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -**Note:** Version bump only for package @account-kit/signer - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([0601453](https://github.com/alchemyplatform/aa-sdk/commit/060145386572026905f5720866722c5a20c9d7db)) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([4c0b2f1](https://github.com/alchemyplatform/aa-sdk/commit/4c0b2f19a59272940b3fe40c610c06ad8c49d70e)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([9d81aaf](https://github.com/alchemyplatform/aa-sdk/commit/9d81aafe89b2dc49e2ab2c44556c81c3010c1fa2)) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([082d363](https://github.com/alchemyplatform/aa-sdk/commit/082d363923684ae3bc45edf544c8536ff3c42379)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([d2f97c5](https://github.com/alchemyplatform/aa-sdk/commit/d2f97c56fdf63871296dd81b10cbc60b61b34d6c)) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c5465ee](https://github.com/alchemyplatform/aa-sdk/commit/c5465eee5c957afcb02d3e0d82c5821dd7819b5f)) - -### BREAKING CHANGES - -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ diff --git a/account-kit/signer/inject-version.ts b/account-kit/signer/inject-version.ts deleted file mode 100644 index 05e1caae82..0000000000 --- a/account-kit/signer/inject-version.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync, writeFileSync } from "fs"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const VERSION_FILE_PATH = "src/version.ts"; - -const packageJSON = JSON.parse(readFileSync("./package.json").toString()); - -writeFileSync( - resolve(__dirname, VERSION_FILE_PATH), - `// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "${packageJSON.version}"; -`, -); -console.log(`Wrote version to ${VERSION_FILE_PATH}.`); diff --git a/account-kit/signer/package.json b/account-kit/signer/package.json deleted file mode 100644 index b6c14b9c76..0000000000 --- a/account-kit/signer/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "@account-kit/signer", - "version": "4.84.1", - "description": "Core interfaces and clients for interfacing with the Alchemy Signer API", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "typings": "./dist/types/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/esm/index.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest --passWithNoTests", - "test:run": "vitest run --passWithNoTests" - }, - "devDependencies": { - "@tanstack/react-query": "^5.28.9", - "@types/bs58": "^4.0.4", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "tailwindcss": "^3.4.3", - "typescript-template": "*" - }, - "dependencies": { - "@aa-sdk/core": "^4.84.1", - "@account-kit/logging": "^4.84.1", - "@noble/curves": "^1.9.2", - "@noble/hashes": "1.7.1", - "@noble/secp256k1": "^2.3.0", - "@solana/web3.js": "^1.98.0", - "@turnkey/http": "^3.11.0", - "@turnkey/iframe-stamper": "^2.5.0", - "@turnkey/viem": "^0.13.1", - "@turnkey/webauthn-stamper": "^0.4.3", - "bs58": "^6.0.0", - "jwt-decode": "^4.0.0", - "zod": "^3.22.4", - "zustand": "^5.0.0-rc.2" - }, - "peerDependencies": { - "viem": "^2.45.0" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d" -} diff --git a/account-kit/signer/src/base.ts b/account-kit/signer/src/base.ts deleted file mode 100644 index 8f5e3d9e1c..0000000000 --- a/account-kit/signer/src/base.ts +++ /dev/null @@ -1,2006 +0,0 @@ -import { - type SmartAccountAuthenticator, - type AuthorizationRequest, - unpackSignRawMessageBytes, -} from "@aa-sdk/core"; -import { - hashMessage, - hashTypedData, - keccak256, - serializeTransaction, - type GetTransactionType, - type Hex, - type IsNarrowable, - type LocalAccount, - type SerializeTransactionFn, - type SignableMessage, - type SignedAuthorization, - type TransactionSerializable, - type TransactionSerialized, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { toAccount } from "viem/accounts"; -import type { Mutate, StoreApi } from "zustand"; -import { subscribeWithSelector } from "zustand/middleware"; -import { createStore } from "zustand/vanilla"; -import type { BaseSignerClient } from "./client/base"; -import { - type EmailType, - type MfaFactor, - type OauthConfig, - type OauthParams, - type User, - type VerifyMfaParams, - type AddMfaParams, - type AddMfaResult, - type RemoveMfaParams, - type AuthLinkingPrompt, - type OauthProviderInfo, - type IdTokenOnly, - type AuthMethods, -} from "./client/types.js"; -import { NotAuthenticatedError, UnsupportedFeatureError } from "./errors.js"; -import { SignerLogger } from "./metrics.js"; -import { - SessionManager, - type SessionManagerParams, -} from "./session/manager.js"; -import type { SessionManagerEvents } from "./session/types"; -import type { AuthParams } from "./signer"; -import { SolanaSigner } from "./solanaSigner.js"; -import { - AlchemySignerStatus, - type AlchemySignerEvent, - type AlchemySignerEvents, - type ErrorInfo, - type ValidateMultiFactorsArgs, -} from "./types.js"; -import { assertNever } from "./utils/typeAssertions.js"; -import { hashAuthorization } from "viem/utils"; - -export interface BaseAlchemySignerParams { - client: TClient; - sessionConfig?: Omit; - initialError?: ErrorInfo; - initialAuthLinkingPrompt?: AuthLinkingPrompt; -} - -type AlchemySignerStore = { - user: User | null; - status: AlchemySignerStatus; - error: ErrorInfo | null; - otpId?: string; - isNewUser?: boolean; - mfaStatus: { - mfaRequired: boolean; - mfaFactorId?: string; - encryptedPayload?: string; - }; - authLinkingStatus?: { - email: string; - providerName: string; - idToken: string; - accessToken?: string; - }; -}; - -type InternalStore = Mutate< - StoreApi, - [["zustand/subscribeWithSelector", never]] ->; - -export type EmailConfig = { - mode?: "MAGIC_LINK" | "OTP"; -}; - -export type SignerConfig = { - email: EmailConfig; -}; - -type GetUserParams = - | { - type: "email"; - value: string; - } - | { - type: "phone"; - value: string; - }; - -type VerificationParams = { - verificationCode: string; -}; - -/** - * Base abstract class for Alchemy Signer, providing authentication and session management for smart accounts. - * Implements the `SmartAccountAuthenticator` interface and handles various signer events. - */ -export abstract class BaseAlchemySigner - implements SmartAccountAuthenticator -{ - signerType: "alchemy-signer" | "rn-alchemy-signer" = "alchemy-signer"; - inner: TClient; - private sessionManager: SessionManager; - private store: InternalStore; - private config: Promise; - - /** - * Initializes an instance with the provided client and session configuration. - * This function sets up the internal store, initializes the session manager, - * registers listeners and initializes the session manager to manage session state. - * - * @param {BaseAlchemySignerParams} param0 Object containing the client and session configuration - * @param {TClient} param0.client The client instance to be used internally - * @param {SessionConfig} param0.sessionConfig Configuration for managing sessions - * @param {ErrorInfo | undefined} param0.initialError Error already present on the signer when initialized, if any - */ - constructor({ - client, - sessionConfig, - initialError, - initialAuthLinkingPrompt, - }: BaseAlchemySignerParams) { - this.inner = client; - this.store = createStore( - subscribeWithSelector( - () => - ({ - user: null, - status: AlchemySignerStatus.INITIALIZING, - error: initialError ?? null, - mfaStatus: { - mfaRequired: false, - mfaFactorId: undefined, - }, - }) satisfies AlchemySignerStore, - ), - ); - // NOTE: it's important that the session manager share a client - // with the signer. The SessionManager leverages the Signer's client - // to manage session state. - this.sessionManager = new SessionManager({ - ...sessionConfig, - client: this.inner, - }); - // register listeners first - this.registerListeners(); - // then initialize so that we can catch those events - this.sessionManager.initialize(); - this.config = this.fetchConfig(); - if (initialAuthLinkingPrompt) { - this.setAuthLinkingPrompt(initialAuthLinkingPrompt); - } - } - - /** - * Allows you to subscribe to events emitted by the signer - * - * @param {AlchemySignerEvent} event the event to subscribe to - * @param {AlchemySignerEvents[AlchemySignerEvent]} listener the function to run when the event is emitted - * @returns {() => void} a function to remove the listener - */ - on = ( - event: E, - listener: AlchemySignerEvents[E], - ) => { - // NOTE: we're using zustand here to handle this because we are able to use the fireImmediately - // option which deals with a possible race condition where the listener is added after the event - // is fired. In the Client and SessionManager we use EventEmitter because it's easier to handle internally - switch (event) { - case "connected": - return subscribeWithDelayedFireImmediately( - this.store, - ({ status }) => status, - (status) => - status === AlchemySignerStatus.CONNECTED && - (listener as AlchemySignerEvents["connected"])( - this.store.getState().user!, - ), - ); - case "disconnected": - return subscribeWithDelayedFireImmediately( - this.store, - ({ status }) => status, - (status) => - status === AlchemySignerStatus.DISCONNECTED && - (listener as AlchemySignerEvents["disconnected"])(), - ); - case "statusChanged": - return subscribeWithDelayedFireImmediately( - this.store, - ({ status }) => status, - listener as AlchemySignerEvents["statusChanged"], - ); - case "errorChanged": - return subscribeWithDelayedFireImmediately( - this.store, - ({ error }) => error, - (error) => - (listener as AlchemySignerEvents["errorChanged"])( - error ?? undefined, - ), - ); - case "newUserSignup": - return subscribeWithDelayedFireImmediately( - this.store, - ({ isNewUser }) => isNewUser, - (isNewUser) => { - if (isNewUser) (listener as AlchemySignerEvents["newUserSignup"])(); - }, - ); - case "mfaStatusChanged": - return subscribeWithDelayedFireImmediately( - this.store, - ({ mfaStatus }) => mfaStatus, - (mfaStatus) => - (listener as AlchemySignerEvents["mfaStatusChanged"])(mfaStatus), - ); - case "emailAuthLinkingRequired": - return subscribeWithDelayedFireImmediately( - this.store, - ({ authLinkingStatus }) => authLinkingStatus, - (authLinkingStatus) => { - if (authLinkingStatus) { - (listener as AlchemySignerEvents["emailAuthLinkingRequired"])( - authLinkingStatus.email, - ); - } - }, - ); - default: - assertNever(event, `Unknown event type ${event}`); - } - }; - - /** - * Prepares the config needed to use popup-based OAuth login. This must be - * called before calling `.authenticate` with params `{ type: "oauth", mode: - * "popup" }`, and is recommended to be called on page load. - * - * This method exists because browsers may prevent popups from opening unless - * triggered by user interaction, and so the OAuth config must already have - * been fetched at the time a user clicks a social login button. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * await signer.preparePopupOauth(); - * ``` - * @returns {Promise} the config which must be loaded before - * using popup-based OAuth - */ - preparePopupOauth = (): Promise => this.inner.initOauth(); - - /** - * Authenticate a user with either an email or a passkey and create a session for that user - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.authenticate({ - * type: "email", - * email: "foo@mail.com", - * }); - * ``` - * - * @param {AuthParams} params - undefined if passkey login, otherwise an object with email and bundle to resolve - * @returns {Promise} the user that was authenticated - */ - authenticate: (params: AuthParams) => Promise = SignerLogger.profiled( - "BaseAlchemySigner.authenticate", - async (params) => { - const { type } = params; - const result = (() => { - switch (type) { - case "email": - return this.authenticateWithEmail(params); - case "sms": - return this.authenticateWithSms(params); - case "passkey": - return this.authenticateWithPasskey(params); - case "oauth": - return this.authenticateWithOauth(params); - case "oauthReturn": - return this.handleOauthReturn(params); - case "otp": - return this.authenticateWithOtp(params); - case "custom-jwt": - return this.authenticateWithJwt(params); - case "accessKey": - throw new UnsupportedFeatureError("Access key auth"); - default: - assertNever(type, `Unknown auth type: ${type}`); - } - })(); - - this.trackAuthenticateType(params); - - return result.catch((error) => { - /** - * 2 things going on here: - * 1. for oauth flows we expect the status to remain in authenticating - * 2. we do the ternary, because if we explicitly pass in `undefined` for the status, zustand will set the value of status to `undefined`. - * However, if we omit it, then it will not override the current value of status. - */ - this.store.setState({ - error: toErrorInfo(error), - ...(type === "oauthReturn" || type === "oauth" - ? {} - : { status: AlchemySignerStatus.DISCONNECTED }), - }); - throw error; - }); - }, - ); - - private trackAuthenticateType = (params: AuthParams) => { - const { type } = params; - switch (type) { - case "email": { - // we just want to track the start of email auth - if ("bundle" in params) return; - SignerLogger.trackEvent({ - name: "signer_authnticate", - data: { authType: "email" }, - }); - return; - } - case "sms": { - // we just want to track the start of phone auth - SignerLogger.trackEvent({ - name: "signer_authnticate", - data: { authType: "sms" }, - }); - return; - } - case "passkey": { - const isAnon = !("email" in params) && params.createNew == null; - SignerLogger.trackEvent({ - name: "signer_authnticate", - data: { - authType: isAnon ? "passkey_anon" : "passkey_email", - }, - }); - return; - } - case "custom-jwt": { - SignerLogger.trackEvent({ - name: "signer_authnticate", - data: { - authType: "custom-jwt", - provider: params.authProviderId, - }, - }); - return; - } - case "oauth": - SignerLogger.trackEvent({ - name: "signer_authnticate", - data: { - authType: "oauth", - provider: params.authProviderId, - }, - }); - break; - case "oauthReturn": - break; - case "otp": - SignerLogger.trackEvent({ - name: "signer_authnticate", - data: { authType: "otp" }, - }); - break; - case "accessKey": - break; - default: - assertNever(type, `Unknown auth type: ${type}`); - } - }; - - /** - * Clear a user session and log them out - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * await signer.disconnect(); - * ``` - * - * @returns {Promise} a promise that resolves when the user is logged out - */ - disconnect: () => Promise = async () => { - await this.inner.disconnect(); - }; - - /** - * Gets the current logged in user - * If a user has an ongoing session, it will use that session and - * try to authenticate - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * // throws if not logged in - * const user = await signer.getAuthDetails(); - * ``` - * - * @throws if there is no user logged in - * @returns {Promise} the current user - */ - getAuthDetails = async (): Promise => { - const sessionUser = await this.sessionManager.getSessionUser(); - if (sessionUser != null) { - return sessionUser; - } - - return this.inner.whoami(); - }; - - /** - * Retrieves the address of the current user by calling the `whoami` method on `this.inner`. - * - * @returns {Promise} A promise that resolves to the address of the current user. - */ - getAddress: () => Promise<`0x${string}`> = SignerLogger.profiled( - "BaseAlchemySigner.getAddress", - async () => { - const { address } = await this.inner.whoami(); - - return address; - }, - ); - - /** - * Signs a raw message after hashing it. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const signature = await signer.signMessage("Hello, world!"); - * ``` - * - * @param {string} msg the message to be hashed and then signed - * @returns {Promise} a promise that resolves to the signed message - */ - signMessage: (msg: SignableMessage) => Promise<`0x${string}`> = - SignerLogger.profiled("BaseAlchemySigner.signMessage", async (msg) => { - const messageHash = hashMessage(msg); - - const result = await this.inner.signRawMessage(messageHash); - - SignerLogger.trackEvent({ - name: "signer_sign_message", - }); - - return result; - }); - - /** - * Signs a typed message by first hashing it and then signing the hashed message using the `signRawMessage` method. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const signature = await signer.signTypedData({ - * domain: {}, - * types: {}, - * primaryType: "", - * message: {}, - * }); - * ``` - * - * @param {TypedDataDefinition} params The parameters for the typed message to be hashed and signed - * @returns {Promise} A promise that resolves to the signed message - */ - signTypedData: < - const TTypedData extends TypedData | Record, - TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData, - >( - params: TypedDataDefinition, - ) => Promise = SignerLogger.profiled( - "BaseAlchemySigner.signTypedData", - async (params) => { - const messageHash = hashTypedData(params); - - return this.inner.signRawMessage(messageHash); - }, - ); - - /** - * Serializes a transaction, signs it with a raw message, and then returns the serialized transaction with the signature. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const tx = await signer.signTransaction({ - * to: "0x1234", - * value: "0x1234", - * data: "0x1234", - * }); - * ``` - * - * @param {Transaction} tx the transaction to be serialized and signed - * @param {{serializer?: SerializeTransactionFn}} args options for serialization - * @param {() => Hex} [args.serializer] an optional serializer function. If not provided, the default `serializeTransaction` function will be used - * @returns {Promise} a promise that resolves to the serialized transaction with the signature - */ - signTransaction: < - serializer extends - SerializeTransactionFn = SerializeTransactionFn, - transaction extends Parameters[0] = Parameters[0], - >( - transaction: transaction, - options?: - | { - serializer?: serializer | undefined; - } - | undefined, - ) => Promise< - IsNarrowable< - TransactionSerialized>, - Hex - > extends true - ? TransactionSerialized> - : Hex - > = SignerLogger.profiled( - "BaseAlchemySigner.signTransaction", - async (tx, args) => { - const serializeFn = args?.serializer ?? serializeTransaction; - const serializedTx = serializeFn(tx); - const signatureHex = await this.inner.signRawMessage( - keccak256(await serializedTx), - ); - - const signature = unpackSignRawMessageBytes(signatureHex); - - return serializeFn(tx, signature); - }, - ); - - /** - * Signs an EIP-7702 Authorization and then returns the authorization with the signature. - * - * @example - * ```ts twoslash - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const tx = await signer.signAuthorization({ - * contractAddress: "0x1234123412341234123412341234123412341234", - * chainId: 1, - * nonce: 0, - * }); - * ``` - * - * @param {AuthorizationRequest} unsignedAuthorization the authorization to be signed - * @returns {Promise> | undefined} a promise that resolves to the authorization with the signature - */ - signAuthorization: ( - unsignedAuthorization: AuthorizationRequest, - ) => Promise> = SignerLogger.profiled( - "BaseAlchemySigner.signAuthorization", - async (unsignedAuthorization) => { - const hashedAuthorization = hashAuthorization(unsignedAuthorization); - const signedAuthorizationHex = - await this.inner.signRawMessage(hashedAuthorization); - const signature = unpackSignRawMessageBytes(signedAuthorizationHex); - const { address, contractAddress, ...unsignedAuthorizationRest } = - unsignedAuthorization; - - return { - ...unsignedAuthorizationRest, - ...signature, - address: address ?? contractAddress, - }; - }, - ); - - /** - * Gets the current MFA status - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const mfaStatus = signer.getMfaStatus(); - * if (mfaStatus === AlchemyMfaStatus.REQUIRED) { - * // Handle MFA requirement - * } - * ``` - * - * @returns {{ mfaRequired: boolean; mfaFactorId?: string }} The current MFA status - */ - getMfaStatus = (): { - mfaRequired: boolean; - mfaFactorId?: string; - } => { - return this.store.getState().mfaStatus; - }; - - /** - * Unauthenticated call to look up a user's organizationId by email - * - * @deprecated Use getUser({ type: "email", value: email }) instead - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.getUser("foo@mail.com"); - * ``` - * - * @param {string} email the email to lookup - * @returns {Promise<{orgId: string}>} the organization id for the user if they exist - */ - getUser(email: string): Promise<{ orgId: string } | null>; - /** - * Unauthenticated call to look up a user's organizationId by email or phone - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.getUser({ type: "email", value: "foo@mail.com" }); - * ``` - * - * @param {string} email the email to lookup - * @returns {Promise<{orgId: string}>} the organization id for the user if they exist - */ - getUser(params: GetUserParams): Promise<{ orgId: string } | null>; - /** - * Unauthenticated call to look up a user's organizationId by email or phone - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.getUser({ type: "email", value: "foo@mail.com" }); - * ``` - * - * @param {string | GetUserParams} params the params to look up - * @returns {Promise<{orgId: string}>} the organization id for the user if they exist - */ - getUser(params: string | GetUserParams): Promise<{ orgId: string } | null> { - return SignerLogger.profiled( - "BaseAlchemySigner.getUser", - async (params: string | GetUserParams) => { - const _params = - typeof params === "string" - ? { type: "email" as const, value: params } - : params; - - const result = - _params.type === "email" - ? await this.inner.lookupUserByEmail(_params.value) - : _params.type === "phone" - ? await this.inner.lookupUserByPhone(_params.value) - : assertNever(_params, "unhandled get user params"); - - if (result?.orgId == null) { - return null; - } - - return { - orgId: result.orgId, - }; - }, - )(params); - } - - /** - * Sets the email for the authenticated user, allowing them to login with that - * email. - * - * @deprecated You must contact Alchemy to enable this feature for your team, - * as there are important security considerations. In particular, you must not - * call this without first validating that the user owns this email account. - * It is recommended to now use the email verification flow instead. - * - * @param {string} email The email to set for the user - * @returns {Promise} A promise that resolves to the updated email address - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - setEmail(email: string): Promise; - - /** - * Uses a verification code to update a user's email, allowing them to login - * with that email. `sendVerificationCode` should be called first to obtain - * the code. - * - * @param {VerificationParams} params An object containing the verification code - * @param {string} params.verificationCode The OTP verification code - * @returns {Promise} A promise that resolves to the updated email address - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - setEmail(params: VerificationParams): Promise; - - /** - * Implementation for setEmail method. - * - * @param {string | VerificationParams} params An object containing the verificationCode (or simply an email for legacy usage) - * @returns {Promise} A promise that resolves when the email is set - */ - async setEmail(params: string | VerificationParams): Promise { - return SignerLogger.profiled( - "BaseAlchemySigner.setEmail", - async (params: string | { verificationCode: string }) => { - if (typeof params === "string") { - // Deprecated usage for backwards compatibility. - const email = params; - return await this.inner.setEmail(email); - } - const { otpId } = this.store.getState(); - if (!otpId) { - throw new Error("Missing OTP ID"); - } - return await this.inner.setEmail({ - id: otpId, - code: params.verificationCode, - }); - }, - )(params); - } - - /** - * Removes the email for the authenticated user, disallowing them from login with that email. - * - * @returns {Promise} A promise that resolves when the email is removed - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - removeEmail: () => Promise = SignerLogger.profiled( - "BaseAlchemySigner.removeEmail", - async () => { - await this.inner.removeEmail(); - }, - ); - - /** - * Sets the phone number for the authenticated user, allowing them to login with that - * phone number. `sendVerificationCode` should be called first to obtain the code. - * - * @param {VerificationParams} params An object containing the verification code - * @param {string} params.verificationCode The OTP verification code - * @returns {Promise} A promise that resolves when the phone number is set - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - setPhoneNumber: (params: VerificationParams) => Promise = - SignerLogger.profiled( - "BaseAlchemySigner.setPhoneNumber", - async ({ verificationCode }) => { - const { otpId } = this.store.getState(); - if (!otpId) { - throw new Error("Missing OTP ID"); - } - await this.inner.setPhoneNumber({ - id: otpId, - code: verificationCode, - }); - }, - ); - - /** - * Removes the phone number for the authenticated user, disallowing them from login with that phone number. - * - * @returns {Promise} A promise that resolves when the phone number is removed - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - removePhoneNumber: () => Promise = SignerLogger.profiled( - "BaseAlchemySigner.removePhoneNumber", - async () => { - await this.inner.removePhoneNumber(); - }, - ); - - /** - * Initiates an OTP (One-Time Password) verification process for a user contact. - * Use this method before calling `setEmail` with verification code to verify ownership of the email address. - * - * @param {"email" | "sms"} type The type of OTP to send, either "email" or "sms" - * @param {string} contact The email address or phone number to send the OTP to - * @returns {Promise<{ otpId: string }>} A promise that resolves to an object containing the OTP ID - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - sendVerificationCode: ( - type: "email" | "sms", - contact: string, - ) => Promise<{ otpId: string }> = SignerLogger.profiled( - "BaseAlchemySigner.sendVerificationCode", - async (type, contact) => { - const { otpId } = await this.inner.initOtp(type, contact); - this.store.setState({ otpId }); - return { otpId }; - }, - ); - - /** - * Adds a passkey to the user's account - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.addPasskey() - * ``` - * - * @param {CredentialCreationOptions | undefined} params optional parameters for the passkey creation - * @returns {Promise} an array of the authenticator ids added to the user - */ - addPasskey: (params?: CredentialCreationOptions) => Promise = - SignerLogger.profiled("BaseAlchemySigner.addPasskey", async (params) => { - return this.inner.addPasskey(params ?? {}); - }); - - /** - * Removes a passkey from a user's account - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const authMethods = await signer.listAuthMethods(); - * const passkey = authMethods.passkeys[0]; - * - * const result = await signer.removePasskey(passkey.authenticatorId); - * ``` - * - * @param {CredentialCreationOptions | undefined} params optional parameters for the passkey creation - * @returns {Promise} an array of the authenticator ids added to the user - */ - removePasskey: (authenticatorId: string) => Promise = - SignerLogger.profiled( - "BaseAlchemySigner.removePasskey", - async (authenticatorId) => { - return this.inner.removePasskey(authenticatorId); - }, - ); - - getPasskeyStatus: () => Promise<{ isPasskeyAdded: boolean }> = - SignerLogger.profiled("BaseAlchemySigner.getPasskeyStatus", async () => { - return this.inner.getPasskeyStatus(); - }); - - /** - * Used to export the wallet for a given user - * If the user is authenticated with an Email, this will return a seed phrase - * If the user is authenticated with a Passkey, this will return a private key - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * // the params passed to this are different based on the specific signer - * const result = signer.exportWallet() - * ``` - * - * @param {unknown} params exportWallet parameters - * @returns {Promise} the result of the wallet export operation - */ - exportWallet: TClient["exportWallet"] = async (params) => { - return this.inner.exportWallet(params); - }; - - /** - * Exports a private key for a given account encrypted with the provided public key - * - * @param {ExportPrivateKeyParams} opts the parameters for the export - * @returns {Promise} the private key - */ - exportPrivateKeyEncrypted: TClient["exportPrivateKeyEncrypted"] = (opts) => { - return this.inner.exportPrivateKeyEncrypted(opts); - }; - - /** - * This method lets you adapt your AlchemySigner to a viem LocalAccount, which - * will let you use the signer as an EOA directly. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const account = signer.toViemAccount(); - * ``` - * - * @throws if your signer is not authenticated - * @returns {LocalAccount} a LocalAccount object that can be used with viem's wallet client - */ - toViemAccount = (): LocalAccount => { - // if we want this method to be synchronous, then we need to do this check here - // otherwise we can use the sessionManager to get the user - if (!this.inner.getUser()) { - throw new NotAuthenticatedError(); - } - - return toAccount({ - address: this.inner.getUser()!.address, - signMessage: (msg) => this.signMessage(msg.message), - signTypedData: < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >( - typedDataDefinition: TypedDataDefinition, - ) => this.signTypedData(typedDataDefinition), - signTransaction: this.signTransaction, - }); - }; - - /** - * Creates a new instance of `SolanaSigner` using the provided inner value. - * This requires the signer to be authenticated first - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const solanaSigner = signer.toSolanaSigner(); - * ``` - * - * @returns {SolanaSigner} A new instance of `SolanaSigner` - */ - toSolanaSigner = (): SolanaSigner => { - if (!this.inner.getUser()) { - throw new NotAuthenticatedError(); - } - - return new SolanaSigner(this.inner); - }; - - private authenticateWithEmail = async ( - params: Extract, - ): Promise => { - if ("bundle" in params) { - return this.completeEmailAuth(params); - } - - const { orgId, otpId, isNewUser } = await this.initOrCreateEmailUser( - params.email, - params.emailMode, - params.multiFactors, - params.redirectParams, - ); - - this.setAwaitingEmailAuth({ orgId, otpId, isNewUser }); - - // Clear the auth linking status if the email has changed. This would mean - // that the previously initiated social login is not associated with the - // email which is now being used to login. - const { authLinkingStatus } = this.store.getState(); - if (authLinkingStatus && authLinkingStatus.email !== params.email) { - this.store.setState({ authLinkingStatus: undefined }); - } - - // We wait for the session manager to emit a connected event if - // cross tab sessions are permitted - return this.waitForConnected(); - }; - - private authenticateWithSms = async ( - params: Extract, - ): Promise => { - const { orgId, otpId, isNewUser } = await this.initOrCreateSmsUser( - params.phone, - ); - - this.setAwaitingSmsAuth({ orgId, otpId, isNewUser }); - - // TODO: add phone auth linking - // // Clear the auth linking status if the email has changed. This would mean - // // that the previously initiated social login is not associated with the - // // email which is now being used to login. - // const { authLinkingStatus } = this.store.getState(); - // if (authLinkingStatus && authLinkingStatus.email !== params.email) { - // this.store.setState({ authLinkingStatus: undefined }); - // } - - // We wait for the session manager to emit a connected event if - // cross tab sessions are permitted - return this.waitForConnected(); - }; - - private authenticateWithPasskey = async ( - args: Extract, - ): Promise => { - let user: User; - const shouldCreateNew = async () => { - if ("email" in args) { - const existingUser = await this.getUser({ - type: "email", - value: args.email, - }); - return existingUser == null; - } - - return args.createNew; - }; - - if (await shouldCreateNew()) { - const result = await this.inner.createAccount( - args as Extract< - AuthParams, - { type: "passkey" } & ({ email: string } | { createNew: true }) - >, - ); - // account creation for passkeys returns the whoami response so we don't have to - // call it again after signup - user = { - address: result.address!, - userId: result.userId!, - orgId: result.orgId, - }; - } else { - user = await this.inner.lookupUserWithPasskey(); - if (!user) { - this.store.setState({ - status: AlchemySignerStatus.DISCONNECTED, - }); - throw new Error("No user found"); - } - } - - return user; - }; - - private authenticateWithOauth = async ( - args: Extract, - ): Promise => { - this.store.setState({ authLinkingStatus: undefined }); - const params: OauthParams = { - ...args, - expirationSeconds: this.getExpirationSeconds(), - }; - if (params.mode === "redirect") { - const user = await this.inner.oauthWithRedirect(params); - if (!isUser(user)) { - throw new Error("Expected user from oauth with redirect"); - } - return user; - } - const result = await this.inner.oauthWithPopup(params); - if (isIdTokenOnly(result)) { - throw new Error( - "Should not get only id token when authenticating with oauth", - ); - } - if (!isAuthLinkingPrompt(result)) { - return result; - } - this.setAuthLinkingPrompt(result); - return this.waitForConnected(); - }; - - /** - * Handles OAuth authentication by augmenting the provided arguments with a type and performing authentication based on the OAuth mode (either using redirect or popup). - * - * @param {Omit, "type">} args Authentication parameters omitting the type, which will be set to "oauth" - * @returns {Promise} A promise that resolves to an `OauthProviderInfo` object containing provider information and the ID token. - */ - public addOauthProvider = async ( - args: Omit, "type">, - ): Promise => { - // This cast is required to suppress a spurious type error. We're just - // putting the omitted field back in, but TypeScript doesn't recognize that. - const argsWithType = { type: "oauth", ...args } as Extract< - AuthParams, - { type: "oauth" } - >; - const params: OauthParams = { - ...argsWithType, - fetchIdTokenOnly: true, - }; - const result = await (params.mode === "redirect" - ? this.inner.oauthWithRedirect(params) - : this.inner.oauthWithPopup(params)); - if (!isIdTokenOnly(result)) { - throw new Error("Expected id token only from oauth response"); - } - return await this.inner.addOauthProvider({ - providerName: result.providerName, - oidcToken: result.idToken, - }); - }; - - /** - * Removes an OAuth provider by its ID if the user is authenticated. - * - * @param {string} providerId The ID of the OAuth provider to be removed, as obtained from `listOauthProviders` - * @returns {Promise} A promise indicating the result of the removal process - * @throws {NotAuthenticatedError} Thrown if the user is not authenticated - */ - public removeOauthProvider = async (providerId: string) => { - if (!this.inner.getUser()) { - throw new NotAuthenticatedError(); - } - return this.inner.removeOauthProvider(providerId); - }; - - /** - * Retrieves a list of auth methods associated with the authenticated user. - * - * @returns {Promise} A promise that resolves to an `AuthMethods` object containing the user's email, OAuth providers, and passkeys. - * @throws {NotAuthenticatedError} Thrown if the user is not authenticated - */ - public listAuthMethods = async (): Promise => { - if (!this.inner.getUser()) { - throw new NotAuthenticatedError(); - } - return this.inner.listAuthMethods(); - }; - - private authenticateWithJwt = async ( - args: Extract, - ): Promise => { - const { credentialBundle, orgId, isSignUp } = await this.inner.submitJwt({ - jwt: args.jwt, - authProvider: args.authProviderId, - expirationSeconds: this.getExpirationSeconds(), - }); - - const user = await this.inner.completeAuthWithBundle({ - bundle: credentialBundle, - orgId: orgId, - connectedEventName: "connectedJwt", - authenticatingType: "custom-jwt", - }); - - this.emitNewUserEvent(isSignUp); - return user; - }; - - private authenticateWithOtp = async ( - args: Extract, - ): Promise => { - const tempSession = this.sessionManager.getTemporarySession(); - const { orgId, isNewUser } = tempSession ?? {}; - const { otpId } = this.store.getState(); - if (!orgId) { - throw new Error("orgId not found in session"); - } - if (!otpId) { - throw new Error("otpId not found in session"); - } - - const response = await this.inner.submitOtpCode({ - orgId, - otpId, - otpCode: args.otpCode, - expirationSeconds: this.getExpirationSeconds(), - multiFactors: args.multiFactors, - }); - - if (response.mfaRequired) { - this.handleMfaRequired(response.encryptedPayload, response.multiFactors); - return this.waitForConnected(); - } - - const user = await this.inner.completeAuthWithBundle({ - bundle: response.bundle, - orgId, - connectedEventName: "connectedOtp", - authenticatingType: "otp", - }); - - this.emitNewUserEvent(isNewUser); - if (tempSession) { - this.sessionManager.setTemporarySession({ - ...tempSession, - isNewUser: false, - }); - } - - const { authLinkingStatus } = this.store.getState(); - if (authLinkingStatus) { - (async () => { - this.inner.addOauthProvider({ - providerName: authLinkingStatus.providerName, - oidcToken: authLinkingStatus.idToken, - }); - })(); - } - - return user; - }; - - private setAwaitingEmailAuth = ({ - orgId, - otpId, - isNewUser, - }: { - orgId: string; - otpId?: string; - isNewUser?: boolean; - }): void => { - this.sessionManager.setTemporarySession({ - orgId, - isNewUser, - }); - this.store.setState({ - status: AlchemySignerStatus.AWAITING_EMAIL_AUTH, - otpId, - error: null, - }); - }; - - private setAwaitingSmsAuth = ({ - orgId, - otpId, - isNewUser, - }: { - orgId: string; - otpId?: string; - isNewUser?: boolean; - }): void => { - this.sessionManager.setTemporarySession({ - orgId, - isNewUser, - }); - this.store.setState({ - status: AlchemySignerStatus.AWAITING_SMS_AUTH, - otpId, - error: null, - }); - }; - - private handleOauthReturn = ({ - bundle, - orgId, - idToken, - accessToken, - isNewUser, - }: Extract): Promise => { - const user = this.inner.completeAuthWithBundle({ - bundle, - orgId, - connectedEventName: "connectedOauth", - authenticatingType: "oauth", - idToken, - accessToken, - }); - - this.emitNewUserEvent(isNewUser); - - return user; - }; - - private handleMfaRequired( - encryptedPayload: string, - multiFactors: MfaFactor[], - ) { - // Store complete MFA context in the temporary session - const tempSession = this.sessionManager.getTemporarySession(); - if (tempSession) { - this.sessionManager.setTemporarySession({ - ...tempSession, - encryptedPayload, - mfaFactorId: multiFactors?.[0]?.multiFactorId, - }); - } - - // Keep minimal state in the store for UI updates - this.store.setState({ - status: AlchemySignerStatus.AWAITING_MFA_AUTH, - error: null, - mfaStatus: { - mfaRequired: true, - mfaFactorId: multiFactors?.[0]?.multiFactorId, - }, - }); - } - - private getExpirationSeconds = () => - Math.floor(this.sessionManager.expirationTimeMs / 1000); - - private registerListeners = () => { - // Declare listeners in an object to typecheck that every event type is - // handled. - const listeners: SessionManagerEvents = { - connected: (session) => { - this.store.setState({ - user: session.user, - status: AlchemySignerStatus.CONNECTED, - error: null, - }); - }, - disconnected: () => { - this.store.setState({ - user: null, - status: AlchemySignerStatus.DISCONNECTED, - }); - }, - initialized: () => { - this.store.setState((state) => ({ - status: state.user - ? AlchemySignerStatus.CONNECTED - : AlchemySignerStatus.DISCONNECTED, - ...(state.user ? { error: null } : undefined), - })); - }, - }; - - for (const [event, listener] of Object.entries(listeners)) { - this.sessionManager.on(event as keyof SessionManagerEvents, listener); - } - - this.inner.on("authenticating", ({ type }) => { - const status = (() => { - switch (type) { - case "email": - return AlchemySignerStatus.AUTHENTICATING_EMAIL; - case "passkey": - return AlchemySignerStatus.AUTHENTICATING_PASSKEY; - case "oauth": - return AlchemySignerStatus.AUTHENTICATING_OAUTH; - case "otp": - case "otpVerify": - return AlchemySignerStatus.AWAITING_OTP_AUTH; - case "sms": - return AlchemySignerStatus.AWAITING_SMS_AUTH; - case "custom-jwt": - return AlchemySignerStatus.AUTHENTICATING_JWT; - default: - assertNever(type, "unhandled authenticating type"); - } - })(); - - // trigger new user event on signer from client - this.inner.on("newUserSignup", () => { - this.emitNewUserEvent(true); - }); - - this.store.setState({ - status, - error: null, - }); - }); - }; - - private emitNewUserEvent = (isNewUser?: boolean) => { - // assumes that if isNewUser is undefined it is a returning user - if (isNewUser) this.store.setState({ isNewUser }); - }; - - private async initOrCreateEmailUser( - email: string, - emailMode?: EmailType, - multiFactors?: VerifyMfaParams[], - redirectParams?: URLSearchParams, - ): Promise<{ - orgId: string; - otpId?: string; - isNewUser: boolean; - }> { - const existingUser = await this.getUser(email); - const expirationSeconds = this.getExpirationSeconds(); - - if (existingUser) { - const { orgId, otpId } = await this.inner.initEmailAuth({ - email: email, - emailMode: emailMode, - expirationSeconds, - redirectParams: redirectParams, - multiFactors, - }); - return { - orgId, - otpId, - isNewUser: false, - }; - } - - const { orgId, otpId } = await this.inner.createAccount({ - type: "email", - email, - emailMode, - expirationSeconds, - redirectParams, - }); - return { - orgId, - otpId, - isNewUser: true, - }; - } - - private async initOrCreateSmsUser(phone: string): Promise<{ - orgId: string; - otpId?: string; - isNewUser: boolean; - }> { - const existingUser = await this.getUser({ type: "phone", value: phone }); - - if (existingUser) { - const { orgId, otpId } = await this.inner.initSmsAuth({ - phone, - }); - return { - orgId, - otpId, - isNewUser: false, - }; - } - - const { orgId, otpId } = await this.inner.createAccount({ - type: "sms", - phone, - }); - return { - orgId, - otpId, - isNewUser: true, - }; - } - - private async completeEmailAuth( - params: Extract, - ): Promise { - const temporarySession = params.orgId - ? { orgId: params.orgId } - : this.sessionManager.getTemporarySession(); - - if (!temporarySession) { - this.store.setState({ status: AlchemySignerStatus.DISCONNECTED }); - throw new Error("Could not find email auth init session!"); - } - - const user = await this.inner.completeAuthWithBundle({ - bundle: params.bundle, - orgId: temporarySession.orgId, - connectedEventName: "connectedEmail", - authenticatingType: "email", - }); - - // fire new user event - this.emitNewUserEvent(params.isNewUser); - - return user; - } - - /** - * Retrieves the list of MFA factors configured for the current user. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const { multiFactors } = await signer.getMfaFactors(); - * ``` - * - * @throws {NotAuthenticatedError} If no user is authenticated - * @returns {Promise<{ multiFactors: Array }>} A promise that resolves to an array of configured MFA factors - */ - getMfaFactors: () => Promise<{ multiFactors: MfaFactor[] }> = - SignerLogger.profiled("BaseAlchemySigner.getMfaFactors", async () => { - return this.inner.getMfaFactors(); - }); - - /** - * Initiates the setup of a new MFA factor for the current user. - * The factor will need to be verified using verifyMfa before it becomes active. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.addMfa({ multiFactorType: "totp" }); - * // Result contains multiFactorTotpUrl to display as QR code - * ``` - * - * @param {AddMfaParams} params The parameters required to enable a new MFA factor - * @throws {NotAuthenticatedError} If no user is authenticated - * @returns {Promise} A promise that resolves to the factor setup information - */ - addMfa: (params: AddMfaParams) => Promise = - SignerLogger.profiled("BaseAlchemySigner.addMfa", async (params) => { - return this.inner.addMfa(params); - }); - - /** - * Verifies a newly created MFA factor to complete the setup process. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.verifyMfa({ - * multiFactorId: "factor-id", - * multiFactorCode: "123456" // 6-digit code from authenticator app - * }); - * ``` - * - * @param {VerifyMfaParams} params The parameters required to verify the MFA factor - * @throws {NotAuthenticatedError} If no user is authenticated - * @returns {Promise<{ multiFactors: MfaFactor[] }>} A promise that resolves to the updated list of MFA factors - */ - verifyMfa: ( - params: VerifyMfaParams, - ) => Promise<{ multiFactors: MfaFactor[] }> = SignerLogger.profiled( - "BaseAlchemySigner.verifyMfa", - async (params) => { - return this.inner.verifyMfa(params); - }, - ); - - /** - * Removes existing MFA factors by their IDs. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * const result = await signer.removeMfa({ - * multiFactorIds: ["factor-id-1", "factor-id-2"] - * }); - * ``` - * - * @param {RemoveMfaParams} params The parameters specifying which factors to disable - * @throws {NotAuthenticatedError} If no user is authenticated - * @returns {Promise<{ multiFactors: MfaFactor[] }>} A promise that resolves to the updated list of MFA factors - */ - removeMfa: ( - params: RemoveMfaParams, - ) => Promise<{ multiFactors: MfaFactor[] }> = SignerLogger.profiled( - "BaseAlchemySigner.removeMfa", - async (params) => { - return this.inner.removeMfa(params); - }, - ); - - /** - * Validates MFA factors that were required during authentication. - * This function should be called after MFA is required and the user has provided their MFA code. - * It completes the authentication process by validating the MFA factors and completing the auth bundle. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * - * // After MFA is required and user provides code - * const user = await signer.validateMultiFactors({ - * multiFactorCode: "123456", // 6-digit code from authenticator app - * multiFactorId: "factor-id" - * }); - * ``` - * - * @param {ValidateMultiFactorsArgs} params - Parameters for validating MFA factors - * @throws {Error} If there is no pending MFA context or if orgId is not found - * @returns {Promise} A promise that resolves to the authenticated user - */ - public async validateMultiFactors( - params: ValidateMultiFactorsArgs, - ): Promise { - // Get MFA context from temporary session - const tempSession = this.sessionManager.getTemporarySession(); - if ( - !tempSession?.orgId || - !tempSession.encryptedPayload || - !tempSession.mfaFactorId - ) { - throw new Error( - "No pending MFA context found. Call submitOtpCode() first.", - ); - } - - if ( - params.multiFactorId && - tempSession.mfaFactorId !== params.multiFactorId - ) { - throw new Error("MFA factor ID mismatch"); - } - - // Call the low-level client - const { bundle } = await this.inner.validateMultiFactors({ - encryptedPayload: tempSession.encryptedPayload, - multiFactors: [ - { - multiFactorId: tempSession.mfaFactorId, - multiFactorCode: params.multiFactorCode, - }, - ], - }); - - // Complete the authentication - const user = await this.inner.completeAuthWithBundle({ - bundle, - orgId: tempSession.orgId, - connectedEventName: "connectedOtp", - authenticatingType: "otp", - }); - - // Remove MFA data from temporary session - this.sessionManager.setTemporarySession({ - ...tempSession, - encryptedPayload: undefined, - mfaFactorId: undefined, - }); - - // Update UI state - this.store.setState({ - mfaStatus: { - mfaRequired: false, - mfaFactorId: undefined, - }, - }); - - return user; - } - - protected initConfig = async (): Promise => { - this.config = this.fetchConfig(); - return this.config; - }; - - /** - * Returns the signer configuration while fetching it if it's not already initialized. - * - * @returns {Promise} A promise that resolves to the signer configuration - */ - public getConfig = async (): Promise => { - if (!this.config) { - return this.initConfig(); - } - - return this.config; - }; - - protected fetchConfig = async (): Promise => { - return this.inner.request("/v1/signer-config", {}); - }; - - private setAuthLinkingPrompt = (prompt: AuthLinkingPrompt) => { - this.setAwaitingEmailAuth({ - orgId: prompt.orgId, - otpId: prompt.otpId, - isNewUser: false, - }); - this.store.setState({ - authLinkingStatus: { - email: prompt.email, - providerName: prompt.providerName, - idToken: prompt.idToken, - accessToken: prompt.accessToken, - }, - }); - }; - - private waitForConnected = (): Promise => { - return new Promise((resolve) => { - const removeListener = this.sessionManager.on("connected", (session) => { - resolve(session.user); - removeListener(); - }); - }); - }; -} - -function toErrorInfo(error: unknown): ErrorInfo { - return error instanceof Error - ? { name: error.name, message: error.message } - : { name: "Error", message: "Unknown error" }; -} - -// eslint-disable-next-line jsdoc/require-param, jsdoc/require-returns -/** - * Zustand's `fireImmediately` option calls the listener before - * `store.subscribe` has returned, which breaks listeners which call - * unsubscribe, e.g. - * - * ```ts - * const unsubscribe = store.subscribe( - * selector, - * (update) => { - * handleUpdate(update); - * unsubscribe(); - * }, - * { fireImmediately: true }, - * ) - * ``` - * - * since `unsubscribe` is still undefined at the time the listener is called. To - * prevent this, if the listener triggers before `subscribe` has returned, delay - * the callback to a later run of the event loop. - */ -function subscribeWithDelayedFireImmediately( - store: InternalStore, - selector: (state: AlchemySignerStore) => T, - listener: (selectedState: T, previousSelectedState: T) => void, -): () => void { - // Until this function has returned, maintain a queue of events that will be - // processed once it does. - const queue: [selectedState: T, previousSelectedState: T][] = []; - let queueHasEmptied = false; - let hasUnsubscribed = false; - - function drainQueue() { - // Note that this handles the case where more events are added to the queue - // during the handling of previous events. - for (let i = 0; i < queue.length && !hasUnsubscribed; i++) { - const args = queue[i]; - listener(...args); - } - queueHasEmptied = true; - } - - // Schedule the queue to be drained after this function has returned. - setTimeout(drainQueue, 0); - - const unsubscribe = store.subscribe( - selector, - (...args) => { - if (queueHasEmptied) { - listener(...args); - } else { - queue.push(args); - } - }, - { fireImmediately: true }, - ); - - return () => { - hasUnsubscribed = true; - unsubscribe(); - }; -} - -function isUser( - result: User | AuthLinkingPrompt | IdTokenOnly, -): result is User { - return !isAuthLinkingPrompt(result) && !isIdTokenOnly(result); -} - -function isAuthLinkingPrompt(result: unknown): result is AuthLinkingPrompt { - return ( - (result as AuthLinkingPrompt)?.status === - "ACCOUNT_LINKING_CONFIRMATION_REQUIRED" - ); -} - -function isIdTokenOnly(result: unknown): result is IdTokenOnly { - return (result as IdTokenOnly)?.status === "FETCHED_ID_TOKEN_ONLY"; -} diff --git a/account-kit/signer/src/client/base.ts b/account-kit/signer/src/client/base.ts deleted file mode 100644 index 38d5346ede..0000000000 --- a/account-kit/signer/src/client/base.ts +++ /dev/null @@ -1,1581 +0,0 @@ -import { ConnectionConfigSchema, type ConnectionConfig } from "@aa-sdk/core"; -import { TurnkeyClient, type TSignedRequest } from "@turnkey/http"; -import EventEmitter from "eventemitter3"; -import { jwtDecode } from "jwt-decode"; -import { - hexToBytes, - recoverPublicKey, - serializeSignature, - sha256, - fromHex, - type Address, - type Hex, -} from "viem"; -import { - NotAuthenticatedError, - OAuthProvidersError, - UnsupportedFeatureError, -} from "../errors.js"; -import { getDefaultProviderCustomization } from "../oauth.js"; -import type { OauthMode } from "../signer.js"; -import { base64UrlEncode } from "../utils/base64UrlEncode.js"; -import { resolveRelativeUrl } from "../utils/resolveRelativeUrl.js"; -import type { - AlchemySignerClientEvent, - AlchemySignerClientEvents, - AuthenticatingEventMetadata, - CreateAccountParams, - RemoveMfaParams, - EmailAuthParams, - AddMfaParams, - AddMfaResult, - experimental_CreateApiKeyParams, - GetOauthProviderUrlArgs, - GetWebAuthnAttestationResult, - MfaFactor, - JwtParams, - JwtResponse, - OauthConfig, - OauthParams, - OauthState, - OtpParams, - SignerBody, - SignerResponse, - SignerRoutes, - SignupResponse, - User, - VerifyMfaParams, - SubmitOtpCodeResponse, - ValidateMultiFactorsParams, - AuthLinkingPrompt, - AddOauthProviderParams, - CredentialCreationOptionOverrides, - OauthProviderInfo, - IdTokenOnly, - AuthMethods, - SmsAuthParams, - VerificationOtp, -} from "./types.js"; -import { VERSION } from "../version.js"; -import { secp256k1 } from "@noble/curves/secp256k1"; -import { Point } from "@noble/secp256k1"; - -export interface BaseSignerClientParams { - stamper: TurnkeyClient["stamper"]; - connection: ConnectionConfig; - rootOrgId?: string; - rpId?: string; -} - -export interface ExportPrivateKeyParams { - type: "SOLANA" | "ETHEREUM"; - client?: TurnkeyClient; - orgId?: string; -} - -export interface MultiOwnerExportPrivateKeyParams { - type: "SOLANA" | "ETHEREUM"; - orgId: string; -} - -export interface ExportPrivateKeyEncryptedResult { - exportBundle: string; - ciphertext: string; - encapsulatedKey: string; -} - -export type ExportWalletStamper = TurnkeyClient["stamper"] & { - injectWalletExportBundle(bundle: string, orgId: string): Promise; - injectKeyExportBundle(bundle: string, orgId: string): Promise; - publicKey(): string | null; -}; - -const MFA_PAYLOAD = { - GET: "get_mfa", - ADD: "add_mfa", - DELETE: "delete_mfas", - VERIFY: "verify_mfa", - LIST: "list_mfas", -} as const; - -type LookupUserByAccessKeyParams = { - publicKey: string; - accountId?: string; -}; - -const withHexPrefix = (hex: string) => `0x${hex}` as const; - -/** - * Base class for all Alchemy Signer clients - */ -export abstract class BaseSignerClient< - TExportWalletParams = unknown, - TExportWalletOutput = unknown, -> { - private _user: User | undefined; - private connectionConfig: ConnectionConfig; - protected turnkeyClient: TurnkeyClient; - protected rootOrg: string; - protected eventEmitter: EventEmitter; - protected oauthConfig: OauthConfig | undefined; - /** - * Create a new instance of the Alchemy Signer client - * - * @param {BaseSignerClientParams} params the parameters required to create the client - */ - constructor(params: BaseSignerClientParams) { - const { stamper, connection, rootOrgId } = params; - this.rootOrg = rootOrgId ?? "24c1acf5-810f-41e0-a503-d5d13fa8e830"; - this.eventEmitter = new EventEmitter(); - this.connectionConfig = ConnectionConfigSchema.parse(connection); - this.turnkeyClient = new TurnkeyClient( - { baseUrl: "https://api.turnkey.com" }, - stamper, - ); - } - - /** - * Asynchronously fetches and sets the OAuth configuration. - * - * @returns {Promise} A promise that resolves to the OAuth configuration - */ - public initOauth = async (): Promise => { - this.oauthConfig = await this.getOauthConfig(); - return this.oauthConfig; - }; - - protected get user() { - return this._user; - } - - protected set user(user: User | undefined) { - const previousUser = this._user; - this._user = user; - if (user && !previousUser) { - this.eventEmitter.emit("connected", user); - } else if (!user && previousUser) { - this.eventEmitter.emit("disconnected"); - } - } - - /** - * Sets the stamper of the TurnkeyClient. - * - * @param {TurnkeyClient["stamper"]} stamper the stamper function to set for the TurnkeyClient - */ - protected setStamper(stamper: TurnkeyClient["stamper"]) { - this.turnkeyClient.stamper = stamper; - } - - /** - * Authenticates the user by either email or passkey account creation flow. Emits events during the process. - * - * @param {CreateAccountParams} params The parameters for creating an account, including the type (email or passkey) and additional details. - * @returns {Promise} A promise that resolves with the response object containing the account creation result. - */ - public async createAccount( - params: CreateAccountParams, - ): Promise { - if (params.type === "email") { - this.eventEmitter.emit("authenticating", { type: "otp" }); - const { email, emailMode, expirationSeconds } = params; - const publicKey = await this.initSessionStamper(); - - const response = await this.request("/v1/signup", { - email, - emailMode, - targetPublicKey: publicKey, - expirationSeconds, - redirectParams: params.redirectParams?.toString(), - }); - - return response; - } - - if (params.type === "sms") { - this.eventEmitter.emit("authenticating", { type: "otp" }); - const { phone } = params; - const publicKey = await this.initSessionStamper(); - - const response = await this.request("/v1/signup", { - phone, - targetPublicKey: publicKey, - }); - return response; - } - - if (params.type === "accessKey") { - // Developers should use the server signer to create accounts with access keys - throw new UnsupportedFeatureError("Access key auth"); - } - - this.eventEmitter.emit("authenticating", { type: "passkey" }); - // Passkey account creation flow - const { attestation, challenge } = await this.getWebAuthnAttestation( - params.creationOpts, - { username: "email" in params ? params.email : params.username }, - ); - - const result = await this.request("/v1/signup", { - passkey: { - challenge: - typeof challenge === "string" - ? challenge - : base64UrlEncode(challenge), - attestation, - }, - email: "email" in params ? params.email : undefined, - }); - - this.user = { - orgId: result.orgId, - address: result.address!, - userId: result.userId!, - credentialId: attestation.credentialId, - solanaAddress: result.solanaAddress, - }; - this.initWebauthnStamper(this.user, params.creationOpts); - this.eventEmitter.emit("connectedPasskey", this.user); - - return result; - } - - // #region ABSTRACT METHODS - - public abstract initEmailAuth( - params: Omit, - ): Promise<{ orgId: string; otpId?: string; multiFactors?: MfaFactor[] }>; - - public abstract initSmsAuth( - params: Omit, - ): Promise<{ orgId: string; otpId?: string }>; - - public abstract completeAuthWithBundle(params: { - bundle: string; - orgId: string; - connectedEventName: keyof AlchemySignerClientEvents; - authenticatingType: AuthenticatingEventMetadata["type"]; - idToken?: string; - accessToken?: string; - }): Promise; - - public abstract oauthWithRedirect( - args: Extract, - ): Promise; - - public abstract oauthWithPopup( - args: Extract, - ): Promise; - - public abstract submitOtpCode( - args: Omit, - ): Promise; - - public abstract submitJwt( - args: Omit, - ): Promise; - - public abstract disconnect(): Promise; - - public abstract exportWallet( - params: TExportWalletParams, - ): Promise; - - public abstract targetPublicKey(): Promise; - - protected abstract getOauthConfig(): Promise; - - protected abstract getWebAuthnAttestation( - options?: CredentialCreationOptionOverrides, - userDetails?: { username: string }, - ): Promise; - - /** - * Initializes the session stamper and returns its public key. - */ - protected abstract initSessionStamper(): Promise; - - protected abstract initWebauthnStamper( - user: User | undefined, - options: CredentialCreationOptionOverrides | undefined, - ): Promise; - - // #endregion - - // #region PUBLIC METHODS - - /** - * Listen to events emitted by the client - * - * @param {AlchemySignerClientEvent} event the event you want to listen to - * @param {AlchemySignerClientEvents[AlchemySignerClientEvent]} listener the callback function to execute when an event is fired - * @returns {() => void} a function that will remove the listener when called - */ - public on = ( - event: E, - listener: AlchemySignerClientEvents[E], - ) => { - this.eventEmitter.on(event, listener as any); - - return () => this.eventEmitter.removeListener(event, listener as any); - }; - - /** - * Sets the email for the authenticated user, allowing them to login with that - * email. - * - * @deprecated You must contact Alchemy to enable this feature for your team, - * as there are important security considerations. In particular, you must not - * call this without first validating that the user owns this email account. - * Recommended to use the email verification flow instead. - * - * @param {string} email The email to set for the user - * @returns {Promise} A promise that resolves to the updated email - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public setEmail(email: string): Promise; - - /** - * Sets the email for the authenticated user, allowing them to login with that - * email. Must be called after calling `initOtp` with the email. - * - * @param {VerificationOtp} otp The OTP verification object including the OTP ID and OTP code - * @returns {Promise} A promise that resolves to the updated email - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public setEmail(otp: VerificationOtp): Promise; - - /** - * Implementation for setEmail method with optional OTP verification. - * - * @param {string | VerificationOtp} params An OTP object containing the OTP ID & OTP code (or an email address for legacy usage) - * @returns {Promise} A promise that resolves to the updated email address - */ - public async setEmail(params: string | VerificationOtp): Promise { - if (typeof params === "string") { - // Legacy use, requires team flag. - const contact = params; - if (!contact) { - throw new Error( - "Email must not be empty. Use removeEmail() to remove email auth.", - ); - } - await this.updateEmail(contact); - return contact; - } - - const { verificationToken } = await this.request("/v1/verify-otp", { - otpId: params.id, - otpCode: params.code, - }); - const { contact } = jwtDecode<{ contact: string }>(verificationToken); - await this.updateEmail(contact, verificationToken); - return contact; - } - - /** - * Removes the email for the authenticated user, disallowing them from login with that email. - * - * @returns {Promise} A promise that resolves when the email is removed - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public removeEmail = async (): Promise => { - await this.updateEmail(""); - }; - - private updateEmail = async ( - email: string, - verificationToken?: string, - ): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - // Unverified use is legacy & requires team flag. - const isUnverified = email && !verificationToken; - - const stampedRequest = isUnverified - ? await this.turnkeyClient.stampUpdateUser({ - type: "ACTIVITY_TYPE_UPDATE_USER", - timestampMs: Date.now().toString(), - organizationId: this.user.orgId, - parameters: { - userId: this.user.userId, - userEmail: email, - userTagIds: [], - }, - }) - : await this.turnkeyClient.stampUpdateUserEmail({ - type: "ACTIVITY_TYPE_UPDATE_USER_EMAIL", - timestampMs: Date.now().toString(), - organizationId: this.user.orgId, - parameters: { - userId: this.user.userId, - userEmail: email, - verificationToken, - }, - }); - - await this.request("/v1/update-email-auth", { - stampedRequest, - }); - this.user = { - ...this.user, - email: email || undefined, - }; - }; - - /** - * Updates the phone number for the authenticated user, allowing them to login with that - * phone number. Must be called after calling `initOtp` with the phone number. - * - * @param {VerificationOtp} otp The OTP object including the OTP ID and OTP code - * @returns {Promise} A promise that resolves when the phone number is set - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public setPhoneNumber = async (otp: VerificationOtp): Promise => { - const { verificationToken } = await this.request("/v1/verify-otp", { - otpId: otp.id, - otpCode: otp.code, - }); - const { contact } = jwtDecode<{ contact: string }>(verificationToken); - await this.updatePhoneNumber(contact, verificationToken); - }; - - /** - * Removes the phone number for the authenticated user, disallowing them from login with that phone number. - * - * @returns {Promise} A promise that resolves when the phone number is removed - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public removePhoneNumber = async (): Promise => { - await this.updatePhoneNumber(""); - }; - - private updatePhoneNumber = async ( - phone: string, - verificationToken?: string, - ): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - if (phone.trim() && !verificationToken) { - throw new Error("Verification token is required to change phone number."); - } - const stampedRequest = await this.turnkeyClient.stampUpdateUserPhoneNumber({ - type: "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER", - timestampMs: Date.now().toString(), - organizationId: this.user.orgId, - parameters: { - userId: this.user.userId, - userPhoneNumber: phone, - verificationToken, - }, - }); - await this.request("/v1/update-phone-auth", { - stampedRequest, - }); - this.user = { - ...this.user, - phone: phone || undefined, - }; - }; - - /** - * Initiates an OTP (One-Time Password) verification process for a user contact. - * - * @param {("email" | "sms")} type - The type of OTP to send, either "email" or "sms" - * @param {string} contact - The email address or phone number to send the OTP to - * @returns {Promise<{ otpId: string }>} A promise that resolves to an object containing the OTP ID - * @throws {NotAuthenticatedError} When no user is currently authenticated - */ - public initOtp = async ( - type: "email" | "sms", - contact: string, - ): Promise<{ otpId: string }> => { - return await this.request("/v1/init-otp", { - otpType: type === "email" ? "OTP_TYPE_EMAIL" : "OTP_TYPE_SMS", - contact, - }); - }; - - /** - * Handles the creation of authenticators using WebAuthn attestation and the provided options. Requires the user to be authenticated. - * - * @param {CredentialCreationOptions} options The options used to create the WebAuthn attestation - * @returns {Promise} A promise that resolves to an array of authenticator IDs - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public addPasskey = async (options: CredentialCreationOptions) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - const { attestation, challenge } = - await this.getWebAuthnAttestation(options); - - const { activity } = await this.turnkeyClient.createAuthenticators({ - type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2", - timestampMs: Date.now().toString(), - organizationId: this.user.orgId, - parameters: { - userId: this.user.userId, - authenticators: [ - { - attestation, - authenticatorName: `passkey-${Date.now().toString()}`, - challenge: - typeof challenge === "string" - ? challenge - : base64UrlEncode(challenge), - }, - ], - }, - }); - - const { authenticatorIds } = await this.pollActivityCompletion( - activity, - this.user.orgId, - "createAuthenticatorsResult", - ); - - return authenticatorIds; - }; - - /** - * Removes a passkey authenticator from the user's account. - * - * @param {string} authenticatorId The ID of the authenticator to remove. - * @returns {Promise} A promise that resolves when the authenticator is removed. - * @throws {NotAuthenticatedError} If the user is not authenticated. - */ - public removePasskey = async (authenticatorId: string): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - await this.turnkeyClient.deleteAuthenticators({ - type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS", - timestampMs: Date.now().toString(), - organizationId: this.user.orgId, - parameters: { - userId: this.user.userId, - authenticatorIds: [authenticatorId], - }, - }); - }; - - /** - * Asynchronously handles the authentication process using WebAuthn Stamper. If a user is provided, sets the user and returns it. Otherwise, retrieves the current user and initializes the WebAuthn stamper. - * - * @param {User} [user] An optional user object to authenticate - * @returns {Promise} A promise that resolves to the authenticated user object - */ - public lookupUserWithPasskey = async (user: User | undefined = undefined) => { - this.eventEmitter.emit("authenticating", { type: "passkey" }); - await this.initWebauthnStamper(user, undefined); - if (user) { - this.user = user; - this.eventEmitter.emit("connectedPasskey", user); - return user; - } - - const result = await this.whoami(this.rootOrg); - await this.initWebauthnStamper(result, undefined); - this.eventEmitter.emit("connectedPasskey", result); - - return result; - }; - - /** - * Retrieves the status of the passkey for the current user. Requires the user to be authenticated. - * - * @returns {Promise<{ isPasskeyAdded: boolean }>} A promise that resolves to an object containing the passkey status - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public getPasskeyStatus = async () => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - const resp = await this.turnkeyClient.getAuthenticators({ - organizationId: this.user.orgId, - userId: this.user.userId, - }); - return { - isPasskeyAdded: resp.authenticators.some((it) => - it.authenticatorName.startsWith("passkey-"), - ), - }; - }; - - /** - * Adds an OAuth provider for the authenticated user using the provided parameters. Throws an error if the user is not authenticated. - * - * @param {AddOauthProviderParams} params The parameters for adding an OAuth provider, including `providerName` and `oidcToken`. - * @throws {NotAuthenticatedError} Throws if the user is not authenticated. - * @returns {Promise} A Promise that resolves when the OAuth provider is added. - */ - public addOauthProvider = async ( - params: AddOauthProviderParams, - ): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - const { providerName, oidcToken } = params; - const stampedRequest = await this.turnkeyClient.stampCreateOauthProviders({ - type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS", - timestampMs: Date.now().toString(), - organizationId: this.user.orgId, - parameters: { - userId: this.user.userId, - oauthProviders: [{ providerName, oidcToken }], - }, - }); - const response = await this.request("/v1/add-oauth-provider", { - stampedRequest, - }); - return response.oauthProviders[0]; - }; - - /** - * Deletes a specified OAuth provider for the authenticated user. - * - * @param {string} providerId The ID of the provider to be deleted - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public removeOauthProvider = async (providerId: string) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - const stampedRequest = await this.turnkeyClient.stampDeleteOauthProviders({ - type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS", - timestampMs: Date.now().toString(), - organizationId: this.user.orgId, - parameters: { - userId: this.user.userId, - providerIds: [providerId], - }, - }); - await this.request("/v1/remove-oauth-provider", { stampedRequest }); - }; - - /** - * Retrieves the list of authentication methods for the current user. - * - * @returns {Promise} A promise that resolves to the list of authentication methods - * @throws {NotAuthenticatedError} If the user is not authenticated - */ - public listAuthMethods = async (): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - return await this.request("/v1/list-auth-methods", { - suborgId: this.user.orgId, - }); - }; - - /** - * Retrieves the current user or fetches the user information if not already available. - * - * @param {string} [orgId] optional organization ID, defaults to the user's organization ID - * @param {string} idToken an OIDC ID token containing additional user information - * @param {string} accessToken an access token which if provided will be added to the user - * @returns {Promise} A promise that resolves to the user object - * @throws {Error} if no organization ID is provided when there is no current user - */ - public whoami = async ( - orgId = this.user?.orgId, - idToken?: string, - accessToken?: string, - ): Promise => { - if (this.user) { - return this.user; - } - - if (!orgId) { - throw new Error("No orgId provided"); - } - - const stampedRequest = await this.turnkeyClient.stampGetWhoami({ - organizationId: orgId, - }); - - const user = await this.request("/v1/whoami", { - stampedRequest, - }); - - if (idToken) { - const claims: Record = jwtDecode(idToken); - user.idToken = idToken; - user.claims = claims; - if (typeof claims.email === "string") { - user.email = claims.email; - } - } - - if (accessToken) { - user.accessToken = accessToken; - } - - const credentialId = (() => { - try { - return JSON.parse(stampedRequest?.stamp.stampHeaderValue) - .credentialId as string; - } catch (e) { - return undefined; - } - })(); - - this.user = { - ...user, - credentialId, - }; - - return this.user; - }; - - /** - * Generates a stamped whoami request for the current user. This request can then be used to call /signer/v1/whoami to get the user information. - * This is useful if you want to get the user information in a different context like a server. You can pass the stamped request to the server - * and then call our API to get the user information. Using this stamp is the most trusted way to get the user information since a stamp can only - * belong to the user who created it. - * - * @returns {Promise} a promise that resolves to the "whoami" information for the logged in user - * @throws {Error} if no organization ID is provided - */ - public stampWhoami = async (): Promise => { - if (!this.user) { - throw new Error("User must be authenticated to stamp a whoami request"); - } - - return await this.turnkeyClient.stampGetWhoami({ - organizationId: this.user.orgId, - }); - }; - - /** - * Generates a stamped getOrganization request for the current user. - * - * @returns {Promise} a promise that resolves to the "getOrganization" information for the logged in user - * @throws {Error} if no user is authenticated - */ - public stampGetOrganization = async (): Promise => { - if (!this.user) { - throw new Error( - "User must be authenticated to stamp a get organization request", - ); - } - - return await this.turnkeyClient.stampGetOrganization({ - organizationId: this.user.orgId, - }); - }; - - /** - * Creates an API key that can take any action on behalf of the current user. - * (Note that this method is currently experimental and is subject to change.) - * - * @param {CreateApiKeyParams} params Parameters for creating the API key. - * @param {string} params.name Name of the API key. - * @param {string} params.publicKey Public key to be used for the API key. - * @param {number} params.expirationSec Number of seconds until the API key expires. - * @throws {Error} If there is no authenticated user or the API key creation fails. - */ - public experimental_createApiKey = async ( - params: experimental_CreateApiKeyParams, - ): Promise => { - if (!this.user) { - throw new Error("User must be authenticated to create api key"); - } - const resp = await this.turnkeyClient.createApiKeys({ - type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2", - timestampMs: new Date().getTime().toString(), - organizationId: this.user.orgId, - parameters: { - apiKeys: [ - { - apiKeyName: params.name, - publicKey: params.publicKey, - curveType: "API_KEY_CURVE_P256", - expirationSeconds: params.expirationSec.toString(), - }, - ], - userId: this.user.userId, - }, - }); - if (resp.activity.status !== "ACTIVITY_STATUS_COMPLETED") { - throw new Error("Failed to create api key"); - } - }; - - /** - * Looks up information based on an email address. - * - * @param {string} email the email address to look up - * @returns {Promise} the result of the lookup request - */ - public lookupUserByEmail = async (email: string) => { - return this.request("/v1/lookup", { email }); - }; - - /** - * Looks up information based on a phone number. - * - * @param {string} phone the phone number to look up - * @returns {Promise} the result of the lookup request - */ - public lookupUserByPhone = async (phone: string) => { - return this.request("/v1/lookup", { phone }); - }; - - /** - * Looks up information based on an access key. - * - * @param {LookupUserByAccessKeyParams} params - The access key parameters - * @returns {Promise} The result of the lookup request - */ - public lookupUserByAccessKey = async ( - params: LookupUserByAccessKeyParams, - ) => { - return this.request("/v1/lookup", { - accessKey: { publicKey: params.publicKey, accountId: params.accountId }, - }); - }; - - /** - * This will sign a message with the user's private key, without doing any transformations on the message. - * For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass - * that result here. - * - * @param {Hex} msg the hex representation of the bytes to sign - * @param {string} mode specify if signing should happen for solana or ethereum - * @returns {Promise} the signature over the raw hex - */ - public signRawMessage = async ( - msg: Hex, - mode: "SOLANA" | "ETHEREUM" = "ETHEREUM", - ): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - if (!this.user.solanaAddress && mode === "SOLANA") { - // TODO: we need to add backwards compatibility for users who signed up before we added Solana support - throw new Error("No Solana address available for the user"); - } - - const stampedRequest = await this.turnkeyClient.stampSignRawPayload({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - timestampMs: Date.now().toString(), - parameters: { - encoding: "PAYLOAD_ENCODING_HEXADECIMAL", - hashFunction: - mode === "ETHEREUM" - ? "HASH_FUNCTION_NO_OP" - : "HASH_FUNCTION_NOT_APPLICABLE", - payload: msg, - signWith: - mode === "ETHEREUM" ? this.user.address : this.user.solanaAddress!, - }, - }); - - const { signature } = await this.request("/v1/sign-payload", { - stampedRequest, - }); - - return signature; - }; - - private experimental_createMultiOwnerStamper = () => ({ - stamp: async ( - request: string, - ): Promise<{ - stampHeaderName: string; - stampHeaderValue: string; - }> => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - // we need this later to recover the public key from the signature, so we don't let turnkey hash - // this for us and pass HASH_FUNCTION_NO_OP instead - const hashed = sha256(new TextEncoder().encode(request)); - - const stampedRequest = await this.turnkeyClient.stampSignRawPayload({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - timestampMs: Date.now().toString(), - parameters: { - encoding: "PAYLOAD_ENCODING_TEXT_UTF8", - hashFunction: "HASH_FUNCTION_SHA256", - payload: request, - signWith: this.user.address, - }, - }); - - const { signature } = await this.request("/v1/sign-payload", { - stampedRequest, - }); - - // recover the public key, we can't just use the address - const recoveredPublicKey = await recoverPublicKey({ - hash: hashed, - signature, - }); - - // compute the stamp over the original payload using this signature - // the format here is important - const stamp = { - publicKey: Point.fromHex(hexToBytes(recoveredPublicKey)).toHex(true), - scheme: "SIGNATURE_SCHEME_TK_API_SECP256K1", - signature: secp256k1.Signature.fromCompact( - hexToBytes(signature).slice(0, 64), - ).toDERHex(), - }; - - return { - stampHeaderName: "X-Stamp", - stampHeaderValue: base64UrlEncode( - Buffer.from(JSON.stringify(stamp)).buffer, - ), - }; - }, - }); - - private experimental_createMultiOwnerTurnkeyClient = () => - new TurnkeyClient( - { baseUrl: "https://api.turnkey.com" }, - this.experimental_createMultiOwnerStamper(), - ); - - /** - * This will sign on behalf of the multi-owner org, without doing any transformations on the message. - * For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass - * that result here. - * - * @param {Hex} msg the hex representation of the bytes to sign - * @param {string} orgId orgId of the multi-owner org to sign on behalf of - * @param {string} orgAddress address of the multi-owner org to sign on behalf of - * @returns {Promise} the signature over the raw hex - */ - public experimental_multiOwnerSignRawMessage = async ( - msg: Hex, - orgId: string, - orgAddress: string, - ) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - const multiOwnerClient = this.experimental_createMultiOwnerTurnkeyClient(); - - const { result } = await this.request("/v1/multi-owner-sign-raw-payload", { - stampedRequest: await multiOwnerClient.stampSignRawPayload({ - organizationId: orgId, - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - timestampMs: Date.now().toString(), - parameters: { - encoding: "PAYLOAD_ENCODING_HEXADECIMAL", - hashFunction: "HASH_FUNCTION_NO_OP", - payload: msg, - signWith: orgAddress, - }, - }), - }); - - return serializeSignature({ - r: withHexPrefix(result.signRawPayloadResult.r), - s: withHexPrefix(result.signRawPayloadResult.s), - yParity: Number(result.signRawPayloadResult.v), // this is not actually a legacy v value, it's the y parity bit - }); - }; - - /** - * This will create a multi-owner account with the current user and additional specified signers - * - * @param {Address[]} additionalMembers members to add, aside from the currently authenticated user - * @returns {Promise['result']>} created multi-owner account - */ - public experimental_createMultiOwner = async ( - additionalMembers: Address[], - ) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const response = await this.request("/v1/multi-owner-create", { - members: [this.user.address, ...additionalMembers].map( - (evmSignerAddress) => ({ evmSignerAddress }), - ), - }); - - return response.result; - }; - - /** - * This will add additional members to an existing multi-sig account - * - * @param {string} orgId orgId of the multi-sig to add members to - * @param {Address[]} members the addresses of the members to add - */ - public experimental_addToMultiOwner = async ( - orgId: string, - members: Address[], - ) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const multiOwnerClient = this.experimental_createMultiOwnerTurnkeyClient(); - - const prepared = await this.request("/v1/multi-owner-prepare-add", { - organizationId: orgId, - members: members.map((evmSignerAddress) => ({ evmSignerAddress })), - }); - - const stampedRequest = await multiOwnerClient.stampCreateUsers( - prepared.result, - ); - - const { - result: { updateRootQuorumRequest }, - } = await this.request("/v1/multi-owner-add", { - stampedRequest, - }); - - await this.request("/v1/multi-owner-update-root-quorum", { - stampedRequest: await multiOwnerClient.stampUpdateRootQuorum( - updateRootQuorumRequest, - ), - }); - }; - - /** - * This will remove members from an existing multi-sig account - * - * @param {string} orgId orgId of the multi-sig to remove members from - * @param {Address[]} members the addresses of the members to remove - */ - public experimental_deleteFromMultiOwner = async ( - orgId: string, - members: Address[], - ) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const multiOwnerClient = this.experimental_createMultiOwnerTurnkeyClient(); - - const prepared = await this.request("/v1/multi-owner-prepare-delete", { - organizationId: orgId, - members: members.map((evmSignerAddress) => ({ evmSignerAddress })), - }); - - const stampedRequest = await multiOwnerClient.stampDeleteUsers( - prepared.result.deleteMembersRequest, - ); - - await this.request("/v1/multi-owner-update-root-quorum", { - stampedRequest: await multiOwnerClient.stampUpdateRootQuorum( - prepared.result.updateRootQuorumRequest, - ), - }); - - await this.request("/v1/multi-owner-delete", { - stampedRequest, - }); - }; - - /** - * Returns the current user or null if no user is set. - * - * @returns {User | null} the current user object or null if no user is available - */ - public getUser = (): User | null => { - return this.user ?? null; - }; - - /** - * Sends a POST request to the given signer route with the specified body and returns the response. - * Not intended to be used directly, use the specific methods instead on the client instead. - * - * @param {SignerRoutes} route The route to which the request should be sent - * @param {SignerBody} body The request body containing the data to be sent - * @returns {Promise>} A promise that resolves to the response from the signer - */ - public request = async ( - route: R, - body: SignerBody, - ): Promise> => { - const url = this.connectionConfig.rpcUrl ?? "https://api.g.alchemy.com"; - - const basePath = "/signer"; - - const headers = new Headers(); - headers.append("Alchemy-AA-Sdk-Version", VERSION); - headers.append("Content-Type", "application/json"); - if (this.connectionConfig.apiKey) { - headers.append("Authorization", `Bearer ${this.connectionConfig.apiKey}`); - } else if (this.connectionConfig.jwt) { - headers.append("Authorization", `Bearer ${this.connectionConfig.jwt}`); - } - - const response = await fetch(`${url}${basePath}${route}`, { - method: "POST", - body: JSON.stringify(body), - headers, - }); - - if (!response.ok) { - throw new Error(await response.text()); - } - - const json = await response.json(); - - return json as SignerResponse; - }; - - /** - * Retrieves the list of MFA factors configured for the current user. - * - * @returns {Promise<{ multiFactors: MfaFactor[] }>} A promise that resolves to an array of configured MFA factors - * @throws {NotAuthenticatedError} If no user is authenticated - */ - public getMfaFactors = async (): Promise<{ - multiFactors: MfaFactor[]; - }> => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const stampedRequest = await this.turnkeyClient.stampSignRawPayload({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - timestampMs: Date.now().toString(), - parameters: { - encoding: "PAYLOAD_ENCODING_HEXADECIMAL", - hashFunction: "HASH_FUNCTION_NO_OP", - payload: MFA_PAYLOAD.LIST, - signWith: this.user.address, - }, - }); - - return this.request("/v1/auth-list-multi-factors", { - stampedRequest, - }); - }; - - /** - * Initiates the setup of a new MFA factor for the current user. Mfa will need to be verified before it is active. - * - * @param {AddMfaParams} params The parameters required to enable a new MFA factor - * @returns {Promise} A promise that resolves to the factor setup information - * @throws {NotAuthenticatedError} If no user is authenticated - * @throws {Error} If an unsupported factor type is provided - */ - public addMfa = async (params: AddMfaParams): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const stampedRequest = await this.turnkeyClient.stampSignRawPayload({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - timestampMs: Date.now().toString(), - parameters: { - encoding: "PAYLOAD_ENCODING_HEXADECIMAL", - hashFunction: "HASH_FUNCTION_NO_OP", - payload: MFA_PAYLOAD.ADD, - signWith: this.user.address, - }, - }); - - switch (params.multiFactorType) { - case "totp": - return this.request("/v1/auth-request-multi-factor", { - stampedRequest, - multiFactorType: params.multiFactorType, - }); - default: - throw new Error( - `Unsupported MFA factor type: ${params.multiFactorType}`, - ); - } - }; - - /** - * Verifies a newly created MFA factor to complete the setup process. - * - * @param {VerifyMfaParams} params The parameters required to verify the MFA factor - * @returns {Promise<{ multiFactors: MfaFactor[] }>} A promise that resolves to the updated list of MFA factors - * @throws {NotAuthenticatedError} If no user is authenticated - */ - public verifyMfa = async ( - params: VerifyMfaParams, - ): Promise<{ multiFactors: MfaFactor[] }> => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const stampedRequest = await this.turnkeyClient.stampSignRawPayload({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - timestampMs: Date.now().toString(), - parameters: { - encoding: "PAYLOAD_ENCODING_HEXADECIMAL", - hashFunction: "HASH_FUNCTION_NO_OP", - payload: MFA_PAYLOAD.VERIFY, - signWith: this.user.address, - }, - }); - - return this.request("/v1/auth-verify-multi-factor", { - stampedRequest, - multiFactorId: params.multiFactorId, - multiFactorCode: params.multiFactorCode, - }); - }; - - /** - * Removes existing MFA factors by ID. - * - * @param {RemoveMfaParams} params The parameters specifying which factors to disable - * @returns {Promise<{ multiFactors: MfaFactor[] }>} A promise that resolves to the updated list of MFA factors - * @throws {NotAuthenticatedError} If no user is authenticated - */ - public removeMfa = async ( - params: RemoveMfaParams, - ): Promise<{ multiFactors: MfaFactor[] }> => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const stampedRequest = await this.turnkeyClient.stampSignRawPayload({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - timestampMs: Date.now().toString(), - parameters: { - encoding: "PAYLOAD_ENCODING_HEXADECIMAL", - hashFunction: "HASH_FUNCTION_NO_OP", - payload: MFA_PAYLOAD.DELETE, - signWith: this.user.address, - }, - }); - - return this.request("/v1/auth-delete-multi-factors", { - stampedRequest, - multiFactorIds: params.multiFactorIds, - }); - }; - - /** - * Validates multiple MFA factors using the provided encrypted payload and MFA codes. - * - * @param {ValidateMultiFactorsParams} params The validation parameters - * @returns {Promise<{ bundle: string }>} A promise that resolves to an object containing the credential bundle - * @throws {Error} If no credential bundle is returned from the server - */ - public validateMultiFactors = async ( - params: ValidateMultiFactorsParams, - ): Promise<{ bundle: string }> => { - // Send the encryptedPayload plus TOTP codes, etc: - const response = await this.request("/v1/auth-validate-multi-factors", { - encryptedPayload: params.encryptedPayload, - multiFactors: params.multiFactors, - }); - - // The server is expected to return the *decrypted* payload in `response.payload.credentialBundle` - if (!response.payload || !response.payload.credentialBundle) { - throw new Error( - "Request to validateMultiFactors did not return a credential bundle", - ); - } - - return { - bundle: response.payload.credentialBundle, - }; - }; - - // #endregion - - // #region PRIVATE METHODS - - /** - * Returns the authentication url for the selected OAuth Proivder - * - * @example - * ```ts - * - * cosnt oauthParams = { - * authProviderId: "google", - * isCustomProvider: false, - * auth0Connection: undefined, - * scope: undefined, - * claims: undefined, - * mode: "redirect", - * redirectUrl: "https://your-url-path/oauth-return", - * expirationSeconds: 3000 - * }; - * - * const turnkeyPublicKey = await this.initIframeStamper(); - * const oauthCallbackUrl = this.oauthCallbackUrl; - * const oauthConfig = this.getOauthConfig() // Optional value for OauthConfig() - * const usesRelativeUrl = true // Optional value to determine if we use a relative (or absolute) url for the `redirect_url` - * - * const oauthProviderUrl = getOauthProviderUrl({ - * oauthParams, - * turnkeyPublicKey, - * oauthCallbackUrl - * }) - * - * ``` - * @param {GetOauthProviderUrlArgs} args Required. The Oauth provider's auth parameters - * - * @returns {Promise} returns the Oauth provider's url - */ - protected getOauthProviderUrl = async ( - args: GetOauthProviderUrlArgs, - ): Promise => { - const { - oauthParams, - turnkeyPublicKey, - oauthCallbackUrl, - oauthConfig, - usesRelativeUrl = true, - } = args; - - const { - authProviderId, - isCustomProvider, - auth0Connection, - scope: providedScope, - claims: providedClaims, - otherParameters: providedOtherParameters, - mode, - redirectUrl, - expirationSeconds, - } = oauthParams; - - const { codeChallenge, requestKey, authProviders } = - oauthConfig ?? (await this.getOauthConfigForMode(mode)); - - if (!authProviders) { - throw new OAuthProvidersError(); - } - - const authProvider = authProviders.find( - (provider) => - provider.id === authProviderId && - !!provider.isCustomProvider === !!isCustomProvider, - ); - - if (!authProvider) { - throw new Error(`No auth provider found with id ${authProviderId}`); - } - - let scope: string | undefined = providedScope; - let claims: string | undefined = providedClaims; - let otherParameters: Record | undefined = - providedOtherParameters; - - if (!isCustomProvider) { - const defaultCustomization = - getDefaultProviderCustomization(authProviderId); - scope ??= defaultCustomization?.scope; - claims ??= defaultCustomization?.claims; - otherParameters ??= defaultCustomization?.otherParameters; - } - if (!scope) { - throw new Error(`Default scope not known for provider ${authProviderId}`); - } - const { authEndpoint, clientId } = authProvider; - - const nonce = this.getOauthNonce(turnkeyPublicKey); - const stateObject: OauthState = { - authProviderId, - isCustomProvider, - requestKey, - turnkeyPublicKey, - expirationSeconds, - redirectUrl: - mode === "redirect" - ? usesRelativeUrl - ? resolveRelativeUrl(redirectUrl) - : redirectUrl - : undefined, - openerOrigin: mode === "popup" ? window.location.origin : undefined, - fetchIdTokenOnly: oauthParams.fetchIdTokenOnly, - }; - const state = base64UrlEncode( - new TextEncoder().encode(JSON.stringify(stateObject)).buffer, - ); - const authUrl = new URL(authEndpoint); - const params: Record = { - redirect_uri: oauthCallbackUrl, - response_type: "code", - scope, - state, - code_challenge: codeChallenge, - code_challenge_method: "S256", - prompt: "select_account", - client_id: clientId, - nonce, - ...otherParameters, - }; - if (claims) { - params.claims = claims; - } - if (auth0Connection) { - params.connection = auth0Connection; - } - - Object.keys(params).forEach((param) => { - params[param] && authUrl.searchParams.append(param, params[param]); - }); - - const [urlPath, searchParams] = authUrl.href.split("?"); - - return `${urlPath?.replace(/\/$/, "")}?${searchParams}`; - }; - - private getOauthConfigForMode = async ( - mode: OauthMode, - ): Promise => { - if (this.oauthConfig) { - return this.oauthConfig; - } else if (mode === "redirect") { - return this.initOauth(); - } else { - throw new Error( - "enablePopupOauth must be set in configuration or signer.preparePopupOauth must be called before using popup-based OAuth login", - ); - } - }; - - // eslint-disable-next-line eslint-rules/require-jsdoc-on-reexported-functions - protected pollActivityCompletion = async < - T extends keyof Awaited< - ReturnType<(typeof this.turnkeyClient)["getActivity"]> - >["activity"]["result"], - >( - activity: Awaited< - ReturnType<(typeof this.turnkeyClient)["getActivity"]> - >["activity"], - organizationId: string, - resultKey: T, - ): Promise< - NonNullable< - Awaited< - ReturnType<(typeof this.turnkeyClient)["getActivity"]> - >["activity"]["result"][T] - > - > => { - if (activity.status === "ACTIVITY_STATUS_COMPLETED") { - return activity.result[resultKey]!; - } - - const { - activity: { status, id, result }, - } = await this.turnkeyClient.getActivity({ - activityId: activity.id, - organizationId, - }); - - if (status === "ACTIVITY_STATUS_COMPLETED") { - return result[resultKey]!; - } - - if ( - status === "ACTIVITY_STATUS_FAILED" || - status === "ACTIVITY_STATUS_REJECTED" || - status === "ACTIVITY_STATUS_CONSENSUS_NEEDED" - ) { - throw new Error( - `Failed to get activity with with id ${id} (status: ${status})`, - ); - } - - // TODO: add ability to configure this + add exponential backoff - await new Promise((resolve) => setTimeout(resolve, 500)); - - return this.pollActivityCompletion(activity, organizationId, resultKey); - }; - // #endregion - - /** - * Turnkey requires the nonce in the id token to be in this format. - * - * @param {string} turnkeyPublicKey key from a Turnkey iframe - * @returns {string} nonce to be used in OIDC - */ - protected getOauthNonce = (turnkeyPublicKey: string): string => { - return sha256(new TextEncoder().encode(turnkeyPublicKey)).slice(2); - }; - - /** - * Exports a private key for a given account encrypted with the provided public key - * - * @param {ExportPrivateKeyParams} opts the parameters for the export - * @returns {Promise} the private key - */ - public exportPrivateKeyEncrypted = async ( - opts: ExportPrivateKeyParams & { encryptWith: string }, - ): Promise => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const targetAddressFormat = - opts.type === "ETHEREUM" - ? "ADDRESS_FORMAT_ETHEREUM" - : "ADDRESS_FORMAT_SOLANA"; - const turnkeyClient = opts.client ?? this.turnkeyClient; - const organizationId = opts.orgId ?? this.user.orgId; - - const wallets = await turnkeyClient.getWalletAccounts({ organizationId }); - const account = wallets.accounts.find( - (account) => account.addressFormat === targetAddressFormat, - ); - if (!account?.address) { - throw new Error("Failed to find account: " + opts.type); - } - const exported = await turnkeyClient.exportWalletAccount({ - organizationId, - type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT", - timestampMs: Date.now().toString(), - parameters: { - address: account.address, - targetPublicKey: opts.encryptWith, - }, - }); - const exportBundle = - exported?.activity.result.exportWalletAccountResult?.exportBundle; - if (!exportBundle) throw new Error("No export bundle found"); - - const parsedExportBundle = JSON.parse(exportBundle); - const signedData = JSON.parse( - fromHex(`0x${parsedExportBundle.data}`, { to: "string" }), - ); - - return { - exportBundle, - ciphertext: signedData.ciphertext, - encapsulatedKey: signedData.encappedPublic, - }; - }; - - /** - * Exports a private key for a given account in a multi-owner org - * - * @param {MultiOwnerExportPrivateKeyParams} opts the parameters for the export - * @returns {Promise} the private key - */ - public experimental_multiOwnerExportPrivateKeyEncrypted = async ( - opts: MultiOwnerExportPrivateKeyParams & { encryptWith: string }, - ): Promise => { - return this.exportPrivateKeyEncrypted({ - type: opts.type, - client: this.experimental_createMultiOwnerTurnkeyClient(), - orgId: opts.orgId, - encryptWith: opts.encryptWith, - }); - }; -} diff --git a/account-kit/signer/src/client/index.ts b/account-kit/signer/src/client/index.ts deleted file mode 100644 index 4020e29f11..0000000000 --- a/account-kit/signer/src/client/index.ts +++ /dev/null @@ -1,893 +0,0 @@ -import { BaseError, ConnectionConfigSchema } from "@aa-sdk/core"; -import { getWebAuthnAttestation } from "@turnkey/http"; -import { IframeStamper } from "@turnkey/iframe-stamper"; -import { WebauthnStamper } from "@turnkey/webauthn-stamper"; -import { z } from "zod"; -import type { AuthParams } from "../signer.js"; -import { generateRandomBuffer } from "../utils/generateRandomBuffer.js"; -import { assertNever } from "../utils/typeAssertions.js"; -import { BaseSignerClient, type ExportWalletStamper } from "./base.js"; -import { NotAuthenticatedError } from "../errors.js"; -import type { - AlchemySignerClientEvents, - AuthenticatingEventMetadata, - CredentialCreationOptionOverrides, - EmailAuthParams, - ExportWalletParams, - OauthConfig, - OtpParams, - JwtParams, - JwtResponse, - User, - SubmitOtpCodeResponse, - AuthLinkingPrompt, - GetWebAuthnAttestationResult, - IdTokenOnly, - SmsAuthParams, - ExportWalletOutput, -} from "./types.js"; -import { MfaRequiredError } from "../errors.js"; -import { parseMfaError } from "../utils/parseMfaError.js"; - -const CHECK_CLOSE_INTERVAL = 500; - -export const AlchemySignerClientParamsSchema = z.object({ - connection: ConnectionConfigSchema, - iframeConfig: z.object({ - iframeElementId: z.string().default("turnkey-iframe"), - iframeContainerId: z.string(), - }), - rpId: z.string().optional(), - rootOrgId: z - .string() - .optional() - .default("24c1acf5-810f-41e0-a503-d5d13fa8e830"), - oauthCallbackUrl: z - .string() - .optional() - .default("https://signer.alchemy.com/callback"), - enablePopupOauth: z.boolean().optional().default(false), -}); - -export type AlchemySignerClientParams = z.input< - typeof AlchemySignerClientParamsSchema ->; - -/** - * A lower level client used by the AlchemySigner used to communicate with - * Alchemy's signer service. - */ -export class AlchemySignerWebClient extends BaseSignerClient< - ExportWalletParams, - ExportWalletOutput -> { - private iframeStamper: IframeStamper; - private webauthnStamper: WebauthnStamper; - oauthCallbackUrl: string; - iframeConfig: { - iframeElementId: string; - iframeContainerId: string; - }; - - /** - * Initializes a new instance with the given parameters, setting up the connection, iframe configuration, and WebAuthn stamper. - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * ``` - * - * @param {AlchemySignerClientParams} params the parameters required to initialize the client - * @param {ConnectionConfig} params.connection The connection details needed to connect to the service - * @param {{ iframeElementId?: string; iframeContainerId: string }} params.iframeConfig The configuration details for setting up the iframe stamper - * @param {string} params.rpId The relying party ID, defaulting to the current hostname if not provided - * @param {string} params.rootOrgId The root organization ID - */ - constructor(params: AlchemySignerClientParams) { - const { connection, iframeConfig, rpId, rootOrgId, oauthCallbackUrl } = - AlchemySignerClientParamsSchema.parse(params); - - const iframeStamper = new IframeStamper({ - iframeElementId: iframeConfig.iframeElementId, - iframeUrl: "https://auth.turnkey.com", - iframeContainer: document.getElementById(iframeConfig.iframeContainerId), - }); - - super({ - connection, - rootOrgId, - stamper: iframeStamper, - }); - - this.iframeStamper = iframeStamper; - this.iframeConfig = iframeConfig; - - this.webauthnStamper = new WebauthnStamper({ - rpId: rpId ?? window.location.hostname, - }); - - this.oauthCallbackUrl = oauthCallbackUrl; - } - - /** - * Begin authenticating a user with their email and an expiration time for the authentication request. Initializes the iframe stamper to get the target public key. - * This method sends an email to the user to complete their login - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const account = await client.initEmailAuth({ email: "you@mail.com" }); - * ``` - * - * @param {Omit} params The parameters for email authentication, excluding the target public key - * @returns {Promise} The response from the authentication request - */ - public override initEmailAuth = async ( - params: Omit, - ) => { - this.eventEmitter.emit("authenticating", { type: "otp" }); - const { email, emailMode, expirationSeconds } = params; - const publicKey = await this.initSessionStamper(); - - try { - return await this.request("/v1/auth", { - email, - emailMode, - targetPublicKey: publicKey, - expirationSeconds, - redirectParams: params.redirectParams?.toString(), - multiFactors: params.multiFactors, - }); - } catch (error) { - const multiFactors = parseMfaError(error); - - // If MFA is required, and emailMode is Magic Link, the user must submit mfa with the request or - // the the server will return an error with the required mfa factors. - if (multiFactors) { - throw new MfaRequiredError(multiFactors); - } - throw error; - } - }; - - /** - * Begin authenticating a user through sms. Initializes the iframe stamper to get the target public key. - * This method sends a text message to the user to complete their login - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const account = await client.initSmsAuth({ phone: "+1234567890" }); - * ``` - * - * @param {Omit} params The parameters for sms authentication, excluding the target public key - * @returns {Promise} The response from the authentication request - */ - public override initSmsAuth = async ( - params: Omit, - ) => { - this.eventEmitter.emit("authenticating", { type: "otp" }); - const { phone } = params; - const publicKey = await this.initSessionStamper(); - - return this.request("/v1/auth", { - phone, - targetPublicKey: publicKey, - }); - }; - - /** - * Authenticates using an OTP code which was previously received via email. - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const account = await client.submitOtpCode({ - * orgId: "user-org-id", - * otpId: "opt-returned-from-initEmailAuth", - * otpCode: "otp-code-from-email", - * }); - * ``` - * - * @param {Omit} args The parameters for the OTP request, excluding the target public key. - * @returns {Promise<{ bundle: string }>} A promise that resolves to an object containing the credential bundle. - */ - public override async submitOtpCode( - args: Omit, - ): Promise { - this.eventEmitter.emit("authenticating", { type: "otpVerify" }); - const targetPublicKey = await this.initSessionStamper(); - const response = await this.request("/v1/otp", { - ...args, - targetPublicKey, - }); - - if ("credentialBundle" in response && response.credentialBundle) { - return { - mfaRequired: false, - bundle: response.credentialBundle, - }; - } - - // If the server says "MFA_REQUIRED", pass that data back to the caller: - if ( - response.status === "MFA_REQUIRED" && - response.encryptedPayload && - response.multiFactors - ) { - return { - mfaRequired: true, - encryptedPayload: response.encryptedPayload, - multiFactors: response.multiFactors, - }; - } - - // Otherwise, it's truly an error: - throw new Error( - "Failed to submit OTP code. Server did not return required fields.", - ); - } - - /** - * Authenticates using a custom issued JWT - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const account = await client.submitJwt({ - * jwt: "custom-issued-jwt", - * authProvider: "auth-provider-name", - * }); - * ``` - * - * @param {Omit} args The parameters for the JWT request, excluding the target public key. - * @returns {Promise<{ bundle: string }>} A promise that resolves to an object containing the credential bundle. - */ - public override async submitJwt( - args: Omit, - ): Promise { - this.eventEmitter.emit("authenticating", { type: "custom-jwt" }); - const targetPublicKey = await this.initSessionStamper(); - return this.request("/v1/auth-jwt", { - jwt: args.jwt, - targetPublicKey, - authProvider: args.authProvider, - expirationSeconds: args.expirationSeconds, - }); - } - - /** - * Completes auth for the user by injecting a credential bundle and retrieving - * the user information based on the provided organization ID. Emits events - * during the process. - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const account = await client.completeAuthWithBundle({ orgId: "user-org-id", bundle: "bundle-from-email", connectedEventName: "connectedEmail" }); - * ``` - * - * @param {{ bundle: string; orgId: string, connectedEventName: keyof AlchemySignerClientEvents, idToken?: string }} config - * The configuration object for the authentication function containing the - * credential bundle to inject and the organization id associated with the - * user, as well as the event to be emitted on success and optionally an OIDC - * ID token with extra user information - * @returns {Promise} A promise that resolves to the authenticated user - * information - */ - public override completeAuthWithBundle = async ({ - bundle, - orgId, - connectedEventName, - idToken, - accessToken, - authenticatingType, - }: { - bundle: string; - orgId: string; - connectedEventName: keyof AlchemySignerClientEvents; - authenticatingType: AuthenticatingEventMetadata["type"]; - idToken?: string; - accessToken?: string; - }): Promise => { - this.eventEmitter.emit("authenticating", { type: authenticatingType }); - await this.initSessionStamper(); - - const result = await this.iframeStamper.injectCredentialBundle(bundle); - - if (!result) { - throw new Error("Failed to inject credential bundle"); - } - - const user = await this.whoami(orgId, idToken, accessToken); - - this.eventEmitter.emit(connectedEventName, user, bundle); - - return user; - }; - - /** - * Initiates the export of a wallet by creating an iframe stamper and calling the appropriate export function. - * The export can be based on a seed phrase or a private key. - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const account = await client.exportWallet({ - * iframeContainerId: "export-iframe-container", - * }); - * ``` - * - * @param {ExportWalletParams} config The parameters for exporting the wallet - * @param {string} config.iframeContainerId The ID of the container element that will hold the iframe stamper - * @param {string} [config.iframeElementId] Optional ID for the iframe element - * @returns {Promise} A promise that resolves when the export process is complete - */ - public override exportWallet = async ({ - iframeContainerId, - iframeElementId = "turnkey-export-iframe", - }: ExportWalletParams): Promise => { - const exportWalletIframeStamper = new IframeStamper({ - iframeContainer: document.getElementById(iframeContainerId), - iframeElementId: iframeElementId, - iframeUrl: "https://export.turnkey.com", - }); - await exportWalletIframeStamper.init(); - - if (this.turnkeyClient.stamper === this.iframeStamper) { - return this.exportWalletInner({ - exportStamper: exportWalletIframeStamper, - exportAs: "SEED_PHRASE", - }); - } - - return this.exportWalletInner({ - exportStamper: exportWalletIframeStamper, - exportAs: "PRIVATE_KEY", - }); - }; - - /** - * Exports wallet credentials based on the specified type, either as a SEED_PHRASE or PRIVATE_KEY. - * - * @param {object} params The parameters for exporting the wallet - * @param {ExportWalletStamper} params.exportStamper The stamper used for exporting the wallet - * @param {"SEED_PHRASE" | "PRIVATE_KEY"} params.exportAs Specifies the format for exporting the wallet, either as a SEED_PHRASE or PRIVATE_KEY - * @returns {Promise} A promise that resolves to true if the export is successful - */ - protected exportWalletInner(params: { - exportStamper: ExportWalletStamper; - exportAs: "SEED_PHRASE" | "PRIVATE_KEY"; - }): Promise { - const { exportAs } = params; - switch (exportAs) { - case "PRIVATE_KEY": - return this.exportAsPrivateKey(params.exportStamper); - case "SEED_PHRASE": - return this.exportAsSeedPhrase(params.exportStamper); - default: - assertNever(exportAs, `Unknown export mode: ${exportAs}`); - } - } - - /** - * Asynchronous function that clears the user and resets the iframe stamper. - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const account = await client.disconnect(); - * ``` - */ - public override disconnect = async () => { - this.user = undefined; - this.iframeStamper.clear(); - - // In the latest version of the TK iframe stamper, the - // IframeStamper instance seems to not be usable after - // clearing it, so we need to create a new instance. - const stamper = new IframeStamper({ - iframeContainer: document.getElementById( - this.iframeConfig.iframeContainerId, - ), - iframeElementId: this.iframeConfig.iframeElementId, - iframeUrl: "https://auth.turnkey.com", - }); - this.iframeStamper = stamper; - await this.initSessionStamper(); - }; - - /** - * Redirects the user to the OAuth provider URL based on the provided arguments. This function will always reject after 1 second if the redirection does not occur. - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * await client.oauthWithRedirect({ - * type: "oauth", - * authProviderId: "google", - * mode: "redirect", - * redirectUrl: "/", - * }); - * ``` - * - * @param {Extract} args The arguments required to obtain the OAuth provider URL - * @returns {Promise} A promise that will never resolve, only reject if the redirection fails - */ - public override oauthWithRedirect = async ( - args: Extract, - ): Promise => { - const turnkeyPublicKey = await this.initSessionStamper(); - - const oauthParams = args; - const providerUrl = await this.getOauthProviderUrl({ - oauthParams, - turnkeyPublicKey, - oauthCallbackUrl: this.oauthCallbackUrl, - }); - - window.location.href = providerUrl; - return new Promise((_, reject) => - setTimeout(() => reject("Failed to redirect to OAuth provider"), 1000), - ); - }; - - /** - * Initiates an OAuth authentication flow in a popup window and returns the authenticated user. - * - * @example - * ```ts - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const user = await client.oauthWithPopup({ - * type: "oauth", - * authProviderId: "google", - * mode: "popup" - * }); - * ``` - * - * @param {Extract} args The authentication parameters specifying OAuth type and popup mode - * @returns {Promise} A promise that resolves to a `User` object containing the authenticated user information - */ - public override oauthWithPopup = async ( - args: Extract, - ): Promise => { - const turnkeyPublicKey = await this.initSessionStamper(); - const oauthParams = args; - const providerUrl = await this.getOauthProviderUrl({ - oauthParams, - turnkeyPublicKey, - oauthCallbackUrl: this.oauthCallbackUrl, - }); - const popup = window.open( - providerUrl, - "_blank", - "popup,width=500,height=600", - ); - const eventEmitter = this.eventEmitter; - return new Promise((resolve, reject) => { - const handleMessage = (event: MessageEvent) => { - if (!event.data) { - return; - } - const { - alchemyStatus: status, - alchemyBundle: bundle, - alchemyOrgId: orgId, - alchemyIdToken: idToken, - alchemyAccessToken: accessToken, - alchemyIsSignup: isSignup, - alchemyError, - alchemyOtpId: otpId, - alchemyEmail: email, - alchemyAuthProvider: providerName, - } = event.data; - if (alchemyError) { - cleanup(); - popup?.close(); - reject(new OauthFailedError(alchemyError)); - } - if (!status) { - // This message isn't meant for us. - return; - } - cleanup(); - popup?.close(); - switch (status) { - case "SUCCESS": - this.completeAuthWithBundle({ - bundle, - orgId, - connectedEventName: "connectedOauth", - idToken, - accessToken, - authenticatingType: "oauth", - }).then((user) => { - if (isSignup) { - eventEmitter.emit("newUserSignup"); - } - resolve(user); - }, reject); - break; - case "ACCOUNT_LINKING_CONFIRMATION_REQUIRED": - resolve({ - status, - idToken, - accessToken, - email, - providerName, - otpId, - orgId, - } satisfies AuthLinkingPrompt); - break; - case "FETCHED_ID_TOKEN_ONLY": - resolve({ - status, - idToken, - accessToken, - providerName, - } satisfies IdTokenOnly); - break; - default: - reject(new Error(`Unknown status: ${status}`)); - } - }; - - window.addEventListener("message", handleMessage); - - const checkCloseIntervalId = setInterval(() => { - if (popup?.closed) { - cleanup(); - reject(new OauthCancelledError()); - } - }, CHECK_CLOSE_INTERVAL); - - const cleanup = () => { - window.removeEventListener("message", handleMessage); - clearInterval(checkCloseIntervalId); - }; - }); - }; - - /** - * Initializes the iframe stamper and returns its public key. - * - * @example - * ```ts twoslash - * import { AlchemySignerWebClient } from "@account-kit/signer"; - * - * const client = new AlchemySignerWebClient({ - * connection: { - * apiKey: "your-api-key", - * }, - * iframeConfig: { - * iframeContainerId: "signer-iframe-container", - * }, - * }); - * - * const publicKey = await client.targetPublicKey(); - * ``` - * - * @returns {Promise} A promise that resolves with the target public key when the iframe stamper is successfully initialized, or throws an error if the target public key is not supported. - */ - public override targetPublicKey = async (): Promise => { - return this.initSessionStamper(); - }; - - protected override getWebAuthnAttestation = async ( - options?: CredentialCreationOptionOverrides, - userDetails: { username: string } = { - username: this.user?.email ?? "anonymous", - }, - ): Promise => { - const challenge = generateRandomBuffer(); - const authenticatorUserId = generateRandomBuffer(); - - const attestation = await getWebAuthnAttestation({ - publicKey: { - ...options?.publicKey, - authenticatorSelection: { - residentKey: "preferred", - requireResidentKey: false, - userVerification: "preferred", - ...options?.publicKey?.authenticatorSelection, - }, - challenge, - rp: { - id: window.location.hostname, - name: window.location.hostname, - ...options?.publicKey?.rp, - }, - pubKeyCredParams: [ - { - type: "public-key", - alg: -7, - }, - { - type: "public-key", - alg: -257, - }, - ], - user: { - id: authenticatorUserId, - name: userDetails.username, - displayName: userDetails.username, - ...options?.publicKey?.user, - }, - }, - signal: options?.signal, - }); - - // on iOS sometimes this is returned as empty or null, so handling that here - if (attestation.transports == null || attestation.transports.length === 0) { - attestation.transports = [ - "AUTHENTICATOR_TRANSPORT_INTERNAL", - "AUTHENTICATOR_TRANSPORT_HYBRID", - ]; - } - - return { challenge, authenticatorUserId, attestation }; - }; - - protected override getOauthConfig = async (): Promise => { - const currentStamper = this.turnkeyClient.stamper; - const publicKey = await this.initSessionStamper(); - - // swap the stamper back in case the user logged in with a different stamper (passkeys) - this.setStamper(currentStamper); - const nonce = this.getOauthNonce(publicKey); - return this.request("/v1/prepare-oauth", { nonce }); - }; - - private initSessionStamperPromise: Promise | null = null; - - protected override async initSessionStamper(): Promise { - if (this.initSessionStamperPromise) { - return this.initSessionStamperPromise; - } - - this.initSessionStamperPromise = (async () => { - if (!this.iframeStamper.publicKey()) { - await this.iframeStamper.init(); - } - - this.setStamper(this.iframeStamper); - - return this.iframeStamper.publicKey()!; - })(); - - try { - const result = await this.initSessionStamperPromise; - return result; - } finally { - this.initSessionStamperPromise = null; - } - } - - protected override async initWebauthnStamper( - user: User | undefined = this.user, - ): Promise { - this.setStamper(this.webauthnStamper); - if (user && user.credentialId) { - // The goal here is to allow us to cache the allowed credential, but this doesn't work with hybrid transport :( - this.webauthnStamper.allowCredentials = [ - { - id: Buffer.from(user.credentialId, "base64"), - type: "public-key", - transports: ["internal", "hybrid"], - }, - ]; - } - } - - private exportAsSeedPhrase = async (stamper: ExportWalletStamper) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const { wallets } = await this.turnkeyClient.getWallets({ - organizationId: this.user.orgId, - }); - - const walletAccountResponses = await Promise.all( - wallets.map(({ walletId }) => - this.turnkeyClient.getWalletAccounts({ - organizationId: this.user!.orgId, - walletId, - }), - ), - ); - const walletAccounts = walletAccountResponses.flatMap((x) => x.accounts); - - const walletAccount = walletAccounts.find( - (x) => x.address.toLowerCase() === this.user!.address.toLowerCase(), - ); - - if (!walletAccount) { - throw new Error( - `Could not find wallet associated with ${this.user.address}`, - ); - } - - const { activity } = await this.turnkeyClient.exportWallet({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_EXPORT_WALLET", - timestampMs: Date.now().toString(), - parameters: { - walletId: walletAccount!.walletId, - targetPublicKey: stamper.publicKey()!, - }, - }); - - const { exportBundle } = await this.pollActivityCompletion( - activity, - this.user.orgId, - "exportWalletResult", - ); - - const result = await stamper.injectWalletExportBundle( - exportBundle, - this.user.orgId, - ); - - if (!result) { - throw new Error("Failed to inject wallet export bundle"); - } - - return result; - }; - - private exportAsPrivateKey = async (stamper: ExportWalletStamper) => { - if (!this.user) { - throw new NotAuthenticatedError(); - } - - const { activity } = await this.turnkeyClient.exportWalletAccount({ - organizationId: this.user.orgId, - type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT", - timestampMs: Date.now().toString(), - parameters: { - address: this.user.address, - targetPublicKey: stamper.publicKey()!, - }, - }); - - const { exportBundle } = await this.pollActivityCompletion( - activity, - this.user.orgId, - "exportWalletAccountResult", - ); - - const result = await stamper.injectKeyExportBundle( - exportBundle, - this.user.orgId, - ); - - if (!result) { - throw new Error("Failed to inject wallet export bundle"); - } - - return result; - }; -} - -/** - * This error is thrown when the OAuth flow is cancelled because the auth popup - * window was closed. - */ -export class OauthCancelledError extends BaseError { - override name = "OauthCancelledError"; - - /** - * Constructor for initializing an error indicating that the OAuth flow was - * cancelled. - */ - constructor() { - super("OAuth cancelled"); - } -} - -/** - * This error is thrown when an error occurs during the OAuth login flow. - */ -export class OauthFailedError extends BaseError { - override name = "OauthFailedError"; -} diff --git a/account-kit/signer/src/client/server.ts b/account-kit/signer/src/client/server.ts deleted file mode 100644 index af8bcbd1e9..0000000000 --- a/account-kit/signer/src/client/server.ts +++ /dev/null @@ -1,149 +0,0 @@ -import type { ConnectionConfig } from "@aa-sdk/core"; -import { ApiKeyStamper } from "@turnkey/api-key-stamper"; -import type { CreateAccountParams, SignupResponse, User } from "./types"; -import { BaseSignerClient } from "./base.js"; -import { NotAuthenticatedError, UnsupportedFeatureError } from "../errors.js"; -import { TurnkeyClient } from "@turnkey/http"; -import type { AuthParams } from "../signer"; -import { p256 } from "@noble/curves/p256"; -import { bytesToHex } from "@noble/curves/utils"; - -export interface ServerSignerClientParams { - connection: ConnectionConfig; -} - -const unimplementedFunction = (feature: string) => { - return () => { - throw new UnsupportedFeatureError(feature); - }; -}; - -const createDummyStamper = () => { - return { - stamp: () => { - throw new NotAuthenticatedError(); - }, - }; -}; - -/** - * ServerSignerClient is a client for signing messages using an access key. - * It extends the BaseSignerClient and uses the ApiKeyStamper for signing. - * Primarily intended to be used server-side. - */ -export class ServerSignerClient extends BaseSignerClient { - /** - * Creates an instance of ServerSignerClient. - * - * @param {ServerSignerClientParams} params The parameters for the client, including the access key and connection configuration - * @param {ConnectionConfig} params.connection The connection configuration for the client - * @param {string} params.accessKey The access key to be used for authentication - * @param {string | undefined} params.accountId An optional ID to identify the account. Only required when using a single access key for multiple signers. - */ - constructor({ connection }: ServerSignerClientParams) { - // we will re-recreate the turnkey client (including the stamper) when we authenticate - const stamper = createDummyStamper(); - - super({ connection, stamper }); - } - - /** - * Unsets the user for the client - */ - public override disconnect = async (): Promise => { - this.user = undefined; - }; - - /** - * Creates a new user with the given parameters. - * - * @param {CreateAccountParams} params The parameters for creating the account - * @returns {Promise} A promise that resolves to the signup response - */ - public override createAccount = async ( - params: CreateAccountParams, - ): Promise => { - if (params.type !== "accessKey") { - throw new Error( - "ServerSignerClient only supports account creation via access key", - ); - } - - return this.request("/v1/signup", { - accessKey: { - publicKey: params.publicKey, - accountId: params.accountId, - }, - }); - }; - - /** - * Authenticates the user with an access key. - * - * @param {Extract} params The parameters for the authentication - * @returns {Promise} A promise that resolves to the user - */ - public authenticateWithAccessKey = async ({ - accessKey, - accountId, - }: Extract): Promise => { - const publicKey = bytesToHex(p256.getPublicKey(accessKey)); - - const user = await this.lookupUserByAccessKey({ - publicKey, - accountId, - }); - - const orgId = - user?.orgId ?? - ( - await this.createAccount({ - type: "accessKey", - publicKey, - accountId, - }) - )?.orgId; - - return this.completeAuthWithApiKey( - { publicKey, privateKey: accessKey }, - orgId, - ); - }; - - private completeAuthWithApiKey = async ( - apiKey: { publicKey: string; privateKey: string }, - subOrgId: string, - ) => { - this.turnkeyClient = new TurnkeyClient( - { baseUrl: "https://api.turnkey.com" }, - new ApiKeyStamper({ - apiPrivateKey: apiKey.privateKey, - apiPublicKey: apiKey.publicKey, - }), - ); - - const user = await this.whoami(subOrgId); - this.user = user; - return user; - }; - - /** - * Unimplemented functions for server signer. - * Required to extend the BaseSignerClient class. - */ - public initSmsAuth = unimplementedFunction("Sms auth"); - public submitJwt = unimplementedFunction("Jwt"); - protected initSessionStamper = unimplementedFunction("Sessions"); - protected initWebauthnStamper = unimplementedFunction("Webauthn"); - override initEmailAuth = unimplementedFunction("Email auth"); - public override submitOtpCode = unimplementedFunction("Otp code submission"); - override completeAuthWithBundle = unimplementedFunction("Auth with bundle"); - override oauthWithRedirect = unimplementedFunction("OAuth redirect"); - override oauthWithPopup = unimplementedFunction("OAuth popup"); - override exportWallet = unimplementedFunction("Wallet export"); - override targetPublicKey = unimplementedFunction("Target public key"); - override getWebAuthnAttestation = unimplementedFunction( - "WebAuthn attestation", - ); - override getOauthConfig = unimplementedFunction("OAuth config"); -} diff --git a/account-kit/signer/src/client/types.ts b/account-kit/signer/src/client/types.ts deleted file mode 100644 index e3f5600c6b..0000000000 --- a/account-kit/signer/src/client/types.ts +++ /dev/null @@ -1,587 +0,0 @@ -import type { Address } from "@aa-sdk/core"; -import type { - TSignedRequest, - TurnkeyApiTypes, - getWebAuthnAttestation, -} from "@turnkey/http"; -import type { Hex } from "viem"; -import type { AuthParams } from "../signer"; - -export type VerificationOtp = { - /** The OTP ID returned from initOtp */ - id: string; - /** The OTP code received by the user */ - code: string; -}; - -export type CredentialCreationOptionOverrides = { - publicKey?: Partial; -} & Pick; - -export type User = { - email?: string; - phone?: string; - orgId: string; - userId: string; - address: Address; - solanaAddress?: string; - credentialId?: string; - idToken?: string; - accessToken?: string; - claims?: Record; -}; - -export type ExportWalletParams = { - iframeContainerId: string; - iframeElementId?: string; -}; - -export type ExportWalletOutput = boolean; - -export type CreateAccountParams = - | { - type: "email"; - email: string; - /** @deprecated This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. */ - emailMode?: EmailType; - expirationSeconds?: number; - redirectParams?: URLSearchParams; - } - | { - type: "sms"; - phone: string; - } - | { - type: "passkey"; - email: string; - creationOpts?: CredentialCreationOptionOverrides; - } - | { - type: "passkey"; - username: string; - creationOpts?: CredentialCreationOptionOverrides; - } - | { - type: "accessKey"; - publicKey: string; - accountId?: string; - }; - -export type EmailType = "magicLink" | "otp"; - -export type EmailAuthParams = { - email: string; - /** @deprecated This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. */ - emailMode?: EmailType; - expirationSeconds?: number; - targetPublicKey: string; - redirectParams?: URLSearchParams; - multiFactors?: VerifyMfaParams[]; -}; - -export type SmsAuthParams = { - phone: string; - targetPublicKey: string; -}; - -export type AccessKeyAuthParamsPublicKeyOnly = { - accessKey: { - publicKey: string; - accountId?: string; - }; -}; - -export type OauthParams = Extract & { - expirationSeconds?: number; - fetchIdTokenOnly?: boolean; -}; - -export type OtpParams = { - orgId: string; - otpId: string; - otpCode: string; - targetPublicKey: string; - expirationSeconds?: number; - multiFactors?: VerifyMfaParams[]; -}; - -export type OtpResponse = - | { - status: "SUCCESS"; - credentialBundle: string; - } - | { - status: "MFA_REQUIRED"; - encryptedPayload: string; - multiFactors: MfaFactor[]; - }; - -export type JwtParams = { - jwt: string; - targetPublicKey: string; - authProvider?: string; - expirationSeconds?: number; -}; - -export type JwtResponse = { - isSignUp: boolean; - orgId: string; - credentialBundle: string; -}; - -export type SignupResponse = { - orgId: string; - userId?: string; - address?: Address; - solanaAddress?: string; - otpId?: string; -}; - -export type OauthConfig = { - codeChallenge: string; - requestKey: string; - authProviders: AuthProviderConfig[]; -}; - -export type EmailConfig = { - mode?: "MAGIC_LINK" | "OTP"; -}; - -export type SignerConfig = { - email: EmailConfig; -}; - -export type AuthProviderConfig = { - id: string; - isCustomProvider?: boolean; - clientId: string; - authEndpoint: string; -}; - -export type SignerRoutes = SignerEndpoints[number]["Route"]; -export type SignerBody = Extract< - SignerEndpoints[number], - { Route: T } ->["Body"]; -export type SignerResponse = Extract< - SignerEndpoints[number], - { Route: T } ->["Response"]; - -export type SignerEndpoints = [ - { - Route: "/v1/signup"; - Body: - | (Omit & { - redirectParams?: string; - }) - | SmsAuthParams - | { - passkey: { - challenge: string; - attestation: Awaited>; - }; - } - | AccessKeyAuthParamsPublicKeyOnly; - Response: SignupResponse; - }, - { - Route: "/v1/whoami"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: User; - }, - { - Route: "/v1/auth"; - Body: - | (Omit & { - redirectParams?: string; - multiFactors?: VerifyMfaParams[]; - }) - | SmsAuthParams; - Response: { - orgId: string; - otpId?: string; - multiFactors?: MfaFactor[]; - }; - }, - { - Route: "/v1/lookup"; - Body: { - email?: string; - phone?: string; - accessKey?: { - publicKey: string; - accountId?: string; - }; - }; - Response: { - orgId: string | null; - }; - }, - { - Route: "/v1/init-otp"; - Body: { - contact: string; - otpType: "OTP_TYPE_SMS" | "OTP_TYPE_EMAIL"; - }; - Response: { - otpId: string; - }; - }, - { - Route: "/v1/verify-otp"; - Body: { - otpId: string; - otpCode: string; - }; - Response: { - verificationToken: string; - }; - }, - { - Route: "/v1/sign-payload"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - signature: Hex; - }; - }, - { - Route: "/v1/update-email-auth"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: void; - }, - { - Route: "/v1/update-phone-auth"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: void; - }, - { - Route: "/v1/add-oauth-provider"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: { oauthProviders: OauthProviderInfo[] }; - }, - { - Route: "/v1/remove-oauth-provider"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: void; - }, - { - Route: "/v1/list-auth-methods"; - Body: {}; - Response: AuthMethods; - }, - { - Route: "/v1/prepare-oauth"; - Body: { - nonce: string; - }; - Response: OauthConfig; - }, - { - Route: "/v1/otp"; - Body: OtpParams; - Response: OtpResponse; - }, - { - Route: "/v1/auth-list-multi-factors"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - multiFactors: MfaFactor[]; - }; - }, - { - Route: "/v1/auth-delete-multi-factors"; - Body: { - stampedRequest: TSignedRequest; - multiFactorIds: string[]; - }; - Response: { - multiFactors: MfaFactor[]; - }; - }, - { - Route: "/v1/auth-request-multi-factor"; - Body: { - stampedRequest: TSignedRequest; - multiFactorType: MultiFactorType; - }; - Response: AddMfaResult; - }, - { - Route: "/v1/auth-verify-multi-factor"; - Body: VerifyMfaParams & { - stampedRequest: TSignedRequest; - }; - Response: { - multiFactors: MfaFactor[]; - }; - }, - { - Route: "/v1/auth-jwt"; - Body: JwtParams; - Response: JwtResponse; - }, - { - Route: "/v1/signer-config"; - Body: {}; - Response: SignerConfig; - }, - { - Route: "/v1/auth-validate-multi-factors"; - Body: { - encryptedPayload: string; - multiFactors: VerifyMfaParams[]; - }; - Response: { - payload: { - credentialBundle?: string; - }; - multiFactors: MfaFactor[]; - }; - }, - { - Route: "/v1/multi-owner-create"; - Body: { - members: { - evmSignerAddress: Address; - }[]; - }; - Response: { - result: { - orgId: string; - evmSignerAddress: Address; - members: { - evmSignerAddress: Address; - }[]; - }; - }; - }, - { - Route: "/v1/multi-owner-prepare-add"; - Body: { - organizationId: string; - members: { - evmSignerAddress: Address; - }[]; - }; - Response: { - result: TurnkeyApiTypes["v1CreateUsersRequest"]; - }; - }, - { - Route: "/v1/multi-owner-add"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: { - members: { - evmSignerAddress: Address; - }[]; - updateRootQuorumRequest: TurnkeyApiTypes["v1UpdateRootQuorumRequest"]; - }; - }; - }, - { - Route: "/v1/multi-owner-update-root-quorum"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: TurnkeyApiTypes["v1UpdateRootQuorumResult"]; - }; - }, - { - Route: "/v1/multi-owner-sign-raw-payload"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: { - signRawPayloadResult: TurnkeyApiTypes["v1SignRawPayloadResult"]; - }; - }; - }, - { - Route: "/v1/multi-owner-prepare-delete"; - Body: { - organizationId: string; - members: { - evmSignerAddress: Address; - }[]; - }; - Response: { - result: { - updateRootQuorumRequest: TurnkeyApiTypes["v1UpdateRootQuorumRequest"]; - deleteMembersRequest: TurnkeyApiTypes["v1DeleteUsersRequest"]; - }; - }; - }, - { - Route: "/v1/multi-owner-delete"; - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: { - deletedUserIds: string[]; - }; - }; - }, -]; - -export type AuthenticatingEventMetadata = { - type: - | "email" - | "passkey" - | "oauth" - | "otp" - | "otpVerify" - | "custom-jwt" - | "sms"; -}; - -export type AlchemySignerClientEvents = { - connected(user: User): void; - newUserSignup(): void; - authenticating(data: AuthenticatingEventMetadata): void; - connectedEmail(user: User, bundle: string): void; - connectedPasskey(user: User): void; - connectedOauth(user: User, bundle: string): void; - connectedOtp(user: User, bundle: string): void; - connectedJwt(user: User, bundle: string): void; - disconnected(): void; -}; - -export type AlchemySignerClientEvent = keyof AlchemySignerClientEvents; - -export type GetWebAuthnAttestationResult = { - attestation: Awaited>; - challenge: ArrayBuffer | string; - authenticatorUserId: BufferSource; -}; - -export type AuthLinkingPrompt = { - status: "ACCOUNT_LINKING_CONFIRMATION_REQUIRED"; - idToken: string; - accessToken?: string; - email: string; - providerName: string; - otpId: string; - orgId: string; -}; - -export type IdTokenOnly = { - status: "FETCHED_ID_TOKEN_ONLY"; - idToken: string; - accessToken?: string; - providerName: string; -}; - -export type OauthState = { - authProviderId: string; - isCustomProvider?: boolean; - requestKey: string; - turnkeyPublicKey: string; - expirationSeconds?: number; - redirectUrl?: string; - openerOrigin?: string; - fetchIdTokenOnly?: boolean; -}; - -export type GetOauthProviderUrlArgs = { - oauthParams: OauthParams; - turnkeyPublicKey: string; - oauthCallbackUrl: string; - oauthConfig?: OauthConfig; - usesRelativeUrl?: boolean; -}; - -export type MfaFactor = { - multiFactorId: string; - multiFactorType: string; -}; - -type MultiFactorType = "totp"; - -export type AddMfaParams = { - multiFactorType: MultiFactorType; -}; - -export type AddMfaResult = { - multiFactorType: MultiFactorType; - multiFactorId: string; - multiFactorTotpUrl: string; -}; - -export type VerifyMfaParams = { - multiFactorId: string; - multiFactorCode: string; -}; - -export type RemoveMfaParams = { - multiFactorIds: string[]; -}; - -export type ValidateMultiFactorsParams = { - encryptedPayload: string; - multiFactors: VerifyMfaParams[]; -}; - -export type MfaChallenge = { - multiFactorId: string; - multiFactorChallenge: - | { - code: string; - } - | Record; -}; - -export type SubmitOtpCodeResponse = - | { bundle: string; mfaRequired: false } - | { mfaRequired: true; encryptedPayload: string; multiFactors: MfaFactor[] }; - -export type AddOauthProviderParams = { - providerName: string; - oidcToken: string; -}; - -export type AuthMethods = { - email?: string; - phone?: string; - oauthProviders: OauthProviderInfo[]; - passkeys: PasskeyInfo[]; -}; - -export type OauthProviderInfo = { - providerId: string; - issuer: string; - providerName?: string; - userDisplayName?: string; -}; - -export type PasskeyInfo = { - authenticatorId: string; - name: string; - createdAt: number; -}; - -export type experimental_CreateApiKeyParams = { - name: string; - publicKey: string; - expirationSec: number; -}; diff --git a/account-kit/signer/src/errors.ts b/account-kit/signer/src/errors.ts deleted file mode 100644 index e68ddb568e..0000000000 --- a/account-kit/signer/src/errors.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { BaseError } from "@aa-sdk/core"; -import type { MfaFactor } from "./client/types"; -export class NotAuthenticatedError extends BaseError { - override name = "NotAuthenticatedError"; - constructor() { - super( - [ - "Signer not authenticated", - "Please authenticate to use this signer", - ].join("\n"), - { - docsPath: "/signer/overview", - }, - ); - } -} - -export class OAuthProvidersError extends BaseError { - override name = "OAuthProvidersError"; - constructor() { - super("OAuth providers not found", { - docsPath: "/react/getting-started", - }); - } -} - -export class MfaRequiredError extends BaseError { - override name = "MfaRequiredError"; - public multiFactors: MfaFactor[]; - - constructor(multiFactors: MfaFactor[]) { - super("MFA is required for this user"); - this.multiFactors = multiFactors; - } -} - -export class UnsupportedFeatureError extends BaseError { - override name = "UnsupportedFeatureError"; - constructor(feature: string) { - super(`${feature} not supported by this signer`); - } -} diff --git a/account-kit/signer/src/index.ts b/account-kit/signer/src/index.ts deleted file mode 100644 index f6aa334741..0000000000 --- a/account-kit/signer/src/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -export { BaseAlchemySigner } from "./base.js"; -export { - AlchemyServerSigner, - createServerSigner, - generateAccessKey, -} from "./serverSigner.js"; -export { BaseSignerClient } from "./client/base.js"; -export { - AlchemySignerWebClient, - OauthCancelledError, - OauthFailedError, -} from "./client/index.js"; -export { ServerSignerClient } from "./client/server.js"; -export type * from "./client/types.js"; -export { - NotAuthenticatedError, - OAuthProvidersError, - MfaRequiredError, -} from "./errors.js"; -export { - DEFAULT_SESSION_MS, - SessionManagerParamsSchema, -} from "./session/manager.js"; -export type * from "./signer.js"; -export { AlchemyWebSigner } from "./signer.js"; -export type * from "./solanaSigner.js"; -export type * from "./types.js"; -export { AlchemySignerStatus } from "./types.js"; -export { SolanaSigner } from "./solanaSigner.js"; -export { - createSolanaSponsoredTransaction, - createSolanaTransaction, -} from "./utils/solana.js"; diff --git a/account-kit/signer/src/metrics.ts b/account-kit/signer/src/metrics.ts deleted file mode 100644 index ec244b954a..0000000000 --- a/account-kit/signer/src/metrics.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { createLogger } from "@account-kit/logging"; -import { VERSION } from "./version.js"; - -export type SignerEventsSchema = [ - { - EventName: "signer_authnticate"; - EventData: - | { - authType: - | "email" - | "sms" - | "passkey_anon" - | "passkey_email" - | "otp" - | "oauthReturn"; - provider?: never; - } - | { authType: "oauth"; provider: string } - | { authType: "custom-jwt"; provider?: string }; - }, - { - EventName: "signer_sign_message"; - EventData: undefined; - }, -]; - -export const SignerLogger = createLogger({ - package: "@account-kit/signer", - version: VERSION, -}); diff --git a/account-kit/signer/src/oauth.ts b/account-kit/signer/src/oauth.ts deleted file mode 100644 index c47b5f24f3..0000000000 --- a/account-kit/signer/src/oauth.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { KnownAuthProvider } from "./signer"; - -export type AuthProviderCustomization = { - scope: string; - claims?: string; - otherParameters?: Record; -}; - -const DEFAULT_PROVIDER_CUSTOMIZATION: Record< - KnownAuthProvider, - AuthProviderCustomization -> = { - google: { scope: "openid email" }, - apple: { scope: "openid email" }, - facebook: { - scope: "openid email", - // Fixes Facebook mobile login so that `window.opener` doesn't get nullified. - otherParameters: { sdk: "joey" }, - }, - twitch: { - scope: "openid user:read:email", - claims: JSON.stringify({ id_token: { email: null } }), - // Forces Twitch to show the login page even if the user is already logged in. - otherParameters: { force_verify: "true" }, - }, - auth0: { scope: "openid email" }, -}; - -/** - * Returns the default customization parameters when using a known auth provider - * - * @param {string} knownAuthProviderId id of a known auth provider, e.g. "google" - * @returns {AuthProviderCustomization | undefined} default customization parameters - */ -export function getDefaultProviderCustomization( - knownAuthProviderId: KnownAuthProvider, -): AuthProviderCustomization | undefined { - return DEFAULT_PROVIDER_CUSTOMIZATION[knownAuthProviderId]; -} - -/** - * "openid" is a required scope in the OIDC protocol. Insert it if the user - * forgot. - * - * @param {string} scope scope param which may be missing "openid" - * @returns {string} scope which most definitely contains "openid" - */ -export function addOpenIdIfAbsent(scope: string): string { - return scope.match(/\bopenid\b/) ? scope : `openid ${scope}`; -} diff --git a/account-kit/signer/src/serverSigner.ts b/account-kit/signer/src/serverSigner.ts deleted file mode 100644 index 6fa8cd2f8e..0000000000 --- a/account-kit/signer/src/serverSigner.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { - type AuthorizationRequest, - type SmartAccountSigner, - unpackSignRawMessageBytes, -} from "@aa-sdk/core"; -import { - ServerSignerClient, - type ServerSignerClientParams, -} from "./client/server.js"; -import { - hashMessage, - hashTypedData, - type Address, - type Hex, - type SignableMessage, - type SignedAuthorization, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { hashAuthorization } from "viem/utils"; -import type { AccessKeyAuthParams } from "./signer.js"; -import { SolanaSigner } from "./solanaSigner.js"; -import { p256 } from "@noble/curves/p256"; -import { bytesToHex } from "@noble/curves/utils"; - -/** - * AlchemyServerSigner is a signer that can sign messages and typed data using an access key. - * It extends the SmartAccountSigner interface and uses the ServerSignerClient to sign requests. - * Primarily intended to be used server-side. - */ -export class AlchemyServerSigner implements SmartAccountSigner { - inner: ServerSignerClient; - signerType = "alchemy-server-signer"; - - /** - * Creates an instance of AlchemyServerSigner. - * - * @param {ServerSignerClient} client The underlying signer client - */ - constructor(client: ServerSignerClient) { - this.inner = client; - } - - /** - * Gets the address of the user from the signer client. - * - * @returns {Promise
} The address of the user - * @throws {Error} If the user cannot be retrieved from the signer client - */ - async getAddress(): Promise
{ - const { address } = await this.inner.whoami(); - return address; - } - - /** - * Signs a message using the inner client. - * - * @param {SignableMessage} msg The message to sign - * @returns {Promise} The signed message - */ - async signMessage(msg: SignableMessage): Promise { - const messageHash = hashMessage(msg); - return this.inner.signRawMessage(messageHash); - } - - /** - * Signs typed data using the inner client. - * - * @param {TypedDataDefinition} params The typed data to sign - * @returns {Promise} The signed typed data - */ - async signTypedData< - const TTypedData extends TypedData | Record, - TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData, - >(params: TypedDataDefinition): Promise { - const messageHash = hashTypedData(params); - return this.inner.signRawMessage(messageHash); - } - - /** - * Signs an authorization using the inner client. - * - * @param {Authorization} unsignedAuthorization The unsigned authorization to sign - * @returns {Promise>} The signed authorization - */ - async signAuthorization( - unsignedAuthorization: AuthorizationRequest, - ): Promise> { - const hashedAuthorization = hashAuthorization(unsignedAuthorization); - const signedAuthorizationHex = - await this.inner.signRawMessage(hashedAuthorization); - const signature = unpackSignRawMessageBytes(signedAuthorizationHex); - const { address, contractAddress, ...unsignedAuthorizationRest } = - unsignedAuthorization; - - return { - ...unsignedAuthorizationRest, - ...signature, - address: address ?? contractAddress, - }; - } - - /** - * Creates a new instance of `SolanaSigner` using the inner client. - * - * @example - * ```ts - * import { AlchemyServerSigner } from "@account-kit/signer"; - * - * const signer = await createServerSigner({ - * auth: { accessKey }, - * connection: { - * apiKey: "alchemy-api-key", - * }, - * }); - * - * const solanaSigner = signer.toSolanaSigner(); - * ``` - * - * @returns {SolanaSigner} A new instance of `SolanaSigner` - */ - toSolanaSigner(): SolanaSigner { - return new SolanaSigner(this.inner); - } -} - -type CreateServerSignerParams = ServerSignerClientParams & { - auth: AccessKeyAuthParams; -}; - -/** - * Creates a new server signer. - * - * @example - * ```ts - * const signer = await createServerSigner({ - * auth: { accessKey }, - * connection: { - * apiKey: "alchemy-api-key", - * } - * }); - * - * console.log("Signer address:", await signer.getAddress()); - * ``` - * - * @param {CreateServerSignerParams} params Parameters - * @param {AccessKeyAuthParams} params.auth Authentication config for the server signer - * @param {ConnectionConfig} params.connection Connection config for the server signer - * @returns {Promise} A promise that resolves to a server signer - */ -export const createServerSigner = async ( - params: CreateServerSignerParams, -): Promise => { - const client = new ServerSignerClient(params); - const signer = new AlchemyServerSigner(client); - - await signer.inner.authenticateWithAccessKey({ - ...params.auth, - type: "accessKey", - }); - - return signer; -}; - -/** - * Generates a new access key for use in the server signer - * - * @returns {Hex} A randomly generated access key - */ -export const generateAccessKey = () => - bytesToHex(p256.utils.randomPrivateKey()); diff --git a/account-kit/signer/src/session/manager.test.ts b/account-kit/signer/src/session/manager.test.ts deleted file mode 100644 index ede136634e..0000000000 --- a/account-kit/signer/src/session/manager.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { AlchemySignerWebClient } from "../client/index.js"; -import { SessionManager } from "./manager.js"; - -describe("session manager", () => { - beforeEach(() => { - // Mock the document.getElementById method - vi.spyOn(document, "getElementById").mockImplementation((id) => { - if (id === "alchemy-signer-iframe-container") { - return document.createElement("div"); - } - return null; - }); - }); - - it("should set the expiration time as defined in the config", () => { - const manager = createManager(); - expect(manager.expirationTimeMs).toBe(5000); - }); - - afterEach(() => { - vi.restoreAllMocks(); - }); - - const createManager = () => { - const client = new AlchemySignerWebClient({ - connection: { rpcUrl: "/api/signer" }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }); - return new SessionManager({ - client, - expirationTimeMs: 5000, - }); - }; -}); diff --git a/account-kit/signer/src/session/manager.ts b/account-kit/signer/src/session/manager.ts deleted file mode 100644 index 8873272dc1..0000000000 --- a/account-kit/signer/src/session/manager.ts +++ /dev/null @@ -1,366 +0,0 @@ -import EventEmitter from "eventemitter3"; -import { z } from "zod"; -import { - createJSONStorage, - persist, - subscribeWithSelector, -} from "zustand/middleware"; -import { createStore, type Mutate, type StoreApi } from "zustand/vanilla"; -import type { BaseSignerClient } from "../client/base"; -import type { - AlchemySignerClientEvent, - AlchemySignerClientEvents, - User, -} from "../client/types"; -import { assertNever } from "../utils/typeAssertions.js"; -import type { Session, SessionManagerEvents } from "./types"; - -export const DEFAULT_SESSION_MS = 15 * 60 * 1000; // 15 minutes - -export const SessionManagerParamsSchema = z.object({ - sessionKey: z.string().default("alchemy-signer-session"), - storage: z - .enum(["localStorage", "sessionStorage"]) - .default("localStorage") - .or(z.custom()), - expirationTimeMs: z - .number() - .default(DEFAULT_SESSION_MS) - .describe( - "The time in milliseconds that a session should last before expiring [default: 15 minutes]", - ), - client: z.custom(), -}); - -export type SessionManagerParams = z.input; - -type SessionState = { - session: Session | null; -}; - -type Store = Mutate< - StoreApi, - [["zustand/subscribeWithSelector", never], ["zustand/persist", SessionState]] ->; - -type TemporarySession = { - orgId: string; - isNewUser?: boolean; - encryptedPayload?: string; - mfaFactorId?: string; -}; - -export class SessionManager { - private sessionKey: string; - private client: BaseSignerClient; - private eventEmitter: EventEmitter; - readonly expirationTimeMs: number; - private store: Store; - private clearSessionHandle: NodeJS.Timeout | null = null; - - constructor(params: SessionManagerParams) { - const { - sessionKey, - storage: storageType, - expirationTimeMs, - client, - } = SessionManagerParamsSchema.parse(params); - this.sessionKey = sessionKey; - const storage = - typeof storageType === "string" - ? storageType === "localStorage" - ? localStorage - : sessionStorage - : storageType; - this.expirationTimeMs = expirationTimeMs; - this.client = client; - this.eventEmitter = new EventEmitter(); - - this.store = createStore( - subscribeWithSelector( - persist(this.getInitialState, { - name: this.sessionKey, - storage: createJSONStorage(() => storage), - }), - ), - ); - - this.registerEventListeners(); - } - - public getSessionUser = async (): Promise => { - const existingSession = this.getSession(); - if (existingSession == null) { - return null; - } - - switch (existingSession.type) { - case "email": - case "oauth": - case "custom-jwt": - case "otp": { - const connectedEventName = (() => { - switch (existingSession.type) { - case "email": - return "connectedEmail"; - case "oauth": - return "connectedOauth"; - case "otp": - return "connectedOtp"; - case "custom-jwt": - return "connectedJwt"; - } - })(); - const result = await this.client - .completeAuthWithBundle({ - bundle: existingSession.bundle, - orgId: existingSession.user.orgId, - authenticatingType: existingSession.type, - connectedEventName, - idToken: existingSession.user.idToken, - }) - .catch((e) => { - console.warn("Failed to load user from session", e); - return null; - }); - - if (!result) { - this.clearSession(); - return null; - } - - return result; - } - case "passkey": { - // we don't need to do much here if we already have a user - // this will setup the client with the user context, but - // requests still have to be signed by the user on first request - // so this is fine - return this.client.lookupUserWithPasskey(existingSession.user); - } - default: - assertNever( - existingSession, - `Unknown session type: ${(existingSession as any).type}`, - ); - } - }; - - public clearSession = () => { - this.store.setState({ session: null }); - localStorage.removeItem(`${this.sessionKey}:temporary`); - - if (this.clearSessionHandle) { - clearTimeout(this.clearSessionHandle); - } - }; - - public setTemporarySession = (session: TemporarySession) => { - // temporary session must be placed in localStorage so that it can be accessed across tabs - localStorage.setItem( - `${this.sessionKey}:temporary`, - JSON.stringify(session), - ); - }; - - public getTemporarySession = (): TemporarySession | null => { - // temporary session must be placed in localStorage so that it can be accessed across tabs - const sessionStr = localStorage.getItem(`${this.sessionKey}:temporary`); - - if (!sessionStr) { - return null; - } - - return JSON.parse(sessionStr); - }; - - on = ( - event: E, - listener: SessionManagerEvents[E], - ) => { - this.eventEmitter.on(event, listener as any); - - return () => this.eventEmitter.removeListener(event, listener as any); - }; - - private getSession = (): Session | null => { - const session = this.store.getState().session; - - if (!session) { - return null; - } - - /** - * TODO: this isn't really good enough - * A user's session could be about to expire and we would still return it - * - * Instead we should check if a session is about to expire and refresh it - * We should revisit this later - */ - if (session.expirationDateMs < Date.now()) { - this.client.disconnect(); - this.clearSession(); - return null; - } - - this.registerSessionExpirationHandler(session); - - return session; - }; - - private setSession = ( - session_: - | Omit< - Extract, - "expirationDateMs" - > - | Omit, "expirationDateMs">, - ) => { - const session = { - ...session_, - expirationDateMs: Date.now() + this.expirationTimeMs, - }; - - this.registerSessionExpirationHandler(session); - - this.store.setState({ session }); - }; - - public initialize() { - this.getSessionUser() - .then((user) => { - // once we complete auth we can update the state of the session to connected or disconnected - if (user) this.eventEmitter.emit("connected", this.getSession()!); - else this.eventEmitter.emit("disconnected"); - }) - .finally(() => { - this.eventEmitter.emit("initialized"); - }); - } - - private getInitialState(): SessionState { - return { - session: null, - }; - } - - private registerEventListeners = () => { - this.store.subscribe( - ({ session }) => session, - (session, prevSession) => { - if (session != null && prevSession == null) { - this.eventEmitter.emit("connected", session); - } else if (session == null && prevSession != null) { - this.eventEmitter.emit("disconnected"); - } - }, - ); - - // Helper type to ensure that a listener is either defined or explicitly - // omitted for every event type. - type Listeners = { - [K in keyof AlchemySignerClientEvents]: - | AlchemySignerClientEvents[K] - | undefined; - }; - - const listeners: Listeners = { - connected: undefined, - newUserSignup: undefined, - authenticating: undefined, - connectedEmail: (user, bundle) => - this.setSessionWithUserAndBundle({ type: "email", user, bundle }), - connectedPasskey: (user) => { - const existingSession = this.getSession(); - if ( - existingSession != null && - existingSession.type === "passkey" && - existingSession.user.userId === user.userId - ) { - return; - } - - this.setSession({ type: "passkey", user }); - }, - connectedOauth: (user, bundle) => - this.setSessionWithUserAndBundle({ type: "oauth", user, bundle }), - connectedOtp: (user, bundle) => { - this.setSessionWithUserAndBundle({ type: "otp", user, bundle }); - }, - connectedJwt: (user, bundle) => { - this.setSessionWithUserAndBundle({ type: "custom-jwt", user, bundle }); - }, - disconnected: () => this.clearSession(), - }; - - for (const [event, listener] of Object.entries(listeners)) { - if (listener) { - this.client.on(event as AlchemySignerClientEvent, listener); - } - } - - // sync local state if persisted state has changed from another tab - // only do this in the browser - // Add a try catch to prevent potential crashes in non-browser environments - try { - if ( - typeof window !== "undefined" && - typeof window.addEventListener !== "undefined" - ) { - window.addEventListener("focus", () => { - const oldSession = this.store.getState().session; - this.store.persist.rehydrate(); - const newSession = this.store.getState().session; - if ( - (oldSession?.expirationDateMs ?? 0) < Date.now() || - oldSession?.user.orgId !== newSession?.user.orgId || - oldSession?.user.userId !== newSession?.user.userId - ) { - // Initialize if the user has changed. - this.initialize(); - } - }); - } - } catch (e) { - console.error("Error registering event listeners", e); - } - }; - - private registerSessionExpirationHandler = (session: Session) => { - if (this.clearSessionHandle) { - clearTimeout(this.clearSessionHandle); - } - - this.clearSessionHandle = setTimeout( - () => { - this.client.disconnect(); - this.clearSession(); - }, - Math.min(session.expirationDateMs - Date.now(), Math.pow(2, 31) - 1), - ); - }; - - private setSessionWithUserAndBundle = ({ - type, - user, - bundle, - }: { - type: "email" | "oauth" | "otp" | "custom-jwt"; - user: User; - bundle: string; - }) => { - const existingSession = this.getSession(); - if ( - existingSession != null && - existingSession.type === type && - existingSession.user.userId === user.userId && - // if the bundle is different, then we've refreshed the session - // so we need to reset the session - existingSession.bundle === bundle - ) { - return; - } - - this.setSession({ type, user, bundle }); - }; -} diff --git a/account-kit/signer/src/session/types.ts b/account-kit/signer/src/session/types.ts deleted file mode 100644 index 2ef55cccdf..0000000000 --- a/account-kit/signer/src/session/types.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { User } from "../client/types"; - -export type Session = - | { - type: "email" | "oauth" | "otp" | "custom-jwt"; - bundle: string; - expirationDateMs: number; - user: User; - } - | { type: "passkey"; user: User; expirationDateMs: number }; - -export type SessionManagerEvents = { - connected(session: Session): void; - disconnected(): void; - initialized(): void; -}; diff --git a/account-kit/signer/src/signer.ts b/account-kit/signer/src/signer.ts deleted file mode 100644 index 348e351028..0000000000 --- a/account-kit/signer/src/signer.ts +++ /dev/null @@ -1,314 +0,0 @@ -import { z } from "zod"; -import { BaseAlchemySigner } from "./base.js"; -import { - AlchemySignerClientParamsSchema, - AlchemySignerWebClient, -} from "./client/index.js"; -import type { - AuthLinkingPrompt, - CredentialCreationOptionOverrides, - VerifyMfaParams, -} from "./client/types.js"; -import { SessionManagerParamsSchema } from "./session/manager.js"; - -export type AccessKeyAuthParams = { - accessKey: string; - accountId?: string; -}; - -export type AuthParams = - | { - type: "email"; - email: string; - /** @deprecated This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. */ - emailMode?: "magicLink" | "otp"; - redirectParams?: URLSearchParams; - multiFactors?: VerifyMfaParams[]; - } - | { type: "email"; bundle: string; orgId?: string; isNewUser?: boolean } - | { - type: "sms"; - phone: string; - } - | { - type: "passkey"; - email: string; - creationOpts?: CredentialCreationOptionOverrides; - } - | { - type: "passkey"; - createNew: false; - } - | { - type: "passkey"; - createNew: true; - username: string; - creationOpts?: CredentialCreationOptionOverrides; - } - | ({ - type: "oauth"; - scope?: string; - claims?: string; - otherParameters?: Record; - } & OauthProviderConfig & - OauthRedirectConfig) - | { - type: "oauthReturn"; - bundle: string; - orgId: string; - idToken: string; - accessToken?: string; - isNewUser?: boolean; - } - | { - type: "custom-jwt"; - jwt: string; - authProviderId?: string; - } - | { - type: "otp"; - otpCode: string; - multiFactors?: VerifyMfaParams[]; - } - | ({ type: "accessKey" } & AccessKeyAuthParams); - -export type OauthProviderConfig = - | { - authProviderId: "auth0"; - isCustomProvider?: false; - auth0Connection?: string; - } - | { - authProviderId: KnownAuthProvider; - isCustomProvider?: false; - auth0Connection?: never; - } - | { - authProviderId: string; - isCustomProvider: true; - auth0Connection?: never; - }; - -export type OauthRedirectConfig = - | { mode: "redirect"; redirectUrl: string } - | { mode: "popup"; redirectUrl?: never }; - -export type KnownAuthProvider = - | "google" - | "apple" - | "facebook" - | "twitch" - | "auth0"; - -export type OauthMode = "redirect" | "popup"; - -export const AlchemySignerParamsSchema = z - .object({ - client: z - .custom() - .or(AlchemySignerClientParamsSchema), - }) - .extend({ - sessionConfig: SessionManagerParamsSchema.omit({ - client: true, - }).optional(), - }); - -export type AlchemySignerParams = z.input; - -/** - * A SmartAccountSigner that can be used with any SmartContractAccount - */ -export class AlchemyWebSigner extends BaseAlchemySigner { - private static replaceStateFilterInstalled = false; - /** - * Initializes an instance with the provided Alchemy signer parameters after parsing them with a schema. - * - * @example - * ```ts - * import { AlchemyWebSigner } from "@account-kit/signer"; - * - * const signer = new AlchemyWebSigner({ - * client: { - * connection: { - * rpcUrl: "/api/rpc", - * }, - * iframeConfig: { - * iframeContainerId: "alchemy-signer-iframe-container", - * }, - * }, - * }); - * ``` - * - * @param {AlchemySignerParams} params The parameters for the Alchemy signer, including the client and session configuration - */ - - constructor(params: AlchemySignerParams) { - const { sessionConfig, ...params_ } = - AlchemySignerParamsSchema.parse(params); - - let client: AlchemySignerWebClient; - if ("connection" in params_.client) { - client = new AlchemySignerWebClient(params_.client); - } else { - client = params_.client; - } - - const qpStructure = { - emailBundle: "bundle", - // We don't need this, but we still want to remove it from the URL. - emailOrgId: "orgId", - status: "alchemy-status", - oauthBundle: "alchemy-bundle", - oauthOrgId: "alchemy-org-id", - idToken: "alchemy-id-token", - accessToken: "alchemy-access-token", - isSignup: "aa-is-signup", - otpId: "alchemy-otp-id", - email: "alchemy-email", - authProvider: "alchemy-auth-provider", - oauthError: "alchemy-error", - }; - - const { - emailBundle, - status, - oauthBundle, - oauthOrgId, - idToken, - accessToken, - isSignup, - otpId, - email, - authProvider, - oauthError, - } = getAndRemoveQueryParams(qpStructure); - - if (!AlchemyWebSigner.replaceStateFilterInstalled) { - installReplaceStateFilter(Object.values(qpStructure)); - AlchemyWebSigner.replaceStateFilterInstalled = true; - } - - const initialError = - oauthError != null - ? { name: "OauthError", message: oauthError } - : undefined; - - const initialAuthLinkingPrompt: AuthLinkingPrompt | undefined = (() => { - if (status !== "ACCOUNT_LINKING_CONFIRMATION_REQUIRED") { - return undefined; - } - if ( - idToken == null || - email == null || - authProvider == null || - otpId == null || - oauthOrgId == null - ) { - console.error("Missing required query params for auth linking prompt"); - return undefined; - } - return { - status, - idToken, - accessToken, - email, - providerName: authProvider, - otpId, - orgId: oauthOrgId, - }; - })(); - - super({ client, sessionConfig, initialError, initialAuthLinkingPrompt }); - - const isNewUser = isSignup === "true"; - - this.signerType = "alchemy-signer"; - - if (emailBundle) { - this.authenticate({ - type: "email", - bundle: emailBundle, - isNewUser, - }); - } else if (oauthBundle && oauthOrgId && idToken) { - this.authenticate({ - type: "oauthReturn", - bundle: oauthBundle, - orgId: oauthOrgId, - idToken, - accessToken, - isNewUser, - }); - } - } -} - -/** - * Overrides `window.history.replaceState` to remove the specified query params from target URLs. - * - * @param {string[]} qpToRemove The query params to remove from target URLs. - */ -function installReplaceStateFilter(qpToRemove: string[]) { - const originalReplaceState = window.history.replaceState; - - const processUrl = (src: string | URL | undefined | null) => { - if (!src) { - return src; - } - - try { - const url = new URL(src, document.baseURI); - const originalSearch = url.search; - - qpToRemove.forEach((qp) => url.searchParams.delete(qp)); - if (originalSearch === url.search) return src; - - console.log("[Alchemy] filtered query params from URL"); - return url; - } catch (e) { - console.log("[Alchemy] failed to process URL in state filter", e); - return src; - } - }; - - window.history.replaceState = function (...args) { - const [state, unused, url] = args; - - const result = originalReplaceState.apply(this, [ - state, - unused, - processUrl(url), - ]); - - return result; - }; - - console.log("[Alchemy] installed window.history.replaceState interceptor"); -} - -/** - * Reads and removes the specified query params from the URL. - * - * @param {T} keys object whose values are the query parameter keys to read and - * remove - * @returns {{ [K in keyof T]: string | undefined }} object with the same keys - * as the input whose values are the values of the query params. - */ -function getAndRemoveQueryParams>( - keys: T, -): { [K in keyof T]: string | undefined } { - const url = new URL(window.location.href); - const result: Record = {}; - let foundQueryParam = false; - for (const [key, param] of Object.entries(keys)) { - const value = url.searchParams.get(param) ?? undefined; - foundQueryParam ||= value != null; - result[key] = value; - url.searchParams.delete(param); - } - if (foundQueryParam) { - window.history.replaceState(window.history.state, "", url.toString()); - } - return result as { [K in keyof T]: string | undefined }; -} diff --git a/account-kit/signer/src/solanaSigner.ts b/account-kit/signer/src/solanaSigner.ts deleted file mode 100644 index 49627d9e7e..0000000000 --- a/account-kit/signer/src/solanaSigner.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { - Connection, - PublicKey, - Transaction, - TransactionInstruction, - TransactionMessage, - VersionedTransaction, -} from "@solana/web3.js"; -import { size, slice, toBytes, toHex, type ByteArray, type Hex } from "viem"; -import type { BaseSignerClient } from "./client/base"; -import { NotAuthenticatedError } from "./errors.js"; -import { createSolanaSponsoredTransaction } from "./utils/solana.js"; - -/** - * The SolanaSigner class is used to sign transactions and messages for the Solana blockchain. - * It provides methods to add signatures to transactions and sign messages. - */ -export class SolanaSigner { - readonly alchemyClient: BaseSignerClient; - public readonly address: string; - - /** - * Constructor for the SolanaSigner class which is a wrapper around the alchemy client, and is more focused on the solana web3 - * - * @param {object} client This is the client that will be used to sign the transaction, and we are just having functions on top of it. - */ - constructor(client: BaseSignerClient) { - this.alchemyClient = client; - if (!client.getUser()) throw new Error("Must be authenticated!"); - - // TODO: also throw here - this.address = client.getUser()!.solanaAddress!; - } - - /** - * Adds a signature of the client user to a transaction - * - * @param {Transaction | VersionedTransaction} transaction - The transaction to add the signature to - * @returns {Promise} The transaction with the signature added - */ - async addSignature( - transaction: Transaction | VersionedTransaction, - ): Promise { - const user = this.alchemyClient.getUser(); - if (!user) { - throw new NotAuthenticatedError(); - } - - if (!user.solanaAddress) { - throw new Error("no solana address"); - } - - const fromKey = new PublicKey(user.solanaAddress); - const messageToSign = this.getMessageToSign(transaction); - const signature = await this.alchemyClient.signRawMessage( - messageToSign, - "SOLANA", - ); - - transaction.addSignature( - fromKey, - Buffer.from(toBytes(this.formatSignatureForSolana(signature))), - ); - return transaction; - } - - /** - * Signs a message - * - * @param {Uint8Array} message - The message to sign - * @returns {Promise} The signature of the message - */ - async signMessage(message: Uint8Array): Promise { - const user = this.alchemyClient.getUser(); - if (!user) { - throw new NotAuthenticatedError(); - } - - if (!user.solanaAddress) { - throw new Error("no solana address"); - } - - const messageToSign = toHex(message); - const signature = await this.alchemyClient.signRawMessage( - messageToSign, - "SOLANA", - ); - - return toBytes(this.formatSignatureForSolana(signature)); - } - - async createTransaction( - instructions: TransactionInstruction[], - connection: Connection, - version?: "versioned", - ): Promise; - async createTransaction( - instructions: TransactionInstruction[], - connection: Connection, - version?: "legacy", - ): Promise; - async createTransaction( - instructions: TransactionInstruction[], - connection: Connection, - ): Promise; - - /** - * Creates a transfer transaction. Used for the SolanaCard example. - * - * @param {TransactionInstruction[]} instructions - The instructions to add to the transaction - * @param {Connection} connection - The connection to use for the transaction - * @param {"versioned" | "legacy"} [version] - The version of the transaction - * @returns {Promise} The transfer transaction - */ - async createTransaction( - instructions: TransactionInstruction[], - connection: Connection, - version?: string, - ): Promise { - const blockhash = (await connection.getLatestBlockhash()).blockhash; - - let transferTransaction; - - if (version === "legacy") { - // Legacy transaction - transferTransaction = instructions.reduce( - (tx, instruction) => tx.add(instruction), - new Transaction(), - ); - - // Get a recent block hash - transferTransaction.recentBlockhash = blockhash; - // Set the signer - transferTransaction.feePayer = new PublicKey(this.address); - } else { - // VersionedTransaction - const txMessage = new TransactionMessage({ - payerKey: new PublicKey(this.address), - recentBlockhash: blockhash, - instructions, - }); - - const versionedTxMessage = txMessage.compileToV0Message(); - transferTransaction = new VersionedTransaction(versionedTxMessage); - } - - return transferTransaction; - } - - /** - * Adds sponsorship to a transaction. Used to have a party like Alchemy pay for the transaction. - * - * @param {TransactionInstruction[]} instructions - The instructions to add to the transaction - * @param {Connection} connection - The connection to use for the transaction - * @param {string} [policyId] - The policy ID to add sponsorship to - * @returns {Promise} The transaction with sponsorship added - */ - async addSponsorship( - instructions: TransactionInstruction[], - connection: Connection, - policyId: string, - ): Promise { - return createSolanaSponsoredTransaction( - instructions, - connection, - policyId, - this.address, - ); - } - - private formatSignatureForSolana(signature: Hex): Hex { - if (size(signature) === 64) return signature; - - return slice(signature, 0, 64); - } - - private getMessageToSign(tx: Transaction | VersionedTransaction): Hex { - let messageToSign; - if (tx instanceof Transaction) { - messageToSign = tx.serializeMessage(); - } else { - messageToSign = Buffer.from(tx.message.serialize()); - } - return toHex(messageToSign); - } -} diff --git a/account-kit/signer/src/types.ts b/account-kit/signer/src/types.ts deleted file mode 100644 index 431455a244..0000000000 --- a/account-kit/signer/src/types.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { User } from "./client/types"; - -export type AlchemySignerEvents = { - connected(user: User): void; - newUserSignup(): void; - disconnected(): void; - statusChanged(status: AlchemySignerStatus): void; - errorChanged(error: ErrorInfo | undefined): void; - mfaStatusChanged(mfaStatus: { - mfaRequired: boolean; - mfaFactorId?: string; - encryptedPayload?: string; - }): void; - emailAuthLinkingRequired(email: string): void; -}; - -export type AlchemySignerEvent = keyof AlchemySignerEvents; - -export enum AlchemySignerStatus { - INITIALIZING = "INITIALIZING", - CONNECTED = "CONNECTED", - DISCONNECTED = "DISCONNECTED", - AUTHENTICATING_PASSKEY = "AUTHENTICATING_PASSKEY", - AUTHENTICATING_EMAIL = "AUTHENTICATING_EMAIL", - AUTHENTICATING_OAUTH = "AUTHENTICATING_OAUTH", - AUTHENTICATING_JWT = "AUTHENTICATING_JWT", - AWAITING_EMAIL_AUTH = "AWAITING_EMAIL_AUTH", - AWAITING_SMS_AUTH = "AWAITING_SMS_AUTH", - AWAITING_OTP_AUTH = "AWAITING_OTP_AUTH", - AWAITING_MFA_AUTH = "AWAITING_MFA_AUTH", -} - -export enum AlchemyMfaStatus { - NOT_REQUIRED = "not_required", - REQUIRED = "required", -} - -export interface ErrorInfo { - name: string; - message: string; -} - -export type ValidateMultiFactorsArgs = { - multiFactorId?: string; - multiFactorCode: string; -}; diff --git a/account-kit/signer/src/utils/base64UrlEncode.ts b/account-kit/signer/src/utils/base64UrlEncode.ts deleted file mode 100644 index 24a66eea51..0000000000 --- a/account-kit/signer/src/utils/base64UrlEncode.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const base64UrlEncode = (challenge: ArrayBuffer): string => { - return Buffer.from(challenge) - .toString("base64") - .replace(/\+/g, "-") - .replace(/\//g, "_") - .replace(/=/g, ""); -}; diff --git a/account-kit/signer/src/utils/generateRandomBuffer.ts b/account-kit/signer/src/utils/generateRandomBuffer.ts deleted file mode 100644 index b9446da088..0000000000 --- a/account-kit/signer/src/utils/generateRandomBuffer.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const generateRandomBuffer = (): ArrayBuffer => { - const arr = new Uint8Array(32); - crypto.getRandomValues(arr); - return arr.buffer; -}; diff --git a/account-kit/signer/src/utils/parseMfaError.ts b/account-kit/signer/src/utils/parseMfaError.ts deleted file mode 100644 index d95f2c83cd..0000000000 --- a/account-kit/signer/src/utils/parseMfaError.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { MfaFactor } from "../client/types.js"; - -export function parseMfaError(error: unknown): MfaFactor[] | null { - if (error instanceof Error) { - try { - const parsed = JSON.parse(error.message); - if (parsed?.data?.multiFactors) { - return parsed.data.multiFactors; - } - } catch { - // ignore JSON parse failures - } - } - return null; -} diff --git a/account-kit/signer/src/utils/resolveRelativeUrl.ts b/account-kit/signer/src/utils/resolveRelativeUrl.ts deleted file mode 100644 index f0006ca4e9..0000000000 --- a/account-kit/signer/src/utils/resolveRelativeUrl.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function resolveRelativeUrl(url: string): string { - // Funny trick. - const a = document.createElement("a"); - a.href = url; - return a.href; -} diff --git a/account-kit/signer/src/utils/solana.ts b/account-kit/signer/src/utils/solana.ts deleted file mode 100644 index ffcc956edb..0000000000 --- a/account-kit/signer/src/utils/solana.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type { TransactionInstruction } from "@solana/web3.js"; -import { - Connection, - PublicKey, - TransactionMessage, - VersionedTransaction, -} from "@solana/web3.js"; - -/** - * This function wraps instructions in a sponsored transaction using Alchemy's fee payer service - * - * @param {TransactionInstruction[]} instructions - The instructions to add sponsorship to - * @param {Connection} connection - The connection to use - * @param {string} policyId - The policy id to use - * @param {string} address - The address to use - * @returns {Promise} - The sponsored transaction - */ -export async function createSolanaSponsoredTransaction( - instructions: TransactionInstruction[], - connection: Connection, - policyId: string, - address: string, -): Promise { - const { blockhash } = await connection.getLatestBlockhash({ - commitment: "finalized", - }); - const message = new TransactionMessage({ - // Right now the backend will rewrite this payer Key to the server's address - payerKey: new PublicKey(address), - recentBlockhash: blockhash, - instructions, - }).compileToV0Message(); - const versionedTransaction = new VersionedTransaction(message); - const serializedTransaction = Buffer.from( - versionedTransaction.serialize(), - ).toString("base64"); - const body = JSON.stringify({ - id: crypto?.randomUUID() ?? Math.floor(Math.random() * 1000000), - jsonrpc: "2.0", - method: "alchemy_requestFeePayer", - params: [ - { - policyId, - serializedTransaction, - }, - ], - }); - const options = { - method: "POST", - headers: { - accept: "application/json", - "content-type": "application/json", - }, - body, - }; - - const response = await fetch( - // TODO: Use the connection?? - connection.rpcEndpoint, - options, - ); - const jsonResponse = await response.json(); - if (!jsonResponse?.result?.serializedTransaction) - throw new Error( - `Response doesn't include the serializedTransaction ${JSON.stringify( - jsonResponse, - )}`, - ); - return VersionedTransaction.deserialize( - decodeBase64(jsonResponse.result.serializedTransaction), - ); -} - -/** - * Creates a regular (non-sponsored) Solana transaction from instructions - * - * @param {TransactionInstruction[]} instructions - The instructions to create transaction from - * @param {Connection} connection - The connection to use - * @param {string} address - The payer address - * @returns {Promise} - The transaction - */ -export async function createSolanaTransaction( - instructions: TransactionInstruction[], - connection: Connection, - address: string, -): Promise { - const { blockhash } = await connection.getLatestBlockhash({ - commitment: "finalized", - }); - const message = new TransactionMessage({ - payerKey: new PublicKey(address), - recentBlockhash: blockhash, - instructions, - }).compileToV0Message(); - return new VersionedTransaction(message); -} - -function decodeBase64(serializedTransaction: string): Uint8Array { - return Buffer.from(serializedTransaction, "base64"); -} diff --git a/account-kit/signer/src/utils/typeAssertions.ts b/account-kit/signer/src/utils/typeAssertions.ts deleted file mode 100644 index b2364542ed..0000000000 --- a/account-kit/signer/src/utils/typeAssertions.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function assertNever(_: never, message: string): never { - throw new Error(message); -} diff --git a/account-kit/signer/src/version.ts b/account-kit/signer/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/signer/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/signer/test/base.test.ts b/account-kit/signer/test/base.test.ts deleted file mode 100644 index 028323c2f0..0000000000 --- a/account-kit/signer/test/base.test.ts +++ /dev/null @@ -1,295 +0,0 @@ -// test/base.test.ts -import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; -import { NotAuthenticatedError, MfaRequiredError } from "../src/errors.js"; -import { BaseAlchemySigner } from "../src/base.js"; -import { AlchemySignerStatus } from "../src/types.js"; -import type { MfaFactor } from "../src/client/types.js"; - -import { MockAlchemySignerWebClient } from "./mocks/MockAlchemySignerWebClient.js"; -import { - FAKE_USER, - FAKE_TOTP_FACTOR, - OTP_USER, - MFA_USER, - TOTP_FACTOR_WITH_CODE, - EMAIL_AUTH_RESPONSE, - EMAIL_OTP_RESPONSE, - EMAIL_OTP_WITH_MFA_RESPONSE, - OTP_BUNDLE_RESPONSE, - OTP_MFA_BUNDLE_RESPONSE, - MOCK_BUNDLE_STRING, - TEST_EMAILS, - TEST_CODES, - TEST_DELAYS, -} from "./fixtures.js"; - -class TestAlchemySigner extends BaseAlchemySigner {} - -describe("BaseAlchemySigner Integration Tests (MFA scenarios)", () => { - let mockClient: MockAlchemySignerWebClient; - let signer: TestAlchemySigner; - - // Helper function to wait for session manager initialization - const waitForSessionInitialization = async (): Promise => { - return new Promise((resolve) => { - const off = signer["sessionManager"].on("initialized", () => { - off(); - resolve(); - }); - }); - }; - - // Helper function to wait for microtasks to complete - const waitForMicrotasks = async (): Promise => { - return new Promise((resolve) => setTimeout(resolve, TEST_DELAYS.MICROTASK)); - }; - - // Helper to emit client event after a delay - const emitClientEventAfterDelay = async ( - event: string, - user: any, - bundle?: string, - delay = TEST_DELAYS.CLIENT_EVENT_STANDARD, - ): Promise => { - await new Promise((resolve) => setTimeout(resolve, delay)); - if (bundle) { - mockClient.emitClientEvent(event as any, user, bundle); - } else { - mockClient.emitClientEvent(event as any, user); - } - }; - - beforeEach(async () => { - // Mock the document.getElementById method - vi.spyOn(document, "getElementById").mockImplementation((id: string) => { - if (id === "test-container") { - return document.createElement("div"); - } - return null; - }); - - // Create our mock client & signer - mockClient = new MockAlchemySignerWebClient({ - connection: { rpcUrl: "http://localhost/mock-rpc" }, - iframeConfig: { iframeContainerId: "test-container" }, - }); - - signer = new TestAlchemySigner({ - client: mockClient, - sessionConfig: { - expirationTimeMs: 10_000, // 10s for test - }, - }); - - // Wait for session manager to finish initialization - await waitForSessionInitialization(); - }); - - afterEach(() => { - vi.restoreAllMocks(); - }); - - it("scenario #1: Email + Magic Link => require TOTP on next call", async () => { - const multiFactors: MfaFactor[] = [FAKE_TOTP_FACTOR]; - // Mock the initEmailAuth call to throw MfaRequiredError first time - const mfaError = new MfaRequiredError(multiFactors); - mockClient.mock_initEmailAuth.mockRejectedValueOnce(mfaError); - - // Attempt to authenticate with magicLink - await expect( - signer.authenticate({ - type: "email", - email: TEST_EMAILS.BASIC, - emailMode: "magicLink", - }), - ).rejects.toThrowError("MFA is required for this user"); - - // The status should now be DISCONNECTED (the test user flow ended in an error) - expect(signer["store"].getState().status).toBe( - AlchemySignerStatus.DISCONNECTED, - ); - - // Step 2: now pass in TOTP codes - // We mock the second time initEmailAuth is called to succeed - mockClient.mock_initEmailAuth.mockResolvedValue(EMAIL_AUTH_RESPONSE); - - // Suppose the final call to completeAuthWithBundle is successful - mockClient.mock_completeAuthWithBundle.mockResolvedValue(FAKE_USER); - - // Now we do a second authenticate call with the TOTP codes included - const authPromise = signer.authenticate({ - type: "email", - email: TEST_EMAILS.BASIC, - multiFactors: [TOTP_FACTOR_WITH_CODE], - }); - - // Emit client event after delay - await emitClientEventAfterDelay( - "connectedEmail", - FAKE_USER, - MOCK_BUNDLE_STRING, - ); - - const finalUser = await authPromise; - expect(finalUser).toEqual(FAKE_USER); - expect(signer["store"].getState().status).toBe( - AlchemySignerStatus.CONNECTED, - ); - }); - - it("scenario #2: Email + OTP => second call with {type: 'otp'}", async () => { - // Step 1: The user calls authenticate() with type=email & emailMode=otp - mockClient.mock_initEmailAuth.mockResolvedValue(EMAIL_OTP_RESPONSE); - - // This returns a promise that won't resolve until the user eventually becomes connected, - // or the test forcibly resolves, etc. - const firstAuth = signer.authenticate({ - type: "email", - email: TEST_EMAILS.OTP, - emailMode: "otp", - }); - - // Wait for internal .initEmailAuth(...) to finish and update store - await waitForMicrotasks(); - - // Now the store should have updated - expect(signer["store"].getState().status).toBe( - AlchemySignerStatus.AWAITING_EMAIL_AUTH, - ); - expect(signer["store"].getState().otpId).toBe("otp-123"); - - // Step 2: The user calls authenticate again with type="otp" - mockClient.mock_submitOtpCode.mockResolvedValue(OTP_BUNDLE_RESPONSE); - mockClient.mock_completeAuthWithBundle.mockResolvedValue(OTP_USER); - - // Start the OTP authenticate - const otpPromise = signer.authenticate({ - type: "otp", - otpCode: TEST_CODES.OTP, - }); - - // Simulate the real client's "connectedOtp" event after sign-in completes - await emitClientEventAfterDelay( - "connectedOtp", - OTP_USER, - OTP_BUNDLE_RESPONSE.bundle, - TEST_DELAYS.CLIENT_EVENT_SHORT, - ); - - const finalUser = await otpPromise; - expect(finalUser).toEqual(OTP_USER); - - // Wait for store to update - await waitForMicrotasks(); - - expect(signer["store"].getState().status).toBe( - AlchemySignerStatus.CONNECTED, - ); - - // Clean up the first authenticate call if it's still pending - await firstAuth.catch(() => null); - }); - - it("scenario #3: Email + OTP + TOTP => server returns encryptedPayload; must call validateMultiFactors with TOTP code", async () => { - // - // STEP 1) Call authenticate({type: "email", emailMode: "otp"}) - // - // Suppose the server sees a user who also has TOTP configured. - // So we still get an otpId, but we know TOTP is also required. - mockClient.mock_initEmailAuth.mockResolvedValue( - EMAIL_OTP_WITH_MFA_RESPONSE, - ); - - // Start the "email" flow - const firstAuth = signer.authenticate({ - type: "email", - email: TEST_EMAILS.MFA, - emailMode: "otp", - }); - - // Wait for store to reflect AWAITING_EMAIL_AUTH - await waitForMicrotasks(); - - // At this point, the signer is waiting for you to supply an OTP code. - expect(signer["store"].getState().status).toBe( - AlchemySignerStatus.AWAITING_EMAIL_AUTH, - ); - - // - // STEP 2) Call authenticate({type: "otp"}) with the OTP code only - // - // The new flow now returns { mfaRequired: true, encryptedPayload, multiFactors } - // if TOTP is needed: - mockClient.mock_submitOtpCode.mockResolvedValue({ - mfaRequired: true, - encryptedPayload: "test-encrypted-payload", - multiFactors: [ - { multiFactorId: "factor-totp-123", multiFactorType: "totp" }, - ], - }); - - // We won't finalize the user in submitOtpCode; we only learn we need TOTP - const secondAuth = signer.authenticate({ - type: "otp", - otpCode: TEST_CODES.OTP, - }); - - // Wait for store to reflect AWAITING_MFA_AUTH - await waitForMicrotasks(); - expect(signer["store"].getState().status).toBe( - AlchemySignerStatus.AWAITING_MFA_AUTH, - ); - - // - // STEP 3) Now we call validateMultiFactors to pass the TOTP code - // - // The server’s new endpoint returns { bundle } once TOTP is validated: - mockClient.mock_validateMultiFactors.mockResolvedValue({ - bundle: OTP_MFA_BUNDLE_RESPONSE.bundle, - }); - - // ... and as soon as we do have a final `bundle`, the client calls - // `completeAuthWithBundle` which returns the final user: - mockClient.mock_completeAuthWithBundle.mockImplementation( - async (params) => { - // Call the real event so the store sees "connectedOtp" - mockClient.emitClientEvent( - params.connectedEventName, - MFA_USER, - params.bundle, - ); - return MFA_USER; - }, - ); - - // So the final step is: - const finalAuth = signer.validateMultiFactors({ - multiFactorId: "factor-totp-123", - multiFactorCode: TEST_CODES.MFA_TOTP, - }); - - // The final call should yield a fully connected user: - const resultUser = await finalAuth; - - // Wait for store to reflect AWAITING_MFA_AUTH - await waitForMicrotasks(); - - expect(resultUser).toEqual(MFA_USER); - expect(signer["store"].getState().status).toBe( - AlchemySignerStatus.CONNECTED, - ); - - // If you like, also check that the first or second `authenticate()` calls - // eventually end up returning the same user (which in practice they do - // once finalAuth is complete): - await expect(firstAuth).resolves.toEqual(MFA_USER); - await expect(secondAuth).resolves.toEqual(MFA_USER); - }); - - it("throws if we call signMessage without being authenticated", async () => { - // By default, the signer is not connected until authenticate is called. - await expect(signer.signMessage("Hello")).rejects.toThrow( - NotAuthenticatedError, - ); - }); -}); diff --git a/account-kit/signer/test/fixtures.ts b/account-kit/signer/test/fixtures.ts deleted file mode 100644 index cb54bedbf6..0000000000 --- a/account-kit/signer/test/fixtures.ts +++ /dev/null @@ -1,81 +0,0 @@ -// test/fixtures.ts -import type { User, MfaFactor } from "../src/client/types.js"; - -// User objects -export const FAKE_USER: User = { - userId: "user-id-123", - orgId: "mock-org-id", - address: "0xabc123", -}; - -export const OTP_USER: User = { - userId: "user-42", - orgId: "mock-org-id", - address: "0xdef456", -}; - -export const MFA_USER: User = { - userId: "user-mfa-321", - orgId: "mock-org-id", - address: "0x987654", -}; - -// Test constants for commonly used values -export const TEST_EMAILS = { - BASIC: "test@example.com", - OTP: "user@otpflow.com", - MFA: "multi@mfa.com", -}; - -export const TEST_CODES = { - OTP: "999999", - TOTP: "111222", - MFA_TOTP: "999111", -}; - -export const TEST_DELAYS = { - MICROTASK: 0, - CLIENT_EVENT_SHORT: 10, - CLIENT_EVENT_STANDARD: 25, - TIMEOUT: 100, -}; - -// MFA Factors -export const FAKE_TOTP_FACTOR: MfaFactor = { - multiFactorId: "factor-id-123", - multiFactorType: "totp", -}; - -export const TOTP_FACTOR_WITH_CODE = { - multiFactorId: "factor-id-123", - multiFactorCode: "111222", -}; - -// Auth Response Objects -export const EMAIL_AUTH_RESPONSE = { - orgId: "mock-org-id", - multiFactors: undefined, -}; - -export const EMAIL_OTP_RESPONSE = { - orgId: "mock-org-id", - otpId: "otp-123", - multiFactors: [], -}; - -export const EMAIL_OTP_WITH_MFA_RESPONSE = { - orgId: "mock-org-id", - otpId: "otp-xyz", - multiFactors: [{ multiFactorId: "factor-totp-123", multiFactorType: "totp" }], -}; - -// Bundle Responses -export const OTP_BUNDLE_RESPONSE = { - bundle: "mocked-bundle", -}; - -export const OTP_MFA_BUNDLE_RESPONSE = { - bundle: "bundle-with-otp-and-totp", -}; - -export const MOCK_BUNDLE_STRING = "bundle-string"; diff --git a/account-kit/signer/test/mocks/MockAlchemySignerWebClient.ts b/account-kit/signer/test/mocks/MockAlchemySignerWebClient.ts deleted file mode 100644 index ec4c771ef3..0000000000 --- a/account-kit/signer/test/mocks/MockAlchemySignerWebClient.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { vi } from "vitest"; -import { AlchemySignerWebClient } from "../../src/client/index.js"; -import type { User } from "../../src/client/types.js"; -import type { OtpParams } from "../../src/client/types.js"; -import type { AlchemySignerClientEvents } from "../../src/client/types.js"; -import type { AuthenticatingEventMetadata } from "../../src/client/types.js"; - -// Event types for better type safety -type ClientEventMap = { - connectedEmail: [User, string]; // [user, bundle] - connected: [User]; - connectedOtp: [User, string]; // [user, bundle] -}; - -/** - * Mock implementation of AlchemySignerWebClient for testing - * This class intercepts all network calls and allows tests to control responses - */ -class MockAlchemySignerWebClient extends AlchemySignerWebClient { - // Mock function definitions - public mock_initEmailAuth = vi.fn(); - public mock_createAccount = vi.fn(); - public mock_submitOtpCode = vi.fn(); - public mock_completeAuthWithBundle = vi.fn(); - public mock_lookupUserWithPasskey = vi.fn(); - public mock_addMfa = vi.fn(); - public mock_verifyMfa = vi.fn(); - public mock_removeMfa = vi.fn(); - public mock_validateMultiFactors = vi.fn(); - public disconnect = vi.fn(); - - // Authentication method overrides - public override initEmailAuth = async (params: any) => { - return this.mock_initEmailAuth(params); - }; - - public override createAccount = async (params: any) => { - return this.mock_createAccount(params); - }; - - public override submitOtpCode = async ( - params: Omit, - ) => { - if ("otpId" in params && "otpCode" in params) { - const { otpId, otpCode, multiFactors = [] } = params; - return this.mock_submitOtpCode(otpId, otpCode, multiFactors); - } - return this.mock_submitOtpCode(params); - }; - - public override completeAuthWithBundle = async (params: { - bundle: string; - orgId: string; - connectedEventName: keyof AlchemySignerClientEvents; - authenticatingType: AuthenticatingEventMetadata["type"]; - idToken?: string; - }) => { - return this.mock_completeAuthWithBundle(params); - }; - - public override lookupUserWithPasskey = async (params: any) => { - return this.mock_lookupUserWithPasskey(params); - }; - - // MFA method overrides - public override addMfa = async (params: any) => { - return this.mock_addMfa(params); - }; - - public override verifyMfa = async (params: any) => { - return this.mock_verifyMfa(params); - }; - - public override removeMfa = async (params: any) => { - return this.mock_removeMfa(params); - }; - - public override getMfaFactors = async () => { - return { multiFactors: [] }; - }; - - public override validateMultiFactors = async (args: { - encryptedPayload: string; - multiFactors: Array<{ - multiFactorId: string; - multiFactorCode: string; - }>; - }): Promise<{ bundle: string }> => { - const result = this.mock_validateMultiFactors(args); - if (result && typeof result.then === "function") { - return result.then((mockResult: any) => { - return { bundle: mockResult?.bundle || "mock-bundle" }; - }); - } - return { bundle: result?.bundle || "mock-bundle" }; - }; - - // Network-related method overrides - public override lookupUserByEmail = async (_email: string) => { - // Return a mock result so we pretend this user always exists in "mock-org-id" - return { orgId: "mock-org-id" }; - }; - - // Override request() to avoid calling fetch - public override request = vi - .fn() - .mockImplementation(async (route: string, _body: any) => { - // Return mock responses based on the route - if (route === "/v1/signer-config") { - return { email: { mode: "otp" } }; - } - if (route === "/v1/lookup") { - return { orgId: "mock-org-id" }; - } - return {}; - }) as any; - - /** - * Helper to manually emit events from the client's eventEmitter - * This is used by tests to simulate client-side events - * - * @param {K} eventName - The name of the event to emit - * @param {ClientEventMap[K]} args - The arguments to pass to the event listeners - */ - public emitClientEvent( - eventName: K, - ...args: ClientEventMap[K] - ): void { - // Force-cast to call protected eventEmitter - (this.eventEmitter as any).emit(eventName, ...args); - } -} - -export { MockAlchemySignerWebClient }; diff --git a/account-kit/signer/tsconfig.build.json b/account-kit/signer/tsconfig.build.json deleted file mode 100644 index a9532f066c..0000000000 --- a/account-kit/signer/tsconfig.build.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "**/*/*.e2e.test.ts", - "vitest.config.ts", - "vitest.config.e2e.ts" - ], - "include": ["src"], - "compilerOptions": { - "sourceMap": true, - "jsx": "react-jsx" - } -} diff --git a/account-kit/signer/tsconfig.json b/account-kit/signer/tsconfig.json deleted file mode 100644 index ece75e6070..0000000000 --- a/account-kit/signer/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "typescript-template/base.json", - "compilerOptions": { - "jsx": "preserve" - } -} diff --git a/account-kit/signer/typedoc.json b/account-kit/signer/typedoc.json deleted file mode 100644 index 85b76d5183..0000000000 --- a/account-kit/signer/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["src/index.ts"], - "tsconfig": "./tsconfig.build.json", - "plugin": ["typedoc-plugin-markdown"], - "fileExtension": ".mdx" -} diff --git a/account-kit/signer/vitest.config.ts b/account-kit/signer/vitest.config.ts deleted file mode 100644 index e082267bed..0000000000 --- a/account-kit/signer/vitest.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/signer", - environment: "jsdom", - }, - }), -); diff --git a/account-kit/smart-contracts/CHANGELOG.md b/account-kit/smart-contracts/CHANGELOG.md deleted file mode 100644 index ab211c9c82..0000000000 --- a/account-kit/smart-contracts/CHANGELOG.md +++ /dev/null @@ -1,1558 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -### Features - -- implement prepare and format sign on webauthn account ([#2201](https://github.com/alchemyplatform/aa-sdk/issues/2201)) ([46b070e](https://github.com/alchemyplatform/aa-sdk/commit/46b070ec9846aa0a2d4712000dc685f80e5987d8)) - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -### Bug Fixes - -- use case-insensitive address equality check in mav2 7702 check ([#2187](https://github.com/alchemyplatform/aa-sdk/issues/2187)) ([18bf022](https://github.com/alchemyplatform/aa-sdk/commit/18bf022ced4b7ff0eff5b4147ad4eb92cab0532a)) - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -### Bug Fixes - -- reduce rpc calls when using 7702 ([#2155](https://github.com/alchemyplatform/aa-sdk/issues/2155)) ([280ee4b](https://github.com/alchemyplatform/aa-sdk/commit/280ee4bc5f71a3f57492424df526f4313ad5afb1)) - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -### Bug Fixes - -- detect if 7702 account is delgated to unexpected addr ([#2149](https://github.com/alchemyplatform/aa-sdk/issues/2149)) ([16e1a5e](https://github.com/alchemyplatform/aa-sdk/commit/16e1a5e9611a91954d1f60415c45d4b23995e984)) - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -### Bug Fixes - -- support self-call encoding in mav2 with single call ([#2094](https://github.com/alchemyplatform/aa-sdk/issues/2094)) ([6d3151c](https://github.com/alchemyplatform/aa-sdk/commit/6d3151ccb5bd06b39da64babb1b2bda60300fc2f)) - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -### Bug Fixes - -- split infra export to handle optional dependency ([#1860](https://github.com/alchemyplatform/aa-sdk/issues/1860)) ([1953dce](https://github.com/alchemyplatform/aa-sdk/commit/1953dceda6e5d75b6a4a82933d5960d696e3a86e)) - -### Features - -- unpin viem version ([#1851](https://github.com/alchemyplatform/aa-sdk/issues/1851)) ([e387e0e](https://github.com/alchemyplatform/aa-sdk/commit/e387e0ead087b893d315b072c24b3c2725ff86b6)) - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -### Bug Fixes - -- updates webauthn factory address ([#1784](https://github.com/alchemyplatform/aa-sdk/issues/1784)) ([d7d367f](https://github.com/alchemyplatform/aa-sdk/commit/d7d367fe555195b595d66e84eae594826bcb6f9c)) - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -### Features - -- adds new webauthn factory address ([#1780](https://github.com/alchemyplatform/aa-sdk/issues/1780)) ([b343437](https://github.com/alchemyplatform/aa-sdk/commit/b343437a9e4a833c25fed7bc8785a815cbbae0ee)) - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -### Features - -- export sma abi ([#1778](https://github.com/alchemyplatform/aa-sdk/issues/1778)) ([385d92c](https://github.com/alchemyplatform/aa-sdk/commit/385d92cd77e329b2d32071d1d34c788eef2b5d61)) - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -### Features - -- add initial smart wallet client actions ([#1648](https://github.com/alchemyplatform/aa-sdk/issues/1648)) ([a3d8ab2](https://github.com/alchemyplatform/aa-sdk/commit/a3d8ab2f698ca08f62d04423262b3497b46551af)), closes [#1649](https://github.com/alchemyplatform/aa-sdk/issues/1649) [#1733](https://github.com/alchemyplatform/aa-sdk/issues/1733) [#1742](https://github.com/alchemyplatform/aa-sdk/issues/1742) - -# [4.49.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.48.0...v4.49.0) (2025-07-10) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.48.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.47.0...v4.48.0) (2025-07-01) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.46.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.0...v4.46.1) (2025-06-26) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.46.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.45.0...v4.46.0) (2025-06-25) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.45.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.44.0...v4.45.0) (2025-06-24) - -### Features - -- adds webauthn session key support ([#1563](https://github.com/alchemyplatform/aa-sdk/issues/1563)) ([326d660](https://github.com/alchemyplatform/aa-sdk/commit/326d6605a2db8b9a23d81ac95df0374bd8a36572)), closes [#1639](https://github.com/alchemyplatform/aa-sdk/issues/1639) [#1663](https://github.com/alchemyplatform/aa-sdk/issues/1663) [#1654](https://github.com/alchemyplatform/aa-sdk/issues/1654) - -# [4.44.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.1...v4.44.0) (2025-06-23) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.43.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.43.0...v4.43.1) (2025-06-18) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.43.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.42.0...v4.43.0) (2025-06-18) - -### Features - -- add webauthn-p256 to account-kit/smart-contracts + auto-generated ([#1702](https://github.com/alchemyplatform/aa-sdk/issues/1702)) ([06b3c07](https://github.com/alchemyplatform/aa-sdk/commit/06b3c07074baaa05baa5fe765f0190b735920499)) - -# [4.42.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.41.0...v4.42.0) (2025-06-17) - -### Features - -- adds webauthn account support ([#1678](https://github.com/alchemyplatform/aa-sdk/issues/1678)) ([d2f0101](https://github.com/alchemyplatform/aa-sdk/commit/d2f0101900bb1a984b7e9e3d5825363bd4a22f89)), closes [#1639](https://github.com/alchemyplatform/aa-sdk/issues/1639) [#1694](https://github.com/alchemyplatform/aa-sdk/issues/1694) -- allow nonce key overrides by default for non-deployed accounts ([#1683](https://github.com/alchemyplatform/aa-sdk/issues/1683)) ([0eb97cd](https://github.com/alchemyplatform/aa-sdk/commit/0eb97cd2bd264b81b31d29008f831b92b0d58f91)) - -# [4.41.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.40.0...v4.41.0) (2025-06-12) - -### Features - -- create SideBarBuilder to generate Fern sidebar for SDK References ([#1671](https://github.com/alchemyplatform/aa-sdk/issues/1671)) ([c131c86](https://github.com/alchemyplatform/aa-sdk/commit/c131c86eba09b19e59261df341fd605451962083)) - -# [4.40.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.39.0...v4.40.0) (2025-06-06) - -### Features - -- splitting signing methods into prepare and sign ([#1629](https://github.com/alchemyplatform/aa-sdk/issues/1629)) ([8bdb82d](https://github.com/alchemyplatform/aa-sdk/commit/8bdb82d2c563e4b4657a3403ea84dca3b61011d4)) - -# [4.39.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.38.0...v4.39.0) (2025-06-04) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.38.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.37.0...v4.38.0) (2025-06-04) - -### Bug Fixes - -- remove trailing slash from alchemy rpc url ([#1657](https://github.com/alchemyplatform/aa-sdk/issues/1657)) ([60b3a23](https://github.com/alchemyplatform/aa-sdk/commit/60b3a231354a6b1ca1aaf69ee4e3b82f0b4110ea)) - -# [4.37.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.1...v4.37.0) (2025-06-03) - -### Features - -- **rn-signer:** support passkeys in React Native ([#1653](https://github.com/alchemyplatform/aa-sdk/issues/1653)) ([f9ce59c](https://github.com/alchemyplatform/aa-sdk/commit/f9ce59c9874e863e80df8219bfa8d76960bfa82a)) - -## [4.36.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.36.0...v4.36.1) (2025-05-29) - -### Bug Fixes - -- multisig ([#1644](https://github.com/alchemyplatform/aa-sdk/issues/1644)) ([eeb0e14](https://github.com/alchemyplatform/aa-sdk/commit/eeb0e14ea0559d1d113da8840b20c2afa779a5e0)) - -# [4.36.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.1...v4.36.0) (2025-05-29) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.35.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.35.0...v4.35.1) (2025-05-21) - -### Bug Fixes - -- permission builder validation error ([#1630](https://github.com/alchemyplatform/aa-sdk/issues/1630)) ([64f5d92](https://github.com/alchemyplatform/aa-sdk/commit/64f5d9298f7cbeeeeeceb011c873d09df917a826)) -- update packages for dependabot and clear out outdated example ([#1633](https://github.com/alchemyplatform/aa-sdk/issues/1633)) ([d097424](https://github.com/alchemyplatform/aa-sdk/commit/d0974244ec68afdbf4cc3a20ed53aa5a844c5d17)) - -# [4.35.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.1...v4.35.0) (2025-05-19) - -### Reverts - -- undo the retry logic because it's causing issues ([#1628](https://github.com/alchemyplatform/aa-sdk/issues/1628)) ([2da1d37](https://github.com/alchemyplatform/aa-sdk/commit/2da1d37609fae208013a6ffde13e6c1cc14dfa7b)) - -## [4.34.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.34.0...v4.34.1) (2025-05-16) - -### Bug Fixes - -- let outter transport dictate retries ([#1625](https://github.com/alchemyplatform/aa-sdk/issues/1625)) ([6d291bd](https://github.com/alchemyplatform/aa-sdk/commit/6d291bd83e09e0b4e98baf1608e9451d3fba792d)) - -# [4.34.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.33.0...v4.34.0) (2025-05-15) - -### Features - -- local counterfactual address computation for MoLA and MAv2 ([#1622](https://github.com/alchemyplatform/aa-sdk/issues/1622)) ([f4a7cc4](https://github.com/alchemyplatform/aa-sdk/commit/f4a7cc4c2da77827d22bb433123bce57763e25fa)) - -# [4.33.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.32.0...v4.33.0) (2025-05-15) - -### Features - -- compute light account counterfactual address locally ([#1616](https://github.com/alchemyplatform/aa-sdk/issues/1616)) ([dbaa3fa](https://github.com/alchemyplatform/aa-sdk/commit/dbaa3faa7fb0ae59ba5199bfdb73d413eb10fb82)) -- support for latest viem version ([#1619](https://github.com/alchemyplatform/aa-sdk/issues/1619)) ([f894102](https://github.com/alchemyplatform/aa-sdk/commit/f894102e113154e40b2f20ae998922764c628d6e)) - -# [4.32.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.2...v4.32.0) (2025-05-09) - -### Bug Fixes - -- fix error message ([#1595](https://github.com/alchemyplatform/aa-sdk/issues/1595)) ([1d655e0](https://github.com/alchemyplatform/aa-sdk/commit/1d655e067b147f01e7ed1821ff2491275a46aa71)) - -### Features - -- adds WebAuthnValidationModule ([#1572](https://github.com/alchemyplatform/aa-sdk/issues/1572)) ([a236f5f](https://github.com/alchemyplatform/aa-sdk/commit/a236f5ff874f466f836edee5383d43b0b156c764)) - -## [4.31.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.1...v4.31.2) (2025-05-06) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.31.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.31.0...v4.31.1) (2025-05-05) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.31.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.30.0...v4.31.0) (2025-05-02) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.30.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.29.0...v4.30.0) (2025-04-28) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.29.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.3...v4.29.0) (2025-04-25) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.28.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.2...v4.28.3) (2025-04-25) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.28.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.1...v4.28.2) (2025-04-23) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.28.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.28.0...v4.28.1) (2025-04-23) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.28.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.27.0...v4.28.0) (2025-04-22) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.27.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.26.0...v4.27.0) (2025-04-18) - -### Features - -- create common base error for permission builder errors ([#1546](https://github.com/alchemyplatform/aa-sdk/issues/1546)) ([15fdae8](https://github.com/alchemyplatform/aa-sdk/commit/15fdae888f0618d040dd64c1347931bd73000115)) - -# [4.26.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.1...v4.26.0) (2025-04-11) - -### Bug Fixes - -- sending multiple uos with deferred action ([#1529](https://github.com/alchemyplatform/aa-sdk/issues/1529)) ([3446821](https://github.com/alchemyplatform/aa-sdk/commit/3446821f728509223e297950198605c2d7a16b38)) - -### Features - -- remove execute and executebatch from account functions ([#1537](https://github.com/alchemyplatform/aa-sdk/issues/1537)) ([30c84d4](https://github.com/alchemyplatform/aa-sdk/commit/30c84d4b72520ab33eb7672f0a5943c261525a10)) - -## [4.25.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.25.0...v4.25.1) (2025-04-09) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.25.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.24.0...v4.25.0) (2025-04-08) - -### Features - -- add parsing utility, removing deferred action mode from accounts ([#1522](https://github.com/alchemyplatform/aa-sdk/issues/1522)) ([64fa835](https://github.com/alchemyplatform/aa-sdk/commit/64fa835b0976b19c7f822206549d905859155f09)) - -# [4.24.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.1...v4.24.0) (2025-04-07) - -### Features - -- create workflow for generating previews and publishing docs using fern ([#1500](https://github.com/alchemyplatform/aa-sdk/issues/1500)) ([d9ed6bd](https://github.com/alchemyplatform/aa-sdk/commit/d9ed6bd2ed2b3a0f382819bfac6ea5fb3c142f1c)) -- permissions abstractions ([#1506](https://github.com/alchemyplatform/aa-sdk/issues/1506)) ([e9ced74](https://github.com/alchemyplatform/aa-sdk/commit/e9ced74ddaf501527f53e60ab48e7ad704e759f8)), closes [#1505](https://github.com/alchemyplatform/aa-sdk/issues/1505) - -## [4.23.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.23.0...v4.23.1) (2025-04-04) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.23.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.22.0...v4.23.0) (2025-04-04) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.22.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.21.0...v4.22.0) (2025-04-03) - -### Features - -- add entity id and nonce reader ([#1487](https://github.com/alchemyplatform/aa-sdk/issues/1487)) ([be94492](https://github.com/alchemyplatform/aa-sdk/commit/be94492586258fe350b69fe58648941e71f0c37b)) -- tracing added for imply and open telemetry ([#1424](https://github.com/alchemyplatform/aa-sdk/issues/1424)) ([1caf63b](https://github.com/alchemyplatform/aa-sdk/commit/1caf63bbe4150b7eb66ee7aef7ccf2e228336ba6)) - -# [4.21.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.1...v4.21.0) (2025-03-31) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.20.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.20.0...v4.20.1) (2025-03-28) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.20.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.19.0...v4.20.0) (2025-03-28) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.19.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.18.0...v4.19.0) (2025-03-25) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.17.0...v4.18.0) (2025-03-25) - -### Features - -- add low-level deferred action support ([#1434](https://github.com/alchemyplatform/aa-sdk/issues/1434)) ([c3616c3](https://github.com/alchemyplatform/aa-sdk/commit/c3616c3ce3bf1a2277fcdb6ddb368f924c6c70aa)) - -# [4.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.16.0...v4.17.0) (2025-03-18) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.3...v4.16.0) (2025-03-12) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.15.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.2...v4.15.3) (2025-03-08) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.15.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.1...v4.15.2) (2025-03-07) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.15.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.15.0...v4.15.1) (2025-03-07) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.15.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.14.0...v4.15.0) (2025-03-06) - -### Bug Fixes - -- time range module tests ([#1379](https://github.com/alchemyplatform/aa-sdk/issues/1379)) ([65b4416](https://github.com/alchemyplatform/aa-sdk/commit/65b441665eafdc224b42862e8b3f748537ff4c8a)) - -### Features - -- add upgrade helpers for ma v2 ([#1382](https://github.com/alchemyplatform/aa-sdk/issues/1382)) ([96d1394](https://github.com/alchemyplatform/aa-sdk/commit/96d13941ec60799a85f9139c7332d1d3bb1b2f71)) - -# [4.14.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.13.0...v4.14.0) (2025-02-27) - -### Bug Fixes - -- update mav2 module tests to use session keys ([#1327](https://github.com/alchemyplatform/aa-sdk/issues/1327)) ([85b563e](https://github.com/alchemyplatform/aa-sdk/commit/85b563e5a8b74c9a5e3744413538c5e134765fe3)) - -### Features - -- eip-7702 ui demo ([#1302](https://github.com/alchemyplatform/aa-sdk/issues/1302)) ([c16b0d5](https://github.com/alchemyplatform/aa-sdk/commit/c16b0d56bacfb4ef410f58021c02e2d6b1818951)), closes [#1294](https://github.com/alchemyplatform/aa-sdk/issues/1294) [#1318](https://github.com/alchemyplatform/aa-sdk/issues/1318) [#1319](https://github.com/alchemyplatform/aa-sdk/issues/1319) [#1346](https://github.com/alchemyplatform/aa-sdk/issues/1346) -- use alchemy_requestGasAndPaymasterAndData when using alchemy paymaster ([#1310](https://github.com/alchemyplatform/aa-sdk/issues/1310)) ([20b80a6](https://github.com/alchemyplatform/aa-sdk/commit/20b80a6bce7b754b7b2e8a64522c2c00e8f5a70c)) - -# [4.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.12.0...v4.13.0) (2025-02-11) - -### Features - -- eip-7702 support in aa-sdk/core, and sma7702 support in account-kit/smart-contracts ([#1287](https://github.com/alchemyplatform/aa-sdk/issues/1287)) ([8d5501f](https://github.com/alchemyplatform/aa-sdk/commit/8d5501f05e898f2711ef382524813a40f0edc999)), closes [#1269](https://github.com/alchemyplatform/aa-sdk/issues/1269) [#1309](https://github.com/alchemyplatform/aa-sdk/issues/1309) [#1314](https://github.com/alchemyplatform/aa-sdk/issues/1314) [#1328](https://github.com/alchemyplatform/aa-sdk/issues/1328) [#1329](https://github.com/alchemyplatform/aa-sdk/issues/1329) [#1335](https://github.com/alchemyplatform/aa-sdk/issues/1335) [#1339](https://github.com/alchemyplatform/aa-sdk/issues/1339) [#1338](https://github.com/alchemyplatform/aa-sdk/issues/1338) - -# [4.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.11.0...v4.12.0) (2025-02-04) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.10.0...v4.11.0) (2025-01-29) - -### Features - -- add OAuth RN Signer docs ([#1286](https://github.com/alchemyplatform/aa-sdk/issues/1286)) ([361b6ac](https://github.com/alchemyplatform/aa-sdk/commit/361b6acb876cf2e04466ba9bd1182e51e0c4d05e)) -- add react native smart accounts docs ([#1293](https://github.com/alchemyplatform/aa-sdk/issues/1293)) ([24cbef1](https://github.com/alchemyplatform/aa-sdk/commit/24cbef1f4d284b01b11202f056e48a5e6ea70f9e)) - -# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13) - -### Features - -- **aa-sdk:** sdk light client can call the alchemy client ([#1236](https://github.com/alchemyplatform/aa-sdk/issues/1236)) ([cd9053b](https://github.com/alchemyplatform/aa-sdk/commit/cd9053ba1b4282eaf315f23065f4b1e877c70555)) -- add alchemy transport update for the mav2 account client ([#1271](https://github.com/alchemyplatform/aa-sdk/issues/1271)) ([71089c4](https://github.com/alchemyplatform/aa-sdk/commit/71089c45e9e04be87887c048405d2928dda0b7a5)) -- **client:** multi account light and alchemy consolidation ([#1264](https://github.com/alchemyplatform/aa-sdk/issues/1264)) ([18a9228](https://github.com/alchemyplatform/aa-sdk/commit/18a922830f5cfcfbed4bf12d064bdf4699e29c6c)) - -# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08) - -### Bug Fixes - -- correctly trim implementation address ([#1261](https://github.com/alchemyplatform/aa-sdk/issues/1261)) ([5dae940](https://github.com/alchemyplatform/aa-sdk/commit/5dae940eee1c776b54804a9aac8d46fe51e89d19)) -- lost changes from other PRs ([#1259](https://github.com/alchemyplatform/aa-sdk/issues/1259)) ([6546664](https://github.com/alchemyplatform/aa-sdk/commit/6546664887a45e8b25745a3cac539cde9473e4bf)) - -### Features - -- basic ma v2 sdk integrations ([#1220](https://github.com/alchemyplatform/aa-sdk/issues/1220)) ([e513d84](https://github.com/alchemyplatform/aa-sdk/commit/e513d84406acb9dcc72d30a12dce4fbd15adeab8)), closes [#1221](https://github.com/alchemyplatform/aa-sdk/issues/1221) [#1223](https://github.com/alchemyplatform/aa-sdk/issues/1223) [#1232](https://github.com/alchemyplatform/aa-sdk/issues/1232) [#1233](https://github.com/alchemyplatform/aa-sdk/issues/1233) [#1246](https://github.com/alchemyplatform/aa-sdk/issues/1246) - -# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.0...v4.6.1) (2024-12-10) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.1...v4.6.0) (2024-12-03) - -### Features - -- **rn:** add alpha react native signer impl ([#1128](https://github.com/alchemyplatform/aa-sdk/issues/1128)) ([d87499e](https://github.com/alchemyplatform/aa-sdk/commit/d87499ee609e427def7abb6b02d565292d85c3cd)), closes [#1159](https://github.com/alchemyplatform/aa-sdk/issues/1159) [#1152](https://github.com/alchemyplatform/aa-sdk/issues/1152) [#1161](https://github.com/alchemyplatform/aa-sdk/issues/1161) [#1171](https://github.com/alchemyplatform/aa-sdk/issues/1171) - -## [4.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.5.0...v4.5.1) (2024-11-22) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.1...v4.5.0) (2024-11-18) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.4.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.4.0...v4.4.1) (2024-11-14) - -### Bug Fixes - -- **signer:** passkey sessions were being wiped by oauth prep ([#1154](https://github.com/alchemyplatform/aa-sdk/issues/1154)) ([9f0543f](https://github.com/alchemyplatform/aa-sdk/commit/9f0543f0dc3a6a67c725921389778873923ead6c)) - -# [4.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.1...v4.4.0) (2024-11-13) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.3.0...v4.3.1) (2024-11-07) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.2.0...v4.3.0) (2024-11-05) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.1...v4.2.0) (2024-10-29) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.1.0...v4.1.1) (2024-10-24) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.1...v4.1.0) (2024-10-23) - -**Note:** Version bump only for package @account-kit/smart-contracts - -## [4.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0...v4.0.1) (2024-10-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.10...v4.0.0) (2024-10-15) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.9...v4.0.0-beta.10) (2024-10-15) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.9](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.8...v4.0.0-beta.9) (2024-10-09) - -### Features - -- add dialog sheet for bottom sheet on mobile ([#1002](https://github.com/alchemyplatform/aa-sdk/issues/1002)) ([566b206](https://github.com/alchemyplatform/aa-sdk/commit/566b20644de425710dcdb6e8871c331016c5fd96)) - -# [4.0.0-beta.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.7...v4.0.0-beta.8) (2024-10-02) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.6...v4.0.0-beta.7) (2024-09-27) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.5...v4.0.0-beta.6) (2024-09-18) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.4...v4.0.0-beta.5) (2024-09-18) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.3...v4.0.0-beta.4) (2024-09-18) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.3](https://github.com/alchemyplatform/aa-sdk/compare/v0.0.0...v4.0.0-beta.3) (2024-09-16) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2024-09-06) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2024-09-04) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-beta.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-beta.0) (2024-08-28) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([0d094e8](https://github.com/alchemyplatform/aa-sdk/commit/0d094e870c1a0ceb5f8d1c862f4109e32de46097)) -- yarn.lock had wrong versions of alpha packages ([fb3ae94](https://github.com/alchemyplatform/aa-sdk/commit/fb3ae946cb37dbeb9d358de07adc64b0f14f269c)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([02f2f16](https://github.com/alchemyplatform/aa-sdk/commit/02f2f1623803480b8dc496491d2232c6fe5c219c)) -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([073e8f6](https://github.com/alchemyplatform/aa-sdk/commit/073e8f6caacf7360fa7a352e2feab6db3b2a7ba1)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([55e6632](https://github.com/alchemyplatform/aa-sdk/commit/55e663208aae63e6092cbf2335c58f1448bd0dc3)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([1385441](https://github.com/alchemyplatform/aa-sdk/commit/1385441095b559ef506d5b4ae429ada5cc84be0e)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([4a30808](https://github.com/alchemyplatform/aa-sdk/commit/4a30808fb6df51a59be861dab523dbd45badf26a)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([593e84c](https://github.com/alchemyplatform/aa-sdk/commit/593e84c027a697b757e3fd954564ff40cd1e11b0)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/plugingen has been moved to @account-kit/plugingen -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.11...v4.0.0-alpha.12) (2024-08-20) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.19.0...v4.0.0-alpha.11) (2024-08-16) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([0d09472](https://github.com/alchemyplatform/aa-sdk/commit/0d09472d5cf4a32864272a4f524d630f50a4a1ab)) -- yarn.lock had wrong versions of alpha packages ([099fa72](https://github.com/alchemyplatform/aa-sdk/commit/099fa721a9969bd83540f57fd8d34f6ac252ace1)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([b643981](https://github.com/alchemyplatform/aa-sdk/commit/b643981e900d9cabf6e273b5f7e9e75cd0c32c7d)) -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([b7af7eb](https://github.com/alchemyplatform/aa-sdk/commit/b7af7ebd634301b5e8640aacd420e5e95dde1fe7)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cb9d92](https://github.com/alchemyplatform/aa-sdk/commit/9cb9d9283db899d5a2f632767993c04135eb1de8)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([cb59787](https://github.com/alchemyplatform/aa-sdk/commit/cb597879a01179a24b919650ba19c1bba0da6e1d)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([23bcd22](https://github.com/alchemyplatform/aa-sdk/commit/23bcd225b434b55061d72ea622bdba2e85237ec9)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([45582b1](https://github.com/alchemyplatform/aa-sdk/commit/45582b14e7116903f9b91cdd4bf2bb04de14ffa4)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/plugingen has been moved to @account-kit/plugingen -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.9...v4.0.0-alpha.10) (2024-08-01) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.9) (2024-07-31) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([190e25f](https://github.com/alchemyplatform/aa-sdk/commit/190e25f55e30c8555863601f471e24f0a5122926)) -- yarn.lock had wrong versions of alpha packages ([3c197bc](https://github.com/alchemyplatform/aa-sdk/commit/3c197bc44ebf4d7ad8c58e3c4478e0b5c2beb75b)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([8ef751e](https://github.com/alchemyplatform/aa-sdk/commit/8ef751eab7a2357caaa6d5d63cbc1907e90c39cb)) -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([3e214a0](https://github.com/alchemyplatform/aa-sdk/commit/3e214a0954109079418af5a8e8e0a07c556dfa4f)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([9cf1b77](https://github.com/alchemyplatform/aa-sdk/commit/9cf1b77e2ac738996af258e38879173184805a1c)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([d5c90da](https://github.com/alchemyplatform/aa-sdk/commit/d5c90dafacaf4194050f3c9870be03d44dbdbfea)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([69ea495](https://github.com/alchemyplatform/aa-sdk/commit/69ea495765175da4c74cde31bcd089f6838cfeb4)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c550465](https://github.com/alchemyplatform/aa-sdk/commit/c55046525d790001db4a9a305cade6f0d06ca90b)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/plugingen has been moved to @account-kit/plugingen -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.7...v4.0.0-alpha.8) (2024-07-22) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.6...v4.0.0-alpha.7) (2024-07-19) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.6) (2024-07-18) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([56af31e](https://github.com/alchemyplatform/aa-sdk/commit/56af31eb8580783d884a21d5b8d8d8a1420e1742)) -- yarn.lock had wrong versions of alpha packages ([9d3d37b](https://github.com/alchemyplatform/aa-sdk/commit/9d3d37b8a0edc54b5d815cef00e8c33f98a31ad7)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([3060a05](https://github.com/alchemyplatform/aa-sdk/commit/3060a05e895e6d6fef363276665f0d3d06c161fb)) -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([20fafb1](https://github.com/alchemyplatform/aa-sdk/commit/20fafb1b175b1758713beef2972e1330bf812334)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([22b8183](https://github.com/alchemyplatform/aa-sdk/commit/22b8183ae297648d43594f59578163da6b0ae9bc)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([ae8a272](https://github.com/alchemyplatform/aa-sdk/commit/ae8a2720818ff1505a2424fce5ce154b90b74fd0)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- **aa-sdk/core:** add erc7677 middleware ([#823](https://github.com/alchemyplatform/aa-sdk/issues/823)) ([1a7af53](https://github.com/alchemyplatform/aa-sdk/commit/1a7af533d82e60accc3428cbb699f263a0cef536)) -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([637bb95](https://github.com/alchemyplatform/aa-sdk/commit/637bb953d59bfd931652286dfc73497b0e0e288f)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/plugingen has been moved to @account-kit/plugingen -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-07-11) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-07-10) - -**Note:** Version bump only for package @account-kit/smart-contracts - -# [4.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-07-09) - -### Bug Fixes - -- **core:** the reconnect method was causing an infinite loop ([#808](https://github.com/alchemyplatform/aa-sdk/issues/808)) ([2adddf9](https://github.com/alchemyplatform/aa-sdk/commit/2adddf93775370498cd60e21fccb21f03aa29544)) - -# [4.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.2) (2024-07-08) - -### Bug Fixes - -- yarn.lock had wrong versions of alpha packages ([4a538e6](https://github.com/alchemyplatform/aa-sdk/commit/4a538e68f8e3e79c6b18a487f3d167984f4ce772)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([0601453](https://github.com/alchemyplatform/aa-sdk/commit/060145386572026905f5720866722c5a20c9d7db)) -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([0afdcae](https://github.com/alchemyplatform/aa-sdk/commit/0afdcae4a1c944bf18e002b418d18f09838c5428)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([b2b7cc6](https://github.com/alchemyplatform/aa-sdk/commit/b2b7cc680860f3d416d11b66d626e715fae4cf8b)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -- refactor!: move chain definitions out of aa-sdk core (#772) ([dae2ad0](https://github.com/alchemyplatform/aa-sdk/commit/dae2ad08d863f9d25508e475903e042190aad56f)), closes [#772](https://github.com/alchemyplatform/aa-sdk/issues/772) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([4c0b2f1](https://github.com/alchemyplatform/aa-sdk/commit/4c0b2f19a59272940b3fe40c610c06ad8c49d70e)) - -### BREAKING CHANGES - -- moves the chain definitions out of aa-sdk core and into account-kit/infra -- @alchemy/plugingen has been moved to @account-kit/plugingen -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.1) (2024-06-26) - -### Bug Fixes - -- yarn.lock had wrong versions of alpha packages ([024e9bc](https://github.com/alchemyplatform/aa-sdk/commit/024e9bc5e21297c23fdf65f45817b08d15731e22)) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([9d81aaf](https://github.com/alchemyplatform/aa-sdk/commit/9d81aafe89b2dc49e2ab2c44556c81c3010c1fa2)) -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([09e4f33](https://github.com/alchemyplatform/aa-sdk/commit/09e4f33528f4caf0b51e737663851b71bdaf15eb)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([c92a07f](https://github.com/alchemyplatform/aa-sdk/commit/c92a07fdb39d652fe5c95326d47a929b3b3278ed)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([082d363](https://github.com/alchemyplatform/aa-sdk/commit/082d363923684ae3bc45edf544c8536ff3c42379)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -# [4.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.2...v4.0.0-alpha.0) (2024-06-19) - -### Code Refactoring - -- change the prefix for aa-sdk packages ([#722](https://github.com/alchemyplatform/aa-sdk/issues/722)) ([d2f97c5](https://github.com/alchemyplatform/aa-sdk/commit/d2f97c56fdf63871296dd81b10cbc60b61b34d6c)) -- move plugingen from aa-sdk to account-kit since it depends on smart-contracts ([d90c6f2](https://github.com/alchemyplatform/aa-sdk/commit/d90c6f2834a6356c5dee2403e8fae66b81112ec3)) -- split aa-alchemy into account-kit packages ([#704](https://github.com/alchemyplatform/aa-sdk/issues/704)) ([6c41e22](https://github.com/alchemyplatform/aa-sdk/commit/6c41e22233932ee98c6214f2ffdf3e8f928f880f)), closes [#706](https://github.com/alchemyplatform/aa-sdk/issues/706) - -### Features - -- surface descriptive session key errors ([#718](https://github.com/alchemyplatform/aa-sdk/issues/718)) ([c5465ee](https://github.com/alchemyplatform/aa-sdk/commit/c5465eee5c957afcb02d3e0d82c5821dd7819b5f)) - -### BREAKING CHANGES - -- @alchemy/plugingen has been moved to @account-kit/plugingen -- @alchemy/aa-_ packages have been renamed to @aa-sdk/_ -- this removes the @alchemy/aa-alchemy package in favor of @account-kit/\* -- @alchemy/aa-accounts was deleted in favor of @account-kit/accounts - -- refactor: further rename packages - -## [3.18.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.1...v3.18.2) (2024-06-05) - -**Note:** Version bump only for package @alchemy/aa-accounts - -## [3.18.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.18.0...v3.18.1) (2024-06-04) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.18.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.2...v3.18.0) (2024-06-04) - -### Bug Fixes - -- plugins were missing mainnet config ([#692](https://github.com/alchemyplatform/aa-sdk/issues/692)) ([5f5fad6](https://github.com/alchemyplatform/aa-sdk/commit/5f5fad6bb9e61874dbf4332e4640a665f0d8eed3)) - -## [3.17.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.1...v3.17.2) (2024-05-31) - -### Reverts - -- undo vocs deploy ([#690](https://github.com/alchemyplatform/aa-sdk/issues/690)) ([c7cb350](https://github.com/alchemyplatform/aa-sdk/commit/c7cb350f9786fe10d03c62d61a8d2c9f21d4cdc0)) - -## [3.17.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.17.0...v3.17.1) (2024-05-31) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.17.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.16.2...v3.17.0) (2024-05-29) - -### Features - -- add support for passing in your own storage to session key signer ([#682](https://github.com/alchemyplatform/aa-sdk/issues/682)) ([67474c0](https://github.com/alchemyplatform/aa-sdk/commit/67474c0f224a8e56182cd38a99c6de58dd18229b)) - -# [3.16.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.15.0...v3.16.0) (2024-05-22) - -**Note:** Version bump only for package @alchemy/aa-accounts - -## [3.14.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.14.0...v3.14.1) (2024-05-17) - -### Bug Fixes - -- **light-account:** uo signing should use message raw ([#671](https://github.com/alchemyplatform/aa-sdk/issues/671)) ([89224a8](https://github.com/alchemyplatform/aa-sdk/commit/89224a8e54998726753ca5c6a9a69265859f20b5)) - -## [3.13.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.13.0...v3.13.1) (2024-05-14) - -### Bug Fixes - -- **msca:** fix the generic on getMAInitializationData ([#664](https://github.com/alchemyplatform/aa-sdk/issues/664)) ([9747986](https://github.com/alchemyplatform/aa-sdk/commit/97479862f22a63f3888d8190ccf1693be597df36)) - -# [3.13.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.4...v3.13.0) (2024-05-10) - -### Bug Fixes - -- **light-account:** light account v2 signatures should have sig type ([#663](https://github.com/alchemyplatform/aa-sdk/issues/663)) ([54764a9](https://github.com/alchemyplatform/aa-sdk/commit/54764a9215c4d2213905ba301670316f697a4169)) - -## [3.12.3](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.2...v3.12.3) (2024-05-10) - -### Bug Fixes - -- update light account dummy signature for v2 ([#662](https://github.com/alchemyplatform/aa-sdk/issues/662)) ([5ac35a3](https://github.com/alchemyplatform/aa-sdk/commit/5ac35a3707cb5ade6e0a2b2f2bd8d0b61f5ac1e8)) - -## [3.12.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.1...v3.12.2) (2024-05-09) - -**Note:** Version bump only for package @alchemy/aa-accounts - -## [3.12.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.12.0...v3.12.1) (2024-05-07) - -### Bug Fixes - -- replace fraxTestnet with fraxSepolia ([#642](https://github.com/alchemyplatform/aa-sdk/issues/642)) ([320a15d](https://github.com/alchemyplatform/aa-sdk/commit/320a15d049e9ad6125e9e4102a3fc1ebe8f0dd55)) - -# [3.12.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.1...v3.12.0) (2024-05-02) - -**Note:** Version bump only for package @alchemy/aa-accounts - -## [3.11.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.11.0...v3.11.1) (2024-04-30) - -### Bug Fixes - -- make multisig e2e tests pass ([#615](https://github.com/alchemyplatform/aa-sdk/issues/615)) ([08cf8d8](https://github.com/alchemyplatform/aa-sdk/commit/08cf8d81b3afd7b06c51a3b9fe6a0ee5a0a91d44)) - -# [3.11.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.10.0...v3.11.0) (2024-04-30) - -### Bug Fixes - -- determine entry point version from light account version ([#632](https://github.com/alchemyplatform/aa-sdk/issues/632)) ([7813de0](https://github.com/alchemyplatform/aa-sdk/commit/7813de0630143ce3e4902a98f8e582c418d0050a)) - -### Features - -- use final LightAccount v2 addresses ([#628](https://github.com/alchemyplatform/aa-sdk/issues/628)) ([7539713](https://github.com/alchemyplatform/aa-sdk/commit/7539713ce8e5b5e86c087866d04299f20e21b448)) - -# [3.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0...v3.10.0) (2024-04-29) - -### Features - -- add frax and zora defaults ([#613](https://github.com/alchemyplatform/aa-sdk/issues/613)) ([4950a1d](https://github.com/alchemyplatform/aa-sdk/commit/4950a1df170abcae5a3cc5a32acdb972890d7810)) -- make create light account and multi owner light account to be strong type inferred ([#608](https://github.com/alchemyplatform/aa-sdk/issues/608)) ([f2dd460](https://github.com/alchemyplatform/aa-sdk/commit/f2dd460ca937065dac05fd7d64e8f31c1f8d1a74)) -- remove generic entry point version specification requirement for better devex ([#607](https://github.com/alchemyplatform/aa-sdk/issues/607)) ([f3fb619](https://github.com/alchemyplatform/aa-sdk/commit/f3fb619e3cfb2c3a957a259788ae6ab1c530f3d5)) - -# [3.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.9.0-alpha.4...v3.9.0) (2024-04-24) - -### Features - -- revised LightAccount v2 1271 sigs ([#614](https://github.com/alchemyplatform/aa-sdk/issues/614)) ([378c83b](https://github.com/alchemyplatform/aa-sdk/commit/378c83b68813e7b393f26c5cf7ba46827fc7a7d0)) - -## [3.8.2-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.1) (2024-04-18) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) -- light account v2 entrypoint v7 and multi owner update ([#548](https://github.com/alchemyplatform/aa-sdk/issues/548)) ([5f2f5c9](https://github.com/alchemyplatform/aa-sdk/commit/5f2f5c963ecdeb8c7efadb6eda2f2e9e6187f636)) -- move signUserOperation middleware step out of asyncPipe ([#587](https://github.com/alchemyplatform/aa-sdk/issues/587)) ([2685d14](https://github.com/alchemyplatform/aa-sdk/commit/2685d14bd550eec3fbb2185f22feae7028d484c1)) -- paymaster middleware update per entrypoint v7 user operation ([#580](https://github.com/alchemyplatform/aa-sdk/issues/580)) ([399479a](https://github.com/alchemyplatform/aa-sdk/commit/399479a38d6eaf0ab6d4d46b38f9d0f5a773cbed)) - -## [3.8.2-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.1...v3.8.2-alpha.0) (2024-04-17) - -### Features - -- **entrypoint-0.7:** base - all changes in regards to the EntryPoint v6 & v7 support ([#514](https://github.com/alchemyplatform/aa-sdk/issues/514)) ([6cc692e](https://github.com/alchemyplatform/aa-sdk/commit/6cc692edf2ac20adf310b7a0efd99879b6e6f485)), closes [#549](https://github.com/alchemyplatform/aa-sdk/issues/549) -- light account v2 entrypoint v7 and multi owner update ([#548](https://github.com/alchemyplatform/aa-sdk/issues/548)) ([5f2f5c9](https://github.com/alchemyplatform/aa-sdk/commit/5f2f5c963ecdeb8c7efadb6eda2f2e9e6187f636)) -- paymaster middleware update per entrypoint v7 user operation ([1709533](https://github.com/alchemyplatform/aa-sdk/commit/1709533ba9cd227e2c3c7c9cb848f921bde353f4)) - -## [3.8.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.8.0...v3.8.1) (2024-04-11) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.7.3...v3.8.0) (2024-04-10) - -### Bug Fixes - -- address some of the plugin and session key docs and usability ([#562](https://github.com/alchemyplatform/aa-sdk/issues/562)) ([12c02e9](https://github.com/alchemyplatform/aa-sdk/commit/12c02e97a49651dc452b0920803a4efa0fae2f2e)) - -### Features - -- add alchemy accounts context ([#539](https://github.com/alchemyplatform/aa-sdk/issues/539)) ([f92469e](https://github.com/alchemyplatform/aa-sdk/commit/f92469ee3f1a5bc3e9f8fe72d6067de1f28e24dd)), closes [#561](https://github.com/alchemyplatform/aa-sdk/issues/561) -- **alchemy-signer:** emit events from the alchemy signer on state changes ([#523](https://github.com/alchemyplatform/aa-sdk/issues/523)) ([8880e6d](https://github.com/alchemyplatform/aa-sdk/commit/8880e6d5bb9c98524c726a841fab5019bd6f0049)) -- **multi-sig:** add multisig plugin ([#519](https://github.com/alchemyplatform/aa-sdk/issues/519)) ([0139ef6](https://github.com/alchemyplatform/aa-sdk/commit/0139ef6de9b593dbe239675485a531122da254c4)), closes [#536](https://github.com/alchemyplatform/aa-sdk/issues/536) - -## [3.6.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.6.0...v3.6.1) (2024-03-18) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.6.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.1...v3.6.0) (2024-03-18) - -### Features - -- add polygon amoy default addresses ([#506](https://github.com/alchemyplatform/aa-sdk/issues/506)) ([34f273e](https://github.com/alchemyplatform/aa-sdk/commit/34f273e8b6d89c7c80f9de57e0331090602e776a)) - -## [3.5.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.5.0...v3.5.1) (2024-03-14) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.5.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.4.4...v3.5.0) (2024-03-14) - -### Bug Fixes - -- fix plugingen script for no input param provider function generation ([#509](https://github.com/alchemyplatform/aa-sdk/issues/509)) ([c5f2561](https://github.com/alchemyplatform/aa-sdk/commit/c5f2561755e59a5bb7b6ec1d8b9ec8840a07fb82)) - -### Features - -- **plugins:** make plugingen a cli tool ([#507](https://github.com/alchemyplatform/aa-sdk/issues/507)) ([53ba81d](https://github.com/alchemyplatform/aa-sdk/commit/53ba81d33422bb3f18134c1dd75e68d64f5cc3f0)) - -## [3.4.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.4.1...v3.4.2) (2024-03-08) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.3.0...v3.4.0) (2024-02-29) - -### Features - -- export plugin install and uninstall param type from aa accounts package ([#494](https://github.com/alchemyplatform/aa-sdk/issues/494)) ([749180f](https://github.com/alchemyplatform/aa-sdk/commit/749180f176e7bcb85bbe49b098e04424c07791a9)) - -# [3.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.2.1...v3.3.0) (2024-02-29) - -### Features - -- export Plugin type from aa accounts package ([#493](https://github.com/alchemyplatform/aa-sdk/issues/493)) ([03543fb](https://github.com/alchemyplatform/aa-sdk/commit/03543fb3a5886110b3bad4d792efd5c01045d0a6)) - -## [3.2.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.2.0...v3.2.1) (2024-02-27) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.1.2...v3.2.0) (2024-02-26) - -### Features - -- allow multiple signer addresses to be passed to msca upgrade util ([#489](https://github.com/alchemyplatform/aa-sdk/issues/489)) ([f843302](https://github.com/alchemyplatform/aa-sdk/commit/f8433028aa4363a156e99f2d86729e1a24ac082c)) - -## [3.1.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.1.0...v3.1.1) (2024-02-23) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.1...v3.1.0) (2024-02-23) - -### Features - -- make it easier to upgrade to MA ([#482](https://github.com/alchemyplatform/aa-sdk/issues/482)) ([7f7710a](https://github.com/alchemyplatform/aa-sdk/commit/7f7710accfd088ffc9a5e6c54797d4dc5f038bac)) - -## [3.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0...v3.0.1) (2024-02-21) - -### Bug Fixes - -- doc fixes for light account transfer ownership ([#471](https://github.com/alchemyplatform/aa-sdk/issues/471)) ([7b5a6cd](https://github.com/alchemyplatform/aa-sdk/commit/7b5a6cdc4c6909ecb07793aa3c4fa75196b0584a)) - -# [3.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.13...v3.0.0) (2024-02-21) - -### Bug Fixes - -- ma upgrade data was wrong ([#470](https://github.com/alchemyplatform/aa-sdk/issues/470)) ([68d3ceb](https://github.com/alchemyplatform/aa-sdk/commit/68d3ceb9b04f39bb0c328ac3867f66e668555bfc)) - -# [3.0.0-alpha.13](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.12...v3.0.0-alpha.13) (2024-02-16) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.0.0-alpha.12](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.11...v3.0.0-alpha.12) (2024-02-14) - -### Bug Fixes - -- export the session key ACL type enum ([bd9d75e](https://github.com/alchemyplatform/aa-sdk/commit/bd9d75e0b0b93acdf8e0dce8f461157a0832500b)) - -# [3.0.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.10...v3.0.0-alpha.11) (2024-02-14) - -### Bug Fixes - -- session key extension was missing plugin overrides ([#458](https://github.com/alchemyplatform/aa-sdk/issues/458)) ([dc5536c](https://github.com/alchemyplatform/aa-sdk/commit/dc5536c8565de216d0c1ca16d72ca4bfdefe7147)) - -# [3.0.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.9...v3.0.0-alpha.10) (2024-02-14) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.0.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.8...v3.0.0-alpha.9) (2024-02-13) - -### Features - -- **amoy:** add amoy from viem update ([#448](https://github.com/alchemyplatform/aa-sdk/issues/448)) ([adae84a](https://github.com/alchemyplatform/aa-sdk/commit/adae84add30536676725dbc8805f3436c8ad395e)) - -# [3.0.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.6...v3.0.0-alpha.7) (2024-02-10) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.0.0-alpha.6](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.5...v3.0.0-alpha.6) (2024-02-08) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.0.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.4...v3.0.0-alpha.5) (2024-02-07) - -### Bug Fixes - -- **aa-core:** add back eip-1193 method handling to the client ([#425](https://github.com/alchemyplatform/aa-sdk/issues/425)) ([48b5943](https://github.com/alchemyplatform/aa-sdk/commit/48b594375d64fe832cfb06f1fb3a539da3c7b965)) - -### Features - -- add session key extensions for managing keys ([ac86a97](https://github.com/alchemyplatform/aa-sdk/commit/ac86a97cd22004f55fb76ecf13b808a222daf8ef)) -- update MSCA multi owner factory, msca, and plugins abis and addresses ([#424](https://github.com/alchemyplatform/aa-sdk/issues/424)) ([9a49ac5](https://github.com/alchemyplatform/aa-sdk/commit/9a49ac53f6a4f30ee36f0e430b033e3a21a7562d)) - -# [3.0.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.3...v3.0.0-alpha.4) (2024-02-02) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.0.0-alpha.3](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.2...v3.0.0-alpha.3) (2024-02-02) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [3.0.0-alpha.2](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.1...v3.0.0-alpha.2) (2024-02-01) - -### Bug Fixes - -- session key permissions builder returning 0x ([7577d8c](https://github.com/alchemyplatform/aa-sdk/commit/7577d8ca570965a8857cc8d301c02f76660e453f)) - -# [3.0.0-alpha.1](https://github.com/alchemyplatform/aa-sdk/compare/v3.0.0-alpha.0...v3.0.0-alpha.1) (2024-01-31) - -### Bug Fixes - -- decorators should now correctly respect account hoisting ([86d884e](https://github.com/alchemyplatform/aa-sdk/commit/86d884ed6209d89c688dc4281400f7304b210caa)) - -# [3.0.0-alpha.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.3.1...v3.0.0-alpha.0) (2024-01-30) - -### Bug Fixes - -- add back the alchemy enhanced api actions to alchemy client ([75d1741](https://github.com/alchemyplatform/aa-sdk/commit/75d17411702a0bd8dbae17395af30f19875affb8)) -- allow for dynamic setting of the owner on owned accounts ([df333ee](https://github.com/alchemyplatform/aa-sdk/commit/df333eee355effa2f0c051945d283f0f7b3d0449)) - -### Code Refactoring - -- **aa-alchemy:** migrate aa-alchemy to new viem interfaces ([bf7b49d](https://github.com/alchemyplatform/aa-sdk/commit/bf7b49d631c4d8aaf19a61e98794abd89d87b8e9)) -- **aa-ethers:** refactor aa-ethers to use the viem client and accounts ([6cc2051](https://github.com/alchemyplatform/aa-sdk/commit/6cc20518bf90788f83ac3c9e579b0f4f4de518b1)) - -- refactor(aa-accounts)!: migrate aa-accounts to viem approach ([37a5b48](https://github.com/alchemyplatform/aa-sdk/commit/37a5b489bdd2527dca311787d5585f1dc3a5f05b)) - -### Features - -- hoist account signing methods ([5bcfac8](https://github.com/alchemyplatform/aa-sdk/commit/5bcfac8ddaca6b712d473cbad2cbbd0228827af5)) -- update session key plugindef abi and config ([#382](https://github.com/alchemyplatform/aa-sdk/issues/382)) ([a47978e](https://github.com/alchemyplatform/aa-sdk/commit/a47978e66c11504862aeeaa1d4aeb4be37f1f48d)) - -### BREAKING CHANGES - -- **aa-ethers:** aa-ethers has had some functionality removed and apis changed - -- inputs to the ProviderAdapter now require a SmartAccountClient -- with\* methods have been removed, middleware config now exists - on the SmartAccountClient -- the Account Signer has been updated to take a SmartContractAccount - as input - -- all interfaces now use the new smart account - client and smart account models that match viem more closely -- **aa-alchemy:** all of aa-alchemy now uses viem interfaces in aa-core - -# [2.4.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.3.1...v2.4.0) (2024-01-26) - -### Features - -- update session key plugindef abi and config ([#382](https://github.com/alchemyplatform/aa-sdk/issues/382)) ([a47978e](https://github.com/alchemyplatform/aa-sdk/commit/a47978e66c11504862aeeaa1d4aeb4be37f1f48d)) - -## [2.3.1](https://github.com/alchemyplatform/aa-sdk/compare/v2.3.0...v2.3.1) (2024-01-25) - -### Bug Fixes - -- fix the wrapped signer to work with undeployed accounts ([#381](https://github.com/alchemyplatform/aa-sdk/issues/381)) ([55a3a54](https://github.com/alchemyplatform/aa-sdk/commit/55a3a54b928b7f1f4996f331c6f1c9454a9ac3c8)) -- include generated code for new plugin addresses ([e26143e](https://github.com/alchemyplatform/aa-sdk/commit/e26143e217a84bd36c1a7828665fd81d91b73c9f)) - -# [2.3.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.2.1...v2.3.0) (2024-01-24) - -### Bug Fixes - -- use the latest multi-owner abis ([#375](https://github.com/alchemyplatform/aa-sdk/issues/375)) ([020f024](https://github.com/alchemyplatform/aa-sdk/commit/020f024bb5f393ea17b8ec3b11abce9fb825f758)) - -### Features - -- make the factory address optional when building MA ([#377](https://github.com/alchemyplatform/aa-sdk/issues/377)) ([05a10b2](https://github.com/alchemyplatform/aa-sdk/commit/05a10b246b28030463ece2a12fc6ed38bdbdd567)) - -## [2.2.1](https://github.com/alchemyplatform/aa-sdk/compare/v2.2.0...v2.2.1) (2024-01-23) - -### Bug Fixes - -- fix a couple of the package.jsons ([#374](https://github.com/alchemyplatform/aa-sdk/issues/374)) ([7abbd93](https://github.com/alchemyplatform/aa-sdk/commit/7abbd9366b9ba12377349e475025aa5edfd73255)) - -# [2.2.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.1.0...v2.2.0) (2024-01-22) - -### Features - -- add a factory method for session key accounts ([#369](https://github.com/alchemyplatform/aa-sdk/issues/369)) ([58658ee](https://github.com/alchemyplatform/aa-sdk/commit/58658ee043e767927aa7f031aa2483d4048b964c)) -- add a session key signer to use with executor ([#368](https://github.com/alchemyplatform/aa-sdk/issues/368)) ([e35ed3b](https://github.com/alchemyplatform/aa-sdk/commit/e35ed3b6e0965bf46ab2c6d44e9709f5253715c0)) -- add session key executor ([#367](https://github.com/alchemyplatform/aa-sdk/issues/367)) ([0da4c76](https://github.com/alchemyplatform/aa-sdk/commit/0da4c76a0ef4ebcb7cab4893b6446be3df79c35e)) -- add session key permissions builder for session key plugin ([#366](https://github.com/alchemyplatform/aa-sdk/issues/366)) ([2d7f118](https://github.com/alchemyplatform/aa-sdk/commit/2d7f1182f9f1a36666a2cb06d4a271bab31b1656)) -- add usePluginHook to demo app ([#357](https://github.com/alchemyplatform/aa-sdk/issues/357)) ([036b13b](https://github.com/alchemyplatform/aa-sdk/commit/036b13b250b1b3465dee000a6d5036ca060c2bb4)) -- extended session key plugin implementation ([#372](https://github.com/alchemyplatform/aa-sdk/issues/372)) ([aca0b03](https://github.com/alchemyplatform/aa-sdk/commit/aca0b0363aae802aa3965568b4f8b8d292ce0cf1)) -- plugingen to generate plugin contract abi and get contract helper method ([#358](https://github.com/alchemyplatform/aa-sdk/issues/358)) ([87eea72](https://github.com/alchemyplatform/aa-sdk/commit/87eea723901ba0abedbbd1a832a2934a612a9b79)) - -# [2.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v2.0.1...v2.1.0) (2024-01-12) - -### Bug Fixes - -- **light-account:** encode upgrade had a bug in it when upgrading an existing account ([#364](https://github.com/alchemyplatform/aa-sdk/issues/364)) ([55d6c08](https://github.com/alchemyplatform/aa-sdk/commit/55d6c08fbd794f4d0d091c7bf2c1045952a83989)) - -### Features - -- add the ability to generate install functions for plugins ([#361](https://github.com/alchemyplatform/aa-sdk/issues/361)) ([2bf6615](https://github.com/alchemyplatform/aa-sdk/commit/2bf66152f81a979c5a7405593bf3fbf41bc3e52d)) - -## [2.0.1](https://github.com/alchemyplatform/aa-sdk/compare/v2.0.0...v2.0.1) (2024-01-12) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [2.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v1.2.4...v2.0.0) (2024-01-12) - -### Bug Fixes - -- **msca:** support multiple owners during intialization ([#355](https://github.com/alchemyplatform/aa-sdk/issues/355)) ([f8bd650](https://github.com/alchemyplatform/aa-sdk/commit/f8bd65073c7bdec5c3b32ce9f1938b3bfd587ded)) - -- feat!: update the LightAccount logic for 1271 signatures to match the on-chain impl ([bbe5060](https://github.com/alchemyplatform/aa-sdk/commit/bbe5060c01828e07d7f788485b14c04dacc6cb6f)) - -### Features - -- add upgrade functionality for light account to msca ([#298](https://github.com/alchemyplatform/aa-sdk/issues/298)) ([18f51d9](https://github.com/alchemyplatform/aa-sdk/commit/18f51d9f626b48390a54d88b7ac28c1f162e04f8)) - -### BREAKING CHANGES - -- default LightAccountFactory address has changed - -## 1.2.4 (2024-01-08) - -**Note:** Version bump only for package @alchemy/aa-accounts - -## 1.2.3 (2023-12-22) - -### Features - -- add stringToIndex util function for SmartAccount salt ([#329](https://github.com/alchemyplatform/aa-sdk/issues/329)) ([b34ef9a](https://github.com/alchemyplatform/aa-sdk/commit/b34ef9aa6727986e89a1461dec45955cac9d4365)) -- add prefix for aa-signers signer type ([#325](https://github.com/alchemyplatform/aa-sdk/issues/325)) ([f3b8cc1](https://github.com/alchemyplatform/aa-sdk/commit/f3b8cc1f0553bad51e4f95c3fd80f6aa0199cff2)) -- add terms page to glossary ([#336](https://github.com/alchemyplatform/aa-sdk/issues/336)) ([63b24ec](https://github.com/alchemyplatform/aa-sdk/commit/63b24ecdb3e5e656c173a1523a3e09478d4c074d)) -- add faq page to docs ([#335](https://github.com/alchemyplatform/aa-sdk/issues/335)) ([63092ce](https://github.com/alchemyplatform/aa-sdk/commit/63092ceb45341d422bd3f8c13ebcc539d9cc5001)) -- add aa-signer implementation for lit protocol ([#312](https://github.com/alchemyplatform/aa-sdk/issues/312)) ([b0f8dd5](https://github.com/alchemyplatform/aa-sdk/commit/b0f8dd538728f8a7dd4447da8c88a50179d61f95)) -- add aa-signer implementation for arcana auth ([#319](https://github.com/alchemyplatform/aa-sdk/issues/319)) ([c82dbf7](https://github.com/alchemyplatform/aa-sdk/commit/c82dbf7ad76791e81525740dfe8820bd234c2863)) -- add types to glossary ([#338](https://github.com/alchemyplatform/aa-sdk/issues/338)) ([28ad2b0](https://github.com/alchemyplatform/aa-sdk/commit/28ad2b015e5d0191f77cbdeeb3c071b7ec813fde)) - -## 1.2.2 (2023-12-13) - -### Bug Fixes - -- fix the named export for web3auth ([#330](https://github.com/alchemyplatform/aa-sdk/issues/330)) ([b340f11](https://github.com/alchemyplatform/aa-sdk/commit/b340f115e96ab068f70f8b5ff8316f4724b3ab6d)) - -## 1.2.1 (2023-12-12) - -### Features - -- allow passing raw call data to sendUserOperation ([#272](https://github.com/alchemyplatform/aa-sdk/issues/272) ([26b90b6](https://github.com/alchemyplatform/aa-sdk/commit/26b90b63a998b106130f3c671bb77f977becb45d))) -- add aa-signers package ([#228](https://github.com/alchemyplatform/aa-sdk/issues/228)) ([5fcd322](https://github.com/alchemyplatform/aa-sdk/commit/5fcd3222133205e5b3f86b456309584d848b1fb5)) -- add aa-signer implementation for magic ([#229](https://github.com/alchemyplatform/aa-sdk/issues/229)) ([860d177](https://github.com/alchemyplatform/aa-sdk/commit/860d17778f6ffc6140d07f2fce147eb8993ee985)) -- add aa-signer implementation for web3auth ([#247](https://github.com/alchemyplatform/aa-sdk/issues/247)) ([7d0492b](https://github.com/alchemyplatform/aa-sdk/commit/7d0492b3829b07d18c1488b7d7e0b129e40f7b4c)) -- add aa-signer implementation for turnkey ([#307](https://github.com/alchemyplatform/aa-sdk/issues/307)) ([4fa05e4](https://github.com/alchemyplatform/aa-sdk/commit/4fa05e4ada8c6558e3ce0bd35b157110baba47c9)) -- add aa-signer implementation for fireblocks ([#301](https://github.com/alchemyplatform/aa-sdk/issues/301)) ([40289e6](https://github.com/alchemyplatform/aa-sdk/commit/40289e6c656344ab0cd6c60e6dbc7c11d392d27e)) -- add aa-signer implementation for particle ([#304](https://github.com/alchemyplatform/aa-sdk/issues/304)) ([e049c2c](https://github.com/alchemyplatform/aa-sdk/commit/e049c2caa562089f62614549ac4e7b2c741f93fd)) -- add aa-signer implementation for portal ([#303](https://github.com/alchemyplatform/aa-sdk/issues/303)) ([eb8a0c3](https://github.com/alchemyplatform/aa-sdk/commit/eb8a0c356ba89701d9cc34921cf7812c23791655)) -- add aa-signer implementation for capsule ([#305](https://github.com/alchemyplatform/aa-sdk/issues/305)) ([9d89e99](https://github.com/alchemyplatform/aa-sdk/commit/9d89e99aea12fc4c13f5b4a680167d5687829bfe)) -- add improvements on provider for override user operation fee and gas ([#277](https://github.com/alchemyplatform/aa-sdk/issues/277)) ([258d80e](https://github.com/alchemyplatform/aa-sdk/commit/258d80e64d7aaa7de26f72375b9d58221c95311e)) -- support one-off percentage overrides for user operations ([#289](https://github.com/alchemyplatform/aa-sdk/issues/289)) ([dc979ff](https://github.com/alchemyplatform/aa-sdk/commit/dc979ff111f0a490b08adce9a913466706399afb)) -- add a convenience method to make creating an alchemy provider easier ([#206](https://github.com/alchemyplatform/aa-sdk/issues/206)) ([211b7e0](https://github.com/alchemyplatform/aa-sdk/commit/211b7e0e715b961520dc5baaa4f0d49b647fbd79)) -- add nani smart account implementation ([#306](https://github.com/alchemyplatform/aa-sdk/issues/306)) ([bf7566f](https://github.com/alchemyplatform/aa-sdk/commit/bf7566f2d62ab7ca4ee7fcb4a9df68308fbe5622)) -- improve zod validation parsing ([#299](https://github.com/alchemyplatform/aa-sdk/issues/299)) ([0763a82](https://github.com/alchemyplatform/aa-sdk/commit/0763a82d47f491513bdcf75716c83043f3dbd2be)) -- docs site re-formatting ([#300](https://github.com/alchemyplatform/aa-sdk/issues/300)) ([a1376c4](https://github.com/alchemyplatform/aa-sdk/commit/a1376c4ad38a62517092ebdd8c87557712c4aecc)) -- docs for Dfns Signer ([#313](https://github.com/alchemyplatform/aa-sdk/issues/313)) ([33141b0](https://github.com/alchemyplatform/aa-sdk/commit/33141b08759b89e2c10f56d95a1316098f67fb9c)) -- docs for Arcana Signer ([#318](https://github.com/alchemyplatform/aa-sdk/issues/318)) ([81711d6](https://github.com/alchemyplatform/aa-sdk/commit/81711d6565a089a15eba95bc54c55972b13457e8)) - -# 1.2.0 (2023-11-17) - -### Features - -- make alchemy-sdk an optional dependency on aa-alchemy ([#265](https://github.com/alchemyplatform/aa-sdk/issues/265)) ([a0088b3](https://github.com/alchemyplatform/aa-sdk/commit/a0088b3ecce191ece21f4082a73c4fcae0e2286c)) - -# 1.1.0 (2023-11-14) - -### Features - -- merge development into main for new minor release ([#251](https://github.com/alchemyplatform/aa-sdk/issues/251)) ([ab098ee](https://github.com/alchemyplatform/aa-sdk/commit/ab098ee9ec35e4b1b3c788046168874fb51e4783)) - -# [1.0.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.2.0...v1.0.0) (2023-11-10) - -### Features - -- aa-sdk with native arb sepolia support ([#231](https://github.com/alchemyplatform/aa-sdk/issues/231)) ([7580608](https://github.com/alchemyplatform/aa-sdk/commit/7580608623961155290a3010fb784a14aecd82af)) -- add zod runtime validation for base provider ([#171](https://github.com/alchemyplatform/aa-sdk/issues/171)) ([3032d23](https://github.com/alchemyplatform/aa-sdk/commit/3032d23744f73f703be2b79fae3b6b9ef93dcb5b)) -- entry point address as optional to SmartAccountProvider ([#180](https://github.com/alchemyplatform/aa-sdk/issues/180)) ([4b62df0](https://github.com/alchemyplatform/aa-sdk/commit/4b62df069071d6e0bcaa533b146ecba5baa6d6d8)) -- entry point address as optional to SmartAccountProvider ([#180](https://github.com/alchemyplatform/aa-sdk/issues/180)) ([f5c378b](https://github.com/alchemyplatform/aa-sdk/commit/f5c378ba1cb04bdc1e41c3e6dd0eba1cb6ee7f2c)) -- remove AA_SDK_TESTS_SIGNER_TYPE constant exported from aa-core ([#232](https://github.com/alchemyplatform/aa-sdk/issues/232)) ([883c489](https://github.com/alchemyplatform/aa-sdk/commit/883c489b077d587b6c5b50c44d92b2a00f10e5ac)) -- use alchemy provider, light account for e2e tests ([#209](https://github.com/alchemyplatform/aa-sdk/issues/209)) ([124be68](https://github.com/alchemyplatform/aa-sdk/commit/124be68c5137a3511ec612e814265739e6909e75)) -- remove AA_SDK_TESTS_SIGNER_TYPE constant exported from aa-core ([#232](https://github.com/alchemyplatform/aa-sdk/issues/232)) ([5170a6b](https://github.com/alchemyplatform/aa-sdk/commit/5170a6b689c9834a9a2489f054b767e190fa38f7)) - -# 0.2.0 (2023-11-03) - -### Features - -- merge development into main for new version release ([#207](https://github.com/alchemyplatform/aa-sdk/issues/207)) ([f06fd2a](https://github.com/alchemyplatform/aa-sdk/commit/f06fd2adf5e4aaf90214435d32f9d566d8502099)) - -## 0.1.1 (2023-10-20) - -### Bug Fixes - -- bad deploy script again ([2da8de2](https://github.com/alchemyplatform/aa-sdk/commit/2da8de2f4feb4c82fd454050e66f6203b61bcc2c)) - -# [0.1.0](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.32...v0.1.0) (2023-10-10) - -### Features - -- merge in all of the staged changes to the aa-sdk ([#120](https://github.com/alchemyplatform/aa-sdk/issues/120)) ([7a9effa](https://github.com/alchemyplatform/aa-sdk/commit/7a9effaa07c03a6a50c9cf856b5935e735adae3a)), closes [#1](https://github.com/alchemyplatform/aa-sdk/issues/1) [#2](https://github.com/alchemyplatform/aa-sdk/issues/2) [#3](https://github.com/alchemyplatform/aa-sdk/issues/3) [#7](https://github.com/alchemyplatform/aa-sdk/issues/7) [#8](https://github.com/alchemyplatform/aa-sdk/issues/8) [#9](https://github.com/alchemyplatform/aa-sdk/issues/9) - -# 0.1.0-alpha.32 (2023-09-18) - -### Bug Fixes - -- `baseGoerli` chainId in `chains.ts` ([#104](https://github.com/alchemyplatform/aa-sdk/issues/104)) ([2dda5dd](https://github.com/alchemyplatform/aa-sdk/commit/2dda5dd729124338ddf529c11bbf24afaea05dd4)) - -# 0.1.0-alpha.31 (2023-09-13) - -### Bug Fixes - -- remove all references to `SimpleSmartAccountOwner` ([#101](https://github.com/alchemyplatform/aa-sdk/issues/101)) ([a8f101d](https://github.com/alchemyplatform/aa-sdk/commit/a8f101dff7fbbd10598467ddaaa1c3c55f707e6d)) - -# 0.1.0-alpha.30 (2023-09-11) - -### Features - -- add base support to alchemy provider ([#100](https://github.com/alchemyplatform/aa-sdk/issues/100)) ([a5dc65c](https://github.com/alchemyplatform/aa-sdk/commit/a5dc65c4208614b935943ebdd8eececf3de03d29)) - -# 0.1.0-alpha.29 (2023-08-29) - -### Bug Fixes - -- **core:** add missing `null` return type of `eth_getUserOperation*` ([#93](https://github.com/alchemyplatform/aa-sdk/issues/93)) ([cba9a0c](https://github.com/alchemyplatform/aa-sdk/commit/cba9a0c79807612b37c9d8c300b494312c9bd752)) - -# 0.1.0-alpha.28 (2023-08-25) - -### Bug Fixes - -- pass overrides from tx to user op ([#88](https://github.com/alchemyplatform/aa-sdk/issues/88)) ([985cb99](https://github.com/alchemyplatform/aa-sdk/commit/985cb997691f5b251337ea0fbe6bd23e6b3fb455)) - -# 0.1.0-alpha.27 (2023-08-24) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# 0.1.0-alpha.26 (2023-08-23) - -### Features - -- add utils for getting the intermediary UO struct ([#86](https://github.com/alchemyplatform/aa-sdk/issues/86)) ([0e1a701](https://github.com/alchemyplatform/aa-sdk/commit/0e1a70174c0eeff2eedce4379914cad75f0629b2)) - -# 0.1.0-alpha.25 (2023-08-17) - -### Features - -- add jwt support for Alchemy providers ([#81](https://github.com/alchemyplatform/aa-sdk/issues/81)) ([af85aa4](https://github.com/alchemyplatform/aa-sdk/commit/af85aa41441825ca6545e850cbc7e834879cf236)) - -# 0.1.0-alpha.24 (2023-08-16) - -### Features - -- add utils for verifying 6492 sigs and ensip-11 utils ([#80](https://github.com/alchemyplatform/aa-sdk/issues/80)) ([52231b6](https://github.com/alchemyplatform/aa-sdk/commit/52231b6b4a521ee0713c4d3d3126ac4e5d66f14c)) - -# 0.1.0-alpha.23 (2023-08-14) - -### Features - -- **alchemy:** modify fee defaults ([0a0a65c](https://github.com/alchemyplatform/aa-sdk/commit/0a0a65c03a6991a1c57473ae9e65c4b727d937e2)) - -# 0.1.0-alpha.22 (2023-08-11) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# 0.1.0-alpha.21 (2023-08-08) - -### Features - -- allow overriding alchemy provider rpc url ([#70](https://github.com/alchemyplatform/aa-sdk/issues/70)) ([6b7c4b9](https://github.com/alchemyplatform/aa-sdk/commit/6b7c4b911b97dfcd1cfb00b2892548644fbe2fc6)) - -# 0.1.0-alpha.20 (2023-08-05) - -### Features - -- add signTypedData to providers ([#66](https://github.com/alchemyplatform/aa-sdk/issues/66)) ([e0a99f6](https://github.com/alchemyplatform/aa-sdk/commit/e0a99f694a6ed6e88b15d6cc73f99e74fd985667)) - -# 0.1.0-alpha.19 (2023-08-03) - -### Features - -- add event emitter to the provider so that we can listen to connected events in dapps ([#65](https://github.com/alchemyplatform/aa-sdk/issues/65)) ([35ee990](https://github.com/alchemyplatform/aa-sdk/commit/35ee990afa1c8be7c4685631af6654ac51b094cd)) - -# 0.1.0-alpha.18 (2023-07-28) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# 0.1.0-alpha.17 (2023-07-19) - -### Features - -- add support for fetch options when creating public clients ([#59](https://github.com/alchemyplatform/aa-sdk/issues/59)) ([5028e7b](https://github.com/alchemyplatform/aa-sdk/commit/5028e7b21a208ad8f88e81d455c2c8e24d57d953)) - -# 0.1.0-alpha.16 (2023-07-06) - -### Bug Fixes - -- always import with file extension ([#48](https://github.com/alchemyplatform/aa-sdk/issues/48)) ([4776d74](https://github.com/alchemyplatform/aa-sdk/commit/4776d7476f8cb622416c8846afa9bc17d16b97a6)) - -# 0.1.0-alpha.15 (2023-07-05) - -### Features - -- kernel batch transactions and gas estimation fixes ([#39](https://github.com/alchemyplatform/aa-sdk/issues/39)) ([f2a3d3d](https://github.com/alchemyplatform/aa-sdk/commit/f2a3d3d093ddbe1b564c0242c28b67487554f1ba)) - -# 0.1.0-alpha.14 (2023-06-29) - -### Bug Fixes - -- npm 404 error ([f34f581](https://github.com/alchemyplatform/aa-sdk/commit/f34f581a0399a2e30f33161d8b4cc1d778122b1f)) - -# 0.1.0-alpha.13 (2023-06-29) - -### Bug Fixes - -- add github user details to publish script ([2b812d3](https://github.com/alchemyplatform/aa-sdk/commit/2b812d34c041e11ba7d4c11a72c26da8f8e7af21)) - -# [0.1.0-alpha.11](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.10...v0.1.0-alpha.11) (2023-06-26) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [0.1.0-alpha.10](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.10) (2023-06-26) - -### Bug Fixes - -- types changed when updating to latest viem ([0aec96d](https://github.com/alchemyplatform/aa-sdk/commit/0aec96d184b5bcc3787ce9123260cf287f27f037)) - -# [0.1.0-alpha.9](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.9) (2023-06-26) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [0.1.0-alpha.8](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.7...v0.1.0-alpha.8) (2023-06-23) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [0.1.0-alpha.7](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.6...v0.1.0-alpha.7) (2023-06-20) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [0.1.0-alpha.5](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.4...v0.1.0-alpha.5) (2023-06-16) - -**Note:** Version bump only for package @alchemy/aa-accounts - -# [0.1.0-alpha.4](https://github.com/alchemyplatform/aa-sdk/compare/v0.1.0-alpha.3...v0.1.0-alpha.4) (2023-06-14) - -### Features - -- add aa-accounts subpackage ([#23](https://github.com/alchemyplatform/aa-sdk/issues/23)) ([a7fd5da](https://github.com/alchemyplatform/aa-sdk/commit/a7fd5da8600b0a346627df3a4b5cc338210aa256)) diff --git a/account-kit/smart-contracts/e2e-tests/constants.ts b/account-kit/smart-contracts/e2e-tests/constants.ts deleted file mode 100644 index be3a69755f..0000000000 --- a/account-kit/smart-contracts/e2e-tests/constants.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const API_KEY = process.env.API_KEY!; -export const PAYMASTER_POLICY_ID = process.env.PAYMASTER_POLICY_ID!; -export const LIGHT_ACCOUNT_OWNER_MNEMONIC = - process.env.LIGHT_ACCOUNT_OWNER_MNEMONIC!; -export const MODULAR_MULTISIG_ACCOUNT_OWNER_MNEMONIC = - process.env.MODULAR_MULTISIG_ACCOUNT_OWNER_MNEMONIC!; -export const MODULAR_MULTIOWNER_ACCOUNT_OWNER_MNEMONIC = - process.env.MODULAR_MULTIOWNER_ACCOUNT_OWNER_MNEMONIC!; diff --git a/account-kit/smart-contracts/e2e-tests/multisig-account.e2e.test.ts b/account-kit/smart-contracts/e2e-tests/multisig-account.e2e.test.ts deleted file mode 100644 index ade1550f52..0000000000 --- a/account-kit/smart-contracts/e2e-tests/multisig-account.e2e.test.ts +++ /dev/null @@ -1,329 +0,0 @@ -import { LocalAccountSigner, sepolia } from "@aa-sdk/core"; -import { fromHex, pad } from "viem"; -import { - createMultisigAccountAlchemyClient, - type AlchemyMultisigAccountClientConfig, -} from "../src/index.js"; -import { - API_KEY, - MODULAR_MULTISIG_ACCOUNT_OWNER_MNEMONIC, - PAYMASTER_POLICY_ID, -} from "./constants.js"; - -const chain = sepolia; - -describe("Multisig Modular Account Alchemy Client Tests", async () => { - const signer1 = LocalAccountSigner.mnemonicToAccountSigner( - MODULAR_MULTISIG_ACCOUNT_OWNER_MNEMONIC, - { accountIndex: 0 }, - ); - - const signer2 = LocalAccountSigner.mnemonicToAccountSigner( - MODULAR_MULTISIG_ACCOUNT_OWNER_MNEMONIC, - { accountIndex: 1 }, - ); - - const signer3 = LocalAccountSigner.mnemonicToAccountSigner( - MODULAR_MULTISIG_ACCOUNT_OWNER_MNEMONIC, - { accountIndex: 2 }, - ); - - const threshold = 2n; - - const owners = [ - await signer1.getAddress(), - await signer2.getAddress(), - await signer3.getAddress(), - ]; - - it("should successfully get counterfactual address", async () => { - const { - account: { address }, - } = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - expect(address).toMatchInlineSnapshot( - '"0xea78315aec5Ff47bF320843A1BaA769C99c8Ae32"', - ); - }); - - it("should get on-chain owner address successfully", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - - expect((await provider.readOwners()).slice().sort()).toMatchInlineSnapshot( - owners.slice().sort(), - ); - - expect(await provider.getThreshold({ account: provider.account })).toBe( - threshold, - ); - }); - - it("should execute successfully", async () => { - const initiator = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - - const submitter = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold, - }); - - expect(initiator.getAddress()).toBe(submitter.getAddress()); - - const { aggregatedSignature, signatureObj } = - await initiator.proposeUserOperation({ - uo: { - target: initiator.getAddress(), - data: "0x", - }, - }); - - const result = await submitter.sendUserOperation({ - uo: { - target: initiator.getAddress(), - data: "0x", - }, - context: { - aggregatedSignature, - signatures: [signatureObj], - userOpSignatureType: "ACTUAL", - }, - }); - - const txnHash = submitter.waitForUserOperationTransaction({ - hash: result.hash, - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should successfully execute with alchemy paymaster info", async () => { - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - gasManagerConfig: { - policyId: PAYMASTER_POLICY_ID, - }, - }); - - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold, - }); - - const { aggregatedSignature, request, signatureObj } = - await provider1.proposeUserOperation({ - uo: { - target: provider1.getAddress(), - data: "0x", - }, - // Must specify realistic overrides when using a paymaster, because the flexible-gas feature for the last signer doesn't work with paymasters. - overrides: { - maxFeePerGas: { multiplier: 2 }, - maxPriorityFeePerGas: { multiplier: 3 }, - preVerificationGas: { multiplier: 1.5 }, - }, - }); - - const result = await provider2.sendUserOperation({ - uo: request.callData, - overrides: { - callGasLimit: request.callGasLimit, - verificationGasLimit: request.verificationGasLimit, - preVerificationGas: request.preVerificationGas, - maxFeePerGas: request.maxFeePerGas, - maxPriorityFeePerGas: request.maxPriorityFeePerGas, - nonceKey: fromHex(`0x${pad(request.nonce).slice(2, 26)}`, "bigint"), // Nonce key is the first 24 bytes of the nonce - // @ts-ignore - paymasterAndData: request.paymasterAndData, - }, - context: { - aggregatedSignature, - signatures: [signatureObj], - userOpSignatureType: "ACTUAL", - }, - }); - const txnHash = provider2.waitForUserOperationTransaction(result); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should successfully execute 3/3", async () => { - const higherThreshold = 3n; - - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold: higherThreshold, - }); - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold: higherThreshold, - }); - const provider3 = await givenConnectedProvider({ - signer: signer3, - chain, - owners, - threshold: higherThreshold, - }); - - const { - account: { address }, - } = provider1; - expect(address).toBe("0xDAcFC8de3c63579BA8aF72a0b73262a85c176b3F"); - - const { request, signatureObj: signature1 } = - await provider1.proposeUserOperation({ - uo: { - target: provider1.getAddress(), - data: "0x", - }, - }); - - const { aggregatedSignature, signatureObj: signature2 } = - await provider2.signMultisigUserOperation({ - account: provider2.account, - signatures: [signature1], - userOperationRequest: request, - }); - - const result = await provider3.sendUserOperation({ - uo: request.callData, - context: { - aggregatedSignature, - signatures: [signature1, signature2], - userOpSignatureType: "ACTUAL", - }, - }); - - const txnHash = provider2.waitForUserOperationTransaction(result); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should successfully execute 3/3 with alchemy paymaster info", async () => { - const higherThreshold = 3n; - - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold: higherThreshold, - gasManagerConfig: { - policyId: PAYMASTER_POLICY_ID, - }, - }); - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold: higherThreshold, - }); - const provider3 = await givenConnectedProvider({ - signer: signer3, - chain, - owners, - threshold: higherThreshold, - }); - - const { - account: { address }, - } = provider1; - expect(address).toBe("0xDAcFC8de3c63579BA8aF72a0b73262a85c176b3F"); - - const { request, signatureObj: signature1 } = - await provider1.proposeUserOperation({ - uo: { - target: provider1.getAddress(), - data: "0x", - }, - // Must specify realistic overrides when using a paymaster, because the flexible-gas feature for the last signer doesn't work with paymasters. - overrides: { - maxFeePerGas: { multiplier: 2 }, - maxPriorityFeePerGas: { multiplier: 3 }, - preVerificationGas: { multiplier: 1.5 }, - }, - }); - - const { aggregatedSignature, signatureObj: signature2 } = - await provider2.signMultisigUserOperation({ - account: provider2.account, - signatures: [signature1], - userOperationRequest: request, - }); - - const result = await provider3.sendUserOperation({ - uo: request.callData, - overrides: { - callGasLimit: request.callGasLimit, - verificationGasLimit: request.verificationGasLimit, - preVerificationGas: request.preVerificationGas, - maxFeePerGas: request.maxFeePerGas, - maxPriorityFeePerGas: request.maxPriorityFeePerGas, - nonceKey: fromHex(`0x${pad(request.nonce).slice(2, 26)}`, "bigint"), // Nonce key is the first 24 bytes of the nonce - // @ts-ignore - paymasterAndData: request.paymasterAndData, - }, - context: { - aggregatedSignature, - signatures: [signature1, signature2], - userOpSignatureType: "ACTUAL", - }, - }); - - const txnHash = provider2.waitForUserOperationTransaction(result); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); -}); - -const givenConnectedProvider = async ({ - signer, - chain, - accountAddress, - opts, - gasManagerConfig, - useSimulation = false, - owners, - threshold, -}: AlchemyMultisigAccountClientConfig) => - createMultisigAccountAlchemyClient({ - chain, - signer, - owners, - threshold, - accountAddress, - apiKey: API_KEY!, - gasManagerConfig, - useSimulation, - opts: { - txMaxRetries: 10, - ...opts, - feeOptions: { - maxFeePerGas: { multiplier: 1.5 }, - maxPriorityFeePerGas: { multiplier: 1.5 }, - ...opts?.feeOptions, - }, - }, - }); diff --git a/account-kit/smart-contracts/package.json b/account-kit/smart-contracts/package.json deleted file mode 100644 index e484c21b69..0000000000 --- a/account-kit/smart-contracts/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "@account-kit/smart-contracts", - "version": "4.84.1", - "description": "aa-sdk compatible interfaces for Alchemy Smart Accounts", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/src/index.js", - "module": "./dist/esm/src/index.js", - "types": "./dist/types/src/index.d.ts", - "typings": "./dist/types/src/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "plugindefs/**/*.ts", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/src/index.d.ts", - "import": "./dist/esm/src/index.js", - "default": "./dist/esm/src/index.js" - }, - "./plugin-defs": { - "types": "./dist/types/plugindefs/index.d.ts", - "import": "./dist/esm/plugindefs/index.js", - "default": "./dist/esm/plugindefs/index.js" - }, - "./experimental": { - "types": "./dist/types/src/ma-v2/index.d.ts", - "import": "./dist/esm/src/ma-v2/index.js", - "default": "./dist/esm/src/ma-v2/index.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "generate": "tsx ../plugingen/src/cli.ts generate && yarn _lint:generated 1> /dev/null", - "_lint:generated": "dotenv -e ../../.env -- eslint . --fix --config ../../.eslintrc --ignore-path ../../.prettierignore && prettier --write --ignore-path ../../.prettierignore .", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test": "vitest", - "test:run": "vitest run" - }, - "devDependencies": { - "@account-kit/plugingen": "^4.84.1", - "change-case": "^5.1.2", - "dedent": "^1.5.1", - "dotenv": "^16.3.1", - "typescript-template": "*" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme", - "gitHead": "ee46e8bb857de3b631044fa70714ea706d9e317d", - "dependencies": { - "@aa-sdk/core": "^4.84.1", - "@account-kit/infra": "^4.84.1", - "webauthn-p256": "^0.0.10" - }, - "peerDependencies": { - "viem": "^2.45.0" - } -} diff --git a/account-kit/smart-contracts/plugindefs/index.ts b/account-kit/smart-contracts/plugindefs/index.ts deleted file mode 100644 index f23afb0664..0000000000 --- a/account-kit/smart-contracts/plugindefs/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { MultiOwnerPluginGenConfig } from "./multi-owner/config.js"; -export { SessionKeyPluginGenConfig } from "./session-key/config.js"; -export { MultisigPluginGenConfig } from "./multisig/config.js"; diff --git a/account-kit/smart-contracts/plugindefs/multi-owner/abi.ts b/account-kit/smart-contracts/plugindefs/multi-owner/abi.ts deleted file mode 100644 index 694ef3082f..0000000000 --- a/account-kit/smart-contracts/plugindefs/multi-owner/abi.ts +++ /dev/null @@ -1,608 +0,0 @@ -export const MultiOwnerPluginAbi = [ - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { name: "fields", type: "bytes1", internalType: "bytes1" }, - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "chainId", type: "uint256", internalType: "uint256" }, - { - name: "verifyingContract", - type: "address", - internalType: "address", - }, - { name: "salt", type: "bytes32", internalType: "bytes32" }, - { - name: "extensions", - type: "uint256[]", - internalType: "uint256[]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "encodeMessageData", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "message", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "view", - }, - { - type: "function", - name: "getMessageHash", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "message", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - name: "isOwnerOf", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "ownerToCheck", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isValidSignature", - inputs: [ - { name: "digest", type: "bytes32", internalType: "bytes32" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }], - stateMutability: "view", - }, - { - type: "function", - name: "onInstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [{ name: "", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ownersOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "address[]", internalType: "address[]" }], - stateMutability: "view", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { - name: "interfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { - name: "canSpendNativeToken", - type: "bool", - internalType: "bool", - }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { - name: "permitAnySelector", - type: "bool", - internalType: "bool", - }, - { - name: "selectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "author", type: "string", internalType: "string" }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "preExecHookData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { - name: "callGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "paymasterAndData", - type: "bytes", - internalType: "bytes", - }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "", type: "uint256", internalType: "uint256" }, - { name: "", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "view", - }, - { - type: "function", - name: "supportsInterface", - inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "updateOwners", - inputs: [ - { - name: "ownersToAdd", - type: "address[]", - internalType: "address[]", - }, - { - name: "ownersToRemove", - type: "address[]", - internalType: "address[]", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { - name: "callGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "paymasterAndData", - type: "bytes", - internalType: "bytes", - }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", - }, - { - type: "event", - name: "OwnerUpdated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "addedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - { - name: "removedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - ], - anonymous: false, - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { type: "error", name: "EmptyOwnersNotAllowed", inputs: [] }, - { type: "error", name: "InvalidAction", inputs: [] }, - { - type: "error", - name: "InvalidOwner", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, - { type: "error", name: "NotAuthorized", inputs: [] }, - { - type: "error", - name: "NotContractCaller", - inputs: [{ name: "caller", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "NotImplemented", - inputs: [ - { name: "selector", type: "bytes4", internalType: "bytes4" }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - ], - }, - { type: "error", name: "NotInitialized", inputs: [] }, - { - type: "error", - name: "OwnerDoesNotExist", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, -] as const; diff --git a/account-kit/smart-contracts/plugindefs/multi-owner/config.ts b/account-kit/smart-contracts/plugindefs/multi-owner/config.ts deleted file mode 100644 index 969d2146bc..0000000000 --- a/account-kit/smart-contracts/plugindefs/multi-owner/config.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { PluginConfig } from "@account-kit/plugingen"; -import { parseAbiParameters } from "viem"; -import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - fraxtal, - mainnet, - optimism, - optimismSepolia, - polygon, - polygonAmoy, - polygonMumbai, - sepolia, - zora, - zoraSepolia, -} from "viem/chains"; -import { MultiOwnerPluginAbi } from "./abi.js"; - -export const MultiOwnerPluginGenConfig: PluginConfig = { - name: "MultiOwnerPlugin", - abi: MultiOwnerPluginAbi, - addresses: { - [sepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [baseSepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [polygon.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [polygonAmoy.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [polygonMumbai.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [optimism.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [optimismSepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [arbitrum.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [arbitrumSepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [base.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [fraxtal.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - 2523: "0xcE0000007B008F50d762D155002600004cD6c647", - [zora.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [zoraSepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - [mainnet.id]: "0xcE0000007B008F50d762D155002600004cD6c647", - }, - installConfig: { - initAbiParams: parseAbiParameters("address[]"), - }, -}; diff --git a/account-kit/smart-contracts/plugindefs/multisig/abi.ts b/account-kit/smart-contracts/plugindefs/multisig/abi.ts deleted file mode 100644 index ba981de06b..0000000000 --- a/account-kit/smart-contracts/plugindefs/multisig/abi.ts +++ /dev/null @@ -1,1027 +0,0 @@ -export const MultisigPluginAbi = [ - { - type: "constructor", - inputs: [ - { - name: "entryPoint", - type: "address", - internalType: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ENTRYPOINT", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "checkNSignatures", - inputs: [ - { - name: "actualDigest", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "upperLimitGasDigest", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "account", - type: "address", - internalType: "address", - }, - { - name: "signatures", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [ - { - name: "success", - type: "bool", - internalType: "bool", - }, - { - name: "firstFailure", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { - name: "fields", - type: "bytes1", - internalType: "bytes1", - }, - { - name: "name", - type: "string", - internalType: "string", - }, - { - name: "version", - type: "string", - internalType: "string", - }, - { - name: "chainId", - type: "uint256", - internalType: "uint256", - }, - { - name: "verifyingContract", - type: "address", - internalType: "address", - }, - { - name: "salt", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "extensions", - type: "uint256[]", - internalType: "uint256[]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "encodeMessageData", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - { - name: "message", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [ - { - name: "", - type: "bytes", - internalType: "bytes", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getMessageHash", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - { - name: "message", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "isOwnerOf", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - { - name: "ownerToCheck", - type: "address", - internalType: "address", - }, - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "isValidSignature", - inputs: [ - { - name: "digest", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "signature", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [ - { - name: "", - type: "bytes4", - internalType: "bytes4", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "onInstall", - inputs: [ - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [ - { - name: "", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ownershipInfoOf", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [ - { - name: "", - type: "address[]", - internalType: "address[]", - }, - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { - name: "interfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { - name: "canSpendNativeToken", - type: "bool", - internalType: "bool", - }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { - name: "permitAnySelector", - type: "bool", - internalType: "bool", - }, - { - name: "selectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { - name: "name", - type: "string", - internalType: "string", - }, - { - name: "version", - type: "string", - internalType: "string", - }, - { - name: "author", - type: "string", - internalType: "string", - }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "preExecHookData", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "sender", - type: "address", - internalType: "address", - }, - { - name: "value", - type: "uint256", - internalType: "uint256", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [ - { - name: "", - type: "bytes", - internalType: "bytes", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "sender", - type: "address", - internalType: "address", - }, - { - name: "value", - type: "uint256", - internalType: "uint256", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { - name: "sender", - type: "address", - internalType: "address", - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256", - }, - { - name: "initCode", - type: "bytes", - internalType: "bytes", - }, - { - name: "callData", - type: "bytes", - internalType: "bytes", - }, - { - name: "callGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "paymasterAndData", - type: "bytes", - internalType: "bytes", - }, - { - name: "signature", - type: "bytes", - internalType: "bytes", - }, - ], - }, - { - name: "userOpHash", - type: "bytes32", - internalType: "bytes32", - }, - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "sender", - type: "address", - internalType: "address", - }, - { - name: "value", - type: "uint256", - internalType: "uint256", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "supportsInterface", - inputs: [ - { - name: "interfaceId", - type: "bytes4", - internalType: "bytes4", - }, - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "updateOwnership", - inputs: [ - { - name: "ownersToAdd", - type: "address[]", - internalType: "address[]", - }, - { - name: "ownersToRemove", - type: "address[]", - internalType: "address[]", - }, - { - name: "newThreshold", - type: "uint128", - internalType: "uint128", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { - name: "sender", - type: "address", - internalType: "address", - }, - { - name: "nonce", - type: "uint256", - internalType: "uint256", - }, - { - name: "initCode", - type: "bytes", - internalType: "bytes", - }, - { - name: "callData", - type: "bytes", - internalType: "bytes", - }, - { - name: "callGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "paymasterAndData", - type: "bytes", - internalType: "bytes", - }, - { - name: "signature", - type: "bytes", - internalType: "bytes", - }, - ], - }, - { - name: "userOpHash", - type: "bytes32", - internalType: "bytes32", - }, - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "event", - name: "OwnerUpdated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "addedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - { - name: "removedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - { - name: "threshold", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "error", - name: "AlreadyInitialized", - inputs: [], - }, - { - type: "error", - name: "ECDSARecoverFailure", - inputs: [], - }, - { - type: "error", - name: "EmptyOwnersNotAllowed", - inputs: [], - }, - { - type: "error", - name: "InvalidAction", - inputs: [], - }, - { - type: "error", - name: "InvalidAddress", - inputs: [], - }, - { - type: "error", - name: "InvalidMaxFeePerGas", - inputs: [], - }, - { - type: "error", - name: "InvalidMaxPriorityFeePerGas", - inputs: [], - }, - { - type: "error", - name: "InvalidNumSigsOnActualGas", - inputs: [], - }, - { - type: "error", - name: "InvalidOwner", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "InvalidPreVerificationGas", - inputs: [], - }, - { - type: "error", - name: "InvalidSigLength", - inputs: [], - }, - { - type: "error", - name: "InvalidSigOffset", - inputs: [], - }, - { - type: "error", - name: "InvalidThreshold", - inputs: [], - }, - { - type: "error", - name: "NotContractCaller", - inputs: [ - { - name: "caller", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "NotImplemented", - inputs: [ - { - name: "selector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - ], - }, - { - type: "error", - name: "NotInitialized", - inputs: [], - }, - { - type: "error", - name: "OwnerDoesNotExist", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - ], - }, -] as const; diff --git a/account-kit/smart-contracts/plugindefs/multisig/config.ts b/account-kit/smart-contracts/plugindefs/multisig/config.ts deleted file mode 100644 index 153eaecf54..0000000000 --- a/account-kit/smart-contracts/plugindefs/multisig/config.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { PluginConfig } from "@account-kit/plugingen"; -import { parseAbiParameters } from "viem"; -import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - fraxtal, - mainnet, - optimism, - optimismSepolia, - polygon, - polygonAmoy, - sepolia, - zora, - zoraSepolia, -} from "viem/chains"; -import { MultisigPluginAbi } from "./abi.js"; - -export const MultisigPluginGenConfig: PluginConfig = { - name: "MultisigPlugin", - abi: MultisigPluginAbi, - addresses: { - [sepolia.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [baseSepolia.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [polygon.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [mainnet.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [polygonAmoy.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [optimism.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [optimismSepolia.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [arbitrum.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [arbitrumSepolia.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [base.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [fraxtal.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - 2523: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [zora.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - [zoraSepolia.id]: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - 1337: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7", - }, - installConfig: { - initAbiParams: parseAbiParameters("address[], uint"), - }, -}; diff --git a/account-kit/smart-contracts/plugindefs/session-key/abi.ts b/account-kit/smart-contracts/plugindefs/session-key/abi.ts deleted file mode 100644 index 456ce9ca83..0000000000 --- a/account-kit/smart-contracts/plugindefs/session-key/abi.ts +++ /dev/null @@ -1,912 +0,0 @@ -export const SessionKeyPluginAbi = [ - { - type: "function", - name: "addSessionKey", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "tag", type: "bytes32", internalType: "bytes32" }, - { - name: "permissionUpdates", - type: "bytes[]", - internalType: "bytes[]", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "executeWithSessionKey", - inputs: [ - { - name: "calls", - type: "tuple[]", - internalType: "struct Call[]", - components: [ - { name: "target", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bytes[]", internalType: "bytes[]" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "findPredecessor", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - name: "getAccessControlEntry", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { - name: "contractAddress", - type: "address", - internalType: "address", - }, - ], - outputs: [ - { name: "isOnList", type: "bool", internalType: "bool" }, - { name: "checkSelectors", type: "bool", internalType: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getAccessControlType", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "", - type: "uint8", - internalType: "enum ISessionKeyPlugin.ContractAccessControlType", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getERC20SpendLimitInfo", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "token", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct ISessionKeyPlugin.SpendLimitInfo", - components: [ - { name: "hasLimit", type: "bool", internalType: "bool" }, - { name: "limit", type: "uint256", internalType: "uint256" }, - { - name: "limitUsed", - type: "uint256", - internalType: "uint256", - }, - { - name: "refreshInterval", - type: "uint48", - internalType: "uint48", - }, - { - name: "lastUsedTime", - type: "uint48", - internalType: "uint48", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getGasSpendLimit", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "info", - type: "tuple", - internalType: "struct ISessionKeyPlugin.SpendLimitInfo", - components: [ - { name: "hasLimit", type: "bool", internalType: "bool" }, - { name: "limit", type: "uint256", internalType: "uint256" }, - { - name: "limitUsed", - type: "uint256", - internalType: "uint256", - }, - { - name: "refreshInterval", - type: "uint48", - internalType: "uint48", - }, - { - name: "lastUsedTime", - type: "uint48", - internalType: "uint48", - }, - ], - }, - { name: "shouldReset", type: "bool", internalType: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getKeyTimeRange", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { name: "validAfter", type: "uint48", internalType: "uint48" }, - { name: "validUntil", type: "uint48", internalType: "uint48" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getNativeTokenSpendLimitInfo", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "info", - type: "tuple", - internalType: "struct ISessionKeyPlugin.SpendLimitInfo", - components: [ - { name: "hasLimit", type: "bool", internalType: "bool" }, - { name: "limit", type: "uint256", internalType: "uint256" }, - { - name: "limitUsed", - type: "uint256", - internalType: "uint256", - }, - { - name: "refreshInterval", - type: "uint48", - internalType: "uint48", - }, - { - name: "lastUsedTime", - type: "uint48", - internalType: "uint48", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getRequiredPaymaster", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", - }, - { - type: "function", - name: "isSelectorOnAccessControlList", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { - name: "contractAddress", - type: "address", - internalType: "address", - }, - { name: "selector", type: "bytes4", internalType: "bytes4" }, - ], - outputs: [{ name: "isOnList", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isSessionKeyOf", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "onInstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [{ name: "", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { - name: "interfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { - name: "canSpendNativeToken", - type: "bool", - internalType: "bool", - }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { - name: "permitAnySelector", - type: "bool", - internalType: "bool", - }, - { - name: "selectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { - name: "functionId", - type: "uint8", - internalType: "uint8", - }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "author", type: "string", internalType: "string" }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "preExecHookData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { - name: "callGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "paymasterAndData", - type: "bytes", - internalType: "bytes", - }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "removeSessionKey", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "predecessor", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "resetSessionKeyGasLimitTimestamp", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "rotateSessionKey", - inputs: [ - { - name: "oldSessionKey", - type: "address", - internalType: "address", - }, - { name: "predecessor", type: "bytes32", internalType: "bytes32" }, - { - name: "newSessionKey", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "sessionKeysOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "address[]", internalType: "address[]" }], - stateMutability: "view", - }, - { - type: "function", - name: "supportsInterface", - inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "updateKeyPermissions", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "updates", type: "bytes[]", internalType: "bytes[]" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { - name: "callGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { - name: "paymasterAndData", - type: "bytes", - internalType: "bytes", - }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "event", - name: "PermissionsUpdated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "updates", - type: "bytes[]", - indexed: false, - internalType: "bytes[]", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "SessionKeyAdded", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "tag", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "SessionKeyRemoved", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "SessionKeyRotated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "oldSessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newSessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { - type: "error", - name: "ERC20SpendLimitExceeded", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "token", type: "address", internalType: "address" }, - ], - }, - { type: "error", name: "InvalidAction", inputs: [] }, - { - type: "error", - name: "InvalidPermissionsUpdate", - inputs: [ - { name: "updateSelector", type: "bytes4", internalType: "bytes4" }, - ], - }, - { - type: "error", - name: "InvalidSessionKey", - inputs: [{ name: "sessionKey", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "InvalidSignature", - inputs: [{ name: "sessionKey", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "InvalidToken", - inputs: [{ name: "token", type: "address", internalType: "address" }], - }, - { type: "error", name: "LengthMismatch", inputs: [] }, - { - type: "error", - name: "NativeTokenSpendLimitExceeded", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - }, - { - type: "error", - name: "NotContractCaller", - inputs: [{ name: "caller", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "NotImplemented", - inputs: [ - { name: "selector", type: "bytes4", internalType: "bytes4" }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - ], - }, - { type: "error", name: "NotInitialized", inputs: [] }, - { - type: "error", - name: "SessionKeyNotFound", - inputs: [{ name: "sessionKey", type: "address", internalType: "address" }], - }, -] as const; diff --git a/account-kit/smart-contracts/plugindefs/session-key/config.ts b/account-kit/smart-contracts/plugindefs/session-key/config.ts deleted file mode 100644 index 8f27bd1863..0000000000 --- a/account-kit/smart-contracts/plugindefs/session-key/config.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { PluginConfig } from "@account-kit/plugingen"; -import { parseAbiParameters } from "viem"; -import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - fraxtal, - mainnet, - optimism, - optimismSepolia, - polygon, - polygonAmoy, - polygonMumbai, - sepolia, - zora, - zoraSepolia, -} from "viem/chains"; -import { MultiOwnerPluginGenConfig } from "../multi-owner/config.js"; -import { SessionKeyPluginAbi } from "./abi.js"; - -export const SessionKeyPluginGenConfig: PluginConfig = { - name: "SessionKeyPlugin", - abi: SessionKeyPluginAbi, - addresses: { - [sepolia.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [baseSepolia.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [polygon.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [polygonAmoy.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [polygonMumbai.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [optimism.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [optimismSepolia.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [arbitrum.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [arbitrumSepolia.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [base.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [fraxtal.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - 2523: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [zora.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [zoraSepolia.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - [mainnet.id]: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d", - }, - installConfig: { - initAbiParams: parseAbiParameters( - "address[] initialKeys, bytes32[] tags, bytes[][] initialPermissions", - ), - dependencies: [ - { - plugin: MultiOwnerPluginGenConfig, - functionId: "0x0", - }, - { - plugin: MultiOwnerPluginGenConfig, - functionId: "0x1", - }, - ], - }, -}; diff --git a/account-kit/smart-contracts/plugindefs/types.ts b/account-kit/smart-contracts/plugindefs/types.ts deleted file mode 100644 index 7627293278..0000000000 --- a/account-kit/smart-contracts/plugindefs/types.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Abi, Address, Chain, Hex, parseAbiParameters } from "viem"; - -export type PluginGenConfig = { - abi: Abi; - addresses: Record; - chain: Chain; - name: string; - rpcUrl?: string; - installConfig?: { - initAbiParams: ReturnType | []; - dependencies?: { - plugin: PluginGenConfig; - functionId: Hex; - }[]; - }; -}; diff --git a/account-kit/smart-contracts/plugingen.config.ts b/account-kit/smart-contracts/plugingen.config.ts deleted file mode 100644 index 1c1abc6073..0000000000 --- a/account-kit/smart-contracts/plugingen.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { defineConfig } from "@account-kit/plugingen"; -import dotenv from "dotenv"; -import { sepolia } from "viem/chains"; -import { - MultiOwnerPluginGenConfig, - MultisigPluginGenConfig, - SessionKeyPluginGenConfig, -} from "./plugindefs/index.js"; -dotenv.config(); - -export default defineConfig({ - outDir: "./src/msca/plugins", - chain: sepolia, - rpcUrl: - process.env.VITEST_SEPOLIA_FORK_URL ?? - "https://ethereum-sepolia.publicnode.com", - plugins: [ - MultiOwnerPluginGenConfig, - MultisigPluginGenConfig, - SessionKeyPluginGenConfig, - ], -}); diff --git a/account-kit/smart-contracts/src/index.ts b/account-kit/smart-contracts/src/index.ts deleted file mode 100644 index 571f2d8b88..0000000000 --- a/account-kit/smart-contracts/src/index.ts +++ /dev/null @@ -1,130 +0,0 @@ -// Add you exports here, make sure to export types separately from impls and use the `type` keyword when exporting them -// Don't use wildcard exports, instead use named exports - -//light-account exports -export type * from "./light-account/accounts/account.js"; -export { createLightAccount } from "./light-account/accounts/account.js"; -export { transferOwnership as transferLightAccountOwnership } from "./light-account/actions/transferOwnership.js"; -export { - createLightAccountAlchemyClient, - type AlchemyLightAccountClientConfig, -} from "./light-account/clients/alchemyClient.js"; -export { createLightAccountClient } from "./light-account/clients/client.js"; -export { - createMultiOwnerLightAccountAlchemyClient, - type AlchemyMultiOwnerLightAccountClientConfig, -} from "./light-account/clients/multiOwnerAlchemyClient.js"; -export type * from "./light-account/decorators/lightAccount.js"; -export { lightAccountClientActions } from "./light-account/decorators/lightAccount.js"; -export type * from "./light-account/types.js"; -export { predictLightAccountAddress } from "./light-account/accounts/predictAddress.js"; -export { predictMultiOwnerLightAccountAddress } from "./light-account/accounts/predictAddress.js"; - -export { - AccountVersionRegistry, - LightAccountUnsupported1271Factories, - LightAccountUnsupported1271Impls, - defaultLightAccountVersion, - getDefaultLightAccountFactoryAddress, - getDefaultMultiOwnerLightAccountFactoryAddress, - getLightAccountVersionForAccount, -} from "./light-account/utils.js"; - -//multi-owner-light-account exports -export type * from "./light-account/accounts/multiOwner.js"; -export { createMultiOwnerLightAccount } from "./light-account/accounts/multiOwner.js"; -export { updateOwners as updateMultiOwnerLightAccountOwners } from "./light-account/actions/updateOwners.js"; -export { createMultiOwnerLightAccountClient } from "./light-account/clients/multiOwnerLightAccount.js"; -export type * from "./light-account/decorators/multiOwnerLightAccount.js"; -export { multiOwnerLightAccountClientActions } from "./light-account/decorators/multiOwnerLightAccount.js"; - -// msca exports -export { IAccountLoupeAbi } from "./msca/abis/IAccountLoupe.js"; -export { IPluginAbi } from "./msca/abis/IPlugin.js"; -export { IPluginManagerAbi } from "./msca/abis/IPluginManager.js"; -export { IStandardExecutorAbi } from "./msca/abis/IStandardExecutor.js"; -export { MultiOwnerModularAccountFactoryAbi } from "./msca/abis/MultiOwnerModularAccountFactory.js"; -export { MultisigModularAccountFactoryAbi } from "./msca/abis/MultisigModularAccountFactory.js"; -export { UpgradeableModularAccountAbi } from "./msca/abis/UpgradeableModularAccount.js"; -export type * from "./msca/account-loupe/decorator.js"; -export { accountLoupeActions } from "./msca/account-loupe/decorator.js"; -export type * from "./msca/account-loupe/types.js"; -export type * from "./msca/account/multiOwnerAccount.js"; -export { createMultiOwnerModularAccount } from "./msca/account/multiOwnerAccount.js"; -export type * from "./msca/account/multisigAccount.js"; -export { createMultisigModularAccount } from "./msca/account/multisigAccount.js"; -export { standardExecutor } from "./msca/account/standardExecutor.js"; -export { - createModularAccountAlchemyClient, - type AlchemyModularAccountClientConfig, -} from "./msca/client/alchemyClient.js"; -export { - createMultiOwnerModularAccountClient, - createMultisigModularAccountClient, -} from "./msca/client/client.js"; -export { - createMultisigAccountAlchemyClient, - type AlchemyMultisigAccountClientConfig, -} from "./msca/client/multiSigAlchemyClient.js"; -export { - InvalidAggregatedSignatureError, - InvalidContextSignatureError, - MultisigAccountExpectedError, - MultisigMissingSignatureError, -} from "./msca/errors.js"; -export type * from "./msca/plugin-manager/decorator.js"; -export { pluginManagerActions } from "./msca/plugin-manager/decorator.js"; -export { installPlugin } from "./msca/plugin-manager/installPlugin.js"; -export { multiOwnerPluginActions } from "./msca/plugins/multi-owner/extension.js"; -export type * from "./msca/plugins/multi-owner/index.js"; -export { - MultiOwnerPlugin, - MultiOwnerPluginAbi, - MultiOwnerPluginExecutionFunctionAbi, -} from "./msca/plugins/multi-owner/plugin.js"; -export type * from "./msca/plugins/multisig/index.js"; -export { - MultisigPlugin, - MultisigPluginAbi, - MultisigPluginExecutionFunctionAbi, - multisigPluginActions, - multisigSignatureMiddleware, -} from "./msca/plugins/multisig/index.js"; -export { - combineSignatures, - formatSignatures, - getSignerType, - splitAggregatedSignature, -} from "./msca/plugins/multisig/utils/index.js"; -export { sessionKeyPluginActions } from "./msca/plugins/session-key/extension.js"; -export type * from "./msca/plugins/session-key/index.js"; -export type * from "./msca/plugins/session-key/permissions.js"; -export { - SessionKeyAccessListType, - SessionKeyPermissionsBuilder, -} from "./msca/plugins/session-key/permissions.js"; -export { - SessionKeyPlugin, - SessionKeyPluginAbi, - SessionKeyPluginExecutionFunctionAbi, -} from "./msca/plugins/session-key/plugin.js"; -export { SessionKeySigner } from "./msca/plugins/session-key/signer.js"; -export { buildSessionKeysToRemoveStruct } from "./msca/plugins/session-key/utils.js"; -export type * from "./msca/plugins/types.js"; -export { - getDefaultMultiOwnerModularAccountFactoryAddress, - getDefaultMultisigModularAccountFactoryAddress, - getMAInitializationData, - getMSCAUpgradeToData, -} from "./msca/utils.js"; - -// ma v2 exports -export type * from "./ma-v2/account/modularAccountV2.js"; -export type * from "./ma-v2/account/common/modularAccountV2Base.js"; -export { createModularAccountV2 } from "./ma-v2/account/modularAccountV2.js"; -export type * from "./ma-v2/client/client.js"; -export { createModularAccountV2Client } from "./ma-v2/client/client.js"; -export type * from "./ma-v2/utils.js"; -export { getMAV2UpgradeToData } from "./ma-v2/utils.js"; -export { predictModularAccountV2Address } from "./ma-v2/account/predictAddress.js"; -export { semiModularAccountBytecodeAbi } from "./ma-v2/abis/semiModularAccountBytecodeAbi.js"; diff --git a/account-kit/smart-contracts/src/light-account/accounts/account.ts b/account-kit/smart-contracts/src/light-account/accounts/account.ts deleted file mode 100644 index 229a30ffc9..0000000000 --- a/account-kit/smart-contracts/src/light-account/accounts/account.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { - createBundlerClient, - getEntryPoint, - type Address, - type EntryPointDef, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { - concatHex, - encodeFunctionData, - type Chain, - type Hex, - type Transport, -} from "viem"; -import { LightAccountAbi_v1 } from "../abis/LightAccountAbi_v1.js"; -import { LightAccountAbi_v2 } from "../abis/LightAccountAbi_v2.js"; -import { LightAccountFactoryAbi_v1 } from "../abis/LightAccountFactoryAbi_v1.js"; -import { LightAccountFactoryAbi_v2 } from "../abis/LightAccountFactoryAbi_v2.js"; -import type { - LightAccountEntryPointVersion, - LightAccountVersion, -} from "../types.js"; -import { - AccountVersionRegistry, - LightAccountUnsupported1271Factories, - defaultLightAccountVersion, - getDefaultLightAccountFactoryAddress, -} from "../utils.js"; -import { - createLightAccountBase, - type CreateLightAccountBaseParams, - type LightAccountBase, -} from "./base.js"; -import { predictLightAccountAddress } from "./predictAddress.js"; - -export type LightAccount< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TLightAccountVersion extends - LightAccountVersion<"LightAccount"> = LightAccountVersion<"LightAccount">, -> = LightAccountBase & { - encodeTransferOwnership: (newOwner: Address) => Hex; - getOwnerAddress: () => Promise
; -}; - -export type CreateLightAccountParams< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TLightAccountVersion extends - LightAccountVersion<"LightAccount"> = LightAccountVersion<"LightAccount">, -> = Omit< - CreateLightAccountBaseParams< - "LightAccount", - TLightAccountVersion, - TTransport, - TSigner - >, - | "getAccountInitCode" - | "entryPoint" - | "version" - | "abi" - | "accountAddress" - | "type" -> & { - salt?: bigint; - initCode?: Hex; - accountAddress?: Address; - factoryAddress?: Address; - version?: TLightAccountVersion; - entryPoint?: EntryPointDef< - LightAccountEntryPointVersion<"LightAccount", TLightAccountVersion>, - Chain - >; -}; - -export async function createLightAccount< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TLightAccountVersion extends LightAccountVersion<"LightAccount"> = "v2.0.0", ->( - config: CreateLightAccountParams, -): Promise>; - -/** - * Creates a light account based on the provided parameters such as transport, chain, signer, init code, and more. Ensures that an account is configured and returned with various capabilities, such as transferring ownership and retrieving the owner's address. - * - * @example - * ```ts - * import { createLightAccount } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http, generatePrivateKey } from "viem" - * - * const account = await createLightAccount({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @param {CreateLightAccountParams} config The parameters for creating a light account - * @returns {Promise} A promise that resolves to a `LightAccount` object containing the created account information and methods - */ -export async function createLightAccount({ - transport, - chain, - signer, - initCode, - version = defaultLightAccountVersion(), - entryPoint = getEntryPoint(chain, { - version: AccountVersionRegistry["LightAccount"][version] - .entryPointVersion as any, - }), - accountAddress, - factoryAddress = getDefaultLightAccountFactoryAddress(chain, version), - salt: salt_ = 0n, -}: CreateLightAccountParams): Promise { - const client = createBundlerClient({ - transport, - chain, - }); - - const accountAbi = - version === "v2.0.0" ? LightAccountAbi_v2 : LightAccountAbi_v1; - const factoryAbi = - version === "v2.0.0" - ? LightAccountFactoryAbi_v1 - : LightAccountFactoryAbi_v2; - - const signerAddress = await signer.getAddress(); - - const salt = LightAccountUnsupported1271Factories.has( - factoryAddress.toLowerCase() as Address, - ) - ? 0n - : salt_; - - const getAccountInitCode = async () => { - if (initCode) return initCode; - - return concatHex([ - factoryAddress, - encodeFunctionData({ - abi: factoryAbi, - functionName: "createAccount", - args: [signerAddress, salt], - }), - ]); - }; - - const address = - accountAddress ?? - predictLightAccountAddress({ - factoryAddress, - salt, - ownerAddress: signerAddress, - version, - }); - - const account = await createLightAccountBase< - "LightAccount", - LightAccountVersion<"LightAccount">, - Transport, - SmartAccountSigner - >({ - transport, - chain, - signer, - abi: accountAbi, - type: "LightAccount", - version, - entryPoint, - accountAddress: address, - getAccountInitCode, - }); - - return { - ...account, - - encodeTransferOwnership: (newOwner: Address) => { - return encodeFunctionData({ - abi: accountAbi, - functionName: "transferOwnership", - args: [newOwner], - }); - }, - async getOwnerAddress(): Promise
{ - const callResult = await client.readContract({ - address, - abi: accountAbi, - functionName: "owner", - }); - - if (callResult == null) { - throw new Error("could not get on-chain owner"); - } - - return callResult; - }, - }; -} diff --git a/account-kit/smart-contracts/src/light-account/accounts/base.ts b/account-kit/smart-contracts/src/light-account/accounts/base.ts deleted file mode 100644 index 46b425e1cc..0000000000 --- a/account-kit/smart-contracts/src/light-account/accounts/base.ts +++ /dev/null @@ -1,303 +0,0 @@ -import { - FailedToGetStorageSlotError, - createBundlerClient, - toSmartContractAccount, - type Abi, - type EntryPointDef, - type SmartAccountSigner, - type SmartContractAccountWithSigner, - type ToSmartContractAccountParams, - type UpgradeToAndCallParams, -} from "@aa-sdk/core"; -import { - concat, - encodeFunctionData, - fromHex, - hashMessage, - hashTypedData, - trim, - type Address, - type Chain, - type Hex, - type Transport, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import type { - LightAccountEntryPointVersion, - LightAccountType, - LightAccountVersion, -} from "../types.js"; -import { AccountVersionRegistry } from "../utils.js"; -import type { SignatureRequest } from "@aa-sdk/core"; - -enum SignatureType { - EOA = "0x00", - CONTRACT = "0x01", - CONTRACT_WITH_ADDR = "0x02", -} - -export type LightAccountBase< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TLightAccountType extends LightAccountType = LightAccountType, - TLightAccountVersion extends - LightAccountVersion = LightAccountVersion, -> = SmartContractAccountWithSigner< - TLightAccountType, - TSigner, - LightAccountEntryPointVersion -> & { - getLightAccountVersion: () => TLightAccountVersion; -}; - -//#region CreateLightAccountBaseParams -export type CreateLightAccountBaseParams< - TLightAccountType extends LightAccountType, - TLightAccountVersion extends - LightAccountVersion = LightAccountVersion, - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Pick< - ToSmartContractAccountParams, - "transport" | "chain" | "getAccountInitCode" -> & { - abi: Abi; - signer: TSigner; - accountAddress: Address; - type: TLightAccountType; - version: TLightAccountVersion; - entryPoint: EntryPointDef< - LightAccountEntryPointVersion, - Chain - >; -}; -//#endregion CreateLightAccountBaseParams - -export async function createLightAccountBase< - TLightAccountType extends LightAccountType, - TLightAccountVersion extends LightAccountVersion, - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->({ - transport, - chain, - signer, - abi, - version, - type, - entryPoint, - accountAddress, - getAccountInitCode, -}: CreateLightAccountBaseParams< - TLightAccountType, - TLightAccountVersion, - TTransport, - TSigner ->): Promise< - LightAccountBase -> { - const client = createBundlerClient({ - transport, - chain, - }); - - const encodeUpgradeToAndCall = async ({ - upgradeToAddress, - upgradeToInitData, - }: UpgradeToAndCallParams): Promise => { - const storage = await client.getStorageAt({ - address: accountAddress, - // the slot at which impl addresses are stored by UUPS - slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", - }); - - if (storage == null) { - throw new FailedToGetStorageSlotError( - "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", - "Proxy Implementation Address", - ); - } - - const implementationAddresses = Object.values( - AccountVersionRegistry[type], - ).map( - (x) => - x.addresses.overrides?.[chain.id]?.impl ?? x.addresses.default.impl, - ); - - // only upgrade undeployed accounts (storage 0) or deployed light accounts, error otherwise - if ( - fromHex(storage, "number") !== 0 && - !implementationAddresses.some((x) => x === trim(storage)) - ) { - throw new Error( - `could not determine if smart account implementation is ${type} ${String( - version, - )}`, - ); - } - - return encodeFunctionData({ - abi, - functionName: "upgradeToAndCall", - args: [upgradeToAddress, upgradeToInitData], - }); - }; - - const get1271Wrapper = ( - hashedMessage: Hex, - version: string, - ): TypedDataDefinition => { - return { - // EIP712Domain(string name,string version,uint256 chainId,address verifyingContract) - // https://github.com/alchemyplatform/light-account/blob/main/src/LightAccount.sol#L236 - domain: { - chainId: Number(client.chain.id), - name: type, - verifyingContract: accountAddress, - version, - }, - types: { - LightAccountMessage: [{ name: "message", type: "bytes" }], - }, - message: { - message: hashedMessage, - }, - primaryType: "LightAccountMessage", - }; - }; - - const prepareSign = async ( - params: SignatureRequest, - ): Promise => { - const messageHash = - params.type === "personal_sign" - ? hashMessage(params.data) - : hashTypedData(params.data); - - switch (version as string) { - case "v1.0.1": - return params; - case "v1.0.2": - throw new Error( - `Version ${String(version)} of LightAccount doesn't support 1271`, - ); - case "v1.1.0": - return { - type: "eth_signTypedData_v4", - data: get1271Wrapper(messageHash, "1"), - }; - case "v2.0.0": - return { - type: "eth_signTypedData_v4", - data: get1271Wrapper(messageHash, "2"), - }; - default: - throw new Error(`Unknown version ${String(version)} of LightAccount`); - } - }; - - const formatSign = async ( - signature: `0x${string}`, - ): Promise<`0x${string}`> => { - return version === "v2.0.0" - ? concat([SignatureType.EOA, signature]) - : signature; - }; - - const account = await toSmartContractAccount({ - transport, - chain, - entryPoint, - accountAddress, - source: type, - getAccountInitCode, - prepareSign, - formatSign, - encodeExecute: async ({ target, data, value }) => { - return encodeFunctionData({ - abi, - functionName: "execute", - args: [target, value ?? 0n, data], - }); - }, - encodeBatchExecute: async (txs) => { - const [targets, values, datas] = txs.reduce( - (accum, curr) => { - accum[0].push(curr.target); - accum[1].push(curr.value ?? 0n); - accum[2].push(curr.data); - - return accum; - }, - [[], [], []] as [Address[], bigint[], Hex[]], - ); - return encodeFunctionData({ - abi, - functionName: "executeBatch", - args: [targets, values, datas], - }); - }, - signUserOperationHash: async (uoHash: Hex) => { - const signature = await signer.signMessage({ raw: uoHash }); - switch (version) { - case "v2.0.0": - // TODO: handle case where signer is an SCA. - return concat([SignatureType.EOA, signature]); - default: - return signature; - } - }, - async signMessage({ message }) { - const { type, data } = await prepareSign({ - type: "personal_sign", - data: message, - }); - - const sig = - type === "personal_sign" - ? await signer.signMessage(data) - : await signer.signTypedData(data); - - return formatSign(sig); - }, - async signTypedData< - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >(params: TypedDataDefinition) { - const { type, data } = await prepareSign({ - type: "eth_signTypedData_v4", - data: params as TypedDataDefinition, - }); - - const sig = - type === "personal_sign" - ? await signer.signMessage(data) - : await signer.signTypedData(data); - - return formatSign(sig); - }, - getDummySignature: (): Hex => { - const signature = - "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"; - switch (version as string) { - case "v1.0.1": - case "v1.0.2": - case "v1.1.0": - return signature; - case "v2.0.0": - return concat([SignatureType.EOA, signature]); - default: - throw new Error(`Unknown version ${type} of ${String(version)}`); - } - }, - encodeUpgradeToAndCall, - }); - - return { - ...account, - source: type, - getLightAccountVersion: () => version, - getSigner: () => signer, - }; -} diff --git a/account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts b/account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts deleted file mode 100644 index cde647cd08..0000000000 --- a/account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { - createBundlerClient, - getEntryPoint, - type EntryPointDef, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { - concatHex, - encodeFunctionData, - hexToBigInt, - type Address, - type Chain, - type Hex, - type Transport, -} from "viem"; -import { MultiOwnerLightAccountAbi } from "../abis/MultiOwnerLightAccountAbi.js"; -import { MultiOwnerLightAccountFactoryAbi } from "../abis/MultiOwnerLightAccountFactoryAbi.js"; -import type { - LightAccountEntryPointVersion, - LightAccountVersion, -} from "../types.js"; -import { - defaultLightAccountVersion, - getDefaultMultiOwnerLightAccountFactoryAddress, -} from "../utils.js"; -import { - createLightAccountBase, - type CreateLightAccountBaseParams, - type LightAccountBase, -} from "./base.js"; -import { predictMultiOwnerLightAccountAddress } from "./predictAddress.js"; - -export type MultiOwnerLightAccount< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TLightAccountVersion extends - LightAccountVersion<"MultiOwnerLightAccount"> = LightAccountVersion<"MultiOwnerLightAccount">, -> = LightAccountBase< - TSigner, - "MultiOwnerLightAccount", - TLightAccountVersion -> & { - encodeUpdateOwners: ( - ownersToAdd: Address[], - ownersToRemove: Address[], - ) => Hex; - getOwnerAddresses: () => Promise; -}; - -export type CreateMultiOwnerLightAccountParams< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TLightAccountVersion extends - LightAccountVersion<"MultiOwnerLightAccount"> = LightAccountVersion<"MultiOwnerLightAccount">, -> = Omit< - CreateLightAccountBaseParams< - "MultiOwnerLightAccount", - TLightAccountVersion, - TTransport, - TSigner - >, - | "getAccountInitCode" - | "entryPoint" - | "version" - | "abi" - | "accountAddress" - | "type" -> & { - salt?: bigint; - initCode?: Hex; - accountAddress?: Address; - factoryAddress?: Address; - version?: TLightAccountVersion; - entryPoint?: EntryPointDef< - LightAccountEntryPointVersion< - "MultiOwnerLightAccount", - TLightAccountVersion - >, - Chain - >; - owners?: Address[]; -}; - -export async function createMultiOwnerLightAccount< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TLightAccountVersion extends - LightAccountVersion<"MultiOwnerLightAccount"> = LightAccountVersion<"MultiOwnerLightAccount">, ->( - config: CreateMultiOwnerLightAccountParams< - TTransport, - TSigner, - TLightAccountVersion - >, -): Promise>; - -/** - * Creates a multi-owner light account using the provided parameters, including transport, chain, signer, initialization code, version, account address, factory address, salt, and owners. Ensures the owners list is deduplicated, ordered, and valid. - * - * @example - * ```ts - * import { createMultiOwnerLightAccount } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http, generatePrivateKey } from "viem" - * - * const account = await createMultiOwnerLightAccount({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @param {CreateMultiOwnerLightAccountParams} config The parameters for creating a multi-owner light account - * @returns {Promise} A promise that resolves to a `MultiOwnerLightAccount` object containing the created account information and methods - */ -export async function createMultiOwnerLightAccount({ - transport, - chain, - signer, - initCode, - version = defaultLightAccountVersion(), - entryPoint = getEntryPoint(chain, { - version: "0.7.0", - }), - accountAddress, - factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress( - chain, - version, - ), - salt: salt_ = 0n, - owners = [], -}: CreateMultiOwnerLightAccountParams): Promise { - const client = createBundlerClient({ - transport, - chain, - }); - - // NOTE: the current signer connected will be one of the owners as well - const ownerAddress = await signer.getAddress(); - // owners need to be dedupe + ordered in ascending order and not == to zero address - const owners_ = Array.from(new Set([...owners, ownerAddress])) - .filter((x) => hexToBigInt(x) !== 0n) - .sort((a, b) => { - const bigintA = hexToBigInt(a); - const bigintB = hexToBigInt(b); - - return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0; - }); - - const getAccountInitCode = async () => { - if (initCode) return initCode; - - return concatHex([ - factoryAddress, - encodeFunctionData({ - abi: MultiOwnerLightAccountFactoryAbi, - functionName: "createAccount", - args: [owners_, salt_], - }), - ]); - }; - - const address = - accountAddress ?? - predictMultiOwnerLightAccountAddress({ - factoryAddress, - salt: salt_, - ownerAddresses: owners_, - }); - - const account = await createLightAccountBase< - "MultiOwnerLightAccount", - LightAccountVersion<"MultiOwnerLightAccount">, - Transport, - SmartAccountSigner - >({ - transport, - chain, - signer, - abi: MultiOwnerLightAccountAbi, - version, - type: "MultiOwnerLightAccount", - entryPoint, - accountAddress: address, - getAccountInitCode, - }); - - return { - ...account, - encodeUpdateOwners: (ownersToAdd: Address[], ownersToRemove: Address[]) => { - return encodeFunctionData({ - abi: MultiOwnerLightAccountAbi, - functionName: "updateOwners", - args: [ownersToAdd, ownersToRemove], - }); - }, - async getOwnerAddresses(): Promise { - const callResult = await client.readContract({ - address, - abi: MultiOwnerLightAccountAbi, - functionName: "owners", - }); - - if (callResult == null) { - throw new Error("could not get on-chain owners"); - } - - if (!callResult.includes(await signer.getAddress())) { - throw new Error("on-chain owners does not include the current signer"); - } - - return callResult; - }, - }; -} diff --git a/account-kit/smart-contracts/src/light-account/accounts/predictAddress.ts b/account-kit/smart-contracts/src/light-account/accounts/predictAddress.ts deleted file mode 100644 index bc6e35673e..0000000000 --- a/account-kit/smart-contracts/src/light-account/accounts/predictAddress.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { - encodeAbiParameters, - encodeDeployData, - keccak256, - getContractAddress, - type Address, - type Hex, - toHex, - encodeFunctionData, -} from "viem"; -import type { LightAccountVersionConfigs } from "../types"; -import { OZ_ERC1967Proxy_ConstructorAbi } from "../abis/OZ_ERC1967Proxy.js"; -import { AccountVersionRegistry } from "../utils.js"; -import { LightAccountAbi_v1 } from "../abis/LightAccountAbi_v1.js"; - -export type PredictLightAccountAddressParams = { - factoryAddress: Address; - salt: bigint; - ownerAddress: Address; - version: keyof LightAccountVersionConfigs["LightAccount"]; -}; - -/** - * Predicts the address of a light account based on provided parameters such as factory address, salt, owner address, and version. - * - * @param {PredictLightAccountAddressParams} params The parameters required to predict the light account address, including factory address, salt, owner address, and version - * @returns {Address} The predicted address of the light account calculated based on the provided parameters - */ -export function predictLightAccountAddress({ - factoryAddress, - salt, - ownerAddress, - version, -}: PredictLightAccountAddressParams): Address { - const implementationAddress = - // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment. - // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry. - factoryAddress !== - AccountVersionRegistry.LightAccount[version].addresses.default.factory - ? getContractAddress({ - from: factoryAddress, - nonce: 1n, - }) - : AccountVersionRegistry.LightAccount[version].addresses.default.impl; - - switch (version) { - case "v1.0.1": - case "v1.0.2": - case "v1.1.0": - // Same proxy initcode for all LA v1 factories - const LAv1_proxy_bytecode: Hex = - "0x60406080815261042c908138038061001681610218565b93843982019181818403126102135780516001600160a01b038116808203610213576020838101516001600160401b0394919391858211610213570186601f820112156102135780519061007161006c83610253565b610218565b918083528583019886828401011161021357888661008f930161026e565b813b156101b9577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b2575b61010b575b855160e790816103458239f35b855194606086019081118682101761019e578697849283926101889952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610194573d9061017a61006c83610253565b91825281943d92013e610291565b508038808080806100fe565b5060609250610291565b634e487b7160e01b84526041600452602484fd5b50826100f9565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761023d57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161023d57601f01601f191660200190565b60005b8381106102815750506000910152565b8181015183820152602001610271565b919290156102f357508151156102a5575090565b3b156102ae5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156103065750805190602001fd5b6044604051809262461bcd60e51b825260206004830152610336815180928160248601526020868601910161026e565b601f01601f19168101030190fdfe60806040523615605f5773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f3fea26469706673582212205da2750cd2b0cadfd354d8a1ca4752ed7f22214c8069d852f7dc6b8e9e5ee66964736f6c63430008150033"; - - return getContractAddress({ - from: factoryAddress, - opcode: "CREATE2", - salt: toHex(salt, { size: 32 }), - bytecode: encodeDeployData({ - bytecode: LAv1_proxy_bytecode, - abi: OZ_ERC1967Proxy_ConstructorAbi, - args: [ - implementationAddress, - encodeFunctionData({ - abi: LightAccountAbi_v1, - functionName: "initialize", - args: [ownerAddress], - }), - ], - }), - }); - - case "v2.0.0": - // Logic ported from LA factory v2.0.0 - const combinedSalt = keccak256( - encodeAbiParameters( - [{ type: "address" }, { type: "uint256" }], - [ownerAddress, salt], - ), - ); - - const initCode: Hex = getLAv2ProxyBytecode(implementationAddress); - - return getContractAddress({ - from: factoryAddress, - opcode: "CREATE2", - salt: combinedSalt, - bytecode: initCode, - }); - - default: - assertNeverLightAccountVersion(version); - } -} - -export type PredictMultiOwnerLightAccountAddressParams = { - factoryAddress: Address; - salt: bigint; - ownerAddresses: Address[]; - // There's just one version of the MultiOwnerLightAccount for now, so skip requiring the version as a parameter. -}; - -// Note: assumes the owner addresses are already deduped, sorted in ascending order, and have the signer address included. -/** - * Predicts the address of a **Multi-Owner Light Account** given the factory, salt - * and the set of owner addresses. - * - * Internally replicates the CREATE2 calculation performed by the factory so - * you can obtain the counter-factual account address before deployment (useful - * for funding or displaying to users). - * - * @param {PredictMultiOwnerLightAccountAddressParams} params Object containing: - * – `factoryAddress` Factory contract that will deploy the account. - * – `salt` Arbitrary salt used when calling the factory. - * – `ownerAddresses` Array of owner EOAs (must be deduped & sorted). - * @returns {Address} Predicted account address for the multi-owner light account. - */ -export function predictMultiOwnerLightAccountAddress({ - factoryAddress, - salt, - ownerAddresses, -}: PredictMultiOwnerLightAccountAddressParams): Address { - const implementationAddress = - // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment. - // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry. - factoryAddress !== - AccountVersionRegistry.MultiOwnerLightAccount["v2.0.0"].addresses.default - .factory - ? getContractAddress({ - from: factoryAddress, - nonce: 1n, - }) - : AccountVersionRegistry.MultiOwnerLightAccount["v2.0.0"].addresses - .default.impl; - - const combinedSalt = keccak256( - encodeAbiParameters( - [{ type: "address[]" }, { type: "uint256" }], - [ownerAddresses, salt], - ), - ); - - const initCode: Hex = getLAv2ProxyBytecode(implementationAddress); - - return getContractAddress({ - from: factoryAddress, - opcode: "CREATE2", - salt: combinedSalt, - bytecode: initCode, - }); -} - -// Bytecode from https://github.com/Vectorized/solady/blob/c6e5238e5f3b621789c59e1a443f43b6606394b2/src/utils/LibClone.sol#L721 - -function getLAv2ProxyBytecode(implementationAddress: Address): Hex { - return `0x603d3d8160223d3973${implementationAddress.slice( - 2, - )}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`; -} - -function assertNeverLightAccountVersion(version: never): never { - throw new Error(`Unknown light account version: ${version}`); -} diff --git a/account-kit/smart-contracts/src/light-account/accounts/predictAddresses.test.ts b/account-kit/smart-contracts/src/light-account/accounts/predictAddresses.test.ts deleted file mode 100644 index 788223cf8d..0000000000 --- a/account-kit/smart-contracts/src/light-account/accounts/predictAddresses.test.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { - getAccountAddress, - getEntryPoint, - LocalAccountSigner, -} from "@aa-sdk/core"; -import { - concatHex, - custom, - encodeFunctionData, - hexToBigInt, - publicActions, - type Address, -} from "viem"; -import { - predictLightAccountAddress, - predictMultiOwnerLightAccountAddress, -} from "./predictAddress.js"; -import { local060Instance, local070Instance } from "~test/instances.js"; -import { createLightAccount } from "./account.js"; -import { createMultiOwnerLightAccount } from "./multiOwner.js"; -import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; -import { LightAccountFactoryAbi_v1 } from "../abis/LightAccountFactoryAbi_v1.js"; -import type { LightAccountVersion } from "../types.js"; - -describe("Light Account Counterfactual Address Tests", () => { - const instanceV060 = local060Instance; - const instanceV070 = local070Instance; - - it.each([ - "v1.0.1", - "v1.0.2", - "v1.1.0", - ] as LightAccountVersion<"LightAccount">[])( - "LAv1 should match the entrypoint generated counterfactual address", - async (version) => { - // Repeat 20 times, with a randomized address and salt. Pseudo-fuzzing. - - for (let i = 0; i < 20; i++) { - const localSigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - - // Generate a random salt. The same generator function for private keys can be used, because it is also a 32 byte value. - const salt = BigInt(generatePrivateKey()); - - const chain = instanceV060.chain; - const entryPoint = getEntryPoint(chain, { - version: "0.6.0", // EP version, not LA version - }); - - const lightAccountV1 = await createLightAccount({ - transport: custom(instanceV060.getClient()), - signer: localSigner, - chain, - salt, - version, - }); - - // First, compute the address using the EntryPoint utility function: - const entryPointComputedAddress = await getAccountAddress({ - client: instanceV060.getClient().extend(publicActions), - entryPoint, - // cannot use lightAccountV1.getInitCode, because it silently replaces salt with 0n for non-replay-safe-1271 account versions. - getAccountInitCode: async () => { - return concatHex([ - await lightAccountV1.getFactoryAddress(), - encodeFunctionData({ - abi: LightAccountFactoryAbi_v1, - functionName: "createAccount", - args: [await localSigner.getAddress(), salt], - }), - ]); - }, - }); - - // Then, compute the address using the predictLightAccountAddress function: - - const locallyComputedAddress = predictLightAccountAddress({ - factoryAddress: await lightAccountV1.getFactoryAddress(), - salt, - ownerAddress: await localSigner.getAddress(), - version, - }); - - expect(entryPointComputedAddress).toEqual(locallyComputedAddress); - } - }, - ); - - it("LAv2 should match the entrypoint generated counterfactual address", async () => { - // Repeat 20 times, with a randomized address and salt. Pseudo-fuzzing. - - for (let i = 0; i < 20; i++) { - const localSigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - - // Generate a random salt. The same generator function for private keys can be used, because it is also a 32 byte value. - const salt = BigInt(generatePrivateKey()); - - const chain = instanceV070.chain; - const entryPoint = getEntryPoint(chain, { - version: "0.7.0", // EP version, not LA version - }); - - const lightAccountV2 = await createLightAccount({ - transport: custom(instanceV070.getClient()), - signer: localSigner, - chain, - salt, - version: "v2.0.0", - }); - - // First, compute the address using the EntryPoint utility function: - const entryPointComputedAddress = await getAccountAddress({ - client: instanceV070.getClient().extend(publicActions), - entryPoint, - // Can use the lightAccountV2.getInitCode, because it is replay-safe. - getAccountInitCode: lightAccountV2.getInitCode, - }); - - // Then, compute the address using the predictLightAccountAddress function: - const locallyComputedAddress = predictLightAccountAddress({ - factoryAddress: await lightAccountV2.getFactoryAddress(), - salt, - ownerAddress: await localSigner.getAddress(), - version: "v2.0.0", - }); - - expect(entryPointComputedAddress).toEqual(locallyComputedAddress); - } - }); - - it("MOLAv2 should match the entrypoint generated counterfactual address", async () => { - // Repeat 20 times, with a randomized address and salt. Pseudo-fuzzing. - - for (let i = 0; i < 20; i++) { - const localSigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - - const signerAddress = await localSigner.getAddress(); - - // Generate `i` random other owners. - const otherOwners: Address[] = Array.from( - { length: i }, - () => privateKeyToAccount(generatePrivateKey()).address, - ); - - // Generate a random salt. The same generator function for private keys can be used, because it is also a 32 byte value. - const salt = BigInt(generatePrivateKey()); - - const chain = instanceV070.chain; - const entryPoint = getEntryPoint(chain, { - version: "0.7.0", // EP version, not LA version - }); - - const multiOwnerLightAccount = await createMultiOwnerLightAccount({ - transport: custom(instanceV070.getClient()), - signer: localSigner, - owners: otherOwners, - chain, - salt, - accountAddress: undefined, - }); - - // First, compute the address using the EntryPoint utility function: - const entryPointComputedAddress = await getAccountAddress({ - client: instanceV070.getClient().extend(publicActions), - entryPoint, - // Can use the lightAccountV2.getInitCode, because it is replay-safe. - getAccountInitCode: multiOwnerLightAccount.getInitCode, - }); - - // Then, compute the address using the predictLightAccountAddress function. - // We must first run the logic to include the signer address, dedepe, and sort. - - const owners_ = Array.from(new Set([...otherOwners, signerAddress])) - .filter((x) => hexToBigInt(x) !== 0n) - .sort((a, b) => { - const bigintA = hexToBigInt(a); - const bigintB = hexToBigInt(b); - - return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0; - }); - - const locallyComputedAddress = predictMultiOwnerLightAccountAddress({ - factoryAddress: await multiOwnerLightAccount.getFactoryAddress(), - salt, - ownerAddresses: owners_, - }); - - expect(entryPointComputedAddress).toEqual(locallyComputedAddress); - } - }); -}); diff --git a/account-kit/smart-contracts/src/light-account/actions/transferOwnership.ts b/account-kit/smart-contracts/src/light-account/actions/transferOwnership.ts deleted file mode 100644 index c3fd238f2d..0000000000 --- a/account-kit/smart-contracts/src/light-account/actions/transferOwnership.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - isSmartAccountClient, - type GetAccountParameter, - type GetEntryPointFromAccount, - type SmartAccountSigner, - type UserOperationOverridesParameter, -} from "@aa-sdk/core"; -import type { Chain, Client, Hex, Transport } from "viem"; -import type { LightAccount } from "../accounts/account"; - -export type TransferLightAccountOwnershipParams< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends LightAccount | undefined = - | LightAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - newOwner: TSigner; - waitForTxn?: boolean; -} & GetAccountParameter> & - UserOperationOverridesParameter; - -/** - * Transfers the ownership of a light account to a new owner. - * This function ensures that the client is a compatible smart acccount client and that a Light Account is provided. - * If the waitForTxn parameter is true, it will wait for the transaction to be completed before returning. - * - * @example - * ```ts - * import { transferOwnership, createLightAccountClient } from "@account-kit/smart-contracts"; - * - * const lightAccountClient = createLightAccountClient({ - * signer, - * transport, - * chain, - * }); - * - * const txHash = await transferOwnership(lightAccountClient, { - * newOwner: newOwnerSigner, - * waitForTxn: true, // set to false to return a uoHash instead - * }); - * ``` - * - * @param {Client} client The smart account client instance used to execute the transfer - * @param {TransferLightAccountOwnershipParams} args The parameters for transferring ownership - * @returns {Promise} The transaction or UO hash as a Hex string - */ -export const transferOwnership = async < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends LightAccount | undefined = - | LightAccount - | undefined, ->( - client: Client, - args: TransferLightAccountOwnershipParams, -): Promise => { - const { newOwner, waitForTxn, overrides, account = client.account } = args; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "transferOwnership", - client, - ); - } - - const data = account.encodeTransferOwnership(await newOwner.getAddress()); - - const result = await client.sendUserOperation({ - uo: { - target: account.address, - data, - }, - account, - overrides, - }); - - if (waitForTxn) { - return client.waitForUserOperationTransaction(result); - } - - return result.hash; -}; diff --git a/account-kit/smart-contracts/src/light-account/actions/updateOwners.ts b/account-kit/smart-contracts/src/light-account/actions/updateOwners.ts deleted file mode 100644 index 6eff177b73..0000000000 --- a/account-kit/smart-contracts/src/light-account/actions/updateOwners.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - isSmartAccountClient, - type GetAccountParameter, - type GetEntryPointFromAccount, - type SmartAccountSigner, - type UserOperationOverridesParameter, -} from "@aa-sdk/core"; -import type { Address, Chain, Client, Hex, Transport } from "viem"; -import type { MultiOwnerLightAccount } from "../accounts/multiOwner"; - -export type UpdateMultiOwnerLightAccountOwnersParams< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends MultiOwnerLightAccount | undefined = - | MultiOwnerLightAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - ownersToAdd: Address[]; - ownersToRemove: Address[]; - waitForTxn?: boolean; -} & GetAccountParameter> & - UserOperationOverridesParameter; - -/** - * Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones. - * - * @example - * ```ts - * import { updateOwners, createLightAccountClient } from "@account-kit/smart-contracts"; - * - * const lightAccountClient = createLightAccountClient({ - * signer, - * transport, - * chain, - * }); - * - * const txHash = await updateOwners(lightAccountClient, { - * ownerstoAdd: [newOwnerAddress], // or empty if you just want to remove owners - * ownersToRemove: [oldOwnerAddress], // or empty if you just want to add owners - * waitForTxn: true, // set to false to return a uoHash instead - * }); - * ``` - * - * @param {Client} client The client instance used to interact with the account - * @param {UpdateMultiOwnerLightAccountOwnersParams} args The parameters for updating the account owners - * @returns {Promise} A promise that resolves to the transaction hash or the full transaction result if `waitForTxn` is `true` - */ -export const updateOwners: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends MultiOwnerLightAccount | undefined = - | MultiOwnerLightAccount - | undefined, ->( - client: Client, - args: UpdateMultiOwnerLightAccountOwnersParams, -) => Promise = async ( - client, - { - ownersToAdd, - ownersToRemove, - waitForTxn, - overrides, - account = client.account, - }, -) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "updateOwners", - client, - ); - } - - const data = account.encodeUpdateOwners(ownersToAdd, ownersToRemove); - - const result = await client.sendUserOperation({ - uo: { - target: account.address, - data, - }, - account, - overrides, - }); - - if (waitForTxn) { - return client.waitForUserOperationTransaction(result); - } - - return result.hash; -}; diff --git a/account-kit/smart-contracts/src/light-account/clients/__snapshots__/alchemyClient.test.ts.snap b/account-kit/smart-contracts/src/light-account/clients/__snapshots__/alchemyClient.test.ts.snap deleted file mode 100644 index 10a1f365a5..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/__snapshots__/alchemyClient.test.ts.snap +++ /dev/null @@ -1,96 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Light Account Client Tests > should correctly do runtime validation when connection config is invalid 1`] = ` -[ZodError: [ - { - "code": "invalid_union", - "unionErrors": [ - { - "issues": [ - { - "code": "invalid_type", - "expected": "never", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected never, received number" - }, - { - "code": "invalid_type", - "expected": "string", - "received": "undefined", - "path": [ - "apiKey" - ], - "message": "Required" - } - ], - "name": "ZodError" - }, - { - "issues": [ - { - "code": "invalid_type", - "expected": "never", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected never, received number" - }, - { - "code": "invalid_type", - "expected": "string", - "received": "undefined", - "path": [ - "jwt" - ], - "message": "Required" - } - ], - "name": "ZodError" - }, - { - "issues": [ - { - "code": "invalid_type", - "expected": "string", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected string, received number" - } - ], - "name": "ZodError" - }, - { - "issues": [ - { - "code": "invalid_type", - "expected": "string", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected string, received number" - }, - { - "code": "invalid_type", - "expected": "string", - "received": "undefined", - "path": [ - "jwt" - ], - "message": "Required" - } - ], - "name": "ZodError" - } - ], - "path": [], - "message": "Invalid input" - } -]] -`; diff --git a/account-kit/smart-contracts/src/light-account/clients/__snapshots__/lightAccountClient.test.ts.snap b/account-kit/smart-contracts/src/light-account/clients/__snapshots__/lightAccountClient.test.ts.snap deleted file mode 100644 index d6df27a0d5..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/__snapshots__/lightAccountClient.test.ts.snap +++ /dev/null @@ -1,96 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Light Account Client Tests > should correctly do runtime validation when connection config is invalid 1`] = ` -"[ - { - \\"code\\": \\"invalid_union\\", - \\"unionErrors\\": [ - { - \\"issues\\": [ - { - \\"code\\": \\"invalid_type\\", - \\"expected\\": \\"never\\", - \\"received\\": \\"number\\", - \\"path\\": [ - \\"rpcUrl\\" - ], - \\"message\\": \\"Expected never, received number\\" - }, - { - \\"code\\": \\"invalid_type\\", - \\"expected\\": \\"string\\", - \\"received\\": \\"undefined\\", - \\"path\\": [ - \\"apiKey\\" - ], - \\"message\\": \\"Required\\" - } - ], - \\"name\\": \\"ZodError\\" - }, - { - \\"issues\\": [ - { - \\"code\\": \\"invalid_type\\", - \\"expected\\": \\"never\\", - \\"received\\": \\"number\\", - \\"path\\": [ - \\"rpcUrl\\" - ], - \\"message\\": \\"Expected never, received number\\" - }, - { - \\"code\\": \\"invalid_type\\", - \\"expected\\": \\"string\\", - \\"received\\": \\"undefined\\", - \\"path\\": [ - \\"jwt\\" - ], - \\"message\\": \\"Required\\" - } - ], - \\"name\\": \\"ZodError\\" - }, - { - \\"issues\\": [ - { - \\"code\\": \\"invalid_type\\", - \\"expected\\": \\"string\\", - \\"received\\": \\"number\\", - \\"path\\": [ - \\"rpcUrl\\" - ], - \\"message\\": \\"Expected string, received number\\" - } - ], - \\"name\\": \\"ZodError\\" - }, - { - \\"issues\\": [ - { - \\"code\\": \\"invalid_type\\", - \\"expected\\": \\"string\\", - \\"received\\": \\"number\\", - \\"path\\": [ - \\"rpcUrl\\" - ], - \\"message\\": \\"Expected string, received number\\" - }, - { - \\"code\\": \\"invalid_type\\", - \\"expected\\": \\"string\\", - \\"received\\": \\"undefined\\", - \\"path\\": [ - \\"jwt\\" - ], - \\"message\\": \\"Required\\" - } - ], - \\"name\\": \\"ZodError\\" - } - ], - \\"path\\": [], - \\"message\\": \\"Invalid input\\" - } -]" -`; diff --git a/account-kit/smart-contracts/src/light-account/clients/__snapshots__/multiOwnerAlchemyClient.test.ts.snap b/account-kit/smart-contracts/src/light-account/clients/__snapshots__/multiOwnerAlchemyClient.test.ts.snap deleted file mode 100644 index e43f2dd72c..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/__snapshots__/multiOwnerAlchemyClient.test.ts.snap +++ /dev/null @@ -1,96 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`MultiOwnerLightAccount Client Tests > should correctly do runtime validation when connection config is invalid 1`] = ` -[ZodError: [ - { - "code": "invalid_union", - "unionErrors": [ - { - "issues": [ - { - "code": "invalid_type", - "expected": "never", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected never, received number" - }, - { - "code": "invalid_type", - "expected": "string", - "received": "undefined", - "path": [ - "apiKey" - ], - "message": "Required" - } - ], - "name": "ZodError" - }, - { - "issues": [ - { - "code": "invalid_type", - "expected": "never", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected never, received number" - }, - { - "code": "invalid_type", - "expected": "string", - "received": "undefined", - "path": [ - "jwt" - ], - "message": "Required" - } - ], - "name": "ZodError" - }, - { - "issues": [ - { - "code": "invalid_type", - "expected": "string", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected string, received number" - } - ], - "name": "ZodError" - }, - { - "issues": [ - { - "code": "invalid_type", - "expected": "string", - "received": "number", - "path": [ - "rpcUrl" - ], - "message": "Expected string, received number" - }, - { - "code": "invalid_type", - "expected": "string", - "received": "undefined", - "path": [ - "jwt" - ], - "message": "Required" - } - ], - "name": "ZodError" - } - ], - "path": [], - "message": "Invalid input" - } -]] -`; diff --git a/account-kit/smart-contracts/src/light-account/clients/alchemyClient.test.ts b/account-kit/smart-contracts/src/light-account/clients/alchemyClient.test.ts deleted file mode 100644 index 84e676788c..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/alchemyClient.test.ts +++ /dev/null @@ -1,158 +0,0 @@ -import * as AACoreModule from "@aa-sdk/core"; -import { - LocalAccountSigner, - type BatchUserOperationCallData, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { - alchemy, - createAlchemySmartAccountClient, - polygonMumbai, -} from "@account-kit/infra"; -import { alchemyEnhancedApiActions } from "@account-kit/infra/enhanced-apis"; -import { Alchemy, Network } from "alchemy-sdk"; -import { avalanche, type Chain } from "viem/chains"; -import { createLightAccountClient } from "./client.js"; - -describe("Light Account Client Tests", () => { - const dummyMnemonic = - "test test test test test test test test test test test test"; - const signer = LocalAccountSigner.mnemonicToAccountSigner(dummyMnemonic); - const chain = polygonMumbai; - - it("should have a JWT property", async () => { - const spy = vi.spyOn(AACoreModule, "createBundlerClient"); - await givenConnectedProvider({ signer, chain }); - expect(spy.mock.results[0].value.transport).toMatchInlineSnapshot( - { - alchemyRpcUrl: "https://polygon-mumbai.g.alchemy.com/v2", - fetchOptions: { - headers: { - "Alchemy-Aa-Sdk-Signer": "local", - "Alchemy-AA-Sdk-Version": expect.any(String), - Authorization: "Bearer test", - }, - }, - key: "alchemy", - methods: undefined, - name: "Alchemy Transport", - request: expect.any(Function), - retryCount: 0, - retryDelay: 150, - timeout: undefined, - type: "alchemy", - }, - ` - { - "alchemyRpcUrl": "https://polygon-mumbai.g.alchemy.com/v2", - "fetchOptions": { - "headers": { - "Alchemy-AA-Sdk-Version": Any, - "Alchemy-Aa-Sdk-Signer": "local", - "Authorization": "Bearer test", - }, - }, - "key": "alchemy", - "methods": undefined, - "name": "Alchemy Transport", - "request": Any, - "retryCount": 0, - "retryDelay": 150, - "timeout": undefined, - "type": "alchemy", - } - `, - ); - }); - - it("should correctly encode batch transaction data", async () => { - const provider = await givenConnectedProvider({ signer, chain }); - const account = provider.account; - const data = [ - { - target: "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", - data: "0xdeadbeef", - }, - { - target: "0x8ba1f109551bd432803012645ac136ddd64dba72", - data: "0xcafebabe", - }, - ] satisfies BatchUserOperationCallData; - - expect(await account.encodeBatchExecute(data)).toMatchInlineSnapshot( - '"0x47e1da2a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef0000000000000000000000008ba1f109551bd432803012645ac136ddd64dba720000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004cafebabe00000000000000000000000000000000000000000000000000000000"', - ); - }); - - it.each([ - { rpcUrl: "/api" }, - { jwt: "test" }, - { apiKey: "key" }, - { rpcUrl: "/api", jwt: "jwt" }, - ])("should successfully create a provider", (args) => { - expect(() => - createAlchemySmartAccountClient({ - transport: alchemy({ - ...args, - }), - chain, - }), - ).not.toThrowError(); - }); - - it("should correctly do runtime validation when connection config is invalid", () => { - expect(() => - createAlchemySmartAccountClient({ - transport: alchemy({ rpcUrl: 1 as unknown as string }), - chain, - }), - ).toThrowErrorMatchingSnapshot(); - }); - - it("should correctly do runtime validation when chain is not supported by Alchemy", async () => { - await expect(() => { - return givenConnectedProvider({ signer, chain: avalanche }); - }).rejects.toThrowErrorMatchingInlineSnapshot(` - [ZodError: [ - { - "code": "custom", - "message": "chain must include an alchemy rpc url. See \`defineAlchemyChain\` or import a chain from \`@account-kit/infra\`.", - "fatal": true, - "path": [] - } - ]] - `); - }); - - it("should hanve enhanced api properties on the provider", async () => { - const alchemy = new Alchemy({ - network: Network.MATIC_MUMBAI, - apiKey: "test", - }); - - const provider = (await givenConnectedProvider({ signer, chain })).extend( - alchemyEnhancedApiActions(alchemy), - ); - - expect(provider.account).toBeDefined(); - expect(provider.waitForUserOperationTransaction).toBeDefined(); - expect(provider.sendUserOperation).toBeDefined(); - expect(provider.core).toBeDefined(); - }); - - const givenConnectedProvider = async ({ - signer, - chain, - }: { - signer: SmartAccountSigner; - chain: Chain; - }) => - createLightAccountClient({ - transport: alchemy({ - jwt: "test", - }), - chain, - signer, - accountAddress: "0x86f3B0211764971Ad0Fc8C8898d31f5d792faD84", - }); -}); diff --git a/account-kit/smart-contracts/src/light-account/clients/alchemyClient.ts b/account-kit/smart-contracts/src/light-account/clients/alchemyClient.ts deleted file mode 100644 index 1595c81189..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/alchemyClient.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core"; -import { - type AlchemySmartAccountClient, - type AlchemySmartAccountClientConfig, -} from "@account-kit/infra"; -import { - createLightAccountClient, - type CreateLightAccountParams, - type LightAccount, - type LightAccountClientActions, -} from "@account-kit/smart-contracts"; -import { type Chain } from "viem"; - -export type AlchemyLightAccountClientConfig< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Omit, "transport"> & - Omit< - AlchemySmartAccountClientConfig>, - "account" - >; - -export async function createLightAccountAlchemyClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyLightAccountClientConfig, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - LightAccount, - LightAccountClientActions - > ->; - -/** - * Creates an Alchemy smart account client connected to a Light Account instance. - * - * @example - * ```ts - * import { createLightAccountAlchemyClient } from "@account-kit/smart-contracts"; - * import { sepolia, alchemy } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const lightAccountClient = await createLightAccountAlchemyClient({ - * transport: alchemy({ apiKey: "your-api-key" }), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * @deprecated Use createLightAccountClient instead now, it should switch depending on the transport - * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client - * @returns {Promise} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client - */ -export async function createLightAccountAlchemyClient({ - opts, - transport, - chain, - ...config -}: AlchemyLightAccountClientConfig): Promise { - return createLightAccountClient({ - opts, - transport, - chain, - ...config, - }); -} diff --git a/account-kit/smart-contracts/src/light-account/clients/client.test-d.ts b/account-kit/smart-contracts/src/light-account/clients/client.test-d.ts deleted file mode 100644 index 390d4ee404..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/client.test-d.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { - erc7677Middleware, - LocalAccountSigner, - type SmartAccountClient, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { - custom, - type Address, - type Chain, - type Client, - type CustomTransport, -} from "viem"; -import { accounts } from "~test/constants.js"; -import { local060Instance } from "~test/instances.js"; -import type { LightAccountVersion } from "../types.js"; -import { createLightAccountClient } from "./client.js"; -import { - alchemy, - polygonMumbai, - type AlchemyTransport, - type AlchemySmartAccountClient, -} from "@account-kit/infra"; -import { - alchemyEnhancedApiActions, - type AlchemyEnhancedApis, -} from "@account-kit/infra/enhanced-apis"; -import { Alchemy, Network } from "alchemy-sdk"; - -describe("Types: Light Account Tests", () => { - const instance = local060Instance; - const signer: SmartAccountSigner = new LocalAccountSigner( - accounts.fundedAccountOwner, - ); - - const givenConnectedProvider = ({ - signer, - version = "v1.1.0", - accountAddress, - usePaymaster = false, - }: { - signer: SmartAccountSigner; - version?: LightAccountVersion<"LightAccount">; - usePaymaster?: boolean; - accountAddress?: Address; - }) => - createLightAccountClient({ - signer, - accountAddress, - version, - transport: custom(instance.getClient()), - chain: instance.chain, - ...(usePaymaster ? erc7677Middleware() : {}), - }); - - const givenAlchemyConnectedProvider = async ({ - signer, - chain, - }: { - signer: SmartAccountSigner; - chain: Chain; - }) => - createLightAccountClient({ - transport: alchemy({ - jwt: "test", - }), - chain, - signer, - accountAddress: "0x86f3B0211764971Ad0Fc8C8898d31f5d792faD84", - }); - it("Should have some alchemy specific types", async () => { - const alchemy = new Alchemy({ - network: Network.MATIC_MUMBAI, - apiKey: "test", - }); - const chain = polygonMumbai; - - const provider = ( - await givenAlchemyConnectedProvider({ signer, chain }) - ).extend(alchemyEnhancedApiActions(alchemy)); - - assertType>(provider); - assertType(provider); - assertType(provider); - assertType(provider); - assertType( - // @ts-expect-error - await givenAlchemyConnectedProvider({ signer, chain }), - ); - // @ts-expect-error - assertType>(provider); - }); - it("Should have some non-alchemy specific types", async () => { - const chain = polygonMumbai; - - const signer: SmartAccountSigner = new LocalAccountSigner( - accounts.fundedAccountOwner, - ); - const provider = await givenConnectedProvider({ - signer, - version: "v1.0.1", - }); - - assertType(provider); - assertType>(provider); - assertType( - // @ts-expect-error - await givenAlchemyConnectedProvider({ signer, chain }), - ); - // @ts-expect-error - assertType>(provider); - // @ts-expect-error - assertType(provider); - // @ts-expect-error - assertType(provider); - - expect(() => { - const alchemy = new Alchemy({ - network: Network.MATIC_MUMBAI, - apiKey: "test", - }); - - // @ts-expect-error - provider.extend(alchemyEnhancedApiActions(alchemy)); - }).not.toBeFalsy(); - }); -}); diff --git a/account-kit/smart-contracts/src/light-account/clients/client.test.ts b/account-kit/smart-contracts/src/light-account/clients/client.test.ts deleted file mode 100644 index 5990de1fd2..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/client.test.ts +++ /dev/null @@ -1,544 +0,0 @@ -import { - createBundlerClient, - createSmartAccountClientFromExisting, - erc7677Middleware, - LocalAccountSigner, - type BatchUserOperationCallData, - type SmartAccountSigner, - type UserOperationCallData, - type UserOperationOverrides, - type UserOperationStruct, -} from "@aa-sdk/core"; -import { custom, fromHex, parseEther, publicActions, type Address } from "viem"; -import { setBalance } from "viem/actions"; -import { resetBalance } from "~test/accounts.js"; -import { accounts } from "~test/constants.js"; -// TODO: update the tests that just use the 060 instance to use versions + 070 instance -import { - alchemyFeeEstimator, - alchemyGasAndPaymasterAndDataMiddleware, -} from "@account-kit/infra"; -import { toHex } from "viem"; -import { generatePrivateKey } from "viem/accounts"; -import { local060Instance, local070Instance } from "~test/instances.js"; -import { multiOwnerPluginActions } from "../../msca/plugins/multi-owner/index.js"; -import { getMSCAUpgradeToData } from "../../msca/utils.js"; -import type { LightAccountVersion } from "../types.js"; -import { AccountVersionRegistry } from "../utils.js"; -import { createLightAccountClient } from "./client.js"; - -const versions = Object.keys( - AccountVersionRegistry.LightAccount, -) as LightAccountVersion<"LightAccount">[]; - -describe("Light Account Tests", () => { - let instance = local060Instance; - let client: ReturnType; - - beforeAll(async () => { - client = instance.getClient(); - }); - - const signer: SmartAccountSigner = - LocalAccountSigner.generatePrivateKeySigner(); - - it.each(versions)( - "should return correct dummy signature", - async (version) => { - const { account } = await givenConnectedProvider({ - signer, - version, - }); - switch (version) { - case "v1.0.1": - case "v1.0.2": - case "v1.1.0": - expect(account.getDummySignature()).toBe( - "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c", - ); - break; - case "v2.0.0": - expect(account.getDummySignature()).toBe( - "0x00fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c", - ); - break; - default: - throw new Error(`Unknown version ${version}`); - } - }, - ); - - it.each(versions)("should correctly sign the message", async (version) => { - const provider = await givenConnectedProvider({ - signer, - version, - }); - - const { account } = provider; - - const message = "hello world"; - switch (version) { - case "v1.0.2": - await expect(account.signMessage({ message })).rejects.toThrowError( - "Version v1.0.2 of LightAccount doesn't support 1271", - ); - break; - case "v1.0.1": - case "v1.1.0": - case "v2.0.0": - { - const signature = await account.signMessageWith6492({ - message, - }); - - // We must use a public client, rather than an account client, to verify the message, because AA-SDK incorrectly attaches the account address as a "from" field to all actions taken by that client, including the `eth_call` used internally by viem's signature verifier logic. Per EIP-684, contract creation reverts on non-zero nonce, and the `eth_call`'s from field implicitly increases the nonce of the account contract, causing the contract creation to revert. - expect( - await client.extend(publicActions).verifyMessage({ - address: account.address, - message, - signature, - }), - ).toBe(true); - } - break; - default: - throw new Error(`Unknown version ${version}`); - } - }); - - it.each(versions)("should correctly sign typed data", async (version) => { - const { account } = await givenConnectedProvider({ - signer, - version, - }); - const typedData = { - types: { - Request: [{ name: "hello", type: "string" }], - }, - primaryType: "Request", - message: { - hello: "world", - }, - } as const; - switch (version) { - case "v1.0.2": - await expect(account.signTypedData(typedData)).rejects.toThrowError( - "Version v1.0.2 of LightAccount doesn't support 1271", - ); - break; - case "v1.1.0": - case "v1.0.1": - case "v2.0.0": - { - const signature = await account.signTypedDataWith6492(typedData); - - // See above comment for context on the duplicate client. - expect( - await client.extend(publicActions).verifyTypedData({ - address: account.address, - signature, - ...typedData, - }), - ).toBe(true); - } - break; - default: - throw new Error(`Unknown version ${version}`); - } - }); - - it.each(versions)( - "should correctly encode transferOwnership data", - async (version) => { - const { account } = await givenConnectedProvider({ - signer, - version, - }); - expect( - account.encodeTransferOwnership( - "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", - ), - ).toBe( - "0xf2fde38b000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef", - ); - }, - ); - - it.each(versions)( - "should correctly encode batch transaction data", - async (version) => { - const provider = await givenConnectedProvider({ signer, version }); - const data = [ - { - target: "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", - data: "0xdeadbeef", - }, - { - target: "0x8ba1f109551bd432803012645ac136ddd64dba72", - data: "0xcafebabe", - }, - ] satisfies BatchUserOperationCallData; - - expect(await provider.account.encodeBatchExecute(data)).toBe( - "0x47e1da2a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef0000000000000000000000008ba1f109551bd432803012645ac136ddd64dba720000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004cafebabe00000000000000000000000000000000000000000000000000000000", - ); - }, - ); - - it("should successfully get counterfactual address", async () => { - const provider = await givenConnectedProvider({ - signer: new LocalAccountSigner(accounts.fundedAccountOwner), - }); - expect(provider.getAddress()).toMatchInlineSnapshot( - '"0x9EfDfCB56390eDd8b2eAE6daBC148CED3491AAf6"', - ); - }); - - it("should execute successfully", async () => { - const provider = await givenConnectedProvider({ - signer: LocalAccountSigner.generatePrivateKeySigner(), - }); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("10"), - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.account.getEntryPoint().address, - data: "0x", - value: parseEther("1"), - }, - }); - - const txnHash = provider - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: result.request, - }, - ); - return await provider.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 30_000); - - it("should fail to execute if account address is not deployed and not correct", async () => { - const accountAddress = "0xc33AbD9621834CA7c6Fc9f9CC3c47b9c17B03f9F"; - const provider = await givenConnectedProvider({ - signer, - accountAddress, - }); - - const result = provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - await expect(result).rejects.toThrowError(); - }); - - it("should successfully execute with paymaster info using erc-7677 middleware", async () => { - const provider = await givenConnectedProvider({ - signer, - paymasterMiddleware: "erc7677", - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - // @ts-expect-error this is union type when used generically, but we know it's 0.6.0 for now - // TODO: when using multiple versions, we need to check the version and cast accordingly - expect(result.request.paymasterAndData).not.toBe("0x"); - - const txnHash = provider - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: result.request, - }, - ); - return await provider.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - await expect(txnHash).resolves.not.toThrowError(); - }); - - it("should successfully execute with paymaster info using alchemy paymaster middleware", async () => { - const provider = await givenConnectedProvider({ - signer, - paymasterMiddleware: "alchemyGasAndPaymasterAndData", - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - // @ts-expect-error this is union type when used generically, but we know it's 0.6.0 for now - // TODO: when using multiple versions, we need to check the version and cast accordingly - expect(result.request.paymasterAndData).not.toBe("0x"); - - const txnHash = provider - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: result.request, - }, - ); - return await provider.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - await expect(txnHash).resolves.not.toThrowError(); - }); - - it("should bypass paymaster when paymasterAndData of user operation overrides is set to 0x using erc-7677 middleware", async () => { - const provider = await givenConnectedProvider({ - signer, - paymasterMiddleware: "erc7677", - }); - - // set the value to 0 so that we can capture an error in sending the uo - await resetBalance(provider, instance.getClient()); - - const toSend = { - uo: { - target: provider.getAddress(), - data: "0x", - } as UserOperationCallData, - overrides: { - paymasterAndData: "0x", // bypass paymaster - } as UserOperationOverrides<"0.6.0">, - }; - const uoStruct = (await provider.buildUserOperation( - toSend, - )) as UserOperationStruct<"0.6.0">; - - expect(uoStruct.paymasterAndData).toBe("0x"); - - await expect(provider.sendUserOperation(toSend)).rejects.toThrowError(); - }); - - it.each(versions)( - "should override nonce key when nonce key of user operation overrides is set for version %s", - async (version) => { - instance = version !== "v2.0.0" ? local060Instance : local070Instance; // v2 uses EP0.7 - const provider = await givenConnectedProvider({ - signer, - paymasterMiddleware: "erc7677", - version, - }); - - // set the value to 0 so that we can capture an error in sending the uo - await resetBalance(provider, instance.getClient()); - - const toSend = { - uo: { - target: provider.getAddress(), - data: "0x", - } as UserOperationCallData, - overrides: { - nonceKey: fromHex("0x12", "bigint"), - }, - }; - const uoStruct = await provider.buildUserOperation(toSend); - - expect(toHex(uoStruct.nonce).startsWith("0x12")).toBe(true); - const result = await provider.sendUserOperation(toSend); - - await expect( - provider.waitForUserOperationTransaction(result), - ).resolves.not.toThrowError(); - - // reset the instance - instance = local060Instance; - }, - ); - - it("should bypass paymaster when paymasterAndData of user operation overrides is set to 0x using alchemy paymaster middleware", async () => { - const provider = await givenConnectedProvider({ - signer, - paymasterMiddleware: "alchemyGasAndPaymasterAndData", - }); - - // set the value to 0 so that we can capture an error in sending the uo - await resetBalance(provider, instance.getClient()); - - const toSend = { - uo: { - target: provider.getAddress(), - data: "0x", - } as UserOperationCallData, - overrides: { - paymasterAndData: "0x", // bypass paymaster - } as UserOperationOverrides<"0.6.0">, - }; - const uoStruct = (await provider.buildUserOperation( - toSend, - )) as UserOperationStruct<"0.6.0">; - - expect(uoStruct.paymasterAndData).toBe("0x"); - - await expect(provider.sendUserOperation(toSend)).rejects.toThrowError(); - }); - - it("should transfer ownership successfully", async () => { - // create a throwaway address - const throwawaySigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - const throwawayClient = await givenConnectedProvider({ - signer: throwawaySigner, - }); - - // fund the throwaway address - await setBalance(client, { - address: throwawayClient.getAddress(), - value: 200000000000000000n, - }); - - // create new signer and transfer ownership - const newOwner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - - await throwawayClient.transferOwnership({ - newOwner, - waitForTxn: true, - }); - - const newOwnerClient = await givenConnectedProvider({ - signer: newOwner, - accountAddress: throwawayClient.getAddress(), - }); - - const newOwnerAddress = await newOwnerClient.account.getOwnerAddress(); - - expect(newOwnerAddress).not.toBe(await throwawaySigner.getAddress()); - expect(newOwnerAddress).toBe(await newOwner.getAddress()); - }, 100000); - - it("should upgrade a deployed light account to msca successfully", async () => { - // create a owner signer to create the account - const throwawaySigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - const throwawayClient = await givenConnectedProvider({ - signer: throwawaySigner, - }); - - const accountAddress = throwawayClient.getAddress(); - const ownerAddress = await throwawaySigner.getAddress(); - - // fund + deploy the throwaway address - await setBalance(client, { - address: accountAddress, - value: 200000000000000000n, - }); - - const { createMAAccount, ...upgradeToData } = await getMSCAUpgradeToData( - throwawayClient, - { - account: throwawayClient.account, - multiOwnerPluginAddress: "0xcE0000007B008F50d762D155002600004cD6c647", - }, - ); - - await throwawayClient.upgradeAccount({ - upgradeTo: upgradeToData, - waitForTx: true, - }); - - const upgradedClient = createSmartAccountClientFromExisting({ - client: createBundlerClient({ - chain: instance.chain, - transport: custom(client), - }), - account: await createMAAccount(), - }).extend(multiOwnerPluginActions); - - const upgradedAccountAddress = upgradedClient.getAddress(); - - const owners = await upgradedClient.readOwners({ - account: upgradedClient.account, - pluginAddress: "0xcE0000007B008F50d762D155002600004cD6c647", - }); - - expect(upgradedAccountAddress).toBe(accountAddress); - expect(owners).toContain(ownerAddress); - }, 200000); - - it.each(versions)( - "should expose prepare and format functions that work", - async (version) => { - if (version !== "v1.0.2") { - const provider = await givenConnectedProvider({ signer, version }); - const message = "hello world"; - - const { type, data } = await provider.account.prepareSign({ - type: "personal_sign", - data: message, - }); - - const signature = await provider.account.formatSign( - await (type === "personal_sign" - ? provider.account.getSigner().signMessage(data) - : provider.account.getSigner().signTypedData(data)), - ); - - const fullSignature = await provider.signMessage({ message }); - - // We use `includes` to check against 6492, and slice to remove the 0x prefix - expect(fullSignature.includes(signature.slice(2))).toBe(true); - } - }, - ); - - const givenConnectedProvider = ({ - signer, - version = "v1.1.0", - accountAddress, - paymasterMiddleware, - }: { - signer: SmartAccountSigner; - version?: LightAccountVersion<"LightAccount">; - paymasterMiddleware?: "alchemyGasAndPaymasterAndData" | "erc7677"; - accountAddress?: Address; - }) => - createLightAccountClient({ - signer, - accountAddress, - version, - transport: custom(instance.getClient()), - chain: instance.chain, - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - ...(paymasterMiddleware === "alchemyGasAndPaymasterAndData" - ? alchemyGasAndPaymasterAndDataMiddleware({ - policyId: "FAKE_POLICY_ID", - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - transport: custom(instance.getClient()), - }) - : paymasterMiddleware === "erc7677" - ? erc7677Middleware() - : {}), - }); -}); diff --git a/account-kit/smart-contracts/src/light-account/clients/client.ts b/account-kit/smart-contracts/src/light-account/clients/client.ts deleted file mode 100644 index fb48434884..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/client.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { - createSmartAccountClient, - type NotType, - type SmartAccountClient, - type SmartAccountClientActions, - type SmartAccountClientConfig, - type SmartAccountSigner, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Chain, type CustomTransport, type Transport } from "viem"; -import { - createLightAccount, - type CreateLightAccountParams, - type LightAccount, -} from "@account-kit/smart-contracts"; -import { - lightAccountClientActions, - type LightAccountClientActions, -} from "../decorators/lightAccount.js"; -import { - isAlchemyTransport, - createAlchemySmartAccountClient, - type AlchemySmartAccountClient, - type AlchemyTransport, -} from "@account-kit/infra"; -import { type AlchemyLightAccountClientConfig } from "./alchemyClient.js"; - -export type CreateLightAccountClientParams< - TTransport extends Transport | AlchemyTransport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = { - transport: CreateLightAccountParams["transport"]; - chain: CreateLightAccountParams["chain"]; -} & Omit, "transport" | "chain"> & - Omit< - SmartAccountClientConfig, - "transport" | "account" | "chain" - >; - -export function createLightAccountClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyLightAccountClientConfig & { - transport: AlchemyTransport; - }, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - LightAccount, - LightAccountClientActions - > ->; -export function createLightAccountClient< - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TTransport extends Transport = Transport, ->( - args: CreateLightAccountClientParams & - NotType, -): Promise< - SmartAccountClient< - CustomTransport, - TChain, - LightAccount, - SmartAccountClientActions & - LightAccountClientActions> - > ->; - -/** - * Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions. - * - * Also, we modified the return type to be the light account alchemy client if the transport is alchemy. - * - * @example - * ```ts - * import { createLightAccountClient } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http, generatePrivateKey } from "viem" - * - * const account = await createLightAccountClient({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * @example - * ```ts - * import { createLightAccountClient } from "@account-kit/smart-contracts"; - * import { sepolia, alchemy } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const lightAlchemyAccountClient = await createLightAccountClient({ - * transport: alchemy({ apiKey: "your-api-key" }), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @param {CreateLightAccountClientParams} params The parameters for creating a light account client - * @returns {Promise} A promise that resolves to a `SmartAccountClient` object containing the created account information and methods - */ -export async function createLightAccountClient( - params: CreateLightAccountClientParams, -): Promise { - const { transport, chain } = params; - - const lightAccount = await createLightAccount({ - ...params, - transport, - chain, - }); - if (isAlchemyTransport(transport, chain)) { - return createAlchemySmartAccountClient({ - ...params, - transport, - chain, - account: lightAccount, - }).extend(lightAccountClientActions); - } - - return createSmartAccountClient({ - ...params, - transport, - chain: chain, - account: lightAccount, - }).extend(lightAccountClientActions); -} diff --git a/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.test.ts b/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.test.ts deleted file mode 100644 index 92db06e4cd..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.test.ts +++ /dev/null @@ -1,160 +0,0 @@ -import * as AACoreModule from "@aa-sdk/core"; -import { - LocalAccountSigner, - type BatchUserOperationCallData, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { - alchemy, - arbitrumSepolia, - createAlchemySmartAccountClient, -} from "@account-kit/infra"; -import { alchemyEnhancedApiActions } from "@account-kit/infra/enhanced-apis"; -import { Alchemy, Network } from "alchemy-sdk"; -import { avalanche, type Chain } from "viem/chains"; -import { createMultiOwnerLightAccountClient } from "./multiOwnerLightAccount.js"; - -describe("MultiOwnerLightAccount Client Tests", () => { - const dummyMnemonic = - "test test test test test test test test test test test test"; - const signer = LocalAccountSigner.mnemonicToAccountSigner(dummyMnemonic); - const chain = arbitrumSepolia; - - it("should have a JWT property", async () => { - const spy = vi.spyOn(AACoreModule, "createBundlerClient"); - await givenConnectedProvider({ signer, chain }); - expect(spy.mock.results[0].value.transport).toMatchInlineSnapshot( - { - alchemyRpcUrl: "https://arb-sepolia.g.alchemy.com/v2", - fetchOptions: { - headers: { - "Alchemy-AA-Sdk-Version": expect.any(String), - "Alchemy-Aa-Sdk-Signer": "local", - Authorization: "Bearer test", - }, - }, - key: "alchemy", - methods: undefined, - name: "Alchemy Transport", - request: expect.any(Function), - retryCount: 0, - retryDelay: 150, - timeout: undefined, - type: "alchemy", - }, - ` - { - "alchemyRpcUrl": "https://arb-sepolia.g.alchemy.com/v2", - "fetchOptions": { - "headers": { - "Alchemy-AA-Sdk-Version": Any, - "Alchemy-Aa-Sdk-Signer": "local", - "Authorization": "Bearer test", - }, - }, - "key": "alchemy", - "methods": undefined, - "name": "Alchemy Transport", - "request": Any, - "retryCount": 0, - "retryDelay": 150, - "timeout": undefined, - "type": "alchemy", - } - `, - ); - }); - - it("should correctly encode batch transaction data", async () => { - const provider = await givenConnectedProvider({ signer, chain }); - const account = provider.account; - const data = [ - { - target: "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", - data: "0xdeadbeef", - }, - { - target: "0x8ba1f109551bd432803012645ac136ddd64dba72", - data: "0xcafebabe", - }, - ] satisfies BatchUserOperationCallData; - - expect(await account.encodeBatchExecute(data)).toMatchInlineSnapshot( - '"0x47e1da2a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef0000000000000000000000008ba1f109551bd432803012645ac136ddd64dba720000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004cafebabe00000000000000000000000000000000000000000000000000000000"', - ); - }); - - it.each([ - { rpcUrl: "/api" }, - { jwt: "test" }, - { apiKey: "key" }, - { rpcUrl: "/api", jwt: "jwt" }, - ])("should successfully create a provider", (args) => { - expect(() => - createAlchemySmartAccountClient({ - transport: alchemy({ - ...args, - }), - chain, - }), - ).not.toThrowError(); - }); - - it("should correctly do runtime validation when connection config is invalid", () => { - expect(() => - createAlchemySmartAccountClient({ - transport: alchemy({ - rpcUrl: 1 as unknown as string, - }), - chain, - }), - ).toThrowErrorMatchingSnapshot(); - }); - - it("should correctly do runtime validation when chain is not supported by Alchemy", async () => { - await expect(() => { - return givenConnectedProvider({ signer, chain: avalanche }); - }).rejects.toThrowErrorMatchingInlineSnapshot(` - [ZodError: [ - { - "code": "custom", - "message": "chain must include an alchemy rpc url. See \`defineAlchemyChain\` or import a chain from \`@account-kit/infra\`.", - "fatal": true, - "path": [] - } - ]] - `); - }); - - it("should have enhanced api properties on the provider", async () => { - const alchemy = new Alchemy({ - network: Network.MATIC_MUMBAI, - apiKey: "test", - }); - - const provider = (await givenConnectedProvider({ signer, chain })).extend( - alchemyEnhancedApiActions(alchemy), - ); - - expect(provider.account).toBeDefined(); - expect(provider.waitForUserOperationTransaction).toBeDefined(); - expect(provider.sendUserOperation).toBeDefined(); - expect(provider.core).toBeDefined(); - }); - - const givenConnectedProvider = async ({ - signer, - chain, - }: { - signer: SmartAccountSigner; - chain: Chain; - }) => - createMultiOwnerLightAccountClient({ - transport: alchemy({ - jwt: "test", - }), - chain, - signer, - accountAddress: "0x86f3B0211764971Ad0Fc8C8898d31f5d792faD84", - }); -}); diff --git a/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.ts b/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.ts deleted file mode 100644 index 6f88bb91e9..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core"; -import { - type AlchemySmartAccountClient, - type AlchemySmartAccountClientConfig, -} from "@account-kit/infra"; -import { - createMultiOwnerLightAccountClient, - type CreateMultiOwnerLightAccountParams, - type MultiOwnerLightAccount, - type MultiOwnerLightAccountClientActions, -} from "@account-kit/smart-contracts"; -import { type Chain } from "viem"; - -export type AlchemyMultiOwnerLightAccountClientConfig< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Omit< - CreateMultiOwnerLightAccountParams, - "transport" | "type" -> & - Omit< - AlchemySmartAccountClientConfig>, - "account" - >; - -export async function createMultiOwnerLightAccountAlchemyClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyMultiOwnerLightAccountClientConfig, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - MultiOwnerLightAccount, - MultiOwnerLightAccountClientActions - > ->; - -/** - * Creates a multi-owner light account Alchemy client using the provided configuration. - * - * @example - * ```ts - * import { createMultiOwnerLightAccountAlchemyClient } from "@account-kit/smart-contracts"; - * import { sepolia, alchemy } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const lightAccountClient = await createMultiOwnerLightAccountAlchemyClient({ - * transport: alchemy({ - * apiKey: "your-api-key", - * }), - * chain: sepolia - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @deprecated Use createMultiOwnerLightAccountAlchemyClient instead now, it should switch depending on the transport - * @param {AlchemyMultiOwnerLightAccountClientConfig} config The configuration for creating the Alchemy client - * @returns {Promise} A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods - */ -export async function createMultiOwnerLightAccountAlchemyClient({ - opts, - transport, - chain, - ...config -}: AlchemyMultiOwnerLightAccountClientConfig): Promise { - return createMultiOwnerLightAccountClient({ - opts, - transport, - chain, - ...config, - }); -} diff --git a/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.test-d.ts b/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.test-d.ts deleted file mode 100644 index 3c2fb6b827..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.test-d.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { - createBundlerClient, - createSmartAccountClientFromExisting, - erc7677Middleware, - LocalAccountSigner, - type Address, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { custom, type Chain } from "viem"; -import { generatePrivateKey } from "viem/accounts"; -import { setBalance } from "viem/actions"; -import { accounts } from "~test/constants.js"; -import { local070Instance } from "~test/instances.js"; -import { multiOwnerPluginActions } from "../../msca/plugins/multi-owner/index.js"; -import { getMSCAUpgradeToData } from "../../msca/utils.js"; -import type { LightAccountVersion } from "../types"; -import { createMultiOwnerLightAccountClient } from "./multiOwnerLightAccount.js"; -import { alchemy, arbitrumSepolia } from "@account-kit/infra"; -import { Alchemy, Network } from "alchemy-sdk"; -import { alchemyEnhancedApiActions } from "@account-kit/infra/enhanced-apis"; - -describe("Types: MultiOwner Light Account Tests", () => { - const instance = local070Instance; - let client: ReturnType; - - beforeAll(async () => { - client = instance.getClient(); - }); - - const signer: SmartAccountSigner = new LocalAccountSigner( - accounts.fundedAccountOwner, - ); - - it("should upgrade a deployed multi owner light account to msca successfully", async () => { - // create a owner signer to create the account - const throwawaySigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - const throwawayClient = await givenConnectedProvider({ - signer: throwawaySigner, - }); - - const accountAddress = throwawayClient.getAddress(); - const ownerAddress = await throwawaySigner.getAddress(); - - // fund + deploy the throwaway address - await setBalance(client, { - address: accountAddress, - value: 200000000000000000n, - }); - - const { createMAAccount, ...upgradeToData } = await getMSCAUpgradeToData( - throwawayClient, - { - account: throwawayClient.account, - multiOwnerPluginAddress: "0xcE0000007B008F50d762D155002600004cD6c647", - }, - ); - - await throwawayClient.upgradeAccount({ - upgradeTo: upgradeToData, - waitForTx: true, - }); - - const upgradedClient = createSmartAccountClientFromExisting({ - client: createBundlerClient({ - chain: instance.chain, - transport: custom(client), - }), - account: await createMAAccount(), - }).extend(multiOwnerPluginActions); - - const upgradedAccountAddress = upgradedClient.getAddress(); - - const owners = await upgradedClient.readOwners({ - account: upgradedClient.account, - pluginAddress: "0xcE0000007B008F50d762D155002600004cD6c647", - }); - - expect(upgradedAccountAddress).toBe(accountAddress); - expect(owners).toContain(ownerAddress); - }, 200000); - - it("should have enhanced api properties on the provider", async () => { - const chain = arbitrumSepolia; - const alchemy = new Alchemy({ - network: Network.MATIC_MUMBAI, - apiKey: "test", - }); - - const provider = ( - await givenAlchemyConnectedProvider({ signer, chain }) - ).extend(alchemyEnhancedApiActions(alchemy)); - - expect(provider.account).toBeDefined(); - expect(provider.waitForUserOperationTransaction).toBeDefined(); - expect(provider.sendUserOperation).toBeDefined(); - expect(provider.core).toBeDefined(); - }); - const givenAlchemyConnectedProvider = async ({ - signer, - chain, - }: { - signer: SmartAccountSigner; - chain: Chain; - }) => - createMultiOwnerLightAccountClient({ - transport: alchemy({ - jwt: "test", - }), - chain, - signer, - accountAddress: "0x86f3B0211764971Ad0Fc8C8898d31f5d792faD84", - }); - - const givenConnectedProvider = ({ - signer, - version = "v2.0.0", - accountAddress, - usePaymaster = false, - accountIndex, - }: { - signer: SmartAccountSigner; - version?: LightAccountVersion<"MultiOwnerLightAccount">; - usePaymaster?: boolean; - accountAddress?: Address; - accountIndex?: bigint; - }) => - createMultiOwnerLightAccountClient({ - signer, - accountAddress, - version, - transport: custom(client), - chain: instance.chain, - salt: accountIndex, - ...(usePaymaster ? erc7677Middleware() : {}), - }); -}); diff --git a/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.test.ts b/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.test.ts deleted file mode 100644 index e59279c53a..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.test.ts +++ /dev/null @@ -1,340 +0,0 @@ -import { - createBundlerClient, - createSmartAccountClientFromExisting, - erc7677Middleware, - LocalAccountSigner, - type Address, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { - alchemyFeeEstimator, - alchemyGasAndPaymasterAndDataMiddleware, -} from "@account-kit/infra"; -import { custom, parseEther, publicActions, zeroAddress } from "viem"; -import { generatePrivateKey } from "viem/accounts"; -import { setBalance } from "viem/actions"; -import { accounts, poolId } from "~test/constants.js"; -import { local070Instance } from "~test/instances.js"; -import { multiOwnerPluginActions } from "../../msca/plugins/multi-owner/index.js"; -import { getMSCAUpgradeToData } from "../../msca/utils.js"; -import type { LightAccountVersion } from "../types"; -import { createMultiOwnerLightAccountClient } from "./multiOwnerLightAccount.js"; - -describe("MultiOwner Light Account Tests", () => { - const instance = local070Instance; - let client: ReturnType; - let salt: bigint = BigInt(poolId()); - - beforeAll(async () => { - client = instance.getClient(); - }); - - const signer: SmartAccountSigner = - LocalAccountSigner.generatePrivateKeySigner(); - - const undeployedSigner: SmartAccountSigner = new LocalAccountSigner( - accounts.unfundedAccountOwner, - ); - - it("should successfully get counterfactual address", async () => { - const provider = await givenConnectedProvider({ - signer: new LocalAccountSigner(accounts.fundedAccountOwner), - accountIndex: 0n, - }); - expect(provider.getAddress()).toMatchInlineSnapshot( - '"0x6ef8bb149c4422a33f87eF6A406B601D8F964b65"', - ); - }); - - it("should execute successfully", async () => { - const provider = await givenConnectedProvider({ signer }); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("10"), - }); - - const result = provider.sendUserOperation({ - uo: { - target: provider.account.getEntryPoint().address, - data: "0x", - value: parseEther("1"), - }, - }); - - await expect(result).resolves.not.toThrowError(); - }); - - it("should fail to execute if account address is not deployed and not correct", async () => { - const accountAddress = "0xc33AbD9621834CA7c6Fc9f9CC3c47b9c17B03f9F"; - const provider = await givenConnectedProvider({ - signer, - accountAddress, - }); - - const result = provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - await expect(result).rejects.toThrowError(); - }); - - it("should successfully execute with erc-7677 paymaster", async () => { - const provider = await givenConnectedProvider({ - signer, - paymasterMiddleware: "erc7677", - }); - - const result = await provider.sendUserOperation({ - uo: { - target: zeroAddress, - data: "0x", - value: 0n, - }, - }); - - const txnHash = provider - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: result.request, - }, - ); - return await provider.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 30_000); - - it("should successfully execute with alchemy paymaster", async () => { - const provider = await givenConnectedProvider({ - signer, - paymasterMiddleware: "alchemyGasAndPaymasterAndData", - }); - - const result = await provider.sendUserOperation({ - uo: { - target: zeroAddress, - data: "0x", - value: 0n, - }, - }); - - const txnHash = provider - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: result.request, - }, - ); - return await provider.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 30_000); - - it("should sign typed data with 6492 successfully for undeployed account", async () => { - const { account } = await givenConnectedProvider({ - signer: undeployedSigner, - }); - - const typedData = { - types: { - Request: [{ name: "hello", type: "string" }], - }, - primaryType: "Request", - message: { - hello: "world", - }, - } as const; - - const signature = await account.signTypedDataWith6492(typedData); - - expect( - await client.extend(publicActions).verifyTypedData({ - address: account.address, - signature, - ...typedData, - }), - ).toBe(true); - }); - - it("should sign message with 6492 successfully for undeployed account", async () => { - const { account } = await givenConnectedProvider({ - signer: undeployedSigner, - }); - const message = "test"; - - const signature = await account.signMessageWith6492({ message }); - expect( - await client.extend(publicActions).verifyMessage({ - address: account.address, - message, - signature, - }), - ).toBe(true); - }); - - it("should get on-chain owner addresses successfully", async () => { - const signer = new LocalAccountSigner(accounts.fundedAccountOwner); - const client = await givenConnectedProvider({ - signer, - }); - - await setBalance(instance.getClient(), { - address: client.getAddress(), - value: parseEther("10"), - }); - - // deploy the account one time - const result = await client.sendUserOperation({ - uo: [ - { - target: client.account.getEntryPoint().address, - data: "0x", - value: 0n, - }, - ], - }); - - await client.waitForUserOperationTransaction(result); - - expect(await client.account.getOwnerAddresses()).toMatchInlineSnapshot(` - [ - "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - ] - `); - // match with current signer - expect(await client.account.getOwnerAddresses()).toContain( - await signer.getAddress(), - ); - }); - - it("should update ownership successfully", async () => { - // create a throwaway address - const throwawaySigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - const throwawayClient = await givenConnectedProvider({ - signer: throwawaySigner, - }); - - // fund the throwaway address - await setBalance(client, { - address: throwawayClient.getAddress(), - value: 200000000000000000n, - }); - - // create new signer and transfer ownership - const newOwner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - - await throwawayClient.updateOwners({ - ownersToAdd: [await newOwner.getAddress()], - ownersToRemove: [await throwawaySigner.getAddress()], - waitForTxn: true, - }); - - const newOwnerClient = await givenConnectedProvider({ - signer: newOwner, - accountAddress: throwawayClient.getAddress(), - }); - - const newOwnerAddresses = await newOwnerClient.account.getOwnerAddresses(); - - expect(newOwnerAddresses).not.toContain(await throwawaySigner.getAddress()); - expect(newOwnerAddresses).toContain(await newOwner.getAddress()); - }, 100000); - - it("should upgrade a deployed multi owner light account to msca successfully", async () => { - // create a owner signer to create the account - const throwawaySigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - const throwawayClient = await givenConnectedProvider({ - signer: throwawaySigner, - }); - - const accountAddress = throwawayClient.getAddress(); - const ownerAddress = await throwawaySigner.getAddress(); - - // fund + deploy the throwaway address - await setBalance(client, { - address: accountAddress, - value: 200000000000000000n, - }); - - const { createMAAccount, ...upgradeToData } = await getMSCAUpgradeToData( - throwawayClient, - { - account: throwawayClient.account, - multiOwnerPluginAddress: "0xcE0000007B008F50d762D155002600004cD6c647", - }, - ); - - await throwawayClient.upgradeAccount({ - upgradeTo: upgradeToData, - waitForTx: true, - }); - - const upgradedClient = createSmartAccountClientFromExisting({ - client: createBundlerClient({ - chain: instance.chain, - transport: custom(client), - }), - account: await createMAAccount(), - }).extend(multiOwnerPluginActions); - - const upgradedAccountAddress = upgradedClient.getAddress(); - - const owners = await upgradedClient.readOwners({ - account: upgradedClient.account, - pluginAddress: "0xcE0000007B008F50d762D155002600004cD6c647", - }); - - expect(upgradedAccountAddress).toBe(accountAddress); - expect(owners).toContain(ownerAddress); - }, 200000); - - const givenConnectedProvider = ({ - signer, - version = "v2.0.0", - accountAddress, - paymasterMiddleware, - accountIndex, - }: { - signer: SmartAccountSigner; - version?: LightAccountVersion<"MultiOwnerLightAccount">; - paymasterMiddleware?: "alchemyGasAndPaymasterAndData" | "erc7677"; - accountAddress?: Address; - accountIndex?: bigint; - }) => - createMultiOwnerLightAccountClient({ - signer, - accountAddress, - version, - transport: custom(client), - chain: instance.chain, - salt: accountIndex ?? salt++, - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - ...(paymasterMiddleware === "alchemyGasAndPaymasterAndData" - ? alchemyGasAndPaymasterAndDataMiddleware({ - policyId: "FAKE_POLICY_ID", - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - transport: custom(instance.getClient()), - }) - : paymasterMiddleware === "erc7677" - ? erc7677Middleware() - : {}), - }); -}); diff --git a/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts b/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts deleted file mode 100644 index a270a11f1b..0000000000 --- a/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { - createSmartAccountClient, - type NotType, - type SmartAccountClient, - type SmartAccountClientActions, - type SmartAccountClientConfig, - type SmartAccountSigner, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Chain, type CustomTransport, type Transport } from "viem"; -import { - multiOwnerLightAccountClientActions, - createMultiOwnerLightAccount, - type CreateMultiOwnerLightAccountParams, - type MultiOwnerLightAccount, - type MultiOwnerLightAccountClientActions, - type AlchemyMultiOwnerLightAccountClientConfig, -} from "@account-kit/smart-contracts"; -import { - isAlchemyTransport, - createAlchemySmartAccountClient, - type AlchemySmartAccountClient, - type AlchemyTransport, -} from "@account-kit/infra"; - -export type CreateMultiOwnerLightAccountClientParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = { - transport: CreateMultiOwnerLightAccountParams< - TTransport, - TSigner - >["transport"]; - chain: CreateMultiOwnerLightAccountParams["chain"]; -} & Omit< - CreateMultiOwnerLightAccountParams, - "transport" | "chain" -> & - Omit< - SmartAccountClientConfig, - "transport" | "account" | "chain" - >; - -export type CreateMultiOwnerLightAccountClientDynamicTransportParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = - | (AlchemyMultiOwnerLightAccountClientConfig & { - transport: AlchemyTransport; - }) - | CreateMultiOwnerLightAccountClientParams; - -export async function createMultiOwnerLightAccountClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyMultiOwnerLightAccountClientConfig & { - transport: AlchemyTransport; - }, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - MultiOwnerLightAccount, - MultiOwnerLightAccountClientActions - > ->; - -export function createMultiOwnerLightAccountClient< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - args: CreateMultiOwnerLightAccountClientParams & - NotType, -): Promise< - SmartAccountClient< - CustomTransport, - Chain, - MultiOwnerLightAccount, - SmartAccountClientActions & - MultiOwnerLightAccountClientActions< - TSigner, - MultiOwnerLightAccount - > - > ->; - -/** - * Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations. - * - * @example - * ```ts - * import { createMultiOwnerLightAccountClient } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http, generatePrivateKey } from "viem" - * - * const account = await createMultiOwnerLightAccountClient({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @example - * ```ts - * import { createMultiOwnerLightAccountClient } from "@account-kit/smart-contracts"; - * import { sepolia, alchemy } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const lightAccountClient = await createMultiOwnerLightAccountClient({ - * transport: alchemy({ - * apiKey: "your-api-key", - * }), - * chain: sepolia - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @param {CreateMultiOwnerLightAccountClientDynamicTransportParams} params the configuration for creating the multi-owner light / alchemy account client with the provided parameters transport - * @returns {Promise} a promise that resolves to a `SmartAccountClient` containing the created account client and relevant methods - */ -export async function createMultiOwnerLightAccountClient( - params: CreateMultiOwnerLightAccountClientDynamicTransportParams, -): Promise { - const { transport, chain } = params; - - const lightAccount = await createMultiOwnerLightAccount({ - ...params, - transport, - chain, - }); - if (isAlchemyTransport(transport, chain)) { - return createAlchemySmartAccountClient({ - ...params, - transport, - chain, - account: lightAccount, - }).extend(multiOwnerLightAccountClientActions); - } - - return createSmartAccountClient({ - ...params, - transport, - chain: chain, - account: lightAccount, - }).extend(multiOwnerLightAccountClientActions); -} diff --git a/account-kit/smart-contracts/src/light-account/decorators/lightAccount.ts b/account-kit/smart-contracts/src/light-account/decorators/lightAccount.ts deleted file mode 100644 index 7a0fd34e4c..0000000000 --- a/account-kit/smart-contracts/src/light-account/decorators/lightAccount.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { SmartAccountSigner } from "@aa-sdk/core"; -import type { Chain, Client, Hex, Transport } from "viem"; -import type { LightAccount } from "../accounts/account"; -import { - transferOwnership, - type TransferLightAccountOwnershipParams, -} from "../actions/transferOwnership.js"; - -export type LightAccountClientActions< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends LightAccount | undefined = - | LightAccount - | undefined, -> = { - transferOwnership: ( - args: TransferLightAccountOwnershipParams, - ) => Promise; -}; - -/** - * Provides a set of actions for managing a light account client, including transferring ownership. - * - * @example - * ```ts - * import { lightAccountClientActions, createLightAccount } from "@account-kit/smart-contracts"; - * import { createAlchemySmartAccountClient } from "@account-kit/infra"; - * import { sepolia } from "@account-kit/infra"; - * - * const smartAccountClient = createAlchemySmartAccountClient({ - * account: await createLightAccount(...), - * apiKey: "your-api-key", - * chain: sepolia, - * }).extend(lightAccountClientActions); - * ``` - * - * @param {Client} client The client instance for which to provide the light account actions - * @returns {LightAccountClientActions} An object containing the available light account client actions - */ -export const lightAccountClientActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends LightAccount | undefined = - | LightAccount - | undefined, ->( - client: Client, -) => LightAccountClientActions = (client) => ({ - transferOwnership: async (args) => transferOwnership(client, args), -}); diff --git a/account-kit/smart-contracts/src/light-account/decorators/multiOwnerLightAccount.ts b/account-kit/smart-contracts/src/light-account/decorators/multiOwnerLightAccount.ts deleted file mode 100644 index d9be79a2b6..0000000000 --- a/account-kit/smart-contracts/src/light-account/decorators/multiOwnerLightAccount.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { SmartAccountSigner } from "@aa-sdk/core"; -import type { Chain, Client, Hex, Transport } from "viem"; -import type { MultiOwnerLightAccount } from "../accounts/multiOwner"; -import { - updateOwners, - type UpdateMultiOwnerLightAccountOwnersParams, -} from "../actions/updateOwners.js"; - -export type MultiOwnerLightAccountClientActions< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends MultiOwnerLightAccount | undefined = - | MultiOwnerLightAccount - | undefined, -> = { - updateOwners: ( - args: UpdateMultiOwnerLightAccountOwnersParams, - ) => Promise; -}; - -/** - * Generates client actions for a multi-owner light account, including the ability to update owners. - * - * @example - * ```ts - * import { multiOwnerLightAccountClientActions, createMultiOwnerLightAccount } from "@account-kit/smart-contracts"; - * import { createAlchemySmartAccountClient } from "@account-kit/infra"; - * import { sepolia } from "@account-kit/infra"; - * - * const smartAccountClient = createAlchemySmartAccountClient({ - * account: await createMultiOwnerLightAccount(...), - * apiKey: "your-api-key", - * chain: sepolia, - * }).extend(multiOwnerLightAccountClientActions); - * ``` - * - * @param {Client} client the client for interacting with the multi-owner light account - * @returns {MultiOwnerLightAccountClientActions} an object containing the client actions specifically for a multi-owner light account - */ -export const multiOwnerLightAccountClientActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends MultiOwnerLightAccount | undefined = - | MultiOwnerLightAccount - | undefined, ->( - client: Client, -) => MultiOwnerLightAccountClientActions = (client) => ({ - updateOwners: async (args) => updateOwners(client, args), -}); diff --git a/account-kit/smart-contracts/src/light-account/types.ts b/account-kit/smart-contracts/src/light-account/types.ts deleted file mode 100644 index e3e6f4a04a..0000000000 --- a/account-kit/smart-contracts/src/light-account/types.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { type EntryPointVersion } from "@aa-sdk/core"; -import { type Address, type Chain } from "viem"; -import type { LightAccountBase } from "./accounts/base"; - -/** - * Light account types supported: LightAccount, MultiOwnerLightAccount - * - */ -export type LightAccountType = "LightAccount" | "MultiOwnerLightAccount"; - -export type LightAccountVersionConfig< - TEntryPointVersion extends EntryPointVersion = EntryPointVersion, -> = { - entryPointVersion: TEntryPointVersion; - addresses: { - default: { - factory: Address; - impl: Address; - }; - overrides?: Record< - Chain["id"], - { - factory: Address; - impl: Address; - } - >; - }; -}; - -export type LightAccountVersionConfigs = { - LightAccount: { - "v1.0.1": LightAccountVersionConfig<"0.6.0">; - "v1.0.2": LightAccountVersionConfig<"0.6.0">; - "v1.1.0": LightAccountVersionConfig<"0.6.0">; - "v2.0.0": LightAccountVersionConfig<"0.7.0">; - }; - MultiOwnerLightAccount: { - "v2.0.0": LightAccountVersionConfig<"0.7.0">; - }; -}; - -export type LightAccountVersion = - keyof LightAccountVersionConfigs[TAccountType]; - -export type GetLightAccountType = - TAccount["source"] extends LightAccountType ? TAccount["source"] : never; - -export type LightAccountEntryPointVersion< - TLightAccountType extends LightAccountType, - TLightAccountVersion extends - LightAccountVersion = LightAccountVersion, -> = LightAccountVersionConfigs[TLightAccountType][TLightAccountVersion] extends LightAccountVersionConfig - ? LightAccountVersionConfigs[TLightAccountType][TLightAccountVersion]["entryPointVersion"] - : never; diff --git a/account-kit/smart-contracts/src/light-account/utils.ts b/account-kit/smart-contracts/src/light-account/utils.ts deleted file mode 100644 index 52d903ac5e..0000000000 --- a/account-kit/smart-contracts/src/light-account/utils.ts +++ /dev/null @@ -1,207 +0,0 @@ -import type { GetEntryPointFromAccount } from "@aa-sdk/core"; -import { fromHex, type Address, type Chain } from "viem"; -import type { LightAccountBase } from "./accounts/base"; -import type { - LightAccountType, - LightAccountVersion, - LightAccountVersionConfig, - LightAccountVersionConfigs, -} from "./types"; - -/** - * Account version registry interface that defines the light account versions - * and the version definition for each light account type - * - */ -export const AccountVersionRegistry: LightAccountVersionConfigs = { - LightAccount: { - "v1.0.1": { - entryPointVersion: "0.6.0", - addresses: { - default: { - factory: - "0x000000893A26168158fbeaDD9335Be5bC96592E2".toLowerCase() as Address, - impl: "0xc1b2fc4197c9187853243e6e4eb5a4af8879a1c0".toLowerCase() as Address, - }, - }, - }, - "v1.0.2": { - entryPointVersion: "0.6.0", - addresses: { - default: { - factory: - "0x00000055C0b4fA41dde26A74435ff03692292FBD".toLowerCase() as Address, - impl: "0x5467b1947F47d0646704EB801E075e72aeAe8113".toLowerCase() as Address, - }, - }, - }, - "v1.1.0": { - entryPointVersion: "0.6.0", - addresses: { - default: { - factory: - "0x00004EC70002a32400f8ae005A26081065620D20".toLowerCase() as Address, - impl: "0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba".toLowerCase() as Address, - }, - }, - }, - "v2.0.0": { - entryPointVersion: "0.7.0", - addresses: { - default: { - factory: - "0x0000000000400CdFef5E2714E63d8040b700BC24".toLowerCase() as Address, - impl: "0x8E8e658E22B12ada97B402fF0b044D6A325013C7".toLowerCase() as Address, - }, - }, - }, - }, - MultiOwnerLightAccount: { - "v2.0.0": { - entryPointVersion: "0.7.0", - addresses: { - default: { - factory: - "0x000000000019d2Ee9F2729A65AfE20bb0020AefC".toLowerCase() as Address, - impl: "0xd2c27F9eE8E4355f71915ffD5568cB3433b6823D".toLowerCase() as Address, - }, - }, - }, - }, -}; - -/** - * Get the default light account version for the given light account type - * - * @template {LightAccountType} TLightAccountType - * @returns {LightAccountVersion} the default version for the given light account type - */ -export const defaultLightAccountVersion = < - TLightAccountType extends LightAccountType, ->(): LightAccountVersion => "v2.0.0"; - -/** - * Utility method returning the default light account factory address given a Chain object - * - * @param {Chain} chain - a Chain object - * @param {LightAccountVersion} version - the version of the light account to get the factory address for - * @returns {Address} an for the given chain - * @throws if the chain doesn't have an address currently deployed - */ -export const getDefaultLightAccountFactoryAddress = ( - chain: Chain, - version: LightAccountVersion<"LightAccount">, -): Address => { - return ( - AccountVersionRegistry.LightAccount[version].addresses.overrides?.[chain.id] - ?.factory ?? - AccountVersionRegistry.LightAccount[version].addresses.default.factory - ); -}; - -/** - * Utility method returning the default multi owner light account factory address given a Chain object - * - * @param {Chain} chain - a Chain object - * @param {string} version - the version of the light account to get the factory address for - * @returns {Address} an Address for the given chain - */ -export const getDefaultMultiOwnerLightAccountFactoryAddress = ( - chain: Chain, - version: LightAccountVersion<"MultiOwnerLightAccount">, -) => { - return ( - AccountVersionRegistry.MultiOwnerLightAccount[version].addresses - .overrides?.[chain.id]?.factory ?? - AccountVersionRegistry.MultiOwnerLightAccount[version].addresses.default - .factory - ); -}; - -/** - * Can be used to check if the account with one of the following implementation addresses - * to not support 1271 signing. - * - * Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. - */ -export const LightAccountUnsupported1271Impls = [ - AccountVersionRegistry.LightAccount["v1.0.1"], - AccountVersionRegistry.LightAccount["v1.0.2"], -]; - -/** - * Can be used to check if the account with one of the following factory addresses - * to not support 1271 signing. - * - * Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. - */ -export const LightAccountUnsupported1271Factories = new Set( - LightAccountUnsupported1271Impls.map((x) => [ - x.addresses.default.factory, - ...Object.values(x.addresses.overrides ?? {}).map((z) => z.factory), - ]).flat(), -); - -/** - * Get the light account version definition for the given light account and chain - * - * @template {LightAccountBase} TAccount - * @param {LightAccountBase} account the light account to get the version for - * @param {Chain} chain - the chain to get the version for - * @returns {Promise} the light account version definition for the given light account and chain - */ -export async function getLightAccountVersionForAccount< - TAccount extends LightAccountBase, ->(account: TAccount, chain: Chain): Promise { - const accountType = account.source as LightAccountType; - const factoryAddress = await account.getFactoryAddress(); - const implAddress = await account.getImplementationAddress(); - const implToVersion = new Map( - Object.entries(AccountVersionRegistry[accountType]).map((pair) => { - const [version, def] = pair as [ - LightAccountVersion, - LightAccountVersionConfig>, - ]; - - if ( - def.addresses.overrides != null && - chain.id in def.addresses.overrides! - ) { - return [def.addresses.overrides[chain.id].impl, version]; - } - - return [def.addresses.default.impl, version]; - }), - ); - - const factoryToVersion = new Map( - Object.entries(AccountVersionRegistry[accountType]).map((pair) => { - const [version, def] = pair as [ - LightAccountVersion, - LightAccountVersionConfig>, - ]; - - if ( - def.addresses.overrides != null && - chain.id in def.addresses.overrides! - ) { - return [def.addresses.overrides[chain.id].factory, version]; - } - - return [def.addresses.default.factory, version]; - }), - ); - - const version = - fromHex(implAddress, "bigint") === 0n - ? factoryToVersion.get(factoryAddress.toLowerCase() as Address) - : implToVersion.get(implAddress.toLowerCase() as Address); - - if (!version) { - throw new Error( - `Could not determine ${account.source} version for chain ${chain.id}`, - ); - } - - return AccountVersionRegistry[accountType][version]; -} diff --git a/account-kit/smart-contracts/src/ma-v2/abis/accountFactoryAbi.ts b/account-kit/smart-contracts/src/ma-v2/abis/accountFactoryAbi.ts deleted file mode 100644 index 33637670c0..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/abis/accountFactoryAbi.ts +++ /dev/null @@ -1,638 +0,0 @@ -export const accountFactoryAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_entryPoint", - type: "address", - internalType: "contract IEntryPoint", - }, - { - name: "_accountImpl", - type: "address", - internalType: "contract ModularAccount", - }, - { - name: "_semiModularImpl", - type: "address", - internalType: "contract SemiModularAccountBytecode", - }, - { - name: "_singleSignerValidationModule", - type: "address", - internalType: "address", - }, - { - name: "_webAuthnValidationModule", - type: "address", - internalType: "address", - }, - { - name: "owner", - type: "address", - internalType: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ACCOUNT_IMPL", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ModularAccount", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "ENTRY_POINT", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract IEntryPoint", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "SEMI_MODULAR_ACCOUNT_IMPL", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract SemiModularAccountBytecode", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "SINGLE_SIGNER_VALIDATION_MODULE", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "WEBAUTHN_VALIDATION_MODULE", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "acceptOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "addStake", - inputs: [ - { - name: "unstakeDelay", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - name: "createAccount", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ModularAccount", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "createSemiModularAccount", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract SemiModularAccountBytecode", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "createWebAuthnAccount", - inputs: [ - { - name: "ownerX", - type: "uint256", - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ModularAccount", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "getAddress", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getAddressSemiModular", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getAddressWebAuthn", - inputs: [ - { - name: "ownerX", - type: "uint256", - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getSalt", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "getSaltWebAuthn", - inputs: [ - { - name: "ownerX", - type: "uint256", - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "pendingOwner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "view", - }, - { - type: "function", - name: "transferOwnership", - inputs: [ - { - name: "newOwner", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "unlockStake", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "withdraw", - inputs: [ - { - name: "to", - type: "address", - internalType: "address payable", - }, - { - name: "token", - type: "address", - internalType: "address", - }, - { - name: "amount", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "withdrawStake", - inputs: [ - { - name: "withdrawAddress", - type: "address", - internalType: "address payable", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "event", - name: "ModularAccountDeployed", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "owner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "salt", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "OwnershipTransferStarted", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "SemiModularAccountDeployed", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "owner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "salt", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "WebAuthnModularAccountDeployed", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "ownerX", - type: "uint256", - indexed: true, - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - indexed: true, - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [ - { - name: "target", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "AddressInsufficientBalance", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "FailedInnerCall", - inputs: [], - }, - { - type: "error", - name: "InvalidAction", - inputs: [], - }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "OwnableUnauthorizedAccount", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [ - { - name: "token", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "TransferFailed", - inputs: [], - }, -] as const; diff --git a/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts b/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts deleted file mode 100644 index 191fb49f3f..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts +++ /dev/null @@ -1,434 +0,0 @@ -import { - BaseError, - createBundlerClient, - getEntryPoint, - InvalidDeferredActionNonce, - InvalidEntityIdError, - InvalidNonceKeyError, - toSmartContractAccount, - type AccountOp, - type SmartAccountSigner, - type SmartContractAccount, - type SmartContractAccountWithSigner, - type ToSmartContractAccountParams, -} from "@aa-sdk/core"; -import { - concatHex, - encodeFunctionData, - getContract, - maxUint152, - maxUint32, - zeroAddress, - isAddressEqual, - type Address, - type Chain, - type Hex, - type Transport, -} from "viem"; -import type { ToWebAuthnAccountParameters } from "viem/account-abstraction"; -import { modularAccountAbi } from "../../abis/modularAccountAbi.js"; -import { serializeModuleEntity } from "../../actions/common/utils.js"; -import { singleSignerMessageSigner } from "../../modules/single-signer-validation/signer.js"; -import { webauthnSigningFunctions } from "../../modules/webauthn-validation/signingMethods.js"; -import { DEFAULT_OWNER_ENTITY_ID, parseDeferredAction } from "../../utils.js"; -import { nativeSMASigner } from "../nativeSMASigner.js"; - -export const executeUserOpSelector: Hex = "0x8DD7712F"; - -export type ModularAccountsV2 = ModularAccountV2 | WebauthnModularAccountV2; - -export type SignerEntity = { - isGlobalValidation: boolean; - entityId: number; -}; - -export type ExecutionDataView = { - module: Address; - skipRuntimeValidation: boolean; - allowGlobalValidation: boolean; - executionHooks: readonly Hex[]; -}; - -export type ValidationDataView = { - validationHooks: readonly Hex[]; - executionHooks: readonly Hex[]; - selectors: readonly Hex[]; - validationFlags: number; -}; - -export type ValidationDataParams = - | { - validationModuleAddress: Address; - entityId?: never; - } - | { - validationModuleAddress?: never; - entityId: number; - }; - -export type ModularAccountV2< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = SmartContractAccountWithSigner<"ModularAccountV2", TSigner, "0.7.0"> & { - signerEntity: SignerEntity; - getExecutionData: (selector: Hex) => Promise; - getValidationData: ( - args: ValidationDataParams, - ) => Promise; - encodeCallData: (callData: Hex) => Promise; -}; - -export type WebauthnModularAccountV2 = SmartContractAccount< - "ModularAccountV2", - "0.7.0" -> & { - params: ToWebAuthnAccountParameters; - signerEntity: SignerEntity; - getExecutionData: (selector: Hex) => Promise; - getValidationData: ( - args: ValidationDataParams, - ) => Promise; - encodeCallData: (callData: Hex) => Promise; -}; - -export type CreateMAV2BaseParams< - TSigner extends SmartAccountSigner | undefined = - | SmartAccountSigner - | undefined, - TTransport extends Transport = Transport, -> = Omit< - ToSmartContractAccountParams<"ModularAccountV2", TTransport, Chain, "0.7.0">, - // Implements the following methods required by `toSmartContractAccount`, and passes through any other parameters. - | "encodeExecute" - | "encodeBatchExecute" - | "getNonce" - | "signMessage" - | "signTypedData" - | "getDummySignature" - | "prepareSign" - | "formatSign" -> & { - signer: TSigner; - signerEntity?: SignerEntity; - accountAddress: Address; - deferredAction?: Hex; -}; - -export type CreateWebauthnMAV2BaseParams = Omit< - CreateMAV2BaseParams, - "signer" -> & { - credential: ToWebAuthnAccountParameters["credential"]; - getFn?: ToWebAuthnAccountParameters["getFn"] | undefined; - rpId?: ToWebAuthnAccountParameters["rpId"] | undefined; -}; - -export type CreateMAV2BaseReturnType< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Promise>; - -// function overload -export async function createMAv2Base( - config: CreateWebauthnMAV2BaseParams, -): Promise; - -export async function createMAv2Base< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->(config: CreateMAV2BaseParams): CreateMAV2BaseReturnType; - -export async function createMAv2Base< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - config: CreateMAV2BaseParams | CreateWebauthnMAV2BaseParams, -): Promise> { - let { - transport, - chain, - entryPoint = getEntryPoint(chain, { version: "0.7.0" }), - signerEntity = { - isGlobalValidation: true, - entityId: DEFAULT_OWNER_ENTITY_ID, - }, - signerEntity: { - isGlobalValidation = true, - entityId = DEFAULT_OWNER_ENTITY_ID, - } = {}, - accountAddress, - deferredAction, - ...remainingToSmartContractAccountParams - } = config; - - const signer = "signer" in config ? config.signer : undefined; - const credential = "credential" in config ? config.credential : undefined; - const getFn = "getFn" in config ? config.getFn : undefined; - const rpId = "rpId" in config ? config.rpId : undefined; - - if (entityId > Number(maxUint32)) { - throw new InvalidEntityIdError(entityId); - } - - const client = createBundlerClient({ - transport, - chain, - }); - - const entryPointContract = getContract({ - address: entryPoint.address, - abi: entryPoint.abi, - client, - }); - - // These default values signal that we should not use the set deferred action nonce - let nonce: bigint | undefined; - let deferredActionData: Hex | undefined; - let hasAssociatedExecHooks: boolean = false; - - if (deferredAction) { - let deferredActionNonce: bigint = 0n; - // We always update entity id and isGlobalValidation to the deferred action value since the client could be used to send multiple calls - ({ - entityId, - isGlobalValidation, - nonce: deferredActionNonce, - } = parseDeferredAction(deferredAction)); - - // Set these values if the deferred action has not been consumed. We check this with the EP - const nextNonceForDeferredAction: bigint = - (await entryPointContract.read.getNonce([ - accountAddress, - deferredActionNonce >> 64n, - ])) as bigint; - - if (deferredActionNonce === nextNonceForDeferredAction) { - ({ nonce, deferredActionData, hasAssociatedExecHooks } = - parseDeferredAction(deferredAction)); - } else if (deferredActionNonce > nextNonceForDeferredAction) { - // if nonce is greater than the next nonce, its invalid, so we throw - throw new InvalidDeferredActionNonce(); - } - } - - const encodeExecute: (tx: AccountOp) => Promise = async ({ - target, - data, - value, - }) => - await encodeCallData( - !isAddressEqual(target, accountAddress) - ? encodeFunctionData({ - abi: modularAccountAbi, - functionName: "execute", - args: [target, value ?? 0n, data], - }) - : data, // If the target is the same as the account address, we don't need to wrap in a call to `execute`. - ); - - const encodeBatchExecute: (txs: AccountOp[]) => Promise = async (txs) => - await encodeCallData( - encodeFunctionData({ - abi: modularAccountAbi, - functionName: "executeBatch", - args: [ - txs.map((tx) => ({ - target: tx.target, - data: tx.data, - value: tx.value ?? 0n, - })), - ], - }), - ); - - const isAccountDeployed: () => Promise = async () => { - const code = ( - await client.getCode({ address: accountAddress }) - )?.toLowerCase(); - const is7702Delegated = code?.startsWith("0xef0100"); - - if (!is7702Delegated) { - return !!code; - } - - if (!config.getImplementationAddress) { - // Edge case where account is already delegated to a 3rd party - // implementation, but the MAv2 client is initialized using its - // address without specifying 7702 mode. - throw new BaseError( - "Account is an already-delegated 7702 account, but client is missing implementation address. Be sure to initialize the client in 7702 mode.", - ); - } - - const expectedCode = concatHex([ - "0xef0100", - await config.getImplementationAddress(), - ]).toLowerCase(); - return code === expectedCode; - }; - - const getNonce = async (nonceKey: bigint = 0n): Promise => { - if (nonce) { - const tempNonce = nonce; - nonce = undefined; // set to falsy value once used - return tempNonce; - } - - if (nonceKey > maxUint152) { - throw new InvalidNonceKeyError(nonceKey); - } - - const fullNonceKey: bigint = - (nonceKey << 40n) + - (BigInt(entityId) << 8n) + - (isGlobalValidation ? 1n : 0n); - - return entryPointContract.read.getNonce([ - accountAddress, - fullNonceKey, - ]) as Promise; - }; - - const accountContract = getContract({ - address: accountAddress, - abi: modularAccountAbi, - client, - }); - - const getExecutionData = async (selector: Hex) => { - // Start both promises in parallel - const deployStatusPromise = isAccountDeployed(); - const executionDataPromise = accountContract.read - .getExecutionData([selector]) - .catch((error) => { - // Store the original error for potential re-throwing - // If the account is not deployed, we will get an error here that we want to swallow. - // Otherwise, we will re-throw the error. - return { error }; - }); - - // Check if account is deployed first - const deployStatus = await deployStatusPromise; - - if (deployStatus === false) { - return { - module: zeroAddress, - skipRuntimeValidation: false, - allowGlobalValidation: false, - executionHooks: [], - }; - } - - // Only await execution data if account is deployed - const executionData = await executionDataPromise; - if ("error" in executionData) { - throw executionData.error; - } - return executionData; - }; - - const getValidationData = async (args: ValidationDataParams) => { - const { validationModuleAddress, entityId } = args; - - // Start both promises in parallel - const deployStatusPromise = isAccountDeployed(); - const validationDataPromise = accountContract.read - .getValidationData([ - serializeModuleEntity({ - moduleAddress: validationModuleAddress ?? zeroAddress, - entityId: entityId ?? Number(maxUint32), - }), - ]) - .catch((error) => { - // Store the original error for potential re-throwing - // If the account is not deployed, we will get an error here that we want to swallow. - // Otherwise, we will re-throw the error. - return { error }; - }); - - // Check if account is deployed first - const deployStatus = await deployStatusPromise; - - if (deployStatus === false) { - return { - validationHooks: [], - executionHooks: [], - selectors: [], - validationFlags: 0, - }; - } - - // Only await validation data if account is deployed - const validationData = await validationDataPromise; - if ("error" in validationData) { - throw validationData.error; - } - return validationData; - }; - - const encodeCallData = async (callData: Hex): Promise => { - const validationData = await getValidationData({ - entityId: Number(entityId), - }); - if (hasAssociatedExecHooks) { - hasAssociatedExecHooks = false; // set to falsy value once used - return concatHex([executeUserOpSelector, callData]); - } - if (validationData.executionHooks.length) { - return concatHex([executeUserOpSelector, callData]); - } - return callData; - }; - - const baseAccount = await toSmartContractAccount({ - ...remainingToSmartContractAccountParams, - transport, - chain, - entryPoint, - accountAddress, - encodeExecute, - encodeBatchExecute, - getNonce, - ...(signer - ? entityId === DEFAULT_OWNER_ENTITY_ID - ? nativeSMASigner(signer, chain, accountAddress, deferredActionData) - : singleSignerMessageSigner( - signer, - chain, - accountAddress, - entityId, - deferredActionData, - ) - : webauthnSigningFunctions( - // credential required for webauthn mode is checked at modularAccountV2 creation level - credential!, - getFn, - rpId, - chain, - accountAddress, - entityId, - deferredActionData, - )), - }); - - if (!signer) { - return { - ...baseAccount, - signerEntity, - getExecutionData, - getValidationData, - encodeCallData, - } as WebauthnModularAccountV2; // TO DO: figure out when this breaks! we shouldn't have to cast - } - - return { - ...baseAccount, - getSigner: () => signer, - signerEntity, - getExecutionData, - getValidationData, - encodeCallData, - } as ModularAccountV2; // TO DO: figure out when this breaks! we shouldn't have to cast -} - -export function isModularAccountV2( - account: SmartContractAccount, -): account is ModularAccountV2 | WebauthnModularAccountV2 { - return account.source === "ModularAccountV2"; -} diff --git a/account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts b/account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts deleted file mode 100644 index f01c20fc73..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts +++ /dev/null @@ -1,308 +0,0 @@ -import type { - EntryPointDef, - SmartAccountSigner, - ToSmartContractAccountParams, -} from "@aa-sdk/core"; -import { - getEntryPoint, - EntityIdOverrideError, - InvalidModularAccountV2Mode, - createBundlerClient, - getAccountAddress, -} from "@aa-sdk/core"; -import { - concatHex, - encodeFunctionData, - isAddressEqual, - type Address, - type Chain, - type Hex, - type Transport, -} from "viem"; -import { accountFactoryAbi } from "../abis/accountFactoryAbi.js"; -import { - getDefaultMAV2FactoryAddress, - getDefaultWebAuthnMAV2FactoryAddress, - getDefaultSMAV2BytecodeAddress, -} from "../utils.js"; -import { - type SignerEntity, - type ModularAccountV2, - createMAv2Base, - type WebauthnModularAccountV2, -} from "./common/modularAccountV2Base.js"; -import { DEFAULT_OWNER_ENTITY_ID } from "../utils.js"; -import { predictModularAccountV2Address } from "./predictAddress.js"; -import type { ToWebAuthnAccountParameters } from "viem/account-abstraction"; -import { parsePublicKey } from "webauthn-p256"; -import { - SignerRequiredFor7702Error, - SignerRequiredForDefaultError, - WebauthnCredentialsRequiredError, -} from "../errors.js"; - -export type CreateModularAccountV2Params< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = (Pick< - ToSmartContractAccountParams<"ModularAccountV2", TTransport, Chain, "0.7.0">, - "transport" | "chain" | "accountAddress" -> & { - signer: TSigner; - entryPoint?: EntryPointDef<"0.7.0", Chain>; - deferredAction?: Hex; - signerEntity?: SignerEntity; -}) & - ( - | { - mode?: "default"; - salt?: bigint; - factoryAddress?: Address; - implementationAddress?: Address; - initCode?: Hex; - } - | { - mode: "7702"; - } - ); - -export type CreateWebauthnModularAccountV2Params< - TTransport extends Transport = Transport, -> = Pick< - ToSmartContractAccountParams<"ModularAccountV2", TTransport, Chain, "0.7.0">, - "transport" | "chain" | "accountAddress" -> & { - mode: "webauthn"; - credential: ToWebAuthnAccountParameters["credential"]; - getFn?: ToWebAuthnAccountParameters["getFn"] | undefined; - rpId?: ToWebAuthnAccountParameters["rpId"] | undefined; - entryPoint?: EntryPointDef<"0.7.0", Chain>; - deferredAction?: Hex; - signerEntity?: SignerEntity; - salt?: bigint; - factoryAddress?: Address; - initCode?: Hex; -}; - -export async function createModularAccountV2< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - config: CreateModularAccountV2Params, -): Promise>; - -export async function createModularAccountV2< - TTransport extends Transport = Transport, ->( - config: CreateWebauthnModularAccountV2Params, -): Promise; - -/** - * Creates a ModularAccount V2 account, with the mode depending on the provided "mode" field. - * Possible modes include: "default", which is SMA Bytecode, and "7702", which is SMA 7702. - * Handles nonce generation, transaction encoding, and mode variant-specific behavior like initcode construction. - * - * @example - * ```ts twoslash - * import { createModularAccountV2 } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { alchemy, sepolia } from "@account-kit/infra"; - * - * const MNEMONIC = "..."; - * const RPC_URL = "..."; - * - * const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - * - * const chain = sepolia; - * - * const transport = alchemy({ rpcUrl: RPC_URL }); - * - * - * const modularAccountV2 = await createModularAccountV2({ - * mode: "default", // or "7702" - * chain, - * signer, - * transport, - * }); - * ``` - * - * @param {CreateModularAccountV2Params | CreateWebauthnModularAccountV2Params} config Configuration parameters for creating a Modular Account V2. - * @returns {Promise} A promise that resolves to an `ModularAccountV2` providing methods for nonce retrieval, transaction execution, and more. - */ -export async function createModularAccountV2< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - config: - | CreateModularAccountV2Params - | CreateWebauthnModularAccountV2Params, -): Promise | WebauthnModularAccountV2> { - const { - transport, - chain, - accountAddress: _accountAddress, - entryPoint = getEntryPoint(chain, { version: "0.7.0" }), - signerEntity = { - isGlobalValidation: true, - entityId: DEFAULT_OWNER_ENTITY_ID, - }, - signerEntity: { entityId = DEFAULT_OWNER_ENTITY_ID } = {}, - deferredAction, - } = config; - - const signer = "signer" in config ? config.signer : undefined; - - const credential = "credential" in config ? config.credential : undefined; - - const getFn = "getFn" in config ? config.getFn : undefined; - - const rpId = "rpId" in config ? config.rpId : undefined; - - const client = createBundlerClient({ - transport, - chain, - }); - - const accountFunctions = await (async () => { - switch (config.mode) { - case "webauthn": { - if (!credential) throw new WebauthnCredentialsRequiredError(); - const publicKey = credential.publicKey; - const { x, y } = parsePublicKey(publicKey); - const { - salt = 0n, - factoryAddress = getDefaultWebAuthnMAV2FactoryAddress(), - initCode, - } = config; - - const getAccountInitCode = async () => { - if (initCode) { - return initCode; - } - - return concatHex([ - factoryAddress, - encodeFunctionData({ - abi: accountFactoryAbi, - functionName: "createWebAuthnAccount", - args: [x, y, salt, entityId], - }), - ]); - }; - - const accountAddress = await getAccountAddress({ - client, - entryPoint, - accountAddress: _accountAddress, - getAccountInitCode, - }); - - return { - getAccountInitCode, - accountAddress, - }; - } - case "7702": { - const getAccountInitCode = async (): Promise => { - return "0x"; - }; - if (!signer) throw new SignerRequiredFor7702Error(); - const signerAddress = await signer.getAddress(); - const accountAddress = _accountAddress ?? signerAddress; - if ( - entityId === DEFAULT_OWNER_ENTITY_ID && - !isAddressEqual(signerAddress, accountAddress) - ) { - throw new EntityIdOverrideError(); - } - - const implementation: Address = - "0x69007702764179f14F51cdce752f4f775d74E139"; - - const getImplementationAddress = async () => implementation; - - return { - getAccountInitCode, - accountAddress, - getImplementationAddress, - }; - } - case "default": - case undefined: { - if (!signer) throw new SignerRequiredForDefaultError(); - const { - salt = 0n, - factoryAddress = getDefaultMAV2FactoryAddress(chain), - implementationAddress = getDefaultSMAV2BytecodeAddress(chain), - initCode, - } = config; - - const signerAddress = await signer.getAddress(); - - const getAccountInitCode = async () => { - if (initCode) { - return initCode; - } - - return concatHex([ - factoryAddress, - encodeFunctionData({ - abi: accountFactoryAbi, - functionName: "createSemiModularAccount", - args: [await signer.getAddress(), salt], - }), - ]); - }; - - const accountAddress = - _accountAddress ?? - predictModularAccountV2Address({ - factoryAddress, - implementationAddress, - salt, - type: "SMA", - ownerAddress: signerAddress, - }); - - return { - getAccountInitCode, - accountAddress, - }; - } - default: - assertNever(config); - } - })(); - - if (!signer) { - if (!credential) throw new WebauthnCredentialsRequiredError(); - return await createMAv2Base({ - source: "ModularAccountV2", // TO DO: remove need to pass in source? - transport, - chain, - entryPoint, - signerEntity, - deferredAction, - credential, - getFn, - rpId, - ...accountFunctions, - }); - } - - return await createMAv2Base({ - source: "ModularAccountV2", // TO DO: remove need to pass in source? - transport, - chain, - signer, - entryPoint, - signerEntity, - deferredAction, - ...accountFunctions, - }); -} - -// If we add more valid modes, the switch case branch's mode will no longer be `never`, which will cause a compile time error here and ensure we handle the new type. -function assertNever(_valid: never): never { - throw new InvalidModularAccountV2Mode(); -} diff --git a/account-kit/smart-contracts/src/ma-v2/account/nativeSMASigner.ts b/account-kit/smart-contracts/src/ma-v2/account/nativeSMASigner.ts deleted file mode 100644 index e80d45635d..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/account/nativeSMASigner.ts +++ /dev/null @@ -1,175 +0,0 @@ -import type { - SmartAccountSigner, - SigningMethods, - SignatureRequest, -} from "@aa-sdk/core"; -import { - type Address, - type Chain, - concat, - concatHex, - hashMessage, - hashTypedData, - type Hex, - type SignableMessage, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { - packUOSignature, - pack1271EOASignature, - DEFAULT_OWNER_ENTITY_ID, - assertNever, - isDeferredAction, -} from "../utils.js"; -import { SignatureType } from "../modules/utils.js"; - -/** - * Creates an object with methods for generating a dummy signature, signing user operation hashes, signing messages, and signing typed data. - * - * @example - * ```ts - * import { nativeSMASigner } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * - * const MNEMONIC = "...": - * - * const account = createModularAccountV2({ config }); - * - * const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - * - * const messageSigner = nativeSMASigner(signer, chain, account.address); - * ``` - * - * @param {SmartAccountSigner} signer Signer to use for signing operations - * @param {Chain} chain Chain object for the signer - * @param {Address} accountAddress address of the smart account using this signer - * @param {Hex} deferredActionData optional deferred action data to prepend to the uo signatures - * @returns {object} an object with methods for signing operations and managing signatures - */ -export const nativeSMASigner = ( - signer: SmartAccountSigner, - chain: Chain, - accountAddress: Address, - deferredActionData?: Hex, -) => { - const signingMethods: SigningMethods = { - prepareSign: async ( - request: SignatureRequest, - ): Promise => { - let hash; - const requestType = request.type; - - switch (requestType) { - case "personal_sign": - hash = hashMessage(request.data); - break; - - case "eth_signTypedData_v4": - if (isDeferredAction(request.data, accountAddress)) { - return request; - } else { - hash = await hashTypedData(request.data); - break; - } - - default: - return assertNever(requestType, "Invalid signature request type"); - } - - return { - type: "eth_signTypedData_v4", - data: { - domain: { - chainId: Number(chain.id), - verifyingContract: accountAddress, - }, - types: { - ReplaySafeHash: [{ name: "hash", type: "bytes32" }], - }, - message: { - hash, - }, - primaryType: "ReplaySafeHash", - }, - }; - }, - formatSign: async (signature: Hex) => { - return pack1271EOASignature({ - validationSignature: signature, - entityId: DEFAULT_OWNER_ENTITY_ID, - }); - }, - }; - - return { - ...signingMethods, - getDummySignature: (): Hex => { - const sig = packUOSignature({ - // orderedHookData: [], - validationSignature: - "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c", - }); - - return deferredActionData ? concatHex([deferredActionData, sig]) : sig; - }, - - signUserOperationHash: async (uoHash: Hex): Promise => { - let sig = await signer - .signMessage({ raw: uoHash }) - .then((signature: Hex) => - packUOSignature({ - // orderedHookData: [], - validationSignature: signature, - }), - ); - - if (deferredActionData) { - sig = concatHex([deferredActionData, sig]); - deferredActionData = undefined; - } - - return sig; - }, - - // we apply the expected 1271 packing here since the account contract will expect it - async signMessage({ message }: { message: SignableMessage }): Promise { - const { type, data } = await signingMethods.prepareSign({ - type: "personal_sign", - data: message, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - const sig = await signer.signTypedData(data); - - return signingMethods.formatSign(sig); - }, - - // TODO: maybe move "sign deferred actions" to a separate function? - // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing - signTypedData: async < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >( - typedDataDefinition: TypedDataDefinition, - ): Promise => { - const { type, data } = await signingMethods.prepareSign({ - type: "eth_signTypedData_v4", - data: typedDataDefinition as TypedDataDefinition, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - const sig = await signer.signTypedData(data); - - return isDeferredAction(typedDataDefinition, accountAddress) - ? concat([SignatureType.EOA, sig]) - : signingMethods.formatSign(sig); - }, - }; -}; diff --git a/account-kit/smart-contracts/src/ma-v2/account/predictAddress.test.ts b/account-kit/smart-contracts/src/ma-v2/account/predictAddress.test.ts deleted file mode 100644 index 4b666cde65..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/account/predictAddress.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { - getAccountAddress, - getEntryPoint, - LocalAccountSigner, -} from "@aa-sdk/core"; -import { custom, publicActions } from "viem"; -import { generatePrivateKey } from "viem/accounts"; -import { local070Instance } from "~test/instances.js"; -import { createModularAccountV2 } from "./modularAccountV2.js"; -import { predictModularAccountV2Address } from "./predictAddress.js"; -import { - getDefaultMAV2FactoryAddress, - getDefaultSMAV2BytecodeAddress, -} from "../utils.js"; - -describe("MAv2 Counterfactual Address Tests", () => { - const instanceV070 = local070Instance; - - it("MAv2 should match the entrypoint generated counterfactual address", async () => { - // Repeat 20 times, with a randomized address and salt. Pseudo-fuzzing. - - for (let i = 0; i < 20; i++) { - const localSigner = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - - // Generate a random salt. The same generator function for private keys can be used, because it is also a 32 byte value. - const salt = BigInt(generatePrivateKey()); - - const chain = instanceV070.chain; - const entryPoint = getEntryPoint(chain, { - version: "0.7.0", - }); - - const modularAccountV2 = await createModularAccountV2({ - transport: custom(instanceV070.getClient()), - signer: localSigner, - chain, - salt, - mode: "default", - }); - - // First, compute the address using the EntryPoint utility function: - const entryPointComputedAddress = await getAccountAddress({ - client: instanceV070.getClient().extend(publicActions), - entryPoint, - getAccountInitCode: modularAccountV2.getInitCode, - }); - - const locallyComputedAddress = predictModularAccountV2Address({ - factoryAddress: getDefaultMAV2FactoryAddress(chain), - implementationAddress: getDefaultSMAV2BytecodeAddress(chain), - salt, - type: "SMA", - ownerAddress: await localSigner.getAddress(), - }); - - expect(entryPointComputedAddress).toEqual(locallyComputedAddress); - } - }); -}); diff --git a/account-kit/smart-contracts/src/ma-v2/account/predictAddress.ts b/account-kit/smart-contracts/src/ma-v2/account/predictAddress.ts deleted file mode 100644 index 1cf36bd19e..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/account/predictAddress.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { - encodePacked, - getContractAddress, - keccak256, - type Address, - type Hex, -} from "viem"; - -export type PredictModularAccountV2AddressParams = { - factoryAddress: Address; - implementationAddress: Address; // Should be the implementation address of the account type you are predicting the address for. - salt: bigint; -} & ( - | { - type: "MA"; - ownerAddress: Address; - entityId: number; - } - | { - type: "SMA"; - ownerAddress: Address; - } - | { - type: "WebAuthn"; - ownerPublicKey: { - x: bigint; - y: bigint; - }; - entityId: number; - } -); - -/** - * Predicts the address of a modular account V2 based on the provided parameters, which include factory address, salt, and implementation address. This function supports different types of accounts including "SMA", "MA", and "WebAuthn". - * - * @example - * ```ts - * import { predictModularAccountV2Address } from "@account-kit/smart-contracts"; - * - * const accountAddress = predictModularAccountV2Address({ - * factoryAddress: "0xFactoryAddress" as Address, - * implementationAddress: "0xImplementation" as Address, - * salt: 0n, - * type: "SMA", - * ownerAddress: "0xOwner" as Address, - * }); - * ``` - * - * @param {PredictModularAccountV2AddressParams} params The parameters for predicting the modular account address, including `factoryAddress`, `salt`, `implementationAddress`, and additional properties based on the account type. - * @returns {Address} The predicted address for the modular account V2. - */ export function predictModularAccountV2Address( - params: PredictModularAccountV2AddressParams, -): Address { - const { factoryAddress, salt, implementationAddress } = params; - - let combinedSalt: Hex; - let initcode: Hex; - - // Note: prediction for MA and WebAuthn is currently untested, because they are not supported as an account type yet. - // Prior to using this prediction logic, ensure that the counterfactual computation is correct by updating `predictAddress.test.ts` to include a test for MA and WebAuthn. - switch (params.type) { - case "SMA": - // MAv2 factory uses max uint32 for SMA entityId - combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, 0xffffffff); - const immutableArgs = params.ownerAddress; - initcode = getProxyBytecodeWithImmutableArgs( - implementationAddress, - immutableArgs, - ); - break; - case "MA": - combinedSalt = getCombinedSaltK1( - params.ownerAddress, - salt, - params.entityId, - ); - - initcode = getProxyBytecode(implementationAddress); - break; - case "WebAuthn": - const { - ownerPublicKey: { x, y }, - } = params; - - combinedSalt = keccak256( - encodePacked( - ["uint256", "uint256", "uint256", "uint32"], - [x, y, salt, params.entityId], - ), - ); - - initcode = getProxyBytecode(implementationAddress); - - break; - default: - return assertNeverModularAccountV2Type(params); - } - - return getContractAddress({ - from: factoryAddress, - opcode: "CREATE2", - salt: combinedSalt, - bytecode: initcode, - }); -} - -function getCombinedSaltK1( - ownerAddress: Address, - salt: bigint, - entityId: number, -): Hex { - return keccak256( - encodePacked( - ["address", "uint256", "uint32"], - [ownerAddress, salt, entityId], - ), - ); -} - -function getProxyBytecode(implementationAddress: Address): Hex { - return `0x603d3d8160223d3973${implementationAddress.slice( - 2, - )}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`; -} - -function getProxyBytecodeWithImmutableArgs( - implementationAddress: Address, - immutableArgs: Hex, -): Hex { - return `0x6100513d8160233d3973${implementationAddress.slice( - 2, - )}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3${immutableArgs.slice( - 2, - )}`; -} - -function assertNeverModularAccountV2Type(_: never): never { - throw new Error( - "Unknown modular account type in predictModularAccountV2Address", - ); -} diff --git a/account-kit/smart-contracts/src/ma-v2/actions/common/types.ts b/account-kit/smart-contracts/src/ma-v2/actions/common/types.ts deleted file mode 100644 index 14f5739e6e..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/actions/common/types.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { Address, Hex } from "viem"; - -export type ModuleEntity = { - moduleAddress: Address; - entityId: number; -}; - -export type ValidationConfig = { - moduleAddress: Address; - entityId: number; // uint32 - isGlobal: boolean; - isSignatureValidation: boolean; - isUserOpValidation: boolean; -}; - -export enum HookType { - EXECUTION = "0x00", - VALIDATION = "0x01", -} - -export type HookConfig = { - address: Address; - entityId: number; // uint32 - hookType: HookType; - hasPreHooks: boolean; - hasPostHooks: boolean; -}; - -// maps to type ValidationStorage in MAv2 implementation -export type ValidationData = { - isGlobal: boolean; // validation flag - isSignatureValidation: boolean; // validation flag - isUserOpValidation: boolean; - validationHooks: HookConfig[]; - executionHooks: Hex[]; - selectors: Hex[]; -}; diff --git a/account-kit/smart-contracts/src/ma-v2/actions/common/utils.ts b/account-kit/smart-contracts/src/ma-v2/actions/common/utils.ts deleted file mode 100644 index f1f08f331a..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/actions/common/utils.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { type Hex, toHex, concatHex } from "viem"; -import type { ValidationConfig, HookConfig, ModuleEntity } from "./types"; -import { HookType } from "./types.js"; - -/** - * Serializes a validation configuration into a hexadecimal string representation. This involves converting boolean flags into bitwise representation and combining them with serialized module entity data. - * - * @example - * ```ts - * import { serializeValidationConfig } from "@account-kit/smart-contracts"; - * import { Address } from "viem"; - * - * const moduleAddress: Address = "0x1234"; - * const entityId: number = 1234; - * const isGlobal: boolean = true; - * const isSignatureValidation: boolean = false; - * const isUserOpValidation: boolean = true; - * - * const validationConfigHex = serializeValidationConfig({ - * moduleAddress, - * entityId - * isGlobal, - * isSignatureValidation, - * isUserOpValidation - * }); - * ``` - * @param {ValidationConfig} config The validation configuration object containing details to serialize - * @returns {Hex} A hexadecimal string representing the serialized configuration - */ -export function serializeValidationConfig(config: ValidationConfig): Hex { - const isUserOpValidationBit = config.isUserOpValidation ? 1 : 0; - const isSignatureValidationBit = config.isSignatureValidation ? 2 : 0; - const isGlobalBit = config.isGlobal ? 4 : 0; - return concatHex([ - serializeModuleEntity(config), - toHex(isUserOpValidationBit + isSignatureValidationBit + isGlobalBit, { - size: 1, - }), - ]); -} - -/** - * Serializes a `HookConfig` object into a `Hex` format by encoding the hook type, presence of post/pre hooks, address, and entity ID. - * - * @example - * ```ts - * import { type HookType, serializeHookConfig } from "@account-kit/smart-contracts"; - * import { Address } from "viem"; - * - * const moduleAddress: Address = "0x1234"; - * const entityId: number = 1234; - * const hookType: HookType = HookType.Validation; - * const hasPostHooks: boolean = false; - * const hasPreHooks: boolean = true; - * - * const hookConfigHex = serializeHookConfig({ - * moduleAddress, - * entityId - * hookType, - * hasPostHooks, - * hasPreHooks - * }); - * ``` - * - * @param {HookConfig} config The hook configuration containing address, entity ID, hook type, and post/pre hook indicators - * @returns {Hex} The serialized hook configuration in hexadecimal format - */ -export function serializeHookConfig(config: HookConfig): Hex { - const hookTypeBit = config.hookType === HookType.VALIDATION ? 1 : 0; - const hasPostHooksBit = config.hasPostHooks ? 2 : 0; - const hasPreHooksBit = config.hasPreHooks ? 4 : 0; - return concatHex([ - config.address, - toHex(config.entityId, { size: 4 }), - toHex(hookTypeBit + hasPostHooksBit + hasPreHooksBit, { - size: 1, - }), - ]); -} - -/** - * Serializes a module entity into a hexadecimal format by concatenating the module address and entity ID. - * - * @example - * ```ts - * import { serializeModuleEntity } from "@account-kit/smart-contracts"; - * import { Address } from "viem"; - * - * const moduleAddress: Address = "0x1234"; - * const entityId: number = 1234; - * - * const moduleEntityHex = serializeModuleEntity({ - * moduleAddress, - * entityId - * }); - * ``` - * - * @param {ModuleEntity} config The module entity configuration containing the module address and entity ID - * @returns {Hex} A hexadecimal string representation of the serialized module entity - */ -export function serializeModuleEntity(config: ModuleEntity): Hex { - return concatHex([config.moduleAddress, toHex(config.entityId, { size: 4 })]); -} diff --git a/account-kit/smart-contracts/src/ma-v2/actions/deferralActions.test.ts b/account-kit/smart-contracts/src/ma-v2/actions/deferralActions.test.ts deleted file mode 100644 index 7fae615391..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/actions/deferralActions.test.ts +++ /dev/null @@ -1,725 +0,0 @@ -import { - erc7677Middleware, - LocalAccountSigner, - type SmartAccountSigner, - type UserOperationRequest_v7, -} from "@aa-sdk/core"; -import { - alchemyFeeEstimator, - alchemyGasAndPaymasterAndDataMiddleware, -} from "@account-kit/infra"; -import { - createModularAccountV2Client, - type SignerEntity, -} from "@account-kit/smart-contracts"; -import { - buildDeferredActionDigest, - deferralActions, - PermissionBuilder, - PermissionType, - RootPermissionOnlyError, - type Permission, -} from "@account-kit/smart-contracts/experimental"; -import { - concat, - custom, - fromHex, - isAddress, - parseEther, - parseGwei, - publicActions, - testActions, - toHex, - type Address, - type Hex, -} from "viem"; -import { entryPoint07Abi } from "viem/account-abstraction"; -import { mine, setBalance, setNextBlockBaseFeePerGas } from "viem/actions"; -import { accounts } from "~test/constants.js"; -import { local070Instance } from "~test/instances.js"; -import { - packAccountGasLimits, - packPaymasterData, -} from "../../../../../aa-sdk/core/src/entrypoint/0.7"; - -// Note: These tests maintain a shared state to not break the local-running rundler by desyncing the chain. -describe("MA v2 deferral actions tests", async () => { - const instance = local070Instance; - - const target = "0x000000000000000000000000000000000000dEaD"; - const sendAmount = parseEther("1"); - - let signer: SmartAccountSigner; - let sessionKey: SmartAccountSigner; - let deferredActionDigest: Hex; - let accountAddress: Hex; - let initCode: Hex; - - beforeEach(async () => { - signer = LocalAccountSigner.generatePrivateKeySigner(); - sessionKey = LocalAccountSigner.generatePrivateKeySigner(); - - // set up and sign deferred action with client with owner connected - const provider = ( - await givenConnectedProvider({ - signer, - }) - ).extend(deferralActions); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("30"), - }); - - // these can be default values or from call arguments - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: true, - }); - - const { typedData, fullPreSignatureDeferredActionDigest } = - await new PermissionBuilder({ - client: provider, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - entityId, - nonce: nonce, - deadline: 0, - }) - .addPermission({ - permission: { - type: PermissionType.ROOT, - }, - }) - .compileDeferred(); - - const sig = await provider.account.signTypedData(typedData); - - deferredActionDigest = buildDeferredActionDigest({ - fullPreSignatureDeferredActionDigest, - sig, - }); - - accountAddress = provider.getAddress(); - initCode = await provider.account.getInitCode(); - }); - - it( - "deferred action then send another uo from same client", - { retry: 3, timeout: 30_000 }, - async () => { - const sessionKeyClient = await createModularAccountV2Client({ - transport: custom(instance.getClient()), - chain: instance.chain, - accountAddress, - signer: sessionKey, - initCode, - deferredAction: deferredActionDigest, - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - }); - - const uoResult = await sessionKeyClient.sendUserOperation({ - uo: { - target: target, - value: sendAmount / 2n, - data: "0x", - }, - overrides: { - maxFeePerGas: { multiplier: 2 }, - maxPriorityFeePerGas: { multiplier: 2 }, - }, - }); - - await setNextBlockBaseFeePerGas(instance.getClient(), { - baseFeePerGas: parseGwei("1"), - }); - - await mine(instance.getClient(), { blocks: 5 }); - - await sessionKeyClient.waitForUserOperationTransaction({ - hash: uoResult.hash, - retries: { - maxRetries: 10, - intervalMs: 500, - multiplier: 1.2, - }, - }); - - const uoResult2 = await sessionKeyClient.sendUserOperation({ - uo: { - target: target, - value: sendAmount / 2n, - data: "0x", - }, - overrides: { - maxFeePerGas: { multiplier: 1.5 }, - maxPriorityFeePerGas: { multiplier: 1.5 }, - }, - }); - - await setNextBlockBaseFeePerGas(instance.getClient(), { - baseFeePerGas: parseGwei("1"), - }); - await mine(instance.getClient(), { blocks: 5 }); - - await sessionKeyClient.waitForUserOperationTransaction({ - hash: uoResult2.hash, - retries: { - maxRetries: 10, - intervalMs: 500, - multiplier: 1.2, - }, - }); - }, - ); - - it( - "deferred action then send another uo from new client", - { retry: 3, timeout: 30_000 }, - async () => { - const sessionKeyClient = await createModularAccountV2Client({ - transport: custom(instance.getClient()), - chain: instance.chain, - accountAddress, - signer: sessionKey, - initCode, - deferredAction: deferredActionDigest, - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - }); - - const uoResult = await sessionKeyClient.sendUserOperation({ - uo: { - target: target, - value: sendAmount / 2n, - data: "0x", - }, - overrides: { - maxFeePerGas: { multiplier: 1.5 }, - maxPriorityFeePerGas: { multiplier: 1.5 }, - }, - }); - - await setNextBlockBaseFeePerGas(instance.getClient(), { - baseFeePerGas: 10n, - }); - - await sessionKeyClient.waitForUserOperationTransaction({ - hash: uoResult.hash, - retries: { - maxRetries: 10, - intervalMs: 500, - multiplier: 1.2, - }, - }); - - const sessionKeyClient2 = await createModularAccountV2Client({ - transport: custom(instance.getClient()), - chain: instance.chain, - accountAddress, - signer: sessionKey, - initCode, - deferredAction: deferredActionDigest, - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - }); - - const uoResult2 = await sessionKeyClient2.sendUserOperation({ - uo: { - target: target, - value: sendAmount / 2n, - data: "0x", - }, - }); - - await setNextBlockBaseFeePerGas(instance.getClient(), { - baseFeePerGas: 10n, - }); - - await sessionKeyClient2 - .waitForUserOperationTransaction(uoResult2) - .catch(async () => { - const dropAndReplaceResult = - await sessionKeyClient2.dropAndReplaceUserOperation({ - uoToDrop: uoResult2.request, - }); - return await sessionKeyClient2.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - }, - ); - - it("PermissionBuilder: Cannot add any permission after root", async () => { - const provider = (await givenConnectedProvider({ signer })).extend( - deferralActions, - ); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const sessionKey: SmartAccountSigner = new LocalAccountSigner( - accounts.unfundedAccountOwner, - ); - - // these can be default values or from call arguments - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: true, - }); - - const allPermissions = generateAllPermissions(); - - allPermissions.forEach(async (permission) => { - await expect(async () => { - new PermissionBuilder({ - client: provider, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - entityId, - nonce: nonce, - deadline: 0, - }) - .addPermission({ - permission: { - type: PermissionType.ROOT, - }, - }) - .addPermission({ permission }); - }).rejects.toThrow(new RootPermissionOnlyError(permission)); - }); - }); - - it("PermissionBuilder: Cannot compile post expiry", async () => { - const provider = (await givenConnectedProvider({ signer })).extend( - deferralActions, - ); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - // these can be default values or from call arguments - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: false, - }); - - const now = Date.now() / 1000; - const deadline = Math.round(now / 2); - - await expect(async () => { - await new PermissionBuilder({ - client: provider, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - entityId, - nonce, - deadline, - }) - .addPermission({ - permission: { - type: PermissionType.CONTRACT_ACCESS, - data: { - address: target, - }, - }, - }) - .compileDeferred(); - }).rejects.toThrowError( - /compileDeferred\(\): deadline \d+ cannot be before now \(\d+(\.\d+)?\)/, - ); - }); - - it("PermissionBuilder: Cannot install expired deferred action", async () => { - const client = instance - .getClient() - .extend(publicActions) - .extend(testActions({ mode: "anvil" })); - - const provider = (await givenConnectedProvider({ signer })).extend( - deferralActions, - ); - - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: false, - }); - - const deadline = Math.round(Date.now() / 1000 + 10); - - const { typedData, fullPreSignatureDeferredActionDigest } = - await new PermissionBuilder({ - client: provider, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - entityId, - nonce, - deadline, - }) - .addPermission({ - permission: { - type: PermissionType.CONTRACT_ACCESS, - data: { - address: target, - }, - }, - }) - .compileDeferred(); - - // Sign the typed data using the owner (fallback) validation, this must be done via the account to skip 6492 - const deferredValidationSig = - await provider.account.signTypedData(typedData); - - // Build the full hex to prepend to the UO signature - const deferredActionDigest = buildDeferredActionDigest({ - fullPreSignatureDeferredActionDigest, - sig: deferredValidationSig, - }); - - // Initialize the session key client corresponding to the session key we will install in the deferred action - const sessionKeyClient = await createModularAccountV2Client({ - transport: custom(instance.getClient()), - chain: instance.chain, - accountAddress, - signer: sessionKey, - initCode, - deferredAction: deferredActionDigest, - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - }); - - const uo = await sessionKeyClient.buildUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }); - - const signedUO = (await sessionKeyClient.signUserOperation({ - uoStruct: uo, - })) as UserOperationRequest_v7; - - // Advance time - await client.setNextBlockTimestamp({ - timestamp: BigInt(deadline) + 1000n, - }); - - await client.mine({ - blocks: 1, - }); - - await expect(async () => { - return await client.simulateContract({ - address: provider.account.getEntryPoint().address, - abi: entryPoint07Abi, - functionName: "handleOps", - args: [ - [ - { - sender: provider.account.address, - nonce: fromHex(signedUO.nonce, "bigint"), - initCode: - signedUO.factory && signedUO.factoryData - ? concat([signedUO.factory, signedUO.factoryData]) - : "0x", - callData: signedUO.callData, - accountGasLimits: packAccountGasLimits({ - verificationGasLimit: signedUO.verificationGasLimit, - callGasLimit: signedUO.callGasLimit, - }), - preVerificationGas: fromHex( - signedUO.preVerificationGas, - "bigint", - ), - gasFees: packAccountGasLimits({ - maxPriorityFeePerGas: signedUO.maxPriorityFeePerGas, - maxFeePerGas: signedUO.maxFeePerGas, - }), - paymasterAndData: - signedUO.paymaster && isAddress(signedUO.paymaster) - ? packPaymasterData({ - paymaster: signedUO.paymaster, - paymasterVerificationGasLimit: - signedUO.paymasterVerificationGasLimit, - paymasterPostOpGasLimit: signedUO.paymasterPostOpGasLimit, - paymasterData: signedUO.paymasterData, - }) - : "0x", - signature: signedUO.signature, - }, - ], - provider.account.address, - ], - account: await sessionKeyClient.account.getSigner().getAddress(), - }); - }).rejects.toThrow("AA22 expired or not due"); - }); - - it("PermissionBuilder: Cannot add root after any permission", async () => { - const provider = (await givenConnectedProvider({ signer })).extend( - deferralActions, - ); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const sessionKey: SmartAccountSigner = new LocalAccountSigner( - accounts.unfundedAccountOwner, - ); - - // these can be default values or from call arguments - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: true, - }); - - const allPermissions = generateAllPermissions(); - - allPermissions.forEach(async (permission) => { - await expect(async () => { - return new PermissionBuilder({ - client: provider, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - entityId, - nonce: nonce, - deadline: 0, - }) - .addPermission({ permission }) - .addPermission({ - permission: { - type: PermissionType.ROOT, - }, - }); - }).rejects.toThrow( - new RootPermissionOnlyError({ - type: PermissionType.ROOT, - }), - ); - }); - }); - - /* -------------------------------------------------------------------------- */ - /* Utilities */ - /* -------------------------------------------------------------------------- */ - - const givenConnectedProvider = async ({ - signer, - signerEntity, - accountAddress, - paymasterMiddleware, - salt = 0n, - }: { - signer: SmartAccountSigner; - signerEntity?: SignerEntity; - accountAddress?: `0x${string}`; - paymasterMiddleware?: "alchemyGasAndPaymasterAndData" | "erc7677"; - salt?: bigint; - }) => - createModularAccountV2Client({ - chain: instance.chain, - signer, - accountAddress, - signerEntity, - transport: custom(instance.getClient()), - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - ...(paymasterMiddleware === "alchemyGasAndPaymasterAndData" - ? alchemyGasAndPaymasterAndDataMiddleware({ - policyId: "FAKE_POLICY_ID", - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - transport: custom(instance.getClient()), - }) - : paymasterMiddleware === "erc7677" - ? erc7677Middleware() - : {}), - salt, - }); - - /** - * Creates a sample ERC20 allowance permission - * - * @param {Address} tokenAddress The address of the ERC20 token contract - * @param {string|number} allowance The allowance amount in wei (as a string or number) - * @returns {Permission} An ERC20_TOKEN_TRANSFER permission - */ - function createERC20TokenTransferPermission( - tokenAddress: Address = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC on Ethereum mainnet - allowance: string | number = "1000000000", // 1,000 USDC with 6 decimals - ): Permission { - return { - type: PermissionType.ERC20_TOKEN_TRANSFER, - data: { - address: tokenAddress, - allowance: toHex(BigInt(allowance)), - }, - }; - } - - /** - * Creates a sample native token transfer permission - * - * @param {string|number} allowance The allowance amount in wei (as a string or number) - * @returns {Permission} A NATIVE_TOKEN_TRANSFER permission - */ - function createNativeTokenTransferPermission( - allowance: string | number = "1000000000000000000", // 1 ETH - ): Permission { - return { - type: PermissionType.NATIVE_TOKEN_TRANSFER, - data: { - allowance: toHex(BigInt(allowance)), - }, - }; - } - - /** - * Creates a sample gas limit permission - * - * @param {string|number} limit The gas limit (as a string or number) - * @returns {Permission} A GAS_LIMIT permission - */ - function createGasLimitPermission( - limit: string | number = "100000", // 100k gas - ): Permission { - return { - type: PermissionType.GAS_LIMIT, - data: { - limit: toHex(BigInt(limit)), - }, - }; - } - - /** - * Creates a sample contract access permission - * - * @param {Address} contractAddress The address of the contract to allow access to - * @returns {Permission} A CONTRACT_ACCESS permission - */ - function createContractAccessPermission( - contractAddress: Address = "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", // Uniswap on Ethereum mainnet - ): Permission { - return { - type: PermissionType.CONTRACT_ACCESS, - data: { - address: contractAddress, - }, - }; - } - - /** - * Creates a sample account functions permission - * - * @param {Hex[]} functionSignatures Array of function signature hexes - * @returns {Permission} An ACCOUNT_FUNCTIONS permission - */ - function createAccountFunctionsPermission( - functionSignatures: Hex[] = [ - "0x095ea7b3", // approve(address,uint256) - "0xa9059cbb", // transfer(address,uint256) - "0x23b872dd", // transferFrom(address,address,uint256) - ], - ): Permission { - return { - type: PermissionType.ACCOUNT_FUNCTIONS, - data: { - functions: functionSignatures, - }, - }; - } - - /** - * Creates a sample functions on all contracts permission - * - * @param {Hex[]} functionSignatures Array of function signature hexes - * @returns {Permission} A FUNCTIONS_ON_ALL_CONTRACTS permission - */ - function createFunctionsOnAllContractsPermission( - functionSignatures: Hex[] = [ - "0x095ea7b3", // approve(address,uint256) - "0xa9059cbb", // transfer(address,uint256) - ], - ): Permission { - return { - type: PermissionType.FUNCTIONS_ON_ALL_CONTRACTS, - data: { - functions: functionSignatures, - }, - }; - } - - /** - * Creates a sample functions on specific contract permission - * - * @param {Address} contractAddress The address of the contract - * @param {Hex[]} functionSignatures Array of function signature hexes - * @returns {Permission} A FUNCTIONS_ON_CONTRACT permission - */ - function createFunctionsOnContractPermission( - contractAddress: Address = "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", // Uniswap on Ethereum mainnet - functionSignatures: Hex[] = [ - "0x7ff36ab5", // swapExactETHForTokens - "0x18cbafe5", // swapExactTokensForETH - ], - ): Permission { - return { - type: PermissionType.FUNCTIONS_ON_CONTRACT, - data: { - address: contractAddress, - functions: functionSignatures, - }, - }; - } - - /** - * Creates a root permission - * - * @returns {Permission} A ROOT permission - */ - function createRootPermission(): Permission { - return { - type: PermissionType.ROOT, - }; - } - - /** - * Generates one of each permission type - * - * @returns {Permission[]} An array containing one of each permission type - */ - function generateAllPermissions(): Permission[] { - return [ - createNativeTokenTransferPermission(), - createERC20TokenTransferPermission(), - createGasLimitPermission(), - createContractAccessPermission(), - createAccountFunctionsPermission(), - createFunctionsOnAllContractsPermission(), - createFunctionsOnContractPermission(), - createRootPermission(), - ]; - } -}); diff --git a/account-kit/smart-contracts/src/ma-v2/actions/deferralActions.ts b/account-kit/smart-contracts/src/ma-v2/actions/deferralActions.ts deleted file mode 100644 index 4022757658..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/actions/deferralActions.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { - AccountNotFoundError, - InvalidNonceKeyError, - EntryPointNotFoundError, - type UserOperationCallData, - type BatchUserOperationCallData, - type UserOperationRequest_v7, -} from "@aa-sdk/core"; -import { - type Address, - type Hex, - concatHex, - maxUint152, - encodePacked, - size, - toHex, - encodeDeployData, - hexToNumber, -} from "viem"; -import { entityIdAndNonceReaderBytecode, buildFullNonceKey } from "../utils.js"; -import { entityIdAndNonceReaderAbi } from "../abis/entityIdAndNonceReader.js"; -import type { ModularAccountV2Client } from "../client/client.js"; - -export type DeferredActionTypedData = { - domain: { - chainId: number; - verifyingContract: Address; - }; - types: { - DeferredAction: [ - { name: "nonce"; type: "uint256" }, - { name: "deadline"; type: "uint48" }, - { name: "call"; type: "bytes" }, - ]; - }; - primaryType: "DeferredAction"; - message: { - nonce: bigint; - deadline: number; - call: Hex; - }; -}; - -export type DeferredActionReturnData = { - typedData: DeferredActionTypedData; -}; - -export type CreateDeferredActionTypedDataParams = { - callData: Hex; - deadline: number; - nonce: bigint; -}; - -export type BuildPreSignatureDeferredActionDigestParams = { - typedData: DeferredActionTypedData; -}; - -export type BuildUserOperationWithDeferredActionParams = { - uo: UserOperationCallData | BatchUserOperationCallData; - signaturePrepend: Hex; - nonceOverride: bigint; -}; - -export type EntityIdAndNonceParams = { - entityId?: number; - nonceKey?: bigint; - isGlobalValidation: boolean; - isDeferredAction?: boolean; -}; - -export type DeferralActions = { - createDeferredActionTypedDataObject: ( - args: CreateDeferredActionTypedDataParams, - ) => Promise; - buildPreSignatureDeferredActionDigest: ( - args: BuildPreSignatureDeferredActionDigestParams, - ) => Hex; - buildUserOperationWithDeferredAction: ( - args: BuildUserOperationWithDeferredActionParams, - ) => Promise; - getEntityIdAndNonce: ( - args: EntityIdAndNonceParams, - ) => Promise<{ nonce: bigint; entityId: number }>; -}; - -/** - * Provides deferred action functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`. - * - * @param {ModularAccountV2Client} client - The client instance which provides account and sendUserOperation functionality. - * @returns {object} - An object containing three methods: `createDeferredActionTypedDataObject`, `buildDeferredActionDigest`, and `buildUserOperationWithDeferredAction`. - */ -export const deferralActions: ( - client: ModularAccountV2Client, -) => DeferralActions = (client: ModularAccountV2Client): DeferralActions => { - const createDeferredActionTypedDataObject = async ({ - callData, - deadline, - nonce, - }: CreateDeferredActionTypedDataParams): Promise => { - if (!client.account) { - throw new AccountNotFoundError(); - } - - const entryPoint = client.account.getEntryPoint(); - if (entryPoint === undefined) { - throw new EntryPointNotFoundError(client.chain, "0.7.0"); - } - - return { - typedData: { - domain: { - chainId: await client.getChainId(), - verifyingContract: client.account.address, - }, - types: { - DeferredAction: [ - { name: "nonce", type: "uint256" }, - { name: "deadline", type: "uint48" }, - { name: "call", type: "bytes" }, - ], - }, - primaryType: "DeferredAction", - message: { - nonce: nonce, - deadline: deadline, - call: callData, - }, - }, - }; - }; - - const buildPreSignatureDeferredActionDigest = ({ - typedData, - }: BuildPreSignatureDeferredActionDigestParams): Hex => { - const signerEntity = client.account.signerEntity; - const validationLocator = - (BigInt(signerEntity.entityId) << 8n) | - (signerEntity.isGlobalValidation ? 1n : 0n); - - const encodedCallData = encodePacked( - ["uint168", "uint48", "bytes"], - [validationLocator, typedData.message.deadline, typedData.message.call], - ); - - const encodedDataLength = size(encodedCallData); - const encodedData = concatHex([ - toHex(encodedDataLength, { size: 4 }), - encodedCallData, - ]); - return encodedData; - }; - - /** - * Builds a user operation with a deferred action by wrapping buildUserOperation() with a dummy signature override. - * - * @param {object} args The argument object containing the following: - * @param {UserOperationCallData | BatchUserOperationCallData} args.uo The user operation call data to build - * @param {Hex} args.signaturePrepend The signature data to prepend to the dummy signature - * @param {bigint} args.nonceOverride The nonce to override in the user operation, generally given from the typed data builder - * @returns {Promise} The unsigned user operation request with the deferred action - */ - const buildUserOperationWithDeferredAction = async ({ - uo, - signaturePrepend, - nonceOverride, - }: BuildUserOperationWithDeferredActionParams): Promise => { - // Check if client.account is defined - if (client.account === undefined) { - throw new AccountNotFoundError(); - } - - // Pre-fetch the dummy sig so we can override `client.account.getDummySignature()` - const dummySig = await client.account.getDummySignature(); - - // Cache the previous dummy signature getter - const previousDummySigGetter = client.account.getDummySignature; - - // Override client.account.getDummySignature() so `client.buildUserOperation()` uses the prepended hex and the dummy signature during gas estimation - client.account.getDummySignature = () => { - return concatHex([signaturePrepend, dummySig as Hex]); - }; - - const unsignedUo = (await client.buildUserOperation({ - uo: uo, - overrides: { - nonce: nonceOverride, - }, - })) as UserOperationRequest_v7; - - // Restore the dummy signature getter - client.account.getDummySignature = previousDummySigGetter; - - return unsignedUo; - }; - - const getEntityIdAndNonce = async ({ - entityId = 1, - nonceKey = 0n, - isGlobalValidation, - isDeferredAction = true, - }: EntityIdAndNonceParams) => { - if (!client.account) { - throw new AccountNotFoundError(); - } - - if (nonceKey > maxUint152) { - throw new InvalidNonceKeyError(nonceKey); - } - - const entryPoint = client.account.getEntryPoint(); - if (entryPoint === undefined) { - throw new EntryPointNotFoundError(client.chain, "0.7.0"); - } - - const bytecode = encodeDeployData({ - abi: entityIdAndNonceReaderAbi, - bytecode: entityIdAndNonceReaderBytecode, - args: [ - client.account.address, - entryPoint.address, - buildFullNonceKey({ - nonceKey, - entityId, - isGlobalValidation, - isDeferredAction, - }), - ], - }); - - const { data } = await client.call({ data: bytecode }); - if (!data) { - throw new Error("No data returned from contract call"); - } - - return { - nonce: BigInt(data), - entityId: hexToNumber(`0x${data.slice(40, 48)}`), - }; - }; - - return { - createDeferredActionTypedDataObject, - buildPreSignatureDeferredActionDigest, - buildUserOperationWithDeferredAction, - getEntityIdAndNonce, - }; -}; diff --git a/account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts b/account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts deleted file mode 100644 index f770b4732c..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts +++ /dev/null @@ -1,299 +0,0 @@ -import { - AccountNotFoundError, - NotAModularAccountV2Error, - EntityIdOverrideError, - type GetAccountParameter, - type GetEntryPointFromAccount, - IncompatibleClientError, - type SendUserOperationResult, - type UserOperationOverridesParameter, - isSmartAccountClient, - isSmartAccountWithSigner, -} from "@aa-sdk/core"; -import { - type Address, - type Chain, - type Client, - type Hex, - type Transport, - concatHex, - encodeFunctionData, - zeroAddress, -} from "viem"; - -import { semiModularAccountBytecodeAbi } from "../../abis/semiModularAccountBytecodeAbi.js"; -import type { HookConfig, ValidationConfig } from "../common/types.js"; -import { - serializeHookConfig, - serializeModuleEntity, - serializeValidationConfig, -} from "../common/utils.js"; - -import { - type ModularAccountsV2, - isModularAccountV2, -} from "../../account/common/modularAccountV2Base.js"; -import { DEFAULT_OWNER_ENTITY_ID } from "../../utils.js"; - -export type InstallValidationParams< - TAccount extends ModularAccountsV2 | undefined = - | ModularAccountsV2 - | undefined, -> = { - validationConfig: ValidationConfig; - selectors: Hex[]; - installData: Hex; - hooks: { - hookConfig: HookConfig; - initData: Hex; - }[]; -} & UserOperationOverridesParameter> & - GetAccountParameter; - -export type UninstallValidationParams< - TAccount extends ModularAccountsV2 | undefined = - | ModularAccountsV2 - | undefined, -> = { - moduleAddress: Address; - entityId: number; - uninstallData: Hex; - hookUninstallDatas: Hex[]; -} & UserOperationOverridesParameter> & - GetAccountParameter; - -export type InstallValidationActions< - TAccount extends ModularAccountsV2 | undefined = - | ModularAccountsV2 - | undefined, -> = { - installValidation: ( - args: InstallValidationParams, - ) => Promise; - encodeInstallValidation: ( - // TODO: omit the user op sending related parameters from this type - args: InstallValidationParams, - ) => Promise; - uninstallValidation: ( - args: UninstallValidationParams, - ) => Promise; - encodeUninstallValidation: ( - args: UninstallValidationParams, - ) => Promise; -}; - -/** - * Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`. - * - * @example - * ```ts - * import { createModularAccountV2Client, installValidationActions, getDefaultSingleSignerValidationModuleAddress, SingleSignerValidationModule } from "@account-kit/smart-contracts"; - * import { Address } from "viem"; - * - * const client = (await createModularAccountV2Client({ ... })).extend(installValidationActions); - * const sessionKeyAddress: Address = "0x1234"; - * const sessionKeyEntityId: number = 1; - * - * await client.installValidation({ - * validationConfig: { - * moduleAddress: getDefaultSingleSignerValidationModuleAddress( - * client.chain - * ), - * entityId: sessionKeyEntityId, - * isGlobal: true, - * isSignatureValidation: false, - * isUserOpValidation: true, - * }, - * selectors: [], - * installData: SingleSignerValidationModule.encodeOnInstallData({ - * entityId: sessionKeyEntityId, - * signer: sessionKeyAddress, - * }), - * hooks: [], - * }); - * - * await client.uninstallValidation({ - * moduleAddress: sessionKeyAddress, - * entityId: sessionKeyEntityId, - * uninstallData: SingleSignerValidationModule.encodeOnUninstallData({ - * entityId: sessionKeyEntityId, - * }), - * hookUninstallDatas: [], - * }); - * - * ``` - * - * @param {object} client - The client instance which provides account and sendUserOperation functionality. - * @returns {object} - An object containing two methods, `installValidation` and `uninstallValidation`. - */ -export function installValidationActions< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends ModularAccountsV2 | undefined = - | ModularAccountsV2 - | undefined, ->( - client: Client, -): InstallValidationActions { - const encodeInstallValidation = async ({ - validationConfig, - selectors, - installData, - hooks, - account = client.account, - }: InstallValidationParams) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isModularAccountV2(account)) { - throw new NotAModularAccountV2Error(); - } - - if (isSmartAccountWithSigner(account) && !isSmartAccountClient(client)) { - // if we don't differentiate between WebauthnModularAccountV2Client and ModularAccountV2Client, passing client to isSmartAccountClient complains - throw new IncompatibleClientError( - "SmartAccountClient", - "installValidation", - client, - ); - } - - // an entityId of zero is only allowed if we're installing or uninstalling hooks on the fallback validation - if ( - validationConfig.entityId === DEFAULT_OWNER_ENTITY_ID && - validationConfig.moduleAddress !== zeroAddress - ) { - throw new EntityIdOverrideError(); - } - - return account.encodeCallData( - encodeFunctionData({ - abi: semiModularAccountBytecodeAbi, - functionName: "installValidation", - args: [ - serializeValidationConfig(validationConfig), - selectors, - installData, - hooks.map((hook: { hookConfig: HookConfig; initData: Hex }) => - concatHex([serializeHookConfig(hook.hookConfig), hook.initData]), - ), - ], - }), - ); - }; - - const encodeUninstallValidation = async ({ - moduleAddress, - entityId, - uninstallData, - hookUninstallDatas, - account = client.account, - }: UninstallValidationParams) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isModularAccountV2(account)) { - throw new NotAModularAccountV2Error(); - } - - if (isSmartAccountWithSigner(account) && !isSmartAccountClient(client)) { - // if we don't differentiate between WebauthnModularAccountV2Client and ModularAccountV2Client, passing client to isSmartAccountClient complains - throw new IncompatibleClientError( - "SmartAccountClient", - "uninstallValidation", - client, - ); - } - - return account.encodeCallData( - encodeFunctionData({ - abi: semiModularAccountBytecodeAbi, - functionName: "uninstallValidation", - args: [ - serializeModuleEntity({ - moduleAddress, - entityId, - }), - uninstallData, - hookUninstallDatas, - ], - }), - ); - }; - - return { - encodeInstallValidation, - encodeUninstallValidation, - installValidation: async ({ - validationConfig, - selectors, - installData, - hooks, - account = client.account, - overrides, - }: InstallValidationParams) => { - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "installValidation", - client, - ); - } - - if (!account) { - throw new AccountNotFoundError(); - } - - const callData = await encodeInstallValidation({ - validationConfig, - selectors, - installData, - hooks, - account, - }); - - return client.sendUserOperation({ - uo: callData, - account, - overrides, - }); - }, - - uninstallValidation: async ({ - moduleAddress, - entityId, - uninstallData, - hookUninstallDatas, - account = client.account, - overrides, - }: UninstallValidationParams) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "uninstallValidation", - client, - ); - } - - const callData: Hex = await encodeUninstallValidation({ - moduleAddress, - entityId, - uninstallData, - hookUninstallDatas, - account, - }); - - return client.sendUserOperation({ - uo: callData, - account, - overrides, - }); - }, - }; -} diff --git a/account-kit/smart-contracts/src/ma-v2/client/client.test-d.ts b/account-kit/smart-contracts/src/ma-v2/client/client.test-d.ts deleted file mode 100644 index 741be2d3d0..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/client/client.test-d.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { - erc7677Middleware, - LocalAccountSigner, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { alchemy } from "@account-kit/infra"; -import { createModularAccountV2Client } from "@account-kit/smart-contracts"; -import { custom } from "viem"; -import { accounts } from "~test/constants.js"; -import { local070Instance } from "~test/instances.js"; - -// TODO: Include a snapshot to reset to in afterEach. -describe("MA v2 Tests: Types", async () => { - const instance = local070Instance; - - const signer: SmartAccountSigner = new LocalAccountSigner( - accounts.fundedAccountOwner, - ); - - it("webauthn client can be instantiated with alchemy transport", async () => { - await createModularAccountV2Client({ - mode: "webauthn", - chain: instance.chain, - transport: alchemy({ apiKey: "AN_API_KEY" }), - credential: { - id: "test-id", - publicKey: "0x000", - }, - }); - }); - - it("webauthn client can be instantiated with other transport", async () => { - await createModularAccountV2Client({ - mode: "webauthn", - chain: instance.chain, - transport: custom(instance.getClient()), - credential: { - id: "test-id", - publicKey: "0x000", - }, - }); - }); - - it("webauthn client cannot be instantied with a signer when using alchemy transport", async () => { - // @ts-expect-error // Should not be able to pass a signer - await createModularAccountV2Client({ - mode: "webauthn", - chain: instance.chain, - signer, - transport: alchemy({ apiKey: "AN_API_KEY" }), - credential: { - id: "test-id", - publicKey: "0x000", - }, - }); - }); - - it("webauthn client cannot be instantied with a signer when using other transport", async () => { - await createModularAccountV2Client({ - mode: "webauthn", - chain: instance.chain, - // @ts-expect-error // Should not be able to pass a signer - signer, - transport: custom(instance.getClient()), - credential: { - id: "test-id", - publicKey: "0x000", - }, - }); - }); - - it("alchemy client instantiated can specify policy id but not for others ", async () => { - createModularAccountV2Client({ - chain: instance.chain, - signer, - transport: alchemy({ apiKey: "AN_API_KEY" }), - policyId: "test-policy-id", - }); - // @ts-expect-error // A custom should not be able to specify an policy id - createModularAccountV2Client({ - chain: instance.chain, - signer, - transport: custom(instance.getClient()), - policyId: "test-policy-id", - }); - }); - - it("alchemy client instantiated cannot specify paymaster", async () => { - const { paymasterAndData } = erc7677Middleware(); - createModularAccountV2Client({ - chain: instance.chain, - signer, - transport: alchemy({ apiKey: "AN_API_KEY" }), - }); - // @ts-expect-error Should not be able to pass paymasterAndData - createModularAccountV2Client({ - chain: instance.chain, - signer, - transport: alchemy({ apiKey: "AN_API_KEY" }), - paymasterAndData, - }); - createModularAccountV2Client({ - chain: instance.chain, - signer, - transport: custom(instance.getClient()), - }); - createModularAccountV2Client({ - chain: instance.chain, - signer, - transport: custom(instance.getClient()), - paymasterAndData, - }); - }); -}); diff --git a/account-kit/smart-contracts/src/ma-v2/client/client.test.ts b/account-kit/smart-contracts/src/ma-v2/client/client.test.ts deleted file mode 100644 index 6cd8e28cef..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/client/client.test.ts +++ /dev/null @@ -1,2195 +0,0 @@ -import * as AACoreModule from "@aa-sdk/core"; -import { - createSmartAccountClient, - erc7677Middleware, - LocalAccountSigner, - type SmartAccountSigner, - type UserOperationRequest_v7, -} from "@aa-sdk/core"; -import * as AAInfraModule from "@account-kit/infra"; -import { - alchemy, - alchemyFeeEstimator, - alchemyGasAndPaymasterAndDataMiddleware, - arbitrumSepolia, -} from "@account-kit/infra"; -import { - createLightAccountClient, - createModularAccountV2Client, - getMAV2UpgradeToData, - type SignerEntity, -} from "@account-kit/smart-contracts"; -import { - AllowlistModule, - buildDeferredActionDigest, - buildFullNonceKey, - deferralActions, - getDefaultAllowlistModuleAddress, - getDefaultNativeTokenLimitModuleAddress, - getDefaultPaymasterGuardModuleAddress, - getDefaultSingleSignerValidationModuleAddress, - getDefaultTimeRangeModuleAddress, - getDefaultWebauthnValidationModuleAddress, - installValidationActions, - modularAccountAbi, - NativeTokenLimitModule, - PaymasterGuardModule, - PermissionBuilder, - PermissionType, - semiModularAccountBytecodeAbi, - SingleSignerValidationModule, - TimeRangeModule, -} from "@account-kit/smart-contracts/experimental"; -import { - concat, - concatHex, - createWalletClient, - custom, - encodeFunctionData, - fromHex, - getContract, - getContractAddress, - hashMessage, - hashTypedData, - isAddress, - parseEther, - prepareEncodeFunctionData, - publicActions, - testActions, - toHex, - zeroAddress, - zeroHash, - type ContractFunctionName, - type TestActions, -} from "viem"; -import { - createWebAuthnCredential, - entryPoint07Abi, - type ToWebAuthnAccountParameters, -} from "viem/account-abstraction"; -import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; -import { setBalance } from "viem/actions"; -import { parsePublicKey } from "webauthn-p256"; -import { local070Instance } from "~test/instances.js"; -import { paymaster070 } from "~test/paymaster/paymaster070.js"; -import { SoftWebauthnDevice } from "~test/webauthn.js"; -import { - packAccountGasLimits, - packPaymasterData, -} from "../../../../../aa-sdk/core/src/entrypoint/0.7.js"; -import { HookType } from "../actions/common/types.js"; -import { WebAuthnValidationModule } from "../modules/webauthn-validation/module.js"; -import { mintableERC20Abi, mintableERC20Bytecode } from "../utils.js"; - -// Note: These tests maintain a shared state to not break the local-running rundler by desyncing the chain. -describe("MA v2 Tests", async () => { - const instance = local070Instance; - const isValidSigSuccess = "0x1626ba7e"; - - let client: ReturnType & - ReturnType & - TestActions; - beforeAll(async () => { - client = instance - .getClient() - .extend(publicActions) - .extend(testActions({ mode: "anvil" })); - }); - - let signer: SmartAccountSigner; - let sessionKey: SmartAccountSigner; - - const target = "0x000000000000000000000000000000000000dEaD"; - const sendAmount = parseEther("1"); - - const getTargetBalance = async (): Promise => - client.getBalance({ - address: target, - }); - - beforeEach(async () => { - sessionKey = LocalAccountSigner.generatePrivateKeySigner(); - signer = LocalAccountSigner.generatePrivateKeySigner(); - }); - - it("sends a simple UO", async () => { - const provider = await givenConnectedProvider({ signer }); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("20"), - }); - - const startingAddressBalance = await getTargetBalance(); - - const result = await provider.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }); - - await provider.waitForUserOperationTransaction(result).catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation({ - uoToDrop: result.request, - }); - await provider.waitForUserOperationTransaction(dropAndReplaceResult); - }); - - await expect(getTargetBalance()).resolves.toEqual( - startingAddressBalance + sendAmount, - ); - }); - - it("sends a simple UO with webauthn account", async () => { - const { provider } = await givenWebAuthnProvider(); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const startingAddressBalance = await getTargetBalance(); - - const result = await provider.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }); - - await provider.waitForUserOperationTransaction(result).catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation({ - uoToDrop: result.request, - }); - await provider.waitForUserOperationTransaction(dropAndReplaceResult); - }); - - await expect(getTargetBalance()).resolves.toEqual( - startingAddressBalance + sendAmount, - ); - }); - - it("installs WebAuthnValidationModule, sends UO on behalf of owner with webauthn session key", async () => { - const provider = (await givenWebAuthnProvider()).provider.extend( - installValidationActions, - ); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - // set up session key client - const webauthnDevice = new SoftWebauthnDevice(); - - const credential = await createWebAuthnCredential({ - rp: { id: "localhost", name: "localhost" }, - createFn: (opts) => webauthnDevice.create(opts, "localhost"), - user: { name: "test", displayName: "test" }, - }); - - const { x, y } = parsePublicKey(credential.publicKey); - - // install webauthn validation module - const result = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultWebauthnValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: WebAuthnValidationModule.encodeOnInstallData({ - entityId: 1, - x, - y, - }), - hooks: [], - }); - - // wait for the UserOperation to be mined - await provider.waitForUserOperationTransaction(result).catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation({ - uoToDrop: result.request, - }); - await provider.waitForUserOperationTransaction(dropAndReplaceResult); - }); - - // create session key client - const sessionKeyClient = await givenConnectedWebauthnProvider({ - credential, - accountAddress: provider.getAddress(), - signerEntity: { entityId: 1, isGlobalValidation: true }, - getFn: (opts) => webauthnDevice.get(opts, "localhost"), - rpId: "localhost", - }); - - const sessionKeyResult = await sessionKeyClient.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }); - - // wait for the UserOperation to be mined - await sessionKeyClient - .waitForUserOperationTransaction(sessionKeyResult) - .catch(async () => { - const dropAndReplaceResult = - await sessionKeyClient.dropAndReplaceUserOperation({ - uoToDrop: sessionKeyResult.request, - }); - await sessionKeyClient.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - }); - - it("successfully sign and validate a message with EIP-1271 using WebAuthn account", async () => { - const { provider } = await givenWebAuthnProvider(); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const accountContract = getContract({ - address: provider.getAddress(), - abi: semiModularAccountBytecodeAbi, - client, - }); - - // Deploy the account first by sending a simple UO - const deployResult = await provider.sendUserOperation({ - uo: { - target: target, - value: 0n, - data: "0x", - }, - }); - - await provider - .waitForUserOperationTransaction(deployResult) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: deployResult.request, - }, - ); - await provider.waitForUserOperationTransaction(dropAndReplaceResult); - }); - - const message = "testmessage"; - - // WebAuthn signMessage automatically wraps the message in EIP-712 ReplaySafeHash format - // and returns a properly formatted signature - const signature = await provider.signMessage({ message }); - - // Validate against the original message hash - // The WebAuthn validation module will wrap it in ReplaySafeHash internally - await expect( - accountContract.read.isValidSignature([hashMessage(message), signature]), - ).resolves.toEqual(isValidSigSuccess); - }); - - it("successfully sign and validate typed data with EIP-1271 using WebAuthn account", async () => { - const { provider } = await givenWebAuthnProvider(); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const accountContract = getContract({ - address: provider.getAddress(), - abi: semiModularAccountBytecodeAbi, - client, - }); - - // Deploy the account first by sending a simple UO - const deployResult = await provider.sendUserOperation({ - uo: { - target: target, - value: 0n, - data: "0x", - }, - }); - - await provider - .waitForUserOperationTransaction(deployResult) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: deployResult.request, - }, - ); - await provider.waitForUserOperationTransaction(dropAndReplaceResult); - }); - - const typedData = { - 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!", - }, - } as const; - - // WebAuthn signTypedData automatically wraps the typed data in EIP-712 ReplaySafeHash format - // and returns a properly formatted signature - const signature = await provider.signTypedData({ typedData }); - - // Validate against the original typed data hash - // The WebAuthn validation module will wrap it in ReplaySafeHash internally - await expect( - accountContract.read.isValidSignature([ - hashTypedData(typedData), - signature, - ]), - ).resolves.toEqual(isValidSigSuccess); - }); - - it("successfully sign + validate a message, for native and single signer validation", async () => { - const provider = (await givenConnectedProvider({ signer })).extend( - installValidationActions, - ); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const accountContract = getContract({ - address: provider.getAddress(), - abi: semiModularAccountBytecodeAbi, - client, - }); - - // UO deploys the account to test 1271 against - const result = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - await provider.waitForUserOperationTransaction(result); - - const message = "testmessage"; - - const { type, data } = await provider.account.prepareSign({ - type: "personal_sign", - data: message, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - let signature = await ( - await provider.account.getSigner() - ).signTypedData(data); - - signature = await provider.account.formatSign(signature); - - await expect( - accountContract.read.isValidSignature([hashMessage(message), signature]), - ).resolves.toEqual(isValidSigSuccess); - - // connect session key - let sessionKeyClient = await createModularAccountV2Client({ - chain: instance.chain, - signer: sessionKey, - transport: custom(instance.getClient()), - accountAddress: provider.getAddress(), - signerEntity: { entityId: 1, isGlobalValidation: true }, - }); - - signature = await sessionKeyClient.signMessage({ message }); - - await expect( - accountContract.read.isValidSignature([hashMessage(message), signature]), - ).resolves.toEqual(isValidSigSuccess); - }); - - it("successfully sign + validate typed data messages, for native and single signer validation", async () => { - const provider = (await givenConnectedProvider({ signer })).extend( - installValidationActions, - ); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const accountContract = getContract({ - address: provider.getAddress(), - abi: semiModularAccountBytecodeAbi, - client, - }); - - // UO deploys the account to test 1271 against - const result = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - await provider.waitForUserOperationTransaction(result); - - const typedData = { - 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!", - }, - } as const; - - const hashedMessageTypedData = hashTypedData(typedData); - - const { type, data } = await provider.account.prepareSign({ - type: "eth_signTypedData_v4", - data: typedData, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - let signature = await ( - await provider.account.getSigner() - ).signTypedData(data); - - signature = await provider.account.formatSign(signature); - - await expect( - accountContract.read.isValidSignature([ - hashedMessageTypedData, - signature, - ]), - ).resolves.toEqual(isValidSigSuccess); - - // connect session key - let sessionKeyClient = await createModularAccountV2Client({ - chain: instance.chain, - signer: sessionKey, - transport: custom(instance.getClient()), - accountAddress: provider.getAddress(), - signerEntity: { entityId: 1, isGlobalValidation: true }, - }); - - signature = await sessionKeyClient.signTypedData({ typedData }); - - await expect( - accountContract.read.isValidSignature([ - hashedMessageTypedData, - signature, - ]), - ).resolves.toEqual(isValidSigSuccess); - }); - - it("adds a session key with no permissions", async () => { - let provider = (await givenConnectedProvider({ signer })).extend( - installValidationActions, - ); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - let result = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - await provider.waitForUserOperationTransaction(result); - - const startingAddressBalance = await getTargetBalance(); - - // connect session key and send tx with session key - let sessionKeyClient = await createModularAccountV2Client({ - chain: instance.chain, - signer: sessionKey, - transport: custom(instance.getClient()), - accountAddress: provider.getAddress(), - signerEntity: { entityId: 1, isGlobalValidation: true }, - }); - - result = await sessionKeyClient.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }); - - await sessionKeyClient.waitForUserOperationTransaction(result); - - await expect(getTargetBalance()).resolves.toEqual( - startingAddressBalance + sendAmount, - ); - }); - - it("installs a session key via deferred action using PermissionBuilder signed by the owner and has it sign a UO", async () => { - let provider = ( - await givenConnectedProvider({ - signer, - }) - ) - .extend(installValidationActions) - .extend(deferralActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: false, - }); - - // Must be built with the client that's going to sign the deferred action - // OR a client with the same set signer entity as the signing client (entityId + isGlobal) - const { typedData, fullPreSignatureDeferredActionDigest } = - await new PermissionBuilder({ - client: provider, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - entityId: entityId, - nonce: nonce, - deadline: 0, - }) - .addPermission({ - permission: { - type: PermissionType.GAS_LIMIT, - data: { - limit: toHex(parseEther("1")), - }, - }, - }) - .addPermission({ - permission: { - type: PermissionType.CONTRACT_ACCESS, - data: { - address: target, - }, - }, - }) - .compileDeferred(); - - // Sign the typed data using the owner (fallback) validation, this must be done via the account to skip 6492 - const deferredValidationSig = - await provider.account.signTypedData(typedData); - - // Build the full hex to prepend to the UO signature - const deferredActionDigest = buildDeferredActionDigest({ - fullPreSignatureDeferredActionDigest, - sig: deferredValidationSig, - }); - - // Initialize the session key client corresponding to the session key we will install in the deferred action - let sessionKeyClient = await createModularAccountV2Client({ - transport: custom(instance.getClient()), - chain: instance.chain, - accountAddress: provider.getAddress(), - signer: sessionKey, - initCode: await provider.account.getInitCode(), // must be called with the owner provider! - deferredAction: deferredActionDigest, - }); - - // Send the raw UserOp - const result = await sessionKeyClient.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }); - - await provider.waitForUserOperationTransaction(result); - }); - - it("installs a session key via deferred action using PermissionBuilder with ERC20 permission signed by the owner and has it sign a UO", async () => { - let provider = ( - await givenConnectedProvider({ - signer, - }) - ) - .extend(installValidationActions) - .extend(deferralActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const walletClient = createWalletClient({ - chain: provider.chain, - transport: custom(instance.getClient()), - account: privateKeyToAccount(generatePrivateKey()), - }); - - await setBalance(client, { - address: walletClient.account.address, - value: parseEther("2"), - }); - - const mockErc20Address = getContractAddress({ - from: walletClient.account.address, - nonce: BigInt( - await client.getTransactionCount({ - address: walletClient.account.address, - }), - ), - }); - - // Deploy mock ERC20 - await walletClient.deployContract({ - abi: mintableERC20Abi, - account: walletClient.account, - bytecode: mintableERC20Bytecode, - }); - - // Mint some test tokens - await walletClient.writeContract({ - address: mockErc20Address, - abi: mintableERC20Abi, - functionName: "mint", - args: [provider.getAddress(), 1000n], - }); - - // Test variables - // const sessionKeyEntityId = 1; - // these can be default values or from call arguments - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: false, // assumes the session key is used to sign the UO - }); - - // Must be built with the client that's going to sign the deferred action - // OR a client with the same set signer entity as the signing client (entityId + isGlobal) - const { typedData, fullPreSignatureDeferredActionDigest } = - await new PermissionBuilder({ - client: provider, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - entityId: entityId, - nonce: nonce, - deadline: 0, - }) - .addPermission({ - permission: { - type: PermissionType.ERC20_TOKEN_TRANSFER, - data: { - address: mockErc20Address, - allowance: toHex(900), - }, - }, - }) - .compileDeferred(); - - // Sign the typed data using the owner (fallback) validation, this must be done via the account to skip 6492 - const deferredValidationSig = - await provider.account.signTypedData(typedData); - - // Build the full hex to prepend to the UO signature - const deferredActionDigest = buildDeferredActionDigest({ - fullPreSignatureDeferredActionDigest, - sig: deferredValidationSig, - }); - - // Initialize the session key client corresponding to the session key we will install in the deferred action - let sessionKeyClient = await createModularAccountV2Client({ - chain: instance.chain, - signer: sessionKey, - transport: custom(instance.getClient()), - accountAddress: provider.getAddress(), - initCode: await provider.account.getInitCode(), - deferredAction: deferredActionDigest, - }); - - // Validate the target's balance is zero before the transfer - expect( - await client.readContract({ - address: mockErc20Address, - abi: mintableERC20Abi, - functionName: "balanceOf", - args: [target], - }), - ).to.eq(0n); - - // Build the full UO with the deferred action signature prepend (must be session key client) - const hash = await sessionKeyClient.sendUserOperation({ - uo: { - target: mockErc20Address, - data: encodeFunctionData({ - abi: mintableERC20Abi, - functionName: "transfer", - args: [target, 900n], - }), - }, - }); - - await provider.waitForUserOperationTransaction({ hash: hash.hash }); - - // Validate the erc20 transfer happened - expect( - await client.readContract({ - address: mockErc20Address, - abi: mintableERC20Abi, - functionName: "balanceOf", - args: [target], - }), - ).to.eq(900n); - }); - - it("Low-level installs a session key via deferred action signed by the owner and has it sign a UO", async () => { - let provider = (await givenConnectedProvider({ signer })) - .extend(installValidationActions) - .extend(deferralActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - // Test variables - const isGlobalValidation = true; - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: isGlobalValidation, - }); - - // Encode install data to defer - let encodedInstallData = await provider.encodeInstallValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: entityId, - isGlobal: isGlobalValidation, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: entityId, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - // Build the typed data we need for the deferred action (provider/client only used for account address & entrypoint) - const { typedData } = await provider.createDeferredActionTypedDataObject({ - callData: encodedInstallData, - deadline: 0, - nonce, - }); - - // Sign the typed data using the owner (fallback) validation, this must be done via the account to skip 6492 - const deferredValidationSig = - await provider.account.signTypedData(typedData); - - const fullPreSignatureDeferredActionDigest = - provider.buildPreSignatureDeferredActionDigest({ - typedData, - }); - - // Build the full hex to prepend to the UO signature - const deferredActionDigest = buildDeferredActionDigest({ - fullPreSignatureDeferredActionDigest, - sig: deferredValidationSig, - }); - - // preExecHooks 00, nonce, deferredActionDigest - const fullDeferredAction = concatHex([ - "0x00", - toHex(nonce, { size: 32 }), - deferredActionDigest, - ]); - - // Initialize the session key client corresponding to the session key we will install in the deferred action - let sessionKeyClient = await createModularAccountV2Client({ - transport: custom(instance.getClient()), - chain: instance.chain, - accountAddress: provider.getAddress(), - signer: sessionKey, - initCode: await provider.account.getInitCode(), - deferredAction: fullDeferredAction, - }); - - // Build the full UO with the deferred action signature prepend (provider/client only used for account address & entrypoint) - const unsignedUo = await sessionKeyClient.buildUserOperation({ - uo: { target, data: "0x" }, - overrides: { - nonce: nonce, - }, - }); - - // Sign the UO with the session key - const uo = await sessionKeyClient.signUserOperation({ - uoStruct: unsignedUo, - }); - - // Send the raw UserOp - const result = await sessionKeyClient.sendRawUserOperation( - uo, - provider.account.getEntryPoint().address, - ); - - await provider.waitForUserOperationTransaction({ hash: result }); - }); - - it("installs a session key via deferred action signed by another session key and has it sign a UO", async () => { - let provider = (await givenConnectedProvider({ signer })) - .extend(installValidationActions) - .extend(deferralActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const sessionKeyEntityId = 1; - - // First, install a session key - let sessionKeyInstallResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: sessionKeyEntityId, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: sessionKeyEntityId, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - await provider.waitForUserOperationTransaction(sessionKeyInstallResult); - - // Create a client with the first session key - let sessionKeyClient = ( - await createModularAccountV2Client({ - chain: instance.chain, - signer: sessionKey, - transport: custom(instance.getClient()), - accountAddress: provider.getAddress(), - signerEntity: { - entityId: sessionKeyEntityId, - isGlobalValidation: true, - }, - }) - ) - .extend(installValidationActions) - .extend(deferralActions); - - const randomWallet = privateKeyToAccount(generatePrivateKey()); - const newSessionKey: SmartAccountSigner = new LocalAccountSigner( - randomWallet, - ); - - const { entityId, nonce } = await provider.getEntityIdAndNonce({ - isGlobalValidation: true, - }); - - // Must be built with the client that's going to sign the deferred action - // OR a client with the same set signer entity as the signing client (entityId + isGlobal) - const { typedData, fullPreSignatureDeferredActionDigest } = - await new PermissionBuilder({ - client: sessionKeyClient, - key: { - publicKey: await newSessionKey.getAddress(), - type: "secp256k1", - }, - entityId: entityId, - nonce: nonce, - deadline: 0, - }) - .addPermission({ - permission: { - type: PermissionType.ROOT, - }, - }) - .compileDeferred(); - - // Sign the typed data using the first session key - const deferredValidationSig = - await sessionKeyClient.account.signTypedData(typedData); - - // Build the full hex to prepend to the UO signature - const deferredActionDigest = buildDeferredActionDigest({ - fullPreSignatureDeferredActionDigest, - sig: deferredValidationSig, - }); - - // Initialize the session key client corresponding to the session key we will install in the deferred action - let newSessionKeyClient = await createModularAccountV2Client({ - transport: custom(instance.getClient()), - chain: instance.chain, - accountAddress: provider.getAddress(), - signer: newSessionKey, - initCode: await provider.account.getInitCode(), - deferredAction: deferredActionDigest, - }); - - // Send the UserOp (provider/client only used for account address & entrypoint) - const result = await newSessionKeyClient.sendUserOperation({ - uo: { - target, - data: "0x", - }, - }); - - await provider.waitForUserOperationTransaction(result); - }); - - it("uninstalls a session key", async () => { - let provider = (await givenConnectedProvider({ signer })).extend( - installValidationActions, - ); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - let result = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - await provider.waitForUserOperationTransaction(result); - - result = await provider.uninstallValidation({ - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - uninstallData: SingleSignerValidationModule.encodeOnUninstallData({ - entityId: 1, - }), - hookUninstallDatas: [], - }); - - await provider.waitForUserOperationTransaction(result); - - // connect session key and send tx with session key - let sessionKeyClient = await createModularAccountV2Client({ - chain: instance.chain, - signer: sessionKey, - transport: custom(instance.getClient()), - accountAddress: provider.getAddress(), - signerEntity: { entityId: 1, isGlobalValidation: true }, - }); - - await expect( - sessionKeyClient.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }), - ).rejects.toThrowError(); - }); - - it.fails( - "installs paymaster guard module, verifies use of valid paymaster, then uninstalls module", - async () => { - let provider = ( - await givenConnectedProvider({ - signer, - paymasterMiddleware: "erc7677", - }) - ).extend(installValidationActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("20"), - }); - - const paymaster = paymaster070.getPaymasterDetails().address; - - const hookInstallData = PaymasterGuardModule.encodeOnInstallData({ - entityId: 1, - paymaster: paymaster, - }); - - const installResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [ - { - hookConfig: { - address: getDefaultPaymasterGuardModuleAddress(provider.chain), - entityId: 1, - hookType: HookType.VALIDATION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: hookInstallData, - }, - ], - }); - - // verify hook installation succeeded - await provider.waitForUserOperationTransaction(installResult); - - // create session key client - const sessionKeyProvider = ( - await givenConnectedProvider({ - signer: sessionKey, - accountAddress: provider.account.address, - paymasterMiddleware: "erc7677", - signerEntity: { entityId: 1, isGlobalValidation: true }, - }) - ).extend(installValidationActions); - - // happy path: send a UO with correct paymaster - const result = await sessionKeyProvider - .sendUserOperation({ - uo: { - target: zeroAddress, - value: 0n, - data: "0x", - }, - }) - .catch((e) => { - console.log("FAILED HERE 1"); - console.log(e); - throw e; - }); - - // verify if correct paymaster is used - const txnHash = - sessionKeyProvider.waitForUserOperationTransaction(result); - await expect(txnHash).resolves.not.toThrowError(); - - const hookUninstallData = PaymasterGuardModule.encodeOnUninstallData({ - entityId: 1, - }); - - const uninstallResult = await provider.uninstallValidation({ - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - uninstallData: SingleSignerValidationModule.encodeOnUninstallData({ - entityId: 1, - }), - hookUninstallDatas: [hookUninstallData], - }); - - // verify uninstall - await expect( - provider.waitForUserOperationTransaction(uninstallResult), - ).resolves.not.toThrowError(); - }, - ); - - it("installs paymaster guard module, verifies use of invalid paymaster, then uninstalls module", async () => { - let provider = ( - await givenConnectedProvider({ - signer, - paymasterMiddleware: "erc7677", - }) - ).extend(installValidationActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const paymaster = paymaster070.getPaymasterDetails().address; - - const hookInstallData = PaymasterGuardModule.encodeOnInstallData({ - entityId: 1, - paymaster: paymaster, - }); - - const installResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [ - { - hookConfig: { - address: getDefaultPaymasterGuardModuleAddress(provider.chain), - entityId: 1, - hookType: HookType.VALIDATION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: hookInstallData, - }, - ], - }); - - // verify hook installtion succeeded - await provider.waitForUserOperationTransaction(installResult); - - // sad path: send UO with no paymaster - // create session key client - const sessionKeyProvider = ( - await givenConnectedProvider({ - signer: sessionKey, - accountAddress: provider.account.address, - signerEntity: { entityId: 1, isGlobalValidation: true }, - }) - ).extend(installValidationActions); - - await expect( - sessionKeyProvider.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }), - ).rejects.toThrowError(); - - const hookUninstallData = PaymasterGuardModule.encodeOnUninstallData({ - entityId: 1, - }); - - const uninstallResult = await provider.uninstallValidation({ - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - uninstallData: SingleSignerValidationModule.encodeOnUninstallData({ - entityId: 1, - }), - hookUninstallDatas: [hookUninstallData], - }); - - // verify uninstall - await expect( - provider.waitForUserOperationTransaction(uninstallResult), - ).resolves.not.toThrowError(); - }); - - it("installs allowlist module, uses, then uninstalls", async () => { - let provider = (await givenConnectedProvider({ signer })).extend( - installValidationActions, - ); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - // install validation module - const installResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - await provider.waitForUserOperationTransaction(installResult); - - // create session key client - const sessionKeyProvider = ( - await givenConnectedProvider({ - signer: sessionKey, - accountAddress: provider.account.address, - signerEntity: { entityId: 1, isGlobalValidation: true }, - }) - ).extend(installValidationActions); - - // verify we can call into the zero address before allow list hook is installed - const sendResultBeforeHookInstallation = - await sessionKeyProvider.sendUserOperation({ - uo: { - target: zeroAddress, - value: 0n, - data: "0x", - }, - }); - - await provider.waitForUserOperationTransaction( - sendResultBeforeHookInstallation, - ); - - const hookInstallData = AllowlistModule.encodeOnInstallData({ - entityId: 1, - inputs: [ - { - target, - hasSelectorAllowlist: false, - hasERC20SpendLimit: false, - erc20SpendLimit: 0n, - selectors: [], - }, - ], - }); - - // install hook - const installHookResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: "0x", - hooks: [ - { - hookConfig: { - address: getDefaultAllowlistModuleAddress(provider.chain), - entityId: 1, - hookType: HookType.VALIDATION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: hookInstallData, - }, - ], - }); - - await provider.waitForUserOperationTransaction(installHookResult); - - // Test that the allowlist is active. - // We should *only* be able to call into the target address, as it's the only address we passed to onInstall. - const sendResult = await sessionKeyProvider.sendUserOperation({ - uo: { - target: target, - value: 0n, - data: "0x", - }, - }); - - await provider.waitForUserOperationTransaction(sendResult); - - // This should revert as we're calling an address separate fom the allowlisted target. - await expect( - sessionKeyProvider.sendUserOperation({ - uo: { - target: zeroAddress, - value: 0n, - data: "0x", - }, - }), - ).rejects.toThrowError(); - - const hookUninstallData = AllowlistModule.encodeOnUninstallData({ - entityId: 1, - inputs: [ - { - target, - hasSelectorAllowlist: false, - hasERC20SpendLimit: false, - erc20SpendLimit: 0n, - selectors: [], - }, - ], - }); - - const uninstallResult = await provider.uninstallValidation({ - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - uninstallData: SingleSignerValidationModule.encodeOnUninstallData({ - entityId: 1, - }), - hookUninstallDatas: [hookUninstallData], - }); - - await provider.waitForUserOperationTransaction(uninstallResult); - }); - - it("installs native token limit module, uses, then uninstalls", async () => { - let provider = (await givenConnectedProvider({ signer })).extend( - installValidationActions, - ); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - const spendLimit = parseEther("0.5"); - - const installResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - - await provider.waitForUserOperationTransaction(installResult); - - // create session key client - const sessionKeyProvider = ( - await givenConnectedProvider({ - signer: sessionKey, - accountAddress: provider.account.address, - signerEntity: { entityId: 1, isGlobalValidation: true }, - }) - ).extend(installValidationActions); - - // Sending over the limit should currently pass - const preHookInstallationSendResult = await provider.sendUserOperation({ - uo: { - target: target, - value: parseEther("0.6"), - data: "0x", - }, - }); - await provider.waitForUserOperationTransaction( - preHookInstallationSendResult, - ); - - // Let's verify the module's limit is set correctly after installation - const hookInstallData = NativeTokenLimitModule.encodeOnInstallData({ - entityId: 1, - spendLimit, - }); - - const installHookResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: "0x", - hooks: [ - { - hookConfig: { - address: getDefaultNativeTokenLimitModuleAddress(provider.chain), - entityId: 1, - hookType: HookType.VALIDATION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: hookInstallData, - }, - { - hookConfig: { - address: getDefaultNativeTokenLimitModuleAddress(provider.chain), - entityId: 1, - hookType: HookType.EXECUTION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: "0x", - }, - ], - }); - - await provider.waitForUserOperationTransaction(installHookResult); - - // Try to send less than the limit - should pass - const passingSendResult = await sessionKeyProvider.sendUserOperation({ - uo: { - target: target, - value: parseEther("0.05"), // below the 0.5 limit - data: "0x", - }, - }); - await provider.waitForUserOperationTransaction(passingSendResult); - - // Try to send more than the limit - should fail - await expect( - sessionKeyProvider.sendUserOperation({ - uo: { - target: target, - value: parseEther("0.6"), // passing the 0.5 limit - data: "0x", - }, - }), - ).rejects.toThrowError(); - - const hookUninstallData = NativeTokenLimitModule.encodeOnUninstallData({ - entityId: 1, - }); - - const uninstallResult = await provider.uninstallValidation({ - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - uninstallData: SingleSignerValidationModule.encodeOnUninstallData({ - entityId: 1, - }), - hookUninstallDatas: [hookUninstallData, "0x"], - }); - - await provider.waitForUserOperationTransaction(uninstallResult); - }); - - it("installs time range module, sends transaction within valid time range", async () => { - let provider = ( - await givenConnectedProvider({ - signer, - }) - ).extend(installValidationActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - // create session key client - const sessionKeyProvider = ( - await givenConnectedProvider({ - signer: sessionKey, - accountAddress: provider.account.address, - signerEntity: { entityId: 1, isGlobalValidation: true }, - }) - ).extend(installValidationActions); - - const hookInstallData = TimeRangeModule.encodeOnInstallData({ - entityId: 1, - validAfter: 1734507101, - validUntil: 1934507101, - }); - - const installResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [ - { - hookConfig: { - address: getDefaultTimeRangeModuleAddress(provider.chain), - entityId: 1, - hookType: HookType.VALIDATION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: hookInstallData, - }, - ], - }); - - // verify hook installation succeeded - await provider.waitForUserOperationTransaction(installResult); - - client.setAutomine(false); - - // force block timestamp to be inside of range - await client.setNextBlockTimestamp({ - timestamp: 1754507101n, - }); - - await client.mine({ - blocks: 1, - }); - - const uo = await sessionKeyProvider.buildUserOperation({ - uo: { - target, - data: "0x", - }, - }); - - const signedUO = (await sessionKeyProvider.signUserOperation({ - uoStruct: uo, - })) as UserOperationRequest_v7; - - // calls entrypoint directly - await client.simulateContract({ - address: sessionKeyProvider.account.getEntryPoint().address, - abi: entryPoint07Abi, - functionName: "handleOps", - args: [ - [ - { - sender: sessionKeyProvider.account.address, - nonce: fromHex(signedUO.nonce, "bigint"), - initCode: - signedUO.factory && signedUO.factoryData - ? concat([signedUO.factory, signedUO.factoryData]) - : "0x", - callData: signedUO.callData, - accountGasLimits: packAccountGasLimits({ - verificationGasLimit: signedUO.verificationGasLimit, - callGasLimit: signedUO.callGasLimit, - }), - preVerificationGas: fromHex(signedUO.preVerificationGas, "bigint"), - gasFees: packAccountGasLimits({ - maxPriorityFeePerGas: signedUO.maxPriorityFeePerGas, - maxFeePerGas: signedUO.maxFeePerGas, - }), - paymasterAndData: - signedUO.paymaster && isAddress(signedUO.paymaster) - ? packPaymasterData({ - paymaster: signedUO.paymaster, - paymasterVerificationGasLimit: - signedUO.paymasterVerificationGasLimit, - paymasterPostOpGasLimit: signedUO.paymasterPostOpGasLimit, - paymasterData: signedUO.paymasterData, - }) - : "0x", - signature: signedUO.signature, - }, - ], - provider.account.address, - ], - account: await sessionKeyProvider.account.getSigner().getAddress(), - }); - - client.setAutomine(true); - }); - - // NOTE: uses different validation and hook entity id than previous test because we do not uninstall the hook in the previous test - it("installs time range module, tries to send transaction outside valid time range", async () => { - let provider = ( - await givenConnectedProvider({ - signer, - }) - ).extend(installValidationActions); - - await setBalance(client, { - address: provider.getAddress(), - value: parseEther("2"), - }); - - // create session key client - const sessionKeyProvider = ( - await givenConnectedProvider({ - signer: sessionKey, - accountAddress: provider.account.address, - signerEntity: { entityId: 2, isGlobalValidation: true }, - }) - ).extend(installValidationActions); - - const hookInstallData = TimeRangeModule.encodeOnInstallData({ - entityId: 2, - validAfter: 1734507101, - validUntil: 1934507101, - }); - - const installResult = await provider.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - provider.chain, - ), - entityId: 2, - isGlobal: true, - isSignatureValidation: true, - isUserOpValidation: true, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 2, - signer: await sessionKey.getAddress(), - }), - hooks: [ - { - hookConfig: { - address: getDefaultTimeRangeModuleAddress(provider.chain), - entityId: 2, - hookType: HookType.VALIDATION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: hookInstallData, - }, - ], - }); - - // verify hook installation succeeded - await provider.waitForUserOperationTransaction(installResult); - - client.setAutomine(false); - - // force block timestamp to be outside of range - await client.setNextBlockTimestamp({ - timestamp: 2054507101n, - }); - - await client.mine({ - blocks: 1, - }); - - const uo = await sessionKeyProvider.buildUserOperation({ - uo: { - target, - data: "0x", - }, - }); - - const signedUO = (await sessionKeyProvider.signUserOperation({ - uoStruct: uo, - })) as UserOperationRequest_v7; - - // calls entrypoint directly - try { - await client.simulateContract({ - address: sessionKeyProvider.account.getEntryPoint().address, - abi: entryPoint07Abi, - functionName: "handleOps", - args: [ - [ - { - sender: sessionKeyProvider.account.address, - nonce: fromHex(signedUO.nonce, "bigint"), - initCode: - signedUO.factory && signedUO.factoryData - ? concat([signedUO.factory, signedUO.factoryData]) - : "0x", - callData: signedUO.callData, - accountGasLimits: packAccountGasLimits({ - verificationGasLimit: signedUO.verificationGasLimit, - callGasLimit: signedUO.callGasLimit, - }), - preVerificationGas: fromHex( - signedUO.preVerificationGas, - "bigint", - ), - gasFees: packAccountGasLimits({ - maxPriorityFeePerGas: signedUO.maxPriorityFeePerGas, - maxFeePerGas: signedUO.maxFeePerGas, - }), - paymasterAndData: - signedUO.paymaster && isAddress(signedUO.paymaster) - ? packPaymasterData({ - paymaster: signedUO.paymaster, - paymasterVerificationGasLimit: - signedUO.paymasterVerificationGasLimit, - paymasterPostOpGasLimit: signedUO.paymasterPostOpGasLimit, - paymasterData: signedUO.paymasterData, - }) - : "0x", - signature: signedUO.signature, - }, - ], - provider.account.address, - ], - account: await sessionKeyProvider.account.getSigner().getAddress(), - }); - } catch (err: any) { - // verify that simulation fails due to violation of time range restriction on session key - assert( - err.metaMessages.some((str: string) => - str.includes("AA22 expired or not due"), - ), - ); - } - - client.setAutomine(true); - }); - - it("tests entity id and nonce selection", async () => { - let newClient = (await givenConnectedProvider({ signer })) - .extend(deferralActions) - .extend(installValidationActions); - - await setBalance(client, { - address: newClient.getAddress(), - value: parseEther("2"), - }); - - const entryPoint = newClient.account.getEntryPoint(); - const entryPointContract = getContract({ - address: entryPoint.address, - abi: entryPoint.abi, - client, - }); - - // entity id and nonce selection for undeployed account - for (let startEntityId = 0; startEntityId < 5; startEntityId++) { - for (let startNonce = 0n; startNonce < 5n; startNonce++) { - const { entityId, nonce } = await newClient.getEntityIdAndNonce({ - entityId: startEntityId, - nonceKey: startNonce, - isGlobalValidation: true, - }); - - const expectedEntityId: number = Math.max(1, startEntityId); - - // account not deployed, expect to get 1 when we pass in 0 - expect(entityId).toEqual(expectedEntityId); - await expect( - entryPointContract.read.getNonce([ - newClient.account.address, - buildFullNonceKey({ - nonceKey: startNonce, - entityId: expectedEntityId, - isDeferredAction: true, - }), - ]), - ).resolves.toEqual(nonce); - } - } - - // deploy the account and install at entity id 1 with global validation - const uo1 = await newClient.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - newClient.chain, - ), - entityId: 1, - isGlobal: true, - isSignatureValidation: false, - isUserOpValidation: false, - }, - selectors: [], - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 1, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - await newClient.waitForUserOperationTransaction(uo1); - - const fns: ContractFunctionName[] = [ - "execute", - "executeBatch", - ]; - - const selectors = fns.map( - (s) => - prepareEncodeFunctionData({ - abi: semiModularAccountBytecodeAbi, - functionName: s, - }).functionName, - ); - - // deploy the account and install some entity ids with selector validation - const uo2 = await newClient.installValidation({ - validationConfig: { - moduleAddress: getDefaultSingleSignerValidationModuleAddress( - newClient.chain, - ), - entityId: 2, - isGlobal: false, - isSignatureValidation: false, - isUserOpValidation: false, - }, - selectors, - installData: SingleSignerValidationModule.encodeOnInstallData({ - entityId: 2, - signer: await sessionKey.getAddress(), - }), - hooks: [], - }); - await newClient.waitForUserOperationTransaction(uo2); - - // entity id and nonce selection for undeployed account - for (let startEntityId = 1; startEntityId < 5; startEntityId++) { - for (let startNonce = 0n; startNonce < 5n; startNonce++) { - const { entityId, nonce } = await newClient.getEntityIdAndNonce({ - entityId: startEntityId, - nonceKey: startNonce, - isGlobalValidation: true, - }); - - const expectedEntityId: number = Math.max(startEntityId, 3); - - // expect to get max(3, startEntityId) - expect(entityId).toEqual(expectedEntityId); - await expect( - entryPointContract.read.getNonce([ - newClient.account.address, - buildFullNonceKey({ - nonceKey: startNonce, - entityId: expectedEntityId, - isDeferredAction: true, - }), - ]), - ).resolves.toEqual(nonce); - } - } - }); - - it("correctly encodes self-call data", async () => { - const client = await givenConnectedProvider({ signer }); - await setBalance(instance.getClient(), { - address: client.getAddress(), - value: parseEther("20"), - }); - - // Normally, a self-call would be encoded as uo: `0x{string}`. - // But, we also want to ensure that formatting this as a self-call, with `target` and `data` as arguments, works. - - // We want to call a valid selector on the account contract itself, and `performCreate` is a valid selector. - // Argument content: - // - 60 push1 - // - 20 immediate value for push1, used as length of return data - // - 3d returndatasize, pushes 00 to stack for offset of return data - // - f3 return, consumes the stack values and returns `0x00` (memory uninitialized) as contract code, which will immediately stop. - - const result = await client.sendUserOperation({ - uo: { - target: client.getAddress(), - data: encodeFunctionData({ - abi: modularAccountAbi, - functionName: "performCreate", - args: [0n, "0x60203df3", false, zeroHash], - }), - }, - }); - - const txnHash = await client - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await client.dropAndReplaceUserOperation({ - uoToDrop: result.request, - }); - return await client.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - const txn = await client.getTransactionReceipt({ hash: txnHash }); - expect(txn?.status).toEqual("success"); - }); - - it("upgrade from a lightaccount", async () => { - const lightAccountClient = await createLightAccountClient({ - chain: instance.chain, - signer, - transport: custom(instance.getClient()), - version: "v2.0.0", - }); - - await setBalance(client, { - address: lightAccountClient.getAddress(), - value: parseEther("2"), - }); - - const { createModularAccountV2FromExisting, ...upgradeToData } = - await getMAV2UpgradeToData(lightAccountClient, { - account: lightAccountClient.account, - }); - - await lightAccountClient.upgradeAccount({ - upgradeTo: upgradeToData, - waitForTx: true, - }); - - const maV2Client = createSmartAccountClient({ - chain: instance.chain, - transport: custom(client), - account: await createModularAccountV2FromExisting(), - }); - - // test uo - - const startingAddressBalance = await getTargetBalance(); - - const result = await maV2Client.sendUserOperation({ - uo: { - target: target, - value: sendAmount, - data: "0x", - }, - }); - - await maV2Client.waitForUserOperationTransaction(result); - - await expect(getTargetBalance()).resolves.toEqual( - startingAddressBalance + sendAmount, - ); - }); - - it("alchemy client calls the createAlchemySmartAccountClient", async () => { - const alchemyClientSpy = vi - .spyOn(AAInfraModule, "createAlchemySmartAccountClient") - .mockImplementation(() => "fakedAlchemy" as any); - const notAlchemyClientSpy = vi - .spyOn(AACoreModule, "createSmartAccountClient") - .mockImplementation(() => "faked" as any); - expect( - await createModularAccountV2Client({ - chain: arbitrumSepolia, - signer, - transport: alchemy({ jwt: "AN_API_KEY" }), - accountAddress: "0x86f3B0211764971Ad0Fc8C8898d31f5d792faD84", - }), - ).toMatch("fakedAlchemy"); - - expect(alchemyClientSpy).toHaveBeenCalled(); - expect(notAlchemyClientSpy).not.toHaveBeenCalled(); - }); - - it("custom client calls the createAlchemySmartAccountClient", async () => { - const alchemyClientSpy = vi - .spyOn(AAInfraModule, "createAlchemySmartAccountClient") - .mockImplementation(() => "fakedAlchemy" as any); - const notAlchemyClientSpy = vi - .spyOn(AACoreModule, "createSmartAccountClient") - .mockImplementation(() => "faked" as any); - expect( - await createModularAccountV2Client({ - chain: instance.chain, - signer, - transport: custom(instance.getClient()), - }), - ).toMatch("faked"); - - expect(alchemyClientSpy).not.toHaveBeenCalled(); - expect(notAlchemyClientSpy).toHaveBeenCalled(); - }); - - let salt = 1n; - - const givenConnectedWebauthnProvider = async ({ - signerEntity, - accountAddress, - paymasterMiddleware, - credential, - getFn, - rpId, - }: { - signerEntity?: SignerEntity; - accountAddress?: `0x${string}`; - paymasterMiddleware?: "alchemyGasAndPaymasterAndData" | "erc7677"; - credential: ToWebAuthnAccountParameters["credential"]; - getFn?: ToWebAuthnAccountParameters["getFn"]; - rpId?: ToWebAuthnAccountParameters["rpId"]; - }) => - createModularAccountV2Client({ - chain: instance.chain, - accountAddress, - signerEntity, - credential, - getFn, - rpId, - mode: "webauthn", - transport: custom(instance.getClient()), - ...(paymasterMiddleware === "alchemyGasAndPaymasterAndData" - ? alchemyGasAndPaymasterAndDataMiddleware({ - policyId: "FAKE_POLICY_ID", - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - transport: custom(instance.getClient()), - }) - : paymasterMiddleware === "erc7677" - ? erc7677Middleware() - : {}), - salt: salt++, - }); - - const givenWebAuthnProvider = async () => { - const webauthnDevice = new SoftWebauthnDevice(); - - const credential = await createWebAuthnCredential({ - rp: { id: "localhost", name: "localhost" }, - createFn: (opts) => webauthnDevice.create(opts, "localhost"), - user: { name: "test", displayName: "test" }, - }); - - const provider = await givenConnectedWebauthnProvider({ - credential, - getFn: (opts) => webauthnDevice.get(opts, "localhost"), - rpId: "localhost", - }); - - return { provider, credential }; - }; - - const givenConnectedProvider = async ({ - signer, - signerEntity, - accountAddress, - paymasterMiddleware, - }: { - signer: SmartAccountSigner; - signerEntity?: SignerEntity; - accountAddress?: `0x${string}`; - paymasterMiddleware?: "alchemyGasAndPaymasterAndData" | "erc7677"; - }) => - createModularAccountV2Client({ - chain: instance.chain, - signer, - accountAddress, - signerEntity, - transport: custom(instance.getClient()), - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - ...(paymasterMiddleware === "alchemyGasAndPaymasterAndData" - ? alchemyGasAndPaymasterAndDataMiddleware({ - policyId: "FAKE_POLICY_ID", - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - transport: custom(instance.getClient()), - }) - : paymasterMiddleware === "erc7677" - ? erc7677Middleware() - : {}), - salt: salt++, - }); -}); diff --git a/account-kit/smart-contracts/src/ma-v2/client/client.ts b/account-kit/smart-contracts/src/ma-v2/client/client.ts deleted file mode 100644 index 605c72572a..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/client/client.ts +++ /dev/null @@ -1,196 +0,0 @@ -import { - createSmartAccountClient, - webauthnGasEstimator, - type SmartAccountClient, - type SmartAccountClientConfig, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { type Chain, type Transport } from "viem"; - -import { - createModularAccountV2, - type CreateModularAccountV2Params, - type CreateWebauthnModularAccountV2Params, -} from "../account/modularAccountV2.js"; - -import { - createAlchemySmartAccountClient, - isAlchemyTransport, - type AlchemySmartAccountClient, - type AlchemySmartAccountClientConfig, - type AlchemyTransport, -} from "@account-kit/infra"; -import type { LightAccount } from "../../light-account/accounts/account.js"; - -import type { ToWebAuthnAccountParameters } from "viem/account-abstraction"; -import type { - ModularAccountV2, - WebauthnModularAccountV2, -} from "../account/common/modularAccountV2Base.js"; - -export type ModularAccountV2Client< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TChain extends Chain = Chain, - TTransport extends Transport | AlchemyTransport = Transport, -> = TTransport extends AlchemyTransport - ? AlchemySmartAccountClient> - : SmartAccountClient>; - -export type WebauthnModularAccountV2Client< - TChain extends Chain = Chain, - TTransport extends Transport | AlchemyTransport = Transport, -> = TTransport extends AlchemyTransport - ? AlchemySmartAccountClient - : SmartAccountClient; - -export type CreateModularAccountV2ClientParams< - TTransport extends Transport | AlchemyTransport = Transport, - TChain extends Chain = Chain, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = CreateModularAccountV2Params & - Omit< - TTransport extends AlchemyTransport - ? AlchemySmartAccountClientConfig - : SmartAccountClientConfig, - "transport" | "account" | "chain" - >; - -export type CreateWebauthnModularAccountV2ClientParams< - TTransport extends Transport | AlchemyTransport = Transport, - TChain extends Chain = Chain, -> = CreateWebauthnModularAccountV2Params & - Omit< - TTransport extends AlchemyTransport - ? AlchemySmartAccountClientConfig - : SmartAccountClientConfig, - "transport" | "account" | "chain" - > & { - credential: ToWebAuthnAccountParameters["credential"]; - getFn?: ToWebAuthnAccountParameters["getFn"]; - rpId?: ToWebAuthnAccountParameters["rpId"]; - }; - -export type CreateModularAccountV2AlchemyClientParams< - TTransport extends Transport = Transport, - TChain extends Chain = Chain, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Omit< - CreateModularAccountV2ClientParams, - "transport" -> & - Omit< - AlchemySmartAccountClientConfig>, - "account" - > & { paymasterAndData?: never; dummyPaymasterAndData?: never }; - -export function createModularAccountV2Client< - TChain extends Chain = Chain, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - args: CreateModularAccountV2AlchemyClientParams< - AlchemyTransport, - TChain, - TSigner - >, -): Promise>; - -export function createModularAccountV2Client< - TTransport extends Transport = Transport, - TChain extends Chain = Chain, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - args: CreateModularAccountV2ClientParams, -): Promise>; - -export function createModularAccountV2Client< - TTransport extends Transport = Transport, - TChain extends Chain = Chain, ->( - args: CreateWebauthnModularAccountV2ClientParams, -): Promise>; -/** - * Creates a Modular Account V2 client using the provided configuration parameters. - * - * @example - * ```ts twoslash - * import { createModularAccountV2Client } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { alchemy, sepolia } from "@account-kit/infra"; - * - * const MNEMONIC = "..."; - * const RPC_URL = "..."; - * - * const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - * - * const chain = sepolia; - * - * const transport = alchemy({ rpcUrl: RPC_URL }); - * - * const policyId = "..."; - * - * const modularAccountV2Client = await createModularAccountV2Client({ - * chain, - * signer, - * transport, - * policyId, // NOTE: you may only pass in a gas policy ID if you provide an Alchemy transport! - * }); - * ``` - * - * @param {CreateModularAccountV2ClientParams} config The configuration parameters required to create the Modular Account v2 account client - * @returns {Promise} A promise that resolves to a `SmartAccountClient` instance - */ -export async function createModularAccountV2Client( - config: - | CreateModularAccountV2ClientParams - | CreateWebauthnModularAccountV2ClientParams - | CreateModularAccountV2AlchemyClientParams, -): Promise { - const { transport, chain } = config; - - let account; - - if (config.mode === "webauthn") { - account = await createModularAccountV2( - config as CreateWebauthnModularAccountV2Params, - ); - } else { - account = await createModularAccountV2( - config as CreateModularAccountV2Params, - ); - } - - const middlewareToAppend = await (async () => { - switch (config.mode) { - case "webauthn": - return { - gasEstimator: webauthnGasEstimator(config.gasEstimator), - }; - case "7702": - case "default": - case undefined: - return {}; - default: - return assertNeverConfigMode(config); - } - })(); - - if (isAlchemyTransport(transport, chain)) { - return createAlchemySmartAccountClient({ - ...config, - transport, - chain, - account, - ...middlewareToAppend, - }); - } - - return createSmartAccountClient({ - ...config, - account, - ...middlewareToAppend, - }); -} - -function assertNeverConfigMode(_: never): never { - throw new Error("Unexpected mode"); -} diff --git a/account-kit/smart-contracts/src/ma-v2/errors.ts b/account-kit/smart-contracts/src/ma-v2/errors.ts deleted file mode 100644 index 2018d7fc5d..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/errors.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { BaseError } from "@aa-sdk/core"; - -/** - * Error when Webauthn credentials are not passed to Webauthn Modular Account V2 - */ -export class WebauthnCredentialsRequiredError extends BaseError { - override name = "WebauthnCredentialsRequiredError"; - constructor() { - super( - "Webauthn credentials are required to create a Webauthn Modular Account V2", - ); - } -} - -/** - * Error when a signer is not passed to 7702 version of Modular Account V2 - */ -export class SignerRequiredFor7702Error extends BaseError { - override name = "SignerRequiredFor7702Error"; - constructor() { - super("A signer is required to create a 7702 Modular Account V2"); - } -} - -/** - * Error when a signer is not passed to default Modular Account V2 - */ -export class SignerRequiredForDefaultError extends BaseError { - override name = "SignerRequiredForDefaultError"; - constructor() { - super("A signer is required to create a default Modular Account V2"); - } -} diff --git a/account-kit/smart-contracts/src/ma-v2/index.ts b/account-kit/smart-contracts/src/ma-v2/index.ts deleted file mode 100644 index 1f5a673f60..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -// ma v2 exports -export { accountFactoryAbi } from "./abis/accountFactoryAbi.js"; -export { modularAccountAbi } from "./abis/modularAccountAbi.js"; -export { semiModularAccountBytecodeAbi } from "./abis/semiModularAccountBytecodeAbi.js"; -export { semiModularAccountStorageAbi } from "./abis/semiModularAccountStorageAbi.js"; - -export { nativeSMASigner } from "./account/nativeSMASigner.js"; - -export type { - ModuleEntity, - ValidationConfig, - HookConfig, - ValidationData, -} from "./actions/common/types.js"; -export { HookType } from "./actions/common/types.js"; -export { - serializeValidationConfig, - serializeHookConfig, - serializeModuleEntity, -} from "./actions/common/utils.js"; -export type * from "./actions/install-validation/installValidation.js"; -export { installValidationActions } from "./actions/install-validation/installValidation.js"; -export type * from "./actions/deferralActions.js"; -export { deferralActions } from "./actions/deferralActions.js"; -export type * from "./permissionBuilder.js"; -export { PermissionBuilder, PermissionType } from "./permissionBuilder.js"; -export * from "./permissionBuilderErrors.js"; - -export { - getDefaultAllowlistModuleAddress, - getDefaultNativeTokenLimitModuleAddress, - getDefaultPaymasterGuardModuleAddress, - getDefaultSingleSignerValidationModuleAddress, - getDefaultTimeRangeModuleAddress, - getDefaultWebauthnValidationModuleAddress, -} from "./modules/utils.js"; -export { buildFullNonceKey, buildDeferredActionDigest } from "./utils.js"; -export { allowlistModuleAbi } from "./modules/allowlist-module/abis/allowlistModuleAbi.js"; -export { AllowlistModule } from "./modules/allowlist-module/module.js"; -export { nativeTokenLimitModuleAbi } from "./modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js"; -export { NativeTokenLimitModule } from "./modules/native-token-limit-module/module.js"; -export { paymasterGuardModuleAbi } from "./modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js"; -export { PaymasterGuardModule } from "./modules/paymaster-guard-module/module.js"; -export { singleSignerValidationModuleAbi } from "./modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js"; -export { SingleSignerValidationModule } from "./modules/single-signer-validation/module.js"; -export { timeRangeModuleAbi } from "./modules/time-range-module/abis/timeRangeModuleAbi.js"; -export { TimeRangeModule } from "./modules/time-range-module/module.js"; -export { webauthnValidationModuleAbi } from "./modules/webauthn-validation/abis/webauthnValidationAbi.js"; -export { WebAuthnValidationModule } from "./modules/webauthn-validation/module.js"; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/allowlist-module/module.ts b/account-kit/smart-contracts/src/ma-v2/modules/allowlist-module/module.ts deleted file mode 100644 index 2deef04a3b..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/modules/allowlist-module/module.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { encodeAbiParameters, type Address, type Hex } from "viem"; -import { allowlistModuleAbi } from "./abis/allowlistModuleAbi.js"; -import { HookType, type HookConfig } from "../../actions/common/types.js"; - -export const AllowlistModule = { - abi: allowlistModuleAbi, - buildHook: ( - installArgs: { - entityId: number; - inputs: Array<{ - target: Address; - hasSelectorAllowlist: boolean; - hasERC20SpendLimit: boolean; - erc20SpendLimit: bigint; - selectors: Array; - }>; - }, - address: Address, - ): { - hookConfig: HookConfig; - initData: Hex; - } => { - const installData = AllowlistModule.encodeOnInstallData(installArgs); - return { - hookConfig: { - address: address, - entityId: installArgs.entityId, - hookType: HookType.VALIDATION, - hasPreHooks: true, - hasPostHooks: false, - }, - initData: installData, - }; - }, - encodeOnInstallData: (args: { - entityId: number; - inputs: Array<{ - target: Address; - hasSelectorAllowlist: boolean; - hasERC20SpendLimit: boolean; - erc20SpendLimit: bigint; - selectors: Array; - }>; - }): Hex => { - const { entityId, inputs } = args; - return encodeAbiParameters( - [ - { type: "uint32" }, - { - type: "tuple[]", - components: [ - { type: "address" }, - { type: "bool" }, - { type: "bool" }, - { type: "uint256" }, - { type: "bytes4[]" }, - ], - }, - ], - [ - entityId, - inputs.map( - (input) => - [ - input.target, - input.hasSelectorAllowlist, - input.hasERC20SpendLimit, - input.erc20SpendLimit, - input.selectors, - ] as const, - ), - ], - ); - }, - - encodeOnUninstallData: (args: { - entityId: number; - inputs: Array<{ - target: Address; - hasSelectorAllowlist: boolean; - hasERC20SpendLimit: boolean; - erc20SpendLimit: bigint; - selectors: Array; - }>; - }): Hex => { - const { entityId, inputs } = args; - return encodeAbiParameters( - [ - { type: "uint32" }, - { - type: "tuple[]", - components: [ - { type: "address" }, - { type: "bool" }, - { type: "bool" }, - { type: "uint256" }, - { type: "bytes4[]" }, - ], - }, - ], - [ - entityId, - inputs.map( - (input) => - [ - input.target, - input.hasSelectorAllowlist, - input.hasERC20SpendLimit, - input.erc20SpendLimit, - input.selectors, - ] as const, - ), - ], - ); - }, -}; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/signer.ts b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/signer.ts deleted file mode 100644 index eea7266556..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/signer.ts +++ /dev/null @@ -1,178 +0,0 @@ -import type { - SmartAccountSigner, - SigningMethods, - SignatureRequest, -} from "@aa-sdk/core"; -import { - type Address, - type Chain, - concat, - concatHex, - hashMessage, - hashTypedData, - type Hex, - type SignableMessage, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { - getDefaultSingleSignerValidationModuleAddress, - SignatureType, -} from "../utils.js"; -import { - packUOSignature, - pack1271EOASignature, - isDeferredAction, - assertNever, -} from "../../utils.js"; - -/** - * Creates an object with methods for generating a dummy signature, signing user operation hashes, signing messages, and signing typed data. - * - * @example - - * ```ts - * import { singleSignerMessageSigner } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * - * const MNEMONIC = "...": - * - * const account = createModularAccountV2({ config }); - * - * const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - * - * const messageSigner = singleSignerMessageSigner(signer, chain, account.address, account.signerEntity.entityId); - * ``` - * - * @param {SmartAccountSigner} signer Signer to use for signing operations - * @param {Chain} chain Chain object for the signer - * @param {Address} accountAddress address of the smart account using this signer - * @param {number} entityId the entity id of the signing validation - * @param {Hex} deferredActionData optional deferred action data to prepend to the uo signatures - * @returns {object} an object with methods for signing operations and managing signatures - */ -export const singleSignerMessageSigner = ( - signer: SmartAccountSigner, - chain: Chain, - accountAddress: Address, - entityId: number, - deferredActionData?: Hex, -) => { - const signingMethods: SigningMethods = { - prepareSign: async ( - request: SignatureRequest, - ): Promise => { - let hash; - const requestType = request.type; - - switch (requestType) { - case "personal_sign": - hash = hashMessage(request.data); - break; - - case "eth_signTypedData_v4": - hash = await hashTypedData(request.data); - break; - - default: - return assertNever(requestType, "Invalid signature request type"); - } - - return { - type: "eth_signTypedData_v4", - data: { - domain: { - chainId: Number(chain.id), - verifyingContract: - getDefaultSingleSignerValidationModuleAddress(chain), - salt: concatHex([`0x${"00".repeat(12)}`, accountAddress]), - }, - types: { - ReplaySafeHash: [{ name: "hash", type: "bytes32" }], - }, - message: { - hash, - }, - primaryType: "ReplaySafeHash", - }, - }; - }, - formatSign: async (signature: Hex) => { - return pack1271EOASignature({ - validationSignature: signature, - entityId, - }); - }, - }; - - return { - ...signingMethods, - getDummySignature: (): Hex => { - const sig = packUOSignature({ - // orderedHookData: [], - validationSignature: - "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c", - }); - - return deferredActionData ? concatHex([deferredActionData, sig]) : sig; - }, - - signUserOperationHash: async (uoHash: Hex): Promise => { - let sig = await signer - .signMessage({ raw: uoHash }) - .then((signature: Hex) => - packUOSignature({ - // orderedHookData: [], - validationSignature: signature, - }), - ); - - if (deferredActionData) { - sig = concatHex([deferredActionData, sig]); - deferredActionData = undefined; - } - - return sig; - }, - - // we apply the expected 1271 packing here since the account contract will expect it - async signMessage({ message }: { message: SignableMessage }): Promise { - const { type, data } = await signingMethods.prepareSign({ - type: "personal_sign", - data: message, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - const sig = await signer.signTypedData(data); - - return signingMethods.formatSign(sig); - }, - - // TODO: maybe move "sign deferred actions" to a separate function? - // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing - signTypedData: async < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >( - typedDataDefinition: TypedDataDefinition, - ): Promise => { - const { type, data } = await signingMethods.prepareSign({ - type: "eth_signTypedData_v4", - data: typedDataDefinition as TypedDataDefinition, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - const sig = await signer.signTypedData(data); - - return isDeferredAction(typedDataDefinition, accountAddress) - ? concat([SignatureType.EOA, sig]) - : signingMethods.formatSign(sig); - }, - }; -}; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/time-range-module/module.ts b/account-kit/smart-contracts/src/ma-v2/modules/time-range-module/module.ts deleted file mode 100644 index fec20f38c8..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/modules/time-range-module/module.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { encodeAbiParameters, type Address, type Hex } from "viem"; - -import { timeRangeModuleAbi } from "./abis/timeRangeModuleAbi.js"; -import { HookType, type HookConfig } from "../../actions/common/types.js"; - -export const TimeRangeModule = { - abi: timeRangeModuleAbi, - buildHook: ( - installArgs: { - entityId: number; - validUntil: number; - validAfter: number; - }, - address: Address, - ): { hookConfig: HookConfig; initData: Hex } => { - if (installArgs.validUntil > 2 ** 48 - 1) { - throw new Error( - "TimeRangeModule.buildHook: validUntil > type(uint48).max", - ); - } - - if (installArgs.validAfter > 2 ** 48 - 1) { - throw new Error( - "TimeRangeModule.buildHook: validAfter > type(uint48).max", - ); - } - - const installData = TimeRangeModule.encodeOnInstallData(installArgs); - return { - hookConfig: { - address: address, - entityId: installArgs.entityId, - hookType: HookType.VALIDATION, - hasPreHooks: false, - hasPostHooks: false, - }, - initData: installData, - }; - }, - encodeOnInstallData: (args: { - entityId: number; - validUntil: number; - validAfter: number; - }): Hex => { - const { entityId, validUntil, validAfter } = args; - - return encodeAbiParameters( - [ - { - type: "uint32", - }, - { - type: "uint48", - }, - { - type: "uint48", - }, - ], - [entityId, validUntil, validAfter], - ); - }, - encodeOnUninstallData: (args: { entityId: number }): Hex => { - const { entityId } = args; - - return encodeAbiParameters( - [ - { - type: "uint32", - }, - ], - [entityId], - ); - }, - encodeSetTimeRange: (args: { - entityId: number; - validUntil: number; - validAfter: number; - }): Hex => { - const { entityId, validUntil, validAfter } = args; - - return encodeAbiParameters( - [ - { - type: "uint32", - }, - { - type: "uint48", - }, - { - type: "uint48", - }, - ], - [entityId, validUntil, validAfter], - ); - }, -}; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/utils.ts b/account-kit/smart-contracts/src/ma-v2/modules/utils.ts deleted file mode 100644 index ea949a9555..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/modules/utils.ts +++ /dev/null @@ -1,218 +0,0 @@ -import type { Chain, Address } from "viem"; -import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - mainnet, - optimism, - optimismSepolia, - polygon, - polygonAmoy, - sepolia, -} from "@account-kit/infra"; - -export enum SignatureType { - EOA = "0x00", - CONTRACT = "0x01", -} - -/** - * Maps a given chain to a specific address of the webauthn validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address. - * - * @example - * ```ts - * import { getDefaultWebauthnValidationModuleAddress } from "@account-kit/smart-contracts"; - * import { Chain, Address } from "viem"; - * - * const chain: Chain = ... - * const webauthnValidationAddress: Address = getDefaultWebauthnValidationModuleAddress(chain); - * ``` - * @param {Chain} chain The chain object containing the chain ID to map - * @returns {Address} The webauthn validation module address associated with the specified chain ID or a default address if no specific mapping exists - */ -export const getDefaultWebauthnValidationModuleAddress = ( - chain: Chain, -): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x0000000000001D9d34E07D9834274dF9ae575217"; - } -}; - -/** - * Maps a given chain to a specific address of the time range module by its chain ID. If no direct mapping exists, it defaults to returning a specific address. - * - * @example - * ```ts - * import { getDefaultTimeRangeModuleAddress } from "@account-kit/smart-contracts"; - * import { Chain, Address } from "viem"; - * - * const chain: Chain = ... - * const timeRangeModuleAddress: Address = getDefaultTimeRangeModuleAddress(chain); - * ``` - * @param {Chain} chain The chain object containing the chain ID to map - * @returns {Address} The time range module address associated with the specified chain ID or a default address if no specific mapping exists - */ -export const getDefaultTimeRangeModuleAddress = (chain: Chain): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x00000000000082B8e2012be914dFA4f62A0573eA"; - } -}; - -/** - * Maps a given chain to a specific address of the single signer validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address. - * - * @example - * ```ts - * import { getDefaultSingleSignerValidationModuleAddress } from "@account-kit/smart-contracts"; - * import { Chain, Address } from "viem"; - * - * const chain: Chain = ... - * const singleSignerValidationAddress: Address = getDefaultSingleSignerValidationModuleAddress(chain); - * ``` - * @param {Chain} chain The chain object containing the chain ID to map - * @returns {Address} The single signer validation module address associated with the specified chain ID or a default address if no specific mapping exists - */ -export const getDefaultSingleSignerValidationModuleAddress = ( - chain: Chain, -): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x00000000000099DE0BF6fA90dEB851E2A2df7d83"; - } -}; - -/** - * Maps a given chain to a specific address of the paymaster guard module by its chain ID. If no direct mapping exists, it defaults to returning a specific address. - * - * @example - * ```ts - * import { getDefaultPaymasterGuardModuleAddress } from "@account-kit/smart-contracts"; - * import { Chain, Address } from "viem"; - * - * const chain: Chain = ... - * const paymasterGuardAddress: Address = getDefaultPaymasterGuardModuleAddress(chain); - * ``` - * @param {Chain} chain The chain object containing the chain ID to map - * @returns {Address} The paymaster guard module address associated with the specified chain ID or a default address if no specific mapping exists - */ -export const getDefaultPaymasterGuardModuleAddress = ( - chain: Chain, -): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x0000000000001aA7A7F7E29abe0be06c72FD42A1"; - } -}; - -/** - * Maps a given chain to a specific address of the native token limit module by its chain ID. If no direct mapping exists, it defaults to returning a specific address. - * - * @example - * ```ts - * import { getDefaultNativeTokenLimitModuleAddress } from "@account-kit/smart-contracts"; - * import { Chain, Address } from "viem"; - * - * const chain: Chain = ... - * const nativeTokenLimitAddress: Address = getDefaultNativeTokenLimitModuleAddress(chain); - * ``` - * @param {Chain} chain The chain object containing the chain ID to map - * @returns {Address} The native token limit module address associated with the specified chain ID or a default address if no specific mapping exists - */ -export const getDefaultNativeTokenLimitModuleAddress = ( - chain: Chain, -): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x00000000000001e541f0D090868FBe24b59Fbe06"; - } -}; - -/** - * Maps a given chain to a specific address of the allowlist module by its chain ID. If no direct mapping exists, it defaults to returning a specific address. - * - * @example - * ```ts - * import { getDefaultAllowlistModuleAddress } from "@account-kit/smart-contracts"; - * import { Chain, Address } from "viem"; - * - * const chain: Chain = ... - * const allowlistModule: Address = getDefaultAllowlistModuleAddress(chain); - * ``` - * @param {Chain} chain The chain object containing the chain ID to map - * @returns {Address} The allowlist module address associated with the specified chain ID or a default address if no specific mapping exists - */ -export const getDefaultAllowlistModuleAddress = (chain: Chain): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x00000000003e826473a313e600b5b9b791f5a59a"; - } -}; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.ts b/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.ts deleted file mode 100644 index 6b07b403db..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.ts +++ /dev/null @@ -1,373 +0,0 @@ -export const webauthnValidationModuleAbi = [ - { - type: "constructor", - inputs: [ - { - name: "_entryPoint", - type: "address", - internalType: "contract IEntryPoint", - }, - { - name: "_accountImpl", - type: "address", - internalType: "contract ModularAccount", - }, - { - name: "_webauthnValidationModule", - type: "address", - internalType: "address", - }, - { - name: "owner", - type: "address", - internalType: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ACCOUNT_IMPL", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ModularAccount", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "ENTRY_POINT", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract IEntryPoint", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "WEBAUTHN_VALIDATION_MODULE", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "addStake", - inputs: [ - { - name: "unstakeDelay", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - name: "createAccount", - inputs: [ - { - name: "ownerX", - type: "uint256", - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ModularAccount", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "getAddress", - inputs: [ - { - name: "ownerX", - type: "uint256", - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getSalt", - inputs: [ - { - name: "ownerX", - type: "uint256", - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "entityId", - type: "uint32", - internalType: "uint32", - }, - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "transferOwnership", - inputs: [ - { - name: "newOwner", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "unlockStake", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "withdraw", - inputs: [ - { - name: "to", - type: "address", - internalType: "address payable", - }, - { - name: "token", - type: "address", - internalType: "address", - }, - { - name: "amount", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "withdrawStake", - inputs: [ - { - name: "withdrawAddress", - type: "address", - internalType: "address payable", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "event", - name: "ModularAccountDeployed", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "ownerX", - type: "uint256", - indexed: true, - internalType: "uint256", - }, - { - name: "ownerY", - type: "uint256", - indexed: true, - internalType: "uint256", - }, - { - name: "salt", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [ - { - name: "target", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "AddressInsufficientBalance", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "FailedInnerCall", - inputs: [], - }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "OwnableUnauthorizedAccount", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [ - { - name: "token", - type: "address", - internalType: "address", - }, - ], - }, - { - type: "error", - name: "TransferFailed", - inputs: [], - }, -] as const; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/module.ts b/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/module.ts deleted file mode 100644 index 8b8a9e52e2..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { encodeAbiParameters, type Hex } from "viem"; - -export const WebAuthnValidationModule = { - encodeOnInstallData: (args: { - entityId: number; - x: bigint; - y: bigint; - }): Hex => { - const { entityId, x, y } = args; - return encodeAbiParameters( - [{ type: "uint32" }, { type: "uint256" }, { type: "uint256" }], - [entityId, x, y], - ); - }, - - encodeOnUninstallData: (args: { entityId: number }): Hex => { - const { entityId } = args; - - return encodeAbiParameters( - [ - { - type: "uint32", - }, - ], - [entityId], - ); - }, -}; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/signingMethods.ts b/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/signingMethods.ts deleted file mode 100644 index 11bb51b15a..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/modules/webauthn-validation/signingMethods.ts +++ /dev/null @@ -1,194 +0,0 @@ -import * as WebAuthnP256 from "ox/WebAuthnP256"; -import { - type Address, - type Chain, - concatHex, - encodeAbiParameters, - hashMessage, - hashTypedData, - type Hex, - type SignableMessage, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { type ToWebAuthnAccountParameters } from "viem/account-abstraction"; -import { - assertNever, - isDeferredAction, - pack1271WebAuthnSignature, -} from "../../utils.js"; -import { getDefaultWebauthnValidationModuleAddress } from "../utils.js"; -import type { SignatureRequest, SigningMethods } from "@aa-sdk/core"; - -/** - * Creates an object with methods for generating a dummy signature, signing user operation hashes, signing messages, and signing typed data. - * - * @example - - * ```ts - * import { webauthnSigningFunctions } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * - * const messageSigner = webauthnSigningFunctions(credential, getFn, rpId, chain, account.address, account.signerEntity.entityId); - * ``` - * - * @param {ToWebAuthnAccountParameters} credential the Webauthn public key credential object - * @param {ToWebAuthnAccountParameters["getFn"]} getFn function to retrieve the WebAuthn credential - * @param {ToWebAuthnAccountParameters["rpId"]} rpId the relying party ID for the WebAuthn credential - * @param {Chain} chain Chain object for the signer - * @param {Address} accountAddress address of the smart account using this signer - * @param {number} entityId the entity id of the signing validation - * @param {Hex} deferredActionData optional deferred action data to prepend to the uo signatures - * @returns {object} an object with methods for signing operations and managing signatures - */ -export const webauthnSigningFunctions = ( - credential: ToWebAuthnAccountParameters["credential"], - getFn: ToWebAuthnAccountParameters["getFn"], - rpId: ToWebAuthnAccountParameters["rpId"], - chain: Chain, - accountAddress: Address, - entityId: number, - deferredActionData?: Hex, -) => { - const { id, publicKey } = credential; - - const sign = async ({ hash }: { hash: Hex }) => { - const { metadata, signature } = await WebAuthnP256.sign({ - credentialId: id, - getFn, - challenge: hash, - rpId, - }); - - return encodeAbiParameters( - [ - { - name: "params", - type: "tuple", - components: [ - { name: "authenticatorData", type: "bytes" }, - { name: "clientDataJSON", type: "string" }, - { name: "challengeIndex", type: "uint256" }, - { name: "typeIndex", type: "uint256" }, - { name: "r", type: "uint256" }, - { name: "s", type: "uint256" }, - ], - }, - ], - [ - { - authenticatorData: metadata.authenticatorData, - clientDataJSON: metadata.clientDataJSON, - challengeIndex: BigInt(metadata.challengeIndex), - typeIndex: BigInt(metadata.typeIndex), - r: signature.r, - s: signature.s, - }, - ], - ); - }; - - const signingMethods: SigningMethods = { - prepareSign: async ( - request: SignatureRequest, - ): Promise => { - const requestType = request.type; - let hash; - - switch (requestType) { - case "personal_sign": - hash = hashMessage(request.data); - break; - - case "eth_signTypedData_v4": - if (isDeferredAction(request.data, accountAddress)) { - return request; - } else { - hash = hashTypedData(request.data); - break; - } - - default: - return assertNever(requestType, "Invalid signature request type"); - } - - return { - type: "eth_signTypedData_v4", - data: { - domain: { - chainId: Number(chain.id), - verifyingContract: getDefaultWebauthnValidationModuleAddress(chain), - salt: concatHex([`0x${"00".repeat(12)}`, accountAddress]), - }, - types: { - ReplaySafeHash: [{ name: "hash", type: "bytes32" }], - }, - message: { - hash, - }, - primaryType: "ReplaySafeHash", - }, - }; - }, - formatSign: async (signature: Hex) => { - return pack1271WebAuthnSignature({ - validationSignature: signature, - entityId, - }); - }, - }; - - return { - ...signingMethods, - id, - publicKey, - getDummySignature: (): Hex => - "0xff000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000", - signUserOperationHash: async (uoHash: Hex): Promise => { - let sig = await sign({ hash: hashMessage({ raw: uoHash }) }); - if (deferredActionData) { - sig = concatHex([deferredActionData, sig]); - deferredActionData = undefined; - } - - return concatHex(["0xff", sig]); - }, - - async signMessage({ message }: { message: SignableMessage }): Promise { - const { data, type } = await signingMethods.prepareSign({ - type: "personal_sign", - data: message, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - const signature = await sign({ hash: hashTypedData(data) }); - - return signingMethods.formatSign(signature); - }, - - signTypedData: async < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >( - typedDataDefinition: TypedDataDefinition, - ): Promise => { - const { data, type } = await signingMethods.prepareSign({ - type: "eth_signTypedData_v4", - data: typedDataDefinition as TypedDataDefinition, - }); - - if (type !== "eth_signTypedData_v4") { - throw new Error("Invalid signature request type"); - } - - const signature = await sign({ hash: hashTypedData(data) }); - - return isDeferredAction(typedDataDefinition, accountAddress) - ? signature - : signingMethods.formatSign(signature); - }, - }; -}; diff --git a/account-kit/smart-contracts/src/ma-v2/utils.ts b/account-kit/smart-contracts/src/ma-v2/utils.ts deleted file mode 100644 index 8ce8b7e5fc..0000000000 --- a/account-kit/smart-contracts/src/ma-v2/utils.ts +++ /dev/null @@ -1,380 +0,0 @@ -import { - concat, - toHex, - custom, - encodeFunctionData, - type Hex, - type Chain, - type Address, - type Transport, - parseAbi, - size, - concatHex, - hexToNumber, - type TypedDataDefinition, - type TypedData, - isAddressEqual, -} from "viem"; -import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - mainnet, - optimism, - optimismSepolia, - polygon, - polygonAmoy, - sepolia, -} from "@account-kit/infra"; -import { createModularAccountV2 } from "./account/modularAccountV2.js"; -import { type ModularAccountV2 } from "./account/common/modularAccountV2Base.js"; -import { semiModularAccountStorageAbi } from "./abis/semiModularAccountStorageAbi.js"; -import { - AccountNotFoundError, - ChainNotFoundError, - type GetAccountParameter, - type SmartAccountClient, - type SmartAccountSigner, - type SmartContractAccountWithSigner, - type UpgradeToData, -} from "@aa-sdk/core"; - -export const DEFAULT_OWNER_ENTITY_ID = 0; - -export type PackUOSignatureParams = { - // orderedHookData: HookData[]; - validationSignature: Hex; -}; - -// TODO: direct call validation 1271 -export type Pack1271SignatureParams = { - validationSignature: Hex; - entityId: number; -}; - -// Signature packing utility for user operations -export const packUOSignature = ({ - // orderedHookData, TODO: integrate in next iteration of MAv2 sdk - validationSignature, -}: PackUOSignatureParams): Hex => { - return concat(["0xFF", "0x00", validationSignature]); -}; - -// Signature packing utility for 1271 EOA signatures -export const pack1271EOASignature = ({ - validationSignature, - entityId, -}: Pack1271SignatureParams): Hex => { - return concat([ - "0x00", - toHex(entityId, { size: 4 }), - "0xFF", - "0x00", // EOA type signature - validationSignature, - ]); -}; - -// WebAuthn signatures for EIP-1271 need the MAv2 segment structure -// Format: 0x00 (hooks) + entityId + 0xFF (segment marker) + WebAuthn signature -// Unlike EOA signatures, there's no signature type byte (0x00) before the WebAuthn data -export const pack1271WebAuthnSignature = ({ - validationSignature, - entityId, -}: Pack1271SignatureParams): Hex => { - return concatHex([ - "0x00", // No pre-validation hooks - toHex(entityId, { size: 4 }), // Entity ID - "0xFF", // Reserved segment marker - validationSignature, // WebAuthn signature (already ABI-encoded) - ]); -}; - -export const getDefaultWebAuthnMAV2FactoryAddress = (): Address => { - return "0x55010E571dCf07e254994bfc88b9C1C8FAe31960"; -}; - -export const getDefaultMAV2FactoryAddress = (chain: Chain): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x00000000000017c61b5bEe81050EC8eFc9c6fecd"; - } -}; - -export const getDefaultSMAV2BytecodeAddress = (chain: Chain): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x000000000000c5A9089039570Dd36455b5C07383"; - } -}; - -export const getDefaultSMAV2StorageAddress = (chain: Chain): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x0000000000006E2f9d80CaEc0Da6500f005EB25A"; - } -}; - -export const getDefaultSMAV27702Address = (chain: Chain): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x69007702764179f14F51cdce752f4f775d74E139"; - } -}; - -export const getDefaultMAV2Address = (chain: Chain): Address => { - switch (chain.id) { - // TODO: case mekong.id: - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x00000000000002377B26b1EdA7b0BC371C60DD4f"; - } -}; - -export type GetMAV2UpgradeToData< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends - | SmartContractAccountWithSigner - | undefined = SmartContractAccountWithSigner | undefined, -> = GetAccountParameter; - -/** - * Retrieves the data necessary to upgrade to a Modular Account V2 (MA v2). - * Note that the upgrade will be to the Semi Modular Account Storage variant - * - * @example - * ```ts - * import { createLightAccountClient, getMAV2UpgradeToData } from "@account-kit/smart-contracts"; - * - * const client = createLightAccountClient({}); - * const upgradeData = await getMAV2UpgradeToData(client, {}); - * ``` - * - * @param {SmartAccountClient} client The smart account client - * @param {GetMAV2UpgradeToData} args The arguments required for the upgrade - * @returns {Promise Promise>}>} A promise that resolves to upgrade data augmented with a function to create a Modular Account V2 - */ -export async function getMAV2UpgradeToData< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends - | SmartContractAccountWithSigner - | undefined = SmartContractAccountWithSigner | undefined, ->( - client: SmartAccountClient, - args: GetMAV2UpgradeToData, -): Promise< - UpgradeToData & { - createModularAccountV2FromExisting: () => Promise< - ModularAccountV2 - >; - } -> { - const { account: account_ = client.account } = args; - - if (!account_) { - throw new AccountNotFoundError(); - } - const account = account_ as SmartContractAccountWithSigner; - - const chain = client.chain; - if (!chain) { - throw new ChainNotFoundError(); - } - - const initData = encodeFunctionData({ - abi: semiModularAccountStorageAbi, - functionName: "initialize", - args: [await account.getSigner().getAddress()], - }); - - return { - implAddress: getDefaultSMAV2StorageAddress(chain), - initializationData: initData, - createModularAccountV2FromExisting: async () => - createModularAccountV2({ - transport: custom(client.transport), - chain: chain as Chain, - signer: account.getSigner(), - accountAddress: account.address, - }), - }; -} - -export const entityIdAndNonceReaderBytecode = - "0x608060405234801561001057600080fd5b506040516104f13803806104f183398101604081905261002f916101e5565b60006008826001600160c01b0316901c90506000808263ffffffff1611610057576001610059565b815b90506001600160a01b0385163b15610133575b60006001600160a01b03861663d31b575b6bffffffff0000000000000000604085901b166040516001600160e01b031960e084901b1681526001600160401b03199091166004820152602401600060405180830381865afa1580156100d5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526100fd91908101906103c6565b805190915060ff161580156101155750606081015151155b156101205750610133565b8161012a816104a4565b9250505061006c565b604051631aab3f0d60e11b81526001600160a01b03868116600483015264ffffffff01600160c01b038516600884901b64ffffffff0016176024830152600091908616906335567e1a90604401602060405180830381865afa15801561019d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c191906104d7565b90508060005260206000f35b6001600160a01b03811681146101e257600080fd5b50565b6000806000606084860312156101fa57600080fd5b8351610205816101cd565b6020850151909350610216816101cd565b60408501519092506001600160c01b038116811461023357600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156102765761027661023e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156102a4576102a461023e565b604052919050565b60006001600160401b038211156102c5576102c561023e565b5060051b60200190565b600082601f8301126102e057600080fd5b81516102f36102ee826102ac565b61027c565b8082825260208201915060208360051b86010192508583111561031557600080fd5b602085015b8381101561034857805166ffffffffffffff198116811461033a57600080fd5b83526020928301920161031a565b5095945050505050565b600082601f83011261036357600080fd5b81516103716102ee826102ac565b8082825260208201915060208360051b86010192508583111561039357600080fd5b602085015b838110156103485780516001600160e01b0319811681146103b857600080fd5b835260209283019201610398565b6000602082840312156103d857600080fd5b81516001600160401b038111156103ee57600080fd5b82016080818503121561040057600080fd5b610408610254565b815160ff8116811461041957600080fd5b815260208201516001600160401b0381111561043457600080fd5b610440868285016102cf565b60208301525060408201516001600160401b0381111561045f57600080fd5b61046b868285016102cf565b60408301525060608201516001600160401b0381111561048a57600080fd5b61049686828501610352565b606083015250949350505050565b600063ffffffff821663ffffffff81036104ce57634e487b7160e01b600052601160045260246000fd5b60010192915050565b6000602082840312156104e957600080fd5b505191905056fe"; - -export const mintableERC20Bytecode = - "0x608060405234801561000f575f80fd5b506040518060400160405280600d81526020016c26b4b73a30b13632aa37b5b2b760991b81525060405180604001604052806002815260200161135560f21b8152508160039081610060919061010d565b50600461006d828261010d565b5050506101c7565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061009d57607f821691505b6020821081036100bb57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561010857805f5260205f20601f840160051c810160208510156100e65750805b601f840160051c820191505b81811015610105575f81556001016100f2565b50505b505050565b81516001600160401b0381111561012657610126610075565b61013a816101348454610089565b846100c1565b6020601f82116001811461016c575f83156101555750848201515b5f19600385901b1c1916600184901b178455610105565b5f84815260208120601f198516915b8281101561019b578785015182556020948501946001909201910161017b565b50848210156101b857868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b610737806101d45f395ff3fe608060405234801561000f575f80fd5b506004361061008c575f3560e01c806306fdde0314610090578063095ea7b3146100ae57806318160ddd146100d157806323b872dd146100e3578063313ce567146100f657806340c10f191461010557806370a082311461011a57806395d89b4114610142578063a9059cbb1461014a578063dd62ed3e1461015d575b5f80fd5b610098610170565b6040516100a59190610572565b60405180910390f35b6100c16100bc3660046105c2565b610200565b60405190151581526020016100a5565b6002545b6040519081526020016100a5565b6100c16100f13660046105ea565b610219565b604051601281526020016100a5565b6101186101133660046105c2565b61023c565b005b6100d5610128366004610624565b6001600160a01b03165f9081526020819052604090205490565b61009861024a565b6100c16101583660046105c2565b610259565b6100d561016b366004610644565b610266565b60606003805461017f90610675565b80601f01602080910402602001604051908101604052809291908181526020018280546101ab90610675565b80156101f65780601f106101cd576101008083540402835291602001916101f6565b820191905f5260205f20905b8154815290600101906020018083116101d957829003601f168201915b5050505050905090565b5f3361020d818585610290565b60019150505b92915050565b5f336102268582856102a2565b6102318585856102fc565b506001949350505050565b6102468282610359565b5050565b60606004805461017f90610675565b5f3361020d8185856102fc565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b61029d838383600161038d565b505050565b5f6102ad8484610266565b90505f198110156102f657818110156102e857828183604051637dc7a0d960e11b81526004016102df939291906106ad565b60405180910390fd5b6102f684848484035f61038d565b50505050565b6001600160a01b038316610325575f604051634b637e8f60e11b81526004016102df91906106ce565b6001600160a01b03821661034e575f60405163ec442f0560e01b81526004016102df91906106ce565b61029d83838361045f565b6001600160a01b038216610382575f60405163ec442f0560e01b81526004016102df91906106ce565b6102465f838361045f565b6001600160a01b0384166103b6575f60405163e602df0560e01b81526004016102df91906106ce565b6001600160a01b0383166103df575f604051634a1406b160e11b81526004016102df91906106ce565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156102f657826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161045191815260200190565b60405180910390a350505050565b6001600160a01b038316610489578060025f82825461047e91906106e2565b909155506104e69050565b6001600160a01b0383165f90815260208190526040902054818110156104c85783818360405163391434e360e21b81526004016102df939291906106ad565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661050257600280548290039055610520565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161056591815260200190565b60405180910390a3505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146105bd575f80fd5b919050565b5f80604083850312156105d3575f80fd5b6105dc836105a7565b946020939093013593505050565b5f805f606084860312156105fc575f80fd5b610605846105a7565b9250610613602085016105a7565b929592945050506040919091013590565b5f60208284031215610634575f80fd5b61063d826105a7565b9392505050565b5f8060408385031215610655575f80fd5b61065e836105a7565b915061066c602084016105a7565b90509250929050565b600181811c9082168061068957607f821691505b6020821081036106a757634e487b7160e01b5f52602260045260245ffd5b50919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0391909116815260200190565b8082018082111561021357634e487b7160e01b5f52601160045260245ffdfea2646970667358221220f9ae46a2e15270bfb77fe3d4d0ee0e45b749e3dde93805ee2cf795cb800244e664736f6c634300081a0033"; - -export const mintableERC20Abi = parseAbi([ - "function transfer(address to, uint256 amount) external", - "function mint(address to, uint256 amount) external", - "function balanceOf(address target) external returns (uint256)", -]); - -export type BuildNonceParams = { - nonceKey?: bigint; - entityId?: number; - isGlobalValidation?: boolean; - isDeferredAction?: boolean; - isDirectCallValidation?: boolean; -}; - -export const buildFullNonceKey = ({ - nonceKey = 0n, - entityId = 0, - isGlobalValidation = true, - isDeferredAction = false, -}: BuildNonceParams): bigint => { - return ( - (nonceKey << 40n) + - (BigInt(entityId) << 8n) + - (isDeferredAction ? 2n : 0n) + - (isGlobalValidation ? 1n : 0n) - ); -}; - -// Parses out the 3 components from a deferred action -export const parseDeferredAction = ( - deferredAction: Hex, -): { - entityId: number; - isGlobalValidation: boolean; - nonce: bigint; - deferredActionData: Hex; - hasAssociatedExecHooks: boolean; -} => { - // 2 for 0x, 2 for 00/01, 38 for parallel nonce, 8 for entity id, 2 for options byte, 16 for parallel nonce - return { - entityId: hexToNumber(`0x${deferredAction.slice(42, 50)}`), - isGlobalValidation: - hexToNumber(`0x${deferredAction.slice(50, 52)}`) % 2 === 1, - nonce: BigInt(`0x${deferredAction.slice(4, 68)}`), - deferredActionData: `0x${deferredAction.slice(68)}` as `0x${string}`, - hasAssociatedExecHooks: deferredAction[3] === "1", - }; -}; -export type BuildDeferredActionDigestParams = { - fullPreSignatureDeferredActionDigest: Hex; - sig: Hex; -}; - -/** - * Creates the digest which must be prepended to the userOp signature. - * - * Assumption: The client this extends is used to sign the typed data. - * - * @param {object} args The argument object containing the following: - * @param {Hex} args.fullPreSignatureDeferredActionDigest The The data to append the signature and length to - * @param {Hex} args.sig The signature to include in the digest - * @returns {Hex} The encoded digest to be prepended to the userOp signature - */ -export const buildDeferredActionDigest = ({ - fullPreSignatureDeferredActionDigest, - sig, -}: BuildDeferredActionDigestParams): Hex => { - const sigLength = size(sig); - - const encodedData = concatHex([ - fullPreSignatureDeferredActionDigest, - toHex(sigLength, { size: 4 }), - sig, - ]); - return encodedData; -}; - -export const assertNever = (_val: never, msg: string): never => { - throw new Error(msg); -}; - -/** - * Type guard to check if a TypedDataDefinition is a deferred action. - * - * A deferred action has: - * - primaryType: "DeferredAction" - * - domain.verifyingContract matching the account address - * - * @param {TypedDataDefinition} typedDataDefinition - The typed data to check - * @param {Address} accountAddress - Account address to verify against domain.verifyingContract - * @returns {boolean} - True if the typedDataDefinition is a deferred action for this account - */ -export const isDeferredAction = < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, ->( - typedDataDefinition: TypedDataDefinition, - accountAddress: Address, -): boolean => { - if ( - typedDataDefinition.primaryType !== "DeferredAction" || - !typedDataDefinition.domain || - typeof typedDataDefinition.domain !== "object" || - !("verifyingContract" in typedDataDefinition.domain) - ) { - return false; - } - - try { - return isAddressEqual( - typedDataDefinition.domain.verifyingContract as Address, - accountAddress, - ); - } catch { - return false; - } -}; diff --git a/account-kit/smart-contracts/src/msca/abis/IAccountLoupe.ts b/account-kit/smart-contracts/src/msca/abis/IAccountLoupe.ts deleted file mode 100644 index 1ef30ccda5..0000000000 --- a/account-kit/smart-contracts/src/msca/abis/IAccountLoupe.ts +++ /dev/null @@ -1,78 +0,0 @@ -export const IAccountLoupeAbi = [ - { - type: "function", - name: "getExecutionFunctionConfig", - inputs: [{ name: "selector", type: "bytes4", internalType: "bytes4" }], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct IAccountLoupe.ExecutionFunctionConfig", - components: [ - { name: "plugin", type: "address", internalType: "address" }, - { - name: "userOpValidationFunction", - type: "bytes21", - internalType: "FunctionReference", - }, - { - name: "runtimeValidationFunction", - type: "bytes21", - internalType: "FunctionReference", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getExecutionHooks", - inputs: [{ name: "selector", type: "bytes4", internalType: "bytes4" }], - outputs: [ - { - name: "", - type: "tuple[]", - internalType: "struct IAccountLoupe.ExecutionHooks[]", - components: [ - { - name: "preExecHook", - type: "bytes21", - internalType: "FunctionReference", - }, - { - name: "postExecHook", - type: "bytes21", - internalType: "FunctionReference", - }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getInstalledPlugins", - inputs: [], - outputs: [{ name: "", type: "address[]", internalType: "address[]" }], - stateMutability: "view", - }, - { - type: "function", - name: "getPreValidationHooks", - inputs: [{ name: "selector", type: "bytes4", internalType: "bytes4" }], - outputs: [ - { - name: "preUserOpValidationHooks", - type: "bytes21[]", - internalType: "FunctionReference[]", - }, - { - name: "preRuntimeValidationHooks", - type: "bytes21[]", - internalType: "FunctionReference[]", - }, - ], - stateMutability: "view", - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/abis/IPlugin.ts b/account-kit/smart-contracts/src/msca/abis/IPlugin.ts deleted file mode 100644 index 893d5eee91..0000000000 --- a/account-kit/smart-contracts/src/msca/abis/IPlugin.ts +++ /dev/null @@ -1,396 +0,0 @@ -export const IPluginAbi = [ - { - type: "function", - name: "onInstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { name: "interfaceIds", type: "bytes4[]", internalType: "bytes4[]" }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { name: "canSpendNativeToken", type: "bool", internalType: "bool" }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { name: "permitAnySelector", type: "bool", internalType: "bool" }, - { name: "selectors", type: "bytes4[]", internalType: "bytes4[]" }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "author", type: "string", internalType: "string" }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "preExecHookData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/abis/IPluginManager.ts b/account-kit/smart-contracts/src/msca/abis/IPluginManager.ts deleted file mode 100644 index 04cda3dc33..0000000000 --- a/account-kit/smart-contracts/src/msca/abis/IPluginManager.ts +++ /dev/null @@ -1,105 +0,0 @@ -export const IPluginManagerAbi = [ - { - type: "function", - name: "installPlugin", - inputs: [ - { name: "plugin", type: "address", internalType: "address" }, - { name: "manifestHash", type: "bytes32", internalType: "bytes32" }, - { name: "pluginInitData", type: "bytes", internalType: "bytes" }, - { - name: "dependencies", - type: "bytes21[]", - internalType: "FunctionReference[]", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "uninstallPlugin", - inputs: [ - { name: "plugin", type: "address", internalType: "address" }, - { name: "config", type: "bytes", internalType: "bytes" }, - { name: "pluginUninstallData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "event", - name: "PluginIgnoredHookUnapplyCallbackFailure", - inputs: [ - { - name: "plugin", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "providingPlugin", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "PluginIgnoredUninstallCallbackFailure", - inputs: [ - { - name: "plugin", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "PluginInstalled", - inputs: [ - { - name: "plugin", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "manifestHash", - type: "bytes32", - indexed: false, - internalType: "bytes32", - }, - { - name: "dependencies", - type: "bytes21[]", - indexed: false, - internalType: "FunctionReference[]", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "PluginUninstalled", - inputs: [ - { - name: "plugin", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "callbacksSucceeded", - type: "bool", - indexed: true, - internalType: "bool", - }, - ], - anonymous: false, - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/abis/MultisigModularAccountFactory.ts b/account-kit/smart-contracts/src/msca/abis/MultisigModularAccountFactory.ts deleted file mode 100644 index 7612bfbf4b..0000000000 --- a/account-kit/smart-contracts/src/msca/abis/MultisigModularAccountFactory.ts +++ /dev/null @@ -1,316 +0,0 @@ -export const MultisigModularAccountFactoryAbi = [ - { - type: "constructor", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - { - name: "multisigPlugin", - type: "address", - internalType: "address", - }, - { - name: "implementation", - type: "address", - internalType: "address", - }, - { - name: "multisigPluginManifestHash", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "entryPoint", - type: "address", - internalType: "contract IEntryPoint", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "receive", - stateMutability: "payable", - }, - { - type: "function", - name: "ENTRYPOINT", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "contract IEntryPoint", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "IMPL", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "MULTISIG_PLUGIN", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "acceptOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "addStake", - inputs: [ - { - name: "unstakeDelay", - type: "uint32", - internalType: "uint32", - }, - { - name: "amount", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - name: "createAccount", - inputs: [ - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "owners", - type: "address[]", - internalType: "address[]", - }, - { - name: "threshold", - type: "uint128", - internalType: "uint128", - }, - ], - outputs: [ - { - name: "addr", - type: "address", - internalType: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "getAddress", - inputs: [ - { - name: "salt", - type: "uint256", - internalType: "uint256", - }, - { - name: "owners", - type: "address[]", - internalType: "address[]", - }, - { - name: "threshold", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "pendingOwner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "view", - }, - { - type: "function", - name: "transferOwnership", - inputs: [ - { - name: "newOwner", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "unlockStake", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "withdraw", - inputs: [ - { - name: "to", - type: "address", - internalType: "address payable", - }, - { - name: "token", - type: "address", - internalType: "address", - }, - { - name: "amount", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "withdrawStake", - inputs: [ - { - name: "to", - type: "address", - internalType: "address payable", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "event", - name: "OwnershipTransferStarted", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "error", - name: "InvalidAction", - inputs: [], - }, - { - type: "error", - name: "InvalidOwner", - inputs: [], - }, - { - type: "error", - name: "InvalidThreshold", - inputs: [], - }, - { - type: "error", - name: "OwnersArrayEmpty", - inputs: [], - }, - { - type: "error", - name: "OwnersLimitExceeded", - inputs: [], - }, - { - type: "error", - name: "TransferFailed", - inputs: [], - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts b/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts deleted file mode 100644 index 9bd5e0e83a..0000000000 --- a/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - isSmartAccountClient, - type GetAccountParameter, - type SmartContractAccount, -} from "@aa-sdk/core"; -import type { Address, Chain, Client, Hash, Transport } from "viem"; -import { IAccountLoupeAbi } from "../abis/IAccountLoupe.js"; -import type { - ExecutionFunctionConfig, - ExecutionHooks, - FunctionReference, - PreValidationHooks, -} from "./types.js"; - -export type AccountLoupeActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { - /// @notice Gets the validation functions and plugin address for a selector - /// @dev If the selector is a native function, the plugin address will be the address of the account - /// @param selector The selector to get the configuration for - /// @return The configuration for this selector - getExecutionFunctionConfig( - args: { selector: FunctionReference } & GetAccountParameter, - ): Promise; - - /// @notice Gets the pre and post execution hooks for a selector - /// @param selector The selector to get the hooks for - /// @return The pre and post execution hooks for this selector - getExecutionHooks( - args: { - selector: FunctionReference; - } & GetAccountParameter, - ): Promise>; - - /// @notice Gets the pre user op and runtime validation hooks associated with a selector - /// @param selector The selector to get the hooks for - /// @return preUserOpValidationHooks The pre user op validation hooks for this selector - /// @return preRuntimeValidationHooks The pre runtime validation hooks for this selector - getPreValidationHooks( - args: { selector: Hash } & GetAccountParameter, - ): Promise>; - - /// @notice Gets an array of all installed plugins - /// @return The addresses of all installed plugins - getInstalledPlugins( - args: GetAccountParameter, - ): Promise>; -}; - -/** - * Provides a set of actions for account loupe operations using the specified client. - * NOTE: this is already added to the client when using any of the Modular Account Clients. - * - * @example - * ```ts - * import { accountLoupeActions } from "@account-kit/smart-contracts"; - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * const client = createSmartAccountClient(...).extend(accountLoupeActions); - * ``` - * - * @param {Client} client the client to be used for executing the account loupe actions - * @returns {AccountLoupeActions} an object containing account loupe actions like `getExecutionFunctionConfig`, `getExecutionHooks`, `getPreValidationHooks`, and `getInstalledPlugins` - */ -export const accountLoupeActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -) => AccountLoupeActions = (client) => ({ - getExecutionFunctionConfig: async ({ - selector, - account = client.account, - }) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "getExecutionFunctionConfig", - client, - ); - } - - return client.readContract({ - address: account.address, - abi: IAccountLoupeAbi, - functionName: "getExecutionFunctionConfig", - args: [selector], - }); - }, - - getExecutionHooks: async ({ selector, account = client.account }) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "getExecutionHooks", - client, - ); - } - - return client.readContract({ - address: account.address, - abi: IAccountLoupeAbi, - functionName: "getExecutionHooks", - args: [selector], - }); - }, - - getPreValidationHooks: async ({ selector, account = client.account }) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "getPreValidationHooks", - client, - ); - } - - return client.readContract({ - address: account.address, - abi: IAccountLoupeAbi, - functionName: "getPreValidationHooks", - args: [selector], - }); - }, - - getInstalledPlugins: async ({ account = client.account }) => { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "getInstalledPlugins", - client, - ); - } - - return client - .readContract({ - address: account.address, - abi: IAccountLoupeAbi, - functionName: "getInstalledPlugins", - }) - .catch(() => []); - }, -}); diff --git a/account-kit/smart-contracts/src/msca/account-loupe/types.ts b/account-kit/smart-contracts/src/msca/account-loupe/types.ts deleted file mode 100644 index fd1898183e..0000000000 --- a/account-kit/smart-contracts/src/msca/account-loupe/types.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Address, Hex } from "viem"; - -export type FunctionId = Hex; - -// Treats the first 20 bytes as an address, and the last byte as a identifier. -export type FunctionReference = Hex; - -export type ExecutionFunctionConfig = { - plugin: Address; - userOpValidationFunction: FunctionReference; - runtimeValidationFunction: FunctionReference; -}; - -export type ExecutionHooks = { - preExecHook: FunctionReference; - postExecHook: FunctionReference; -}; - -export type PreValidationHooks = [ - readonly FunctionReference[], - readonly FunctionReference[], -]; diff --git a/account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts b/account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts deleted file mode 100644 index e983f8d6eb..0000000000 --- a/account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts +++ /dev/null @@ -1,154 +0,0 @@ -import type { - EntryPointParameter, - SmartAccountSigner, - SmartContractAccountWithSigner, - ToSmartContractAccountParams, -} from "@aa-sdk/core"; -import { - createBundlerClient, - getAccountAddress, - getEntryPoint, - toSmartContractAccount, -} from "@aa-sdk/core"; -import { - concatHex, - encodeFunctionData, - hexToBigInt, - type Address, - type Chain, - type Hex, - type Transport, -} from "viem"; -import { MultiOwnerModularAccountFactoryAbi } from "../abis/MultiOwnerModularAccountFactory.js"; -import { multiOwnerMessageSigner } from "../plugins/multi-owner/signer.js"; -import { getDefaultMultiOwnerModularAccountFactoryAddress } from "../utils.js"; -import { standardExecutor } from "./standardExecutor.js"; - -export type MultiOwnerModularAccount< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = SmartContractAccountWithSigner< - "MultiOwnerModularAccount", - TSigner, - "0.6.0" ->; - -export type CreateMultiOwnerModularAccountParams< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TEntryPointVersion extends "0.6.0" = "0.6.0", -> = Pick< - ToSmartContractAccountParams< - "MultiOwnerModularAccount", - TTransport, - Chain, - TEntryPointVersion - >, - "transport" | "chain" -> & { - signer: TSigner; - salt?: bigint; - factoryAddress?: Address; - initCode?: Hex; - owners?: Address[]; - accountAddress?: Address; -} & EntryPointParameter; - -export async function createMultiOwnerModularAccount< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - config: CreateMultiOwnerModularAccountParams, -): Promise>; - -/** - * Creates a multi-owner modular account with the given parameters, including transport, chain, signer, account address, initialization code, entry point, factory address, owners, and salt. - * Ensures that the owners are unique, ordered, and non-zero. - * - * @example - * ```ts - * import { createMultiOwnerModularAccount } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http, generatePrivateKey } from "viem" - * - * const account = await createMultiOwnerModularAccount({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @param {CreateMultiOwnerModularAccountParams} config Configuration parameters for creating a multi-owner modular account - * @returns {Promise} A promise that resolves to a `MultiOwnerModularAccount` object containing the created account information and methods - */ -export async function createMultiOwnerModularAccount( - config: CreateMultiOwnerModularAccountParams, -): Promise { - const { - transport, - chain, - signer, - accountAddress, - initCode, - entryPoint = getEntryPoint(chain, { version: "0.6.0" }), - factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(chain), - owners = [], - salt = 0n, - } = config; - - const client = createBundlerClient({ - transport, - chain, - }); - - const getAccountInitCode = async () => { - if (initCode) { - return initCode; - } - - // NOTE: the current signer connected will be one of the owners as well - const ownerAddress = await signer.getAddress(); - // owners need to be dedupe + ordered in ascending order and not == to zero address - const owners_ = Array.from(new Set([...owners, ownerAddress])) - .filter((x) => hexToBigInt(x) !== 0n) - .sort((a, b) => { - const bigintA = hexToBigInt(a); - const bigintB = hexToBigInt(b); - - return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0; - }); - - return concatHex([ - factoryAddress, - encodeFunctionData({ - abi: MultiOwnerModularAccountFactoryAbi, - functionName: "createAccount", - args: [salt, owners_], - }), - ]); - }; - - const _accountAddress = await getAccountAddress({ - client, - entryPoint, - accountAddress, - getAccountInitCode, - }); - - const baseAccount = await toSmartContractAccount({ - transport, - chain, - entryPoint, - accountAddress: _accountAddress, - source: `MultiOwnerModularAccount`, - getAccountInitCode, - ...standardExecutor, - ...multiOwnerMessageSigner(client, _accountAddress, () => signer), - }); - - return { - ...baseAccount, - publicKey: await signer.getAddress(), - getSigner: () => signer, - }; -} diff --git a/account-kit/smart-contracts/src/msca/account/multisigAccount.ts b/account-kit/smart-contracts/src/msca/account/multisigAccount.ts deleted file mode 100644 index 162b5a38fc..0000000000 --- a/account-kit/smart-contracts/src/msca/account/multisigAccount.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { - createBundlerClient, - getAccountAddress, - getEntryPoint, - toSmartContractAccount, - type Address, - type EntryPointParameter, - type SmartAccountSigner, - type SmartContractAccount, - type SmartContractAccountWithSigner, - type ToSmartContractAccountParams, -} from "@aa-sdk/core"; -import { - concatHex, - encodeFunctionData, - hexToBigInt, - type Chain, - type Hex, - type Transport, -} from "viem"; -import { MultisigModularAccountFactoryAbi } from "../abis/MultisigModularAccountFactory.js"; -import { multisigSignMethods } from "../plugins/multisig/signer.js"; -import { getDefaultMultisigModularAccountFactoryAddress } from "../utils.js"; -import { standardExecutor } from "./standardExecutor.js"; - -export const MULTISIG_ACCOUNT_SOURCE = "MultisigModularAccount"; - -export type MultisigModularAccount< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = SmartContractAccountWithSigner< - typeof MULTISIG_ACCOUNT_SOURCE, - TSigner, - "0.6.0" -> & { - getLocalThreshold: () => bigint; -}; - -export type CreateMultisigModularAccountParams< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TEntryPointVersion extends "0.6.0" = "0.6.0", -> = Pick< - ToSmartContractAccountParams< - "MultisigModularAccount", - TTransport, - Chain, - TEntryPointVersion - >, - "transport" | "chain" -> & { - signer: TSigner; - salt?: bigint; - factoryAddress?: Address; - initCode?: Hex; - threshold: bigint; - owners?: Address[]; - accountAddress?: Address; -} & EntryPointParameter; - -export async function createMultisigModularAccount< - TTransport extends Transport = Transport, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - config: CreateMultisigModularAccountParams, -): Promise>; - -/** - * Creates a multisig modular account using the provided parameters, including transport, chain, signer, account address, and other account settings. It configures the account with multiple owners and the specified threshold. - * - * @example - * ```ts - * import { createMultisigModularAccount } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http, generatePrivateKey } from "viem" - * - * const account = await createMultisigModularAccount({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), - * owners: [...], // other owners on the account - * threshold: 2, // 2 of N signatures - * }); - * ``` - * - * @param {CreateMultisigModularAccountParams} config The parameters for creating a multisig modular account. - * @returns {Promise} A promise that resolves to a `MultisigModularAccount` object containing the created account information and methods. - */ -export async function createMultisigModularAccount( - config: CreateMultisigModularAccountParams, -): Promise { - const { - transport, - chain, - signer, - accountAddress: accountAddress_, - initCode, - entryPoint = getEntryPoint(chain, { version: "0.6.0" }), - factoryAddress = getDefaultMultisigModularAccountFactoryAddress(chain), - owners = [], - salt = 0n, - threshold, - } = config; - - const client = createBundlerClient({ - transport, - chain, - }); - - const getAccountInitCode = async () => { - if (initCode) { - return initCode; - } - - // NOTE: the current signer connected will be one of the sigs as well - const sigAddress = await signer.getAddress(); - // sigs need to be deduped + ordered in ascending order and !== to zero address - const sigs_ = Array.from(new Set([...owners, sigAddress])) - .filter((x) => hexToBigInt(x) !== 0n) - .sort((a, b) => { - const bigintA = hexToBigInt(a); - const bigintB = hexToBigInt(b); - - return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0; - }); - - return concatHex([ - factoryAddress, - encodeFunctionData({ - abi: MultisigModularAccountFactoryAbi, - functionName: "createAccount", - args: [salt, sigs_, threshold], - }), - ]); - }; - - const accountAddress = await getAccountAddress({ - client, - entryPoint, - accountAddress: accountAddress_, - getAccountInitCode, - }); - - const baseAccount = await toSmartContractAccount({ - transport, - chain, - entryPoint, - accountAddress, - source: MULTISIG_ACCOUNT_SOURCE, - getAccountInitCode, - ...standardExecutor, - ...multisigSignMethods({ - client, - accountAddress, - threshold, - signer: () => signer, - }), - }); - - return { - ...baseAccount, - getLocalThreshold: () => threshold, - publicKey: await signer.getAddress(), - getSigner: () => signer, - }; -} - -export const isMultisigModularAccount = ( - acct: SmartContractAccount, -): acct is MultisigModularAccount => { - return acct.source === MULTISIG_ACCOUNT_SOURCE; -}; diff --git a/account-kit/smart-contracts/src/msca/account/standardExecutor.ts b/account-kit/smart-contracts/src/msca/account/standardExecutor.ts deleted file mode 100644 index d96b51225a..0000000000 --- a/account-kit/smart-contracts/src/msca/account/standardExecutor.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { SmartContractAccount } from "@aa-sdk/core"; -import { encodeFunctionData } from "viem"; -import { IStandardExecutorAbi } from "../abis/IStandardExecutor.js"; - -export const standardExecutor: Pick< - SmartContractAccount, - "encodeExecute" | "encodeBatchExecute" -> = { - encodeExecute: async ({ target, data, value }) => { - return encodeFunctionData({ - abi: IStandardExecutorAbi, - functionName: "execute", - args: [target, value ?? 0n, data], - }); - }, - encodeBatchExecute: async (txs) => { - return encodeFunctionData({ - abi: IStandardExecutorAbi, - functionName: "executeBatch", - args: [ - txs.map((tx) => ({ - target: tx.target, - data: tx.data, - value: tx.value ?? 0n, - })), - ], - }); - }, -}; diff --git a/account-kit/smart-contracts/src/msca/client/alchemyClient.ts b/account-kit/smart-contracts/src/msca/client/alchemyClient.ts deleted file mode 100644 index 1415bc970e..0000000000 --- a/account-kit/smart-contracts/src/msca/client/alchemyClient.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { SmartAccountSigner } from "@aa-sdk/core"; -import { - type AlchemySmartAccountClient, - type AlchemySmartAccountClientConfig, -} from "@account-kit/infra"; -import { - createMultiOwnerModularAccountClient, - type AccountLoupeActions, - type CreateMultiOwnerModularAccountParams, - type LightAccount, - type MultiOwnerModularAccount, - type MultiOwnerPluginActions, - type PluginManagerActions, -} from "@account-kit/smart-contracts"; -import { type Chain, type HttpTransport } from "viem"; - -export type AlchemyModularAccountClientConfig< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Omit< - CreateMultiOwnerModularAccountParams, - "transport" -> & - Omit< - AlchemySmartAccountClientConfig>, - "account" - >; - -export function createModularAccountAlchemyClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyModularAccountClientConfig, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - MultiOwnerModularAccount, - MultiOwnerPluginActions> & - PluginManagerActions> & - AccountLoupeActions> - > ->; - -/** - * Creates a modular account Alchemy client with the provided configuration. - * - * @example - * ```ts - * import { createModularAccountAlchemyClient } from "@account-kit/smart-contracts"; - * import { sepolia, alchemy } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const alchemyAccountClient = await createModularAccountAlchemyClient({ - * transport: alchemy({ apiKey: "your-api-key" }), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * @deprecated Use createModularAccountClient instead of this function, we are switching based on the transport - * @param {AlchemyModularAccountClientConfig} config The configuration for creating the Alchemy client - * @returns {Promise} A promise that resolves to an `AlchemySmartAccountClient` configured with the desired plugins and actions - */ -export async function createModularAccountAlchemyClient( - config: AlchemyModularAccountClientConfig, -): Promise { - return createMultiOwnerModularAccountClient(config); -} diff --git a/account-kit/smart-contracts/src/msca/client/client.test.ts b/account-kit/smart-contracts/src/msca/client/client.test.ts deleted file mode 100644 index fd22041f4a..0000000000 --- a/account-kit/smart-contracts/src/msca/client/client.test.ts +++ /dev/null @@ -1,460 +0,0 @@ -import { - erc7677Middleware, - LocalAccountSigner, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { - alchemyFeeEstimator, - alchemyGasAndPaymasterAndDataMiddleware, -} from "@account-kit/infra"; -import { type Address, custom, parseEther } from "viem"; -import { setBalance } from "viem/actions"; -import { local060Instance } from "~test/instances.js"; -import { createMultisigModularAccountClient } from "../client/client.js"; -import { createMultiOwnerModularAccountClient } from "./client.js"; - -describe("Modular Account Multi Owner Account Tests", async () => { - const instance = local060Instance; - const MODULAR_MULTIOWNER_ACCOUNT_OWNER_MNEMONIC = - "indoor dish desk flag debris potato excuse depart ticket judge file exit"; - - const signer1 = LocalAccountSigner.mnemonicToAccountSigner( - MODULAR_MULTIOWNER_ACCOUNT_OWNER_MNEMONIC, - { accountIndex: 0 }, - ); - - const signer2 = LocalAccountSigner.mnemonicToAccountSigner( - MODULAR_MULTIOWNER_ACCOUNT_OWNER_MNEMONIC, - { accountIndex: 1 }, - ); - - const owners = [await signer1.getAddress(), await signer2.getAddress()]; - - it("should successfully get counterfactual address", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - owners, - }); - expect(provider.getAddress()).toMatchInlineSnapshot( - `"0xE599B1c2cecFbAa007Bea0e6FBeD1dc1757fDd89"`, - ); - }); - - it("should execute successfully using the first signer", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - owners, - }); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("1"), - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - const txnHash = provider - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: result.request, - }, - ); - return await provider.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should execute successfully using the second signer", async () => { - const provider = await givenConnectedProvider({ - signer: signer2, - owners, - }); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("1"), - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - const txnHash = provider - .waitForUserOperationTransaction(result) - .catch(async () => { - const dropAndReplaceResult = await provider.dropAndReplaceUserOperation( - { - uoToDrop: result.request, - }, - ); - return await provider.waitForUserOperationTransaction( - dropAndReplaceResult, - ); - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should fail to execute if account address is not deployed and not correct", async () => { - const accountAddress = "0xc33AbD9621834CA7c6Fc9f9CC3c47b9c17B03f9F"; - const provider = await givenConnectedProvider({ - signer: signer1, - accountAddress, - owners, - }); - - const result = provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - await expect(result).rejects.toThrowError(); - }); - - it("should successfully execute with paymaster using erc-7677 middleware", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - owners, - paymasterMiddleware: "erc7677", - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - const txnHash = provider.waitForUserOperationTransaction(result); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should successfully execute with paymaster using alchemy paymaster middleware", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - owners, - paymasterMiddleware: "alchemyGasAndPaymasterAndData", - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - const txnHash = provider.waitForUserOperationTransaction(result); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should successfully override fees and gas when using paymaster with erc-7677 middleware", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - owners, - paymasterMiddleware: "erc7677", - }); - - await expect( - provider - .buildUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - overrides: { - maxFeePerGas: 1n, - maxPriorityFeePerGas: 1n, - callGasLimit: 1n, - verificationGasLimit: 1n, - preVerificationGas: 1n, - }, - }) - .then( - ({ - maxFeePerGas, - maxPriorityFeePerGas, - callGasLimit, - verificationGasLimit, - preVerificationGas, - }) => ({ - maxFeePerGas, - maxPriorityFeePerGas, - callGasLimit, - verificationGasLimit, - preVerificationGas, - }), - ), - ).resolves.toMatchInlineSnapshot(` - { - "callGasLimit": 1n, - "maxFeePerGas": 1n, - "maxPriorityFeePerGas": 1n, - "preVerificationGas": 1n, - "verificationGasLimit": 1n, - } - `); - }, 100000); - - it("should successfully override fees and gas when using paymaster with alchemy paymaster middleware", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - owners, - paymasterMiddleware: "alchemyGasAndPaymasterAndData", - }); - - await expect( - provider - .buildUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - overrides: { - maxFeePerGas: 1n, - maxPriorityFeePerGas: 1n, - callGasLimit: 1n, - verificationGasLimit: 1n, - preVerificationGas: 1n, - }, - }) - .then( - ({ - maxFeePerGas, - maxPriorityFeePerGas, - callGasLimit, - verificationGasLimit, - preVerificationGas, - }) => ({ - maxFeePerGas, - maxPriorityFeePerGas, - callGasLimit, - verificationGasLimit, - preVerificationGas, - }), - ), - ).resolves.toMatchInlineSnapshot(` - { - "callGasLimit": "0x1", - "maxFeePerGas": "0x1", - "maxPriorityFeePerGas": "0x1", - "preVerificationGas": "0x1", - "verificationGasLimit": "0x1", - } - `); - }, 100000); - - it("should get the implementation address correctly", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - owners, - paymasterMiddleware: "erc7677", - salt: 1n, // different salt to avoid shared state with the other tests - }); - - const implementationAddressPreDeploy = - await provider.account.getImplementationAddress(); - - expect(implementationAddressPreDeploy).toEqual( - "0x0000000000000000000000000000000000000000", - ); - - await setBalance(instance.getClient(), { - address: provider.getAddress(), - value: parseEther("1"), - }); - - const result = await provider.sendUserOperation({ - uo: { - target: provider.getAddress(), - data: "0x", - }, - }); - - const txnHash = provider.waitForUserOperationTransaction(result); - - await expect(txnHash).resolves.not.toThrowError(); - - const implementationAddressPostDeploy = - await provider.account.getImplementationAddress(); - - expect(implementationAddressPostDeploy).toEqual( - "0x0046000000000151008789797b54fdb500e2a61e", - ); - }, 200000); - - it("should test 1/1 multisig", async () => { - const client1 = await createMultisigModularAccountClient({ - chain: instance.chain, - transport: custom(instance.getClient()), - signer: signer1, - owners: [await signer1.getAddress(), await signer2.getAddress()], - threshold: 1n, - }); - - await setBalance(instance.getClient(), { - address: client1.getAddress(), - value: parseEther("1"), - }); - - const result = await client1.sendUserOperation({ - uo: { - target: client1.getAddress(), - data: "0x", - }, - context: { - userOpSignatureType: "ACTUAL", - }, - }); - - await client1.waitForUserOperationTransaction(result); - }); - - it("should test 2/2 multisig", async () => { - const client = await createMultisigModularAccountClient({ - chain: instance.chain, - transport: custom(instance.getClient()), - signer: signer1, - owners: [await signer1.getAddress(), await signer2.getAddress()], - threshold: 2n, - }); - - const client2 = await createMultisigModularAccountClient({ - chain: instance.chain, - accountAddress: client.getAddress(), - transport: custom(instance.getClient()), - signer: signer2, - owners: [await signer1.getAddress(), await signer2.getAddress()], - threshold: 2n, - }); - - await setBalance(instance.getClient(), { - address: client.getAddress(), - value: parseEther("1"), - }); - - const { aggregatedSignature, signatureObj } = - await client.proposeUserOperation({ - uo: { - target: client.getAddress(), - data: "0x", - }, - }); - - const result = await client2.sendUserOperation({ - uo: { - target: client.getAddress(), - data: "0x", - }, - context: { - aggregatedSignature, - signatures: [signatureObj], - userOpSignatureType: "ACTUAL", - }, - }); - - await client2.waitForUserOperationTransaction(result); - }); - - it("should test 3/3 multisig", async () => { - const signers = Array.from({ length: 3 }).map((_, i) => - LocalAccountSigner.mnemonicToAccountSigner( - MODULAR_MULTIOWNER_ACCOUNT_OWNER_MNEMONIC, - { accountIndex: i }, - ), - ); - - const clients = await Promise.all( - signers.map(async (s) => { - return createMultisigModularAccountClient({ - chain: instance.chain, - transport: custom(instance.getClient()), - signer: s, - owners: await Promise.all(signers.map((s) => s.getAddress())), - threshold: 3n, - }); - }), - ); - - await setBalance(instance.getClient(), { - address: clients[0].getAddress(), - value: parseEther("1"), - }); - - const { request, signatureObj: signature1 } = - await clients[0].proposeUserOperation({ - uo: { - target: clients[0].getAddress(), - data: "0x", - }, - }); - const { aggregatedSignature, signatureObj: signature2 } = - await clients[1].signMultisigUserOperation({ - account: clients[1].account, - signatures: [signature1], - userOperationRequest: request, - }); - const result = await clients[2].sendUserOperation({ - uo: request.callData, - overrides: { - callGasLimit: request.callGasLimit, - verificationGasLimit: request.verificationGasLimit, - }, - context: { - aggregatedSignature, - signatures: [signature1, signature2], - userOpSignatureType: "ACTUAL", - }, - }); - await clients[2].waitForUserOperationTransaction(result); - }); - - const givenConnectedProvider = ({ - signer, - accountAddress, - owners, - paymasterMiddleware, - salt = 0n, - }: { - signer: SmartAccountSigner; - owners: Address[]; - paymasterMiddleware?: "alchemyGasAndPaymasterAndData" | "erc7677"; - accountAddress?: Address; - salt?: bigint; - }) => - createMultiOwnerModularAccountClient({ - signer, - accountAddress, - owners, - salt, - transport: custom(instance.getClient()), - chain: instance.chain, - feeEstimator: alchemyFeeEstimator( - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - custom(instance.getClient()), - ), - ...(paymasterMiddleware === "alchemyGasAndPaymasterAndData" - ? alchemyGasAndPaymasterAndDataMiddleware({ - policyId: "FAKE_POLICY_ID", - // @ts-ignore (expects an alchemy transport, but we're using a custom transport for mocking) - transport: custom(instance.getClient()), - }) - : paymasterMiddleware === "erc7677" - ? erc7677Middleware() - : {}), - }); -}); diff --git a/account-kit/smart-contracts/src/msca/client/client.ts b/account-kit/smart-contracts/src/msca/client/client.ts deleted file mode 100644 index 08e57aab65..0000000000 --- a/account-kit/smart-contracts/src/msca/client/client.ts +++ /dev/null @@ -1,336 +0,0 @@ -import { - createSmartAccountClient, - smartAccountClientActions, - type NotType, - type SmartAccountClient, - type SmartAccountClientRpcSchema, - type SmartAccountSigner, -} from "@aa-sdk/core"; -import { type Chain, type CustomTransport, type Transport } from "viem"; -import type { CreateLightAccountClientParams } from "../../light-account/clients/client.js"; -import { - accountLoupeActions, - type AccountLoupeActions, -} from "../account-loupe/decorator.js"; -import { - createMultiOwnerModularAccount, - type CreateMultiOwnerModularAccountParams, - type MultiOwnerModularAccount, -} from "../account/multiOwnerAccount.js"; -import { - createMultisigModularAccount, - type CreateMultisigModularAccountParams, - type MultisigModularAccount, -} from "../account/multisigAccount.js"; -import { - pluginManagerActions, - type PluginManagerActions, -} from "../plugin-manager/decorator.js"; -import { - multiOwnerPluginActions, - type MultiOwnerPluginActions, -} from "../plugins/multi-owner/index.js"; -import { - multisigPluginActions, - type MultisigPluginActions, - type MultisigUserOperationContext, -} from "../plugins/multisig/index.js"; -import { multisigSignatureMiddleware } from "../plugins/multisig/middleware.js"; -import type { AlchemyModularAccountClientConfig } from "./alchemyClient.js"; -import { - createAlchemySmartAccountClient, - isAlchemyTransport, - type AlchemySmartAccountClient, - type AlchemyTransport, -} from "@account-kit/infra"; -import type { AlchemyMultisigAccountClientConfig } from "./multiSigAlchemyClient.js"; - -export type CreateMultiOwnerModularAccountClientWithoutAlchemyParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Omit< - CreateMultiOwnerModularAccountParams, - "transport" | "chain" -> & - Omit, "account">; -export type CreateMultiOwnerModularAccountClientParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = - | CreateMultiOwnerModularAccountClientWithoutAlchemyParams< - TTransport, - TChain, - TSigner - > - | AlchemyModularAccountClientConfig; - -export type CreateMultisigModularAccountClientWithoutAlchemyParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Omit< - CreateMultisigModularAccountParams, - "transport" | "chain" -> & - Omit, "account">; - -export type CreateMultisigModularAccountClientParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = - | CreateMultisigModularAccountClientWithoutAlchemyParams< - TTransport, - TChain, - TSigner - > - | AlchemyMultisigAccountClientConfig; - -export function createMultiOwnerModularAccountClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyModularAccountClientConfig & { - transport: AlchemyTransport; - }, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - MultiOwnerModularAccount, - MultiOwnerPluginActions> & - PluginManagerActions> & - AccountLoupeActions> - > ->; - -export function createMultiOwnerModularAccountClient< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - args: CreateMultiOwnerModularAccountClientParams< - TTransport, - TChain, - TSigner - > & - NotType, -): Promise< - SmartAccountClient< - CustomTransport, - Chain, - MultiOwnerModularAccount, - MultiOwnerPluginActions> & - PluginManagerActions> & - AccountLoupeActions> - > ->; - -/** - * Creates a multi-owner modular account client with the provided parameters including account, transport, chain, and additional client configuration. This function uses a modular account and extends it with various plugin actions. - * - * @example - * ```ts - * import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http } from "viem"; - * import { generatePrivateKey } from "viem/accounts"; - * - * const accountClient = await createMultiOwnerModularAccountClient({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * @example - * ```ts - * import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts"; - * import { sepolia, alchemy } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const alchemyAccountClient = await createMultiOwnerModularAccountClient({ - * transport: alchemy({ apiKey: "your-api-key" }), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) - * }); - * ``` - * - * @param {CreateMultiOwnerModularAccountClientParams} config The parameters for creating the multi-owner modular account client - * @returns {Promise} A promise that resolves to a `SmartAccountClient` instance with extended plugin actions - */ -export async function createMultiOwnerModularAccountClient({ - transport, - chain, - ...params -}: CreateMultiOwnerModularAccountClientParams): Promise< - SmartAccountClient | AlchemySmartAccountClient -> { - const modularAccount = await createMultiOwnerModularAccount({ - ...params, - transport, - chain, - }); - if (isAlchemyTransport(transport, chain)) { - const { opts } = params; - - return createAlchemySmartAccountClient({ - ...params, - account: modularAccount, - transport, - chain, - opts, - }) - .extend(multiOwnerPluginActions) - .extend(pluginManagerActions) - .extend(accountLoupeActions); - } - - return createSmartAccountClient({ - ...params, - transport, - chain, - account: modularAccount, - }) - .extend(pluginManagerActions) - .extend(multiOwnerPluginActions) - .extend(accountLoupeActions); -} - -export function createMultisigModularAccountClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyMultisigAccountClientConfig, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - MultisigModularAccount, - MultisigPluginActions> & - PluginManagerActions> & - AccountLoupeActions>, - MultisigUserOperationContext - > ->; - -export function createMultisigModularAccountClient< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - args: CreateMultisigModularAccountClientParams & - NotType, -): Promise< - SmartAccountClient< - CustomTransport, - Chain, - MultisigModularAccount, - MultisigPluginActions> & - PluginManagerActions> & - AccountLoupeActions>, - SmartAccountClientRpcSchema, - MultisigUserOperationContext - > ->; - -/** - * Creates a multisig modular account client using the provided parameters including account details, transport, chain, and additional client configuration. This function constructs the multisig modular account and extends it with various actions to create a comprehensive client. - * - * @example - * ```ts - * import { createMultisigModularAccountClient } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { sepolia } from "viem/chains"; - * import { http } from "viem" - * import { generatePrivateKey } from "viem/accounts"; - * - * const accountClient = await createMultisigModularAccountClient({ - * chain: sepolia, - * transport: http("RPC_URL"), - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), - * owners: [], // other owners on the account - * threshold: 2, // 2 of N signatures - * }); - * ``` - * @example - * ```ts - * import { createMultisigModularAccountClient } from "@account-kit/smart-contracts"; - * import { sepolia } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const alchemyAccountClient = await createMultisigModularAccountClient({ - * transport: alchemy({ apiKey: "your-api-key" }), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), - * owners: [...], // other owners on the account - * threshold: 2, // 2 of N signatures - * }); - * ``` - * - * @param {CreateMultisigModularAccountClientParams} config the parameters for configuring the multisig modular account client - * @returns {Promise, {}, SmartAccountClientRpcSchema, MultisigUserOperationContext>>} a promise that resolves to a `SmartAccountClient` object extended with the multisig modular account and additional actions - */ -export async function createMultisigModularAccountClient({ - transport, - chain, - ...params -}: CreateMultisigModularAccountClientParams): Promise< - | SmartAccountClient< - Transport, - Chain, - MultisigModularAccount, - {}, - SmartAccountClientRpcSchema, - MultisigUserOperationContext - > - | AlchemySmartAccountClient< - Chain | undefined, - MultisigModularAccount, - MultisigPluginActions> & - PluginManagerActions> & - AccountLoupeActions>, - MultisigUserOperationContext - > -> { - const modularAccount = await createMultisigModularAccount({ - ...params, - transport, - chain, - }); - if (isAlchemyTransport(transport, chain)) { - // Need to fit the type into this since the previous multiSigAlchemyClient had it at this point, but without an Value as Type should be safe - // And the createAlchemySmartAccountClient signUserOperation could not infer without this - let config: AlchemyMultisigAccountClientConfig = { - ...params, - chain, - transport, - }; - const { opts } = config; - - return createAlchemySmartAccountClient({ - ...config, - account: modularAccount, - opts, - signUserOperation: multisigSignatureMiddleware, - }) - .extend(smartAccountClientActions) - .extend(multisigPluginActions) - .extend(pluginManagerActions) - .extend(accountLoupeActions); - } - - const client = createSmartAccountClient({ - ...params, - transport, - chain, - account: modularAccount, - signUserOperation: multisigSignatureMiddleware, - }) - .extend(smartAccountClientActions) - .extend(pluginManagerActions) - .extend(multisigPluginActions) - .extend(accountLoupeActions); - - return client; -} diff --git a/account-kit/smart-contracts/src/msca/client/multiSigAlchemyClient.ts b/account-kit/smart-contracts/src/msca/client/multiSigAlchemyClient.ts deleted file mode 100644 index a8b261c2a1..0000000000 --- a/account-kit/smart-contracts/src/msca/client/multiSigAlchemyClient.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { type SmartAccountSigner } from "@aa-sdk/core"; -import { - type AlchemySmartAccountClient, - type AlchemySmartAccountClientConfig, - type AlchemyTransport, -} from "@account-kit/infra"; -import { - createMultisigModularAccountClient, - type AccountLoupeActions, - type CreateMultisigModularAccountParams, - type LightAccount, - type MultisigModularAccount, - type MultisigPluginActions, - type MultisigUserOperationContext, - type PluginManagerActions, -} from "@account-kit/smart-contracts"; -import { type Chain, type HttpTransport } from "viem"; - -// todo: this file seems somewhat duplicated with ./modularAccountClient.ts, but that file has some multi-owner specific fields. Is there a way to refactor these two to de-dupe? - -export type AlchemyMultisigAccountClientConfig< - TSigner extends SmartAccountSigner = SmartAccountSigner, -> = Omit< - CreateMultisigModularAccountParams, - "transport" -> & - Omit< - AlchemySmartAccountClientConfig< - Chain, - LightAccount, - MultisigUserOperationContext - >, - "account" - > & { transport: AlchemyTransport }; - -export function createMultisigAccountAlchemyClient< - TSigner extends SmartAccountSigner = SmartAccountSigner, ->( - params: AlchemyMultisigAccountClientConfig, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - MultisigModularAccount, - MultisigPluginActions> & - PluginManagerActions> & - AccountLoupeActions>, - MultisigUserOperationContext - > ->; - -/** - * Creates an Alchemy client for a multisig account using the provided configuration. - * - * @example - * ```ts - * import { createMultisigAccountAlchemyClient } from "@account-kit/smart-contracts"; - * import { sepolia } from "@account-kit/infra"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { generatePrivateKey } from "viem" - * - * const alchemyAccountClient = await createMultisigAccountAlchemyClient({ - * transport: alchemy({ apiKey: "your-api-key" }), - * chain: sepolia, - * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), - * owners: [...], // other owners on the account - * threshold: 2, // 2 of N signatures - * }); - * ``` - * - * @deprecated Use createModularAccountClient instead of this function, we are switching based on the transport - * @param {AlchemyMultisigAccountClientConfig} config The configuration for the Alchemy multisig account client - * @returns {Promise, MultisigPluginActions> & PluginManagerActions> & AccountLoupeActions>, MultisigUserOperationContext>>} A promise that resolves to an Alchemy Smart Account Client for multisig accounts with extended functionalities. - */ -export async function createMultisigAccountAlchemyClient( - config: AlchemyMultisigAccountClientConfig, -): Promise< - AlchemySmartAccountClient< - Chain | undefined, - MultisigModularAccount, - MultisigPluginActions> & - PluginManagerActions> & - AccountLoupeActions>, - MultisigUserOperationContext - > -> { - return createMultisigModularAccountClient(config); -} diff --git a/account-kit/smart-contracts/src/msca/e2e-tests/constants.ts b/account-kit/smart-contracts/src/msca/e2e-tests/constants.ts deleted file mode 100644 index 980af6fb27..0000000000 --- a/account-kit/smart-contracts/src/msca/e2e-tests/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const API_KEY = process.env.API_KEY!; -export const PAYMASTER_POLICY_ID = process.env.PAYMASTER_POLICY_ID!; -export const OWNER_MNEMONIC = process.env.OWNER_MNEMONIC!; diff --git a/account-kit/smart-contracts/src/msca/e2e-tests/multisig-modular-account.e2e.test.ts b/account-kit/smart-contracts/src/msca/e2e-tests/multisig-modular-account.e2e.test.ts deleted file mode 100644 index ac127121d9..0000000000 --- a/account-kit/smart-contracts/src/msca/e2e-tests/multisig-modular-account.e2e.test.ts +++ /dev/null @@ -1,615 +0,0 @@ -import { - LocalAccountSigner, - LogLevel, - Logger, - parseFactoryAddressFromAccountInitCode, - sepolia, - wrapSignatureWith6492, - type SmartAccountSigner, - type UserOperationFeeOptions, -} from "@aa-sdk/core"; -import { - createPublicClient, - fromHex, - http, - pad, - type Address, - type Chain, - type HDAccount, -} from "viem"; -import { createMultisigModularAccountClient } from "../client/client.js"; -import { formatSignatures } from "../plugins/multisig/utils/index.js"; -import { API_KEY, OWNER_MNEMONIC } from "./constants.js"; - -const chain = sepolia; - -Logger.setLogLevel(LogLevel.DEBUG); - -describe("Multisig Modular Account Tests", async () => { - const signer1: SmartAccountSigner = - LocalAccountSigner.mnemonicToAccountSigner(OWNER_MNEMONIC, { - accountIndex: 0, - }); - - const signer2: SmartAccountSigner = - LocalAccountSigner.mnemonicToAccountSigner(OWNER_MNEMONIC, { - accountIndex: 1, - }); - - const signer3: SmartAccountSigner = - LocalAccountSigner.mnemonicToAccountSigner(OWNER_MNEMONIC, { - accountIndex: 2, - }); - - const threshold = 2n; - - const owners = [ - await signer1.getAddress(), - await signer2.getAddress(), - await signer3.getAddress(), - ]; - - it("should successfully get counterfactual address", async () => { - const { - account: { address }, - } = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - expect(address).toMatchInlineSnapshot( - '"0xB717003B9777B894000B89d60B179FDA96a655D3"', - ); - }); - - it("should get on-chain owner address successfully", async () => { - const provider = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - - expect((await provider.readOwners()).slice().sort()).toStrictEqual( - owners.slice().sort(), - ); - - expect(await provider.getThreshold({})).toBe(threshold); - }); - - it("should correctly verify 1271 signatures over messages", async () => { - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold, - }); - const message = "test"; - - const signature1 = await provider1.account.signMessage({ message }); - - const signature2 = await provider2.account.signMessage({ message }); - - const combined = formatSignatures( - [ - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature1, - signer: await signer1.getAddress(), - }, - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature2, - signer: await signer2.getAddress(), - }, - ], - true, - ); - - expect( - await provider1.verifyMessage({ - address: provider1.getAddress(), - message, - signature: combined, - }), - ).toBe(true); - }); - - it("should correctly verify 1271 signatures over typed data", async () => { - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold, - }); - - const types = { - Request: [{ name: "hello", type: "string" }], - }; - - const primaryType = "Request"; - - const message = { - hello: "world", - }; - - const signature1 = await provider1.account.signTypedDataWith6492({ - types, - primaryType, - message, - }); - - const signature2 = await provider2.account.signTypedDataWith6492({ - types, - primaryType, - message, - }); - - const combined = formatSignatures( - [ - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature1, - signer: await signer1.getAddress(), - }, - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature2, - signer: await signer2.getAddress(), - }, - ], - true, - ); - - expect( - await provider1.verifyTypedData({ - address: provider1.getAddress(), - types, - primaryType, - message, - signature: combined, - }), - ).toBe(true); - }); - - it("should correctly sign and verify 6492 signatures over messages for an undeployed account", async () => { - // Add a fourth signer to change the counterfactual (not yet deployed) - - const signer4: SmartAccountSigner = - LocalAccountSigner.mnemonicToAccountSigner(OWNER_MNEMONIC, { - accountIndex: 3, - }); - - const moreOwners = [...owners, await signer4.getAddress()]; - - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners: moreOwners, - threshold, - }); - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners: moreOwners, - threshold, - }); - - const { - account: { address }, - } = provider1; - expect(address).toMatchInlineSnapshot( - '"0xD605446440A7d09772C909263823189377A503Da"', - ); - - const message = "test"; - - const signature1 = await provider1.account.signMessage({ message }); - - const signature2 = await provider2.account.signMessage({ message }); - - const combined = formatSignatures( - [ - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature1, - signer: await signer1.getAddress(), - }, - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature2, - signer: await signer2.getAddress(), - }, - ], - true, - ); - - const [, factoryCalldata] = parseFactoryAddressFromAccountInitCode( - await provider1.account.getInitCode(), - ); - - const wrappedSig = wrapSignatureWith6492({ - factoryAddress: await provider1.account.getFactoryAddress(), - factoryCalldata, - signature: combined, - }); - - // todo: can we override verifyMessage & verifyTypedData to internally only use the public client, to prevent the EIP-684 issue? - const publicClient = createPublicClient({ - transport: http(`${chain.rpcUrls.alchemy.http[0]}/${API_KEY!}`), - chain, - }); - - expect( - await publicClient.verifyMessage({ - address: provider1.getAddress(), - message, - signature: wrappedSig, - }), - ).toBe(true); - }); - - it("should correctly sign and verify 6492 signatures over typed data for an undeployed account", async () => { - // Add a fourth signer to change the counterfactual (not yet deployed) - - const signer4: SmartAccountSigner = - LocalAccountSigner.mnemonicToAccountSigner(OWNER_MNEMONIC, { - accountIndex: 3, - }); - - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners: [...owners, await signer4.getAddress()], - threshold, - }); - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners: [...owners, await signer4.getAddress()], - threshold, - }); - - const { - account: { address }, - } = provider1; - expect(address).toMatchInlineSnapshot( - '"0xD605446440A7d09772C909263823189377A503Da"', - ); - - const types = { - Request: [{ name: "hello", type: "string" }], - }; - - const primaryType = "Request"; - - const message = { - hello: "world", - }; - - const signature1 = await provider1.account.signTypedData({ - types, - primaryType, - message, - }); - - const signature2 = await provider2.account.signTypedData({ - types, - primaryType, - message, - }); - - const combined = formatSignatures( - [ - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature1, - signer: await signer1.getAddress(), - }, - { - userOpSigType: "ACTUAL", - signerType: "EOA", - signature: signature2, - signer: await signer2.getAddress(), - }, - ], - true, - ); - - const [, factoryCalldata] = parseFactoryAddressFromAccountInitCode( - await provider1.account.getInitCode(), - ); - - const wrappedSig = wrapSignatureWith6492({ - factoryAddress: await provider1.account.getFactoryAddress(), - factoryCalldata, - signature: combined, - }); - - // todo: can we override verifyMessage & verifyTypedData to internally only use the public client, to prevent the EIP-684 issue? - const publicClient = createPublicClient({ - transport: http(`${chain.rpcUrls.alchemy.http[0]}/${API_KEY!}`), - chain, - }); - - expect( - await publicClient.verifyTypedData({ - address: provider1.getAddress(), - types, - primaryType, - message, - signature: wrappedSig, - }), - ).toBe(true); - }); - - it("should execute successfully", async () => { - const initiator = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - - const submitter = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold, - }); - - expect(initiator.getAddress()).toBe(submitter.getAddress()); - - const { aggregatedSignature, signatureObj } = - await initiator.proposeUserOperation({ - uo: { - target: initiator.getAddress(), - data: "0x", - }, - }); - - const result = await submitter.sendUserOperation({ - uo: { - target: initiator.getAddress(), - data: "0x", - }, - context: { - aggregatedSignature: aggregatedSignature, - signatures: [signatureObj], - userOpSignatureType: "ACTUAL", - }, - }); - - const txnHash = submitter.waitForUserOperationTransaction({ - hash: result.hash, - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should execute successfully when using sendTransaction", async () => { - const initiator = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - - const submitter = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold, - }); - - expect(initiator.getAddress()).toBe(submitter.getAddress()); - - const { aggregatedSignature, signatureObj } = - await initiator.proposeUserOperation({ - uo: { - target: initiator.getAddress(), - data: "0x", - }, - }); - - const result = submitter.sendTransaction( - { - to: initiator.getAddress(), - data: "0x", - }, - undefined, - { - aggregatedSignature: aggregatedSignature, - signatures: [signatureObj], - userOpSignatureType: "ACTUAL", - }, - ); - - await expect(result).resolves.not.toThrowError(); - }, 100000); - - it("should execute successfully with actual gas values equal to max gas values", async () => { - const initiator = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold, - }); - - const submitter = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold, - }); - - expect(initiator.getAddress()).toBe(submitter.getAddress()); - - const { - aggregatedSignature, - request: userOpReq, - signatureObj, - } = await initiator.proposeUserOperation({ - uo: { - target: initiator.getAddress(), - data: "0x", - }, - overrides: { - maxFeePerGas: { multiplier: 2 }, - maxPriorityFeePerGas: { multiplier: 3 }, - preVerificationGas: { multiplier: 1.5 }, - }, - }); - - const result = await submitter.sendUserOperation({ - uo: { - target: initiator.getAddress(), - data: "0x", - }, - context: { - signatures: [signatureObj], - aggregatedSignature, - userOpSignatureType: "ACTUAL", - }, - overrides: { - callGasLimit: userOpReq.callGasLimit, - verificationGasLimit: userOpReq.verificationGasLimit, - preVerificationGas: userOpReq.preVerificationGas, - maxFeePerGas: userOpReq.maxFeePerGas, - maxPriorityFeePerGas: userOpReq.maxPriorityFeePerGas, - }, - }); - - const txnHash = submitter.waitForUserOperationTransaction({ - hash: result.hash, - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); - - it("should execute successfully with 3/3 signers", async () => { - const higherThreshold = 3n; - - const provider1 = await givenConnectedProvider({ - signer: signer1, - chain, - owners, - threshold: higherThreshold, - }); - const provider2 = await givenConnectedProvider({ - signer: signer2, - chain, - owners, - threshold: higherThreshold, - }); - const provider3 = await givenConnectedProvider({ - signer: signer3, - chain, - owners, - threshold: higherThreshold, - }); - - const { - account: { address }, - } = provider1; - expect(address).toMatchInlineSnapshot( - '"0xF2dBBB10E1a7406B17B0056357132B0702e184D5"', - ); - - const { request, signatureObj: signature1 } = - await provider1.proposeUserOperation({ - uo: { - target: provider1.getAddress(), - data: "0x", - }, - }); - - const { aggregatedSignature, signatureObj: signature2 } = - await provider2.signMultisigUserOperation({ - account: provider2.account, - signatures: [signature1], - userOperationRequest: request, - }); - - // parse the UO request fields into the override format to send to sendUserOperation - // todo: helper function to go from UserOperationRequest to SendUserOperationParams? - - const result = await provider3.sendUserOperation({ - uo: request.callData, - overrides: { - callGasLimit: request.callGasLimit, - verificationGasLimit: request.verificationGasLimit, - nonceKey: fromHex(`0x${pad(request.nonce).slice(2, 26)}`, "bigint"), // Nonce key is the first 24 bytes of the nonce - }, - context: { - aggregatedSignature, - signatures: [signature1, signature2], - userOpSignatureType: "ACTUAL", - }, - }); - - const txnHash = provider3.waitForUserOperationTransaction({ - hash: result.hash, - }); - - await expect(txnHash).resolves.not.toThrowError(); - }, 100000); -}); - -const givenConnectedProvider = async ({ - signer, - chain, - accountAddress, - feeOptions, - owners, - threshold, -}: { - signer: SmartAccountSigner; - chain: Chain; - accountAddress?: Address; - feeOptions?: UserOperationFeeOptions; - owners: Address[]; - threshold: bigint; -}) => { - return createMultisigModularAccountClient({ - transport: http(`${chain.rpcUrls.alchemy.http[0]}/${API_KEY!}`, { - retryCount: 0, - }), - chain: chain, - account: { - signer, - accountAddress, - owners, - threshold, - }, - opts: { - feeOptions: { - ...feeOptions, - maxFeePerGas: { multiplier: 1.5 }, - maxPriorityFeePerGas: { multiplier: 1.5 }, - preVerificationGas: { multiplier: 1.5 }, - }, - txMaxRetries: 100, - }, - }); -}; diff --git a/account-kit/smart-contracts/src/msca/errors.ts b/account-kit/smart-contracts/src/msca/errors.ts deleted file mode 100644 index f8d9accb72..0000000000 --- a/account-kit/smart-contracts/src/msca/errors.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { BaseError } from "@aa-sdk/core"; - -/** - * Error thrown when the aggregated signature is invalid - */ -export class InvalidAggregatedSignatureError extends BaseError { - override name = "InvalidAggregatedSignatureError"; - constructor() { - super("Invalid aggregated signature"); - } -} - -/** - * Error thrown when the context signature is invalid - */ -export class InvalidContextSignatureError extends BaseError { - override name = "InvalidContextSignatureError"; - constructor() { - super("Expected context.signature to be a hex string"); - } -} - -/** - * Error thrown when the expected account is not a multisig modular account - */ -export class MultisigAccountExpectedError extends BaseError { - override name = "MultisigAccountExpectedError"; - constructor() { - super("Expected account to be a multisig modular account"); - } -} - -/** - * Error thrown when a multisig user op is missing a signature - */ -export class MultisigMissingSignatureError extends BaseError { - override name = "MultisigMissingSignatureError"; - constructor() { - super("UserOp must have at least one signature already"); - } -} diff --git a/account-kit/smart-contracts/src/msca/plugin-manager/decorator.ts b/account-kit/smart-contracts/src/msca/plugin-manager/decorator.ts deleted file mode 100644 index 391ae98d9f..0000000000 --- a/account-kit/smart-contracts/src/msca/plugin-manager/decorator.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { - GetEntryPointFromAccount, - SendUserOperationResult, - SmartContractAccount, -} from "@aa-sdk/core"; -import type { Chain, Client, Transport } from "viem"; -import { installPlugin, type InstallPluginParams } from "./installPlugin.js"; -import { - uninstallPlugin, - type UninstallPluginParams, -} from "./uninstallPlugin.js"; - -export { type InstallPluginParams } from "./installPlugin.js"; -export { type UninstallPluginParams } from "./uninstallPlugin.js"; - -export type PluginManagerActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - installPlugin: ( - params: InstallPluginParams, - ) => Promise>; - uninstallPlugin: ( - params: UninstallPluginParams, - ) => Promise>; -}; - -/** - * Provides actions for managing plugins on a given client, including installing and uninstalling plugins. - * NOTE: this is provided by default when using a modular account client - * - * @example - * ```ts - * import { pluginManagerActions } from "@account-kit/smart-contracts"; - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * const client = createSmartAccountClient(...).extend(pluginManagerActions); - * ``` - * - * @param {Client} client The client instance on which to manage plugins - * @returns {PluginManagerActions} An object containing functions to install and uninstall plugins - */ -export function pluginManagerActions< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -): PluginManagerActions { - return { - installPlugin: async (params) => installPlugin(client, params), - uninstallPlugin: async (params) => uninstallPlugin(client, params), - }; -} diff --git a/account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts b/account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts deleted file mode 100644 index 91271ddf50..0000000000 --- a/account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - isSmartAccountClient, - type GetAccountParameter, - type GetContextParameter, - type GetEntryPointFromAccount, - type SmartAccountClient, - type SmartContractAccount, - type UserOperationOverridesParameter, -} from "@aa-sdk/core"; -import { - encodeFunctionData, - encodeFunctionResult, - keccak256, - type Address, - type Chain, - type Client, - type Hash, - type Transport, -} from "viem"; -import { IPluginAbi } from "../abis/IPlugin.js"; -import { IPluginManagerAbi } from "../abis/IPluginManager.js"; -import type { FunctionReference } from "../account-loupe/types.js"; - -export type InstallPluginParams< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends Record | undefined = - | Record - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - pluginAddress: Address; - manifestHash?: Hash; - pluginInitData?: Hash; - dependencies?: FunctionReference[]; -} & UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter; - -/** - * Installs a plugin on a smart account via the client, sending the user operation with the appropriate parameters. - * NOTE: it's recommended to just use the installPlugin action returned from generated plugins - * - * @example - * ```ts - * import { installPlugin, createModularAccountAlchemyClient } from "@account-kit/smart-contracts"; - * - * const client = createModularAccountAlchemyClient(...); - * - * const hash = await installPlugin(client, { - * pluginAddress: "0x...", - * manifestHash: "0x...", - * dependencies: [], // this is defined by the plugin you're installing - * }); - * ``` - * - * @param {Client} client The client configured to the smart account on which the plugin will be installed - * @param {InstallPluginParams} params The parameters required to install the plugin, including overrides, context, and account information - * @returns {Promise} A promise that resolves once the plugin installation operation is sent - */ -export async function installPlugin< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends Record | undefined = - | Record - | undefined, ->( - client: Client, - { - overrides, - context, - account = client.account, - ...params - }: InstallPluginParams, -) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "installPlugin", - client, - ); - } - - const callData = await encodeInstallPluginUserOperation(client, params); - - return client.sendUserOperation({ - uo: callData, - overrides, - account, - context, - }); -} - -export async function encodeInstallPluginUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: SmartAccountClient, - params: Omit, -) { - const pluginManifest = await client.readContract({ - abi: IPluginAbi, - address: params.pluginAddress, - functionName: "pluginManifest", - }); - // use the manifest hash passed in or get it from the plugin - const manifestHash: Hash = - params.manifestHash ?? - keccak256( - encodeFunctionResult({ - abi: IPluginAbi, - functionName: "pluginManifest", - result: pluginManifest, - }), - ); - return encodeFunctionData({ - abi: IPluginManagerAbi, - functionName: "installPlugin", - args: [ - params.pluginAddress, - manifestHash, - params.pluginInitData ?? "0x", - params.dependencies ?? [], - ], - }); -} diff --git a/account-kit/smart-contracts/src/msca/plugin-manager/uninstallPlugin.ts b/account-kit/smart-contracts/src/msca/plugin-manager/uninstallPlugin.ts deleted file mode 100644 index 67797f2a7d..0000000000 --- a/account-kit/smart-contracts/src/msca/plugin-manager/uninstallPlugin.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - isSmartAccountClient, - type GetAccountParameter, - type GetContextParameter, - type GetEntryPointFromAccount, - type SmartContractAccount, - type UserOperationContext, - type UserOperationOverridesParameter, -} from "@aa-sdk/core"; -import { - encodeFunctionData, - type Address, - type Chain, - type Client, - type Hash, - type Transport, -} from "viem"; -import { IPluginManagerAbi } from "../abis/IPluginManager.js"; - -export type UninstallPluginParams< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - pluginAddress: Address; - config?: Hash; - pluginUninstallData?: Hash; -} & UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter; - -export async function uninstallPlugin< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client: Client, - { - overrides, - account = client.account, - context, - ...params - }: UninstallPluginParams, -) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "uninstallPlugin", - client, - ); - } - - const callData = await encodeUninstallPluginUserOperation(params); - - return client.sendUserOperation({ - uo: callData, - overrides, - account, - context, - }); -} - -export async function encodeUninstallPluginUserOperation( - params: Omit, -) { - return encodeFunctionData({ - abi: IPluginManagerAbi, - functionName: "uninstallPlugin", - args: [ - params.pluginAddress, - params.config ?? "0x", - params.pluginUninstallData ?? "0x", - ], - }); -} diff --git a/account-kit/smart-contracts/src/msca/plugins/multi-owner/extension.ts b/account-kit/smart-contracts/src/msca/plugins/multi-owner/extension.ts deleted file mode 100644 index a0b9cd8848..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multi-owner/extension.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { - AccountNotFoundError, - type GetAccountParameter, - type IsUndefined, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Address, type Chain, type Client, type Transport } from "viem"; -import type { GetPluginAddressParameter } from "../types.js"; -import { - MultiOwnerPlugin, - multiOwnerPluginActions as multiOwnerPluginActions_, - type MultiOwnerPluginActions as MultiOwnerPluginActions_, -} from "./plugin.js"; - -export type MultiOwnerPluginActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = MultiOwnerPluginActions_ & { - readOwners: ( - params: GetPluginAddressParameter & GetAccountParameter, - ) => Promise>; - - isOwnerOf: ( - params: { address: Address } & GetPluginAddressParameter & - GetAccountParameter, - ) => Promise; -} & (IsUndefined extends false - ? { - readOwners: ( - params?: GetPluginAddressParameter & GetAccountParameter, - ) => Promise>; - } - : {}); - -/** - * Creates actions for the MultiOwner plugin, including reading owners and checking ownership. - * NOTE: this is already added to the client returned from createMultiOwnerModularAccountClient - * - * @example - * ```ts - * import { multiOwnerPluginActions } from "@account-kit/smart-contracts"; - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * const client = createSmartAccountClient(...).extend(multiOwnerPluginActions); - * ``` - * - * @param {Client} client the client instance containing the transport, chain, and account information - * @returns {MultiOwnerPluginActions} an object containing the actions for the MultiOwner plugin, such as `readOwners` and `isOwnerOf` - */ -export const multiOwnerPluginActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -) => MultiOwnerPluginActions = < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -) => ({ - ...multiOwnerPluginActions_(client), - async readOwners( - args: GetPluginAddressParameter & GetAccountParameter, - ) { - const account = args?.account ?? client.account; - if (!account) { - throw new AccountNotFoundError(); - } - // 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 = MultiOwnerPlugin.getContract(client, args?.pluginAddress); - return contract.read.ownersOf([account.address]); - }, - - async isOwnerOf( - args: { address: Address } & GetPluginAddressParameter & - GetAccountParameter, - ) { - const account = args.account ?? client.account; - if (!account) { - throw new AccountNotFoundError(); - } - // 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 = MultiOwnerPlugin.getContract(client, args.pluginAddress); - return contract.read.isOwnerOf([account.address, args.address]); - }, -}); diff --git a/account-kit/smart-contracts/src/msca/plugins/multi-owner/index.ts b/account-kit/smart-contracts/src/msca/plugins/multi-owner/index.ts deleted file mode 100644 index ab8c710d09..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multi-owner/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type * from "./extension.js"; -export { multiOwnerPluginActions } from "./extension.js"; - -export { - MultiOwnerPlugin, - MultiOwnerPluginAbi, - MultiOwnerPluginExecutionFunctionAbi, - type InstallMultiOwnerPluginParams, -} from "./plugin.js"; diff --git a/account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts b/account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts deleted file mode 100644 index 78de98840d..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts +++ /dev/null @@ -1,905 +0,0 @@ -import { - getContract, - encodeAbiParameters, - encodeFunctionData, - type Address, - type GetContractReturnType, - type Transport, - type PublicClient, - type Client, - type EncodeFunctionDataParameters, - type Chain, - type Hex, - type ReadContractReturnType, -} from "viem"; -import { - ChainNotFoundError, - AccountNotFoundError, - isSmartAccountClient, - IncompatibleClientError, - type SmartContractAccount, - type GetAccountParameter, - type SendUserOperationResult, - type GetEntryPointFromAccount, - type UserOperationOverridesParameter, - type UserOperationContext, - type GetContextParameter, -} from "@aa-sdk/core"; -import { - installPlugin as installPlugin_, - type Plugin, - type FunctionReference, -} from "@account-kit/smart-contracts"; - -type ExecutionActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - updateOwners: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultiOwnerPluginExecutionFunctionAbi, - "updateOwners" - >, - "args" - > & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter, - ) => Promise>; -}; - -type InstallArgs = [{ type: "address[]" }]; - -export type InstallMultiOwnerPluginParams = { - args: Parameters>[1]; - pluginAddress?: Address; - dependencyOverrides?: FunctionReference[]; -}; - -type ManagementActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | Record - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - installMultiOwnerPlugin: ( - args: UserOperationOverridesParameter & - InstallMultiOwnerPluginParams & - GetAccountParameter & - GetContextParameter, - ) => Promise>; -}; - -type ReadAndEncodeActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { - encodeUpdateOwners: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultiOwnerPluginExecutionFunctionAbi, - "updateOwners" - >, - "args" - >, - ) => Hex; - - encodeEip712Domain: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultiOwnerPluginExecutionFunctionAbi, - "eip712Domain" - >, - "args" - >, - ) => Hex; - - readEip712Domain: ( - args: GetAccountParameter, - ) => Promise< - ReadContractReturnType< - typeof MultiOwnerPluginExecutionFunctionAbi, - "eip712Domain" - > - >; - - encodeIsValidSignature: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultiOwnerPluginExecutionFunctionAbi, - "isValidSignature" - >, - "args" - >, - ) => Hex; - - readIsValidSignature: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultiOwnerPluginExecutionFunctionAbi, - "isValidSignature" - >, - "args" - > & - GetAccountParameter, - ) => Promise< - ReadContractReturnType< - typeof MultiOwnerPluginExecutionFunctionAbi, - "isValidSignature" - > - >; -}; - -export type MultiOwnerPluginActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = ExecutionActions & - ManagementActions & - ReadAndEncodeActions; - -const addresses = { - 1: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 10: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 137: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 252: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 2523: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 8453: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 42161: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 80001: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 80002: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 84532: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 421614: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 7777777: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 11155111: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 11155420: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, - 999999999: "0xcE0000007B008F50d762D155002600004cD6c647" as Address, -} as Record; - -export const MultiOwnerPlugin: Plugin = { - meta: { - name: "Multi Owner Plugin", - version: "1.0.0", - addresses, - }, - getContract: ( - client: C, - address?: Address, - ): GetContractReturnType< - typeof MultiOwnerPluginAbi, - PublicClient, - Address - > => { - if (!client.chain) throw new ChainNotFoundError(); - - return getContract({ - address: address || addresses[client.chain.id], - abi: MultiOwnerPluginAbi, - client: client, - }) as GetContractReturnType< - typeof MultiOwnerPluginAbi, - PublicClient, - Address - >; - }, -}; - -export const multiOwnerPluginActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client: Client, -) => MultiOwnerPluginActions = (client) => ({ - updateOwners({ args, overrides, context, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "updateOwners", - client, - ); - } - - const uo = encodeFunctionData({ - abi: MultiOwnerPluginExecutionFunctionAbi, - functionName: "updateOwners", - args, - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - }, - installMultiOwnerPlugin({ - account = client.account, - overrides, - context, - ...params - }) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "installMultiOwnerPlugin", - client, - ); - } - - const chain = client.chain; - if (!chain) { - throw new ChainNotFoundError(); - } - - const dependencies = params.dependencyOverrides ?? []; - const pluginAddress = - params.pluginAddress ?? - (MultiOwnerPlugin.meta.addresses[chain.id] as Address | undefined); - - if (!pluginAddress) { - throw new Error( - "missing MultiOwnerPlugin address for chain " + chain.name, - ); - } - - return installPlugin_(client, { - pluginAddress, - pluginInitData: encodeAbiParameters([{ type: "address[]" }], params.args), - dependencies, - overrides, - account, - context, - }); - }, - encodeUpdateOwners({ args }) { - return encodeFunctionData({ - abi: MultiOwnerPluginExecutionFunctionAbi, - functionName: "updateOwners", - args, - }); - }, - encodeEip712Domain() { - return encodeFunctionData({ - abi: MultiOwnerPluginExecutionFunctionAbi, - functionName: "eip712Domain", - }); - }, - - async readEip712Domain({ account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "readEip712Domain", - client, - ); - } - - return client.readContract({ - address: account.address, - abi: MultiOwnerPluginExecutionFunctionAbi, - functionName: "eip712Domain", - }); - }, - encodeIsValidSignature({ args }) { - return encodeFunctionData({ - abi: MultiOwnerPluginExecutionFunctionAbi, - functionName: "isValidSignature", - args, - }); - }, - - async readIsValidSignature({ args, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "readIsValidSignature", - client, - ); - } - - return client.readContract({ - address: account.address, - abi: MultiOwnerPluginExecutionFunctionAbi, - functionName: "isValidSignature", - args, - }); - }, -}); - -export const MultiOwnerPluginExecutionFunctionAbi = [ - { - type: "function", - name: "updateOwners", - inputs: [ - { name: "ownersToAdd", type: "address[]", internalType: "address[]" }, - { name: "ownersToRemove", type: "address[]", internalType: "address[]" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { name: "fields", type: "bytes1", internalType: "bytes1" }, - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "chainId", type: "uint256", internalType: "uint256" }, - { name: "verifyingContract", type: "address", internalType: "address" }, - { name: "salt", type: "bytes32", internalType: "bytes32" }, - { name: "extensions", type: "uint256[]", internalType: "uint256[]" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "isValidSignature", - inputs: [ - { name: "digest", type: "bytes32", internalType: "bytes32" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }], - stateMutability: "view", - }, -] as const; - -export const MultiOwnerPluginAbi = [ - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { name: "fields", type: "bytes1", internalType: "bytes1" }, - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "chainId", type: "uint256", internalType: "uint256" }, - { name: "verifyingContract", type: "address", internalType: "address" }, - { name: "salt", type: "bytes32", internalType: "bytes32" }, - { name: "extensions", type: "uint256[]", internalType: "uint256[]" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "encodeMessageData", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "message", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "view", - }, - { - type: "function", - name: "getMessageHash", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "message", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - name: "isOwnerOf", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "ownerToCheck", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isValidSignature", - inputs: [ - { name: "digest", type: "bytes32", internalType: "bytes32" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }], - stateMutability: "view", - }, - { - type: "function", - name: "onInstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [{ name: "", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ownersOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "address[]", internalType: "address[]" }], - stateMutability: "view", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { name: "interfaceIds", type: "bytes4[]", internalType: "bytes4[]" }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { name: "canSpendNativeToken", type: "bool", internalType: "bool" }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { name: "permitAnySelector", type: "bool", internalType: "bool" }, - { name: "selectors", type: "bytes4[]", internalType: "bytes4[]" }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "author", type: "string", internalType: "string" }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "preExecHookData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "", type: "uint256", internalType: "uint256" }, - { name: "", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "view", - }, - { - type: "function", - name: "supportsInterface", - inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "updateOwners", - inputs: [ - { name: "ownersToAdd", type: "address[]", internalType: "address[]" }, - { name: "ownersToRemove", type: "address[]", internalType: "address[]" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", - }, - { - type: "event", - name: "OwnerUpdated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "addedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - { - name: "removedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - ], - anonymous: false, - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { type: "error", name: "EmptyOwnersNotAllowed", inputs: [] }, - { type: "error", name: "InvalidAction", inputs: [] }, - { - type: "error", - name: "InvalidOwner", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, - { type: "error", name: "NotAuthorized", inputs: [] }, - { - type: "error", - name: "NotContractCaller", - inputs: [{ name: "caller", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "NotImplemented", - inputs: [ - { name: "selector", type: "bytes4", internalType: "bytes4" }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - ], - }, - { type: "error", name: "NotInitialized", inputs: [] }, - { - type: "error", - name: "OwnerDoesNotExist", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/plugins/multi-owner/signer.ts b/account-kit/smart-contracts/src/msca/plugins/multi-owner/signer.ts deleted file mode 100644 index c04bc41be8..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multi-owner/signer.ts +++ /dev/null @@ -1,115 +0,0 @@ -import type { - Address, - BundlerClient, - SmartAccountSigner, - SignatureRequest, -} from "@aa-sdk/core"; -import { - hashMessage, - hashTypedData, - type Hash, - type Hex, - type SignableMessage, - type Transport, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { MultiOwnerPlugin, MultiOwnerPluginAbi } from "./plugin.js"; - -export const multiOwnerMessageSigner = < - TTransport extends Transport, - TSigner extends SmartAccountSigner, ->( - client: BundlerClient, - accountAddress: Address, - signer: () => TSigner, - pluginAddress: Address = MultiOwnerPlugin.meta.addresses[client.chain.id], -) => { - const get712Wrapper = async (msg: Hash): Promise => { - const [, name, version, chainId, verifyingContract, salt] = - await client.readContract({ - abi: MultiOwnerPluginAbi, - address: pluginAddress, - functionName: "eip712Domain", - account: accountAddress, - }); - - return { - domain: { - chainId: Number(chainId), - name, - salt, - verifyingContract, - version, - }, - types: { - AlchemyModularAccountMessage: [{ name: "message", type: "bytes" }], - }, - message: { - message: msg, - }, - primaryType: "AlchemyModularAccountMessage", - }; - }; - - const prepareSign = async ( - params: SignatureRequest, - ): Promise => { - const data = await get712Wrapper( - params.type === "personal_sign" - ? hashMessage(params.data) - : hashTypedData(params.data), - ); - return { - type: "eth_signTypedData_v4", - data, - }; - }; - - const formatSign = async ( - signature: `0x${string}`, - ): Promise<`0x${string}`> => { - return signature; - }; - - return { - prepareSign, - formatSign, - getDummySignature: (): Hex => { - return "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"; - }, - - signUserOperationHash: (uoHash: `0x${string}`): Promise<`0x${string}`> => { - return signer().signMessage({ raw: uoHash }); - }, - - async signMessage({ - message, - }: { - message: SignableMessage; - }): Promise<`0x${string}`> { - const { type, data } = await prepareSign({ - type: "personal_sign", - data: message, - }); - return type === "personal_sign" - ? signer().signMessage(data) - : signer().signTypedData(data); - }, - - signTypedData: async < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >( - typedDataDefinition: TypedDataDefinition, - ): Promise => { - const { type, data } = await prepareSign({ - type: "eth_signTypedData_v4", - data: typedDataDefinition as TypedDataDefinition, - }); - return type === "personal_sign" - ? signer().signMessage(data) - : signer().signTypedData(data); - }, - }; -}; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/getThreshold.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/actions/getThreshold.ts deleted file mode 100644 index 9395502e50..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/getThreshold.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - AccountNotFoundError, - type GetAccountParameter, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Chain, type Client, type Transport } from "viem"; -import { isMultisigModularAccount } from "../../../account/multisigAccount.js"; -import type { GetPluginAddressParameter } from "../../types.js"; -import { MultisigPlugin } from "../plugin.js"; -import { MultisigAccountExpectedError } from "../../../errors.js"; - -export async function getThreshold< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: GetPluginAddressParameter & GetAccountParameter, -) { - const account = args.account ?? client.account; - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isMultisigModularAccount(account)) { - throw new MultisigAccountExpectedError(); - } - - const [, threshold] = await MultisigPlugin.getContract( - client, - args.pluginAddress, - ).read.ownershipInfoOf([account.address]); - - return threshold === 0n ? account.getLocalThreshold() : threshold; -} diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/isOwnerOf.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/actions/isOwnerOf.ts deleted file mode 100644 index 5804eea824..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/isOwnerOf.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - AccountNotFoundError, - type Address, - type GetAccountParameter, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Chain, type Client, type Transport } from "viem"; -import type { GetPluginAddressParameter } from "../../types.js"; -import { MultisigPlugin } from "../plugin.js"; - -export async function isOwnerOf< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: { address: Address } & GetPluginAddressParameter & - GetAccountParameter, -) { - const account = args.account ?? client.account; - if (!account) { - throw new AccountNotFoundError(); - } - // 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 = MultisigPlugin.getContract(client, args.pluginAddress); - return await contract.read.isOwnerOf([account.address, args.address]); -} diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/proposeUserOperation.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/actions/proposeUserOperation.ts deleted file mode 100644 index ad0bdd6887..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/proposeUserOperation.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - isSmartAccountClient, - isSmartAccountWithSigner, - SmartAccountWithSignerRequiredError, - type GetEntryPointFromAccount, - type SendUserOperationParameters, - type SmartContractAccount, - type UserOperationOverrides, -} from "@aa-sdk/core"; -import { type Chain, type Client, type Transport } from "viem"; -import { type ProposeUserOperationResult } from "../types.js"; -import { splitAggregatedSignature } from "../utils/splitAggregatedSignature.js"; - -export async function proposeUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client: Client, - { - uo, - account = client.account, - overrides: overrides_, - }: SendUserOperationParameters, -): Promise { - // these overrides allow us to set a high max fee and PVG upper bound - const overrides = { - maxFeePerGas: { multiplier: 3 }, - maxPriorityFeePerGas: { multiplier: 2 }, - preVerificationGas: { multiplier: 1000 }, - ...overrides_, - } as UserOperationOverrides; - - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "proposeUserOperation", - client, - ); - } - - if (!isSmartAccountWithSigner(account)) { - throw new SmartAccountWithSignerRequiredError(); - } - - const builtUo = await client.buildUserOperation({ - account, - uo, - overrides, - }); - - const request = await client.signUserOperation({ - uoStruct: builtUo, - account, - context: { - userOpSignatureType: "UPPERLIMIT", - }, - }); - - const splitSignatures = await splitAggregatedSignature({ - request, - aggregatedSignature: request.signature, - account, - // split works on the assumption that we have t - 1 signatures - threshold: 2, - }); - - return { - request, - signatureObj: splitSignatures.signatures[0], - aggregatedSignature: request.signature, - }; -} diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/readOwners.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/actions/readOwners.ts deleted file mode 100644 index 5eac3225e2..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/readOwners.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - AccountNotFoundError, - type GetAccountParameter, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Chain, type Client, type Transport } from "viem"; -import type { GetPluginAddressParameter } from "../../types.js"; -import { MultisigPlugin } from "../plugin.js"; - -export async function readOwners< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: GetPluginAddressParameter & GetAccountParameter, -) { - const account = args?.account ?? client.account; - if (!account) { - throw new AccountNotFoundError(); - } - // 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 [owners] = await MultisigPlugin.getContract( - client, - args?.pluginAddress, - ).read.ownershipInfoOf([account.address]); - return owners; -} diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/signMultisigUserOperation.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/actions/signMultisigUserOperation.ts deleted file mode 100644 index 7e5637bcbc..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/actions/signMultisigUserOperation.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { - AccountNotFoundError, - IncompatibleClientError, - SmartAccountWithSignerRequiredError, - isSmartAccountClient, - isSmartAccountWithSigner, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Chain, type Client, type Transport } from "viem"; -import { MultisigMissingSignatureError } from "../../../errors.js"; -import { - type SignMultisigUserOperationParams, - type SignMultisigUserOperationResult, -} from "../types.js"; -import { combineSignatures, splitAggregatedSignature } from "../utils/index.js"; - -export async function signMultisigUserOperation< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - params: SignMultisigUserOperationParams, -): Promise { - const { account = client.account, signatures, userOperationRequest } = params; - - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "signMultisigUserOperation", - client, - ); - } - - if (!isSmartAccountWithSigner(account)) { - throw new SmartAccountWithSignerRequiredError(); - } - - if (!signatures.length) { - throw new MultisigMissingSignatureError(); - } - - const signerAddress = await account.getSigner().getAddress(); - - const signedRequest = await client.signUserOperation({ - account, - uoStruct: userOperationRequest, - context: { - aggregatedSignature: combineSignatures({ - signatures, - upperLimitMaxFeePerGas: userOperationRequest.maxFeePerGas, - upperLimitMaxPriorityFeePerGas: - userOperationRequest.maxPriorityFeePerGas, - upperLimitPvg: userOperationRequest.preVerificationGas, - usingMaxValues: false, - }), - signatures, - userOpSignatureType: "UPPERLIMIT", - }, - }); - - const splitSignatures = await splitAggregatedSignature({ - account, - request: signedRequest, - aggregatedSignature: signedRequest.signature, - // split works on the assumption that we have t - 1 signatures - // we have signatures.length + 1 signatures now, so we need sl + 1 + 1 - threshold: signatures.length + 2, - }); - - const signatureObj = splitSignatures.signatures.find( - (x) => x.signer === signerAddress, - ); - - if (!signatureObj) { - // TODO: strongly type this - throw new Error( - "INTERNAL ERROR: signature not found in split signatures, this is an internal bug please report", - ); - } - - return { - signatureObj, - signature: signatureObj.signature, - aggregatedSignature: signedRequest.signature, - }; -} diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/extension.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/extension.ts deleted file mode 100644 index 945dbc810a..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/extension.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { - type GetAccountParameter, - type GetEntryPointFromAccount, - type IsUndefined, - type SendUserOperationParameters, - type SmartContractAccount, -} from "@aa-sdk/core"; -import { type Address, type Chain, type Client, type Transport } from "viem"; -import type { GetPluginAddressParameter } from "../types.js"; -import { getThreshold } from "./actions/getThreshold.js"; -import { isOwnerOf } from "./actions/isOwnerOf.js"; -import { proposeUserOperation } from "./actions/proposeUserOperation.js"; -import { readOwners } from "./actions/readOwners.js"; -import { signMultisigUserOperation } from "./actions/signMultisigUserOperation.js"; -import { - multisigPluginActions as multisigPluginActions_, - type MultisigPluginActions as MultisigPluginActions_, -} from "./plugin.js"; -import { - type MultisigUserOperationContext, - type ProposeUserOperationResult, - type SignMultisigUserOperationParams, - type SignMultisigUserOperationResult, -} from "./types.js"; - -export type MultisigPluginActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = MultisigPluginActions_ & { - readOwners: ( - params: GetPluginAddressParameter & GetAccountParameter, - ) => Promise>; - - isOwnerOf: ( - params: { address: Address } & GetPluginAddressParameter & - GetAccountParameter, - ) => Promise; - - getThreshold: ( - params: GetPluginAddressParameter & GetAccountParameter, - ) => Promise; - - proposeUserOperation: ( - params: SendUserOperationParameters, - ) => Promise< - ProposeUserOperationResult> - >; - - signMultisigUserOperation: ( - params: SignMultisigUserOperationParams, - ) => Promise; -} & (IsUndefined extends false - ? { - readOwners: ( - params?: GetPluginAddressParameter & GetAccountParameter, - ) => Promise>; - } - : {}); - -/** - * Provides actions for managing a multisig plugin within the specified client, including reading owners, checking ownership, getting the threshold, proposing user operations, and signing multisig user operations. - * - * @example - * ```ts - * import { createModularAccountAlchemyClient, multisigPluginActions } from "@account-kit/smart-contracts"; - * - * const client = createModularAccountAlchemyClient(...).extend(multisigPluginActions); - * ``` - * - * @param {Client} client The client instance configured with transport, chain, and account information - * @returns {MultisigPluginActions} An object containing methods to perform actions related to the multisig plugin - */ -export const multisigPluginActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -) => MultisigPluginActions = < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -) => ({ - ...multisigPluginActions_(client), - readOwners: ( - args: GetPluginAddressParameter & GetAccountParameter, - ) => readOwners(client, args), - - isOwnerOf: ( - args: { address: Address } & GetPluginAddressParameter & - GetAccountParameter, - ) => isOwnerOf(client, args), - - getThreshold: ( - args: GetPluginAddressParameter & GetAccountParameter, - ) => getThreshold(client, args), - - proposeUserOperation: ( - args: SendUserOperationParameters, - ) => proposeUserOperation(client, args), - - signMultisigUserOperation: ( - params: SignMultisigUserOperationParams, - ): Promise => - signMultisigUserOperation(client, params), -}); diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/index.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/index.ts deleted file mode 100644 index 9c573baf18..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type * from "./extension.js"; -export { multisigPluginActions } from "./extension.js"; -export { multisigSignatureMiddleware } from "./middleware.js"; -export { - MultisigPlugin, - MultisigPluginAbi, - MultisigPluginExecutionFunctionAbi, - type InstallMultisigPluginParams, -} from "./plugin.js"; -export type * from "./types.js"; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/middleware.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/middleware.ts deleted file mode 100644 index 2f81c991bc..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/middleware.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { - InvalidUserOperationError, - SmartAccountWithSignerRequiredError, - deepHexlify, - isSmartAccountWithSigner, - isValidRequest, - resolveProperties, - type ClientMiddlewareFn, - type UserOperationRequest_v6, - type UserOperationRequest_v7, -} from "@aa-sdk/core"; -import { type Hex } from "viem"; -import { isMultisigModularAccount } from "../../account/multisigAccount.js"; -import { - InvalidContextSignatureError, - MultisigAccountExpectedError, -} from "../../errors.js"; -import { type MultisigUserOperationContext } from "./types.js"; -import { - combineSignatures, - getSignerType, - splitAggregatedSignature, -} from "./utils/index.js"; - -/** - * A signer middleware to be used with Multisig Account Clients. - * This middleware handles correctly aggregating signatures passed through - * as context when sending UserOperations, proposing UserOperations, or adding signatures to a UserOperation. - * - * @param {Deferrable>} struct the user operation struct to be signed - * @param {ClientMiddlewareArgs} args the parameters to be passed to the middleware - * @param {UserOperationOverrides} args.account the account to be used for signing - * @param {MiddlewareClient} args.client the smart account client that will be used for RPC requests - * @param {MultisigUserOperationContext} args.context the context object containing the signatures to be aggregated MultisigUserOperationContext - * @returns {Promise>>} a Promise containing a UserOperation with an aggregated signature in the `signature` field - */ -export const multisigSignatureMiddleware: ClientMiddlewareFn< - MultisigUserOperationContext -> = async (struct, { account, client, context }) => { - // if the signature is not present, this has to be UPPERLIMIT because it's likely a propose operation - if (!context) { - throw new InvalidContextSignatureError(); - } - - if (!isSmartAccountWithSigner(account)) { - throw new SmartAccountWithSignerRequiredError(); - } - - if (!isMultisigModularAccount(account)) { - throw new MultisigAccountExpectedError(); - } - - const resolvedStruct = await resolveProperties(struct); - - const request = deepHexlify(resolvedStruct); - if (!isValidRequest(request)) { - throw new InvalidUserOperationError(resolvedStruct); - } - - const signature = await account.signUserOperationHash( - account.getEntryPoint().getUserOperationHash(request), - ); - - const signerType = await getSignerType({ - client, - signature: signature, - signer: account.getSigner(), - }); - - // then this is a propose operation or a 1/1 multisig - if ( - context?.signatures?.length == null && - context?.aggregatedSignature == null - ) { - return { - ...resolvedStruct, - signature: combineSignatures({ - signatures: [ - { - signature, - signer: await account.getSigner().getAddress(), - signerType, - userOpSigType: context.userOpSignatureType, - }, - ], - upperLimitMaxFeePerGas: request.maxFeePerGas, - upperLimitMaxPriorityFeePerGas: request.maxPriorityFeePerGas, - upperLimitPvg: request.preVerificationGas, - usingMaxValues: context.userOpSignatureType === "ACTUAL", - }), - }; - } - - if (context.aggregatedSignature == null || context.signatures == null) { - throw new InvalidContextSignatureError(); - } - - // otherwise this is a sign operation - const { - upperLimitPvg, - upperLimitMaxFeePerGas, - upperLimitMaxPriorityFeePerGas, - } = await splitAggregatedSignature({ - aggregatedSignature: context.aggregatedSignature, - threshold: context.signatures.length + 1, - account, - request, - }); - - const finalSignature = combineSignatures({ - signatures: context.signatures.concat({ - userOpSigType: context.userOpSignatureType, - signerType, - signature, - signer: await account.getSigner().getAddress(), - }), - upperLimitPvg, - upperLimitMaxFeePerGas, - upperLimitMaxPriorityFeePerGas, - usingMaxValues: isUsingMaxValues(request, { - upperLimitPvg, - upperLimitMaxFeePerGas, - upperLimitMaxPriorityFeePerGas, - }), - }); - - return { - ...resolvedStruct, - signature: finalSignature, - }; -}; - -const isUsingMaxValues = ( - request: UserOperationRequest_v6 | UserOperationRequest_v7, - upperLimits: { - upperLimitPvg: Hex; - upperLimitMaxFeePerGas: Hex; - upperLimitMaxPriorityFeePerGas: Hex; - }, -): boolean => { - if ( - BigInt(request.preVerificationGas) !== BigInt(upperLimits.upperLimitPvg) - ) { - return false; - } - - if ( - BigInt(request.maxFeePerGas) !== BigInt(upperLimits.upperLimitMaxFeePerGas) - ) { - return false; - } - - if ( - BigInt(request.maxPriorityFeePerGas) !== - BigInt(upperLimits.upperLimitMaxPriorityFeePerGas) - ) { - return false; - } - - return true; -}; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts deleted file mode 100644 index cec1ccaa20..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts +++ /dev/null @@ -1,948 +0,0 @@ -import { - getContract, - encodeAbiParameters, - encodeFunctionData, - type Address, - type GetContractReturnType, - type Transport, - type PublicClient, - type Client, - type EncodeFunctionDataParameters, - type Chain, - type Hex, - type ReadContractReturnType, -} from "viem"; -import { - ChainNotFoundError, - AccountNotFoundError, - isSmartAccountClient, - IncompatibleClientError, - type SmartContractAccount, - type GetAccountParameter, - type SendUserOperationResult, - type GetEntryPointFromAccount, - type UserOperationOverridesParameter, - type UserOperationContext, - type GetContextParameter, -} from "@aa-sdk/core"; -import { - installPlugin as installPlugin_, - type Plugin, - type FunctionReference, -} from "@account-kit/smart-contracts"; - -type ExecutionActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - updateOwnership: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultisigPluginExecutionFunctionAbi, - "updateOwnership" - >, - "args" - > & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter, - ) => Promise>; -}; - -type InstallArgs = [{ type: "address[]" }, { type: "uint256" }]; - -export type InstallMultisigPluginParams = { - args: Parameters>[1]; - pluginAddress?: Address; - dependencyOverrides?: FunctionReference[]; -}; - -type ManagementActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | Record - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - installMultisigPlugin: ( - args: UserOperationOverridesParameter & - InstallMultisigPluginParams & - GetAccountParameter & - GetContextParameter, - ) => Promise>; -}; - -type ReadAndEncodeActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { - encodeUpdateOwnership: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultisigPluginExecutionFunctionAbi, - "updateOwnership" - >, - "args" - >, - ) => Hex; - - encodeEip712Domain: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultisigPluginExecutionFunctionAbi, - "eip712Domain" - >, - "args" - >, - ) => Hex; - - readEip712Domain: ( - args: GetAccountParameter, - ) => Promise< - ReadContractReturnType< - typeof MultisigPluginExecutionFunctionAbi, - "eip712Domain" - > - >; - - encodeIsValidSignature: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultisigPluginExecutionFunctionAbi, - "isValidSignature" - >, - "args" - >, - ) => Hex; - - readIsValidSignature: ( - args: Pick< - EncodeFunctionDataParameters< - typeof MultisigPluginExecutionFunctionAbi, - "isValidSignature" - >, - "args" - > & - GetAccountParameter, - ) => Promise< - ReadContractReturnType< - typeof MultisigPluginExecutionFunctionAbi, - "isValidSignature" - > - >; -}; - -export type MultisigPluginActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = ExecutionActions & - ManagementActions & - ReadAndEncodeActions; - -const addresses = { - 1: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 10: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 137: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 252: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 1337: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 2523: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 8453: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 42161: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 80002: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 84532: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 421614: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 7777777: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 11155111: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 11155420: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, - 999999999: "0x000000000000A53f64b7bcf4Cd59624943C43Fc7" as Address, -} as Record; - -export const MultisigPlugin: Plugin = { - meta: { - name: "Multisig Plugin", - version: "1.0.0", - addresses, - }, - getContract: ( - client: C, - address?: Address, - ): GetContractReturnType => { - if (!client.chain) throw new ChainNotFoundError(); - - return getContract({ - address: address || addresses[client.chain.id], - abi: MultisigPluginAbi, - client: client, - }) as GetContractReturnType< - typeof MultisigPluginAbi, - PublicClient, - Address - >; - }, -}; - -export const multisigPluginActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client: Client, -) => MultisigPluginActions = (client) => ({ - updateOwnership({ args, overrides, context, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "updateOwnership", - client, - ); - } - - const uo = encodeFunctionData({ - abi: MultisigPluginExecutionFunctionAbi, - functionName: "updateOwnership", - args, - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - }, - installMultisigPlugin({ - account = client.account, - overrides, - context, - ...params - }) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "installMultisigPlugin", - client, - ); - } - - const chain = client.chain; - if (!chain) { - throw new ChainNotFoundError(); - } - - const dependencies = params.dependencyOverrides ?? []; - const pluginAddress = - params.pluginAddress ?? - (MultisigPlugin.meta.addresses[chain.id] as Address | undefined); - - if (!pluginAddress) { - throw new Error("missing MultisigPlugin address for chain " + chain.name); - } - - return installPlugin_(client, { - pluginAddress, - pluginInitData: encodeAbiParameters( - [{ type: "address[]" }, { type: "uint256" }], - params.args, - ), - dependencies, - overrides, - account, - context, - }); - }, - encodeUpdateOwnership({ args }) { - return encodeFunctionData({ - abi: MultisigPluginExecutionFunctionAbi, - functionName: "updateOwnership", - args, - }); - }, - encodeEip712Domain() { - return encodeFunctionData({ - abi: MultisigPluginExecutionFunctionAbi, - functionName: "eip712Domain", - }); - }, - - async readEip712Domain({ account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "readEip712Domain", - client, - ); - } - - return client.readContract({ - address: account.address, - abi: MultisigPluginExecutionFunctionAbi, - functionName: "eip712Domain", - }); - }, - encodeIsValidSignature({ args }) { - return encodeFunctionData({ - abi: MultisigPluginExecutionFunctionAbi, - functionName: "isValidSignature", - args, - }); - }, - - async readIsValidSignature({ args, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "readIsValidSignature", - client, - ); - } - - return client.readContract({ - address: account.address, - abi: MultisigPluginExecutionFunctionAbi, - functionName: "isValidSignature", - args, - }); - }, -}); - -export const MultisigPluginExecutionFunctionAbi = [ - { - type: "function", - name: "updateOwnership", - inputs: [ - { name: "ownersToAdd", type: "address[]", internalType: "address[]" }, - { name: "ownersToRemove", type: "address[]", internalType: "address[]" }, - { name: "newThreshold", type: "uint128", internalType: "uint128" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { name: "fields", type: "bytes1", internalType: "bytes1" }, - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "chainId", type: "uint256", internalType: "uint256" }, - { name: "verifyingContract", type: "address", internalType: "address" }, - { name: "salt", type: "bytes32", internalType: "bytes32" }, - { name: "extensions", type: "uint256[]", internalType: "uint256[]" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "isValidSignature", - inputs: [ - { name: "digest", type: "bytes32", internalType: "bytes32" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }], - stateMutability: "view", - }, -] as const; - -export const MultisigPluginAbi = [ - { - type: "constructor", - inputs: [{ name: "entryPoint", type: "address", internalType: "address" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ENTRYPOINT", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", - }, - { - type: "function", - name: "checkNSignatures", - inputs: [ - { name: "actualDigest", type: "bytes32", internalType: "bytes32" }, - { name: "upperLimitGasDigest", type: "bytes32", internalType: "bytes32" }, - { name: "account", type: "address", internalType: "address" }, - { name: "signatures", type: "bytes", internalType: "bytes" }, - ], - outputs: [ - { name: "success", type: "bool", internalType: "bool" }, - { name: "firstFailure", type: "uint256", internalType: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "eip712Domain", - inputs: [], - outputs: [ - { name: "fields", type: "bytes1", internalType: "bytes1" }, - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "chainId", type: "uint256", internalType: "uint256" }, - { name: "verifyingContract", type: "address", internalType: "address" }, - { name: "salt", type: "bytes32", internalType: "bytes32" }, - { name: "extensions", type: "uint256[]", internalType: "uint256[]" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "encodeMessageData", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "message", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "view", - }, - { - type: "function", - name: "getMessageHash", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "message", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - name: "isOwnerOf", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "ownerToCheck", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isValidSignature", - inputs: [ - { name: "digest", type: "bytes32", internalType: "bytes32" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }], - stateMutability: "view", - }, - { - type: "function", - name: "onInstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [{ name: "", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "ownershipInfoOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [ - { name: "", type: "address[]", internalType: "address[]" }, - { name: "", type: "uint256", internalType: "uint256" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { name: "interfaceIds", type: "bytes4[]", internalType: "bytes4[]" }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { name: "canSpendNativeToken", type: "bool", internalType: "bool" }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { name: "permitAnySelector", type: "bool", internalType: "bool" }, - { name: "selectors", type: "bytes4[]", internalType: "bytes4[]" }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "author", type: "string", internalType: "string" }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "preExecHookData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "supportsInterface", - inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "updateOwnership", - inputs: [ - { name: "ownersToAdd", type: "address[]", internalType: "address[]" }, - { name: "ownersToRemove", type: "address[]", internalType: "address[]" }, - { name: "newThreshold", type: "uint128", internalType: "uint128" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", - }, - { - type: "event", - name: "OwnerUpdated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "addedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - { - name: "removedOwners", - type: "address[]", - indexed: false, - internalType: "address[]", - }, - { - name: "threshold", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { type: "error", name: "ECDSARecoverFailure", inputs: [] }, - { type: "error", name: "EmptyOwnersNotAllowed", inputs: [] }, - { type: "error", name: "InvalidAction", inputs: [] }, - { type: "error", name: "InvalidAddress", inputs: [] }, - { type: "error", name: "InvalidMaxFeePerGas", inputs: [] }, - { type: "error", name: "InvalidMaxPriorityFeePerGas", inputs: [] }, - { type: "error", name: "InvalidNumSigsOnActualGas", inputs: [] }, - { - type: "error", - name: "InvalidOwner", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, - { type: "error", name: "InvalidPreVerificationGas", inputs: [] }, - { type: "error", name: "InvalidSigLength", inputs: [] }, - { type: "error", name: "InvalidSigOffset", inputs: [] }, - { type: "error", name: "InvalidThreshold", inputs: [] }, - { - type: "error", - name: "NotContractCaller", - inputs: [{ name: "caller", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "NotImplemented", - inputs: [ - { name: "selector", type: "bytes4", internalType: "bytes4" }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - ], - }, - { type: "error", name: "NotInitialized", inputs: [] }, - { - type: "error", - name: "OwnerDoesNotExist", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/signer.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/signer.ts deleted file mode 100644 index 0d8987d434..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/signer.ts +++ /dev/null @@ -1,139 +0,0 @@ -import type { - Address, - BundlerClient, - SmartAccountSigner, - SignatureRequest, -} from "@aa-sdk/core"; -import { - hashMessage, - hashTypedData, - type Hash, - type Hex, - type SignableMessage, - type Transport, - type TypedData, - type TypedDataDefinition, -} from "viem"; -import { MultisigPlugin, MultisigPluginAbi } from "./plugin.js"; - -type MultisigSignMethodsParams< - TTransport extends Transport, - TSigner extends SmartAccountSigner, -> = { - client: BundlerClient; - accountAddress: Address; - signer: () => TSigner; - threshold: bigint; - pluginAddress?: Address; -}; - -export const multisigSignMethods = < - TTransport extends Transport, - TSigner extends SmartAccountSigner, ->({ - client, - accountAddress, - signer, - threshold, - pluginAddress = MultisigPlugin.meta.addresses[client.chain.id], -}: MultisigSignMethodsParams) => { - const get712Wrapper = async (msg: Hash): Promise => { - const [, name, version, chainId, verifyingContract, salt] = - await client.readContract({ - abi: MultisigPluginAbi, - address: pluginAddress, - functionName: "eip712Domain", - account: accountAddress, - }); - - return { - domain: { - chainId: Number(chainId), - name, - salt, - verifyingContract, - version, - }, - types: { - AlchemyMultisigMessage: [{ name: "message", type: "bytes" }], - }, - message: { - message: msg, - }, - primaryType: "AlchemyMultisigMessage", - }; - }; - - const prepareSign = async ( - params: SignatureRequest, - ): Promise => { - const messageHash = - params.type === "personal_sign" - ? hashMessage(params.data) - : hashTypedData(params.data); - - return { - type: "eth_signTypedData_v4", - data: await get712Wrapper(messageHash), - }; - }; - - const formatSign = async ( - signature: `0x${string}`, - ): Promise<`0x${string}`> => { - return signature; - }; - - return { - prepareSign, - formatSign, - getDummySignature: async (): Promise<`0x${string}`> => { - const [, thresholdRead] = await client.readContract({ - abi: MultisigPluginAbi, - address: pluginAddress, - functionName: "ownershipInfoOf", - args: [accountAddress], - }); - - const actualThreshold = thresholdRead === 0n ? threshold : thresholdRead; - - // (uint upperLimitPreVerificationGas, uint upperLimitMaxFeePerGas, uint upperLimitMaxPriorityFeePerGas) - // the first sig will be on "actual" with v = 32 - return ("0x" + - "FF".repeat(32 * 3) + - "fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3c" + - "fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c".repeat( - Number(actualThreshold) - 1, - )) as Hex; - }, - - signUserOperationHash: (uoHash: Hex): Promise => { - return signer().signMessage({ raw: uoHash }); - }, - - async signMessage({ message }: { message: SignableMessage }): Promise { - const { type, data } = await prepareSign({ - type: "personal_sign", - data: message, - }); - return type === "personal_sign" - ? signer().signMessage(data) - : signer().signTypedData(data); - }, - - signTypedData: async < - const typedData extends TypedData | Record, - primaryType extends keyof typedData | "EIP712Domain" = keyof typedData, - >( - typedDataDefinition: TypedDataDefinition, - ): Promise => { - const { type, data } = await prepareSign({ - type: "eth_signTypedData_v4", - data: typedDataDefinition as TypedDataDefinition, - }); - return type === "personal_sign" - ? signer().signMessage(data) - : signer().signTypedData(data); - }, - }; -}; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts deleted file mode 100644 index 9bc343a9b7..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { - GetAccountParameter, - GetEntryPointFromAccount, - SmartContractAccount, - UserOperationRequest, -} from "@aa-sdk/core"; -import type { Hex } from "viem"; -import type { GetPluginAddressParameter } from "../types"; - -export type SignerType = "EOA" | "CONTRACT"; - -export type UserOpSignatureType = "ACTUAL" | "UPPERLIMIT"; - -export type Signature = { - signerType: SignerType; - userOpSigType: UserOpSignatureType; - signer: `0x${string}`; - signature: `0x${string}`; -}; - -export type SignMultisigUserOperationResult = { - signature: Hex; - aggregatedSignature: Hex; - signatureObj: Signature; -}; - -export type SignMultisigUserOperationParams< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - userOperationRequest: UserOperationRequest; - signatures: Signature[]; -} & GetAccountParameter & - GetPluginAddressParameter; - -export type ProposeUserOperationResult< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - request: UserOperationRequest; - aggregatedSignature: Hex; - signatureObj: Signature; -}; - -export type MultisigUserOperationContext = { - userOpSignatureType: - | Extract - | Extract; - aggregatedSignature?: Hex; - signatures?: Signature[]; -}; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/combineSignatures.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/utils/combineSignatures.ts deleted file mode 100644 index f4a6c1daca..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/combineSignatures.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { type Hex, concat, pad } from "viem"; -import type { Signature } from "../types.js"; -import { formatSignatures } from "./formatSignatures.js"; - -export type CombineSignaturesParams = { - upperLimitPvg: Hex; - upperLimitMaxFeePerGas: Hex; - upperLimitMaxPriorityFeePerGas: Hex; - signatures: Signature[]; - usingMaxValues: boolean; -}; - -/** - * Combines multiple signatures with provided upper limit values for gas fees and returns the concatenated result. - * - * @example - * ```ts - * import { combineSignatures } from "@account-kit/smart-contracts"; - * - * const combinedSignature = combineSignatures({ - * // this is the upper limit pre-verification gas - * upperLimitPvg: "0x01", - * upperLimitMaxFeePerGas: "0x02", - * upperLimitMaxPriorityFeePerGas: "0x03", - * signatures: [{ - * signerType: "EOA", - * userOpSigType: "UPPERLIMIT", - * signer: `0x...`, - * signature: `0x...`, - * }] - * usingMaxValues: false, - * }); - * ``` - * - * @param {CombineSignaturesParams} params The function parameters - * @returns {Hex} The concatenated result of padding and formatting the provided values and signatures - */ -export function combineSignatures({ - signatures, - upperLimitMaxFeePerGas, - upperLimitMaxPriorityFeePerGas, - upperLimitPvg, - usingMaxValues, -}: CombineSignaturesParams): Hex { - return concat([ - pad(upperLimitPvg), - pad(upperLimitMaxFeePerGas), - pad(upperLimitMaxPriorityFeePerGas), - formatSignatures(signatures, usingMaxValues), - ]); -} diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/formatSignatures.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/utils/formatSignatures.ts deleted file mode 100644 index 4950495006..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/formatSignatures.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { takeBytes } from "@aa-sdk/core"; -import { concat, hexToBigInt, pad, toHex } from "viem"; -import type { Signature } from "../types"; - -/** - * Formats a collection of Signature objects into a single aggregated signature. - * The format is in the form of EOA_SIGS | CONTRACT_SIG_DATAS. The signatures are ordered - * by signer address. The EOA SIGS contain the 65 signautre data for EOA signers and 65 bytes containing SIGNER | OFFSET | V for contract signers. - * The OFFSET is used to fetch the signature data from the CONTRACT_SIG_DATAS. - * - * @param {Signature[]} signatures the array of Signature objects to combine into the correct aggregated signature format excluding the upper limits - * @param {boolean} usingMaxValues a boolean indicating wether or not the UserOperation is using the UPPER_LIMIT for the gas and fee values - * @returns {Hex} the Hex representation of the signature - */ -export const formatSignatures = ( - signatures: Signature[], - usingMaxValues: boolean = false, -) => { - let eoaSigs: string = ""; - let contractSigs: string = ""; - let offset: bigint = BigInt(65 * signatures.length); - signatures - .sort((a, b) => { - const bigintA = hexToBigInt(a.signer); - const bigintB = hexToBigInt(b.signer); - - return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0; - }) - .forEach((sig) => { - // add 32 to v if the signature covers the actual gas values - const addV = sig.userOpSigType === "ACTUAL" && !usingMaxValues ? 32 : 0; - - if (sig.signerType === "EOA") { - let v = - parseInt(takeBytes(sig.signature, { count: 1, offset: 64 })) + addV; - eoaSigs += concat([ - takeBytes(sig.signature, { count: 64 }), - toHex(v, { size: 1 }), - ]).slice(2); - } else { - const sigLen = BigInt(sig.signature.slice(2).length / 2); - eoaSigs += concat([ - pad(sig.signer), - toHex(offset, { size: 32 }), - toHex(addV, { size: 1 }), - ]).slice(2); - contractSigs += concat([ - toHex(sigLen, { size: 32 }), - sig.signature, - ]).slice(2); - offset += sigLen; - } - }); - return ("0x" + eoaSigs + contractSigs) as `0x${string}`; -}; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/getSignerType.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/utils/getSignerType.ts deleted file mode 100644 index adc1b271cf..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/getSignerType.ts +++ /dev/null @@ -1,65 +0,0 @@ -import type { SmartAccountSigner, SmartContractAccount } from "@aa-sdk/core"; -import { - type Chain, - type Client, - type Hex, - type PublicActions, - type PublicRpcSchema, - size, - type Transport, -} from "viem"; -import type { SignerType } from "../types"; - -type GetSignerTypeParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TClient extends Client< - TTransport, - TChain, - TAccount, - PublicRpcSchema, - PublicActions - > = Client, -> = { - signer: SmartAccountSigner; - signature: Hex; - client: TClient; -}; - -/** - * Determines the type of signer (Externally Owned Account (EOA) or CONTRACT) based on the provided client, signature, and signer. - * - * @example - * ```ts - * import { getSignerType } from "@account-kit/smart-contracts"; - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { createPublicClient, generatePrivateKey } from "viem"; - * - * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - * const client = createPublicClient(...); - * const signature = signer.signMessage("Hello World"); - * - * const signerType = await getSignerType({ client, signature, signer }); // EOA - * ``` - * - * @param {GetSignerTypeParams} params the parameters including the client, signature, and signer - * @returns {Promise} A promise that resolves to the signer type, which is either "EOA" or "CONTRACT" - */ -export const getSignerType = async < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, ->({ - client, - signature, - signer, -}: GetSignerTypeParams): Promise => { - const signerAddress = await signer.getAddress(); - const byteCode = await client.getBytecode({ address: signerAddress }); - - return (byteCode ?? "0x") === "0x" && size(signature) === 65 - ? "EOA" - : "CONTRACT"; -}; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/index.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/utils/index.ts deleted file mode 100644 index 76de8d3ac9..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type * from "./combineSignatures.js"; -export { combineSignatures } from "./combineSignatures.js"; -export type * from "./formatSignatures.js"; -export { formatSignatures } from "./formatSignatures.js"; -export type * from "./getSignerType.js"; -export { getSignerType } from "./getSignerType.js"; -export type * from "./splitAggregatedSignature.js"; -export { splitAggregatedSignature } from "./splitAggregatedSignature.js"; diff --git a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/splitAggregatedSignature.ts b/account-kit/smart-contracts/src/msca/plugins/multisig/utils/splitAggregatedSignature.ts deleted file mode 100644 index 8aa84672b1..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/multisig/utils/splitAggregatedSignature.ts +++ /dev/null @@ -1,138 +0,0 @@ -import { - takeBytes, - type GetEntryPointFromAccount, - type SmartContractAccount, - type UserOperationRequest, -} from "@aa-sdk/core"; -import { fromHex, hashMessage, recoverAddress, type Hex } from "viem"; -import { InvalidAggregatedSignatureError } from "../../../errors.js"; -import type { Signature } from "../types.js"; - -export type SplitAggregateSignatureParams< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - aggregatedSignature: Hex; - threshold: number; - account: SmartContractAccount; - request: UserOperationRequest; -}; - -export type SplitAggregateSignatureResult = { - upperLimitPvg: Hex; - upperLimitMaxFeePerGas: Hex; - upperLimitMaxPriorityFeePerGas: Hex; - signatures: Signature[]; -}; - -/** - * Takes an aggregated signature and threshold and splits it into its components - * - * @param {SplitAggregateSignatureParams} args - the arguments for the split - * @param {Hex} args.aggregateSignature - the aggregated signature to split - * @param {number} args.threshold - the threshold for the signature - * @param {SmartContractAccount} args.account - the account which the signature is valid for - * @param {UserOperationRequest} args.request - the user operation request that the signature is for - * @returns {Promise} the signature split into its upper limits and current signatures - */ -export const splitAggregatedSignature = async < - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - args: SplitAggregateSignatureParams, -): Promise => { - const { aggregatedSignature, threshold, account, request } = args; - if (aggregatedSignature.length < 192 + (65 * threshold - 1)) { - throw new InvalidAggregatedSignatureError(); - } - - // UserOp.sig format: - // 0-32: upperLimitPreVerificationGas - // 32-64: upperLimitMaxFeePerGas - // 64-96: upperLimitMaxPriorityFeePerGas - // 96-96+n: k signatures, each sig is 65 bytes each (so n = 65 * k) - // 96+n-: contract signatures if any - const pvg = takeBytes(aggregatedSignature, { count: 32 }); - const maxFeePerGas = takeBytes(aggregatedSignature, { - count: 32, - offset: 32, - }); - const maxPriorityFeePerGas = takeBytes(aggregatedSignature, { - count: 32, - offset: 64, - }); - const signaturesAndData = takeBytes(aggregatedSignature, { - offset: 96, - }); - - const signatureHexes = (() => { - const signatureStr = takeBytes(signaturesAndData, { - count: 65 * threshold - 1, - }); - const signatures: Hex[] = []; - for (let i = 0; i < threshold - 1; i++) { - signatures.push(takeBytes(signatureStr, { count: 65, offset: i * 65 })); - } - - return signatures; - })(); - - const signatures: Promise[] = signatureHexes.map( - async (signature): Promise => { - // in RSV, v is the last byte of a 65 byte signature - const v = BigInt(takeBytes(signature, { count: 1, offset: 64 })); - const signerType = v === 0n ? "CONTRACT" : "EOA"; - if (signerType === "EOA") { - // To recover the signer from just the user op and the raw EOA signature, we need to perform an EC recover. The input hash to recover from should be the original user op hash, with the upper limit gas values, wrapped in the standard EIP-191 wrapper format. - const hash = hashMessage({ - raw: account.getEntryPoint().getUserOperationHash({ - ...request, - preVerificationGas: pvg, - maxFeePerGas, - maxPriorityFeePerGas, - }), - }); - - return { - // the signer doesn't get used here for EOAs - // TODO: nope. this needs to actually do an ec recover - signer: await recoverAddress({ hash, signature }), - signature, - signerType, - userOpSigType: "UPPERLIMIT", - }; - } - - const signer = takeBytes(signature, { count: 20, offset: 12 }); - const offset = fromHex( - takeBytes(signature, { count: 32, offset: 32 }), - "number", - ); - const signatureLength = fromHex( - takeBytes(signaturesAndData, { count: 32, offset }), - "number", - ); - - return { - signer, - signerType, - userOpSigType: "UPPERLIMIT", - signature: takeBytes(signaturesAndData, { - count: signatureLength, - offset: offset + 32, - }), - }; - }, - ); - - return { - upperLimitPvg: pvg, - upperLimitMaxFeePerGas: maxFeePerGas, - upperLimitMaxPriorityFeePerGas: maxPriorityFeePerGas, - signatures: await Promise.all(signatures), - }; -}; diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.ts deleted file mode 100644 index 30349a11fd..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.ts +++ /dev/null @@ -1,111 +0,0 @@ -export const SessionKeyPermissionsUpdatesAbi = [ - { - type: "function", - name: "setAccessListType", - inputs: [ - { - name: "contractAccessControlType", - type: "uint8", - internalType: "enum ISessionKeyPlugin.ContractAccessControlType", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setERC20SpendLimit", - inputs: [ - { name: "token", type: "address", internalType: "address" }, - { name: "spendLimit", type: "uint256", internalType: "uint256" }, - { - name: "refreshInterval", - type: "uint48", - internalType: "uint48", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setGasSpendLimit", - inputs: [ - { name: "spendLimit", type: "uint256", internalType: "uint256" }, - { - name: "refreshInterval", - type: "uint48", - internalType: "uint48", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setNativeTokenSpendLimit", - inputs: [ - { name: "spendLimit", type: "uint256", internalType: "uint256" }, - { - name: "refreshInterval", - type: "uint48", - internalType: "uint48", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setRequiredPaymaster", - inputs: [ - { - name: "requiredPaymaster", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateAccessListAddressEntry", - inputs: [ - { - name: "contractAddress", - type: "address", - internalType: "address", - }, - { name: "isOnList", type: "bool", internalType: "bool" }, - { name: "checkSelectors", type: "bool", internalType: "bool" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateAccessListFunctionEntry", - inputs: [ - { - name: "contractAddress", - type: "address", - internalType: "address", - }, - { name: "selector", type: "bytes4", internalType: "bytes4" }, - { name: "isOnList", type: "bool", internalType: "bool" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateTimeRange", - inputs: [ - { name: "validAfter", type: "uint48", internalType: "uint48" }, - { name: "validUntil", type: "uint48", internalType: "uint48" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/debug-session-key-bytecode.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/debug-session-key-bytecode.ts deleted file mode 100644 index d1f4d158eb..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/debug-session-key-bytecode.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Bytecode for a modified debug-version of the Session Key Plugin, to be used - * in state overrides to produce more descriptive errors on permission failures. - * - * Compiled from - * https://github.com/alchemyplatform/modular-account/tree/ed36ad6483ef06b61e7c096a6615b318c47379be - */ -export const DEBUG_SESSION_KEY_BYTECODE = - "0x6040608081526004908136101561001557600080fd5b6000803560e01c806331d99c2c146100975763af8734831461003657600080fd5b34610090576003196060368201126100935783359160ff83168303610090576024359167ffffffffffffffff831161009357610160908336030112610090575092610089916020946044359201906106ed565b9051908152f35b80fd5b5080fd5b50823461009357826003193601126100935767ffffffffffffffff81358181116105255736602382011215610525578083013590828211610521576024926024820191602436918560051b01011161051d576001600160a01b0394602435868116810361051957604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b039093169083015220548761016f8233606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b91895b87811061045d57505060ff825460781c16156103ef575b5080549060ff8260801c166103b6575b50506101a88497959894610584565b956101b58551978861054c565b8787526101c188610584565b98602098601f19809b01885b8181106103a7575050875b818110610256575050505050505080519380850191818652845180935281818701918460051b880101950193965b8388106102135786860387f35b9091929394838080600193603f198b820301875285601f8b5161024181518092818752878088019101610529565b01160101970193019701969093929193610206565b6102668183899e9b9d9a9e61059c565b803585811680910361039557908c8a928f898e610285838701876105d9565b9790935196879586947f38997b1100000000000000000000000000000000000000000000000000000000865285015201358a83015260606044830152866064830152866084938484013784838884010152601f80970116810103018183335af191821561039d578d9261031a575b505090600191610303828d610628565b5261030e818c610628565b50019a9699979a6101d8565b9091503d808e843e61032c818461054c565b8201918a818403126103915780519089821161039957019081018213156103955790818e92519161036861035f8461060c565b9451948561054c565b8284528b8383010111610391578291610389918c8060019796019101610529565b90918e6102f3565b8d80fd5b8c80fd5b8e80fd5b8e513d8f823e3d90fd5b60608b82018d01528b016101cd565b70ff00000000000000000000000000000000199091168155600101805465ffffffffffff19164265ffffffffffff161790558880610199565b6104029060068301906002840190611191565b1561040d5789610189565b610459828a5191829162461bcd60e51b8352820160609060208152601460208201527f5370656e64206c696d697420657863656564656400000000000000000000000060408201520190565b0390fd5b6104713661046c838b8b61059c565b610673565b926104826020918286015190611042565b938d6104928d83511686336110b0565b9160ff835460101c166104ac575b50505050600101610172565b6104ca92916104bc910151611146565b600160028301920190611191565b156104d757808d816104a0565b85601a8b8f93606494519362461bcd60e51b85528401528201527f4552433230207370656e64206c696d69742065786365656465640000000000006044820152fd5b8780fd5b8580fd5b8480fd5b8380fd5b60005b83811061053c5750506000910152565b818101518382015260200161052c565b90601f8019910116810190811067ffffffffffffffff82111761056e57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161056e5760051b60200190565b91908110156105c35760051b81013590605e19813603018212156105be570190565b600080fd5b634e487b7160e01b600052603260045260246000fd5b903590601e19813603018212156105be570180359067ffffffffffffffff82116105be576020019181360383136105be57565b67ffffffffffffffff811161056e57601f01601f191660200190565b80518210156105c35760209160051b010190565b9291926106488261060c565b91610656604051938461054c565b8294818452818301116105be578281602093846000960137010152565b91906060838203126105be576040519067ffffffffffffffff606083018181118482101761056e57604052829480356001600160a01b03811681036105be5784526020810135602085015260408101359182116105be570181601f820112156105be576040918160206106e89335910161063c565b910152565b60ff161561073957606460405162461bcd60e51b815260206004820152602060248201527f57726f6e672066756e6374696f6e20696420666f722076616c69646174696f6e6044820152fd5b61074660608201826105d9565b806004949294116105be57830192604081850360031901126105be5767ffffffffffffffff9360048201358581116105be57820194816023870112156105be5760048601359561079587610584565b966107a3604051988961054c565b8088526024602089019160051b830101928484116105be5760248301915b84831061101b5750505050505060240135906001600160a01b03821682036105be577f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52610830603c60002061082a6108236101408601866105d9565b369161063c565b90611065565b600581101561100557610f9c5760806040513381527ff938c976000000000000000000000000000000000000000000000000000000006020820152600160408201526bffffffffffffffffffffffff198460601b166060820152205415610f5857604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b03851691810191909152902054926109058433606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b9081549465ffffffffffff8660081c16966000918151918215610f145760005b838110610ed2575050505060ff8660781c1615610d50575b5060ff8560701c16610aa8575b60ff825460681c166109db575b50506001600160a01b039182169116036109a85765ffffffffffff60a01b7fffffffffffff00000000000000000000000000000000000000000000000000006000935b60d01b169160681b16171790565b65ffffffffffff60a01b7fffffffffffff000000000000000000000000000000000000000000000000000060019361099a565b806101206109ea9201906105d9565b6bffffffffffffffffffffffff199135918216929160148210610a6c575b505060036001600160a01b03910154169060601c03610a28573880610957565b606460405162461bcd60e51b815260206004820152601b60248201527f4d75737420757365207265717569726564207061796d617374657200000000006044820152fd5b6001600160a01b03929350906003916bffffffffffffffffffffffff19916bffffffffffffffffffffffff1990601403841b1b16169291610a08565b946001600160a01b038416602087013560401c03610cc057610ace6101208701876105d9565b159050610cab57610b11610b06610afb610af160ff60035b1660a08b013561109d565b60808a0135611042565b60c089013590611042565b60e08801359061109d565b9060009060018401546005850154906004860154908583810110610c675765ffffffffffff8160301c1615600014610ba6575081850111610b6157610b5b9301600585015561154f565b9461094a565b60405162461bcd60e51b815260206004820152601260248201527f476173206c696d697420657863656564656400000000000000000000000000006044820152606490fd5b92935093848282011115600014610bf657610b5b945001600585015560ff8760801c16600014610bee578065ffffffffffff80610be89360301c169116611177565b9061154f565b506000610be8565b809392949150111580610c59575b15610b6157610c248365ffffffffffff80610b5b9660301c169116611177565b9170010000000000000000000000000000000070ff00000000000000000000000000000000198916178555600585015561154f565b5060ff8760801c1615610c04565b606460405162461bcd60e51b815260206004820152601260248201527f476173206c696d6974206f766572666c6f7700000000000000000000000000006044820152fd5b610b11610b06610afb610af160ff6001610ae6565b60a460405162461bcd60e51b815260206004820152604f60248201527f4d757374207573652073657373696f6e206b6579206173206b657920706f727460448201527f696f6e206f66206e6f6e6365207768656e20676173206c696d6974206368656360648201527f6b696e6720697320656e61626c656400000000000000000000000000000000006084820152fd5b6000969196906002840154906007850154906006860154928183810110610e8e5765ffffffffffff8160301c1615600014610de157500111610d9c57610d959161154f565b943861093d565b60405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d69742065786365656465640000000000000000000000006044820152606490fd5b94928092820111610df9575b5050610d95925061154f565b91925010610e2457610e1c8265ffffffffffff80610d959560301c169116611177565b903880610ded565b608460405162461bcd60e51b815260206004820152603260248201527f5370656e64206c696d69742065786365656465642c206576656e20696e636c7560448201527f64696e67206e65787420696e74657276616c00000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d6974206f766572666c6f770000000000000000000000006044820152fd5b80610f0e8b610ef3610ee660019587610628565b519860208a015190611042565b978660ff60406001600160a01b0384511693015193166112bf565b01610925565b606460405162461bcd60e51b815260206004820152601b60248201527f4d7573742068617665206174206c65617374206f6e652063616c6c00000000006044820152fd5b606460405162461bcd60e51b815260206004820152601360248201527f556e6b6e6f776e2073657373696f6e206b6579000000000000000000000000006044820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f5369676e617475726520646f6573206e6f74206d617463682073657373696f6e60448201527f206b6579000000000000000000000000000000000000000000000000000000006064820152fd5b634e487b7160e01b600052602160045260246000fd5b82358281116105be576020916110378860248594890101610673565b8152019201916107c1565b9190820180921161104f57565b634e487b7160e01b600052601160045260246000fd5b9060418151146000146110935761108f916020820151906060604084015193015160001a90611230565b9091565b5050600090600290565b8181029291811591840414171561104f57565b9061111192916040519260a08401604052608084526001600160a01b0380921660208501527f634c29f50000000000000000000000000000000000000000000000000000000060408501521690606083015260808201526020815191012090565b90565b90602082519201516001600160e01b031990818116936004811061113757505050565b60040360031b82901b16169150565b61115761115282611114565b61156c565b6111615750600090565b6044815110611171576044015190565b50600090565b91909165ffffffffffff8080941691160191821161104f57565b9181549165ffffffffffff90818460301c169160018454940194855493828115928315611218575b5050506000146111ee57505083019283109081156111e4575b506111dd5755600190565b5050600090565b90508211386111d2565b9391509391821161120f5755421665ffffffffffff19825416179055600190565b50505050600090565b611223935016611177565b81429116113882816111b9565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116112b35791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156112a65781516001600160a01b038116156112a0579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b91926112ca90611114565b926112d68183336110b0565b926003811015611005578061147d5750825460ff8116156114395760081c60ff1615611433578361130a9160ff93336115cb565b5416156113c95760ff905b5460101c1690816113b8575b5061132857565b60a460405162461bcd60e51b815260206004820152604460248201527f46756e6374696f6e2073656c6563746f72206e6f7420616c6c6f77656420666f60448201527f7220455243323020636f6e74726163742077697468207370656e64696e67206c60648201527f696d6974000000000000000000000000000000000000000000000000000000006084820152fd5b6113c2915061156c565b1538611321565b608460405162461bcd60e51b815260206004820152602260248201527f46756e6374696f6e2073656c6563746f72206e6f74206f6e20616c6c6f776c6960448201527f73740000000000000000000000000000000000000000000000000000000000006064820152fd5b50505050565b606460405162461bcd60e51b815260206004820152601f60248201527f5461726765742061646472657373206e6f74206f6e20616c6c6f776c697374006044820152fd5b60011461148f575b505060ff90611315565b825460ff8116156115485760081c60ff161561150457836114b39160ff93336115cb565b54166114c0573880611485565b606460405162461bcd60e51b815260206004820152601d60248201527f46756e6374696f6e2073656c6563746f72206f6e2064656e796c6973740000006044820152fd5b606460405162461bcd60e51b815260206004820152601a60248201527f5461726765742061646472657373206f6e2064656e796c6973740000000000006044820152fd5b5050505050565b9065ffffffffffff8082169083161115611567575090565b905090565b6001600160e01b0319167fa9059cbb0000000000000000000000000000000000000000000000000000000081149081156115a4575090565b7f095ea7b30000000000000000000000000000000000000000000000000000000091501490565b926001600160e01b0319611111946040519460a08601604052608086526001600160a01b0380921660208701527fd50536f0000000000000000000000000000000000000000000000000000000006040870152169116179060608301526080820152602081519101209056fea26469706673582212201c78177154c86c4d5ed4f532b4017a1d665037d4831a7cd69e8e8bd8408ab3e764736f6c63430008160033"; diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/extension.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/extension.ts deleted file mode 100644 index 192d53f562..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/extension.ts +++ /dev/null @@ -1,316 +0,0 @@ -import type { - GetEntryPointFromAccount, - UserOperationOverridesParameter, -} from "@aa-sdk/core"; -import { - AccountNotFoundError, - isSmartAccountClient, - type GetAccountParameter, - type IsUndefined, - type SendUserOperationResult, - type SmartContractAccount, - type UserOperationOverrides, -} from "@aa-sdk/core"; -import type { Address, Chain, Client, Hex, Transport } from "viem"; -import type { GetPluginAddressParameter } from "../types.js"; -import { - SessionKeyPlugin, - sessionKeyPluginActions as sessionKeyPluginActions_, - type SessionKeyPluginActions as SessionKeyPluginActions_, -} from "./plugin.js"; -import { buildSessionKeysToRemoveStruct } from "./utils.js"; - -export type SessionKeyPluginActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = Omit< - SessionKeyPluginActions_, - | "removeSessionKey" - | "addSessionKey" - | "rotateSessionKey" - | "updateKeyPermissions" -> & { - isAccountSessionKey: ( - args: { key: Address } & GetPluginAddressParameter & - GetAccountParameter, - ) => Promise; - - getAccountSessionKeys: ( - args: GetPluginAddressParameter & GetAccountParameter, - ) => Promise>; - - removeSessionKey: ( - args: { key: Address } & GetPluginAddressParameter & - GetAccountParameter & - UserOperationOverridesParameter, - ) => Promise>; - - addSessionKey: ( - args: { - key: Address; - permissions: Hex[]; - tag: Hex; - } & GetPluginAddressParameter & - GetAccountParameter & - UserOperationOverridesParameter, - ) => Promise>; - - rotateSessionKey: ( - args: { - oldKey: Address; - newKey: Address; - } & GetPluginAddressParameter & - GetAccountParameter & - UserOperationOverridesParameter, - ) => Promise>; - - updateSessionKeyPermissions: ( - args: { - key: Address; - permissions: Hex[]; - } & GetPluginAddressParameter & - GetAccountParameter & - UserOperationOverridesParameter, - ) => Promise>; -} & (IsUndefined extends false - ? { - getAccountSessionKeys: ( - args?: GetPluginAddressParameter & GetAccountParameter, - ) => Promise>; - } - : {}); - -/** - * Creates actions for managing session keys in a smart contract associated with a client, including adding, removing, rotating, and updating session key permissions. - * - * @example - * ```ts - * import { createModularAccountAlchemyClient, sessionKeyPluginActions } from "@account-kit/smart-contracts"; - * - * const client = createModularAccountAlchemyClient(...).extend(sessionKeyPluginActions); - * ``` - * - * @param {Client} client The client instance to use for managing session keys - * @returns {SessionKeyPluginActions} An object containing methods for session key management and interaction with the smart contract - */ -export const sessionKeyPluginActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, -) => SessionKeyPluginActions = < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, ->( - client: Client, -) => { - const { - removeSessionKey, - addSessionKey, - rotateSessionKey, - updateKeyPermissions, - executeWithSessionKey, - ...og - } = sessionKeyPluginActions_(client); - - // The session key plugin returns an opaque error when the permissions check - // fails. We want the SDK to return a helpful error instead. After validation - // fails, rerun the user op simulation but using state overrides to replace - // the code of the session key plugin with a version that produces descriptive - // errors. - const fixedExecuteWithSessionKey: typeof executeWithSessionKey = async ( - ...originalArgs - ) => { - let initialError: unknown; - try { - return await executeWithSessionKey(...originalArgs); - } catch (error) { - initialError = error; - } - const details = getRpcErrorMessageFromViemError(initialError); - if (!details?.includes("AA23 reverted (or OOG)")) { - throw initialError; - } - if (!isSmartAccountClient(client) || !client.chain) { - throw initialError; - } - const { - args, - overrides, - context, - account = client.account, - } = originalArgs[0]; - if (!account) { - throw initialError; - } - const data = og.encodeExecuteWithSessionKey({ args }); - const sessionKeyPluginAddress = - SessionKeyPlugin.meta.addresses[client.chain.id]; - // The bytecode is 10kb of hex. Only import it if needed. - const { DEBUG_SESSION_KEY_BYTECODE } = await import( - "./debug-session-key-bytecode.js" - ); - const updatedOverrides: UserOperationOverrides = { - ...(overrides as UserOperationOverrides), - stateOverride: [ - ...(overrides?.stateOverride ?? []), - { - address: sessionKeyPluginAddress, - code: DEBUG_SESSION_KEY_BYTECODE, - }, - ], - }; - try { - await client.buildUserOperation({ - uo: data, - overrides: updatedOverrides, - context, - account, - }); - // We expect this to fail because we just saw the same user op fail a - // moment ago. It could succeed if the state of the chain has changed but - // there's not much we can do with a successful result so return the - // original error. - throw initialError; - } catch (improvedError) { - const details = getRpcErrorMessageFromViemError(improvedError) ?? ""; - const reason = details.match(/AA23 reverted: (.+)/)?.[1]; - if (!reason) { - throw initialError; - } - throw new SessionKeyPermissionError(reason); - } - }; - - return { - ...og, - - executeWithSessionKey: fixedExecuteWithSessionKey, - - isAccountSessionKey: async ({ - key, - pluginAddress, - account = client.account, - }) => { - if (!account) throw new AccountNotFoundError(); - - const contract = SessionKeyPlugin.getContract(client, pluginAddress); - - return await contract.read.isSessionKeyOf([account.address, key]); - }, - - getAccountSessionKeys: async ( - args: GetPluginAddressParameter & GetAccountParameter, - ) => { - const account = args?.account ?? client.account; - if (!account) throw new AccountNotFoundError(); - - const contract = SessionKeyPlugin.getContract( - client, - args?.pluginAddress, - ); - - return await contract.read.sessionKeysOf([account.address]); - }, - - removeSessionKey: async ({ - key, - overrides, - account = client.account, - pluginAddress, - }) => { - if (!account) throw new AccountNotFoundError(); - - const sessionKeysToRemove = await buildSessionKeysToRemoveStruct(client, { - keys: [key], - account, - pluginAddress, - }); - - return removeSessionKey({ - args: [key, sessionKeysToRemove[0].predecessor], - overrides: overrides as UserOperationOverrides, - account, - }); - }, - - addSessionKey: async ({ - key, - tag, - permissions, - overrides, - pluginAddress, - account = client.account, - }) => { - if (!account) throw new AccountNotFoundError(); - - return addSessionKey({ - args: [key, tag, permissions], - overrides: overrides as UserOperationOverrides, - account, - pluginAddress, - }); - }, - - rotateSessionKey: async ({ - newKey, - oldKey, - overrides, - pluginAddress, - account = client.account, - }) => { - if (!account) throw new AccountNotFoundError(); - - const contract = SessionKeyPlugin.getContract(client, pluginAddress); - - const predecessor = await contract.read.findPredecessor([ - account.address, - oldKey, - ]); - - return rotateSessionKey({ - args: [oldKey, predecessor, newKey], - overrides: overrides as UserOperationOverrides, - account, - pluginAddress, - }); - }, - - updateSessionKeyPermissions: async ({ - key, - permissions, - overrides, - pluginAddress, - account = client.account, - }) => { - if (!account) throw new AccountNotFoundError(); - - return updateKeyPermissions({ - args: [key, permissions], - overrides: overrides as UserOperationOverrides< - GetEntryPointFromAccount - >, - account, - pluginAddress, - }); - }, - }; -}; - -function getRpcErrorMessageFromViemError(error: unknown): string | undefined { - const details = (error as any)?.details; - return typeof details === "string" ? details : undefined; -} - -class SessionKeyPermissionError extends Error {} diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/index.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/index.ts deleted file mode 100644 index 1d24a5fb9d..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type * from "./extension.js"; -export { sessionKeyPluginActions } from "./extension.js"; - -export { - SessionKeyPlugin, - SessionKeyPluginAbi, - SessionKeyPluginExecutionFunctionAbi, - type InstallSessionKeyPluginParams, -} from "./plugin.js"; diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts deleted file mode 100644 index 946034861e..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts +++ /dev/null @@ -1,338 +0,0 @@ -import { encodeFunctionData, type Address, type Hex } from "viem"; -import { SessionKeyPermissionsUpdatesAbi } from "./SessionKeyPermissionsUpdatesAbi.js"; - -export enum SessionKeyAccessListType { - ALLOWLIST = 0, - DENYLIST = 1, - ALLOW_ALL_ACCESS = 2, -} - -export type ContractAccessEntry = { - // The contract address to add or remove. - contractAddress: Address; - // Whether the contract address should be on the list. - isOnList: boolean; - // Whether to check selectors for the contract address. - checkSelectors: boolean; -}; - -export type ContractMethodEntry = { - // The contract address to add or remove. - contractAddress: Address; - // The function selector to add or remove. - methodSelector: Hex; - // Whether the function selector should be on the list. - isOnList: boolean; -}; - -export type TimeRange = { - validFrom: number; - validUntil: number; -}; - -export type NativeTokenLimit = { - spendLimit: bigint; - // The time interval over which the spend limit is enforced. If unset, there is no time - /// interval by which the limit is refreshed. - refreshInterval?: number; -}; - -export type Erc20TokenLimit = { - tokenAddress: Address; - spendLimit: bigint; - // The time interval over which the spend limit is enforced. If unset, there is no time - /// interval by which the limit is refreshed. - refreshInterval?: number; -}; - -// uint256 spendLimit, uint48 refreshInterval -export type GasSpendLimit = { - // The amount, in wei, of native tokens that a session key can spend on gas. - // Note that this is not the same as the gas limit for a user operation, which is measured in units of gas. - // This tracks gas units * gas price. - spendLimit: bigint; - // The time interval over which the spend limit is enforced. If unset, there is no time - /// interval by which the limit is refreshed. - refreshInterval?: number; -}; - -/** - * A builder for creating the hex-encoded data for updating session key permissions. - */ -export class SessionKeyPermissionsBuilder { - private _contractAccessControlType: SessionKeyAccessListType = - SessionKeyAccessListType.ALLOWLIST; - private _contractAddressAccessEntrys: ContractAccessEntry[] = []; - private _contractMethodAccessEntrys: ContractMethodEntry[] = []; - private _timeRange?: TimeRange; - private _nativeTokenSpendLimit?: NativeTokenLimit; - private _erc20TokenSpendLimits: Erc20TokenLimit[] = []; - private _gasSpendLimit?: GasSpendLimit; - private _requiredPaymaster?: Address; - - /** - * Sets the access control type for the contract and returns the current instance for method chaining. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST); - * ``` - * - * @param {SessionKeyAccessListType} aclType The access control type for the session key - * @returns {SessionKeyPermissionsBuilder} The current instance for method chaining - */ - public setContractAccessControlType(aclType: SessionKeyAccessListType) { - this._contractAccessControlType = aclType; - return this; - } - - /** - * Adds a contract access entry to the internal list of contract address access entries. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.addContractAddressAccessEntry({ - * contractAddress: "0x1234", - * isOnList: true, - * checkSelectors: true, - * }); - * ``` - * - * @param {ContractAccessEntry} entry the contract access entry to be added - * @returns {SessionKeyPermissionsBuilder} the instance of the current class for chaining - */ - public addContractAddressAccessEntry(entry: ContractAccessEntry) { - this._contractAddressAccessEntrys.push(entry); - return this; - } - - /** - * Adds a contract method entry to the `_contractMethodAccessEntrys` array. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.addContractAddressAccessEntry({ - * contractAddress: "0x1234", - * methodSelector: "0x45678", - * isOnList: true, - * }); - * ``` - * - * @param {ContractMethodEntry} entry The contract method entry to be added - * @returns {SessionKeyPermissionsBuilder} The instance of the class for method chaining - */ - public addContractFunctionAccessEntry(entry: ContractMethodEntry) { - this._contractMethodAccessEntrys.push(entry); - return this; - } - - /** - * Sets the time range for an object and returns the object itself for chaining. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.setTimeRange({ - * validFrom: Date.now(), - * validUntil: Date.now() + (15 * 60 * 1000), - * }); - * ``` - * - * @param {TimeRange} timeRange The time range to be set - * @returns {SessionKeyPermissionsBuilder} The current object for method chaining - */ - public setTimeRange(timeRange: TimeRange) { - this._timeRange = timeRange; - return this; - } - - /** - * Sets the native token spend limit and returns the instance for chaining. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.setNativeTokenSpendLimit({ - * spendLimit: 1000000000000000000n, - * refreshInterval: 3600, - * }); - * ``` - * - * @param {NativeTokenLimit} limit The limit to set for native token spending - * @returns {SessionKeyPermissionsBuilder} The instance for chaining - */ - public setNativeTokenSpendLimit(limit: NativeTokenLimit) { - this._nativeTokenSpendLimit = limit; - return this; - } - - /** - * Adds an ERC20 token spend limit to the list of limits and returns the updated object. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.addErc20TokenSpendLimit({ - * tokenAddress: "0x1234", - * spendLimit: 1000000000000000000n, - * refreshInterval: 3600, - * }); - * ``` - * - * @param {Erc20TokenLimit} limit The ERC20 token spend limit to be added - * @returns {object} The updated object with the new ERC20 token spend limit - */ - public addErc20TokenSpendLimit(limit: Erc20TokenLimit) { - this._erc20TokenSpendLimits.push(limit); - return this; - } - - /** - * Sets the gas spend limit and returns the current instance for method chaining. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.setGasSpendLimit({ - * spendLimit: 1000000000000000000n, - * refreshInterval: 3600, - * }); - * ``` - * - * @param {GasSpendLimit} limit - The gas spend limit to be set - * @returns {SessionKeyPermissionsBuilder} The current instance for chaining - */ public setGasSpendLimit(limit: GasSpendLimit) { - this._gasSpendLimit = limit; - return this; - } - - /** - * Sets the required paymaster address. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.setRequiredPaymaster("0x1234"); - * ``` - * - * @param {Address} paymaster the address of the paymaster to be set - * @returns {SessionKeyPermissionsBuilder} the current instance for method chaining - */ - public setRequiredPaymaster(paymaster: Address) { - this._requiredPaymaster = paymaster; - return this; - } - - /** - * Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits. - * - * @example - * ```ts - * import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - * - * const builder = new SessionKeyPermissionsBuilder(); - * builder.setRequiredPaymaster("0x1234"); - * const encoded = builder.encode(); - * ``` - * - * @returns {Hex[]} An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits. - */ - public encode(): Hex[] { - return [ - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "setAccessListType", - args: [this._contractAccessControlType], - }), - ...this._contractAddressAccessEntrys.map((entry) => - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "updateAccessListAddressEntry", - args: [entry.contractAddress, entry.isOnList, entry.checkSelectors], - }), - ), - ...this._contractMethodAccessEntrys.map((entry) => - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "updateAccessListFunctionEntry", - args: [entry.contractAddress, entry.methodSelector, entry.isOnList], - }), - ), - this.encodeIfDefined( - (timeRange) => - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "updateTimeRange", - args: [timeRange.validFrom, timeRange.validUntil], - }), - this._timeRange, - ), - this.encodeIfDefined( - (nativeSpendLimit) => - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "setNativeTokenSpendLimit", - args: [ - nativeSpendLimit.spendLimit, - nativeSpendLimit.refreshInterval ?? 0, - ], - }), - this._nativeTokenSpendLimit, - ), - ...this._erc20TokenSpendLimits.map((erc20SpendLimit) => - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "setERC20SpendLimit", - args: [ - erc20SpendLimit.tokenAddress, - erc20SpendLimit.spendLimit, - erc20SpendLimit.refreshInterval ?? 0, - ], - }), - ), - this.encodeIfDefined( - (spendLimit) => - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "setGasSpendLimit", - args: [spendLimit.spendLimit, spendLimit.refreshInterval ?? 0], - }), - this._gasSpendLimit, - ), - this.encodeIfDefined( - (paymaster) => - encodeFunctionData({ - abi: SessionKeyPermissionsUpdatesAbi, - functionName: "setRequiredPaymaster", - args: [paymaster], - }), - this._requiredPaymaster, - ), - ].filter((x) => x !== "0x"); - } - - private encodeIfDefined(encode: (param: T) => Hex, param?: T): Hex { - if (!param) return "0x"; - - return encode(param); - } -} diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts deleted file mode 100644 index 476f05df8e..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts +++ /dev/null @@ -1,1326 +0,0 @@ -import { - getContract, - encodePacked, - encodeAbiParameters, - encodeFunctionData, - type Address, - type GetContractReturnType, - type Transport, - type PublicClient, - type Client, - type EncodeFunctionDataParameters, - type Chain, - type Hex, -} from "viem"; -import { - ChainNotFoundError, - AccountNotFoundError, - isSmartAccountClient, - IncompatibleClientError, - type SmartContractAccount, - type GetAccountParameter, - type SendUserOperationResult, - type GetEntryPointFromAccount, - type UserOperationOverridesParameter, - type UserOperationContext, - type GetContextParameter, -} from "@aa-sdk/core"; -import { - installPlugin as installPlugin_, - type Plugin, - type FunctionReference, -} from "@account-kit/smart-contracts"; -import { MultiOwnerPlugin } from "../multi-owner/plugin.js"; - -type ExecutionActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - executeWithSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "executeWithSessionKey" - >, - "args" - > & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter, - ) => Promise>; - - addSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "addSessionKey" - >, - "args" - > & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter, - ) => Promise>; - - removeSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "removeSessionKey" - >, - "args" - > & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter, - ) => Promise>; - - rotateSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "rotateSessionKey" - >, - "args" - > & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter, - ) => Promise>; - - updateKeyPermissions: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "updateKeyPermissions" - >, - "args" - > & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter, - ) => Promise>; -}; - -type InstallArgs = [ - { type: "address[]"; name: "initialKeys" }, - { type: "bytes32[]"; name: "tags" }, - { type: "bytes[][]"; name: "initialPermissions" }, -]; - -export type InstallSessionKeyPluginParams = { - args: Parameters>[1]; - pluginAddress?: Address; - dependencyOverrides?: FunctionReference[]; -}; - -type ManagementActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | Record - | undefined, - TEntryPointVersion extends - GetEntryPointFromAccount = GetEntryPointFromAccount, -> = { - installSessionKeyPlugin: ( - args: UserOperationOverridesParameter & - InstallSessionKeyPluginParams & - GetAccountParameter & - GetContextParameter, - ) => Promise>; -}; - -type ReadAndEncodeActions = { - encodeExecuteWithSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "executeWithSessionKey" - >, - "args" - >, - ) => Hex; - - encodeAddSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "addSessionKey" - >, - "args" - >, - ) => Hex; - - encodeRemoveSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "removeSessionKey" - >, - "args" - >, - ) => Hex; - - encodeRotateSessionKey: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "rotateSessionKey" - >, - "args" - >, - ) => Hex; - - encodeUpdateKeyPermissions: ( - args: Pick< - EncodeFunctionDataParameters< - typeof SessionKeyPluginExecutionFunctionAbi, - "updateKeyPermissions" - >, - "args" - >, - ) => Hex; -}; - -export type SessionKeyPluginActions< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, -> = ExecutionActions & - ManagementActions & - ReadAndEncodeActions; - -const addresses = { - 1: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 10: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 137: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 252: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 2523: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 8453: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 42161: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 80001: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 80002: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 84532: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 421614: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 7777777: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 11155111: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 11155420: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, - 999999999: "0x0000003E0000a96de4058e1E02a62FaaeCf23d8d" as Address, -} as Record; - -export const SessionKeyPlugin: Plugin = { - meta: { - name: "Session Key Plugin", - version: "1.0.1", - addresses, - }, - getContract: ( - client: C, - address?: Address, - ): GetContractReturnType< - typeof SessionKeyPluginAbi, - PublicClient, - Address - > => { - if (!client.chain) throw new ChainNotFoundError(); - - return getContract({ - address: address || addresses[client.chain.id], - abi: SessionKeyPluginAbi, - client: client, - }) as GetContractReturnType< - typeof SessionKeyPluginAbi, - PublicClient, - Address - >; - }, -}; - -export const sessionKeyPluginActions: < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, - TContext extends UserOperationContext | undefined = - | UserOperationContext - | undefined, ->( - client: Client, -) => SessionKeyPluginActions = (client) => ({ - executeWithSessionKey({ - args, - overrides, - context, - account = client.account, - }) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "executeWithSessionKey", - client, - ); - } - - const uo = encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "executeWithSessionKey", - args, - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - }, - addSessionKey({ args, overrides, context, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "addSessionKey", - client, - ); - } - - const uo = encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "addSessionKey", - args, - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - }, - removeSessionKey({ args, overrides, context, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "removeSessionKey", - client, - ); - } - - const uo = encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "removeSessionKey", - args, - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - }, - rotateSessionKey({ args, overrides, context, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "rotateSessionKey", - client, - ); - } - - const uo = encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "rotateSessionKey", - args, - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - }, - updateKeyPermissions({ args, overrides, context, account = client.account }) { - if (!account) { - throw new AccountNotFoundError(); - } - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "updateKeyPermissions", - client, - ); - } - - const uo = encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "updateKeyPermissions", - args, - }); - - return client.sendUserOperation({ uo, overrides, account, context }); - }, - installSessionKeyPlugin({ - account = client.account, - overrides, - context, - ...params - }) { - if (!account) { - throw new AccountNotFoundError(); - } - - if (!isSmartAccountClient(client)) { - throw new IncompatibleClientError( - "SmartAccountClient", - "installSessionKeyPlugin", - client, - ); - } - - const chain = client.chain; - if (!chain) { - throw new ChainNotFoundError(); - } - - const dependencies = params.dependencyOverrides ?? [ - (() => { - const pluginAddress = MultiOwnerPlugin.meta.addresses[chain.id]; - if (!pluginAddress) { - throw new Error( - "missing MultiOwnerPlugin address for chain " + chain.name, - ); - } - - return encodePacked(["address", "uint8"], [pluginAddress, 0x0]); - })(), - - (() => { - const pluginAddress = MultiOwnerPlugin.meta.addresses[chain.id]; - if (!pluginAddress) { - throw new Error( - "missing MultiOwnerPlugin address for chain " + chain.name, - ); - } - - return encodePacked(["address", "uint8"], [pluginAddress, 0x1]); - })(), - ]; - const pluginAddress = - params.pluginAddress ?? - (SessionKeyPlugin.meta.addresses[chain.id] as Address | undefined); - - if (!pluginAddress) { - throw new Error( - "missing SessionKeyPlugin address for chain " + chain.name, - ); - } - - return installPlugin_(client, { - pluginAddress, - pluginInitData: encodeAbiParameters( - [ - { type: "address[]", name: "initialKeys" }, - { type: "bytes32[]", name: "tags" }, - { type: "bytes[][]", name: "initialPermissions" }, - ], - params.args, - ), - dependencies, - overrides, - account, - context, - }); - }, - encodeExecuteWithSessionKey({ args }) { - return encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "executeWithSessionKey", - args, - }); - }, - encodeAddSessionKey({ args }) { - return encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "addSessionKey", - args, - }); - }, - encodeRemoveSessionKey({ args }) { - return encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "removeSessionKey", - args, - }); - }, - encodeRotateSessionKey({ args }) { - return encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "rotateSessionKey", - args, - }); - }, - encodeUpdateKeyPermissions({ args }) { - return encodeFunctionData({ - abi: SessionKeyPluginExecutionFunctionAbi, - functionName: "updateKeyPermissions", - args, - }); - }, -}); - -export const SessionKeyPluginExecutionFunctionAbi = [ - { - type: "function", - name: "executeWithSessionKey", - inputs: [ - { - name: "calls", - type: "tuple[]", - internalType: "struct Call[]", - components: [ - { name: "target", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bytes[]", internalType: "bytes[]" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "addSessionKey", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "tag", type: "bytes32", internalType: "bytes32" }, - { name: "permissionUpdates", type: "bytes[]", internalType: "bytes[]" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "removeSessionKey", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "predecessor", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "rotateSessionKey", - inputs: [ - { name: "oldSessionKey", type: "address", internalType: "address" }, - { name: "predecessor", type: "bytes32", internalType: "bytes32" }, - { name: "newSessionKey", type: "address", internalType: "address" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateKeyPermissions", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "updates", type: "bytes[]", internalType: "bytes[]" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -export const SessionKeyPluginAbi = [ - { - type: "function", - name: "addSessionKey", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "tag", type: "bytes32", internalType: "bytes32" }, - { name: "permissionUpdates", type: "bytes[]", internalType: "bytes[]" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "executeWithSessionKey", - inputs: [ - { - name: "calls", - type: "tuple[]", - internalType: "struct Call[]", - components: [ - { name: "target", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bytes[]", internalType: "bytes[]" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "findPredecessor", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - name: "getAccessControlEntry", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "contractAddress", type: "address", internalType: "address" }, - ], - outputs: [ - { name: "isOnList", type: "bool", internalType: "bool" }, - { name: "checkSelectors", type: "bool", internalType: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getAccessControlType", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "", - type: "uint8", - internalType: "enum ISessionKeyPlugin.ContractAccessControlType", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getERC20SpendLimitInfo", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "token", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct ISessionKeyPlugin.SpendLimitInfo", - components: [ - { name: "hasLimit", type: "bool", internalType: "bool" }, - { name: "limit", type: "uint256", internalType: "uint256" }, - { name: "limitUsed", type: "uint256", internalType: "uint256" }, - { name: "refreshInterval", type: "uint48", internalType: "uint48" }, - { name: "lastUsedTime", type: "uint48", internalType: "uint48" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getGasSpendLimit", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "info", - type: "tuple", - internalType: "struct ISessionKeyPlugin.SpendLimitInfo", - components: [ - { name: "hasLimit", type: "bool", internalType: "bool" }, - { name: "limit", type: "uint256", internalType: "uint256" }, - { name: "limitUsed", type: "uint256", internalType: "uint256" }, - { name: "refreshInterval", type: "uint48", internalType: "uint48" }, - { name: "lastUsedTime", type: "uint48", internalType: "uint48" }, - ], - }, - { name: "shouldReset", type: "bool", internalType: "bool" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getKeyTimeRange", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { name: "validAfter", type: "uint48", internalType: "uint48" }, - { name: "validUntil", type: "uint48", internalType: "uint48" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getNativeTokenSpendLimitInfo", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [ - { - name: "info", - type: "tuple", - internalType: "struct ISessionKeyPlugin.SpendLimitInfo", - components: [ - { name: "hasLimit", type: "bool", internalType: "bool" }, - { name: "limit", type: "uint256", internalType: "uint256" }, - { name: "limitUsed", type: "uint256", internalType: "uint256" }, - { name: "refreshInterval", type: "uint48", internalType: "uint48" }, - { name: "lastUsedTime", type: "uint48", internalType: "uint48" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getRequiredPaymaster", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", - }, - { - type: "function", - name: "isSelectorOnAccessControlList", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "contractAddress", type: "address", internalType: "address" }, - { name: "selector", type: "bytes4", internalType: "bytes4" }, - ], - outputs: [{ name: "isOnList", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isSessionKeyOf", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "onInstall", - inputs: [{ name: "data", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "onUninstall", - inputs: [{ name: "", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "pluginManifest", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginManifest", - components: [ - { name: "interfaceIds", type: "bytes4[]", internalType: "bytes4[]" }, - { - name: "dependencyInterfaceIds", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "executionFunctions", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permittedExecutionSelectors", - type: "bytes4[]", - internalType: "bytes4[]", - }, - { - name: "permitAnyExternalAddress", - type: "bool", - internalType: "bool", - }, - { name: "canSpendNativeToken", type: "bool", internalType: "bool" }, - { - name: "permittedExternalCalls", - type: "tuple[]", - internalType: "struct ManifestExternalCallPermission[]", - components: [ - { - name: "externalAddress", - type: "address", - internalType: "address", - }, - { name: "permitAnySelector", type: "bool", internalType: "bool" }, - { name: "selectors", type: "bytes4[]", internalType: "bytes4[]" }, - ], - }, - { - name: "userOpValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "runtimeValidationFunctions", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preUserOpValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "preRuntimeValidationHooks", - type: "tuple[]", - internalType: "struct ManifestAssociatedFunction[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "associatedFunction", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - { - name: "executionHooks", - type: "tuple[]", - internalType: "struct ManifestExecutionHook[]", - components: [ - { - name: "executionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "preExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - { - name: "postExecHook", - type: "tuple", - internalType: "struct ManifestFunction", - components: [ - { - name: "functionType", - type: "uint8", - internalType: "enum ManifestAssociatedFunctionType", - }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "dependencyIndex", - type: "uint256", - internalType: "uint256", - }, - ], - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "pluginMetadata", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct PluginMetadata", - components: [ - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "author", type: "string", internalType: "string" }, - { - name: "permissionDescriptors", - type: "tuple[]", - internalType: "struct SelectorPermission[]", - components: [ - { - name: "functionSelector", - type: "bytes4", - internalType: "bytes4", - }, - { - name: "permissionDescription", - type: "string", - internalType: "string", - }, - ], - }, - ], - }, - ], - stateMutability: "pure", - }, - { - type: "function", - name: "postExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "preExecHookData", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preExecutionHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bytes", internalType: "bytes" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preRuntimeValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "preUserOpValidationHook", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "removeSessionKey", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "predecessor", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "resetSessionKeyGasLimitTimestamp", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "rotateSessionKey", - inputs: [ - { name: "oldSessionKey", type: "address", internalType: "address" }, - { name: "predecessor", type: "bytes32", internalType: "bytes32" }, - { name: "newSessionKey", type: "address", internalType: "address" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "runtimeValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { name: "sender", type: "address", internalType: "address" }, - { name: "value", type: "uint256", internalType: "uint256" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "sessionKeysOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "address[]", internalType: "address[]" }], - stateMutability: "view", - }, - { - type: "function", - name: "supportsInterface", - inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "updateKeyPermissions", - inputs: [ - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "updates", type: "bytes[]", internalType: "bytes[]" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "userOpValidationFunction", - inputs: [ - { name: "functionId", type: "uint8", internalType: "uint8" }, - { - name: "userOp", - type: "tuple", - internalType: "struct UserOperation", - components: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "initCode", type: "bytes", internalType: "bytes" }, - { name: "callData", type: "bytes", internalType: "bytes" }, - { name: "callGasLimit", type: "uint256", internalType: "uint256" }, - { - name: "verificationGasLimit", - type: "uint256", - internalType: "uint256", - }, - { - name: "preVerificationGas", - type: "uint256", - internalType: "uint256", - }, - { name: "maxFeePerGas", type: "uint256", internalType: "uint256" }, - { - name: "maxPriorityFeePerGas", - type: "uint256", - internalType: "uint256", - }, - { name: "paymasterAndData", type: "bytes", internalType: "bytes" }, - { name: "signature", type: "bytes", internalType: "bytes" }, - ], - }, - { name: "userOpHash", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "event", - name: "PermissionsUpdated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "updates", - type: "bytes[]", - indexed: false, - internalType: "bytes[]", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "SessionKeyAdded", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - { name: "tag", type: "bytes32", indexed: true, internalType: "bytes32" }, - ], - anonymous: false, - }, - { - type: "event", - name: "SessionKeyRemoved", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "SessionKeyRotated", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "oldSessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newSessionKey", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { - type: "error", - name: "ERC20SpendLimitExceeded", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - { name: "token", type: "address", internalType: "address" }, - ], - }, - { type: "error", name: "InvalidAction", inputs: [] }, - { - type: "error", - name: "InvalidPermissionsUpdate", - inputs: [ - { name: "updateSelector", type: "bytes4", internalType: "bytes4" }, - ], - }, - { - type: "error", - name: "InvalidSessionKey", - inputs: [{ name: "sessionKey", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "InvalidSignature", - inputs: [{ name: "sessionKey", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "InvalidToken", - inputs: [{ name: "token", type: "address", internalType: "address" }], - }, - { type: "error", name: "LengthMismatch", inputs: [] }, - { - type: "error", - name: "NativeTokenSpendLimitExceeded", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "sessionKey", type: "address", internalType: "address" }, - ], - }, - { - type: "error", - name: "NotContractCaller", - inputs: [{ name: "caller", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "NotImplemented", - inputs: [ - { name: "selector", type: "bytes4", internalType: "bytes4" }, - { name: "functionId", type: "uint8", internalType: "uint8" }, - ], - }, - { type: "error", name: "NotInitialized", inputs: [] }, - { - type: "error", - name: "SessionKeyNotFound", - inputs: [{ name: "sessionKey", type: "address", internalType: "address" }], - }, -] as const; diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts deleted file mode 100644 index 5a9c6781db..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { LocalAccountSigner, type SmartAccountSigner } from "@aa-sdk/core"; -import type { - Hex, - PrivateKeyAccount, - SignableMessage, - TypedData, - TypedDataDefinition, -} from "viem"; -import { generatePrivateKey } from "viem/accounts"; -import { z } from "zod"; - -export const SessionKeySignerSchema = z.object({ - storageType: z - .union([z.literal("local-storage"), z.literal("session-storage")]) - .or(z.custom()) - .default("local-storage"), - storageKey: z.string().default("session-key-signer:session-key"), -}); - -export type SessionKeySignerConfig = z.input; -export const SESSION_KEY_SIGNER_TYPE_PFX = "alchemy:session-key"; - -/** - * A simple session key signer that uses localStorage or sessionStorage to store - * a private key. If the key is not found, it will generate a new one and store - * it in the storage. - */ -export class SessionKeySigner - implements SmartAccountSigner> -{ - signerType: string; - inner: LocalAccountSigner; - private storageType: "local-storage" | "session-storage" | Storage; - private storageKey: string; - - /** - * Initializes a new instance of a session key signer with the provided configuration. This will set the `signerType`, `storageKey`, and `storageType`. It will also manage the session key, either fetching it from storage or generating a new one if it doesn't exist. - * - * @example - * ```ts - * import { SessionKeySigner } from "@account-kit/smart-contracts"; - * - * const signer = new SessionKeySigner(); - * ``` - * - * @param {SessionKeySignerConfig} config_ the configuration for initializing the session key signer - */ - constructor(config_: SessionKeySignerConfig = {}) { - const config = SessionKeySignerSchema.parse(config_); - this.signerType = `${SESSION_KEY_SIGNER_TYPE_PFX}`; - this.storageKey = config.storageKey; - this.storageType = config.storageType; - - const sessionKey = (() => { - const storage = - typeof this.storageType !== "string" - ? this.storageType - : this.storageType === "session-storage" - ? sessionStorage - : localStorage; - const key = storage.getItem(this.storageKey); - - if (key) { - return key; - } else { - const newKey = generatePrivateKey(); - storage.setItem(this.storageKey, newKey); - return newKey; - } - })() as Hex; - - this.inner = LocalAccountSigner.privateKeyToAccountSigner(sessionKey); - } - - /** - * An async function that retrieves the address using the inner object's `getAddress` method. - * - * @example - * ```ts - * import { SessionKeySigner } from "@account-kit/smart-contracts"; - * - * const signer = new SessionKeySigner(); - * const sessionKeyAddress = await signer.getAddress(); - * ``` - * - * @returns {Promise} A promise that resolves to the address as a string - */ - getAddress: () => Promise<`0x${string}`> = async () => { - return this.inner.getAddress(); - }; - - /** - * Signs a message using the inner signer. - * - * @example - * ```ts - * import { SessionKeySigner } from "@account-kit/smart-contracts"; - * - * const signer = new SessionKeySigner(); - * const sessionKeyAddress = await signer.signMessage("hello"); - * ``` - * - * @param {SignableMessage} msg The message to sign - * @returns {Promise} A promise that resolves to the signed message - */ - signMessage: (msg: SignableMessage) => Promise<`0x${string}`> = async ( - msg, - ) => { - return this.inner.signMessage(msg); - }; - - /** - * Signs the provided typed data using the inner signer. - * - * @example - * ```ts - * import { SessionKeySigner } from "@account-kit/smart-contracts"; - * - * const signer = new SessionKeySigner(); - * console.log(await signer.signTypedData({ - * types: { - * "Message": [{ name: "content", type: "string" }] - * }, - * primaryType: "Message", - * message: { content: "Hello" }, - * })); - * ``` - * - * @template TTypedData - The typed data type, which extends `TypedData` or a record of unknown keys to unknown values. - * @template TPrimaryType - The primary type of the typed data. - * - * @param {TypedDataDefinition} params The parameters containing the typed data definition and primary type. - * @returns {Promise} A promise that resolves to the signed typed data as a string. - */ - signTypedData = async < - const TTypedData extends TypedData | { [key: string]: unknown }, - TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData, - >( - params: TypedDataDefinition, - ) => { - return this.inner.signTypedData(params); - }; - - /** - * Generates a new private key and stores it in the storage. - * - * @example - * ```ts - * import { SessionKeySigner } from "@account-kit/smart-contracts"; - * - * const signer = new SessionKeySigner(); - * const newSessionKey = signer.generateNewKey(); - * ``` - * - * @returns {Address} The public address of the new key. - */ - generateNewKey = () => { - const storage = - this.storageType === "session-storage" ? sessionStorage : localStorage; - - const newKey = generatePrivateKey(); - storage.setItem(this.storageKey, newKey); - this.inner = LocalAccountSigner.privateKeyToAccountSigner(newKey); - - return this.inner.inner.address; - }; -} diff --git a/account-kit/smart-contracts/src/msca/plugins/session-key/utils.ts b/account-kit/smart-contracts/src/msca/plugins/session-key/utils.ts deleted file mode 100644 index 090a5ebfb3..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/session-key/utils.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { GetAccountParameter, SmartContractAccount } from "@aa-sdk/core"; -import { AccountNotFoundError } from "@aa-sdk/core"; -import type { Address, Chain, Client, Transport } from "viem"; -import { SessionKeyPlugin } from "./plugin.js"; - -type BuildSessionKeysToRemoveStructParams< - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { - keys: ReadonlyArray
; - pluginAddress?: Address; -} & GetAccountParameter; - -/** - * Finds predecessors for each provided key and returns them in the struct `ISessionKeyPlugin.SessionKeyToRemove[]`. - * - * @example - * ```ts - * import { buildSessionKeysToRemoveStruct } from "@account-kit/smart-contracts"; - * - * const client = createSmartAccountClient(...); - * - * const keysToRemove = await buildSessionKeysToRemoveStruct(client, { - * keys: ["0x...", "0x..."], - * }); - * ``` - * - * @param {Client} client The client instance used to interact with the smart account - * @param {BuildSessionKeysToRemoveStructParams} args Arguments to configure the session key removal process - * @returns {Promise<{ sessionKey: Address; predecessor: Address }[]>} A promise that resolves to an array of objects each containing a session key and its predecessor - */ -export async function buildSessionKeysToRemoveStruct< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->( - client: Client, - args: BuildSessionKeysToRemoveStructParams, -): Promise<{ sessionKey: Address; predecessor: Address }[]> { - const { keys, pluginAddress, account = client.account } = args; - - if (!account) throw new AccountNotFoundError(); - - const contract = SessionKeyPlugin.getContract(client, pluginAddress); - return ( - await Promise.all( - keys.map(async (key) => { - return [ - key, - await contract.read.findPredecessor([account.address, key]), - ]; - }), - ) - ).map(([key, predecessor]) => ({ - sessionKey: key, - predecessor, - })); -} diff --git a/account-kit/smart-contracts/src/msca/plugins/types.ts b/account-kit/smart-contracts/src/msca/plugins/types.ts deleted file mode 100644 index 2b06717c63..0000000000 --- a/account-kit/smart-contracts/src/msca/plugins/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - type Abi, - type Address, - type Client, - type GetContractReturnType, - type PublicClient, -} from "viem"; - -export type GetPluginAddressParameter = { pluginAddress?: Address }; - -export type Plugin = { - meta: { - name: string; - version: string; - addresses: Record; - }; - getContract: ( - client: C, - address?: Address, - ) => GetContractReturnType; -}; diff --git a/account-kit/smart-contracts/src/msca/utils.ts b/account-kit/smart-contracts/src/msca/utils.ts deleted file mode 100644 index 94cb75b91c..0000000000 --- a/account-kit/smart-contracts/src/msca/utils.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { - AccountNotFoundError, - ChainNotFoundError, - type GetAccountParameter, - type SmartAccountClient, - type SmartAccountSigner, - type SmartContractAccount, - type SmartContractAccountWithSigner, - type UpgradeToData, -} from "@aa-sdk/core"; -import { - arbitrum, - arbitrumSepolia, - base, - baseSepolia, - mainnet, - optimism, - optimismSepolia, - polygon, - polygonAmoy, - sepolia, -} from "@account-kit/infra"; -import type { Address, Chain, Transport } from "viem"; -import { - custom, - encodeAbiParameters, - encodeFunctionData, - encodeFunctionResult, - keccak256, - parseAbiParameters, -} from "viem"; -import { IPluginAbi } from "./abis/IPlugin.js"; -import { MultiOwnerModularAccountFactoryAbi } from "./abis/MultiOwnerModularAccountFactory.js"; -import { UpgradeableModularAccountAbi } from "./abis/UpgradeableModularAccount.js"; -import { - createMultiOwnerModularAccount, - type MultiOwnerModularAccount, -} from "./account/multiOwnerAccount.js"; -import { MultiOwnerPlugin } from "./plugins/multi-owner/plugin.js"; - -/** - * Utility method returning the default multi sig msca factory address given a chain - * - * @param {Chain} chain the chain object for which to get the address - * @returns {Address} the address for the given chain - * @throws if the chain doesn't have an address currently deployed - */ -export const getDefaultMultisigModularAccountFactoryAddress = ( - chain: Chain, -): Address => { - switch (chain.id) { - case sepolia.id: - case baseSepolia.id: - case polygon.id: - case mainnet.id: - case polygonAmoy.id: - case optimism.id: - case optimismSepolia.id: - case arbitrum.id: - case arbitrumSepolia.id: - case base.id: - default: - return "0x000000000000204327E6669f00901a57CE15aE15"; - } -}; - -/** - * Utility method returning the default multi owner msca factory address given a chain - * - * @param {Chain} chain the chain object for which to get the address - * @returns {Address} the address for the given chain - * @throws if the chain doesn't have an address currently deployed - */ -export const getDefaultMultiOwnerModularAccountFactoryAddress = ( - chain: Chain, -): Address => { - switch (chain.id) { - default: - return "0x000000e92D78D90000007F0082006FDA09BD5f11"; - } -}; - -export type GetMSCAUpgradeToData< - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends - | SmartContractAccountWithSigner - | undefined = SmartContractAccountWithSigner | undefined, -> = { - multiOwnerPluginAddress?: Address; -} & GetAccountParameter; - -/** - * Retrieves the data necessary to upgrade to a Multi-Signature Contract Account (MSCA) and provides a method to create a Multi-Owner Modular Account. - * - * @example - * ```ts - * import { createLightAccountClient, getMSCAUpgradeToData } from "@account-kit/smart-contracts"; - * - * const client = createLightAccountClient(...); - * const upgradeData = await getMSCAUpgradeToData(client, {}); - * ``` - * - * @param {SmartAccountClient} client The smart account client - * @param {GetMSCAUpgradeToData} args The arguments required for the upgrade - * @returns {Promise Promise>}>} A promise that resolves to upgrade data augmented with a function to create a Multi-Owner Modular Account - */ -export async function getMSCAUpgradeToData< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TSigner extends SmartAccountSigner = SmartAccountSigner, - TAccount extends - | SmartContractAccountWithSigner - | undefined = SmartContractAccountWithSigner | undefined, ->( - client: SmartAccountClient, - args: GetMSCAUpgradeToData, -): Promise< - UpgradeToData & { - createMAAccount: () => Promise>; - } -> { - const { account: account_ = client.account, multiOwnerPluginAddress } = args; - - if (!account_) { - throw new AccountNotFoundError(); - } - const account = account_ as SmartContractAccountWithSigner; - - const chain = client.chain; - if (!chain) { - throw new ChainNotFoundError(); - } - - const initData = await getMAInitializationData({ - client, - multiOwnerPluginAddress, - signerAddress: await account.getSigner().getAddress(), - }); - - return { - ...initData, - createMAAccount: async () => - createMultiOwnerModularAccount({ - transport: custom(client.transport), - chain: chain as Chain, - signer: account.getSigner(), - accountAddress: account.address, - }), - }; -} - -export type GetMAInitializationDataParams< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, -> = { - multiOwnerPluginAddress?: Address; - client: SmartAccountClient; - signerAddress: Address | Address[]; -}; - -/** - * Retrieves the initialization data for a multi-owner modular account. Throws an error if the client's chain is not found or if the multi-owner plugin address is not retrievable. - * - * @example - * ```ts - * import { getMAInitializationData } from "@account-kit/smart-contracts"; - * import { createSmartAccountClient } from "@aa-sdk/core"; - * - * const client = createSmartAccountClient(...); - * const initializationData = await getMAInitializationData({ - * client, - * signerAddress: "0x...", // or array of signers - * }); - * ``` - * - * @param {GetMAInitializationDataParams} params the parameters for getting initialization data - * @param {SmartAccountClient} params.client the smart account client - * @param {Address | Address[]} params.signerAddress the address of the signer or an array of signer addresses - * @param {Address} [params.multiOwnerPluginAddress] optional address of the multi-owner plugin - * @returns {Promise} a promise that resolves to the initialization data required for upgrading to a multi-owner modular account - */ -export async function getMAInitializationData< - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined, ->({ - client, - multiOwnerPluginAddress, - signerAddress, -}: GetMAInitializationDataParams< - TTransport, - TChain, - TAccount ->): Promise { - if (!client.chain) { - throw new ChainNotFoundError(); - } - - const factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress( - client.chain, - ); - - const implAddress = await client.readContract({ - abi: MultiOwnerModularAccountFactoryAbi, - address: factoryAddress, - functionName: "IMPL", - }); - - const multiOwnerAddress = - multiOwnerPluginAddress ?? MultiOwnerPlugin.meta.addresses[client.chain.id]; - - if (!multiOwnerAddress) { - throw new Error("could not get multi owner plugin address"); - } - - const moPluginManifest = await client.readContract({ - abi: IPluginAbi, - address: multiOwnerAddress, - functionName: "pluginManifest", - }); - - const hashedMultiOwnerPluginManifest = keccak256( - encodeFunctionResult({ - abi: IPluginAbi, - functionName: "pluginManifest", - result: moPluginManifest, - }), - ); - - const encodedOwner = encodeAbiParameters( - parseAbiParameters("address[]"), - Array.isArray(signerAddress) ? [signerAddress] : [[signerAddress]], - ); - - const encodedPluginInitData = encodeAbiParameters( - parseAbiParameters("bytes32[], bytes[]"), - [[hashedMultiOwnerPluginManifest], [encodedOwner]], - ); - - const encodedMSCAInitializeData = encodeFunctionData({ - abi: UpgradeableModularAccountAbi, - functionName: "initialize", - args: [[multiOwnerAddress], encodedPluginInitData], - }); - - return { - implAddress, - initializationData: encodedMSCAInitializeData, - }; -} diff --git a/account-kit/smart-contracts/tsconfig.build.json b/account-kit/smart-contracts/tsconfig.build.json deleted file mode 100644 index 563e06f2ca..0000000000 --- a/account-kit/smart-contracts/tsconfig.build.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "**/*/*.e2e.test.ts", - "vitest.config.ts", - "vitest.config.e2e.ts" - ], - "include": ["src", "plugindefs", "experimental"], - "compilerOptions": { - "sourceMap": true, - "paths": { - "@account-kit/smart-contracts": ["./src/index.ts"], - "@account-kit/smart-contracts/experimental": ["./src/ma-v2/index.ts"] - } - } -} diff --git a/account-kit/smart-contracts/tsconfig.json b/account-kit/smart-contracts/tsconfig.json deleted file mode 100644 index b3d1f99552..0000000000 --- a/account-kit/smart-contracts/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "typescript-template/base.json", - "compilerOptions": { - "paths": { - "@account-kit/smart-contracts": ["./src/index.ts"], - "@account-kit/smart-contracts/experimental": ["./src/ma-v2/index.ts"], - "~test/*": ["../../.vitest/src/*"] - } - } -} diff --git a/account-kit/smart-contracts/turbo.json b/account-kit/smart-contracts/turbo.json deleted file mode 100644 index 8b500be557..0000000000 --- a/account-kit/smart-contracts/turbo.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "generate": { - "env": ["OPENAI_API_KEY"], - "inputs": ["plugindefs/**"], - "dependsOn": ["@account-kit/plugingen#build"], - "outputs": ["src/**/plugins/**/plugin.ts"] - }, - "build": { - "dependsOn": ["^build", "generate"], - "outputs": ["dist/**"], - "inputs": ["$TURBO_DEFAULT$", "src/**", "!src/**/plugins/**/plugin.ts"], - "cache": true - } - } -} diff --git a/account-kit/smart-contracts/typedoc.json b/account-kit/smart-contracts/typedoc.json deleted file mode 100644 index 85b76d5183..0000000000 --- a/account-kit/smart-contracts/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["src/index.ts"], - "tsconfig": "./tsconfig.build.json", - "plugin": ["typedoc-plugin-markdown"], - "fileExtension": ".mdx" -} diff --git a/account-kit/smart-contracts/vitest.config.ts b/account-kit/smart-contracts/vitest.config.ts deleted file mode 100644 index ce770c43a3..0000000000 --- a/account-kit/smart-contracts/vitest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/smart-contracts", - }, - }), -); diff --git a/account-kit/wallet-client/.env.example b/account-kit/wallet-client/.env.example deleted file mode 100644 index eaec3df8f9..0000000000 --- a/account-kit/wallet-client/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -TEST_ALCHEMY_API_KEY= -TEST_PAYMASTER_POLICY_ID= \ No newline at end of file diff --git a/account-kit/wallet-client/CHANGELOG.md b/account-kit/wallet-client/CHANGELOG.md deleted file mode 100644 index 40c8132d0b..0000000000 --- a/account-kit/wallet-client/CHANGELOG.md +++ /dev/null @@ -1,339 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [4.84.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.84.0...v4.84.1) (2026-02-19) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.84.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.2...v4.84.0) (2026-02-10) - -### Features - -- update wallet_sendPreparedCalls to use new call id ([#2340](https://github.com/alchemyplatform/aa-sdk/issues/2340)) ([7bcd59a](https://github.com/alchemyplatform/aa-sdk/commit/7bcd59a8c71a5e64ab055d2ff5ddba0d0269d96b)) - -## [4.83.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.1...v4.83.2) (2026-01-26) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.83.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.83.0...v4.83.1) (2026-01-24) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.83.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.1...v4.83.0) (2026-01-21) - -### Features - -- **v4:** add support for bundler sponsored operations ([#2331](https://github.com/alchemyplatform/aa-sdk/issues/2331)) ([a9a9d38](https://github.com/alchemyplatform/aa-sdk/commit/a9a9d3822e79b7107d236ceba26bf40830d4b11f)) - -## [4.82.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.82.0...v4.82.1) (2026-01-12) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.82.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.6...v4.82.0) (2025-12-20) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.81.6](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.5...v4.81.6) (2025-12-19) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.81.5](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.5) (2025-12-19) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.81.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.3...v4.81.4) (2025-12-19) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.81.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.2...v4.81.3) (2025-12-10) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.81.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.1...v4.81.2) (2025-12-08) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.81.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.81.0...v4.81.1) (2025-12-05) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.81.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.80.0...v4.81.0) (2025-12-03) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.80.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.79.0...v4.80.0) (2025-12-02) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.79.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.78.0...v4.79.0) (2025-11-19) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.78.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.1...v4.78.0) (2025-11-05) - -### Bug Fixes - -- override webauthn send test timeout ([#2225](https://github.com/alchemyplatform/aa-sdk/issues/2225)) ([f1e2d19](https://github.com/alchemyplatform/aa-sdk/commit/f1e2d1995d71eb8fa365d9b662045e15212c425a)) -- prevent non-type imports in wallet-client from wallet-api-types ([#2235](https://github.com/alchemyplatform/aa-sdk/issues/2235)) ([a39bd58](https://github.com/alchemyplatform/aa-sdk/commit/a39bd58ba3a204a9066628835ce9f6d1de6c490a)) - -## [4.77.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.77.0...v4.77.1) (2025-10-31) - -### Bug Fixes - -- infer default webauthn client account type ([#2224](https://github.com/alchemyplatform/aa-sdk/issues/2224)) ([2314f1b](https://github.com/alchemyplatform/aa-sdk/commit/2314f1b00b2e76558022a9bd469062d9e9baf289)) - -# [4.77.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.76.0...v4.77.0) (2025-10-31) - -### Features - -- support webauthn signers in wallet client ([#2214](https://github.com/alchemyplatform/aa-sdk/issues/2214)) ([4297dc3](https://github.com/alchemyplatform/aa-sdk/commit/4297dc3dc631f2aa0a7230260af2d71ab90856b6)) - -# [4.76.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.4...v4.76.0) (2025-10-28) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.75.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.3...v4.75.4) (2025-10-27) - -### Bug Fixes - -- wallet client requires wallet-api-types as a non-dev dep ([#2210](https://github.com/alchemyplatform/aa-sdk/issues/2210)) ([de9571c](https://github.com/alchemyplatform/aa-sdk/commit/de9571cca3acf7dcf66b5fc28f3d0384b03845dc)) - -## [4.75.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.2...v4.75.3) (2025-10-27) - -### Bug Fixes - -- wallet client rpc type inference ([#2208](https://github.com/alchemyplatform/aa-sdk/issues/2208)) ([d584af0](https://github.com/alchemyplatform/aa-sdk/commit/d584af0ba6ccdeaca73e302f36840bbe9130f110)) - -## [4.75.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.1...v4.75.2) (2025-10-24) - -### Bug Fixes - -- import type from wallet-api-types ([#2207](https://github.com/alchemyplatform/aa-sdk/issues/2207)) ([14b02f0](https://github.com/alchemyplatform/aa-sdk/commit/14b02f09a459f9124ae5a3191c3910473b8840d4)) - -## [4.75.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.75.0...v4.75.1) (2025-10-24) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.75.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.74.0...v4.75.0) (2025-10-24) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.74.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.73.0...v4.74.0) (2025-10-21) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.73.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.72.0...v4.73.0) (2025-10-17) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.72.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.1...v4.72.0) (2025-10-16) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.71.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.71.0...v4.71.1) (2025-10-16) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.71.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.1...v4.71.0) (2025-10-15) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.70.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.70.0...v4.70.1) (2025-10-14) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.70.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.69.0...v4.70.0) (2025-10-13) - -### Features - -- update types package and test cross-chain quote request ([#2165](https://github.com/alchemyplatform/aa-sdk/issues/2165)) ([6d01c49](https://github.com/alchemyplatform/aa-sdk/commit/6d01c4930ba754ac0980a11991348f621ab138d0)) - -# [4.69.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.68.0...v4.69.0) (2025-10-13) - -### Features - -- add batching to useAlchemySendTransaction ([#2176](https://github.com/alchemyplatform/aa-sdk/issues/2176)) ([c75f99d](https://github.com/alchemyplatform/aa-sdk/commit/c75f99d7d41a1be818819986b73d3d344741789d)) - -# [4.68.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.67.0...v4.68.0) (2025-10-09) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.67.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.4...v4.67.0) (2025-10-06) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.66.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.3...v4.66.4) (2025-10-01) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.66.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.2...v4.66.3) (2025-10-01) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.66.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.1...v4.66.2) (2025-09-30) - -### Bug Fixes - -- prevent useSmartWalletClient infinite render loop if address is specified while client loading ([#2146](https://github.com/alchemyplatform/aa-sdk/issues/2146)) ([6015e46](https://github.com/alchemyplatform/aa-sdk/commit/6015e4623617bc59a2795711de9b33a20b141de2)) - -## [4.66.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.66.0...v4.66.1) (2025-09-29) - -### Bug Fixes - -- ensure yParity is a number ([#2132](https://github.com/alchemyplatform/aa-sdk/issues/2132)) ([fbb27f8](https://github.com/alchemyplatform/aa-sdk/commit/fbb27f8e613bed6f82facf01b63e8eebc76d54a3)) - -# [4.66.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.65.0...v4.66.0) (2025-09-29) - -### Bug Fixes - -- include policy id from client on request quote action ([#2103](https://github.com/alchemyplatform/aa-sdk/issues/2103)) ([a7c749d](https://github.com/alchemyplatform/aa-sdk/commit/a7c749d7271fee3124460fb2ca64df426405bfc8)) - -### Features - -- replace doc-gen with typedoc ([#2092](https://github.com/alchemyplatform/aa-sdk/issues/2092)) ([6fd935d](https://github.com/alchemyplatform/aa-sdk/commit/6fd935db9677ed34eefabdeae741a881737c6d08)) - -# [4.65.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.64.0...v4.65.0) (2025-09-23) - -### Features - -- add swapi decorator for sdk v4 ([#2091](https://github.com/alchemyplatform/aa-sdk/issues/2091)) ([19b08d3](https://github.com/alchemyplatform/aa-sdk/commit/19b08d3c713a14fe35acbde945ac1280a96b1b99)) - -# [4.64.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.2...v4.64.0) (2025-09-19) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.63.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.1...v4.63.2) (2025-09-16) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.63.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.63.0...v4.63.1) (2025-09-15) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.63.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.2...v4.63.0) (2025-09-15) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.62.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.1...v4.62.2) (2025-09-12) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.62.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.62.0...v4.62.1) (2025-09-11) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.62.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.61.0...v4.62.0) (2025-09-06) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.61.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.1...v4.61.0) (2025-09-05) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.60.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.60.0...v4.60.1) (2025-09-03) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.60.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.1...v4.60.0) (2025-09-03) - -### Bug Fixes - -- **wallet-client:** handle permits in sendCalls action, add clarifying docs ([50039e0](https://github.com/alchemyplatform/aa-sdk/commit/50039e01d6a4137db4fa5668c52442deda3cc12e)) - -## [4.59.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.59.0...v4.59.1) (2025-08-27) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.59.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.58.0...v4.59.0) (2025-08-26) - -### Bug Fixes - -- **wallet-client:** improve error handling in signPreparedCalls ([0b2a6c9](https://github.com/alchemyplatform/aa-sdk/commit/0b2a6c96a869a34ca930d1e0bf8e2307d94fd469)) - -### Features - -- **wallet-client:** add support for erc20 paymaster in wallet-client and useSendCalls ([7b0f092](https://github.com/alchemyplatform/aa-sdk/commit/7b0f0929254c707fd009ae90e392b39b9cb029a2)) -- **wallet-client:** update types for erc20 capability, add API reference ([428ee9d](https://github.com/alchemyplatform/aa-sdk/commit/428ee9d49e5529d4a43e8a1547b11919c0c8cd9a)) - -# [4.58.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.1...v4.58.0) (2025-08-25) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.57.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.57.0...v4.57.1) (2025-08-20) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.57.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.56.0...v4.57.0) (2025-08-19) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.56.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.55.0...v4.56.0) (2025-08-18) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.55.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.1...v4.55.0) (2025-08-14) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.54.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.54.0...v4.54.1) (2025-08-12) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.54.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.1...v4.54.0) (2025-08-12) - -### Features - -- add sendCalls and waitForCallsStatus to wallet client ([#1855](https://github.com/alchemyplatform/aa-sdk/issues/1855)) ([adb0b5b](https://github.com/alchemyplatform/aa-sdk/commit/adb0b5bb0077a992d83761b325a54c99d165885c)) -- unpin viem version ([#1851](https://github.com/alchemyplatform/aa-sdk/issues/1851)) ([e387e0e](https://github.com/alchemyplatform/aa-sdk/commit/e387e0ead087b893d315b072c24b3c2725ff86b6)) - -## [4.53.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.53.0...v4.53.1) (2025-08-06) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.53.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.4...v4.53.0) (2025-08-06) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.52.4](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.3...v4.52.4) (2025-08-04) - -### Bug Fixes - -- only use typebox for types in `wallet-client` ([#1843](https://github.com/alchemyplatform/aa-sdk/issues/1843)) ([41b8ef8](https://github.com/alchemyplatform/aa-sdk/commit/41b8ef844180e51294e820f4c41c0dc4e63193f7)) - -## [4.52.3](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.2...v4.52.3) (2025-08-04) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.52.2](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.1...v4.52.2) (2025-07-22) - -**Note:** Version bump only for package @account-kit/wallet-client - -## [4.52.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.52.0...v4.52.1) (2025-07-22) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.52.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.51.0...v4.52.0) (2025-07-18) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.51.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.1...v4.51.0) (2025-07-18) - -### Features - -- add metrics tracking to wallet client ([#1772](https://github.com/alchemyplatform/aa-sdk/issues/1772)) ([65e3fcb](https://github.com/alchemyplatform/aa-sdk/commit/65e3fcb981115812138fe78a6ddab194cbf055c6)) - -## [4.50.1](https://github.com/alchemyplatform/aa-sdk/compare/v4.50.0...v4.50.1) (2025-07-14) - -**Note:** Version bump only for package @account-kit/wallet-client - -# [4.50.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.49.0...v4.50.0) (2025-07-14) - -### Features - -- add initial smart wallet client actions ([#1648](https://github.com/alchemyplatform/aa-sdk/issues/1648)) ([a3d8ab2](https://github.com/alchemyplatform/aa-sdk/commit/a3d8ab2f698ca08f62d04423262b3497b46551af)), closes [#1649](https://github.com/alchemyplatform/aa-sdk/issues/1649) [#1733](https://github.com/alchemyplatform/aa-sdk/issues/1733) [#1742](https://github.com/alchemyplatform/aa-sdk/issues/1742) - -# [4.47.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.46.1...v4.47.0) (2025-06-27) - -**Note:** Version bump only for package @account-kit/wallet-client diff --git a/account-kit/wallet-client/bunfig.toml b/account-kit/wallet-client/bunfig.toml deleted file mode 100644 index ad3e6ff5ea..0000000000 --- a/account-kit/wallet-client/bunfig.toml +++ /dev/null @@ -1,6 +0,0 @@ -[test] -include = ["src/**/*.test.ts", "src/**/*.spec.ts"] -exclude = ["node_modules", "dist"] - -[test.timeout] -default = "10s" \ No newline at end of file diff --git a/account-kit/wallet-client/inject-version.ts b/account-kit/wallet-client/inject-version.ts deleted file mode 100644 index 05e1caae82..0000000000 --- a/account-kit/wallet-client/inject-version.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync, writeFileSync } from "fs"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -const VERSION_FILE_PATH = "src/version.ts"; - -const packageJSON = JSON.parse(readFileSync("./package.json").toString()); - -writeFileSync( - resolve(__dirname, VERSION_FILE_PATH), - `// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "${packageJSON.version}"; -`, -); -console.log(`Wrote version to ${VERSION_FILE_PATH}.`); diff --git a/account-kit/wallet-client/package.json b/account-kit/wallet-client/package.json deleted file mode 100644 index 174e7bdd01..0000000000 --- a/account-kit/wallet-client/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "@account-kit/wallet-client", - "version": "4.84.1", - "description": "Wallet Client for Alchemy Account Kit", - "author": "Alchemy", - "license": "MIT", - "private": false, - "type": "module", - "main": "./dist/esm/exports/index.js", - "module": "./dist/esm/exports/index.js", - "types": "./dist/types/exports/index.d.ts", - "typings": "./dist/types/exports/index.d.ts", - "sideEffects": false, - "files": [ - "dist", - "src/**/*.ts", - "package.json", - "!dist/**/*.tsbuildinfo", - "!vitest.config.ts", - "!.env", - "!src/**/*.test.ts", - "!src/**/*.test-d.ts", - "!src/__tests__/**/*" - ], - "exports": { - ".": { - "types": "./dist/types/exports/index.d.ts", - "require": "./dist/esm/exports/index.js", - "import": "./dist/esm/exports/index.js" - }, - "./experimental": { - "types": "./dist/types/exports/experimental.d.ts", - "import": "./dist/esm/exports/experimental.js", - "default": "./dist/esm/exports/experimental.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "prebuild": "tsx ./inject-version.ts", - "build": "yarn clean && yarn build:esm && yarn build:types", - "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm", - "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rm -rf ./dist", - "test:e2e": "bun test ./src/**/*.e2e.test.*" - }, - "dependencies": { - "@aa-sdk/core": "^4.84.1", - "@account-kit/infra": "^4.84.1", - "@account-kit/smart-contracts": "^4.84.1", - "@alchemy/wallet-api-types": "0.1.0-alpha.25", - "deep-equal": "^2.2.3", - "ox": "^0.6.12" - }, - "devDependencies": { - "@types/deep-equal": "^1.0.4", - "@types/node": "^24.0.11", - "bun": "^1.2.18", - "bun-types": "^1.2.18" - }, - "peerDependencies": { - "viem": "^2.45.0" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/alchemyplatform/aa-sdk.git" - }, - "bugs": { - "url": "https://github.com/alchemyplatform/aa-sdk/issues" - }, - "homepage": "https://github.com/alchemyplatform/aa-sdk#readme" -} diff --git a/account-kit/wallet-client/src/client/actions/formatSign.ts b/account-kit/wallet-client/src/client/actions/formatSign.ts deleted file mode 100644 index c8c599db5d..0000000000 --- a/account-kit/wallet-client/src/client/actions/formatSign.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import type { InnerWalletApiClient, WithoutChainId } from "../../types.ts"; -import { toHex, type Address, type IsUndefined } from "viem"; -import { AccountNotFoundError } from "@aa-sdk/core"; -import { metrics } from "../../metrics.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_formatSign"; - }; - } ->; - -export type FormatSignParams< - TAccount extends Address | undefined = Address | undefined, -> = Omit, "from"> & - (IsUndefined extends true ? { from: Address } : { from?: never }); - -export type FormatSignResult = RpcSchema["ReturnType"]; - -/** - * Formats a signature request for signing messages or transactions. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {FormatSignParams} params - Parameters for formatting the signature - * @returns {Promise} A Promise that resolves to the formatSign result containing the formatted signature. - * - * @example - * ```ts - * // Formats a signature - * const result = await client.formatSign({ - * from: "0x1234...", - * signature: { - * type: "ecdsa", - * data: "0xabcd..." - * }, - * }); - * ``` - */ -export async function formatSign< - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClient, - params: FormatSignParams, -): Promise { - metrics.trackEvent({ - name: "format_sign", - }); - - const from = params.from ?? client.account?.address; - if (!from) { - throw new AccountNotFoundError(); - } - - return client.request({ - method: "wallet_formatSign", - params: [{ ...params, from, chainId: toHex(client.chain.id) }], - }); -} diff --git a/account-kit/wallet-client/src/client/actions/getCallsStatus.ts b/account-kit/wallet-client/src/client/actions/getCallsStatus.ts deleted file mode 100644 index 4e83908195..0000000000 --- a/account-kit/wallet-client/src/client/actions/getCallsStatus.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { InnerWalletApiClient } from "../../types.ts"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import { metrics } from "../../metrics.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_getCallsStatus"; - }; - } ->; - -export type GetCallsStatusParams = RpcSchema["Request"]["params"][0]; - -export type GetCallsStatusResult = RpcSchema["ReturnType"]; - -/** - * Gets the status of a prepared call by its ID. - * This method is used to check the execution status of calls sent via sendPreparedCalls. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {GetCallsStatusParams} params - The ID of the prepared call to check - * @returns {Promise} A Promise that resolves to the status information including: - * - id: The hex ID of the call - * - chainId: The chain ID in hex format - * - status: The current status of the batch execution - * - receipts: Optional array of transaction receipts if the batch has been executed - * - * @example - * ```ts - * // After sending prepared calls - * const sendResult = await client.sendPreparedCalls({...}); - * - * // Check the status of the call ID - * const status = await client.getCallsStatus(sendResult.id); - * ``` - */ -export async function getCallsStatus( - client: InnerWalletApiClient, - params: GetCallsStatusParams, -): Promise { - metrics.trackEvent({ - name: "get_calls_status", - }); - - return await client.request({ - method: "wallet_getCallsStatus", - params: [params], - }); -} diff --git a/account-kit/wallet-client/src/client/actions/grantPermissions.ts b/account-kit/wallet-client/src/client/actions/grantPermissions.ts deleted file mode 100644 index 63229535d9..0000000000 --- a/account-kit/wallet-client/src/client/actions/grantPermissions.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { AccountNotFoundError } from "@aa-sdk/core"; -import { - toHex, - type Address, - type Hex, - type IsUndefined, - type Prettify, - concatHex, - serializeSignature, -} from "viem"; -import type { InnerWalletApiClient } from "../../types.ts"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import { signSignatureRequest } from "./signSignatureRequest.js"; -import { metrics } from "../../metrics.js"; -import type { SmartWalletSigner } from "../index.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_createSession"; - }; - } ->; - -export type GrantPermissionsParams< - TAccount extends Address | undefined = Address | undefined, -> = Prettify< - Omit & - (IsUndefined extends true - ? { account: Address } - : { account?: never }) ->; - -export type GrantPermissionsResult = { - context: Hex; -}; - -/** - * Grants permissions to a smart account by creating a session. - * This allows another key to perform operations on behalf of the account. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {SmartAccountSigner} signer - The signer of the smart account - * @param {GrantPermissionsParams} params - The parameters for granting permissions - * @param {Address} [params.account] - The account address (required if client was not initialized with an account) - * @param {number} params.expirySec - Unix timestamp when the permissions expire - * @param {sessionKeyData} params.key - The session key information - * @param {string} params.key.publicKey - The public key of the session key - * @param {string} params.key.type - The type of the key (e.g., "secp256k1") - * @param {Array} params.permissions - Array of permission objects defining what the session key can do - * @returns {Promise} A Promise that resolves to the result containing a context identifier - * - * @example - * ```ts - * // Create a session key and grant root permissions - * const sessionKey = LocalAccountSigner.generatePrivateKeySigner(); - * const account = await client.requestAccount(); - * - * const permissions = await client.grantPermissions({ - * account: account.address, - * expirySec: Math.floor(Date.now() / 1000) + 60 * 60, // 1 hour from now - * key: { - * publicKey: await sessionKey.getAddress(), - * type: "secp256k1", - * }, - * permissions: [{ type: "root" }], - * }); - * - * // Use the permissions to prepare a call - * const preparedCalls = await client.prepareCalls({ - * calls: [{ to: zeroAddress, value: "0x0" }], - * from: account.address, - * capabilities: { - * paymasterService: { - * policyId: "your-paymaster-policy-id", - * }, - * permissions, - * }, - * }); - * - * // Sign with the session key - * const signedCalls = await signPreparedCalls(sessionKey, preparedCalls); - * - * // Send the prepared call using the session key - * const result = await client.sendPreparedCalls({ - * ...signedCalls, - * capabilities: { - * permissions, - * }, - * }); - * ``` - */ -export async function grantPermissions< - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClient, - signer: SmartWalletSigner, - params: GrantPermissionsParams, -): Promise { - metrics.trackEvent({ - name: "grant_permissions", - }); - - const account = params.account ?? client.account?.address; - if (!account) { - throw new AccountNotFoundError(); - } - - const { sessionId, signatureRequest } = await client.request({ - method: "wallet_createSession", - params: [ - { - ...params, - account, - chainId: toHex(client.chain.id), - }, - ], - }); - - const signature = await signSignatureRequest(signer, signatureRequest); - - let signatureHex: Hex; - if (typeof signature.data === "string") { - signatureHex = signature.data; - } else { - const sigData = signature.data; - if ("yParity" in sigData) { - signatureHex = serializeSignature({ - r: sigData.r, - s: sigData.s, - yParity: Number(sigData.yParity), - }); - } else { - signatureHex = serializeSignature({ - r: sigData.r, - s: sigData.s, - v: BigInt(sigData.v), - }); - } - } - - return { - context: concatHex([ - "0x00", // remote mode - sessionId, - signatureHex, - ]), - }; -} diff --git a/account-kit/wallet-client/src/client/actions/listAccounts.ts b/account-kit/wallet-client/src/client/actions/listAccounts.ts deleted file mode 100644 index 64de2d55d8..0000000000 --- a/account-kit/wallet-client/src/client/actions/listAccounts.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import type { InnerWalletApiClient } from "../../types.ts"; -import type { Address } from "viem"; -import { metrics } from "../../metrics.js"; -import type { SmartWalletSigner } from "../index.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_listAccounts"; - }; - } ->; - -export type ListAccountsParams = Omit< - RpcSchema["Request"]["params"][0], - "signerAddress" | "signerPublicKey" -> & { signerAddress?: Address }; - -export type ListAccountsResult = RpcSchema["ReturnType"]; - -/** - * Lists all smart accounts for a given signer using the wallet API client. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {SmartAccountSigner} signer - The signer for which to list accounts - * @param {ListAccountsParams} params - Parameters for listing accounts - * @param {Address} [params.signerAddress] - The address of the signer to list accounts for - * @param {number} [params.limit] - Optional maximum number of accounts to return (default: 100, max: 100) - * @param {string} [params.after] - Optional pagination cursor for fetching subsequent pages - * @returns {Promise} A Promise that resolves to the list of accounts and pagination metadata - * - * @example - * ```ts - * // Fetch the first page of accounts - * const firstPage = await client.listAccounts({ - * signerAddress: "0x123...", - * limit: 10 - * }); - * - * // If an 'after' cursor exists, use it to fetch the next page - * const nextPage = await client.listAccounts({ - * signerAddress: "0x123...", - * limit: 10, - * after: firstPage.meta.after - * }); - * ``` - */ -export async function listAccounts( - client: InnerWalletApiClient, - signer: SmartWalletSigner, - params: ListAccountsParams, -): Promise { - metrics.trackEvent({ - name: "list_accounts", - }); - - // signerAddress in params takes priority; otherwise fallback to client's attached signer - const signerAddress = params.signerAddress ?? (await signer.getAddress()); - const { signerAddress: _signerAddress, ...rest } = params; - - return client.request({ - method: "wallet_listAccounts", - params: [ - { - ...rest, - signerAddress, - }, - ], - }); -} diff --git a/account-kit/wallet-client/src/client/actions/prepareCalls.ts b/account-kit/wallet-client/src/client/actions/prepareCalls.ts deleted file mode 100644 index 1bcbe77a67..0000000000 --- a/account-kit/wallet-client/src/client/actions/prepareCalls.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { AccountNotFoundError } from "@aa-sdk/core"; -import { toHex, type Address, type IsUndefined } from "viem"; -import type { InnerWalletApiClient } from "../../types.ts"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import { metrics } from "../../metrics.js"; -import { mergeClientCapabilities } from "../../internal/capabilities.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_prepareCalls"; - }; - } ->; - -export type GetAccountParam = - IsUndefined extends true - ? { account: Address } - : { account?: Address }; - -export type PrepareCallsParams< - TAccount extends Address | undefined = Address | undefined, -> = Omit & - (IsUndefined extends true ? { from: Address } : { from?: never }); - -export type PrepareCallsResult = RpcSchema["ReturnType"]; - -/** - * Prepares a set of contract calls for execution by building a user operation. - * Returns the built user operation and a signature request that needs to be signed - * before submitting to sendPreparedCalls. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {PrepareCallsParams} params - Parameters for preparing calls - * @param {Array<{to: Address, data?: Hex, value?: Hex}>} params.calls - Array of contract calls to execute - * @param {Address} [params.from] - The address to execute the calls from (required if the client wasn't initialized with an account) - * @param {object} [params.capabilities] - Optional capabilities to include with the request. See [API documentation](/wallets/api-reference/smart-wallets/wallet-api-endpoints/wallet-api-endpoints/wallet-prepare-calls#request.body.prepareCallsRequest.capabilities) for details. - * @returns {Promise} A Promise that resolves to the prepared calls result containing - * the user operation data and signature request - * - * @example - * ```ts - * // Prepare a sponsored user operation call - * const result = await client.prepareCalls({ - * calls: [{ - * to: "0x1234...", - * data: "0xabcdef...", - * value: "0x0" - * }], - * capabilities: { - * paymasterService: { policyId: "your-policy-id" } - * } - * }); - * ``` - */ -export async function prepareCalls< - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClient, - params: PrepareCallsParams, -): Promise { - metrics.trackEvent({ - name: "prepare_calls", - }); - - const from = params.from ?? client.account?.address; - if (!from) { - throw new AccountNotFoundError(); - } - - const capabilities = mergeClientCapabilities(client, params.capabilities); - - return await client.request({ - method: "wallet_prepareCalls", - params: [ - { - ...params, - chainId: toHex(client.chain.id), - from, - capabilities, - }, - ], - }); -} diff --git a/account-kit/wallet-client/src/client/actions/prepareSign.ts b/account-kit/wallet-client/src/client/actions/prepareSign.ts deleted file mode 100644 index a160f48ffd..0000000000 --- a/account-kit/wallet-client/src/client/actions/prepareSign.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { InnerWalletApiClient } from "../../types.ts"; -import { toHex, type Address, type IsUndefined } from "viem"; -import { AccountNotFoundError } from "@aa-sdk/core"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import { metrics } from "../../metrics.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_prepareSign"; - }; - } ->; - -export type PrepareSignParams< - TAccount extends Address | undefined = Address | undefined, -> = Omit & - (IsUndefined extends true ? { from: Address } : { from?: never }); - -export type PrepareSignResult = RpcSchema["ReturnType"]; - -/** - * Prepares a signature request for signing messages or transactions. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {PrepareSignParams} params - Parameters for preparing the signature request - * @returns {Promise} A Promise that resolves to the prepare sign result containing a signature request - * - * @example - * ```ts - * // Prepare a message to be signed - * const result = await client.prepareSign({ - * from: "0x1234...", - * type: "personal_sign", - * data: "Hello, world!", - * }); - * ``` - */ -export async function prepareSign< - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClient, - params: PrepareSignParams, -): Promise { - metrics.trackEvent({ - name: "prepare_sign", - }); - - const from = params.from ?? client.account?.address; - if (!from) { - throw new AccountNotFoundError(); - } - - return client.request({ - method: "wallet_prepareSign", - params: [{ ...params, from, chainId: toHex(client.chain.id) }], - }); -} diff --git a/account-kit/wallet-client/src/client/actions/requestAccount.ts b/account-kit/wallet-client/src/client/actions/requestAccount.ts deleted file mode 100644 index f5ec2b748e..0000000000 --- a/account-kit/wallet-client/src/client/actions/requestAccount.ts +++ /dev/null @@ -1,98 +0,0 @@ -import type { SmartContractAccount } from "@aa-sdk/core"; -import type { Address } from "abitype"; -import deepEqual from "deep-equal"; -import { custom } from "viem"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import type { InnerWalletApiClient } from "../../types.js"; -import { createAccount } from "../../internal/account.js"; -import type { SmartWalletSigner } from "../index.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_requestAccount"; - }; - } ->; - -export type RequestAccountParams = Omit< - Extract, - "signerAddress" | "includeCounterfactualInfo" -> & { accountAddress?: Address }; - -export type RequestAccountResult = SmartContractAccount; - -/** - * Requests an account for the provided signer using the wallet API client. - * If an account already exists for the signer, it will always return that account unless a new ID is specified. - * If an account already exists, the creationHint will be ignored. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {SmartAccountSigner} signer - The signer that will be associated with the account - * @param {RequestAccountParams} [params] - Optional parameters for requesting a specific account - * @param {string} [params.id] - Optional identifier for the account. If specified, a new account with this ID will be created even if one already exists for the signer - * @param {object} [params.creationHint] - Optional hints to guide account creation. These are ignored if an account already exists - * @returns {Promise} A Promise that resolves to a SmartContractAccount instance - * - * @example - * ```ts - * // Request an account with default parameters using a local signer - * const signer = LocalAccountSigner.privateKeyToAccountSigner("0x..."); - * const account = await client.requestAccount(signer); - * ``` - */ -export async function requestAccount( - client: InnerWalletApiClient, - signer: SmartWalletSigner, - params?: RequestAccountParams, -): Promise { - const { creationHint = {} } = params ?? {}; - - const args = ( - (client.account && !params) || params?.accountAddress - ? { - accountAddress: params?.accountAddress ?? client.account!.address, - includeCounterfactualInfo: true, - } - : { - signerAddress: await signer.getAddress(), - ...(creationHint - ? { - creationHint, - } - : {}), - includeCounterfactualInfo: true, - } - ) satisfies RpcSchema["Request"]["params"][0]; - - const cachedAccount = client.internal.getAccount(); - - if ( - cachedAccount && - ((args.accountAddress && - cachedAccount.account.address === args.accountAddress) || - deepEqual(cachedAccount.requestParams, args, { strict: true })) - ) { - return cachedAccount.account; - } - - const { accountAddress, counterfactualInfo, delegation } = - await client.request({ - method: "wallet_requestAccount", - params: [args], - }); - - const account = await createAccount({ - accountAddress, - counterfactualInfo, - delegation, - chain: client.chain, - transport: custom(client.transport), - signer, - }); - - client.internal.setAccount({ account, requestParams: args }); - - return account; -} diff --git a/account-kit/wallet-client/src/client/actions/sendCalls.ts b/account-kit/wallet-client/src/client/actions/sendCalls.ts deleted file mode 100644 index 35ac8be9a8..0000000000 --- a/account-kit/wallet-client/src/client/actions/sendCalls.ts +++ /dev/null @@ -1,90 +0,0 @@ -import type { Address } from "viem"; -import type { InnerWalletApiClient } from "../../types.js"; -import { prepareCalls, type PrepareCallsParams } from "./prepareCalls.js"; -import { metrics } from "../../metrics.js"; -import { signPreparedCalls } from "./signPreparedCalls.js"; -import { - sendPreparedCalls, - type SendPreparedCallsResult, -} from "./sendPreparedCalls.js"; -import { signSignatureRequest } from "./signSignatureRequest.js"; -import type { SmartWalletSigner } from "../index.js"; -import { extractCapabilitiesForSending } from "../../internal/capabilities.js"; - -export type SendCallsParams< - TAccount extends Address | undefined = Address | undefined, -> = PrepareCallsParams; - -export type SendCallsResult = SendPreparedCallsResult; - -/** - * Prepares, signs, and submits calls. This function internally calls `prepareCalls`, `signPreparedCalls`, and `sendPreparedCalls`. - * - * - * If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden - * from the user. It is recommended to use the `prepareCalls` action instead to manually handle the permit signature. - * - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {SmartAccountSigner} signer - The signer to use - * @param {PrepareCallsParams} params - Parameters for sending calls - * @param {Array<{to: Address, data?: Hex, value?: Hex}>} params.calls - Array of contract calls to execute - * @param {Address} [params.from] - The address to execute the calls from (required if the client wasn't initialized with an account) - * @param {object} [params.capabilities] - Optional capabilities to include with the request. See [API documentation](/wallets/api-reference/smart-wallets/wallet-api-endpoints/wallet-api-endpoints/wallet-prepare-calls#request.body.prepareCallsRequest.capabilities) for details. - * @returns {Promise} A Promise that resolves to the result containing the call ID. - * - * @example - * ```ts - * const result = await client.sendCalls({ - * calls: [{ - * to: "0x1234...", - * data: "0xabcdef...", - * value: "0x0" - * }], - * capabilities: { - * paymasterService: { policyId: "your-policy-id" } - * } - * }); - * - * // The result contains the call ID - * console.log(result.id); - * ``` - */ -export async function sendCalls< - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClient, - signer: SmartWalletSigner, - params: SendCallsParams, -): Promise { - metrics.trackEvent({ - name: "send_calls", - }); - - let calls = await prepareCalls(client, params); - - if (calls.type === "paymaster-permit") { - const signature = await signSignatureRequest( - signer, - calls.signatureRequest, - ); - - const secondCallParams = { - from: calls.modifiedRequest.from, - calls: calls.modifiedRequest.calls, - capabilities: calls.modifiedRequest.capabilities, - paymasterPermitSignature: signature, - }; - - calls = await prepareCalls(client, secondCallParams); - } - - const signedCalls = await signPreparedCalls(signer, calls); - - const capabilities = extractCapabilitiesForSending(params.capabilities); - - return await sendPreparedCalls(client, { - ...signedCalls, - ...(capabilities != null ? { capabilities } : {}), - }); -} diff --git a/account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts b/account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts deleted file mode 100644 index af96e23d9d..0000000000 --- a/account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { toHex } from "viem"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import type { InnerWalletApiClient, WithoutChainId } from "../../types.ts"; -import { metrics } from "../../metrics.js"; -import { mergeClientCapabilities } from "../../internal/capabilities.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_sendPreparedCalls"; - }; - } ->; - -export type SendPreparedCallsParams = WithoutChainId< - RpcSchema["Request"]["params"][0] ->; - -export type SendPreparedCallsResult = RpcSchema["ReturnType"]; - -/** - * Sends prepared calls by submitting a signed user operation. - * This method is used after signing the signature request returned from prepareCalls. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {SendPreparedCallsParams} params - Parameters for sending prepared calls - * @returns {Promise} A Promise that resolves to the result containing the call ID - * - * @example - * ```ts - * // First prepare the calls - * const preparedCalls = await client.prepareCalls({ - * calls: [{ - * to: "0x1234...", - * data: "0xabcdef...", - * value: "0x0" - * }], - * capabilities: { - * paymasterService: { policyId: "your-policy-id" } - * } - * }); - * - * // Then sign the calls - * const signedCalls = await client.signPreparedCalls(preparedCalls); - * - * // Then send the prepared calls with the signature - * const result = await client.sendPreparedCalls({ - * signedCalls, - * }); - * ``` - */ -export async function sendPreparedCalls( - client: InnerWalletApiClient, - params: SendPreparedCallsParams, -): Promise { - metrics.trackEvent({ - name: "send_prepared_calls", - data: { - type: params.type, - }, - }); - - params.capabilities = mergeClientCapabilities(client, params.capabilities); - - return client.request({ - method: "wallet_sendPreparedCalls", - params: [ - params.type === "array" - ? params - : { - ...params, - chainId: toHex(client.chain.id), - }, - ], - }); -} diff --git a/account-kit/wallet-client/src/client/actions/signMessage.ts b/account-kit/wallet-client/src/client/actions/signMessage.ts deleted file mode 100644 index 3f0a8efd14..0000000000 --- a/account-kit/wallet-client/src/client/actions/signMessage.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { Address, Hex, SignableMessage } from "viem"; -import type { InnerWalletApiClient } from "../../types.ts"; -import { requestAccount } from "./requestAccount.js"; -import { metrics } from "../../metrics.js"; -import type { SmartWalletSigner } from "../index.js"; - -export type SignMessageParams = { message: SignableMessage; account?: Address }; - -export type SignMessageResult = Hex; - -/** - * Signs a message using the smart account. - * This method requests the account associated with the signer and uses it to sign the message. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {SmartAccountSigner} signer - The signer of the smart account - * @param {SignMessageParams} params - Parameters for signing the message - * @param {SignableMessage} params.message - The message to sign using EIP-191. Can be a string, or object with raw bytes. - * @param {Address} [params.account] - Optional account address to use for signing. If not provided, uses the client's current account. - * @returns {Promise} A Promise that resolves to the signed message as a hex string - * - * @example - * ```ts - * // Sign a simple text message - * const signature = await client.signMessage("Hello, world!"); - * - * // Sign a raw hex message - * const signature = await client.signMessage({ raw: "0x48656c6c6f2c20776f726c6421" }); - * ``` - */ -export async function signMessage( - client: InnerWalletApiClient, - signer: SmartWalletSigner, - params: SignMessageParams, -): Promise { - metrics.trackEvent({ - name: "sign_message", - }); - - const account = await requestAccount(client, signer, { - accountAddress: params.account ?? client.account?.address, - }); - - return account.signMessageWith6492({ message: params.message }); -} diff --git a/account-kit/wallet-client/src/client/actions/signPreparedCalls.ts b/account-kit/wallet-client/src/client/actions/signPreparedCalls.ts deleted file mode 100644 index 31840b356a..0000000000 --- a/account-kit/wallet-client/src/client/actions/signPreparedCalls.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { PrepareCallsResult } from "./prepareCalls.ts"; -import { BaseError } from "@aa-sdk/core"; -import { signSignatureRequest } from "./signSignatureRequest.js"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import type { - PreparedCall_Authorization, - PreparedCall_UserOpV060, - PreparedCall_UserOpV070, -} from "@alchemy/wallet-api-types"; -import { metrics } from "../../metrics.js"; -import { assertNever } from "../../utils.js"; -import type { SmartWalletSigner } from "../index.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_sendPreparedCalls"; - }; - } ->; - -export type SignPreparedCallsParams = PrepareCallsResult; - -export type SignPreparedCallsResult = RpcSchema["Request"]["params"][0]; - -/** - * Signs prepared calls using the provided signer. - * - * @param {SmartAccountSigner} signer - The signer to use - * @param {SignPreparedCallsParams} params - The prepared calls with signature requests - * @returns {Promise} A Promise that resolves to the signed calls - */ -export async function signPreparedCalls( - signer: SmartWalletSigner, - params: SignPreparedCallsParams, -): Promise { - metrics.trackEvent({ - name: "sign_prepared_calls", - data: { - type: params.type, - }, - }); - - const signAuthorizationCall = async (call: PreparedCall_Authorization) => { - const { signatureRequest: _signatureRequest, ...rest } = call; - const signature = await signSignatureRequest(signer, { - type: "eip7702Auth", - data: { - ...rest.data, - chainId: call.chainId, - }, - }); - return { - ...rest, - signature, - }; - }; - - const signUserOperationCall = async ( - call: PreparedCall_UserOpV060 | PreparedCall_UserOpV070, - ) => { - const { signatureRequest, ...rest } = call; - - if (!signatureRequest) { - throw new BaseError( - "Signature request is required for signing user operation calls. Ensure `onlyEstimation` is set to `false` when calling `prepareCalls`.", - ); - } - - const signature = await signSignatureRequest(signer, signatureRequest); - return { - ...rest, - signature, - }; - }; - - if (params.type === "array") { - return { - type: "array" as const, - data: await Promise.all( - params.data.map((call) => - call.type === "authorization" - ? signAuthorizationCall(call) - : signUserOperationCall(call), - ), - ), - }; - } else if ( - params.type === "user-operation-v060" || - params.type === "user-operation-v070" - ) { - return signUserOperationCall(params); - } else if (params.type === "paymaster-permit") { - throw new BaseError( - `Invalid call type ${params.type} for signing prepared calls`, - ); - } else { - return assertNever( - params, - `Unexpected call type in ${params} for signing prepared calls`, - ); - } -} diff --git a/account-kit/wallet-client/src/client/actions/signSignatureRequest.ts b/account-kit/wallet-client/src/client/actions/signSignatureRequest.ts deleted file mode 100644 index c165eaea47..0000000000 --- a/account-kit/wallet-client/src/client/actions/signSignatureRequest.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { hexToNumber, serializeSignature } from "viem"; -import { assertNever } from "../../utils.js"; -import type { - PersonalSignSignatureRequest, - TypedDataSignatureRequest, - AuthorizationSignatureRequest, - Eip7702UnsignedAuth, - EcdsaSig, -} from "@alchemy/wallet-api-types"; -import { vToYParity } from "ox/Signature"; -import type { WithoutRawPayload } from "../../types.ts"; -import { metrics } from "../../metrics.js"; -import type { SmartWalletSigner } from "../index.js"; - -export type SignSignatureRequestParams = WithoutRawPayload< - | PersonalSignSignatureRequest - | TypedDataSignatureRequest - | (AuthorizationSignatureRequest & { - data: Eip7702UnsignedAuth; - }) ->; - -export type SignSignatureRequestResult = EcdsaSig["signature"]; - -/** - * Signs a signature request using the provided signer. - * This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization. - * - * @param {SmartAccountSigner} signer - The signer to use for signing the request - * @param {SignSignatureRequestParams} params - The signature request parameters - * @param {string} params.type - The type of signature request ('personal_sign', 'eth_signTypedData_v4', or 'signature_with_authorization') - * @param {SignSignatureRequestParams["data"]} params.data - The data to sign, format depends on the signature type - * @returns {Promise} A Promise that resolves to the signature result - * - * @example - * ```ts - * // Sign a personal message - * const result = await client.signSignatureRequest({ - * type: 'personal_sign', - * data: 'Hello, world!' - * }); - * - * // Sign typed data (EIP-712) - * const result = await client.signSignatureRequest({ - * type: 'eth_signTypedData_v4', - * data: { - * domain: { ... }, - * types: { ... }, - * primaryType: '...', - * message: { ... } - * } - * }); - * ``` - */ -export async function signSignatureRequest( - signer: SmartWalletSigner, - params: SignSignatureRequestParams, -): Promise { - metrics.trackEvent({ - name: "sign_signature_request", - data: { - type: params.type, - }, - }); - - switch (params.type) { - case "personal_sign": { - return { - type: "secp256k1", - data: await signer.signMessage(params.data), - }; - } - case "eth_signTypedData_v4": { - return { - type: "secp256k1", - data: await signer.signTypedData(params.data), - }; - } - case "eip7702Auth": { - if (!signer.signAuthorization) { - throw new Error("Signer does not implement signAuthorization"); - } - const { - r, - s, - v, - yParity: _yParity, - } = await signer.signAuthorization({ - ...params.data, - chainId: hexToNumber(params.data.chainId), - nonce: hexToNumber(params.data.nonce), - }); - const yParity = - _yParity != null ? Number(_yParity) : vToYParity(Number(v)); - - return { - type: "secp256k1", - data: serializeSignature({ - r, - s, - yParity, - }), - }; - } - default: - return assertNever(params, `Unexpected signature request type.`); - } -} diff --git a/account-kit/wallet-client/src/client/actions/signTypedData.ts b/account-kit/wallet-client/src/client/actions/signTypedData.ts deleted file mode 100644 index 05a45eb038..0000000000 --- a/account-kit/wallet-client/src/client/actions/signTypedData.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { Address, Hex, TypedDataDefinition } from "viem"; -import type { InnerWalletApiClient } from "../../types.ts"; -import { requestAccount } from "./requestAccount.js"; -import { metrics } from "../../metrics.js"; -import type { SmartWalletSigner } from "../index.js"; - -export type SignTypedDataParams = TypedDataDefinition & { - account?: Address; -}; - -export type SignTypedDataResult = Hex; - -/** - * Signs typed data (EIP-712) using the smart account. - * This method requests the account associated with the signer and uses it to sign the typed data. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {SmartAccountSigner} signer - The signer of the smart account - * @param {TypedDataDefinition} params - The typed data to sign, following EIP-712 format - * @returns {Promise} A Promise that resolves to the signature as a hex string - * - * @example - * ```ts - * // Sign typed data - * const signature = await client.signTypedData({ - * domain: { - * name: 'Example DApp', - * version: '1', - * chainId: 1, - * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC' - * }, - * types: { - * Person: [ - * { name: 'name', type: 'string' }, - * { name: 'wallet', type: 'address' } - * ] - * }, - * primaryType: 'Person', - * message: { - * name: 'John Doe', - * wallet: '0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa' - * } - * }); - * ``` - */ -export async function signTypedData( - client: InnerWalletApiClient, - signer: SmartWalletSigner, - params: SignTypedDataParams, -): Promise { - metrics.trackEvent({ - name: "sign_typed_data", - }); - - const account = await requestAccount(client, signer, { - accountAddress: params.account ?? client.account?.address, - }); - - return account.signTypedDataWith6492(params); -} diff --git a/account-kit/wallet-client/src/client/actions/waitForCallsStatus.ts b/account-kit/wallet-client/src/client/actions/waitForCallsStatus.ts deleted file mode 100644 index e938939268..0000000000 --- a/account-kit/wallet-client/src/client/actions/waitForCallsStatus.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { WaitForCallsStatusParameters } from "viem"; -import { waitForCallsStatus as viemWaitForCallsStatus } from "viem/actions"; -import type { InnerWalletApiClient } from "../../types.js"; -import { metrics } from "../../metrics.js"; - -/** - * Waits for the status of a prepared call to be updated, returning after the calls are no longer pending. - * - * @param {InnerWalletApiClient} client - The wallet API client to use for the request - * @param {WaitForCallsStatusParameters} params - Parameters for waiting for calls status, including the call ID and options for polling. - * @returns {Promise} A Promise that resolves to the result containing the prepared call status, which includes a transaction receipt after the call is executed. - * - * @example - * ```ts - * const result = await client.waitForCallsStatus({ id: "0x1234..." }); - * console.log(result); - * ``` - */ -export async function waitForCallsStatus( - client: InnerWalletApiClient, - params: WaitForCallsStatusParameters, -) { - metrics.trackEvent({ - name: "wait_for_calls_status", - }); - - return viemWaitForCallsStatus(client, params); -} diff --git a/account-kit/wallet-client/src/client/client.e2e.test.ts b/account-kit/wallet-client/src/client/client.e2e.test.ts deleted file mode 100644 index 34f7f7a20e..0000000000 --- a/account-kit/wallet-client/src/client/client.e2e.test.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { LocalAccountSigner } from "@aa-sdk/core"; -import { alchemy, arbitrumSepolia } from "@account-kit/infra"; -import { describe, expect, it } from "bun:test"; -import { - createPublicClient, - zeroAddress, - type Address, - type WaitForCallsStatusReturnType, -} from "viem"; -import { createSmartWalletClient, type SmartWalletClient } from "./index.js"; -import type { PrepareCallsParams } from "./actions/prepareCalls.js"; - -// We want to test both the "unroll each step" method and the full e2e "sendCalls" method. -const sendVariants: Array< - ( - client: SmartWalletClient, - input: PrepareCallsParams, - ) => Promise -> = [ - // Send calls - async (client, input) => { - const result = await client.sendCalls(input); - expect(result.id).toBeDefined(); - return client.waitForCallsStatus({ id: result.id }); - }, - // Prepare, sign, send calls - async (client, input) => { - const preparedCalls = await client.prepareCalls(input); - const signedCalls = await client.signPreparedCalls(preparedCalls); - const result = await client.sendPreparedCalls({ - ...signedCalls, - ...(input.capabilities?.permissions != null - ? { capabilities: { permissions: input.capabilities.permissions } } - : {}), - }); - - expect(result.id).toBeDefined(); - - return client.waitForCallsStatus({ id: result.id }); - }, -]; - -describe("Client E2E Tests", () => { - const transport = alchemy( - process.env.ALCHEMY_PROXY_RPC_URL - ? { - rpcUrl: process.env.ALCHEMY_PROXY_RPC_URL, - } - : { - apiKey: process.env.TEST_ALCHEMY_API_KEY!, - }, - ); - - const signer = LocalAccountSigner.privateKeyToAccountSigner( - "0xd7b061ef04d29cf68b3c89356678eccec9988de8d5ed892c19461c4a9d65925d", - ); - - const client = createSmartWalletClient({ - transport, - chain: arbitrumSepolia, - signer, - }); - - const publicClient = createPublicClient({ - chain: arbitrumSepolia, - transport, - }); - - it("should successfully get a counterfactual address", async () => { - const account = await client.requestAccount(); - expect(account.address).toMatchInlineSnapshot( - `"0x76E765e80FFAC96ac10Aa8908a8267A3B80d606D"`, - ); - }); - - it("should successfully request account with different salt", async () => { - const account = await client.requestAccount({ - id: "26b375e3-c94a-4e98-b6b7-5a97121aa583", - creationHint: { salt: "0x1" }, - }); - - expect(account.address).toMatchInlineSnapshot( - `"0xdfdd407b9569D40BEFa503208753E59cAc9713fA"`, - ); - }); - - it("should not cache account if different inputs provided", async () => { - const account = await client.requestAccount(); - const account2 = await client.requestAccount({ - id: "2a3320b4-6ed2-4833-a488-5188e9bdd9d2", - creationHint: { salt: "0x2" }, - }); - - expect(account.address).not.toEqual(account2.address); - }); - - it("can correctly sign a message", async () => { - const account = await client.requestAccount(); - const message = "hello world"; - const signature = await client.signMessage({ message }); - const isValid = await publicClient.verifyMessage({ - address: account.address, - message: "hello world", - signature, - }); - expect(isValid).toBeTrue(); - }); - - it("can correctly sign typed data", async () => { - const account = await client.requestAccount(); - const signature = await client.signTypedData(givenTypedData); - const isValid = await publicClient.verifyTypedData({ - ...givenTypedData, - signature, - address: account.address, - }); - expect(isValid).toBeTrue(); - }); - - it("can correctly sign a message with a different account", async () => { - const account = await client.requestAccount({ - id: "26b375e3-c94a-4e98-b6b7-5a97121aa583", - creationHint: { salt: "0x1" }, - }); - - const message = "hello world"; - const signature = await client.signMessage({ - message, - account: account.address, - }); - const isValid = await publicClient.verifyMessage({ - address: account.address, - message: "hello world", - signature, - }); - expect(isValid).toBeTrue(); - }); - - it("can correctly sign typed data with a different account", async () => { - const account = await client.requestAccount({ - id: "26b375e3-c94a-4e98-b6b7-5a97121aa583", - creationHint: { salt: "0x1" }, - }); - - const signature = await client.signTypedData({ - ...givenTypedData, - account: account.address, - }); - - const isValid = await publicClient.verifyTypedData({ - ...givenTypedData, - signature, - address: account.address, - }); - expect(isValid).toBeTrue(); - }); - - it.each(sendVariants)( - "should successfully send a UO with paymaster", - async (sendVariant) => { - const account = await client.requestAccount(); - - const result = await sendVariant(client, { - calls: [{ to: zeroAddress, value: "0x0" }], - from: account.address, - capabilities: { - paymasterService: { - policyId: process.env.TEST_PAYMASTER_POLICY_ID!, - }, - }, - }); - - expect(result.status).toBe("success"); - }, - { - timeout: 45_000, - }, - ); - - it.each(sendVariants)( - "should successfully drop and replace a UO with repeat calls", - async (sendVariant) => { - const account = await client.requestAccount(); - const result1 = await sendVariant(client, { - calls: [{ to: zeroAddress, value: "0x0" }], - from: account.address, - capabilities: { - paymasterService: { - policyId: process.env.TEST_PAYMASTER_POLICY_ID!, - }, - }, - }); - - expect(result1.status).toBe("success"); - - const result2 = await sendVariant(client, { - calls: [{ to: zeroAddress, value: "0x0" }], - from: account.address, - capabilities: { - paymasterService: { - policyId: process.env.TEST_PAYMASTER_POLICY_ID!, - }, - }, - }); - - expect(result2.status).toBe("success"); - }, - { - timeout: 90_000, - }, - ); - - it.each(sendVariants)( - "should successfully send a UO with paymaster using 7702", - async (sendVariant) => { - const _signer = LocalAccountSigner.privateKeyToAccountSigner( - "0x00d35c6d307b5cddeb70aeed96ee27a551fee58bf1a43858477e6c11f9172ba8", - ); - - const _client = createSmartWalletClient({ - transport, - chain: arbitrumSepolia, - signer: _signer, - }); - - const account = await _client.requestAccount({ - creationHint: { - accountType: "7702", - }, - }); - expect(account.address).toBe(await _signer.getAddress()); - - const result = await sendVariant(_client, { - calls: [{ to: zeroAddress, value: "0x0" }], - from: account.address, - capabilities: { - paymasterService: { - policyId: process.env.TEST_PAYMASTER_POLICY_ID!, - }, - }, - }); - - expect(result.status).toBe("success"); - }, - { timeout: 45_000 }, - ); - - it.each(sendVariants)( - "should successfully create a session with grantPermissions and send a UO", - async (sendVariant) => { - const account = await client.requestAccount(); - - const sessionKey = LocalAccountSigner.generatePrivateKeySigner(); - - const permissions = await client.grantPermissions({ - account: account.address, - expirySec: Math.floor(Date.now() / 1000) + 60 * 60, - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - permissions: [{ type: "root" }], - }); - - const sessionKeyClient = createSmartWalletClient({ - transport, - chain: arbitrumSepolia, - signer: sessionKey, - }); - - const result = await sendVariant(sessionKeyClient, { - calls: [{ to: zeroAddress, value: "0x0" }], - from: account.address, - capabilities: { - paymasterService: { - policyId: process.env.TEST_PAYMASTER_POLICY_ID!, - }, - permissions, - }, - }); - - expect(result.status).toBe("success"); - }, - { - timeout: 45_000, - }, - ); - - const givenTypedData = { - 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" as const, - domain: { - name: "Ether Mail", - version: "1", - chainId: 1, - verifyingContract: - "0xbbc68f94D29d52EE8D4994E54d6ED0fEAeb99C2c" as Address, - }, - message: { - from: { - name: "Alice", - wallet: "0xFC24e57486116026740634F629ffC4E5C95A6893", - }, - to: { - name: "Bob", - wallet: "0xe7a26f006EAA562308C5df235C02BFB9a5849177", - }, - contents: "Hello, Bob!", - }, - } as const; -}); diff --git a/account-kit/wallet-client/src/client/decorator.ts b/account-kit/wallet-client/src/client/decorator.ts deleted file mode 100644 index bccb18046a..0000000000 --- a/account-kit/wallet-client/src/client/decorator.ts +++ /dev/null @@ -1,113 +0,0 @@ -import type { Address, Hex } from "viem"; -import type { - WaitForCallsStatusParameters, - WaitForCallsStatusReturnType, -} from "viem/actions"; -import type { InnerWalletApiClient } from "../types.ts"; -import { - getCallsStatus, - type GetCallsStatusParams, - type GetCallsStatusResult, -} from "./actions/getCallsStatus.js"; -import { - grantPermissions, - type GrantPermissionsParams, - type GrantPermissionsResult, -} from "./actions/grantPermissions.js"; -import { - listAccounts, - type ListAccountsParams, - type ListAccountsResult, -} from "./actions/listAccounts.js"; -import { - prepareCalls, - type PrepareCallsParams, - type PrepareCallsResult, -} from "./actions/prepareCalls.js"; -import { - requestAccount, - type RequestAccountParams, - type RequestAccountResult, -} from "./actions/requestAccount.js"; -import { - sendPreparedCalls, - type SendPreparedCallsParams, - type SendPreparedCallsResult, -} from "./actions/sendPreparedCalls.js"; -import { waitForCallsStatus } from "./actions/waitForCallsStatus.js"; -import { signMessage, type SignMessageParams } from "./actions/signMessage.js"; -import { - signSignatureRequest, - type SignSignatureRequestParams, - type SignSignatureRequestResult, -} from "./actions/signSignatureRequest.js"; -import { - signTypedData, - type SignTypedDataParams, -} from "./actions/signTypedData.js"; -import { - signPreparedCalls, - type SignPreparedCallsParams, - type SignPreparedCallsResult, -} from "./actions/signPreparedCalls.js"; -import { - sendCalls, - type SendCallsParams, - type SendCallsResult, -} from "./actions/sendCalls.js"; -import type { SmartWalletSigner } from "./index.js"; - -export type SmartWalletActions< - TAccount extends Address | undefined = Address | undefined, -> = { - requestAccount: ( - params?: RequestAccountParams, - ) => Promise; - prepareCalls: ( - params: PrepareCallsParams, - ) => Promise; - sendPreparedCalls: ( - params: SendPreparedCallsParams, - ) => Promise; - sendCalls: (params: SendCallsParams) => Promise; - listAccounts: (params: ListAccountsParams) => Promise; - getCallsStatus: ( - params: GetCallsStatusParams, - ) => Promise; - waitForCallsStatus: ( - params: WaitForCallsStatusParameters, - ) => Promise; - signSignatureRequest: ( - params: SignSignatureRequestParams, - ) => Promise; - signPreparedCalls: ( - params: SignPreparedCallsParams, - ) => Promise; - signMessage: (params: SignMessageParams) => Promise; - signTypedData: (params: SignTypedDataParams) => Promise; - grantPermissions: ( - params: GrantPermissionsParams, - ) => Promise; -}; - -export function smartWalletClientActions< - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClient, - signer: SmartWalletSigner, -): SmartWalletActions { - return { - requestAccount: (params) => requestAccount(client, signer, params), - prepareCalls: (params) => prepareCalls(client, params), - listAccounts: (params) => listAccounts(client, signer, params), - sendPreparedCalls: (params) => sendPreparedCalls(client, params), - sendCalls: (params) => sendCalls(client, signer, params), - getCallsStatus: (params) => getCallsStatus(client, params), - waitForCallsStatus: (params) => waitForCallsStatus(client, params), - signSignatureRequest: (params) => signSignatureRequest(signer, params), - signPreparedCalls: (params) => signPreparedCalls(signer, params), - signMessage: (params) => signMessage(client, signer, params), - signTypedData: (params) => signTypedData(client, signer, params), - grantPermissions: (params) => grantPermissions(client, signer, params), - }; -} diff --git a/account-kit/wallet-client/src/client/index.ts b/account-kit/wallet-client/src/client/index.ts deleted file mode 100644 index e0924463e4..0000000000 --- a/account-kit/wallet-client/src/client/index.ts +++ /dev/null @@ -1,136 +0,0 @@ -import type { SmartAccountSigner } from "@aa-sdk/core"; -import type { AlchemyTransport } from "@account-kit/infra"; -import { - type Address, - type Chain, - type Prettify, - type Transport, - createClient, - custom, - type JsonRpcAccount, -} from "viem"; -import type { InnerWalletApiClientBase } from "../types.ts"; -import { - smartWalletClientActions, - type SmartWalletActions, -} from "./decorator.js"; -import { Provider, RpcSchema } from "ox"; -import type { - WalletServerRpcSchemaType, - WalletServerViemRpcSchema, -} from "@alchemy/wallet-api-types/rpc"; -import { internalStateDecorator } from "../internal/decorator.js"; -import { metrics } from "../metrics.js"; - -export type SmartWalletSigner = SmartAccountSigner; - -export type SmartWalletClientParams< - TAccount extends Address | undefined = Address | undefined, -> = Prettify< - { - transport: AlchemyTransport; - chain: Chain; - signer: SmartWalletSigner; - account?: TAccount | Address | undefined; - } & ( - | { policyId?: string; policyIds?: never } - | { policyIds?: string[]; policyId?: never } - ) ->; - -export type SmartWalletClient< - TAccount extends Address | undefined = Address | undefined, -> = InnerWalletApiClientBase>; - -/** - * Creates a smart wallet client that can be used to interact with a smart account. - * - * @param {SmartWalletClientParams} params - The parameters for creating the smart wallet client - * @param {AlchemyTransport} params.transport - The Alchemy transport to use - * @param {Chain} params.chain - The chain to use - * @param {SmartAccountSigner} params.signer - The signer to use for the smart account - * @param {string} [params.policyId] - The policy ID for gas sponsorship (optional) - * @param {Address} [params.account] - The smart account address to use (optional) - * @returns {SmartWalletClient} - A viem-compatible client - * - * @example - * ```ts - * import { LocalAccountSigner } from "@aa-sdk/core"; - * import { alchemy, arbitrumSepolia } from "@account-kit/infra"; - * import { generatePrivateKey } from "viem/accounts"; - * import { createSmartWalletClient } from "@account-kit/wallet-client"; - * - * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - * const transport = alchemy({ - * apiKey: "your-alchemy-api-key", - * }); - * const client = createSmartWalletClient({ - * transport, - * chain: arbitrumSepolia, - * signer, - * }); - * ``` - */ -export function createSmartWalletClient< - TAccount extends Address | undefined = undefined, ->(params: SmartWalletClientParams): SmartWalletClient; - -export function createSmartWalletClient( - params: SmartWalletClientParams, -): SmartWalletClient { - const { transport, chain, account, signer } = params; - - const policyIds = params.policyId - ? [params.policyId] - : params.policyIds - ? params.policyIds - : undefined; - - const innerClient = createClient< - Transport, - Chain, - JsonRpcAccount
| undefined, - WalletServerViemRpcSchema - >({ - transport: (opts) => - custom( - Provider.from(transport(opts), { - schema: RpcSchema.from(), - }), - )(opts), - chain, - account, - }).extend(() => ({ - policyIds, - internal: internalStateDecorator(), - })); - - metrics.trackEvent({ - name: "client_created", - data: { - chainId: params.chain.id, - }, - }); - - return innerClient.extend((client) => - smartWalletClientActions(client, signer), - ); -} - -// Example usage: -// const clientWithoutAccount = createSmartWalletClient({ -// transport: alchemy({ apiKey: "123" }), -// chain: baseSepolia, -// signer: createDummySigner(zeroAddress), -// }); - -// const account1 = await clientWithoutAccount.requestAccount(); - -// const clientWithAccount = createSmartWalletClient({ -// transport: alchemy({ apiKey: "123" }), -// chain: baseSepolia, -// signer: createDummySigner(zeroAddress), -// account: zeroAddress, -// }); - -// const account2 = await clientWithAccount.requestAccount(); diff --git a/account-kit/wallet-client/src/experimental/actions/requestQuoteV0.ts b/account-kit/wallet-client/src/experimental/actions/requestQuoteV0.ts deleted file mode 100644 index 848fd326ef..0000000000 --- a/account-kit/wallet-client/src/experimental/actions/requestQuoteV0.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - toHex, - type Address, - type IsUndefined, - type Prettify, - type UnionOmit, -} from "viem"; -import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; -import type { InnerWalletApiClientBase } from "../../types.js"; -import { AccountNotFoundError } from "@aa-sdk/core"; -import { mergeClientCapabilities } from "../../internal/capabilities.js"; - -type RpcSchema = Extract< - WalletServerRpcSchemaType, - { - Request: { - method: "wallet_requestQuote_v0"; - }; - } ->; - -export type RequestQuoteV0Params< - TAccount extends Address | undefined = Address | undefined, -> = Prettify> & - (IsUndefined extends true ? { from: Address } : { from?: never }); - -export type RequestQuoteV0Result = Prettify; - -export async function requestQuoteV0< - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClientBase, - params: RequestQuoteV0Params, -): Promise { - const from = params.from ?? client.account?.address; - if (!from) { - throw new AccountNotFoundError(); - } - - const capabilities = params.returnRawCalls - ? undefined - : mergeClientCapabilities(client, params.capabilities); - - return await client.request({ - method: "wallet_requestQuote_v0", - params: [ - { - ...params, - chainId: toHex(client.chain.id), - from, - ...(capabilities && { capabilities }), - }, - ], - }); -} diff --git a/account-kit/wallet-client/src/experimental/swapActionsDecorator.e2e.test.ts b/account-kit/wallet-client/src/experimental/swapActionsDecorator.e2e.test.ts deleted file mode 100644 index 22e5467c50..0000000000 --- a/account-kit/wallet-client/src/experimental/swapActionsDecorator.e2e.test.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { base } from "viem/chains"; -import { createSmartWalletClient } from "../client/index.js"; -import { swapActions } from "./swapActionsDecorator.js"; -import { alchemy, arbitrum } from "@account-kit/infra"; -import { size, toHex } from "viem"; - -describe("swapActions decorator tests", () => { - const transport = alchemy( - process.env.ALCHEMY_PROXY_RPC_URL - ? { - rpcUrl: process.env.ALCHEMY_PROXY_RPC_URL, - } - : { - apiKey: process.env.TEST_ALCHEMY_API_KEY!, - }, - ); - - it("should successfully request a same-chain quote", async () => { - const usdcHolderAddr = "0x463f5D63e5a5EDB8615b0e485A090a18Aba08578"; - - const client = createSmartWalletClient({ - transport, - chain: arbitrum, - signer: { - getAddress: async () => usdcHolderAddr, - signMessage: async () => { - throw new Error("Not implemented"); - }, - signTypedData: async () => { - throw new Error("Not implemented"); - }, - signerType: "test", - inner: {}, - }, - }).extend(swapActions); - - const account = await client.requestAccount({ - creationHint: { - accountType: "7702", - }, - }); - - const USDC_ARB = "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"; - const NATIVE_TOKEN_ADDR = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee"; // from ERC-7528 - - const quote = await client.requestQuoteV0({ - from: account.address, - fromToken: USDC_ARB, - toToken: NATIVE_TOKEN_ADDR, - minimumToAmount: "0x5AF3107A4000", - }); - - expect(quote.quote).toBeDefined(); - expect(quote.quote.fromAmount).toBeDefined(); - expect(quote.quote.minimumToAmount).toBeDefined(); - expect(quote.quote.expiry).toBeDefined(); - expect(quote.callId).not.toBeDefined(); - }, 30_000); - - it("should successfully request a cross-chain quote", async () => { - const usdcHolderAddr = "0x463f5D63e5a5EDB8615b0e485A090a18Aba08578"; - - const client = createSmartWalletClient({ - transport, - chain: arbitrum, - signer: { - getAddress: async () => usdcHolderAddr, - signMessage: async () => { - throw new Error("Not implemented"); - }, - signTypedData: async () => { - throw new Error("Not implemented"); - }, - signerType: "test", - inner: {}, - }, - }).extend(swapActions); - - const account = await client.requestAccount({ - creationHint: { - accountType: "7702", - }, - }); - - const USDC_ARB = "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"; - const NATIVE_TOKEN_ADDR = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEee"; // from ERC-7528 - - const quote = await client.requestQuoteV0({ - from: account.address, - fromToken: USDC_ARB, - toToken: NATIVE_TOKEN_ADDR, - toChainId: toHex(base.id), - minimumToAmount: "0x5AF3107A4000", - }); - - expect(quote.quote).toBeDefined(); - expect(quote.quote.fromAmount).toBeDefined(); - expect(quote.quote.minimumToAmount).toBeDefined(); - expect(quote.quote.expiry).toBeDefined(); - expect(quote.callId).toBeDefined(); - expect(size(quote.callId!)).toBeGreaterThan(64); - }, 30_000); -}); diff --git a/account-kit/wallet-client/src/experimental/swapActionsDecorator.ts b/account-kit/wallet-client/src/experimental/swapActionsDecorator.ts deleted file mode 100644 index 9fcc653947..0000000000 --- a/account-kit/wallet-client/src/experimental/swapActionsDecorator.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Address } from "viem"; -import { - requestQuoteV0, - type RequestQuoteV0Params, - type RequestQuoteV0Result, -} from "./actions/requestQuoteV0.js"; -import type { InnerWalletApiClientBase } from "../types.js"; - -export type SwapActions< - TAccount extends Address | undefined = Address | undefined, -> = { - requestQuoteV0: ( - params: RequestQuoteV0Params, - ) => Promise; -}; - -export const swapActions: < - TAccount extends Address | undefined = Address | undefined, ->( - client: InnerWalletApiClientBase, -) => SwapActions = (client) => ({ - requestQuoteV0: (params) => requestQuoteV0(client, params), -}); diff --git a/account-kit/wallet-client/src/exports/experimental.ts b/account-kit/wallet-client/src/exports/experimental.ts deleted file mode 100644 index 105e559821..0000000000 --- a/account-kit/wallet-client/src/exports/experimental.ts +++ /dev/null @@ -1,10 +0,0 @@ -// individual actions -export { requestQuoteV0 } from "../experimental/actions/requestQuoteV0.js"; -export { - type RequestQuoteV0Params, - type RequestQuoteV0Result, -} from "../experimental/actions/requestQuoteV0.js"; - -// decorator -export { swapActions } from "../experimental/swapActionsDecorator.js"; -export { type SwapActions } from "../experimental/swapActionsDecorator.js"; diff --git a/account-kit/wallet-client/src/exports/index.ts b/account-kit/wallet-client/src/exports/index.ts deleted file mode 100644 index c5a5a36c6f..0000000000 --- a/account-kit/wallet-client/src/exports/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -// TODO: anything that we want to expose publicly should be exported from `index.ts` files in the subdirectories -// and we shouldn't export * for the sake of tree-shaking -export { - createSmartWalletClient, - type SmartWalletClient, - type SmartWalletClientParams, -} from "../client/index.js"; - -export type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc"; - -// client actions -export type * from "../client/actions/getCallsStatus.js"; -export { getCallsStatus } from "../client/actions/getCallsStatus.js"; -export type * from "../client/actions/grantPermissions.js"; -export { grantPermissions } from "../client/actions/grantPermissions.js"; -export type * from "../client/actions/listAccounts.js"; -export { listAccounts } from "../client/actions/listAccounts.js"; -export type * from "../client/actions/prepareCalls.js"; -export { prepareCalls } from "../client/actions/prepareCalls.js"; -export type * from "../client/actions/requestAccount.js"; -export { requestAccount } from "../client/actions/requestAccount.js"; -export type * from "../client/actions/signSignatureRequest.js"; -export { signSignatureRequest } from "../client/actions/signSignatureRequest.js"; -export type * from "../client/actions/signPreparedCalls.js"; -export { signPreparedCalls } from "../client/actions/signPreparedCalls.js"; -export type * from "../client/actions/signMessage.js"; -export { signMessage } from "../client/actions/signMessage.js"; -export type * from "../client/actions/signTypedData.js"; -export { signTypedData } from "../client/actions/signTypedData.js"; -export type * from "../client/actions/sendPreparedCalls.js"; -export { sendPreparedCalls } from "../client/actions/sendPreparedCalls.js"; -export type * from "../client/actions/sendCalls.js"; -export { sendCalls } from "../client/actions/sendCalls.js"; -export type * from "../client/actions/waitForCallsStatus.js"; -export { waitForCallsStatus } from "../client/actions/waitForCallsStatus.js"; -export type * from "../client/actions/prepareSign.js"; -export { prepareSign } from "../client/actions/prepareSign.js"; -export type * from "../client/actions/formatSign.js"; -export { formatSign } from "../client/actions/formatSign.js"; diff --git a/account-kit/wallet-client/src/internal/account.ts b/account-kit/wallet-client/src/internal/account.ts deleted file mode 100644 index 364f152e3b..0000000000 --- a/account-kit/wallet-client/src/internal/account.ts +++ /dev/null @@ -1,144 +0,0 @@ -import type { SmartContractAccount } from "@aa-sdk/core"; -import { - createModularAccountV2, - createLightAccount, - createMultiOwnerLightAccount, - createMultiOwnerModularAccount, -} from "@account-kit/smart-contracts"; -import { - concatHex, - type Chain, - type Transport, - type Address, - isAddressEqual, -} from "viem"; -import type { SerializedInitcode } from "@alchemy/wallet-api-types"; -import { InternalError, InvalidRequestError } from "ox/RpcResponse"; -import { assertNever } from "../utils.js"; -import { metrics } from "../metrics.js"; -import type { SmartWalletSigner } from "../client/index.js"; - -type CreateAccountParams = { - chain: Chain; - transport: Transport; - signer: SmartWalletSigner; - accountAddress: Address; - counterfactualInfo?: SerializedInitcode; // undefined for 7702 accounts - delegation?: Address; // for 7702 accounts -}; - -/** - * Creates a smart account instance from the given parameters. - * - * @param {CreateAccountParams} params - The parameters for creating a smart account. - * @returns {Promise} A promise that resolves to the created smart account. - * - * @example - * ```ts - * // Create a smart account - * const account = await createAccount({ - * chain: arbitrumSepolia, - * transport: alchemy({ - * apiKey: "your-alchemy-api-key", - * }), - * signer: signer, - * accountAddress: "0x1234...", - * }); - * ``` - */ -export async function createAccount( - params: CreateAccountParams, -): Promise { - const { counterfactualInfo: ci, signer, ...accountParams } = params; - - if (params.delegation) { - if (!isAddressEqual(params.delegation, MAV2_7702_DELEGATION_ADDRESS)) { - throw new Error("7702 mode currently only supports ModularAccountV2"); - } - - return createModularAccountV2({ - ...accountParams, - signer, - mode: "7702", - }); - } - - if (!ci) { - throw new InternalError({ - message: "Counterfactual info not found", - }); - } - - const factoryType = ci.factoryType; - const commonParams = { - ...accountParams, - initCode: concatHex([ci.factoryAddress, ci.factoryData]), - }; - - metrics.trackEvent({ - name: "account_initialized", - data: { - chainId: params.chain.id, - factory: params.delegation - ? "7702" - : (params.counterfactualInfo?.factoryType ?? "unknown"), - }, - }); - - // Return the account created based on the factory type - switch (factoryType) { - case "MAv2.0.0-sma-b": - return createModularAccountV2({ - ...commonParams, - signer, - mode: "default", - }); - case "LightAccountV2.0.0": - return createLightAccount({ - ...commonParams, - signer, - version: "v2.0.0", - }); - case "LightAccountV1.0.1": - return createLightAccount({ - ...commonParams, - signer, - version: "v1.0.1", - }); - case "LightAccountV1.0.2": - return createLightAccount({ - ...commonParams, - signer, - version: "v1.0.2", - }); - case "LightAccountV1.1.0": - return createLightAccount({ - ...commonParams, - signer, - version: "v1.1.0", - }); - case "MAv1.0.0-MultiOwner": - return createMultiOwnerModularAccount({ - ...commonParams, - signer, - }); - case "LightAccountV2.0.0-MultiOwner": - return createMultiOwnerLightAccount({ - ...commonParams, - version: "v2.0.0", - signer, - }); - case "MAv1.0.0-MultiSig": - case "MAv2.0.0-ma-ssv": - case "unknown": - case undefined: - throw new InvalidRequestError({ - message: `Account type currently unsupported: ${factoryType}`, - }); - default: - return assertNever(factoryType, "Unsupported factory type"); - } -} - -const MAV2_7702_DELEGATION_ADDRESS = - "0x69007702764179f14F51cdce752f4f775d74E139"; diff --git a/account-kit/wallet-client/src/internal/capabilities.ts b/account-kit/wallet-client/src/internal/capabilities.ts deleted file mode 100644 index 748c503e1d..0000000000 --- a/account-kit/wallet-client/src/internal/capabilities.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { - PrepareCallsCapabilities, - SendPreparedCallsCapabilities, -} from "@alchemy/wallet-api-types/capabilities"; - -import type { InnerWalletApiClientBase } from "../types.js"; - -/** - * Merges client capabilities with capabilities from the request. - * Uses policyId (singular) when there's one policy, policyIds (array) when multiple. - * - * @param {InnerWalletApiClientBase} client - The inner wallet API client (potentially including global capabilities like policy IDs) - * @param {T | undefined} capabilities - Request capabilities to merge with, if any - * @returns {T | undefined} The merged capabilities object, or original capabilities if no capability configuration exists on the client - */ -export const mergeClientCapabilities = < - T extends PrepareCallsCapabilities | SendPreparedCallsCapabilities, ->( - client: InnerWalletApiClientBase, - capabilities: T | undefined, -): T | undefined => { - if (!client.policyIds?.length || capabilities?.paymasterService) { - return capabilities; - } - - return { - ...capabilities, - paymasterService: - client.policyIds.length === 1 - ? { policyId: client.policyIds[0] } - : { policyIds: client.policyIds }, - } as T; -}; - -/** - * Extracts capabilities from prepareCalls that are usable for sendPreparedCalls. - * Only permissions and paymasterService (policyId/policyIds & webhookData) are supported. - * - * @param {PrepareCallsCapabilities | undefined} capabilities - The prepareCalls capabilities - * @returns {SendPreparedCallsCapabilities | undefined} The sendPreparedCalls capabilities, or undefined if no relevant capabilities exist - */ -export const extractCapabilitiesForSending = ( - capabilities: PrepareCallsCapabilities | undefined, -): SendPreparedCallsCapabilities | undefined => { - if ( - capabilities?.permissions == null && - capabilities?.paymasterService == null - ) { - return undefined; - } - - const paymasterService = capabilities.paymasterService; - - return { - permissions: capabilities.permissions, - paymasterService: - paymasterService != null - ? { - ...("policyId" in paymasterService - ? { policyId: paymasterService.policyId } - : { policyIds: paymasterService.policyIds }), - webhookData: paymasterService.webhookData, - } - : undefined, - }; -}; diff --git a/account-kit/wallet-client/src/internal/decorator.ts b/account-kit/wallet-client/src/internal/decorator.ts deleted file mode 100644 index 5c198210e3..0000000000 --- a/account-kit/wallet-client/src/internal/decorator.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { CachedAccount, InternalState } from "../types.ts"; - -export function internalStateDecorator(): InternalState { - let account: CachedAccount | undefined = undefined; - - return { - setAccount: (newAccount: CachedAccount) => { - account = newAccount; - }, - getAccount: () => account, - }; -} diff --git a/account-kit/wallet-client/src/metrics.ts b/account-kit/wallet-client/src/metrics.ts deleted file mode 100644 index 65e2a72644..0000000000 --- a/account-kit/wallet-client/src/metrics.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { createLogger } from "@account-kit/logging"; -import { VERSION } from "./version.js"; -import type { SerializedInitcode } from "@alchemy/wallet-api-types"; - -export type CoreEventsSchema = [ - { - EventName: "client_created"; - EventData: { - chainId: number; - }; - }, - { - EventName: "account_initialized"; - EventData: { - chainId: number; - factory: SerializedInitcode["factoryType"] | "7702"; - }; - }, - { - EventName: "list_accounts"; - }, - { - EventName: "prepare_sign"; - }, - { - EventName: "format_sign"; - }, - { - EventName: "get_calls_status"; - }, - { - EventName: "grant_permissions"; - }, - { - EventName: "prepare_calls"; - }, - { - EventName: "send_prepared_calls"; - EventData: { - type: string; - }; - }, - { - EventName: "send_calls"; - }, - { - EventName: "wait_for_calls_status"; - }, - { - EventName: "sign_message"; - }, - { - EventName: "sign_typed_data"; - }, - { - EventName: "sign_prepared_calls"; - EventData: { - type: string; - }; - }, - { - EventName: "sign_signature_request"; - EventData: { - type: string; - }; - }, -]; - -export const metrics = createLogger({ - package: "@account-kit/wallet-client", - version: VERSION, -}); diff --git a/account-kit/wallet-client/src/types.ts b/account-kit/wallet-client/src/types.ts deleted file mode 100644 index d8f715f51f..0000000000 --- a/account-kit/wallet-client/src/types.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { SmartContractAccount } from "@aa-sdk/core"; -import type { AlchemyTransport } from "@account-kit/infra"; -import type { - Address, - Chain, - Client, - Hex, - JsonRpcAccount, - Transport, -} from "viem"; -import type { RequestAccountParams } from "./client/actions/requestAccount.ts"; -import type { WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc"; - -export type CreateInnerClientParams< - TAccount extends Address | undefined = Address | undefined, -> = { - chain: Chain; - transport: AlchemyTransport; - policyIds?: string[]; - account?: TAccount | Address | undefined; -}; - -export type InnerWalletApiClientBase< - TExtend extends { [key: string]: unknown } | undefined = - | { [key: string]: unknown } - | undefined, -> = Client< - Transport, - Chain, - JsonRpcAccount
| undefined, - WalletServerViemRpcSchema, - { policyIds?: string[] } & TExtend ->; - -export type CachedAccount = { - account: SmartContractAccount; - requestParams: RequestAccountParams; -}; - -export type InternalState = { - setAccount: (account: CachedAccount) => void; - getAccount: () => CachedAccount | undefined; -}; - -export type InnerWalletApiClient = InnerWalletApiClientBase<{ - internal: InternalState; -}>; - -export type WithoutChainId = T extends { chainId: Hex } - ? Omit - : T; - -export type WithoutRawPayload = T extends { rawPayload: Hex } - ? Omit - : T; diff --git a/account-kit/wallet-client/src/utils.ts b/account-kit/wallet-client/src/utils.ts deleted file mode 100644 index b0addacf4e..0000000000 --- a/account-kit/wallet-client/src/utils.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { isHex, toHex, type Hex } from "viem"; - -export type Expect = T; - -export const assertNever = (_val: never, msg: string): never => { - throw new Error(msg); -}; - -/** - * If the value is already Hex, it is returned unchanged. If it's a string, number or bigint, it's converted. - * - * @param {string | number | bigint | Hex} val - The value to convert to Hex. - * @returns {Hex} The Hex value. - * - * @example - * ```ts - * const hex = castToHex("0x1234"); - * const hex2 = castToHex(1234); - * const hex3 = castToHex(BigInt(1234)); - * ``` - */ -export const castToHex = (val: string | number | bigint | Hex): Hex => { - if (isHex(val)) { - return val; - } - return toHex(val); -}; diff --git a/account-kit/wallet-client/src/version.ts b/account-kit/wallet-client/src/version.ts deleted file mode 100644 index 4842bac1c6..0000000000 --- a/account-kit/wallet-client/src/version.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is autogenerated by inject-version.ts. Any changes will be -// overwritten on commit! -export const VERSION = "4.84.1"; diff --git a/account-kit/wallet-client/tsconfig.build.json b/account-kit/wallet-client/tsconfig.build.json deleted file mode 100644 index 7f0e236b58..0000000000 --- a/account-kit/wallet-client/tsconfig.build.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "typescript-template/build.json", - "exclude": [ - "node_modules", - "**/*/__tests__", - "**/*/*.test.ts", - "**/*/*.test-d.ts", - "**/*/*.e2e.test.ts", - "vitest.config.ts", - "vitest.config.e2e.ts" - ], - "include": ["src"], - "compilerOptions": { - "sourceMap": true, - "paths": { - "@account-kit/wallet-client": ["./src/index.ts"] - } - } -} diff --git a/account-kit/wallet-client/tsconfig.json b/account-kit/wallet-client/tsconfig.json deleted file mode 100644 index d24fececb8..0000000000 --- a/account-kit/wallet-client/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "typescript-template/base.json", - "compilerOptions": { - "types": ["vitest/globals", "bun-types"], - "paths": { - "@account-kit/wallet-client": ["./src/index.ts"], - "~test/*": ["../../.vitest/src/*"] - } - } -} diff --git a/account-kit/wallet-client/turbo.json b/account-kit/wallet-client/turbo.json deleted file mode 100644 index 651246ac9f..0000000000 --- a/account-kit/wallet-client/turbo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "dependsOn": ["^build"], - "outputs": ["dist/**"], - "cache": true - } - } -} diff --git a/account-kit/wallet-client/typedoc.json b/account-kit/wallet-client/typedoc.json deleted file mode 100644 index 4d68c9780a..0000000000 --- a/account-kit/wallet-client/typedoc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["src/exports/index.ts"], - "tsconfig": "./tsconfig.build.json", - "plugin": ["typedoc-plugin-markdown"], - "fileExtension": ".mdx" -} diff --git a/account-kit/wallet-client/vitest.config.ts b/account-kit/wallet-client/vitest.config.ts deleted file mode 100644 index 3061a75c56..0000000000 --- a/account-kit/wallet-client/vitest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineProject, mergeConfig } from "vitest/config"; -import { sharedConfig } from "../../.vitest/vitest.shared"; - -export default mergeConfig( - // @ts-ignore this does work - sharedConfig, - defineProject({ - test: { - name: "account-kit/wallet-client", - }, - }), -); diff --git a/docs/docs.yml b/docs/docs.yml index 83bfb9e3a7..2063a8e167 100644 --- a/docs/docs.yml +++ b/docs/docs.yml @@ -3,1783 +3,115 @@ instances: - url: https://alchemy.com/docs -tabs: - wallets: - display-name: Wallets - slug: wallets +experimental: + mdx-components: + - wallets/components navigation: - tab: wallets layout: - section: SDK Reference contents: - - section: AA-SDK core - path: wallets/pages/reference/aa-sdk/core/src/README.mdx - contents: - - section: Classes - contents: - - page: AccountNotFoundError - path: wallets/pages/reference/aa-sdk/core/src/classes/AccountNotFoundError.mdx - - page: AccountRequiresOwnerError - path: wallets/pages/reference/aa-sdk/core/src/classes/AccountRequiresOwnerError.mdx - - page: BaseError - path: wallets/pages/reference/aa-sdk/core/src/classes/BaseError.mdx - - page: BatchExecutionNotSupportedError - path: wallets/pages/reference/aa-sdk/core/src/classes/BatchExecutionNotSupportedError.mdx - - page: ChainNotFoundError - path: wallets/pages/reference/aa-sdk/core/src/classes/ChainNotFoundError.mdx - - page: DefaultFactoryNotDefinedError - path: wallets/pages/reference/aa-sdk/core/src/classes/DefaultFactoryNotDefinedError.mdx - - page: EntityIdOverrideError - path: wallets/pages/reference/aa-sdk/core/src/classes/EntityIdOverrideError.mdx - - page: EntryPointNotFoundError - path: wallets/pages/reference/aa-sdk/core/src/classes/EntryPointNotFoundError.mdx - - page: FailedToFindTransactionError - path: wallets/pages/reference/aa-sdk/core/src/classes/FailedToFindTransactionError.mdx - - page: FailedToGetStorageSlotError - path: wallets/pages/reference/aa-sdk/core/src/classes/FailedToGetStorageSlotError.mdx - - page: GetCounterFactualAddressError - path: wallets/pages/reference/aa-sdk/core/src/classes/GetCounterFactualAddressError.mdx - - page: IncompatibleClientError - path: wallets/pages/reference/aa-sdk/core/src/classes/IncompatibleClientError.mdx - - page: IncorrectAccountType - path: wallets/pages/reference/aa-sdk/core/src/classes/IncorrectAccountType.mdx - - page: InvalidDeferredActionNonce - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidDeferredActionNonce.mdx - - page: InvalidEntityIdError - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidEntityIdError.mdx - - page: InvalidEntryPointError - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidEntryPointError.mdx - - page: InvalidModularAccountV2Mode - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidModularAccountV2Mode.mdx - - page: InvalidNonceKeyError - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidNonceKeyError.mdx - - page: InvalidRpcUrlError - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidRpcUrlError.mdx - - page: InvalidSignerTypeError - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidSignerTypeError.mdx - - page: InvalidUserOperationError - path: wallets/pages/reference/aa-sdk/core/src/classes/InvalidUserOperationError.mdx - - page: LocalAccountSigner - path: wallets/pages/reference/aa-sdk/core/src/classes/LocalAccountSigner.mdx - - page: Logger - path: wallets/pages/reference/aa-sdk/core/src/classes/Logger.mdx - - page: NotAModularAccountV2Error - path: wallets/pages/reference/aa-sdk/core/src/classes/NotAModularAccountV2Error.mdx - - page: SignTransactionNotSupportedError - path: wallets/pages/reference/aa-sdk/core/src/classes/SignTransactionNotSupportedError.mdx - - page: SmartAccountWithSignerRequiredError - path: wallets/pages/reference/aa-sdk/core/src/classes/SmartAccountWithSignerRequiredError.mdx - - page: TraceHeader - path: wallets/pages/reference/aa-sdk/core/src/classes/TraceHeader.mdx - - page: TransactionMissingToParamError - path: wallets/pages/reference/aa-sdk/core/src/classes/TransactionMissingToParamError.mdx - - page: UpgradeToAndCallNotSupportedError - path: wallets/pages/reference/aa-sdk/core/src/classes/UpgradeToAndCallNotSupportedError.mdx - - page: UpgradesNotSupportedError - path: wallets/pages/reference/aa-sdk/core/src/classes/UpgradesNotSupportedError.mdx - - page: WaitForUserOperationError - path: wallets/pages/reference/aa-sdk/core/src/classes/WaitForUserOperationError.mdx - - page: WalletClientSigner - path: wallets/pages/reference/aa-sdk/core/src/classes/WalletClientSigner.mdx - - section: Enumerations - contents: - - page: DeploymentState - path: wallets/pages/reference/aa-sdk/core/src/enumerations/DeploymentState.mdx - - page: LogLevel - path: wallets/pages/reference/aa-sdk/core/src/enumerations/LogLevel.mdx - - page: RoundingMode - path: wallets/pages/reference/aa-sdk/core/src/enumerations/RoundingMode.mdx - - section: Functions - contents: - - page: allEqual - path: wallets/pages/reference/aa-sdk/core/src/functions/allEqual.mdx - - page: applyUserOpFeeOption - path: wallets/pages/reference/aa-sdk/core/src/functions/applyUserOpFeeOption.mdx - - page: applyUserOpOverride - path: wallets/pages/reference/aa-sdk/core/src/functions/applyUserOpOverride.mdx - - page: applyUserOpOverrideOrFeeOption - path: wallets/pages/reference/aa-sdk/core/src/functions/applyUserOpOverrideOrFeeOption.mdx - - page: asyncPipe - path: wallets/pages/reference/aa-sdk/core/src/functions/asyncPipe.mdx - - page: bigIntClamp - path: wallets/pages/reference/aa-sdk/core/src/functions/bigIntClamp.mdx - - page: bigIntMax - path: wallets/pages/reference/aa-sdk/core/src/functions/bigIntMax.mdx - - page: bigIntMin - path: wallets/pages/reference/aa-sdk/core/src/functions/bigIntMin.mdx - - page: bigIntMultiply - path: wallets/pages/reference/aa-sdk/core/src/functions/bigIntMultiply.mdx - - page: buildUserOperation - path: wallets/pages/reference/aa-sdk/core/src/functions/buildUserOperation.mdx - - page: buildUserOperationFromTx - path: wallets/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTx.mdx - - page: buildUserOperationFromTxs - path: wallets/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTxs.mdx - - page: bypassPaymasterAndData - path: wallets/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndData.mdx - - page: bypassPaymasterAndDataEmptyHex - path: wallets/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndDataEmptyHex.mdx - - page: checkGasSponsorshipEligibility - path: wallets/pages/reference/aa-sdk/core/src/functions/checkGasSponsorshipEligibility.mdx - - page: clientHeaderTrack - path: wallets/pages/reference/aa-sdk/core/src/functions/clientHeaderTrack.mdx - - page: concatPaymasterAndData - path: wallets/pages/reference/aa-sdk/core/src/functions/concatPaymasterAndData.mdx - - page: conditionalReturn - path: wallets/pages/reference/aa-sdk/core/src/functions/conditionalReturn.mdx - - page: convertChainIdToCoinType - path: wallets/pages/reference/aa-sdk/core/src/functions/convertChainIdToCoinType.mdx - - page: convertCoinTypeToChain - path: wallets/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChain.mdx - - page: convertCoinTypeToChainId - path: wallets/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChainId.mdx - - page: createBundlerClient - path: wallets/pages/reference/aa-sdk/core/src/functions/createBundlerClient.mdx - - page: createSmartAccountClient - path: wallets/pages/reference/aa-sdk/core/src/functions/createSmartAccountClient.mdx - - page: createSmartAccountClientFromExisting - path: wallets/pages/reference/aa-sdk/core/src/functions/createSmartAccountClientFromExisting.mdx - - page: deepHexlify - path: wallets/pages/reference/aa-sdk/core/src/functions/deepHexlify.mdx - - page: defaultFeeEstimator - path: wallets/pages/reference/aa-sdk/core/src/functions/defaultFeeEstimator.mdx - - page: dropAndReplaceUserOperation - path: wallets/pages/reference/aa-sdk/core/src/functions/dropAndReplaceUserOperation.mdx - - page: erc7677Middleware - path: wallets/pages/reference/aa-sdk/core/src/functions/erc7677Middleware.mdx - - page: filterUndefined - path: wallets/pages/reference/aa-sdk/core/src/functions/filterUndefined.mdx - - page: getAccountAddress - path: wallets/pages/reference/aa-sdk/core/src/functions/getAccountAddress.mdx - - page: getDefaultUserOperationFeeOptions - path: wallets/pages/reference/aa-sdk/core/src/functions/getDefaultUserOperationFeeOptions.mdx - - page: getEntryPoint - path: wallets/pages/reference/aa-sdk/core/src/functions/getEntryPoint.mdx - - page: getUserOperationError - path: wallets/pages/reference/aa-sdk/core/src/functions/getUserOperationError.mdx - - page: isBigNumberish - path: wallets/pages/reference/aa-sdk/core/src/functions/isBigNumberish.mdx - - page: isEntryPointVersion - path: wallets/pages/reference/aa-sdk/core/src/functions/isEntryPointVersion.mdx - - page: isMultiplier - path: wallets/pages/reference/aa-sdk/core/src/functions/isMultiplier.mdx - - page: isSigner - path: wallets/pages/reference/aa-sdk/core/src/functions/isSigner.mdx - - page: isSmartAccountClient - path: wallets/pages/reference/aa-sdk/core/src/functions/isSmartAccountClient.mdx - - page: isSmartAccountWithSigner - path: wallets/pages/reference/aa-sdk/core/src/functions/isSmartAccountWithSigner.mdx - - page: isValidFactoryAndData - path: wallets/pages/reference/aa-sdk/core/src/functions/isValidFactoryAndData.mdx - - page: isValidPaymasterAndData - path: wallets/pages/reference/aa-sdk/core/src/functions/isValidPaymasterAndData.mdx - - page: isValidRequest - path: wallets/pages/reference/aa-sdk/core/src/functions/isValidRequest.mdx - - page: middlewareActions - path: wallets/pages/reference/aa-sdk/core/src/functions/middlewareActions.mdx - - page: parseFactoryAddressFromAccountInitCode - path: wallets/pages/reference/aa-sdk/core/src/functions/parseFactoryAddressFromAccountInitCode.mdx - - page: parsePaymasterAndData - path: wallets/pages/reference/aa-sdk/core/src/functions/parsePaymasterAndData.mdx - - page: pick - path: wallets/pages/reference/aa-sdk/core/src/functions/pick.mdx - - page: resolveProperties - path: wallets/pages/reference/aa-sdk/core/src/functions/resolveProperties.mdx - - page: sendTransaction - path: wallets/pages/reference/aa-sdk/core/src/functions/sendTransaction.mdx - - page: sendTransactions - path: wallets/pages/reference/aa-sdk/core/src/functions/sendTransactions.mdx - - page: sendUserOperation - path: wallets/pages/reference/aa-sdk/core/src/functions/sendUserOperation.mdx - - page: split - path: wallets/pages/reference/aa-sdk/core/src/functions/split.mdx - - page: stringToIndex - path: wallets/pages/reference/aa-sdk/core/src/functions/stringToIndex.mdx - - page: takeBytes - path: wallets/pages/reference/aa-sdk/core/src/functions/takeBytes.mdx - - page: toRecord - path: wallets/pages/reference/aa-sdk/core/src/functions/toRecord.mdx - - page: toSmartContractAccount - path: wallets/pages/reference/aa-sdk/core/src/functions/toSmartContractAccount.mdx - - page: unpackSignRawMessageBytes - path: wallets/pages/reference/aa-sdk/core/src/functions/unpackSignRawMessageBytes.mdx - - page: wrapSignatureWith6492 - path: wallets/pages/reference/aa-sdk/core/src/functions/wrapSignatureWith6492.mdx - - section: Interfaces - contents: - - page: AccountEntryPointRegistry - path: wallets/pages/reference/aa-sdk/core/src/interfaces/AccountEntryPointRegistry.mdx - - page: EntryPointDefRegistry - path: wallets/pages/reference/aa-sdk/core/src/interfaces/EntryPointDefRegistry.mdx - - page: EntryPointRegistry - path: wallets/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistry.mdx - - page: EntryPointRegistryBase - path: wallets/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistryBase.mdx - - page: SmartAccountAuthenticator - path: wallets/pages/reference/aa-sdk/core/src/interfaces/SmartAccountAuthenticator.mdx - - page: SmartAccountSigner - path: wallets/pages/reference/aa-sdk/core/src/interfaces/SmartAccountSigner.mdx - - page: SplitTransportParams - path: wallets/pages/reference/aa-sdk/core/src/interfaces/SplitTransportParams.mdx - - page: UserOperationEstimateGasResponse - path: wallets/pages/reference/aa-sdk/core/src/interfaces/UserOperationEstimateGasResponse.mdx - - page: UserOperationReceipt - path: wallets/pages/reference/aa-sdk/core/src/interfaces/UserOperationReceipt.mdx - - page: UserOperationRequest_v6 - path: wallets/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v6.mdx - - page: UserOperationRequest_v7 - path: wallets/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v7.mdx - - page: UserOperationResponse - path: wallets/pages/reference/aa-sdk/core/src/interfaces/UserOperationResponse.mdx - - page: UserOperationStruct_v6 - path: wallets/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v6.mdx - - page: UserOperationStruct_v7 - path: wallets/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v7.mdx - - section: Type Aliases - contents: - - page: AccountOp - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/AccountOp.mdx - - page: AuthorizationRequest - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/AuthorizationRequest.mdx - - page: BaseSmartAccountClient - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClient.mdx - - page: BaseSmartAccountClientActions - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClientActions.mdx - - page: BatchUserOperationCallData - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BatchUserOperationCallData.mdx - - page: BigNumberish - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BigNumberish.mdx - - page: BigNumberishRange - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BigNumberishRange.mdx - - page: BuildTransactionParameters - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BuildTransactionParameters.mdx - - page: BuildUserOperationFromTransactionsResult - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationFromTransactionsResult.mdx - - page: BuildUserOperationParameters - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationParameters.mdx - - page: BundlerActions - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BundlerActions.mdx - - page: BundlerClient - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BundlerClient.mdx - - page: BundlerRpcSchema - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BundlerRpcSchema.mdx - - page: BytesLike - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/BytesLike.mdx - - page: ClientMiddleware - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddleware.mdx - - page: ClientMiddlewareArgs - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareArgs.mdx - - page: ClientMiddlewareConfig - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareConfig.mdx - - page: ClientMiddlewareFn - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareFn.mdx - - page: ConnectionConfig - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/ConnectionConfig.mdx - - page: ConnectorData - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/ConnectorData.mdx - - page: DefaultEntryPointVersion - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/DefaultEntryPointVersion.mdx - - page: Deferrable - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Deferrable.mdx - - page: DropAndReplaceUserOperationParameters - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/DropAndReplaceUserOperationParameters.mdx - - page: EQ - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/EQ.mdx - - page: Eip7702ExtendedFields - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Eip7702ExtendedFields.mdx - - page: EmptyHex - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/EmptyHex.mdx - - page: EntryPointDef - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/EntryPointDef.mdx - - page: EntryPointParameter - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/EntryPointParameter.mdx - - page: EntryPointVersion - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/EntryPointVersion.mdx - - page: EqualsOneOfTheComponents - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/EqualsOneOfTheComponents.mdx - - page: Erc7677Client - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Erc7677Client.mdx - - page: Erc7677MiddlewareParams - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Erc7677MiddlewareParams.mdx - - page: Erc7677RpcSchema - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Erc7677RpcSchema.mdx - - page: GetAccountAddressParams - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/GetAccountAddressParams.mdx - - page: GetAccountParameter - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/GetAccountParameter.mdx - - page: GetContextParameter - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/GetContextParameter.mdx - - page: GetEntryPointFromAccount - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointFromAccount.mdx - - page: GetEntryPointOptions - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointOptions.mdx - - page: IsMemberOrSubtypeOfAComponent - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/IsMemberOrSubtypeOfAComponent.mdx - - page: IsOneOf - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/IsOneOf.mdx - - page: IsUndefined - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/IsUndefined.mdx - - page: MiddlewareClient - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/MiddlewareClient.mdx - - page: Multiplier - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Multiplier.mdx - - page: Never - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Never.mdx - - page: NoUndefined - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/NoUndefined.mdx - - page: NotType - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/NotType.mdx - - page: NullAddress - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/NullAddress.mdx - - page: OneOf - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/OneOf.mdx - - page: OptionalFields - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/OptionalFields.mdx - - page: Prettify - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/Prettify.mdx - - page: PromiseOrValue - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/PromiseOrValue.mdx - - page: RecordableKeys - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/RecordableKeys.mdx - - page: RequiredBy - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/RequiredBy.mdx - - page: SendTransactionsParameters - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SendTransactionsParameters.mdx - - page: SendUserOperationParameters - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationParameters.mdx - - page: SendUserOperationResult - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationResult.mdx - - page: SignUserOperationParameters - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SignUserOperationParameters.mdx - - page: SignatureRequest - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SignatureRequest.mdx - - page: SigningMethods - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SigningMethods.mdx - - page: SmartAccountClient - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClient.mdx - - page: SmartAccountClientActions - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientActions.mdx - - page: SmartAccountClientConfig - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientConfig.mdx - - page: SmartAccountClientRpcSchema - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientRpcSchema.mdx - - page: SmartContractAccount - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccount.mdx - - page: SmartContractAccountWithSigner - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccountWithSigner.mdx - - page: SupportedEntryPoint - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/SupportedEntryPoint.mdx - - page: ToSmartContractAccountParams - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/ToSmartContractAccountParams.mdx - - page: UnpackedSignature - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UnpackedSignature.mdx - - page: UpgradeAccountParams - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UpgradeAccountParams.mdx - - page: UpgradeToAndCallParams - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToAndCallParams.mdx - - page: UpgradeToData - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToData.mdx - - page: UserOperationCallData - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationCallData.mdx - - page: UserOperationContext - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationContext.mdx - - page: UserOperationFeeOptions - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptions.mdx - - page: UserOperationFeeOptionsField - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptionsField.mdx - - page: UserOperationOverrides - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverrides.mdx - - page: UserOperationOverridesParameter - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverridesParameter.mdx - - page: UserOperationPaymasterOverrides - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationPaymasterOverrides.mdx - - page: UserOperationRequest - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationRequest.mdx - - page: UserOperationStruct - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/UserOperationStruct.mdx - - page: WaitForUserOperationTxParameters - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/WaitForUserOperationTxParameters.mdx - - page: WithOptional - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/WithOptional.mdx - - page: WithRequired - path: wallets/pages/reference/aa-sdk/core/src/type-aliases/WithRequired.mdx - - section: Variables - contents: - - page: ADD_BREADCRUMB - path: wallets/pages/reference/aa-sdk/core/src/variables/ADD_BREADCRUMB.mdx - - page: BigNumberishRangeSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/BigNumberishRangeSchema.mdx - - page: BigNumberishSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/BigNumberishSchema.mdx - - page: ChainSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/ChainSchema.mdx - - page: ConnectionConfigSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/ConnectionConfigSchema.mdx - - page: EntryPointAbi_v6 - path: wallets/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v6.mdx - - page: EntryPointAbi_v7 - path: wallets/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v7.mdx - - page: HexSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/HexSchema.mdx - - page: MultiplierSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/MultiplierSchema.mdx - - page: SignerSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/SignerSchema.mdx - - page: SimpleAccountAbi_v6 - path: wallets/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v6.mdx - - page: SimpleAccountAbi_v7 - path: wallets/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v7.mdx - - page: SimpleAccountFactoryAbi - path: wallets/pages/reference/aa-sdk/core/src/variables/SimpleAccountFactoryAbi.mdx - - page: SmartAccountClientOptsSchema - path: wallets/pages/reference/aa-sdk/core/src/variables/SmartAccountClientOptsSchema.mdx - - page: TRACE_HEADER_NAME - path: wallets/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_NAME.mdx - - page: TRACE_HEADER_STATE - path: wallets/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_STATE.mdx - - page: bundlerActions - path: wallets/pages/reference/aa-sdk/core/src/variables/bundlerActions.mdx - - page: createBundlerClientFromExisting - path: wallets/pages/reference/aa-sdk/core/src/variables/createBundlerClientFromExisting.mdx - - page: default7702GasEstimator - path: wallets/pages/reference/aa-sdk/core/src/variables/default7702GasEstimator.mdx - - page: default7702UserOpSigner - path: wallets/pages/reference/aa-sdk/core/src/variables/default7702UserOpSigner.mdx - - page: defaultEntryPointVersion - path: wallets/pages/reference/aa-sdk/core/src/variables/defaultEntryPointVersion.mdx - - page: defaultGasEstimator - path: wallets/pages/reference/aa-sdk/core/src/variables/defaultGasEstimator.mdx - - page: defaultPaymasterAndData - path: wallets/pages/reference/aa-sdk/core/src/variables/defaultPaymasterAndData.mdx - - page: defaultUserOpSigner - path: wallets/pages/reference/aa-sdk/core/src/variables/defaultUserOpSigner.mdx - - page: entryPointRegistry - path: wallets/pages/reference/aa-sdk/core/src/variables/entryPointRegistry.mdx - - page: minPriorityFeePerBidDefaults - path: wallets/pages/reference/aa-sdk/core/src/variables/minPriorityFeePerBidDefaults.mdx - - page: noopMiddleware - path: wallets/pages/reference/aa-sdk/core/src/variables/noopMiddleware.mdx - - page: smartAccountClientActions - path: wallets/pages/reference/aa-sdk/core/src/variables/smartAccountClientActions.mdx - - page: smartAccountClientMethodKeys - path: wallets/pages/reference/aa-sdk/core/src/variables/smartAccountClientMethodKeys.mdx - - page: waitForUserOperationTransaction - path: wallets/pages/reference/aa-sdk/core/src/variables/waitForUserOperationTransaction.mdx - - page: webauthnGasEstimator - path: wallets/pages/reference/aa-sdk/core/src/variables/webauthnGasEstimator.mdx - - section: AA-SDK ethers - path: wallets/pages/reference/aa-sdk/ethers/src/README.mdx - contents: - - section: Classes - contents: - - page: AccountSigner - path: wallets/pages/reference/aa-sdk/ethers/src/classes/AccountSigner.mdx - - page: EthersProviderAdapter - path: wallets/pages/reference/aa-sdk/ethers/src/classes/EthersProviderAdapter.mdx - - section: Functions - contents: - - page: convertEthersSignerToAccountSigner - path: wallets/pages/reference/aa-sdk/ethers/src/functions/convertEthersSignerToAccountSigner.mdx - - page: convertWalletToAccountSigner - path: wallets/pages/reference/aa-sdk/ethers/src/functions/convertWalletToAccountSigner.mdx - - section: Other Javascript Frameworks - path: wallets/pages/reference/account-kit/core/src/README.mdx - contents: - - section: Classes - contents: - - page: ClientOnlyPropertyError - path: wallets/pages/reference/account-kit/core/src/classes/ClientOnlyPropertyError.mdx - - section: Functions - contents: - - page: convertSignerStatusToState - path: wallets/pages/reference/account-kit/core/src/functions/convertSignerStatusToState.mdx - - page: cookieStorage - path: wallets/pages/reference/account-kit/core/src/functions/cookieStorage.mdx - - page: cookieToInitialState - path: wallets/pages/reference/account-kit/core/src/functions/cookieToInitialState.mdx - - page: createAccount - path: wallets/pages/reference/account-kit/core/src/functions/createAccount.mdx - - page: createConfig - path: wallets/pages/reference/account-kit/core/src/functions/createConfig.mdx - - page: createDefaultAccountState - path: wallets/pages/reference/account-kit/core/src/functions/createDefaultAccountState.mdx - - page: createSigner - path: wallets/pages/reference/account-kit/core/src/functions/createSigner.mdx - - page: defaultAccountState - path: wallets/pages/reference/account-kit/core/src/functions/defaultAccountState.mdx - - page: disconnect - path: wallets/pages/reference/account-kit/core/src/functions/disconnect.mdx - - page: getAccount - path: wallets/pages/reference/account-kit/core/src/functions/getAccount.mdx - - page: getBundlerClient - path: wallets/pages/reference/account-kit/core/src/functions/getBundlerClient.mdx - - page: getChain - path: wallets/pages/reference/account-kit/core/src/functions/getChain.mdx - - page: getConnection - path: wallets/pages/reference/account-kit/core/src/functions/getConnection.mdx - - page: getSigner - path: wallets/pages/reference/account-kit/core/src/functions/getSigner.mdx - - page: getSignerStatus - path: wallets/pages/reference/account-kit/core/src/functions/getSignerStatus.mdx - - page: getSmartAccountClient - path: wallets/pages/reference/account-kit/core/src/functions/getSmartAccountClient.mdx - - page: getSmartWalletClient - path: wallets/pages/reference/account-kit/core/src/functions/getSmartWalletClient.mdx - - page: getSolanaConnection - path: wallets/pages/reference/account-kit/core/src/functions/getSolanaConnection.mdx - - page: getUser - path: wallets/pages/reference/account-kit/core/src/functions/getUser.mdx - - page: hydrate - path: wallets/pages/reference/account-kit/core/src/functions/hydrate.mdx - - page: isLightAccountParams - path: wallets/pages/reference/account-kit/core/src/functions/isLightAccountParams.mdx - - page: isModularV2AccountParams - path: wallets/pages/reference/account-kit/core/src/functions/isModularV2AccountParams.mdx - - page: isMultiOwnerLightAccountParams - path: wallets/pages/reference/account-kit/core/src/functions/isMultiOwnerLightAccountParams.mdx - - page: isMultiOwnerModularAccountParams - path: wallets/pages/reference/account-kit/core/src/functions/isMultiOwnerModularAccountParams.mdx - - page: parseCookie - path: wallets/pages/reference/account-kit/core/src/functions/parseCookie.mdx - - page: reconnect - path: wallets/pages/reference/account-kit/core/src/functions/reconnect.mdx - - page: setChain - path: wallets/pages/reference/account-kit/core/src/functions/setChain.mdx - - page: watchAccount - path: wallets/pages/reference/account-kit/core/src/functions/watchAccount.mdx - - page: watchBundlerClient - path: wallets/pages/reference/account-kit/core/src/functions/watchBundlerClient.mdx - - page: watchChain - path: wallets/pages/reference/account-kit/core/src/functions/watchChain.mdx - - page: watchConnection - path: wallets/pages/reference/account-kit/core/src/functions/watchConnection.mdx - - page: watchSigner - path: wallets/pages/reference/account-kit/core/src/functions/watchSigner.mdx - - page: watchSignerStatus - path: wallets/pages/reference/account-kit/core/src/functions/watchSignerStatus.mdx - - page: watchSmartAccountClient - path: wallets/pages/reference/account-kit/core/src/functions/watchSmartAccountClient.mdx - - page: watchSmartWalletClient - path: wallets/pages/reference/account-kit/core/src/functions/watchSmartWalletClient.mdx - - page: watchSolanaConnection - path: wallets/pages/reference/account-kit/core/src/functions/watchSolanaConnection.mdx - - page: watchUser - path: wallets/pages/reference/account-kit/core/src/functions/watchUser.mdx - - section: Type Aliases - contents: - - page: AccountConfig - path: wallets/pages/reference/account-kit/core/src/type-aliases/AccountConfig.mdx - - page: AccountState - path: wallets/pages/reference/account-kit/core/src/type-aliases/AccountState.mdx - - page: AlchemyAccountsConfig - path: wallets/pages/reference/account-kit/core/src/type-aliases/AlchemyAccountsConfig.mdx - - page: AlchemyClientState - path: wallets/pages/reference/account-kit/core/src/type-aliases/AlchemyClientState.mdx - - page: AlchemySigner - path: wallets/pages/reference/account-kit/core/src/type-aliases/AlchemySigner.mdx - - page: AlchemySignerClient - path: wallets/pages/reference/account-kit/core/src/type-aliases/AlchemySignerClient.mdx - - page: BaseCreateConfigProps - path: wallets/pages/reference/account-kit/core/src/type-aliases/BaseCreateConfigProps.mdx - - page: ClientActions - path: wallets/pages/reference/account-kit/core/src/type-aliases/ClientActions.mdx - - page: ClientStoreConfig - path: wallets/pages/reference/account-kit/core/src/type-aliases/ClientStoreConfig.mdx - - page: Connection - path: wallets/pages/reference/account-kit/core/src/type-aliases/Connection.mdx - - page: CreateAccountParams - path: wallets/pages/reference/account-kit/core/src/type-aliases/CreateAccountParams.mdx - - page: CreateConfigProps - path: wallets/pages/reference/account-kit/core/src/type-aliases/CreateConfigProps.mdx - - page: GetAccountParams - path: wallets/pages/reference/account-kit/core/src/type-aliases/GetAccountParams.mdx - - page: GetAccountResult - path: wallets/pages/reference/account-kit/core/src/type-aliases/GetAccountResult.mdx - - page: GetSmartAccountClientParams - path: wallets/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientParams.mdx - - page: GetSmartAccountClientResult - path: wallets/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientResult.mdx - - page: GetSmartWalletClientParams - path: wallets/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientParams.mdx - - page: GetSmartWalletClientResult - path: wallets/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientResult.mdx - - page: GetUserResult - path: wallets/pages/reference/account-kit/core/src/type-aliases/GetUserResult.mdx - - page: SignerStatus - path: wallets/pages/reference/account-kit/core/src/type-aliases/SignerStatus.mdx - - page: SolanaConnection - path: wallets/pages/reference/account-kit/core/src/type-aliases/SolanaConnection.mdx - - page: Store - path: wallets/pages/reference/account-kit/core/src/type-aliases/Store.mdx - - page: StoreState - path: wallets/pages/reference/account-kit/core/src/type-aliases/StoreState.mdx - - page: StoredState - path: wallets/pages/reference/account-kit/core/src/type-aliases/StoredState.mdx - - page: SupportedAccount - path: wallets/pages/reference/account-kit/core/src/type-aliases/SupportedAccount.mdx - - page: SupportedAccountTypes - path: wallets/pages/reference/account-kit/core/src/type-aliases/SupportedAccountTypes.mdx - - page: SupportedAccounts - path: wallets/pages/reference/account-kit/core/src/type-aliases/SupportedAccounts.mdx - - section: Variables - contents: - - page: DEFAULT_IFRAME_CONTAINER_ID - path: wallets/pages/reference/account-kit/core/src/variables/DEFAULT_IFRAME_CONTAINER_ID.mdx - - section: Infra - path: wallets/pages/reference/account-kit/infra/src/exports/README.mdx - contents: - - section: Enumerations - contents: - - page: SimulateAssetType - path: wallets/pages/reference/account-kit/infra/src/exports/enumerations/SimulateAssetType.mdx - - page: SimulateChangeType - path: wallets/pages/reference/account-kit/infra/src/exports/enumerations/SimulateChangeType.mdx - - section: Functions - contents: - - page: alchemy - path: wallets/pages/reference/account-kit/infra/src/exports/functions/alchemy.mdx - - page: alchemyGasAndPaymasterAndDataMiddleware - path: wallets/pages/reference/account-kit/infra/src/exports/functions/alchemyGasAndPaymasterAndDataMiddleware.mdx - - page: alchemyGasManagerMiddleware - path: wallets/pages/reference/account-kit/infra/src/exports/functions/alchemyGasManagerMiddleware.mdx - - page: alchemyUserOperationSimulator - path: wallets/pages/reference/account-kit/infra/src/exports/functions/alchemyUserOperationSimulator.mdx - - page: convertHeadersToObject - path: wallets/pages/reference/account-kit/infra/src/exports/functions/convertHeadersToObject.mdx - - page: createAlchemyPublicRpcClient - path: wallets/pages/reference/account-kit/infra/src/exports/functions/createAlchemyPublicRpcClient.mdx - - page: createAlchemySmartAccountClient - path: wallets/pages/reference/account-kit/infra/src/exports/functions/createAlchemySmartAccountClient.mdx - - page: defineAlchemyChain - path: wallets/pages/reference/account-kit/infra/src/exports/functions/defineAlchemyChain.mdx - - page: getAlchemyPaymasterAddress - path: wallets/pages/reference/account-kit/infra/src/exports/functions/getAlchemyPaymasterAddress.mdx - - page: getDefaultUserOperationFeeOptions - path: wallets/pages/reference/account-kit/infra/src/exports/functions/getDefaultUserOperationFeeOptions.mdx - - page: getSignerTypeHeader - path: wallets/pages/reference/account-kit/infra/src/exports/functions/getSignerTypeHeader.mdx - - page: headersUpdate - path: wallets/pages/reference/account-kit/infra/src/exports/functions/headersUpdate.mdx - - page: isAlchemySmartAccountClient - path: wallets/pages/reference/account-kit/infra/src/exports/functions/isAlchemySmartAccountClient.mdx - - page: isAlchemyTransport - path: wallets/pages/reference/account-kit/infra/src/exports/functions/isAlchemyTransport.mdx - - page: mutateRemoveTrackingHeaders - path: wallets/pages/reference/account-kit/infra/src/exports/functions/mutateRemoveTrackingHeaders.mdx - - section: Interfaces - contents: - - page: SimulateAssetChange - path: wallets/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChange.mdx - - page: SimulateAssetChangesError - path: wallets/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChangesError.mdx - - section: Type Aliases - contents: - - page: AlchemyChainConfig - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyChainConfig.mdx - - page: AlchemyRpcSchema - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyRpcSchema.mdx - - page: AlchemySmartAccountClient - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient.mdx - - page: AlchemySmartAccountClientActions - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientActions.mdx - - page: AlchemySmartAccountClientConfig - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientConfig.mdx - - page: AlchemySmartAccountClient_Base - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient_Base.mdx - - page: AlchemyTransport - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransport.mdx - - page: AlchemyTransportConfig - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransportConfig.mdx - - page: BaseAlchemyActions - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/BaseAlchemyActions.mdx - - page: ClientWithAlchemyMethods - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/ClientWithAlchemyMethods.mdx - - page: PaymasterContext - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/PaymasterContext.mdx - - page: PolicyToken - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/PolicyToken.mdx - - page: RequestGasAndPaymasterAndDataRequest - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataRequest.mdx - - page: RequestGasAndPaymasterAndDataResponse - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataResponse.mdx - - page: RequestPaymasterTokenQuoteRequest - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteRequest.mdx - - page: RequestPaymasterTokenQuoteResponse - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteResponse.mdx - - page: SimulateUserOperationAssetChangesRequest - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesRequest.mdx - - page: SimulateUserOperationAssetChangesResponse - path: wallets/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesResponse.mdx - - section: Variables - contents: - - page: AlchemyChainSchema - path: wallets/pages/reference/account-kit/infra/src/exports/variables/AlchemyChainSchema.mdx - - page: alchemyActions - path: wallets/pages/reference/account-kit/infra/src/exports/variables/alchemyActions.mdx - - page: alchemyFeeEstimator - path: wallets/pages/reference/account-kit/infra/src/exports/variables/alchemyFeeEstimator.mdx - - page: arbitrum - path: wallets/pages/reference/account-kit/infra/src/exports/variables/arbitrum.mdx - - page: arbitrumGoerli - path: wallets/pages/reference/account-kit/infra/src/exports/variables/arbitrumGoerli.mdx - - page: arbitrumNova - path: wallets/pages/reference/account-kit/infra/src/exports/variables/arbitrumNova.mdx - - page: arbitrumSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/arbitrumSepolia.mdx - - page: base - path: wallets/pages/reference/account-kit/infra/src/exports/variables/base.mdx - - page: baseGoerli - path: wallets/pages/reference/account-kit/infra/src/exports/variables/baseGoerli.mdx - - page: baseSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/baseSepolia.mdx - - page: beraChainBartio - path: wallets/pages/reference/account-kit/infra/src/exports/variables/beraChainBartio.mdx - - page: bobaMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/bobaMainnet.mdx - - page: bobaSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/bobaSepolia.mdx - - page: bsc - path: wallets/pages/reference/account-kit/infra/src/exports/variables/bsc.mdx - - page: bscTestnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/bscTestnet.mdx - - page: celoMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/celoMainnet.mdx - - page: celoSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/celoSepolia.mdx - - page: edgeMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/edgeMainnet.mdx - - page: fraxtal - path: wallets/pages/reference/account-kit/infra/src/exports/variables/fraxtal.mdx - - page: fraxtalSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/fraxtalSepolia.mdx - - page: gensynTestnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/gensynTestnet.mdx - - page: goerli - path: wallets/pages/reference/account-kit/infra/src/exports/variables/goerli.mdx - - page: hyperliquid - path: wallets/pages/reference/account-kit/infra/src/exports/variables/hyperliquid.mdx - - page: hyperliquidEvmTestnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/hyperliquidEvmTestnet.mdx - - page: inkMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/inkMainnet.mdx - - page: inkSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/inkSepolia.mdx - - page: mainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/mainnet.mdx - - page: mekong - path: wallets/pages/reference/account-kit/infra/src/exports/variables/mekong.mdx - - page: monadMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/monadMainnet.mdx - - page: monadTestnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/monadTestnet.mdx - - page: mythosMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/mythosMainnet.mdx - - page: opbnbMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/opbnbMainnet.mdx - - page: opbnbTestnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/opbnbTestnet.mdx - - page: openlootSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/openlootSepolia.mdx - - page: optimism - path: wallets/pages/reference/account-kit/infra/src/exports/variables/optimism.mdx - - page: optimismGoerli - path: wallets/pages/reference/account-kit/infra/src/exports/variables/optimismGoerli.mdx - - page: optimismSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/optimismSepolia.mdx - - page: polygon - path: wallets/pages/reference/account-kit/infra/src/exports/variables/polygon.mdx - - page: polygonAmoy - path: wallets/pages/reference/account-kit/infra/src/exports/variables/polygonAmoy.mdx - - page: polygonMumbai - path: wallets/pages/reference/account-kit/infra/src/exports/variables/polygonMumbai.mdx - - page: riseTestnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/riseTestnet.mdx - - page: sepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/sepolia.mdx - - page: shape - path: wallets/pages/reference/account-kit/infra/src/exports/variables/shape.mdx - - page: shapeSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/shapeSepolia.mdx - - page: simulateUserOperationChanges - path: wallets/pages/reference/account-kit/infra/src/exports/variables/simulateUserOperationChanges.mdx - - page: soneiumMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/soneiumMainnet.mdx - - page: soneiumMinato - path: wallets/pages/reference/account-kit/infra/src/exports/variables/soneiumMinato.mdx - - page: stableMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/stableMainnet.mdx - - page: storyAeneid - path: wallets/pages/reference/account-kit/infra/src/exports/variables/storyAeneid.mdx - - page: storyMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/storyMainnet.mdx - - page: teaSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/teaSepolia.mdx - - page: unichainMainnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/unichainMainnet.mdx - - page: unichainSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/unichainSepolia.mdx - - page: worldChain - path: wallets/pages/reference/account-kit/infra/src/exports/variables/worldChain.mdx - - page: worldChainSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/worldChainSepolia.mdx - - page: worldl3devnet - path: wallets/pages/reference/account-kit/infra/src/exports/variables/worldl3devnet.mdx - - page: zora - path: wallets/pages/reference/account-kit/infra/src/exports/variables/zora.mdx - - page: zoraSepolia - path: wallets/pages/reference/account-kit/infra/src/exports/variables/zoraSepolia.mdx - - section: React - path: wallets/pages/reference/account-kit/react/src/README.mdx - contents: - - section: Classes - contents: - - page: NoAlchemyAccountContextError - path: wallets/pages/reference/account-kit/react/src/classes/NoAlchemyAccountContextError.mdx - - section: Components - contents: - - page: AlchemyAccountProvider - path: wallets/pages/reference/account-kit/react/src/functions/AlchemyAccountProvider.mdx - - page: AuthCard - path: wallets/pages/reference/account-kit/react/src/functions/AuthCard.mdx - - page: Dialog - path: wallets/pages/reference/account-kit/react/src/functions/Dialog.mdx - - page: Hydrate - path: wallets/pages/reference/account-kit/react/src/functions/Hydrate.mdx - - page: UiConfigProvider - path: wallets/pages/reference/account-kit/react/src/functions/UiConfigProvider.mdx - - section: Hooks - contents: - - page: useAccount - path: wallets/pages/reference/account-kit/react/src/functions/useAccount.mdx - - page: useAddOauthProvider - path: wallets/pages/reference/account-kit/react/src/functions/useAddOauthProvider.mdx - - page: useAddPasskey - path: wallets/pages/reference/account-kit/react/src/functions/useAddPasskey.mdx - - page: useAlchemyAccountContext - path: wallets/pages/reference/account-kit/react/src/functions/useAlchemyAccountContext.mdx - - page: useAuthContext - path: wallets/pages/reference/account-kit/react/src/functions/useAuthContext.mdx - - page: useAuthError - path: wallets/pages/reference/account-kit/react/src/functions/useAuthError.mdx - - page: useAuthModal - path: wallets/pages/reference/account-kit/react/src/functions/useAuthModal.mdx - - page: useAuthenticate - path: wallets/pages/reference/account-kit/react/src/functions/useAuthenticate.mdx - - page: useBundlerClient - path: wallets/pages/reference/account-kit/react/src/functions/useBundlerClient.mdx - - page: useCallsStatus - path: wallets/pages/reference/account-kit/react/src/functions/useCallsStatus.mdx - - page: useChain - path: wallets/pages/reference/account-kit/react/src/functions/useChain.mdx - - page: useClientActions - path: wallets/pages/reference/account-kit/react/src/functions/useClientActions.mdx - - page: useConnect - path: wallets/pages/reference/account-kit/react/src/functions/useConnect.mdx - - page: useConnectedUser - path: wallets/pages/reference/account-kit/react/src/functions/useConnectedUser.mdx - - page: useConnection - path: wallets/pages/reference/account-kit/react/src/functions/useConnection.mdx - - page: useDropAndReplaceUserOperation - path: wallets/pages/reference/account-kit/react/src/functions/useDropAndReplaceUserOperation.mdx - - page: useExportAccount - path: wallets/pages/reference/account-kit/react/src/functions/useExportAccount.mdx - - page: useGrantPermissions - path: wallets/pages/reference/account-kit/react/src/functions/useGrantPermissions.mdx - - page: useListAuthMethods - path: wallets/pages/reference/account-kit/react/src/functions/useListAuthMethods.mdx - - page: useLogout - path: wallets/pages/reference/account-kit/react/src/functions/useLogout.mdx - - page: useMFA - path: wallets/pages/reference/account-kit/react/src/functions/useMFA.mdx - - page: usePrepareCalls - path: wallets/pages/reference/account-kit/react/src/functions/usePrepareCalls.mdx - - page: usePrepareSwap - path: wallets/pages/reference/account-kit/react/src/functions/usePrepareSwap.mdx - - page: useRemoveEmail - path: wallets/pages/reference/account-kit/react/src/functions/useRemoveEmail.mdx - - page: useRemoveOauthProvider - path: wallets/pages/reference/account-kit/react/src/functions/useRemoveOauthProvider.mdx - - page: useRemovePasskey - path: wallets/pages/reference/account-kit/react/src/functions/useRemovePasskey.mdx - - page: useSendCalls - path: wallets/pages/reference/account-kit/react/src/functions/useSendCalls.mdx - - page: useSendPreparedCalls - path: wallets/pages/reference/account-kit/react/src/functions/useSendPreparedCalls.mdx - - page: useSendUserOperation - path: wallets/pages/reference/account-kit/react/src/functions/useSendUserOperation.mdx - - page: useSendVerificationCode - path: wallets/pages/reference/account-kit/react/src/functions/useSendVerificationCode.mdx - - page: useSetEmail - path: wallets/pages/reference/account-kit/react/src/functions/useSetEmail.mdx - - page: useSignAndSendPreparedCalls - path: wallets/pages/reference/account-kit/react/src/functions/useSignAndSendPreparedCalls.mdx - - page: useSignMessage - path: wallets/pages/reference/account-kit/react/src/functions/useSignMessage.mdx - - page: useSignTypedData - path: wallets/pages/reference/account-kit/react/src/functions/useSignTypedData.mdx - - page: useSigner - path: wallets/pages/reference/account-kit/react/src/functions/useSigner.mdx - - page: useSignerStatus - path: wallets/pages/reference/account-kit/react/src/functions/useSignerStatus.mdx - - page: useSmartAccountClient - path: wallets/pages/reference/account-kit/react/src/functions/useSmartAccountClient.mdx - - page: useSmartWalletClient - path: wallets/pages/reference/account-kit/react/src/functions/useSmartWalletClient.mdx - - page: useSolanaConnection - path: wallets/pages/reference/account-kit/react/src/functions/useSolanaConnection.mdx - - page: useSolanaSignMessage - path: wallets/pages/reference/account-kit/react/src/functions/useSolanaSignMessage.mdx - - page: useSolanaTransaction - path: wallets/pages/reference/account-kit/react/src/functions/useSolanaTransaction.mdx - - page: useSolanaWallet - path: wallets/pages/reference/account-kit/react/src/functions/useSolanaWallet.mdx - - page: useUiConfig - path: wallets/pages/reference/account-kit/react/src/functions/useUiConfig.mdx - - page: useUser - path: wallets/pages/reference/account-kit/react/src/functions/useUser.mdx - - page: useWaitForCallsStatus - path: wallets/pages/reference/account-kit/react/src/functions/useWaitForCallsStatus.mdx - - page: useWaitForUserOperationTransaction - path: wallets/pages/reference/account-kit/react/src/functions/useWaitForUserOperationTransaction.mdx - - section: Functions - contents: - - page: configForExternalWallets - path: wallets/pages/reference/account-kit/react/src/functions/configForExternalWallets.mdx - - page: createConfig - path: wallets/pages/reference/account-kit/react/src/functions/createConfig.mdx - - page: createUiConfigStore - path: wallets/pages/reference/account-kit/react/src/functions/createUiConfigStore.mdx - - page: getListAuthMethodsQueryKey - path: wallets/pages/reference/account-kit/react/src/functions/getListAuthMethodsQueryKey.mdx - - page: getSocialProviderDisplayName - path: wallets/pages/reference/account-kit/react/src/functions/getSocialProviderDisplayName.mdx - - section: Interfaces - contents: - - page: ConfigForExternalWalletsParams - path: wallets/pages/reference/account-kit/react/src/interfaces/ConfigForExternalWalletsParams.mdx - - page: SendVerificationCodeParams - path: wallets/pages/reference/account-kit/react/src/interfaces/SendVerificationCodeParams.mdx - - page: SolanaConnection - path: wallets/pages/reference/account-kit/react/src/interfaces/SolanaConnection.mdx - - page: SolanaTransaction - path: wallets/pages/reference/account-kit/react/src/interfaces/SolanaTransaction.mdx - - page: UseChainResult - path: wallets/pages/reference/account-kit/react/src/interfaces/UseChainResult.mdx - - page: UseWaitForCallsStatusParams - path: wallets/pages/reference/account-kit/react/src/interfaces/UseWaitForCallsStatusParams.mdx - - section: Type Aliases - contents: - - page: AlchemyAccountContextProps - path: wallets/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountContextProps.mdx - - page: AlchemyAccountsConfigWithUI - path: wallets/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsConfigWithUI.mdx - - page: AlchemyAccountsProviderProps - path: wallets/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsProviderProps.mdx - - page: AlchemyAccountsUIConfig - path: wallets/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsUIConfig.mdx - - page: AuthType - path: wallets/pages/reference/account-kit/react/src/type-aliases/AuthType.mdx - - page: ChainType - path: wallets/pages/reference/account-kit/react/src/type-aliases/ChainType.mdx - - page: ClientActionParameters - path: wallets/pages/reference/account-kit/react/src/type-aliases/ClientActionParameters.mdx - - page: ConnectedUser - path: wallets/pages/reference/account-kit/react/src/type-aliases/ConnectedUser.mdx - - page: ExecutableFunctionArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionArgs.mdx - - page: ExecutableFunctionName - path: wallets/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionName.mdx - - page: ExecuteableFunctionResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/ExecuteableFunctionResult.mdx - - page: ExportAccountComponentProps - path: wallets/pages/reference/account-kit/react/src/type-aliases/ExportAccountComponentProps.mdx - - page: SendUserOperationWithEOA - path: wallets/pages/reference/account-kit/react/src/type-aliases/SendUserOperationWithEOA.mdx - - page: SetEmailParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/SetEmailParams.mdx - - page: SignMessageArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/SignMessageArgs.mdx - - page: SignTypedDataArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/SignTypedDataArgs.mdx - - page: UiConfigStore - path: wallets/pages/reference/account-kit/react/src/type-aliases/UiConfigStore.mdx - - page: UseAccountMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAccountMutationArgs.mdx - - page: UseAccountProps - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAccountProps.mdx - - page: UseAccountResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAccountResult.mdx - - page: UseAddOauthProviderMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderMutationArgs.mdx - - page: UseAddOauthProviderResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderResult.mdx - - page: UseAddPasskeyMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyMutationArgs.mdx - - page: UseAddPasskeyResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyResult.mdx - - page: UseAuthErrorResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAuthErrorResult.mdx - - page: UseAuthenticateMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateMutationArgs.mdx - - page: UseAuthenticateResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateResult.mdx - - page: UseBundlerClientResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseBundlerClientResult.mdx - - page: UseCallsStatusParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusParams.mdx - - page: UseCallsStatusResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusResult.mdx - - page: UseChainParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseChainParams.mdx - - page: UseClientActionsProps - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseClientActionsProps.mdx - - page: UseClientActionsResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseClientActionsResult.mdx - - page: UseConnectedUserResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseConnectedUserResult.mdx - - page: UseDropAndReplaceUserOperationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationArgs.mdx - - page: UseDropAndReplaceUserOperationMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationMutationArgs.mdx - - page: UseDropAndReplaceUserOperationResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationResult.mdx - - page: UseExportAccountMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseExportAccountMutationArgs.mdx - - page: UseExportAccountResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseExportAccountResult.mdx - - page: UseGrantPermissionsParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsParams.mdx - - page: UseGrantPermissionsResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsResult.mdx - - page: UseLogoutMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseLogoutMutationArgs.mdx - - page: UseLogoutResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseLogoutResult.mdx - - page: UseMFAResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseMFAResult.mdx - - page: UsePrepareCallsParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsParams.mdx - - page: UsePrepareCallsResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsResult.mdx - - page: UsePrepareSwapParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapParams.mdx - - page: UsePrepareSwapResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapResult.mdx - - page: UseRemoveEmailMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailMutationArgs.mdx - - page: UseRemoveEmailResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailResult.mdx - - page: UseRemoveOauthProviderMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderMutationArgs.mdx - - page: UseRemoveOauthProviderResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderResult.mdx - - page: UseRemovePasskeyMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyMutationArgs.mdx - - page: UseRemovePasskeyResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyResult.mdx - - page: UseSendCallsParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendCallsParams.mdx - - page: UseSendCallsResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendCallsResult.mdx - - page: UseSendPreparedCallsParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsParams.mdx - - page: UseSendPreparedCallsResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsResult.mdx - - page: UseSendUserOperationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationArgs.mdx - - page: UseSendUserOperationMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationMutationArgs.mdx - - page: UseSendUserOperationResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationResult.mdx - - page: UseSendVerificationCodeMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeMutationArgs.mdx - - page: UseSendVerificationCodeResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeResult.mdx - - page: UseSetEmailMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSetEmailMutationArgs.mdx - - page: UseSetEmailResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSetEmailResult.mdx - - page: UseSignAndSendPreparedCallsParams - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsParams.mdx - - page: UseSignAndSendPreparedCallsResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsResult.mdx - - page: UseSignMessageArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignMessageArgs.mdx - - page: UseSignMessageResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignMessageResult.mdx - - page: UseSignMessagedMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignMessagedMutationArgs.mdx - - page: UseSignTypedDataArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataArgs.mdx - - page: UseSignTypedDataMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataMutationArgs.mdx - - page: UseSignTypedDataResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataResult.mdx - - page: UseSignerStatusResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSignerStatusResult.mdx - - page: UseSmartAccountClientProps - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientProps.mdx - - page: UseSmartAccountClientResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientResult.mdx - - page: UseUserResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseUserResult.mdx - - page: UseWaitForCallsStatusResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseWaitForCallsStatusResult.mdx - - page: UseWaitForUserOperationTransactionArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionArgs.mdx - - page: UseWaitForUserOperationTransactionMutationArgs - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionMutationArgs.mdx - - page: UseWaitForUserOperationTransactionResult - path: wallets/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionResult.mdx - - section: Variables - contents: - - page: AlchemyAccountContext - path: wallets/pages/reference/account-kit/react/src/variables/AlchemyAccountContext.mdx - - page: DEFAULT_UI_CONFIG - path: wallets/pages/reference/account-kit/react/src/variables/DEFAULT_UI_CONFIG.mdx - - section: React Native - path: wallets/pages/reference/account-kit/react-native/src/README.mdx - contents: - - section: Components - contents: - - page: AlchemyAccountProvider - path: wallets/pages/reference/account-kit/react-native/src/functions/AlchemyAccountProvider.mdx - - section: Functions - contents: - - page: createConfig - path: wallets/pages/reference/account-kit/react-native/src/functions/createConfig.mdx - - section: Type Aliases - contents: - - page: AlchemyAccountContextProps - path: wallets/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountContextProps.mdx - - page: AlchemyAccountsProviderProps - path: wallets/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountsProviderProps.mdx - - section: React Native Signer - path: wallets/pages/reference/account-kit/rn-signer/src/README.mdx - contents: - - section: Classes - contents: - - page: RNAlchemySignerSingleton - path: wallets/pages/reference/account-kit/rn-signer/src/classes/RNAlchemySignerSingleton.mdx - - page: RNSignerClient - path: wallets/pages/reference/account-kit/rn-signer/src/classes/RNSignerClient.mdx - - section: Functions - contents: - - page: RNAlchemySigner - path: wallets/pages/reference/account-kit/rn-signer/src/functions/RNAlchemySigner.mdx - - section: Type Aliases - contents: - - page: ExportWalletParams - path: wallets/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletParams.mdx - - page: ExportWalletResult - path: wallets/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletResult.mdx - - page: RNAlchemySignerParams - path: wallets/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerParams.mdx - - page: RNAlchemySignerType - path: wallets/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerType.mdx - - section: Signer - path: wallets/pages/reference/account-kit/signer/src/README.mdx - contents: - - section: Classes - contents: - - page: AlchemyServerSigner - path: wallets/pages/reference/account-kit/signer/src/classes/AlchemyServerSigner.mdx - - page: AlchemySignerWebClient - path: wallets/pages/reference/account-kit/signer/src/classes/AlchemySignerWebClient.mdx - - page: AlchemyWebSigner - path: wallets/pages/reference/account-kit/signer/src/classes/AlchemyWebSigner.mdx - - page: BaseAlchemySigner - path: wallets/pages/reference/account-kit/signer/src/classes/BaseAlchemySigner.mdx - - page: BaseSignerClient - path: wallets/pages/reference/account-kit/signer/src/classes/BaseSignerClient.mdx - - page: MfaRequiredError - path: wallets/pages/reference/account-kit/signer/src/classes/MfaRequiredError.mdx - - page: NotAuthenticatedError - path: wallets/pages/reference/account-kit/signer/src/classes/NotAuthenticatedError.mdx - - page: OAuthProvidersError - path: wallets/pages/reference/account-kit/signer/src/classes/OAuthProvidersError.mdx - - page: OauthCancelledError - path: wallets/pages/reference/account-kit/signer/src/classes/OauthCancelledError.mdx - - page: OauthFailedError - path: wallets/pages/reference/account-kit/signer/src/classes/OauthFailedError.mdx - - page: ServerSignerClient - path: wallets/pages/reference/account-kit/signer/src/classes/ServerSignerClient.mdx - - page: SolanaSigner - path: wallets/pages/reference/account-kit/signer/src/classes/SolanaSigner.mdx - - section: Enumerations - contents: - - page: AlchemyMfaStatus - path: wallets/pages/reference/account-kit/signer/src/enumerations/AlchemyMfaStatus.mdx - - page: AlchemySignerStatus - path: wallets/pages/reference/account-kit/signer/src/enumerations/AlchemySignerStatus.mdx - - section: Functions - contents: - - page: createServerSigner - path: wallets/pages/reference/account-kit/signer/src/functions/createServerSigner.mdx - - page: createSolanaSponsoredTransaction - path: wallets/pages/reference/account-kit/signer/src/functions/createSolanaSponsoredTransaction.mdx - - page: createSolanaTransaction - path: wallets/pages/reference/account-kit/signer/src/functions/createSolanaTransaction.mdx - - page: generateAccessKey - path: wallets/pages/reference/account-kit/signer/src/functions/generateAccessKey.mdx - - section: Interfaces - contents: - - page: ErrorInfo - path: wallets/pages/reference/account-kit/signer/src/interfaces/ErrorInfo.mdx - - section: Type Aliases - contents: - - page: AccessKeyAuthParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParams.mdx - - page: AccessKeyAuthParamsPublicKeyOnly - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParamsPublicKeyOnly.mdx - - page: AddMfaParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AddMfaParams.mdx - - page: AddMfaResult - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AddMfaResult.mdx - - page: AddOauthProviderParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AddOauthProviderParams.mdx - - page: AlchemySignerClientEvent - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvent.mdx - - page: AlchemySignerClientEvents - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvents.mdx - - page: AlchemySignerEvent - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvent.mdx - - page: AlchemySignerEvents - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvents.mdx - - page: AlchemySignerParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerParams.mdx - - page: AuthLinkingPrompt - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AuthLinkingPrompt.mdx - - page: AuthMethods - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AuthMethods.mdx - - page: AuthParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AuthParams.mdx - - page: AuthProviderConfig - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AuthProviderConfig.mdx - - page: AuthenticatingEventMetadata - path: wallets/pages/reference/account-kit/signer/src/type-aliases/AuthenticatingEventMetadata.mdx - - page: CreateAccountParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/CreateAccountParams.mdx - - page: CredentialCreationOptionOverrides - path: wallets/pages/reference/account-kit/signer/src/type-aliases/CredentialCreationOptionOverrides.mdx - - page: EmailAuthParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/EmailAuthParams.mdx - - page: EmailConfig - path: wallets/pages/reference/account-kit/signer/src/type-aliases/EmailConfig.mdx - - page: EmailType - path: wallets/pages/reference/account-kit/signer/src/type-aliases/EmailType.mdx - - page: ExportWalletOutput - path: wallets/pages/reference/account-kit/signer/src/type-aliases/ExportWalletOutput.mdx - - page: ExportWalletParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/ExportWalletParams.mdx - - page: GetOauthProviderUrlArgs - path: wallets/pages/reference/account-kit/signer/src/type-aliases/GetOauthProviderUrlArgs.mdx - - page: GetWebAuthnAttestationResult - path: wallets/pages/reference/account-kit/signer/src/type-aliases/GetWebAuthnAttestationResult.mdx - - page: IdTokenOnly - path: wallets/pages/reference/account-kit/signer/src/type-aliases/IdTokenOnly.mdx - - page: JwtParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/JwtParams.mdx - - page: JwtResponse - path: wallets/pages/reference/account-kit/signer/src/type-aliases/JwtResponse.mdx - - page: KnownAuthProvider - path: wallets/pages/reference/account-kit/signer/src/type-aliases/KnownAuthProvider.mdx - - page: MfaChallenge - path: wallets/pages/reference/account-kit/signer/src/type-aliases/MfaChallenge.mdx - - page: MfaFactor - path: wallets/pages/reference/account-kit/signer/src/type-aliases/MfaFactor.mdx - - page: OauthConfig - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OauthConfig.mdx - - page: OauthMode - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OauthMode.mdx - - page: OauthParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OauthParams.mdx - - page: OauthProviderConfig - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OauthProviderConfig.mdx - - page: OauthProviderInfo - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OauthProviderInfo.mdx - - page: OauthRedirectConfig - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OauthRedirectConfig.mdx - - page: OauthState - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OauthState.mdx - - page: OtpParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OtpParams.mdx - - page: OtpResponse - path: wallets/pages/reference/account-kit/signer/src/type-aliases/OtpResponse.mdx - - page: PasskeyInfo - path: wallets/pages/reference/account-kit/signer/src/type-aliases/PasskeyInfo.mdx - - page: RemoveMfaParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/RemoveMfaParams.mdx - - page: SignerBody - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SignerBody.mdx - - page: SignerConfig - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SignerConfig.mdx - - page: SignerEndpoints - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SignerEndpoints.mdx - - page: SignerResponse - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SignerResponse.mdx - - page: SignerRoutes - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SignerRoutes.mdx - - page: SignupResponse - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SignupResponse.mdx - - page: SmsAuthParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SmsAuthParams.mdx - - page: SubmitOtpCodeResponse - path: wallets/pages/reference/account-kit/signer/src/type-aliases/SubmitOtpCodeResponse.mdx - - page: User - path: wallets/pages/reference/account-kit/signer/src/type-aliases/User.mdx - - page: ValidateMultiFactorsArgs - path: wallets/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsArgs.mdx - - page: ValidateMultiFactorsParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsParams.mdx - - page: VerificationOtp - path: wallets/pages/reference/account-kit/signer/src/type-aliases/VerificationOtp.mdx - - page: VerifyMfaParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/VerifyMfaParams.mdx - - page: experimental_CreateApiKeyParams - path: wallets/pages/reference/account-kit/signer/src/type-aliases/experimental_CreateApiKeyParams.mdx - - section: Variables - contents: - - page: AlchemySignerParamsSchema - path: wallets/pages/reference/account-kit/signer/src/variables/AlchemySignerParamsSchema.mdx - - page: DEFAULT_SESSION_MS - path: wallets/pages/reference/account-kit/signer/src/variables/DEFAULT_SESSION_MS.mdx - - page: SessionManagerParamsSchema - path: wallets/pages/reference/account-kit/signer/src/variables/SessionManagerParamsSchema.mdx - - section: Smart contracts - path: wallets/pages/reference/account-kit/smart-contracts/src/README.mdx - contents: - - section: Classes - contents: - - page: InvalidAggregatedSignatureError - path: wallets/pages/reference/account-kit/smart-contracts/src/classes/InvalidAggregatedSignatureError.mdx - - page: InvalidContextSignatureError - path: wallets/pages/reference/account-kit/smart-contracts/src/classes/InvalidContextSignatureError.mdx - - page: MultisigAccountExpectedError - path: wallets/pages/reference/account-kit/smart-contracts/src/classes/MultisigAccountExpectedError.mdx - - page: MultisigMissingSignatureError - path: wallets/pages/reference/account-kit/smart-contracts/src/classes/MultisigMissingSignatureError.mdx - - page: SessionKeyPermissionsBuilder - path: wallets/pages/reference/account-kit/smart-contracts/src/classes/SessionKeyPermissionsBuilder.mdx - - page: SessionKeySigner - path: wallets/pages/reference/account-kit/smart-contracts/src/classes/SessionKeySigner.mdx - - section: Enumerations - contents: - - page: SessionKeyAccessListType - path: wallets/pages/reference/account-kit/smart-contracts/src/enumerations/SessionKeyAccessListType.mdx - - section: Functions - contents: - - page: assertNever - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/assertNever.mdx - - page: buildDeferredActionDigest - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/buildDeferredActionDigest.mdx - - page: buildFullNonceKey - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/buildFullNonceKey.mdx - - page: buildSessionKeysToRemoveStruct - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/buildSessionKeysToRemoveStruct.mdx - - page: combineSignatures - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/combineSignatures.mdx - - page: createLightAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createLightAccount.mdx - - page: createLightAccountAlchemyClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountAlchemyClient.mdx - - page: createLightAccountClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountClient.mdx - - page: createMAv2Base - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMAv2Base.mdx - - page: createModularAccountAlchemyClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountAlchemyClient.mdx - - page: createModularAccountV2 - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2.mdx - - page: createModularAccountV2Client - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2Client.mdx - - page: createMultiOwnerLightAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccount.mdx - - page: createMultiOwnerLightAccountAlchemyClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountAlchemyClient.mdx - - page: createMultiOwnerLightAccountClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountClient.mdx - - page: createMultiOwnerModularAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccount.mdx - - page: createMultiOwnerModularAccountClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccountClient.mdx - - page: createMultisigAccountAlchemyClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultisigAccountAlchemyClient.mdx - - page: createMultisigModularAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccount.mdx - - page: createMultisigModularAccountClient - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccountClient.mdx - - page: defaultLightAccountVersion - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/defaultLightAccountVersion.mdx - - page: formatSignatures - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/formatSignatures.mdx - - page: getDefaultLightAccountFactoryAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultLightAccountFactoryAddress.mdx - - page: getDefaultMAV2Address - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2Address.mdx - - page: getDefaultMAV2FactoryAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2FactoryAddress.mdx - - page: getDefaultMultiOwnerLightAccountFactoryAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerLightAccountFactoryAddress.mdx - - page: getDefaultMultiOwnerModularAccountFactoryAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerModularAccountFactoryAddress.mdx - - page: getDefaultMultisigModularAccountFactoryAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultisigModularAccountFactoryAddress.mdx - - page: getDefaultSMAV27702Address - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV27702Address.mdx - - page: getDefaultSMAV2BytecodeAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2BytecodeAddress.mdx - - page: getDefaultSMAV2StorageAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2StorageAddress.mdx - - page: getDefaultWebAuthnMAV2FactoryAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getDefaultWebAuthnMAV2FactoryAddress.mdx - - page: getLightAccountVersionForAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getLightAccountVersionForAccount.mdx - - page: getMAInitializationData - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getMAInitializationData.mdx - - page: getMAV2UpgradeToData - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getMAV2UpgradeToData.mdx - - page: getMSCAUpgradeToData - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getMSCAUpgradeToData.mdx - - page: getSignerType - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/getSignerType.mdx - - page: installPlugin - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/installPlugin.mdx - - page: isDeferredAction - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/isDeferredAction.mdx - - page: isModularAccountV2 - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/isModularAccountV2.mdx - - page: isMultisigModularAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/isMultisigModularAccount.mdx - - page: pack1271EOASignature - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/pack1271EOASignature.mdx - - page: pack1271WebAuthnSignature - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/pack1271WebAuthnSignature.mdx - - page: packUOSignature - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/packUOSignature.mdx - - page: parseDeferredAction - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/parseDeferredAction.mdx - - page: pluginManagerActions - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/pluginManagerActions.mdx - - page: predictLightAccountAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/predictLightAccountAddress.mdx - - page: predictModularAccountV2Address - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/predictModularAccountV2Address.mdx - - page: predictMultiOwnerLightAccountAddress - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/predictMultiOwnerLightAccountAddress.mdx - - page: splitAggregatedSignature - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/splitAggregatedSignature.mdx - - page: transferLightAccountOwnership - path: wallets/pages/reference/account-kit/smart-contracts/src/functions/transferLightAccountOwnership.mdx - - section: Type Aliases - contents: - - page: AccountLoupeActions - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/AccountLoupeActions.mdx - - page: AlchemyLightAccountClientConfig - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyLightAccountClientConfig.mdx - - page: AlchemyModularAccountClientConfig - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyModularAccountClientConfig.mdx - - page: AlchemyMultiOwnerLightAccountClientConfig - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultiOwnerLightAccountClientConfig.mdx - - page: AlchemyMultisigAccountClientConfig - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultisigAccountClientConfig.mdx - - page: BuildDeferredActionDigestParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildDeferredActionDigestParams.mdx - - page: BuildNonceParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildNonceParams.mdx - - page: ContractAccessEntry - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractAccessEntry.mdx - - page: ContractMethodEntry - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractMethodEntry.mdx - - page: CreateLightAccountParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateLightAccountParams.mdx - - page: CreateMAV2BaseParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseParams.mdx - - page: CreateMAV2BaseReturnType - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseReturnType.mdx - - page: CreateModularAccountV2AlchemyClientParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2AlchemyClientParams.mdx - - page: CreateModularAccountV2ClientParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2ClientParams.mdx - - page: CreateModularAccountV2Params - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2Params.mdx - - page: CreateMultiOwnerLightAccountParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerLightAccountParams.mdx - - page: CreateMultiOwnerModularAccountParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerModularAccountParams.mdx - - page: CreateMultisigModularAccountParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultisigModularAccountParams.mdx - - page: CreateWebauthnMAV2BaseParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnMAV2BaseParams.mdx - - page: CreateWebauthnModularAccountV2ClientParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2ClientParams.mdx - - page: CreateWebauthnModularAccountV2Params - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2Params.mdx - - page: Erc20TokenLimit - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/Erc20TokenLimit.mdx - - page: ExecutionDataView - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionDataView.mdx - - page: ExecutionFunctionConfig - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionFunctionConfig.mdx - - page: ExecutionHooks - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionHooks.mdx - - page: FunctionId - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionId.mdx - - page: FunctionReference - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionReference.mdx - - page: GasSpendLimit - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/GasSpendLimit.mdx - - page: GetLightAccountType - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/GetLightAccountType.mdx - - page: GetMAV2UpgradeToData - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/GetMAV2UpgradeToData.mdx - - page: GetPluginAddressParameter - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/GetPluginAddressParameter.mdx - - page: InstallMultiOwnerPluginParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultiOwnerPluginParams.mdx - - page: InstallMultisigPluginParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultisigPluginParams.mdx - - page: InstallPluginParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallPluginParams.mdx - - page: InstallSessionKeyPluginParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallSessionKeyPluginParams.mdx - - page: LightAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccount.mdx - - page: LightAccountClientActions - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountClientActions.mdx - - page: LightAccountEntryPointVersion - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountEntryPointVersion.mdx - - page: LightAccountType - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountType.mdx - - page: LightAccountVersion - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersion.mdx - - page: LightAccountVersionConfig - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfig.mdx - - page: LightAccountVersionConfigs - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfigs.mdx - - page: ModularAccountV2 - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2.mdx - - page: ModularAccountV2Client - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2Client.mdx - - page: ModularAccountsV2 - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountsV2.mdx - - page: MultiOwnerLightAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccount.mdx - - page: MultiOwnerLightAccountClientActions - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccountClientActions.mdx - - page: MultiOwnerModularAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerModularAccount.mdx - - page: MultiOwnerPluginActions - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerPluginActions.mdx - - page: MultisigModularAccount - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigModularAccount.mdx - - page: MultisigPluginActions - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigPluginActions.mdx - - page: MultisigUserOperationContext - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigUserOperationContext.mdx - - page: NativeTokenLimit - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/NativeTokenLimit.mdx - - page: Pack1271SignatureParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/Pack1271SignatureParams.mdx - - page: PackUOSignatureParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/PackUOSignatureParams.mdx - - page: Plugin - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/Plugin.mdx - - page: PluginManagerActions - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/PluginManagerActions.mdx - - page: PreValidationHooks - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/PreValidationHooks.mdx - - page: ProposeUserOperationResult - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ProposeUserOperationResult.mdx - - page: SessionKeyPluginActions - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/SessionKeyPluginActions.mdx - - page: SignMultisigUserOperationResult - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/SignMultisigUserOperationResult.mdx - - page: Signature - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/Signature.mdx - - page: SignerEntity - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerEntity.mdx - - page: SignerType - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerType.mdx - - page: TimeRange - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/TimeRange.mdx - - page: UninstallPluginParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/UninstallPluginParams.mdx - - page: UserOpSignatureType - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/UserOpSignatureType.mdx - - page: ValidationDataParams - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataParams.mdx - - page: ValidationDataView - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataView.mdx - - page: WebauthnModularAccountV2 - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2.mdx - - page: WebauthnModularAccountV2Client - path: wallets/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2Client.mdx - - section: Variables - contents: - - page: AccountVersionRegistry - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/AccountVersionRegistry.mdx - - page: DEFAULT_OWNER_ENTITY_ID - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/DEFAULT_OWNER_ENTITY_ID.mdx - - page: IAccountLoupeAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/IAccountLoupeAbi.mdx - - page: IPluginAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/IPluginAbi.mdx - - page: IPluginManagerAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/IPluginManagerAbi.mdx - - page: IStandardExecutorAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/IStandardExecutorAbi.mdx - - page: LightAccountUnsupported1271Factories - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Factories.mdx - - page: LightAccountUnsupported1271Impls - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Impls.mdx - - page: MULTISIG_ACCOUNT_SOURCE - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MULTISIG_ACCOUNT_SOURCE.mdx - - page: MultiOwnerModularAccountFactoryAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerModularAccountFactoryAbi.mdx - - page: MultiOwnerPlugin - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPlugin.mdx - - page: MultiOwnerPluginAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginAbi.mdx - - page: MultiOwnerPluginExecutionFunctionAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginExecutionFunctionAbi.mdx - - page: MultisigModularAccountFactoryAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultisigModularAccountFactoryAbi.mdx - - page: MultisigPlugin - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultisigPlugin.mdx - - page: MultisigPluginAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginAbi.mdx - - page: MultisigPluginExecutionFunctionAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginExecutionFunctionAbi.mdx - - page: SessionKeyPlugin - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPlugin.mdx - - page: SessionKeyPluginAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginAbi.mdx - - page: SessionKeyPluginExecutionFunctionAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginExecutionFunctionAbi.mdx - - page: UpgradeableModularAccountAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/UpgradeableModularAccountAbi.mdx - - page: accountLoupeActions - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/accountLoupeActions.mdx - - page: entityIdAndNonceReaderBytecode - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/entityIdAndNonceReaderBytecode.mdx - - page: executeUserOpSelector - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/executeUserOpSelector.mdx - - page: lightAccountClientActions - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/lightAccountClientActions.mdx - - page: mintableERC20Abi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Abi.mdx - - page: mintableERC20Bytecode - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Bytecode.mdx - - page: multiOwnerLightAccountClientActions - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerLightAccountClientActions.mdx - - page: multiOwnerPluginActions - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerPluginActions.mdx - - page: multisigPluginActions - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/multisigPluginActions.mdx - - page: multisigSignatureMiddleware - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/multisigSignatureMiddleware.mdx - - page: semiModularAccountBytecodeAbi - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/semiModularAccountBytecodeAbi.mdx - - page: sessionKeyPluginActions - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/sessionKeyPluginActions.mdx - - page: standardExecutor - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/standardExecutor.mdx - - page: updateMultiOwnerLightAccountOwners - path: wallets/pages/reference/account-kit/smart-contracts/src/variables/updateMultiOwnerLightAccountOwners.mdx - - section: Wallet client - path: wallets/pages/reference/account-kit/wallet-client/src/exports/README.mdx + - section: Wallet APIs (BETA) + path: wallets/pages/reference/wallet-apis/src/exports/README.mdx contents: - section: Functions contents: + - page: alchemyWalletTransport + path: wallets/pages/reference/wallet-apis/src/exports/functions/alchemyWalletTransport.mdx - page: createSmartWalletClient - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/createSmartWalletClient.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/createSmartWalletClient.mdx - page: formatSign - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/formatSign.mdx - - page: getCallsStatus - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/getCallsStatus.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/formatSign.mdx + - page: getCapabilities + path: wallets/pages/reference/wallet-apis/src/exports/functions/getCapabilities.mdx - page: grantPermissions - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/grantPermissions.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/grantPermissions.mdx - page: listAccounts - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/listAccounts.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/listAccounts.mdx - page: prepareCalls - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/prepareCalls.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/prepareCalls.mdx - page: prepareSign - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/prepareSign.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/prepareSign.mdx - page: requestAccount - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/requestAccount.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/requestAccount.mdx - page: sendCalls - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/sendCalls.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/sendCalls.mdx - page: sendPreparedCalls - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/sendPreparedCalls.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/sendPreparedCalls.mdx - page: signMessage - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/signMessage.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/signMessage.mdx - page: signPreparedCalls - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/signPreparedCalls.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/signPreparedCalls.mdx - page: signSignatureRequest - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/signSignatureRequest.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/signSignatureRequest.mdx - page: signTypedData - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/signTypedData.mdx - - page: waitForCallsStatus - path: wallets/pages/reference/account-kit/wallet-client/src/exports/functions/waitForCallsStatus.mdx + path: wallets/pages/reference/wallet-apis/src/exports/functions/signTypedData.mdx + - page: smartWalletActions + path: wallets/pages/reference/wallet-apis/src/exports/functions/smartWalletActions.mdx - section: Type Aliases contents: + - page: AlchemyWalletTransport + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/AlchemyWalletTransport.mdx + - page: BaseWalletClient + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/BaseWalletClient.mdx + - page: CreateSmartWalletClientParams + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/CreateSmartWalletClientParams.mdx - page: FormatSignParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignParams.mdx - page: FormatSignResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignResult.mdx - - page: GetAccountParam - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetAccountParam.mdx - - page: GetCallsStatusParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusParams.mdx - - page: GetCallsStatusResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignResult.mdx + - page: GetCapabilitiesParams + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesParams.mdx + - page: GetCapabilitiesResult + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesResult.mdx - page: GrantPermissionsParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsParams.mdx - page: GrantPermissionsResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsResult.mdx - page: ListAccountsParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsParams.mdx - page: ListAccountsResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsResult.mdx - page: PrepareCallsParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsParams.mdx - page: PrepareCallsResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsResult.mdx - page: PrepareSignParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignParams.mdx - page: PrepareSignResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignResult.mdx - page: RequestAccountParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountParams.mdx - page: RequestAccountResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountResult.mdx - page: SendCallsParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsParams.mdx - page: SendCallsResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsResult.mdx - page: SendPreparedCallsParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsParams.mdx - page: SendPreparedCallsResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsResult.mdx - page: SignMessageParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageParams.mdx - page: SignMessageResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageResult.mdx - page: SignPreparedCallsParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsParams.mdx - page: SignPreparedCallsResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsResult.mdx - page: SignSignatureRequestParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestParams.mdx - page: SignSignatureRequestResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestResult.mdx - page: SignTypedDataParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataParams.mdx - page: SignTypedDataResult - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataResult.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataResult.mdx + - page: SignerClient + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SignerClient.mdx + - page: SmartWalletActions + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletActions.mdx - page: SmartWalletClient - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClient.mdx - - page: SmartWalletClientParams - path: wallets/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClientParams.mdx + path: wallets/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletClient.mdx diff --git a/docs/pages/reference/README.mdx b/docs/pages/reference/README.mdx index eb62aac56c..4f029baeba 100644 --- a/docs/pages/reference/README.mdx +++ b/docs/pages/reference/README.mdx @@ -7,39 +7,24 @@ layout: reference {/* This file is auto-generated by TypeDoc. Do not edit manually. */} -# Smart Wallets +# Alchemy Smart Wallets SDK -Build zero friction sign up and transaction flows with smart accounts. Sign up with email, login with passkeys, transact with sponsored gas, and checkout in one click with transaction batching. +Build zero-friction sign-up and transaction flows with smart accounts. Sign up with email, login with passkeys, transact with sponsored gas, and checkout in one click with transaction batching. -This repo contains all of the packages that make up Smart Wallets as well as the core AA SDK that Smart Wallets is built on top of. These packages allow you to build your app on top of Account Abstraction, offering you everything from a fully integrated solution through React Components down to the low level clients and interfaces you need to have full control over development! +Built on top of [viem](https://viem.sh/) and the ERC-4337 standard, this SDK is modular at every layer and can be extended to fit your custom needs. -## @account-kit/\* +## Packages -Account Kit packages are all prefixed with `@account-kit` are broken down into the following packages: - -1. [`@account-kit/react`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/react) -2. [`@account-kit/core`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/core) -3. [`@account-kit/infra`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/infra) -4. [`@account-kit/signer`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/signer) -5. [`@account-kit/smart-contracts`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/smart-contracts) -6. [`@account-kit/privy-integration`](https://github.com/alchemyplatform/aa-sdk/tree/main/account-kit/privy-integration) - -## @aa-sdk/\* - -The `aa-sdk` is a type-safe and performant suite of TypeScript SDKs built on top of [viem](https://viem.sh/) to provide ergonomic methods for sending user operations, sponsoring gas, and deploying smart accounts. It handles all the complexity of ERC-4337 under the hood to make account abstraction simple. - -There are currently 2 SDKs that are part of the `aa-sdk` suite: - -1. [`@aa-sdk/core`](https://github.com/alchemyplatform/aa-sdk/tree/main/aa-sdk/core) -2. [`@aa-sdk/ethers`](https://github.com/alchemyplatform/aa-sdk/tree/main/aa-sdk/ethers) - -The core SDK also implements an EIP-1193 provider interface to easily plug into any popular dapp or wallet connect libraries such as RainbowKit, Wagmi, and Web3Modal. It also includes [`ethers.js`](https://docs.ethers.org/v5/) adapters to provide full support for \`ethers.js\`\` apps. - -The `aa-sdk` is modular at every layer of the stack and can be easily extended to fit your custom needs. You can plug in any [smart account](https://www.alchemy.com/docs/wallets/smart-contracts/choosing-a-smart-account#bring-your-own-smart-account) implementation, [Signer](https://www.alchemy.com/docs/wallets/signer/what-is-a-signer), [Gas Manager API](https://www.alchemy.com/docs/wallets/transactions/sponsor-gas) and RPC Provider. +| Package | Description | +| --------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| [`@alchemy/common`](/wallets/reference/_media/common) | Shared foundation: Alchemy transport, auth, chain registry, errors, and logging | +| [`@alchemy/aa-infra`](/wallets/reference/_media/aa-infra) | Bundler infrastructure: Rundler fee estimation and RPC types | +| [`@alchemy/smart-accounts`](/wallets/reference/_media/smart-accounts) | Smart account implementations: LightAccount, Modular Account v1/v2, and modules | +| [`@alchemy/wallet-apis`](/wallets/reference/_media/wallet-apis) | High-level Wallet API client: EIP-7702 smart wallets, signing, and transaction sending | ## Getting started -Check out this [quickstart guide](https://www.alchemy.com/docs/wallets/react/quickstart) to get started. +Check out the [quickstart guide](https://www.alchemy.com/docs/wallets/react/quickstart) to get started. ## Contributing diff --git a/docs/pages/reference/aa-infra/src/README.mdx b/docs/pages/reference/aa-infra/src/README.mdx new file mode 100644 index 0000000000..47496e5151 --- /dev/null +++ b/docs/pages/reference/aa-infra/src/README.mdx @@ -0,0 +1,21 @@ +--- +title: aa-infra +description: Overview of aa-infra +slug: wallets/reference/aa-infra +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +## Type Aliases + +| Type Alias | Description | +| :---------------------------------------------------------------------------- | :---------- | +| [RundlerClient](/wallets/reference/aa-infra/type-aliases/RundlerClient) | - | +| [RundlerRpcSchema](/wallets/reference/aa-infra/type-aliases/RundlerRpcSchema) | - | + +## Functions + +| Function | Description | +| :----------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- | +| [estimateFeesPerGas](/wallets/reference/aa-infra/functions/estimateFeesPerGas) | A custom `estimateFeesPerGas` function for viem bundler clients to use `rundler_maxPriorityFeePerGas` for priority fee estimation. | diff --git a/docs/pages/reference/aa-infra/src/functions/estimateFeesPerGas.mdx b/docs/pages/reference/aa-infra/src/functions/estimateFeesPerGas.mdx new file mode 100644 index 0000000000..0d431ca9ed --- /dev/null +++ b/docs/pages/reference/aa-infra/src/functions/estimateFeesPerGas.mdx @@ -0,0 +1,166 @@ +--- +title: estimateFeesPerGas +description: Overview of the estimateFeesPerGas function +slug: wallets/reference/aa-infra/functions/estimateFeesPerGas +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function estimateFeesPerGas( + bundlerClient, +): Promise<{ + maxFeePerGas: bigint; + maxPriorityFeePerGas: bigint; +}>; +``` + +Defined in: [packages/aa-infra/src/estimateFeesPerGas.ts:57](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/aa-infra/src/estimateFeesPerGas.ts#L57) + +A custom `estimateFeesPerGas` function for viem bundler clients to use `rundler_maxPriorityFeePerGas` for priority fee estimation. + +It fetches: + +1. `baseFeePerGas` from the latest block. +2. `maxPriorityFeePerGas` via `rundler_maxPriorityFeePerGas`. + +It then returns `maxFeePerGas = baseFee * 1.5 + priority` (aligns with viem default). + +## Example + +```ts +import { createBundlerClient } from "viem/account-abstraction"; +import { estimateFeesPerGas as alchemyEstimateFeesPerGas } from "@alchemy/aa-infra"; + +const bundler = createBundlerClient({ + transport: http(""), + userOperation: { + estimateFeesPerGas: alchemyEstimateFeesPerGas, + }, +}); +``` + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ `TChain` *extends* `Chain` | `undefined` + + `Chain` | `undefined` +
+ `TAccount` *extends* `SmartAccount` | `Account` | `undefined` + + `SmartAccount` | `Account` | `undefined` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `bundlerClient` + + \{ `account?`: `SmartAccount`; `bundlerClient`: `Client`\<`TTransport`, `TChain`, `TAccount`>; `userOperation?`: `UserOperationRequest`; } + + Bundler client with the rundler RPC method. +
+ `bundlerClient.account?` + + `SmartAccount` + + ‐ +
+ `bundlerClient.bundlerClient` + + `Client`\<`TTransport`, `TChain`, `TAccount`> + + ‐ +
+ `bundlerClient.userOperation?` + + `UserOperationRequest` + + ‐ +
+ +## Returns + +`Promise`\<\{ +`maxFeePerGas`: `bigint`; +`maxPriorityFeePerGas`: `bigint`; +}> + +Estimated fee values. diff --git a/docs/pages/reference/aa-infra/src/type-aliases/RundlerClient.mdx b/docs/pages/reference/aa-infra/src/type-aliases/RundlerClient.mdx new file mode 100644 index 0000000000..075ad2b9ee --- /dev/null +++ b/docs/pages/reference/aa-infra/src/type-aliases/RundlerClient.mdx @@ -0,0 +1,64 @@ +--- +title: RundlerClient +description: Overview of RundlerClient +slug: wallets/reference/aa-infra/type-aliases/RundlerClient +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type RundlerClient = BundlerClient< + transport, + chain, + account, + Client | undefined, + RundlerRpcSchema +>; +``` + +Defined in: [packages/aa-infra/src/estimateFeesPerGas.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/aa-infra/src/estimateFeesPerGas.ts#L20) + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `transport` *extends* `Transport` + + `Transport` +
+ `chain` *extends* `Chain` | `undefined` + + `Chain` | `undefined` +
+ `account` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
diff --git a/docs/pages/reference/aa-infra/src/type-aliases/RundlerRpcSchema.mdx b/docs/pages/reference/aa-infra/src/type-aliases/RundlerRpcSchema.mdx new file mode 100644 index 0000000000..d310b11907 --- /dev/null +++ b/docs/pages/reference/aa-infra/src/type-aliases/RundlerRpcSchema.mdx @@ -0,0 +1,14 @@ +--- +title: RundlerRpcSchema +description: Overview of RundlerRpcSchema +slug: wallets/reference/aa-infra/type-aliases/RundlerRpcSchema +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type RundlerRpcSchema = [RundlerMaxPriorityFeePerGasSchema]; +``` + +Defined in: [packages/aa-infra/src/schema.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/aa-infra/src/schema.ts#L9) diff --git a/docs/pages/reference/aa-sdk/core/src/README.mdx b/docs/pages/reference/aa-sdk/core/src/README.mdx deleted file mode 100644 index ae477a8602..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/README.mdx +++ /dev/null @@ -1,258 +0,0 @@ ---- -title: aa-sdk/core -description: Overview of aa-sdk/core -slug: wallets/reference/aa-sdk/core -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Enumerations - -| Enumeration | Description | -| :----------------------------------------------------------------------------- | :---------- | -| [DeploymentState](/wallets/reference/aa-sdk/core/enumerations/DeploymentState) | - | -| [LogLevel](/wallets/reference/aa-sdk/core/enumerations/LogLevel) | - | -| [RoundingMode](/wallets/reference/aa-sdk/core/enumerations/RoundingMode) | - | - -## Classes - -| Class | Description | -| :---------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [AccountNotFoundError](/wallets/reference/aa-sdk/core/classes/AccountNotFoundError) | This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. | -| [AccountRequiresOwnerError](/wallets/reference/aa-sdk/core/classes/AccountRequiresOwnerError) | Represents an error that occurs when an account requires an owner to execute but none is provided. | -| [BaseError](/wallets/reference/aa-sdk/core/classes/BaseError) | A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters. This is based on on viem's BaseError type (obviously from the import and extend) we want the errors here to point to our docs if we supply a docsPath though | -| [BatchExecutionNotSupportedError](/wallets/reference/aa-sdk/core/classes/BatchExecutionNotSupportedError) | Represents an error indicating that batch execution is not supported for a specific account type. | -| [ChainNotFoundError](/wallets/reference/aa-sdk/core/classes/ChainNotFoundError) | Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client. | -| [DefaultFactoryNotDefinedError](/wallets/reference/aa-sdk/core/classes/DefaultFactoryNotDefinedError) | Represents an error that is thrown when no default factory is defined for a specific account type on a given chain and entry point version. This error suggests providing an override via the `factoryAddress` parameter when creating an account. | -| [EntityIdOverrideError](/wallets/reference/aa-sdk/core/classes/EntityIdOverrideError) | Error class denoting that the provided entity id is invalid because it's overriding the native entity id. | -| [EntryPointNotFoundError](/wallets/reference/aa-sdk/core/classes/EntryPointNotFoundError) | Represents an error thrown when an entry point is not found for a specific chain and entry point version. This error indicates that a default entry point does not exist for the given chain and version, and suggests providing an override. | -| [FailedToFindTransactionError](/wallets/reference/aa-sdk/core/classes/FailedToFindTransactionError) | Represents an error that occurs when a transaction cannot be found for a given user operation. This error extends from `BaseError`. The `hash` of the transaction is provided to indicate which transaction could not be found. | -| [FailedToGetStorageSlotError](/wallets/reference/aa-sdk/core/classes/FailedToGetStorageSlotError) | Custom error class `FailedToGetStorageSlotError` which is used to signal a failure when attempting to retrieve a storage slot. This error includes the slot and slot descriptor in its message and inherits from `BaseError`. | -| [GetCounterFactualAddressError](/wallets/reference/aa-sdk/core/classes/GetCounterFactualAddressError) | Custom error class for handling errors when getting a counterfactual address. This extends the `BaseError` class and provides a custom error message and name. | -| [IncompatibleClientError](/wallets/reference/aa-sdk/core/classes/IncompatibleClientError) | Represents an error thrown when a client is not compatible with the expected client type for a specific method. The error message provides guidance on how to create a compatible client. | -| [IncorrectAccountType](/wallets/reference/aa-sdk/core/classes/IncorrectAccountType) | Represents an error thrown when an account type does not match the expected type. | -| [InvalidDeferredActionNonce](/wallets/reference/aa-sdk/core/classes/InvalidDeferredActionNonce) | Error class denoting that the deferred action nonce used is invalid. | -| [InvalidEntityIdError](/wallets/reference/aa-sdk/core/classes/InvalidEntityIdError) | Error class denoting that the provided entity id is invalid because it's too large. | -| [InvalidEntryPointError](/wallets/reference/aa-sdk/core/classes/InvalidEntryPointError) | Represents an error thrown when an invalid entry point version is encountered for a specific chain. This error extends the `BaseError` class. | -| [InvalidModularAccountV2Mode](/wallets/reference/aa-sdk/core/classes/InvalidModularAccountV2Mode) | Error class denoting that the provided ma v2 account mode is invalid. | -| [InvalidNonceKeyError](/wallets/reference/aa-sdk/core/classes/InvalidNonceKeyError) | Error class denoting that the nonce key is invalid because its too large. | -| [InvalidRpcUrlError](/wallets/reference/aa-sdk/core/classes/InvalidRpcUrlError) | Represents an error that occurs when an invalid RPC URL is provided. This class extends the `BaseError` class and includes the invalid URL in the error message. | -| [InvalidSignerTypeError](/wallets/reference/aa-sdk/core/classes/InvalidSignerTypeError) | Represents an error thrown when an invalid signer type is provided to the SmartAccountSigner. | -| [InvalidUserOperationError](/wallets/reference/aa-sdk/core/classes/InvalidUserOperationError) | Thrown when a UserOperationStruct is not a valid request | -| [LocalAccountSigner](/wallets/reference/aa-sdk/core/classes/LocalAccountSigner) | Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key. | -| [Logger](/wallets/reference/aa-sdk/core/classes/Logger) | Logger class provides static methods for logging at different levels such as error, warn, debug, info, and verbose. This class allows setting log levels and log filters to control the logging behavior. | -| [NotAModularAccountV2Error](/wallets/reference/aa-sdk/core/classes/NotAModularAccountV2Error) | This error is thrown when an account is not a Modular Account V2 | -| [SignTransactionNotSupportedError](/wallets/reference/aa-sdk/core/classes/SignTransactionNotSupportedError) | Error thrown when attempting to sign a transaction that is not supported by smart contracts. | -| [SmartAccountWithSignerRequiredError](/wallets/reference/aa-sdk/core/classes/SmartAccountWithSignerRequiredError) | Error class indicating that a smart account operation requires a signer. | -| [TraceHeader](/wallets/reference/aa-sdk/core/classes/TraceHeader) | Some tools that are useful when dealing with the values of the trace header. Follows the W3C trace context standard. | -| [TransactionMissingToParamError](/wallets/reference/aa-sdk/core/classes/TransactionMissingToParamError) | Error thrown when a transaction is missing the `to` address parameter. This class extends the `BaseError` class. | -| [UpgradesNotSupportedError](/wallets/reference/aa-sdk/core/classes/UpgradesNotSupportedError) | An error class representing the condition where upgrades are not supported for a specific account type. This error extends the `BaseError` class and provides a custom error message based on the account type. | -| [UpgradeToAndCallNotSupportedError](/wallets/reference/aa-sdk/core/classes/UpgradeToAndCallNotSupportedError) | Represents an error that occurs when an attempt is made to call `UpgradeToAndCall` on an account type that does not support it. Includes the account type in the error message. | -| [WaitForUserOperationError](/wallets/reference/aa-sdk/core/classes/WaitForUserOperationError) | Error thrown when waiting for user operation request to be mined. | -| [WalletClientSigner](/wallets/reference/aa-sdk/core/classes/WalletClientSigner) | Represents a wallet client signer for smart accounts, providing methods to get the address, sign messages, sign typed data, and sign 7702 authorizations. | - -## Interfaces - -| Interface | Description | -| :------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------ | -| [AccountEntryPointRegistry](/wallets/reference/aa-sdk/core/interfaces/AccountEntryPointRegistry) | - | -| [EntryPointDefRegistry](/wallets/reference/aa-sdk/core/interfaces/EntryPointDefRegistry) | - | -| [EntryPointRegistry](/wallets/reference/aa-sdk/core/interfaces/EntryPointRegistry) | - | -| [EntryPointRegistryBase](/wallets/reference/aa-sdk/core/interfaces/EntryPointRegistryBase) | - | -| [SmartAccountAuthenticator](/wallets/reference/aa-sdk/core/interfaces/SmartAccountAuthenticator) | Extends the SmartAccountSigner interface with authentication. | -| [SmartAccountSigner](/wallets/reference/aa-sdk/core/interfaces/SmartAccountSigner) | A signer that can sign messages and typed data. | -| [SplitTransportParams](/wallets/reference/aa-sdk/core/interfaces/SplitTransportParams) | - | -| [UserOperationEstimateGasResponse](/wallets/reference/aa-sdk/core/interfaces/UserOperationEstimateGasResponse) | - | -| [UserOperationReceipt](/wallets/reference/aa-sdk/core/interfaces/UserOperationReceipt) | - | -| [UserOperationRequest_v6](/wallets/reference/aa-sdk/core/interfaces/UserOperationRequest_v6) | - | -| [UserOperationRequest_v7](/wallets/reference/aa-sdk/core/interfaces/UserOperationRequest_v7) | - | -| [UserOperationResponse](/wallets/reference/aa-sdk/core/interfaces/UserOperationResponse) | - | -| [UserOperationStruct_v6](/wallets/reference/aa-sdk/core/interfaces/UserOperationStruct_v6) | - | -| [UserOperationStruct_v7](/wallets/reference/aa-sdk/core/interfaces/UserOperationStruct_v7) | - | - -## Type Aliases - -| Type Alias | Description | -| :------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | -| [AccountOp](/wallets/reference/aa-sdk/core/type-aliases/AccountOp) | - | -| [AuthorizationRequest](/wallets/reference/aa-sdk/core/type-aliases/AuthorizationRequest) | - | -| [BaseSmartAccountClient](/wallets/reference/aa-sdk/core/type-aliases/BaseSmartAccountClient) | - | -| [BaseSmartAccountClientActions](/wallets/reference/aa-sdk/core/type-aliases/BaseSmartAccountClientActions) | - | -| [BatchUserOperationCallData](/wallets/reference/aa-sdk/core/type-aliases/BatchUserOperationCallData) | - | -| [BigNumberish](/wallets/reference/aa-sdk/core/type-aliases/BigNumberish) | - | -| [BigNumberishRange](/wallets/reference/aa-sdk/core/type-aliases/BigNumberishRange) | - | -| [BuildTransactionParameters](/wallets/reference/aa-sdk/core/type-aliases/BuildTransactionParameters) | - | -| [BuildUserOperationFromTransactionsResult](/wallets/reference/aa-sdk/core/type-aliases/BuildUserOperationFromTransactionsResult) | - | -| [BuildUserOperationParameters](/wallets/reference/aa-sdk/core/type-aliases/BuildUserOperationParameters) | - | -| [BundlerActions](/wallets/reference/aa-sdk/core/type-aliases/BundlerActions) | - | -| [BundlerClient](/wallets/reference/aa-sdk/core/type-aliases/BundlerClient) | - | -| [BundlerRpcSchema](/wallets/reference/aa-sdk/core/type-aliases/BundlerRpcSchema) | - | -| [BytesLike](/wallets/reference/aa-sdk/core/type-aliases/BytesLike) | - | -| [ClientMiddleware](/wallets/reference/aa-sdk/core/type-aliases/ClientMiddleware) | - | -| [ClientMiddlewareArgs](/wallets/reference/aa-sdk/core/type-aliases/ClientMiddlewareArgs) | - | -| [ClientMiddlewareConfig](/wallets/reference/aa-sdk/core/type-aliases/ClientMiddlewareConfig) | - | -| [ClientMiddlewareFn](/wallets/reference/aa-sdk/core/type-aliases/ClientMiddlewareFn) | - | -| [ConnectionConfig](/wallets/reference/aa-sdk/core/type-aliases/ConnectionConfig) | - | -| [ConnectorData](/wallets/reference/aa-sdk/core/type-aliases/ConnectorData) | - | -| [DefaultEntryPointVersion](/wallets/reference/aa-sdk/core/type-aliases/DefaultEntryPointVersion) | - | -| [Deferrable](/wallets/reference/aa-sdk/core/type-aliases/Deferrable) | - | -| [DropAndReplaceUserOperationParameters](/wallets/reference/aa-sdk/core/type-aliases/DropAndReplaceUserOperationParameters) | - | -| [Eip7702ExtendedFields](/wallets/reference/aa-sdk/core/type-aliases/Eip7702ExtendedFields) | - | -| [EmptyHex](/wallets/reference/aa-sdk/core/type-aliases/EmptyHex) | - | -| [EntryPointDef](/wallets/reference/aa-sdk/core/type-aliases/EntryPointDef) | - | -| [EntryPointParameter](/wallets/reference/aa-sdk/core/type-aliases/EntryPointParameter) | - | -| [EntryPointVersion](/wallets/reference/aa-sdk/core/type-aliases/EntryPointVersion) | - | -| [EQ](/wallets/reference/aa-sdk/core/type-aliases/EQ) | - | -| [EqualsOneOfTheComponents](/wallets/reference/aa-sdk/core/type-aliases/EqualsOneOfTheComponents) | - | -| [Erc7677Client](/wallets/reference/aa-sdk/core/type-aliases/Erc7677Client) | - | -| [Erc7677MiddlewareParams](/wallets/reference/aa-sdk/core/type-aliases/Erc7677MiddlewareParams) | - | -| [Erc7677RpcSchema](/wallets/reference/aa-sdk/core/type-aliases/Erc7677RpcSchema) | - | -| [GetAccountAddressParams](/wallets/reference/aa-sdk/core/type-aliases/GetAccountAddressParams) | - | -| [GetAccountParameter](/wallets/reference/aa-sdk/core/type-aliases/GetAccountParameter) | - | -| [GetContextParameter](/wallets/reference/aa-sdk/core/type-aliases/GetContextParameter) | - | -| [GetEntryPointFromAccount](/wallets/reference/aa-sdk/core/type-aliases/GetEntryPointFromAccount) | - | -| [GetEntryPointOptions](/wallets/reference/aa-sdk/core/type-aliases/GetEntryPointOptions) | - | -| [IsMemberOrSubtypeOfAComponent](/wallets/reference/aa-sdk/core/type-aliases/IsMemberOrSubtypeOfAComponent) | - | -| [IsOneOf](/wallets/reference/aa-sdk/core/type-aliases/IsOneOf) | - | -| [IsUndefined](/wallets/reference/aa-sdk/core/type-aliases/IsUndefined) | Checks if T is `undefined` | -| [MiddlewareClient](/wallets/reference/aa-sdk/core/type-aliases/MiddlewareClient) | Middleware client type | -| [Multiplier](/wallets/reference/aa-sdk/core/type-aliases/Multiplier) | - | -| [Never](/wallets/reference/aa-sdk/core/type-aliases/Never) | - | -| [NotType](/wallets/reference/aa-sdk/core/type-aliases/NotType) | Used to ensure type doesn't extend another, for use in & chaining of properties | -| [NoUndefined](/wallets/reference/aa-sdk/core/type-aliases/NoUndefined) | Constructs a type by excluding `undefined` from `T`. | -| [NullAddress](/wallets/reference/aa-sdk/core/type-aliases/NullAddress) | - | -| [OneOf](/wallets/reference/aa-sdk/core/type-aliases/OneOf) | - | -| [OptionalFields](/wallets/reference/aa-sdk/core/type-aliases/OptionalFields) | - | -| [Prettify](/wallets/reference/aa-sdk/core/type-aliases/Prettify) | Combines members of an intersection into a readable type. | -| [PromiseOrValue](/wallets/reference/aa-sdk/core/type-aliases/PromiseOrValue) | - | -| [RecordableKeys](/wallets/reference/aa-sdk/core/type-aliases/RecordableKeys) | - | -| [RequiredBy](/wallets/reference/aa-sdk/core/type-aliases/RequiredBy) | - | -| [SendTransactionsParameters](/wallets/reference/aa-sdk/core/type-aliases/SendTransactionsParameters) | - | -| [SendUserOperationParameters](/wallets/reference/aa-sdk/core/type-aliases/SendUserOperationParameters) | - | -| [SendUserOperationResult](/wallets/reference/aa-sdk/core/type-aliases/SendUserOperationResult) | - | -| [SignatureRequest](/wallets/reference/aa-sdk/core/type-aliases/SignatureRequest) | - | -| [SigningMethods](/wallets/reference/aa-sdk/core/type-aliases/SigningMethods) | - | -| [SignUserOperationParameters](/wallets/reference/aa-sdk/core/type-aliases/SignUserOperationParameters) | - | -| [SmartAccountClient](/wallets/reference/aa-sdk/core/type-aliases/SmartAccountClient) | - | -| [SmartAccountClientActions](/wallets/reference/aa-sdk/core/type-aliases/SmartAccountClientActions) | - | -| [SmartAccountClientConfig](/wallets/reference/aa-sdk/core/type-aliases/SmartAccountClientConfig) | - | -| [SmartAccountClientRpcSchema](/wallets/reference/aa-sdk/core/type-aliases/SmartAccountClientRpcSchema) | - | -| [SmartContractAccount](/wallets/reference/aa-sdk/core/type-aliases/SmartContractAccount) | - | -| [SmartContractAccountWithSigner](/wallets/reference/aa-sdk/core/type-aliases/SmartContractAccountWithSigner) | - | -| [SupportedEntryPoint](/wallets/reference/aa-sdk/core/type-aliases/SupportedEntryPoint) | - | -| [ToSmartContractAccountParams](/wallets/reference/aa-sdk/core/type-aliases/ToSmartContractAccountParams) | - | -| [UnpackedSignature](/wallets/reference/aa-sdk/core/type-aliases/UnpackedSignature) | - | -| [UpgradeAccountParams](/wallets/reference/aa-sdk/core/type-aliases/UpgradeAccountParams) | - | -| [UpgradeToAndCallParams](/wallets/reference/aa-sdk/core/type-aliases/UpgradeToAndCallParams) | - | -| [UpgradeToData](/wallets/reference/aa-sdk/core/type-aliases/UpgradeToData) | - | -| [UserOperationCallData](/wallets/reference/aa-sdk/core/type-aliases/UserOperationCallData) | - | -| [UserOperationContext](/wallets/reference/aa-sdk/core/type-aliases/UserOperationContext) | - | -| [UserOperationFeeOptions](/wallets/reference/aa-sdk/core/type-aliases/UserOperationFeeOptions) | - | -| [UserOperationFeeOptionsField](/wallets/reference/aa-sdk/core/type-aliases/UserOperationFeeOptionsField) | - | -| [UserOperationOverrides](/wallets/reference/aa-sdk/core/type-aliases/UserOperationOverrides) | - | -| [UserOperationOverridesParameter](/wallets/reference/aa-sdk/core/type-aliases/UserOperationOverridesParameter) | - | -| [UserOperationPaymasterOverrides](/wallets/reference/aa-sdk/core/type-aliases/UserOperationPaymasterOverrides) | - | -| [UserOperationRequest](/wallets/reference/aa-sdk/core/type-aliases/UserOperationRequest) | - | -| [UserOperationStruct](/wallets/reference/aa-sdk/core/type-aliases/UserOperationStruct) | - | -| [WaitForUserOperationTxParameters](/wallets/reference/aa-sdk/core/type-aliases/WaitForUserOperationTxParameters) | - | -| [WithOptional](/wallets/reference/aa-sdk/core/type-aliases/WithOptional) | - | -| [WithRequired](/wallets/reference/aa-sdk/core/type-aliases/WithRequired) | - | - -## Variables - -| Variable | Description | -| :---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [ADD_BREADCRUMB](/wallets/reference/aa-sdk/core/variables/ADD_BREADCRUMB) | The symbol that is used to add a breadcrumb to the headers. Is an optional function that is used to add a breadcrumb to the headers. | -| [BigNumberishRangeSchema](/wallets/reference/aa-sdk/core/variables/BigNumberishRangeSchema) | - | -| [BigNumberishSchema](/wallets/reference/aa-sdk/core/variables/BigNumberishSchema) | - | -| [bundlerActions](/wallets/reference/aa-sdk/core/variables/bundlerActions) | A viem client decorator that provides Bundler specific actions. These actions include estimating gas for user operations, sending raw user operations, retrieving user operations by hash, getting supported entry points, and getting user operation receipts. | -| [ChainSchema](/wallets/reference/aa-sdk/core/variables/ChainSchema) | - | -| [ConnectionConfigSchema](/wallets/reference/aa-sdk/core/variables/ConnectionConfigSchema) | - | -| [createBundlerClientFromExisting](/wallets/reference/aa-sdk/core/variables/createBundlerClientFromExisting) | Creates a bundler client from an existing public client with the provided transport and chain. | -| [~~default7702GasEstimator~~](/wallets/reference/aa-sdk/core/variables/default7702GasEstimator) | A middleware function to estimate the gas usage of a user operation when using an EIP-7702 delegated account. Has an optional custom gas estimator. This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. | -| [~~default7702UserOpSigner~~](/wallets/reference/aa-sdk/core/variables/default7702UserOpSigner) | Provides a default middleware function for signing user operations with a client account when using EIP-7702 delegated accounts. If the signer doesn't support `signAuthorization`, then this just runs the provided `signUserOperation` middleware. This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. | -| [defaultEntryPointVersion](/wallets/reference/aa-sdk/core/variables/defaultEntryPointVersion) | - | -| [defaultGasEstimator](/wallets/reference/aa-sdk/core/variables/defaultGasEstimator) | Description default gas estimator middleware for `SmartAccountClient` You can override this middleware with your custom gas estimator middleware by passing it to the client constructor | -| [defaultPaymasterAndData](/wallets/reference/aa-sdk/core/variables/defaultPaymasterAndData) | Middleware function that sets the `paymasterAndData` field in the given struct based on the entry point version of the account. This is the default used by `createSmartAccountClient` and is not necessary to be used directly. | -| [defaultUserOpSigner](/wallets/reference/aa-sdk/core/variables/defaultUserOpSigner) | Provides a default middleware function for signing user operations with a client account. This function validates the request and adds the signature to it. This is already included in the client returned from `createSmartAccountClient` | -| [EntryPointAbi_v6](/wallets/reference/aa-sdk/core/variables/EntryPointAbi_v6) | - | -| [EntryPointAbi_v7](/wallets/reference/aa-sdk/core/variables/EntryPointAbi_v7) | - | -| [entryPointRegistry](/wallets/reference/aa-sdk/core/variables/entryPointRegistry) | - | -| [HexSchema](/wallets/reference/aa-sdk/core/variables/HexSchema) | - | -| [minPriorityFeePerBidDefaults](/wallets/reference/aa-sdk/core/variables/minPriorityFeePerBidDefaults) | - | -| [MultiplierSchema](/wallets/reference/aa-sdk/core/variables/MultiplierSchema) | - | -| [noopMiddleware](/wallets/reference/aa-sdk/core/variables/noopMiddleware) | Noop middleware that does nothing and passes the arguments through | -| [SignerSchema](/wallets/reference/aa-sdk/core/variables/SignerSchema) | - | -| [SimpleAccountAbi_v6](/wallets/reference/aa-sdk/core/variables/SimpleAccountAbi_v6) | - | -| [SimpleAccountAbi_v7](/wallets/reference/aa-sdk/core/variables/SimpleAccountAbi_v7) | - | -| [SimpleAccountFactoryAbi](/wallets/reference/aa-sdk/core/variables/SimpleAccountFactoryAbi) | - | -| [smartAccountClientActions](/wallets/reference/aa-sdk/core/variables/smartAccountClientActions) | Provides a set of smart account client actions to decorate the provided client. These actions include building and signing user operations, sending transactions, and more. | -| [smartAccountClientMethodKeys](/wallets/reference/aa-sdk/core/variables/smartAccountClientMethodKeys) | - | -| [SmartAccountClientOptsSchema](/wallets/reference/aa-sdk/core/variables/SmartAccountClientOptsSchema) | - | -| [TRACE_HEADER_NAME](/wallets/reference/aa-sdk/core/variables/TRACE_HEADER_NAME) | These are the headers that are used in the trace headers, could be found in the spec | -| [TRACE_HEADER_STATE](/wallets/reference/aa-sdk/core/variables/TRACE_HEADER_STATE) | These are the headers that are used in the trace headers, could be found in the spec | -| [waitForUserOperationTransaction](/wallets/reference/aa-sdk/core/variables/waitForUserOperationTransaction) | Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached. | -| [webauthnGasEstimator](/wallets/reference/aa-sdk/core/variables/webauthnGasEstimator) | A middleware function to estimate the gas usage of a user operation when using a Modular Account V2 WebAuthn account. Has an optional custom gas estimator. This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. | - -## Functions - -| Function | Description | -| :------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [allEqual](/wallets/reference/aa-sdk/core/functions/allEqual) | Utility method for checking if the passed in values are all equal (strictly) | -| [applyUserOpFeeOption](/wallets/reference/aa-sdk/core/functions/applyUserOpFeeOption) | Utility method for applying a UserOperationFeeOptionsField value over the current value set for the field | -| [applyUserOpOverride](/wallets/reference/aa-sdk/core/functions/applyUserOpOverride) | Utility method for applying a UserOperationOverrides field value over the current value set for the field | -| [applyUserOpOverrideOrFeeOption](/wallets/reference/aa-sdk/core/functions/applyUserOpOverrideOrFeeOption) | Utility method for applying a UserOperationOverrides field value and a UserOperationFeeOptionsField value over the current value set for the field, with the override taking precedence over the fee option | -| [asyncPipe](/wallets/reference/aa-sdk/core/functions/asyncPipe) | Utility function that allows for piping a series of async functions together | -| [bigIntClamp](/wallets/reference/aa-sdk/core/functions/bigIntClamp) | Given a bigint and a min-max range, returns the min-max clamped bigint value | -| [bigIntMax](/wallets/reference/aa-sdk/core/functions/bigIntMax) | Returns the max bigint in a list of bigints | -| [bigIntMin](/wallets/reference/aa-sdk/core/functions/bigIntMin) | Returns the min bigint in a list of bigints | -| [bigIntMultiply](/wallets/reference/aa-sdk/core/functions/bigIntMultiply) | Given a bigint and a number (which can be a float), returns the bigint value. Note: this function has loss and will round down to the nearest integer. | -| [buildUserOperation](/wallets/reference/aa-sdk/core/functions/buildUserOperation) | Builds a user operation using the provided client and operation parameters. Ensures that the account exists and the client is compatible. | -| [buildUserOperationFromTx](/wallets/reference/aa-sdk/core/functions/buildUserOperationFromTx) | Performs `buildUserOperationFromTx` in batch and builds into a single, yet to be signed `UserOperation` (UO) struct. The output user operation struct will be filled with all gas fields (and paymaster data if a paymaster is used) based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, `maxPriorityFeePerGas`) computed using the configured `ClientMiddlewares` on the `SmartAccountClient` | -| [buildUserOperationFromTxs](/wallets/reference/aa-sdk/core/functions/buildUserOperationFromTxs) | Performs `buildUserOperationFromTx` in batch and builds into a single, yet to be signed `UserOperation` (UO) struct. The output user operation struct will be filled with all gas fields (and paymaster data if a paymaster is used) based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, `maxPriorityFeePerGas`) computed using the configured ClientMiddlewares on the SmartAccountClient. | -| [bypassPaymasterAndData](/wallets/reference/aa-sdk/core/functions/bypassPaymasterAndData) | Utility method for checking whether the middleware pipeline should bypass the paymaster middleware for the user operation with the given overrides, either because the UserOp is paying for its own gas, or passing a specific paymaster | -| [bypassPaymasterAndDataEmptyHex](/wallets/reference/aa-sdk/core/functions/bypassPaymasterAndDataEmptyHex) | An alternative to `bypassPaymasterAndData` which only returns true if the data parameter is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will pay for its own gas | -| [checkGasSponsorshipEligibility](/wallets/reference/aa-sdk/core/functions/checkGasSponsorshipEligibility) | This function verifies 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`, 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. | -| [clientHeaderTrack](/wallets/reference/aa-sdk/core/functions/clientHeaderTrack) | Add a crumb to the breadcrumb. | -| [concatPaymasterAndData](/wallets/reference/aa-sdk/core/functions/concatPaymasterAndData) | Utility method for converting the object containing the paymaster address and paymaster data to the paymaster and data concatenated hex string | -| [conditionalReturn](/wallets/reference/aa-sdk/core/functions/conditionalReturn) | Utility method for checking the condition and return the value if condition holds true, undefined if not. | -| [convertChainIdToCoinType](/wallets/reference/aa-sdk/core/functions/convertChainIdToCoinType) | Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains. | -| [convertCoinTypeToChain](/wallets/reference/aa-sdk/core/functions/convertCoinTypeToChain) | Converts a coin type to its corresponding blockchain chain based on a predefined mapping. | -| [convertCoinTypeToChainId](/wallets/reference/aa-sdk/core/functions/convertCoinTypeToChainId) | Converts a coin type to a chain ID based on predefined mappings. This function follows ENSIP-9 for coin type 60 and ENSIP-11 for other coin types. | -| [createBundlerClient](/wallets/reference/aa-sdk/core/functions/createBundlerClient) | Creates a Bundler Client using the provided configuration parameters, including chain and optional type. | -| [createSmartAccountClient](/wallets/reference/aa-sdk/core/functions/createSmartAccountClient) | Creates a smart account client using the provided configuration. This client handles various Ethereum transactions and message signing operations. | -| [createSmartAccountClientFromExisting](/wallets/reference/aa-sdk/core/functions/createSmartAccountClientFromExisting) | Creates a smart account client using an existing client and specific configuration. This function can be used to reuse a pre-existing BundlerClient while customizing other aspects of the smart account. | -| [deepHexlify](/wallets/reference/aa-sdk/core/functions/deepHexlify) | Recursively converts all values in an object to hex strings | -| [defaultFeeEstimator](/wallets/reference/aa-sdk/core/functions/defaultFeeEstimator) | Default fee estimator middleware function that estimates the maximum fee per gas and maximum priority fee per gas for a given client and applies the necessary overrides and fee options. | -| [dropAndReplaceUserOperation](/wallets/reference/aa-sdk/core/functions/dropAndReplaceUserOperation) | Drops an existing user operation and replaces it with a new one while ensuring the appropriate fees and overrides are applied. | -| [erc7677Middleware](/wallets/reference/aa-sdk/core/functions/erc7677Middleware) | Middleware function for interacting with ERC-7677 enabled clients. It supports resolving paymaster and data fields for user operations. This middleware assumes that your RPC provider supports the ERC-7677 methods (pm_getPaymasterStubData and pm_getPaymasterData). | -| [filterUndefined](/wallets/reference/aa-sdk/core/functions/filterUndefined) | Filters out properties with undefined or null values from the provided object. | -| [getAccountAddress](/wallets/reference/aa-sdk/core/functions/getAccountAddress) | Retrieves the account address. Uses a provided `accountAddress` if available; otherwise, it computes the address using the entry point contract and the initial code. | -| [getDefaultUserOperationFeeOptions](/wallets/reference/aa-sdk/core/functions/getDefaultUserOperationFeeOptions) | - | -| [getEntryPoint](/wallets/reference/aa-sdk/core/functions/getEntryPoint) | Retrieves the entry point definition for the specified chain and version, falling back to the default version if not provided. Throws an error if the entry point address cannot be found. | -| [getUserOperationError](/wallets/reference/aa-sdk/core/functions/getUserOperationError) | Retrieves the error message from an entrypoint for a User Operation. | -| [isBigNumberish](/wallets/reference/aa-sdk/core/functions/isBigNumberish) | - | -| [isEntryPointVersion](/wallets/reference/aa-sdk/core/functions/isEntryPointVersion) | Checks if the given value is a valid key of the EntryPointRegistry. | -| [isMultiplier](/wallets/reference/aa-sdk/core/functions/isMultiplier) | - | -| [isSigner](/wallets/reference/aa-sdk/core/functions/isSigner) | Checks if the provided object is a `SmartAccountSigner`. | -| [isSmartAccountClient](/wallets/reference/aa-sdk/core/functions/isSmartAccountClient) | 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 | -| [isSmartAccountWithSigner](/wallets/reference/aa-sdk/core/functions/isSmartAccountWithSigner) | Determines if the given SmartContractAccount has a signer associated with it. | -| [isValidFactoryAndData](/wallets/reference/aa-sdk/core/functions/isValidFactoryAndData) | Utility method for asserting a UserOperationStruct has valid fields for the paymaster data | -| [isValidPaymasterAndData](/wallets/reference/aa-sdk/core/functions/isValidPaymasterAndData) | Utility method for asserting a UserOperationRequest has valid fields for the paymaster data | -| [isValidRequest](/wallets/reference/aa-sdk/core/functions/isValidRequest) | Utility method for asserting a UserOperationStruct has valid fields for the given entry point version | -| [middlewareActions](/wallets/reference/aa-sdk/core/functions/middlewareActions) | function that takes in ClientMiddlewareConfig used during client initiation and returns the middleware actions object that the smart account client extends with | -| [parseFactoryAddressFromAccountInitCode](/wallets/reference/aa-sdk/core/functions/parseFactoryAddressFromAccountInitCode) | Parses the factory address and factory calldata from the provided account initialization code (initCode). | -| [parsePaymasterAndData](/wallets/reference/aa-sdk/core/functions/parsePaymasterAndData) | Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string | -| [pick](/wallets/reference/aa-sdk/core/functions/pick) | Picks the specified keys from an object and returns a new object containing only those key-value pairs. | -| [resolveProperties](/wallets/reference/aa-sdk/core/functions/resolveProperties) | Await all of the properties of a Deferrable object | -| [sendTransaction](/wallets/reference/aa-sdk/core/functions/sendTransaction) | Sends a transaction using the provided client, arguments, optional overrides, and context. This sends a UO and then waits for it to be mined | -| [sendTransactions](/wallets/reference/aa-sdk/core/functions/sendTransactions) | Sends transactions using the provided client and transaction parameters. This function builds user operations from the transactions, sends them, and waits for the transaction to be mined. | -| [sendUserOperation](/wallets/reference/aa-sdk/core/functions/sendUserOperation) | Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline. | -| [split](/wallets/reference/aa-sdk/core/functions/split) | The Split Transport allows you to split RPC traffic for specific methods across different RPC providers. This is done by specifying the methods you want handled specially as overrides and providing a fallback transport for all other methods. | -| [stringToIndex](/wallets/reference/aa-sdk/core/functions/stringToIndex) | Useful if you want to use a string, such as a user's email address, as salt to generate a unique SmartAccount per user. | -| [takeBytes](/wallets/reference/aa-sdk/core/functions/takeBytes) | Given a bytes string, returns a slice of the bytes | -| [toRecord](/wallets/reference/aa-sdk/core/functions/toRecord) | Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function. | -| [toSmartContractAccount](/wallets/reference/aa-sdk/core/functions/toSmartContractAccount) | Converts an account to a smart contract account and sets up various account-related methods using the provided parameters like transport, chain, entry point, and other utilities. | -| [unpackSignRawMessageBytes](/wallets/reference/aa-sdk/core/functions/unpackSignRawMessageBytes) | - | -| [wrapSignatureWith6492](/wallets/reference/aa-sdk/core/functions/wrapSignatureWith6492) | Wraps a given signature with additional data following the EIP-6492 standard. | diff --git a/docs/pages/reference/aa-sdk/core/src/classes/AccountNotFoundError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/AccountNotFoundError.mdx deleted file mode 100644 index 1bfbe07b4d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/AccountNotFoundError.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: AccountNotFoundError -description: This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. -slug: wallets/reference/aa-sdk/core/classes/AccountNotFoundError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L8) - -This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new AccountNotFoundError(): AccountNotFoundError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L15) - -Constructor for initializing an error message indicating that an account could not be found to execute the specified action. - -#### Returns - -`AccountNotFoundError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"AccountNotFoundError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/AccountRequiresOwnerError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/AccountRequiresOwnerError.mdx deleted file mode 100644 index 9a54e83fb3..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/AccountRequiresOwnerError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: AccountRequiresOwnerError -description: Represents an error that occurs when an account requires an owner to execute but none is provided. -slug: wallets/reference/aa-sdk/core/classes/AccountRequiresOwnerError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:138](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L138) - -Represents an error that occurs when an account requires an owner to execute but none is provided. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new AccountRequiresOwnerError(accountType): AccountRequiresOwnerError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:146](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L146) - -Constructs an error indicating that an account of the specified type requires an owner to execute. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `accountType` - - `string` - - The type of account that requires an owner -
- -#### Returns - -`AccountRequiresOwnerError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"AccountRequiresOwnerError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/BaseError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/BaseError.mdx deleted file mode 100644 index 713daa4a14..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/BaseError.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: BaseError -description: A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters. This is based on on viem's BaseError type (obviously from the import and extend) we want the errors here to point to our docs if we supply a docsPath though -slug: wallets/reference/aa-sdk/core/classes/BaseError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/base.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/base.ts#L24) - -A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters. -This is based on on viem's BaseError type (obviously from the import and extend) -we want the errors here to point to our docs if we supply a docsPath though - -## Extends - -- [`BaseError`](https://viem.sh) - -## Extended by - -- [`AccountNotFoundError`](AccountNotFoundError) -- [`NotAModularAccountV2Error`](NotAModularAccountV2Error) -- [`AccountRequiresOwnerError`](AccountRequiresOwnerError) -- [`BatchExecutionNotSupportedError`](BatchExecutionNotSupportedError) -- [`DefaultFactoryNotDefinedError`](DefaultFactoryNotDefinedError) -- [`FailedToGetStorageSlotError`](FailedToGetStorageSlotError) -- [`GetCounterFactualAddressError`](GetCounterFactualAddressError) -- [`IncorrectAccountType`](IncorrectAccountType) -- [`SignTransactionNotSupportedError`](SignTransactionNotSupportedError) -- [`SmartAccountWithSignerRequiredError`](SmartAccountWithSignerRequiredError) -- [`UpgradeToAndCallNotSupportedError`](UpgradeToAndCallNotSupportedError) -- [`UpgradesNotSupportedError`](UpgradesNotSupportedError) -- [`ChainNotFoundError`](ChainNotFoundError) -- [`IncompatibleClientError`](IncompatibleClientError) -- [`InvalidRpcUrlError`](InvalidRpcUrlError) -- [`InvalidEntityIdError`](InvalidEntityIdError) -- [`InvalidNonceKeyError`](InvalidNonceKeyError) -- [`EntityIdOverrideError`](EntityIdOverrideError) -- [`InvalidModularAccountV2Mode`](InvalidModularAccountV2Mode) -- [`InvalidDeferredActionNonce`](InvalidDeferredActionNonce) -- [`EntryPointNotFoundError`](EntryPointNotFoundError) -- [`InvalidEntryPointError`](InvalidEntryPointError) -- [`InvalidSignerTypeError`](InvalidSignerTypeError) -- [`FailedToFindTransactionError`](FailedToFindTransactionError) -- [`TransactionMissingToParamError`](TransactionMissingToParamError) -- [`InvalidUserOperationError`](InvalidUserOperationError) -- [`WaitForUserOperationError`](WaitForUserOperationError) - -## Constructors - -### Constructor - -```ts -new BaseError(shortMessage, args): BaseError; -``` - -Defined in: [aa-sdk/core/src/errors/base.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/base.ts#L28) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `shortMessage` - - `string` -
- `args` - - `BaseErrorParameters` -
- -#### Returns - -`BaseError` - -#### Overrides - -```ts -ViemBaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"AASDKError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/BatchExecutionNotSupportedError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/BatchExecutionNotSupportedError.mdx deleted file mode 100644 index 285b1e8013..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/BatchExecutionNotSupportedError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: BatchExecutionNotSupportedError -description: Represents an error indicating that batch execution is not supported for a specific account type. -slug: wallets/reference/aa-sdk/core/classes/BatchExecutionNotSupportedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:122](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L122) - -Represents an error indicating that batch execution is not supported for a specific account type. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new BatchExecutionNotSupportedError(accountType): BatchExecutionNotSupportedError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:130](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L130) - -Constructs an error message indicating that batch execution is not supported by the specified account type. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `accountType` - - `string` - - the type of account that does not support batch execution -
- -#### Returns - -`BatchExecutionNotSupportedError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"BatchExecutionNotSupportedError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/ChainNotFoundError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/ChainNotFoundError.mdx deleted file mode 100644 index 8c541c82f5..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/ChainNotFoundError.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: ChainNotFoundError -description: Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client. -slug: wallets/reference/aa-sdk/core/classes/ChainNotFoundError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L46) - -Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new ChainNotFoundError(): ChainNotFoundError; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:52](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L52) - -Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client. - -#### Returns - -`ChainNotFoundError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"ChainNotFoundError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/DefaultFactoryNotDefinedError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/DefaultFactoryNotDefinedError.mdx deleted file mode 100644 index bf42350804..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/DefaultFactoryNotDefinedError.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: DefaultFactoryNotDefinedError -description: Represents an error that is thrown when no default factory is defined for a specific account type on a given chain and entry point version. This error suggests providing an override via the `factoryAddress` parameter when creating an account. -slug: wallets/reference/aa-sdk/core/classes/DefaultFactoryNotDefinedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L38) - -Represents an error that is thrown when no default factory is defined for a specific account type on a given chain and entry point version. -This error suggests providing an override via the `factoryAddress` parameter when creating an account. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new DefaultFactoryNotDefinedError( - accountType, - chain, - version): DefaultFactoryNotDefinedError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L48) - -Constructs an error message indicating that no default factory was found for the given account type, chain, and entry point version. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `accountType` - - `string` - - the type of account -
- `chain` - - [`Chain`](https://viem.sh) - - the blockchain chain -
- `version` - - keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - the entry point version -
- -#### Returns - -`DefaultFactoryNotDefinedError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"DefaultFactoryNotDefinedError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/EntityIdOverrideError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/EntityIdOverrideError.mdx deleted file mode 100644 index fd4e3fd207..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/EntityIdOverrideError.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: EntityIdOverrideError -description: Error class denoting that the provided entity id is invalid because it's overriding the native entity id. -slug: wallets/reference/aa-sdk/core/classes/EntityIdOverrideError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:96](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L96) - -Error class denoting that the provided entity id is invalid because it's overriding the native entity id. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new EntityIdOverrideError(): EntityIdOverrideError; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:102](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L102) - -Initializes a new instance of the error message with a default message indicating that the nonce key is invalid. - -#### Returns - -`EntityIdOverrideError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"EntityIdOverrideError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/EntryPointNotFoundError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/EntryPointNotFoundError.mdx deleted file mode 100644 index fa2c7fcaf6..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/EntryPointNotFoundError.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: EntryPointNotFoundError -description: Represents an error thrown when an entry point is not found for a specific chain and entry point version. This error indicates that a default entry point does not exist for the given chain and version, and suggests providing an override. -slug: wallets/reference/aa-sdk/core/classes/EntryPointNotFoundError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/entrypoint.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/entrypoint.ts#L7) - -Represents an error thrown when an entry point is not found for a specific chain and entry point version. This error indicates that a default entry point does not exist for the given chain and version, and suggests providing an override. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new EntryPointNotFoundError(chain, entryPointVersion): EntryPointNotFoundError; -``` - -Defined in: [aa-sdk/core/src/errors/entrypoint.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/entrypoint.ts#L16) - -Constructs an error message indicating that no default entry point exists for the given chain and entry point version. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - The blockchain network for which the entry point is being queried -
- `entryPointVersion` - - `any` - - The version of the entry point for which no default exists -
- -#### Returns - -`EntryPointNotFoundError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"EntryPointNotFoundError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/FailedToFindTransactionError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/FailedToFindTransactionError.mdx deleted file mode 100644 index 935072700c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/FailedToFindTransactionError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: FailedToFindTransactionError -description: Represents an error that occurs when a transaction cannot be found for a given user operation. This error extends from `BaseError`. The `hash` of the transaction is provided to indicate which transaction could not be found. -slug: wallets/reference/aa-sdk/core/classes/FailedToFindTransactionError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/transaction.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/transaction.ts#L20) - -Represents an error that occurs when a transaction cannot be found for a given user operation. This error extends from `BaseError`. The `hash` of the transaction is provided to indicate which transaction could not be found. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new FailedToFindTransactionError(hash): FailedToFindTransactionError; -``` - -Defined in: [aa-sdk/core/src/errors/transaction.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/transaction.ts#L28) - -Constructs a new error message indicating a failure to find the transaction for the specified user operation hash. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `hash` - - `` `0x${string}` `` - - The hexadecimal value representing the user operation hash. -
- -#### Returns - -`FailedToFindTransactionError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"FailedToFindTransactionError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/FailedToGetStorageSlotError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/FailedToGetStorageSlotError.mdx deleted file mode 100644 index de34b00d8a..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/FailedToGetStorageSlotError.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: FailedToGetStorageSlotError -description: Custom error class `FailedToGetStorageSlotError` which is used to signal a failure when attempting to retrieve a storage slot. This error includes the slot and slot descriptor in its message and inherits from `BaseError`. -slug: wallets/reference/aa-sdk/core/classes/FailedToGetStorageSlotError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:105](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L105) - -Custom error class `FailedToGetStorageSlotError` which is used to signal a failure when attempting to retrieve a storage slot. This error includes the slot and slot descriptor in its message and inherits from `BaseError`. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new FailedToGetStorageSlotError(slot, slotDescriptor): FailedToGetStorageSlotError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:114](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L114) - -Custom error message constructor for failing to get a specific storage slot. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `slot` - - `string` - - The storage slot that failed to be accessed or retrieved -
- `slotDescriptor` - - `string` - - A description of the storage slot, for additional context in the error message -
- -#### Returns - -`FailedToGetStorageSlotError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"FailedToGetStorageSlotError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/GetCounterFactualAddressError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/GetCounterFactualAddressError.mdx deleted file mode 100644 index 32d7d691c9..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/GetCounterFactualAddressError.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: GetCounterFactualAddressError -description: Custom error class for handling errors when getting a counterfactual address. This extends the `BaseError` class and provides a custom error message and name. -slug: wallets/reference/aa-sdk/core/classes/GetCounterFactualAddressError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:61](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L61) - -Custom error class for handling errors when getting a counterfactual address. This extends the `BaseError` class and provides a custom error message and name. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new GetCounterFactualAddressError(): GetCounterFactualAddressError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:66](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L66) - -Constructor for initializing an error message indicating the failure of fetching the counter-factual address. - -#### Returns - -`GetCounterFactualAddressError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"GetCounterFactualAddressError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/IncompatibleClientError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/IncompatibleClientError.mdx deleted file mode 100644 index 06d7523041..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/IncompatibleClientError.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: IncompatibleClientError -description: Represents an error thrown when a client is not compatible with the expected client type for a specific method. The error message provides guidance on how to create a compatible client. -slug: wallets/reference/aa-sdk/core/classes/IncompatibleClientError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L7) - -Represents an error thrown when a client is not compatible with the expected client type for a specific method. The error message provides guidance on how to create a compatible client. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new IncompatibleClientError( - expectedClient, - method, - client): IncompatibleClientError; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L17) - -Throws an error when the client type does not match the expected client type. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `expectedClient` - - `string` - - The expected type of the client. -
- `method` - - `string` - - The method that was called. -
- `client` - - [`Client`](https://viem.sh) - - The client instance. -
- -#### Returns - -`IncompatibleClientError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"IncompatibleClientError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/IncorrectAccountType.mdx b/docs/pages/reference/aa-sdk/core/src/classes/IncorrectAccountType.mdx deleted file mode 100644 index d33e0ea8f6..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/IncorrectAccountType.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: IncorrectAccountType -description: Represents an error thrown when an account type does not match the expected type. -slug: wallets/reference/aa-sdk/core/classes/IncorrectAccountType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:170](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L170) - -Represents an error thrown when an account type does not match the expected type. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new IncorrectAccountType(expected, actual): IncorrectAccountType; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:179](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L179) - -Constructs an error object indicating that the expected account type does not match the actual account type. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `expected` - - `string` - - the expected account type -
- `actual` - - `string` - - the actual account type that was received -
- -#### Returns - -`IncorrectAccountType` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"IncorrectAccountTypeError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidDeferredActionNonce.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidDeferredActionNonce.mdx deleted file mode 100644 index f5c2d3ecf2..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidDeferredActionNonce.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: InvalidDeferredActionNonce -description: Error class denoting that the deferred action nonce used is invalid. -slug: wallets/reference/aa-sdk/core/classes/InvalidDeferredActionNonce -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:124](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L124) - -Error class denoting that the deferred action nonce used is invalid. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidDeferredActionNonce(): InvalidDeferredActionNonce; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:130](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L130) - -Initializes a new instance of the error message with a default message indicating that the provided deferred action nonce is invalid. - -#### Returns - -`InvalidDeferredActionNonce` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidDeferredActionNonce"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidEntityIdError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidEntityIdError.mdx deleted file mode 100644 index bacf2187fb..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidEntityIdError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: InvalidEntityIdError -description: Error class denoting that the provided entity id is invalid because it's too large. -slug: wallets/reference/aa-sdk/core/classes/InvalidEntityIdError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:60](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L60) - -Error class denoting that the provided entity id is invalid because it's too large. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidEntityIdError(entityId): InvalidEntityIdError; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L68) - -Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `entityId` - - `number` - - the invalid entityId used -
- -#### Returns - -`InvalidEntityIdError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidEntityIdError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidEntryPointError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidEntryPointError.mdx deleted file mode 100644 index b4301c794d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidEntryPointError.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: InvalidEntryPointError -description: Represents an error thrown when an invalid entry point version is encountered for a specific chain. This error extends the `BaseError` class. -slug: wallets/reference/aa-sdk/core/classes/InvalidEntryPointError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/entrypoint.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/entrypoint.ts#L29) - -Represents an error thrown when an invalid entry point version is encountered for a specific chain. This error extends the `BaseError` class. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidEntryPointError(chain, entryPointVersion): InvalidEntryPointError; -``` - -Defined in: [aa-sdk/core/src/errors/entrypoint.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/entrypoint.ts#L38) - -Constructs an error indicating an invalid entry point version for a specific chain. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - The chain object containing information about the blockchain -
- `entryPointVersion` - - `any` - - The entry point version that is invalid -
- -#### Returns - -`InvalidEntryPointError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidEntryPointError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidModularAccountV2Mode.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidModularAccountV2Mode.mdx deleted file mode 100644 index 66d3985063..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidModularAccountV2Mode.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: InvalidModularAccountV2Mode -description: Error class denoting that the provided ma v2 account mode is invalid. -slug: wallets/reference/aa-sdk/core/classes/InvalidModularAccountV2Mode -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:110](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L110) - -Error class denoting that the provided ma v2 account mode is invalid. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidModularAccountV2Mode(): InvalidModularAccountV2Mode; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:116](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L116) - -Initializes a new instance of the error message with a default message indicating that the provided ma v2 account mode is invalid. - -#### Returns - -`InvalidModularAccountV2Mode` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidModularAccountV2Mode"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidNonceKeyError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidNonceKeyError.mdx deleted file mode 100644 index 75f11536de..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidNonceKeyError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: InvalidNonceKeyError -description: Error class denoting that the nonce key is invalid because its too large. -slug: wallets/reference/aa-sdk/core/classes/InvalidNonceKeyError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:78](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L78) - -Error class denoting that the nonce key is invalid because its too large. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidNonceKeyError(nonceKey): InvalidNonceKeyError; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L86) - -Initializes a new instance of the error message with a default message indicating that the nonce key is invalid. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `nonceKey` - - `bigint` - - the invalid nonceKey used -
- -#### Returns - -`InvalidNonceKeyError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidNonceKeyError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidRpcUrlError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidRpcUrlError.mdx deleted file mode 100644 index 34df4cc276..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidRpcUrlError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: InvalidRpcUrlError -description: Represents an error that occurs when an invalid RPC URL is provided. This class extends the `BaseError` class and includes the invalid URL in the error message. -slug: wallets/reference/aa-sdk/core/classes/InvalidRpcUrlError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/client.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L30) - -Represents an error that occurs when an invalid RPC URL is provided. This class extends the `BaseError` class and includes the invalid URL in the error message. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidRpcUrlError(rpcUrl?): InvalidRpcUrlError; -``` - -Defined in: [aa-sdk/core/src/errors/client.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/client.ts#L38) - -Creates an instance of an error with a message indicating an invalid RPC URL. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `rpcUrl?` - - `string` - - The invalid RPC URL that caused the error -
- -#### Returns - -`InvalidRpcUrlError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidRpcUrlError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidSignerTypeError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidSignerTypeError.mdx deleted file mode 100644 index 8a6a83d026..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidSignerTypeError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: InvalidSignerTypeError -description: Represents an error thrown when an invalid signer type is provided to the SmartAccountSigner. -slug: wallets/reference/aa-sdk/core/classes/InvalidSignerTypeError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/signer.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/signer.ts#L6) - -Represents an error thrown when an invalid signer type is provided to the SmartAccountSigner. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidSignerTypeError(signerType?): InvalidSignerTypeError; -``` - -Defined in: [aa-sdk/core/src/errors/signer.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/signer.ts#L14) - -Constructs an error message when an invalid signer type is passed to SmartAccountSigner. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `signerType?` - - `string` - - An optional parameter specifying the signer type. If not provided, a default error message will be used. -
- -#### Returns - -`InvalidSignerTypeError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidSignerTypeError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/InvalidUserOperationError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/InvalidUserOperationError.mdx deleted file mode 100644 index 85533fa525..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/InvalidUserOperationError.mdx +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: InvalidUserOperationError -description: Thrown when a UserOperationStruct is not a valid request extends viem BaseError -slug: wallets/reference/aa-sdk/core/classes/InvalidUserOperationError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/useroperation.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/useroperation.ts#L10) - -Thrown when a UserOperationStruct is not a valid request - -extends viem BaseError - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new InvalidUserOperationError(uo): InvalidUserOperationError; -``` - -Defined in: [aa-sdk/core/src/errors/useroperation.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/useroperation.ts#L22) - -Creates an instance of InvalidUserOperationError. - -InvalidUserOperationError constructor - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `uo` - - [`UserOperationStruct`](../type-aliases/UserOperationStruct) - - the invalid user operation struct -
- -#### Returns - -`InvalidUserOperationError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault valueDescription
- `name` - - `string` - - `"InvalidUserOperationError"` - - **Inherit Doc** -
- `version` - - `string` - - `VERSION` - - ‐ -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/LocalAccountSigner.mdx b/docs/pages/reference/aa-sdk/core/src/classes/LocalAccountSigner.mdx deleted file mode 100644 index a77f40e3ca..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/LocalAccountSigner.mdx +++ /dev/null @@ -1,740 +0,0 @@ ---- -title: LocalAccountSigner -description: Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key. -slug: wallets/reference/aa-sdk/core/classes/LocalAccountSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/signer/local-account.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L22) - -Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key. - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* - | [`HDAccount`](https://viem.sh) - | [`PrivateKeyAccount`](https://viem.sh) - | [`LocalAccount`](https://viem.sh) -
- -## Implements - -- [`SmartAccountSigner`](../interfaces/SmartAccountSigner)\<`T`> - -## Constructors - -### Constructor - -```ts -new LocalAccountSigner(inner): LocalAccountSigner; -``` - -Defined in: [aa-sdk/core/src/signer/local-account.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L44) - -A function to initialize an object with an inner parameter and derive a signerType from it. - -#### Example - -```ts -import { LocalAccountSigner } from "@aa-sdk/core"; -import { privateKeyToAccount, generatePrivateKey } from "viem"; - -const signer = new LocalAccountSigner( - privateKeyToAccount(generatePrivateKey()), -); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `inner` - - `T` - - The inner parameter containing the necessary data -
- -#### Returns - -`LocalAccountSigner`\<`T`> - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `inner` - - `T` - - ‐ -
- `signerType` - - `string` - - ‐ -
- `signMessage` - - (`message`) => `Promise`\<`` `0x${string}` ``> - - Signs the provided message using the inner signMessage function. - - **Example** - - ```ts - import { LocalAccountSigner } from "@aa-sdk/core"; - import { generatePrivateKey } from "viem"; - - const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); - const signature = await signer.signMessage("Hello, world!"); - ``` -
- -## Methods - -### getAddress() - -```ts -readonly getAddress(): Promise<`0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/signer/local-account.ts:140](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L140) - -Returns the address of the inner object in a specific hexadecimal format. - -#### Example - -```ts -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem"; - -const signer = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); -const address = await signer.getAddress(); -``` - -#### Returns - -`Promise`\<`` `0x${string}` ``> - -A promise that resolves to the address in the format `0x{string}` - -#### Implementation of - -[`SmartAccountSigner`](../interfaces/SmartAccountSigner).[`getAddress`](../interfaces/SmartAccountSigner#getaddress) - ---- - -### signAuthorization() - -```ts -signAuthorization(this, unsignedAuthorization): Promise>; -``` - -Defined in: [aa-sdk/core/src/signer/local-account.ts:119](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L119) - -Signs an unsigned authorization using the provided private key account. - -#### Example - -```ts twoslash -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem/accounts"; - -const signer = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); -const signedAuthorization = await signer.signAuthorization({ - contractAddress: "0x1234123412341234123412341234123412341234", - chainId: 1, - nonce: 3, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `this` - - `LocalAccountSigner`\<\{ }> - - ‐ -
- `unsignedAuthorization` - - [`AuthorizationRequest`](../type-aliases/AuthorizationRequest)\<`number`> - - The unsigned authorization to be signed. -
- -#### Returns - -`Promise`\<[`SignedAuthorization`](https://viem.sh)\<`number`>> - -A promise that resolves to the signed authorization. - -#### Implementation of - -[`SmartAccountSigner`](../interfaces/SmartAccountSigner).[`signAuthorization`](../interfaces/SmartAccountSigner#signauthorization) - ---- - -### signTypedData() - -```ts -readonly signTypedData(params): Promise<`0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/signer/local-account.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L90) - -Signs typed data using the given parameters. - -#### Example - -```ts -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem"; - -const signer = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); -const signature = await signer.signTypedData({ - domain: {}, - types: {}, - primaryType: "", - message: {}, -}); -``` - -#### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTypedData` *extends* - | \{ - \[`key`: `string`]: readonly [`TypedDataParameter`](https://abitype.dev)\[]; - \[`key`: `` `string[${string}]` ``]: `undefined`; - \[`key`: `` `function[${string}]` ``]: `undefined`; - \[`key`: `` `address[${string}]` ``]: `undefined`; - \[`key`: `` `bool[${string}]` ``]: `undefined`; - \[`key`: `` `bytes[${string}]` ``]: `undefined`; - \[`key`: `` `bytes1[${string}]` ``]: `undefined`; - \[`key`: `` `bytes2[${string}]` ``]: `undefined`; - \[`key`: `` `bytes3[${string}]` ``]: `undefined`; - \[`key`: `` `bytes4[${string}]` ``]: `undefined`; - \[`key`: `` `bytes5[${string}]` ``]: `undefined`; - \[`key`: `` `bytes6[${string}]` ``]: `undefined`; - \[`key`: `` `bytes7[${string}]` ``]: `undefined`; - \[`key`: `` `bytes8[${string}]` ``]: `undefined`; - \[`key`: `` `bytes9[${string}]` ``]: `undefined`; - \[`key`: `` `bytes10[${string}]` ``]: `undefined`; - \[`key`: `` `bytes11[${string}]` ``]: `undefined`; - \[`key`: `` `bytes12[${string}]` ``]: `undefined`; - \[`key`: `` `bytes13[${string}]` ``]: `undefined`; - \[`key`: `` `bytes14[${string}]` ``]: `undefined`; - \[`key`: `` `bytes15[${string}]` ``]: `undefined`; - \[`key`: `` `bytes16[${string}]` ``]: `undefined`; - \[`key`: `` `bytes17[${string}]` ``]: `undefined`; - \[`key`: `` `bytes18[${string}]` ``]: `undefined`; - \[`key`: `` `bytes19[${string}]` ``]: `undefined`; - \[`key`: `` `bytes20[${string}]` ``]: `undefined`; - \[`key`: `` `bytes21[${string}]` ``]: `undefined`; - \[`key`: `` `bytes22[${string}]` ``]: `undefined`; - \[`key`: `` `bytes23[${string}]` ``]: `undefined`; - \[`key`: `` `bytes24[${string}]` ``]: `undefined`; - \[`key`: `` `bytes25[${string}]` ``]: `undefined`; - \[`key`: `` `bytes26[${string}]` ``]: `undefined`; - \[`key`: `` `bytes27[${string}]` ``]: `undefined`; - \[`key`: `` `bytes28[${string}]` ``]: `undefined`; - \[`key`: `` `bytes29[${string}]` ``]: `undefined`; - \[`key`: `` `bytes30[${string}]` ``]: `undefined`; - \[`key`: `` `bytes31[${string}]` ``]: `undefined`; - \[`key`: `` `bytes32[${string}]` ``]: `undefined`; - \[`key`: `` `int[${string}]` ``]: `undefined`; - \[`key`: `` `int8[${string}]` ``]: `undefined`; - \[`key`: `` `int16[${string}]` ``]: `undefined`; - \[`key`: `` `int24[${string}]` ``]: `undefined`; - \[`key`: `` `int32[${string}]` ``]: `undefined`; - \[`key`: `` `int40[${string}]` ``]: `undefined`; - \[`key`: `` `int48[${string}]` ``]: `undefined`; - \[`key`: `` `int56[${string}]` ``]: `undefined`; - \[`key`: `` `int64[${string}]` ``]: `undefined`; - \[`key`: `` `int72[${string}]` ``]: `undefined`; - \[`key`: `` `int80[${string}]` ``]: `undefined`; - \[`key`: `` `int88[${string}]` ``]: `undefined`; - \[`key`: `` `int96[${string}]` ``]: `undefined`; - \[`key`: `` `int104[${string}]` ``]: `undefined`; - \[`key`: `` `int112[${string}]` ``]: `undefined`; - \[`key`: `` `int120[${string}]` ``]: `undefined`; - \[`key`: `` `int128[${string}]` ``]: `undefined`; - \[`key`: `` `int136[${string}]` ``]: `undefined`; - \[`key`: `` `int144[${string}]` ``]: `undefined`; - \[`key`: `` `int152[${string}]` ``]: `undefined`; - \[`key`: `` `int160[${string}]` ``]: `undefined`; - \[`key`: `` `int168[${string}]` ``]: `undefined`; - \[`key`: `` `int176[${string}]` ``]: `undefined`; - \[`key`: `` `int184[${string}]` ``]: `undefined`; - \[`key`: `` `int192[${string}]` ``]: `undefined`; - \[`key`: `` `int200[${string}]` ``]: `undefined`; - \[`key`: `` `int208[${string}]` ``]: `undefined`; - \[`key`: `` `int216[${string}]` ``]: `undefined`; - \[`key`: `` `int224[${string}]` ``]: `undefined`; - \[`key`: `` `int232[${string}]` ``]: `undefined`; - \[`key`: `` `int240[${string}]` ``]: `undefined`; - \[`key`: `` `int248[${string}]` ``]: `undefined`; - \[`key`: `` `int256[${string}]` ``]: `undefined`; - \[`key`: `` `uint[${string}]` ``]: `undefined`; - \[`key`: `` `uint8[${string}]` ``]: `undefined`; - \[`key`: `` `uint16[${string}]` ``]: `undefined`; - \[`key`: `` `uint24[${string}]` ``]: `undefined`; - \[`key`: `` `uint32[${string}]` ``]: `undefined`; - \[`key`: `` `uint40[${string}]` ``]: `undefined`; - \[`key`: `` `uint48[${string}]` ``]: `undefined`; - \[`key`: `` `uint56[${string}]` ``]: `undefined`; - \[`key`: `` `uint64[${string}]` ``]: `undefined`; - \[`key`: `` `uint72[${string}]` ``]: `undefined`; - \[`key`: `` `uint80[${string}]` ``]: `undefined`; - \[`key`: `` `uint88[${string}]` ``]: `undefined`; - \[`key`: `` `uint96[${string}]` ``]: `undefined`; - \[`key`: `` `uint104[${string}]` ``]: `undefined`; - \[`key`: `` `uint112[${string}]` ``]: `undefined`; - \[`key`: `` `uint120[${string}]` ``]: `undefined`; - \[`key`: `` `uint128[${string}]` ``]: `undefined`; - \[`key`: `` `uint136[${string}]` ``]: `undefined`; - \[`key`: `` `uint144[${string}]` ``]: `undefined`; - \[`key`: `` `uint152[${string}]` ``]: `undefined`; - \[`key`: `` `uint160[${string}]` ``]: `undefined`; - \[`key`: `` `uint168[${string}]` ``]: `undefined`; - \[`key`: `` `uint176[${string}]` ``]: `undefined`; - \[`key`: `` `uint184[${string}]` ``]: `undefined`; - \[`key`: `` `uint192[${string}]` ``]: `undefined`; - \[`key`: `` `uint200[${string}]` ``]: `undefined`; - \[`key`: `` `uint208[${string}]` ``]: `undefined`; - \[`key`: `` `uint216[${string}]` ``]: `undefined`; - \[`key`: `` `uint224[${string}]` ``]: `undefined`; - \[`key`: `` `uint232[${string}]` ``]: `undefined`; - \[`key`: `` `uint240[${string}]` ``]: `undefined`; - \[`key`: `` `uint248[${string}]` ``]: `undefined`; - \[`key`: `` `uint256[${string}]` ``]: `undefined`; - `string?`: `undefined`; - `address?`: `undefined`; - `bool?`: `undefined`; - `bytes?`: `undefined`; - `bytes1?`: `undefined`; - `bytes2?`: `undefined`; - `bytes3?`: `undefined`; - `bytes4?`: `undefined`; - `bytes5?`: `undefined`; - `bytes6?`: `undefined`; - `bytes7?`: `undefined`; - `bytes8?`: `undefined`; - `bytes9?`: `undefined`; - `bytes10?`: `undefined`; - `bytes11?`: `undefined`; - `bytes12?`: `undefined`; - `bytes13?`: `undefined`; - `bytes14?`: `undefined`; - `bytes15?`: `undefined`; - `bytes16?`: `undefined`; - `bytes17?`: `undefined`; - `bytes18?`: `undefined`; - `bytes19?`: `undefined`; - `bytes20?`: `undefined`; - `bytes21?`: `undefined`; - `bytes22?`: `undefined`; - `bytes23?`: `undefined`; - `bytes24?`: `undefined`; - `bytes25?`: `undefined`; - `bytes26?`: `undefined`; - `bytes27?`: `undefined`; - `bytes28?`: `undefined`; - `bytes29?`: `undefined`; - `bytes30?`: `undefined`; - `bytes31?`: `undefined`; - `bytes32?`: `undefined`; - `int8?`: `undefined`; - `int16?`: `undefined`; - `int24?`: `undefined`; - `int32?`: `undefined`; - `int40?`: `undefined`; - `int48?`: `undefined`; - `int56?`: `undefined`; - `int64?`: `undefined`; - `int72?`: `undefined`; - `int80?`: `undefined`; - `int88?`: `undefined`; - `int96?`: `undefined`; - `int104?`: `undefined`; - `int112?`: `undefined`; - `int120?`: `undefined`; - `int128?`: `undefined`; - `int136?`: `undefined`; - `int144?`: `undefined`; - `int152?`: `undefined`; - `int160?`: `undefined`; - `int168?`: `undefined`; - `int176?`: `undefined`; - `int184?`: `undefined`; - `int192?`: `undefined`; - `int200?`: `undefined`; - `int208?`: `undefined`; - `int216?`: `undefined`; - `int224?`: `undefined`; - `int232?`: `undefined`; - `int240?`: `undefined`; - `int248?`: `undefined`; - `int256?`: `undefined`; - `uint8?`: `undefined`; - `uint16?`: `undefined`; - `uint24?`: `undefined`; - `uint32?`: `undefined`; - `uint40?`: `undefined`; - `uint48?`: `undefined`; - `uint56?`: `undefined`; - `uint64?`: `undefined`; - `uint72?`: `undefined`; - `uint80?`: `undefined`; - `uint88?`: `undefined`; - `uint96?`: `undefined`; - `uint104?`: `undefined`; - `uint112?`: `undefined`; - `uint120?`: `undefined`; - `uint128?`: `undefined`; - `uint136?`: `undefined`; - `uint144?`: `undefined`; - `uint152?`: `undefined`; - `uint160?`: `undefined`; - `uint168?`: `undefined`; - `uint176?`: `undefined`; - `uint184?`: `undefined`; - `uint192?`: `undefined`; - `uint200?`: `undefined`; - `uint208?`: `undefined`; - `uint216?`: `undefined`; - `uint224?`: `undefined`; - `uint232?`: `undefined`; - `uint240?`: `undefined`; - `uint248?`: `undefined`; - `uint256?`: `undefined`; - } - | `Record`\<`string`, `unknown`> - - ‐ -
- `TPrimaryType` *extends* `string` | `number` | `symbol` - - keyof `TTypedData` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`TypedDataDefinition`](https://viem.sh)\<`TTypedData`, `TPrimaryType`> - - The parameters defining the typed data and primary type -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -A promise that resolves to the signed data in hexadecimal format - -#### Implementation of - -[`SmartAccountSigner`](../interfaces/SmartAccountSigner).[`signTypedData`](../interfaces/SmartAccountSigner#signtypeddata) - ---- - -### generatePrivateKeySigner() - -```ts -static generatePrivateKeySigner(): LocalAccountSigner<{ -}>; -``` - -Defined in: [aa-sdk/core/src/signer/local-account.ts:200](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L200) - -Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`. - -#### Example - -```ts -import { LocalAccountSigner } from "@aa-sdk/core"; - -const signer = LocalAccountSigner.generatePrivateKeySigner(); -``` - -#### Returns - -`LocalAccountSigner`\<\{ -}> - -A `LocalAccountSigner` instance initialized with the generated private key account - ---- - -### mnemonicToAccountSigner() - -```ts -static mnemonicToAccountSigner(key, opts?): LocalAccountSigner<{ -}>; -``` - -Defined in: [aa-sdk/core/src/signer/local-account.ts:159](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L159) - -Creates a LocalAccountSigner using the provided mnemonic key and optional HD options. - -#### Example - -```ts -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generateMnemonic } from "viem"; - -const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic()); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `key` - - `string` - - The mnemonic key to derive the account from. -
- `opts?` - - [`HDOptions`](https://viem.sh) - - Optional HD options for deriving the account. -
- -#### Returns - -`LocalAccountSigner`\<\{ -}> - -A LocalAccountSigner object for the derived account. - ---- - -### privateKeyToAccountSigner() - -```ts -static privateKeyToAccountSigner(key): LocalAccountSigner<{ -}>; -``` - -Defined in: [aa-sdk/core/src/signer/local-account.ts:181](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/local-account.ts#L181) - -Creates a `LocalAccountSigner` instance using the provided private key. - -#### Example - -```ts -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem"; - -const signer = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `key` - - `` `0x${string}` `` - - The private key in hexadecimal format -
- -#### Returns - -`LocalAccountSigner`\<\{ -}> - -An instance of `LocalAccountSigner` initialized with the provided private key diff --git a/docs/pages/reference/aa-sdk/core/src/classes/Logger.mdx b/docs/pages/reference/aa-sdk/core/src/classes/Logger.mdx deleted file mode 100644 index dc2762b894..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/Logger.mdx +++ /dev/null @@ -1,507 +0,0 @@ ---- -title: Logger -description: Logger class provides static methods for logging at different levels such as error, warn, debug, info, and verbose. This class allows setting log levels and log filters to control the logging behavior. -slug: wallets/reference/aa-sdk/core/classes/Logger -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/logger.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L13) - -Logger class provides static methods for logging at different levels such as error, warn, debug, info, and verbose. This class allows setting log levels and log filters to control the logging behavior. - -## Constructors - -### Constructor - -```ts -new Logger(): Logger; -``` - -#### Returns - -`Logger` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `logFilter?` - - `string` - - `undefined` -
- `logLevel` - - [`LogLevel`](../enumerations/LogLevel) - - `LogLevel.INFO` -
- -## Methods - -### debug() - -```ts -static debug(msg, ...args): void; -``` - -Defined in: [aa-sdk/core/src/logger.ts:99](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L99) - -Logs a debug message to the console if the log level allows it. - -#### Example - -```ts -import { Logger } from "@aa-sdk/core"; - -Logger.debug("Something is happening"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `string` - - The message to log -
- ...`args` - - `any`\[] - - Additional arguments to pass to the console.debug method -
- -#### Returns - -`void` - ---- - -### error() - -```ts -static error(msg, ...args): void; -``` - -Defined in: [aa-sdk/core/src/logger.ts:61](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L61) - -Logs an error message to the console if the logging condition is met. - -#### Example - -```ts -import { Logger } from "@aa-sdk/core"; - -Logger.error("An error occurred while processing the request"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `string` - - The primary error message to be logged -
- ...`args` - - `any`\[] - - Additional arguments to be logged along with the error message -
- -#### Returns - -`void` - ---- - -### info() - -```ts -static info(msg, ...args): void; -``` - -Defined in: [aa-sdk/core/src/logger.ts:118](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L118) - -Logs an informational message to the console if the logging level is set to INFO. - -#### Example - -```ts -import { Logger } from "@aa-sdk/core"; - -Logger.info("Something is happening"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `string` - - the message to log -
- ...`args` - - `any`\[] - - additional arguments to log alongside the message -
- -#### Returns - -`void` - ---- - -### setLogFilter() - -```ts -static setLogFilter(pattern): void; -``` - -Defined in: [aa-sdk/core/src/logger.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L44) - -Sets the log filter pattern. - -#### Example - -```ts -import { Logger } from "@aa-sdk/core"; - -Logger.setLogFilter("error"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `pattern` - - `string` - - The pattern to set as the log filter -
- -#### Returns - -`void` - ---- - -### setLogLevel() - -```ts -static setLogLevel(logLevel): void; -``` - -Defined in: [aa-sdk/core/src/logger.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L28) - -Sets the log level for logging purposes. - -#### Example - -```ts -import { Logger, LogLevel } from "@aa-sdk/core"; -Logger.setLogLevel(LogLevel.DEBUG); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `logLevel` - - [`LogLevel`](../enumerations/LogLevel) - - The desired log level -
- -#### Returns - -`void` - ---- - -### verbose() - -```ts -static verbose(msg, ...args): void; -``` - -Defined in: [aa-sdk/core/src/logger.ts:137](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L137) - -Logs a message with additional arguments if the logging level permits it. - -#### Example - -```ts -import { Logger } from "@aa-sdk/core"; - -Logger.verbose("Something is happening"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `string` - - The message to log -
- ...`args` - - `any`\[] - - Additional arguments to be logged -
- -#### Returns - -`void` - ---- - -### warn() - -```ts -static warn(msg, ...args): void; -``` - -Defined in: [aa-sdk/core/src/logger.ts:80](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L80) - -Logs a warning message if the logging conditions are met. - -#### Example - -```ts -import { Logger } from "@aa-sdk/core"; - -Logger.warn("Careful..."); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `string` - - The message to log as a warning -
- ...`args` - - `any`\[] - - Additional parameters to log along with the message -
- -#### Returns - -`void` diff --git a/docs/pages/reference/aa-sdk/core/src/classes/NotAModularAccountV2Error.mdx b/docs/pages/reference/aa-sdk/core/src/classes/NotAModularAccountV2Error.mdx deleted file mode 100644 index f7a567ddde..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/NotAModularAccountV2Error.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: NotAModularAccountV2Error -description: This error is thrown when an account is not a Modular Account V2 -slug: wallets/reference/aa-sdk/core/classes/NotAModularAccountV2Error -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L24) - -This error is thrown when an account is not a Modular Account V2 - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new NotAModularAccountV2Error(): NotAModularAccountV2Error; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L29) - -Constructor for initializing an error message indicating that the account is not a Modular Account V2. - -#### Returns - -`NotAModularAccountV2Error` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"NotAModularAccountV2Error"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/SignTransactionNotSupportedError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/SignTransactionNotSupportedError.mdx deleted file mode 100644 index af5604e4d8..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/SignTransactionNotSupportedError.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: SignTransactionNotSupportedError -description: Error thrown when attempting to sign a transaction that is not supported by smart contracts. -slug: wallets/reference/aa-sdk/core/classes/SignTransactionNotSupportedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L90) - -Error thrown when attempting to sign a transaction that is not supported by smart contracts. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new SignTransactionNotSupportedError(): SignTransactionNotSupportedError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:97](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L97) - -Throws an error indicating that signing a transaction is not supported by smart contracts. - -#### Returns - -`SignTransactionNotSupportedError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"SignTransactionNotSupported"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/SmartAccountWithSignerRequiredError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/SmartAccountWithSignerRequiredError.mdx deleted file mode 100644 index ccc64f5ef4..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/SmartAccountWithSignerRequiredError.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: SmartAccountWithSignerRequiredError -description: Error class indicating that a smart account operation requires a signer. -slug: wallets/reference/aa-sdk/core/classes/SmartAccountWithSignerRequiredError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:187](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L187) - -Error class indicating that a smart account operation requires a signer. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new SmartAccountWithSignerRequiredError(): SmartAccountWithSignerRequiredError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:192](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L192) - -Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer. - -#### Returns - -`SmartAccountWithSignerRequiredError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"SmartAccountWithSignerRequiredError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/TraceHeader.mdx b/docs/pages/reference/aa-sdk/core/src/classes/TraceHeader.mdx deleted file mode 100644 index ca0a349e50..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/TraceHeader.mdx +++ /dev/null @@ -1,355 +0,0 @@ ---- -title: TraceHeader -description: Some tools that are useful when dealing with the values of the trace header. Follows the W3C trace context standard. -slug: wallets/reference/aa-sdk/core/classes/TraceHeader -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L31) - -Some tools that are useful when dealing with the values -of the trace header. Follows the W3C trace context standard. - -## See - -https://www.w3.org/TR/trace-context/ - -## Constructors - -### Constructor - -```ts -new TraceHeader( - traceId, - parentId, - traceFlags, - traceState): TraceHeader; -``` - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L45) - -Initializes a new instance with the provided trace identifiers and state information. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `traceId` - - `string` - - The unique identifier for the trace -
- `parentId` - - `string` - - The identifier of the parent trace -
- `traceFlags` - - `string` - - Flags containing trace-related options -
- `traceState` - - `Record`\<`string`, `string`> - - The trace state information for additional trace context -
- -#### Returns - -`TraceHeader` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `parentId` - - `string` -
- `traceFlags` - - `string` -
- `traceId` - - `string` -
- `traceState` - - `Record`\<`string`, `string`> -
- -## Methods - -### toTraceHeader() - -```ts -toTraceHeader(): object; -``` - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:126](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L126) - -Should be able to convert the trace header to the format that is used in the headers of an http request - -#### Example - -```ts -const traceHeader = - TraceHeader.fromTraceHeader(headers) || TraceHeader.default(); -const headers = traceHeader.toTraceHeader(); -``` - -#### Returns - -`object` - -The trace header in the format of a record, used in our http client - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `traceparent` - - `` `00-${string}-${string}-${string}` `` -
- `tracestate` - - `string` -
- ---- - -### withEvent() - -```ts -withEvent(eventName): TraceHeader; -``` - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:149](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L149) - -Should be able to create a new trace header with a new event in the trace state, -as the key of the eventName as breadcrumbs appending onto previous breadcrumbs with the - infix if exists. And the -trace parent gets updated as according to the docs - -#### Example - -```ts -const traceHeader = - TraceHeader.fromTraceHeader(headers) || TraceHeader.default(); -const newTraceHeader = traceHeader.withEvent("newEvent"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `eventName` - - `string` - - The key of the new event -
- -#### Returns - -`TraceHeader` - -The new trace header - ---- - -### default() - -```ts -static default(): TraceHeader; -``` - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:67](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L67) - -Creating a default trace id that is a random setup for both trace id and parent id - -#### Example - -```ts -const traceHeader = - TraceHeader.fromTraceHeader(headers) || TraceHeader.default(); -``` - -#### Returns - -`TraceHeader` - -A default trace header - ---- - -### fromTraceHeader() - -```ts -static fromTraceHeader(headers): undefined | TraceHeader; -``` - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L86) - -Should be able to consume a trace header from the headers of an http request - -#### Example - -```ts -const traceHeader = TraceHeader.fromTraceHeader(headers); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `headers` - - `Record`\<`string`, `string`> - - The headers from the http request -
- -#### Returns - -`undefined` | `TraceHeader` - -The trace header object, or nothing if not found diff --git a/docs/pages/reference/aa-sdk/core/src/classes/TransactionMissingToParamError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/TransactionMissingToParamError.mdx deleted file mode 100644 index 61ec508ba1..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/TransactionMissingToParamError.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: TransactionMissingToParamError -description: Error thrown when a transaction is missing the `to` address parameter. This class extends the `BaseError` class. -slug: wallets/reference/aa-sdk/core/classes/TransactionMissingToParamError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/transaction.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/transaction.ts#L7) - -Error thrown when a transaction is missing the `to` address parameter. This class extends the `BaseError` class. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new TransactionMissingToParamError(): TransactionMissingToParamError; -``` - -Defined in: [aa-sdk/core/src/errors/transaction.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/transaction.ts#L12) - -Throws an error indicating that a transaction is missing the `to` address in the request. - -#### Returns - -`TransactionMissingToParamError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"TransactionMissingToParamError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/UpgradeToAndCallNotSupportedError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/UpgradeToAndCallNotSupportedError.mdx deleted file mode 100644 index da611c3412..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/UpgradeToAndCallNotSupportedError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: UpgradeToAndCallNotSupportedError -description: Represents an error that occurs when an attempt is made to call `UpgradeToAndCall` on an account type that does not support it. Includes the account type in the error message. -slug: wallets/reference/aa-sdk/core/classes/UpgradeToAndCallNotSupportedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:154](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L154) - -Represents an error that occurs when an attempt is made to call `UpgradeToAndCall` on an account type that does not support it. Includes the account type in the error message. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new UpgradeToAndCallNotSupportedError(accountType): UpgradeToAndCallNotSupportedError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:162](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L162) - -Constructs an error message indicating that `UpgradeToAndCall` is not supported by the specified account type. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `accountType` - - `string` - - The type of account that does not support `UpgradeToAndCall` -
- -#### Returns - -`UpgradeToAndCallNotSupportedError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"UpgradeToAndCallNotSupportedError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/UpgradesNotSupportedError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/UpgradesNotSupportedError.mdx deleted file mode 100644 index 41e65491ce..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/UpgradesNotSupportedError.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: UpgradesNotSupportedError -description: An error class representing the condition where upgrades are not supported for a specific account type. This error extends the `BaseError` class and provides a custom error message based on the account type. -slug: wallets/reference/aa-sdk/core/classes/UpgradesNotSupportedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/account.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L74) - -An error class representing the condition where upgrades are not supported for a specific account type. This error extends the `BaseError` class and provides a custom error message based on the account type. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new UpgradesNotSupportedError(accountType): UpgradesNotSupportedError; -``` - -Defined in: [aa-sdk/core/src/errors/account.ts:82](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/account.ts#L82) - -Error constructor for indicating that upgrades are not supported by the given account type. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `accountType` - - `string` - - The type of account that does not support upgrades -
- -#### Returns - -`UpgradesNotSupportedError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"UpgradesNotSupported"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/WaitForUserOperationError.mdx b/docs/pages/reference/aa-sdk/core/src/classes/WaitForUserOperationError.mdx deleted file mode 100644 index a080b8f163..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/WaitForUserOperationError.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -title: WaitForUserOperationError -description: Error thrown when waiting for user operation request to be mined. Includes the internal error as well as the request that failed. This request can then be used with dropAndReplaceUserOperation to retry the operation. -slug: wallets/reference/aa-sdk/core/classes/WaitForUserOperationError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/errors/useroperation.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/useroperation.ts#L45) - -Error thrown when waiting for user operation request to be mined. - -Includes the internal error as well as the request that failed. This request -can then be used with dropAndReplaceUserOperation to retry the operation. - -## Extends - -- [`BaseError`](BaseError) - -## Constructors - -### Constructor - -```ts -new WaitForUserOperationError(request, error): WaitForUserOperationError; -``` - -Defined in: [aa-sdk/core/src/errors/useroperation.ts:50](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/errors/useroperation.ts#L50) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `request` - - [`UserOperationRequest`](../type-aliases/UserOperationRequest) - - the user operation request that failed -
- `error` - - `Error` - - the underlying error that caused the failure -
- -#### Returns - -`WaitForUserOperationError` - -#### Overrides - -[`BaseError`](BaseError).[`constructor`](BaseError#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault valueDescription
- `name` - - `string` - - `"AASDKError"` - - ‐ -
- `request` - - [`UserOperationRequest`](../type-aliases/UserOperationRequest) - - `undefined` - - the user operation request that failed -
- `version` - - `string` - - `VERSION` - - ‐ -
diff --git a/docs/pages/reference/aa-sdk/core/src/classes/WalletClientSigner.mdx b/docs/pages/reference/aa-sdk/core/src/classes/WalletClientSigner.mdx deleted file mode 100644 index 663398f00f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/classes/WalletClientSigner.mdx +++ /dev/null @@ -1,577 +0,0 @@ ---- -title: WalletClientSigner -description: Represents a wallet client signer for smart accounts, providing methods to get the address, sign messages, sign typed data, and sign 7702 authorizations. -slug: wallets/reference/aa-sdk/core/classes/WalletClientSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/signer/wallet-client.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/wallet-client.ts#L18) - -Represents a wallet client signer for smart accounts, providing methods to get the address, sign messages, sign typed data, and sign 7702 authorizations. - -## Implements - -- `unknown`\<[`WalletClient`](https://viem.sh)> - -## Constructors - -### Constructor - -```ts -new WalletClientSigner(client, signerType): WalletClientSigner; -``` - -Defined in: [aa-sdk/core/src/signer/wallet-client.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/wallet-client.ts#L43) - -Initializes a signer with a given wallet client and signer type. - -#### Example - -```ts -import { WalletClientSigner } from "@aa-sdk/core"; -import { createWalletClient, custom } from "viem"; -import { mainnet } from "viem/chains"; - -const client = createWalletClient({ - chain: mainnet, - transport: custom(window.ethereum!), -}); - -const signer = new WalletClientSigner(client, "wallet"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `Object` - - The wallet client to interact with -
- `signerType` - - `string` - - The type of signer; must be a valid signer type, otherwise an error will be thrown -
- -#### Returns - -`WalletClientSigner` - -#### Throws - -If the signer type is invalid - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `getAddress` - - () => `Promise`\<`` `0x${string}` ``> - - Asynchronously retrieves addresses from the inner object and returns the first address after applying the `getAddress` function. - - **Example** - - ```ts - import { WalletClientSigner } from "@aa-sdk/core"; - import { createWalletClient, custom } from 'viem' - import { mainnet } from 'viem/chains' - - const client = createWalletClient({ - chain: mainnet, - transport: custom(window.ethereum!) - }); - - const signer = new WalletClientSigner(client, 'wallet'); - console.log(await signer.getAddress()); - ``` -
- `inner` - - `Object` - - ‐ -
- `signerType` - - `string` - - ‐ -
- `signMessage` - - (`message`) => `Promise`\<`` `0x${string}` ``> - - Signs a message using the account's signing method. - - **Example** - - ```ts - import { WalletClientSigner } from "@aa-sdk/core"; - import { createWalletClient, custom } from 'viem' - import { mainnet } from 'viem/chains' - - const client = createWalletClient({ - chain: mainnet, - transport: custom(window.ethereum!) - }); - - const signer = new WalletClientSigner(client, 'wallet'); - console.log(await signer.signMessage("hello")); - ``` -
- -## Methods - -### signAuthorization() - -```ts -signAuthorization(unsignedAuthorization): Promise>; -``` - -Defined in: [aa-sdk/core/src/signer/wallet-client.ts:173](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/wallet-client.ts#L173) - -Signs an EIP-7702 Authorization - -#### Example - -```ts twoslash -import { WalletClientSigner } from "@aa-sdk/core"; -import { createWalletClient, custom } from "viem"; -import { mainnet } from "viem/chains"; - -const client = createWalletClient({ - chain: mainnet, - transport: custom(window.ethereum!), -}); - -const signer = new WalletClientSigner(client, "wallet"); - -const authorization = await signer.signAuthorization({ - contractAddress: "0x1234123412341234123412341234123412341234", - chainId: 1, - nonce: 0, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `unsignedAuthorization` - - `AuthorizationRequest`\<`number`> - - the authorization to be signed -
- -#### Returns - -`Promise`\<[`SignedAuthorization`](https://viem.sh)\<`number`>> - -a promise that resolves to the signed authorization - ---- - -### signTypedData() - -```ts -signTypedData(typedData): Promise<`0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/signer/wallet-client.ts:131](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/wallet-client.ts#L131) - -Signs the provided typed data using the account's private key. - -#### Example - -```ts -import { WalletClientSigner } from "@aa-sdk/core"; -import { createWalletClient, custom } from "viem"; -import { mainnet } from "viem/chains"; - -const client = createWalletClient({ - chain: mainnet, - transport: custom(window.ethereum!), -}); - -const signer = new WalletClientSigner(client, "wallet"); -console.log( - await signer.signTypedData({ - types: { - Message: [{ name: "content", type: "string" }], - }, - primaryType: "Message", - message: { content: "Hello" }, - }), -); -``` - -#### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTypedData` *extends* - | \{ - \[`key`: `string`]: readonly [`TypedDataParameter`](https://abitype.dev)\[]; - \[`key`: `` `string[${string}]` ``]: `undefined`; - \[`key`: `` `function[${string}]` ``]: `undefined`; - \[`key`: `` `address[${string}]` ``]: `undefined`; - \[`key`: `` `bool[${string}]` ``]: `undefined`; - \[`key`: `` `bytes[${string}]` ``]: `undefined`; - \[`key`: `` `bytes1[${string}]` ``]: `undefined`; - \[`key`: `` `bytes2[${string}]` ``]: `undefined`; - \[`key`: `` `bytes3[${string}]` ``]: `undefined`; - \[`key`: `` `bytes4[${string}]` ``]: `undefined`; - \[`key`: `` `bytes5[${string}]` ``]: `undefined`; - \[`key`: `` `bytes6[${string}]` ``]: `undefined`; - \[`key`: `` `bytes7[${string}]` ``]: `undefined`; - \[`key`: `` `bytes8[${string}]` ``]: `undefined`; - \[`key`: `` `bytes9[${string}]` ``]: `undefined`; - \[`key`: `` `bytes10[${string}]` ``]: `undefined`; - \[`key`: `` `bytes11[${string}]` ``]: `undefined`; - \[`key`: `` `bytes12[${string}]` ``]: `undefined`; - \[`key`: `` `bytes13[${string}]` ``]: `undefined`; - \[`key`: `` `bytes14[${string}]` ``]: `undefined`; - \[`key`: `` `bytes15[${string}]` ``]: `undefined`; - \[`key`: `` `bytes16[${string}]` ``]: `undefined`; - \[`key`: `` `bytes17[${string}]` ``]: `undefined`; - \[`key`: `` `bytes18[${string}]` ``]: `undefined`; - \[`key`: `` `bytes19[${string}]` ``]: `undefined`; - \[`key`: `` `bytes20[${string}]` ``]: `undefined`; - \[`key`: `` `bytes21[${string}]` ``]: `undefined`; - \[`key`: `` `bytes22[${string}]` ``]: `undefined`; - \[`key`: `` `bytes23[${string}]` ``]: `undefined`; - \[`key`: `` `bytes24[${string}]` ``]: `undefined`; - \[`key`: `` `bytes25[${string}]` ``]: `undefined`; - \[`key`: `` `bytes26[${string}]` ``]: `undefined`; - \[`key`: `` `bytes27[${string}]` ``]: `undefined`; - \[`key`: `` `bytes28[${string}]` ``]: `undefined`; - \[`key`: `` `bytes29[${string}]` ``]: `undefined`; - \[`key`: `` `bytes30[${string}]` ``]: `undefined`; - \[`key`: `` `bytes31[${string}]` ``]: `undefined`; - \[`key`: `` `bytes32[${string}]` ``]: `undefined`; - \[`key`: `` `int[${string}]` ``]: `undefined`; - \[`key`: `` `int8[${string}]` ``]: `undefined`; - \[`key`: `` `int16[${string}]` ``]: `undefined`; - \[`key`: `` `int24[${string}]` ``]: `undefined`; - \[`key`: `` `int32[${string}]` ``]: `undefined`; - \[`key`: `` `int40[${string}]` ``]: `undefined`; - \[`key`: `` `int48[${string}]` ``]: `undefined`; - \[`key`: `` `int56[${string}]` ``]: `undefined`; - \[`key`: `` `int64[${string}]` ``]: `undefined`; - \[`key`: `` `int72[${string}]` ``]: `undefined`; - \[`key`: `` `int80[${string}]` ``]: `undefined`; - \[`key`: `` `int88[${string}]` ``]: `undefined`; - \[`key`: `` `int96[${string}]` ``]: `undefined`; - \[`key`: `` `int104[${string}]` ``]: `undefined`; - \[`key`: `` `int112[${string}]` ``]: `undefined`; - \[`key`: `` `int120[${string}]` ``]: `undefined`; - \[`key`: `` `int128[${string}]` ``]: `undefined`; - \[`key`: `` `int136[${string}]` ``]: `undefined`; - \[`key`: `` `int144[${string}]` ``]: `undefined`; - \[`key`: `` `int152[${string}]` ``]: `undefined`; - \[`key`: `` `int160[${string}]` ``]: `undefined`; - \[`key`: `` `int168[${string}]` ``]: `undefined`; - \[`key`: `` `int176[${string}]` ``]: `undefined`; - \[`key`: `` `int184[${string}]` ``]: `undefined`; - \[`key`: `` `int192[${string}]` ``]: `undefined`; - \[`key`: `` `int200[${string}]` ``]: `undefined`; - \[`key`: `` `int208[${string}]` ``]: `undefined`; - \[`key`: `` `int216[${string}]` ``]: `undefined`; - \[`key`: `` `int224[${string}]` ``]: `undefined`; - \[`key`: `` `int232[${string}]` ``]: `undefined`; - \[`key`: `` `int240[${string}]` ``]: `undefined`; - \[`key`: `` `int248[${string}]` ``]: `undefined`; - \[`key`: `` `int256[${string}]` ``]: `undefined`; - \[`key`: `` `uint[${string}]` ``]: `undefined`; - \[`key`: `` `uint8[${string}]` ``]: `undefined`; - \[`key`: `` `uint16[${string}]` ``]: `undefined`; - \[`key`: `` `uint24[${string}]` ``]: `undefined`; - \[`key`: `` `uint32[${string}]` ``]: `undefined`; - \[`key`: `` `uint40[${string}]` ``]: `undefined`; - \[`key`: `` `uint48[${string}]` ``]: `undefined`; - \[`key`: `` `uint56[${string}]` ``]: `undefined`; - \[`key`: `` `uint64[${string}]` ``]: `undefined`; - \[`key`: `` `uint72[${string}]` ``]: `undefined`; - \[`key`: `` `uint80[${string}]` ``]: `undefined`; - \[`key`: `` `uint88[${string}]` ``]: `undefined`; - \[`key`: `` `uint96[${string}]` ``]: `undefined`; - \[`key`: `` `uint104[${string}]` ``]: `undefined`; - \[`key`: `` `uint112[${string}]` ``]: `undefined`; - \[`key`: `` `uint120[${string}]` ``]: `undefined`; - \[`key`: `` `uint128[${string}]` ``]: `undefined`; - \[`key`: `` `uint136[${string}]` ``]: `undefined`; - \[`key`: `` `uint144[${string}]` ``]: `undefined`; - \[`key`: `` `uint152[${string}]` ``]: `undefined`; - \[`key`: `` `uint160[${string}]` ``]: `undefined`; - \[`key`: `` `uint168[${string}]` ``]: `undefined`; - \[`key`: `` `uint176[${string}]` ``]: `undefined`; - \[`key`: `` `uint184[${string}]` ``]: `undefined`; - \[`key`: `` `uint192[${string}]` ``]: `undefined`; - \[`key`: `` `uint200[${string}]` ``]: `undefined`; - \[`key`: `` `uint208[${string}]` ``]: `undefined`; - \[`key`: `` `uint216[${string}]` ``]: `undefined`; - \[`key`: `` `uint224[${string}]` ``]: `undefined`; - \[`key`: `` `uint232[${string}]` ``]: `undefined`; - \[`key`: `` `uint240[${string}]` ``]: `undefined`; - \[`key`: `` `uint248[${string}]` ``]: `undefined`; - \[`key`: `` `uint256[${string}]` ``]: `undefined`; - `string?`: `undefined`; - `address?`: `undefined`; - `bool?`: `undefined`; - `bytes?`: `undefined`; - `bytes1?`: `undefined`; - `bytes2?`: `undefined`; - `bytes3?`: `undefined`; - `bytes4?`: `undefined`; - `bytes5?`: `undefined`; - `bytes6?`: `undefined`; - `bytes7?`: `undefined`; - `bytes8?`: `undefined`; - `bytes9?`: `undefined`; - `bytes10?`: `undefined`; - `bytes11?`: `undefined`; - `bytes12?`: `undefined`; - `bytes13?`: `undefined`; - `bytes14?`: `undefined`; - `bytes15?`: `undefined`; - `bytes16?`: `undefined`; - `bytes17?`: `undefined`; - `bytes18?`: `undefined`; - `bytes19?`: `undefined`; - `bytes20?`: `undefined`; - `bytes21?`: `undefined`; - `bytes22?`: `undefined`; - `bytes23?`: `undefined`; - `bytes24?`: `undefined`; - `bytes25?`: `undefined`; - `bytes26?`: `undefined`; - `bytes27?`: `undefined`; - `bytes28?`: `undefined`; - `bytes29?`: `undefined`; - `bytes30?`: `undefined`; - `bytes31?`: `undefined`; - `bytes32?`: `undefined`; - `int8?`: `undefined`; - `int16?`: `undefined`; - `int24?`: `undefined`; - `int32?`: `undefined`; - `int40?`: `undefined`; - `int48?`: `undefined`; - `int56?`: `undefined`; - `int64?`: `undefined`; - `int72?`: `undefined`; - `int80?`: `undefined`; - `int88?`: `undefined`; - `int96?`: `undefined`; - `int104?`: `undefined`; - `int112?`: `undefined`; - `int120?`: `undefined`; - `int128?`: `undefined`; - `int136?`: `undefined`; - `int144?`: `undefined`; - `int152?`: `undefined`; - `int160?`: `undefined`; - `int168?`: `undefined`; - `int176?`: `undefined`; - `int184?`: `undefined`; - `int192?`: `undefined`; - `int200?`: `undefined`; - `int208?`: `undefined`; - `int216?`: `undefined`; - `int224?`: `undefined`; - `int232?`: `undefined`; - `int240?`: `undefined`; - `int248?`: `undefined`; - `int256?`: `undefined`; - `uint8?`: `undefined`; - `uint16?`: `undefined`; - `uint24?`: `undefined`; - `uint32?`: `undefined`; - `uint40?`: `undefined`; - `uint48?`: `undefined`; - `uint56?`: `undefined`; - `uint64?`: `undefined`; - `uint72?`: `undefined`; - `uint80?`: `undefined`; - `uint88?`: `undefined`; - `uint96?`: `undefined`; - `uint104?`: `undefined`; - `uint112?`: `undefined`; - `uint120?`: `undefined`; - `uint128?`: `undefined`; - `uint136?`: `undefined`; - `uint144?`: `undefined`; - `uint152?`: `undefined`; - `uint160?`: `undefined`; - `uint168?`: `undefined`; - `uint176?`: `undefined`; - `uint184?`: `undefined`; - `uint192?`: `undefined`; - `uint200?`: `undefined`; - `uint208?`: `undefined`; - `uint216?`: `undefined`; - `uint224?`: `undefined`; - `uint232?`: `undefined`; - `uint240?`: `undefined`; - `uint248?`: `undefined`; - `uint256?`: `undefined`; - } - | `Record`\<`string`, `unknown`> - - ‐ -
- `TPrimaryType` *extends* `string` | `number` | `symbol` - - `string` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `typedData` - - [`TypedDataDefinition`](https://viem.sh)\<`TTypedData`, `TPrimaryType`> - - The typed data to be signed -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -A promise that resolves to a hex string representing the signed data diff --git a/docs/pages/reference/aa-sdk/core/src/enumerations/DeploymentState.mdx b/docs/pages/reference/aa-sdk/core/src/enumerations/DeploymentState.mdx deleted file mode 100644 index 4099b9f738..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/enumerations/DeploymentState.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: DeploymentState -description: Overview of DeploymentState -slug: wallets/reference/aa-sdk/core/enumerations/DeploymentState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L43) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValue
- `DEPLOYED` - - `"0x2"` -
- `NOT_DEPLOYED` - - `"0x1"` -
- `UNDEFINED` - - `"0x0"` -
diff --git a/docs/pages/reference/aa-sdk/core/src/enumerations/LogLevel.mdx b/docs/pages/reference/aa-sdk/core/src/enumerations/LogLevel.mdx deleted file mode 100644 index 4a69c3417a..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/enumerations/LogLevel.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: LogLevel -description: Overview of LogLevel -slug: wallets/reference/aa-sdk/core/enumerations/LogLevel -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/logger.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/logger.ts#L1) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValue
- `DEBUG` - - `4` -
- `ERROR` - - `1` -
- `INFO` - - `3` -
- `NONE` - - `0` -
- `VERBOSE` - - `5` -
- `WARN` - - `2` -
diff --git a/docs/pages/reference/aa-sdk/core/src/enumerations/RoundingMode.mdx b/docs/pages/reference/aa-sdk/core/src/enumerations/RoundingMode.mdx deleted file mode 100644 index 58a16602b0..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/enumerations/RoundingMode.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: RoundingMode -description: Overview of RoundingMode -slug: wallets/reference/aa-sdk/core/enumerations/RoundingMode -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/utils/bigint.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bigint.ts#L65) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValue
- `ROUND_DOWN` - - `0` -
- `ROUND_UP` - - `1` -
diff --git a/docs/pages/reference/aa-sdk/core/src/functions/allEqual.mdx b/docs/pages/reference/aa-sdk/core/src/functions/allEqual.mdx deleted file mode 100644 index a4f0415c91..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/allEqual.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: allEqual -description: Overview of the allEqual function -slug: wallets/reference/aa-sdk/core/functions/allEqual -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function allEqual(...params): boolean; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:138](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L138) - -Utility method for checking if the passed in values are all equal (strictly) - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- ...`params` - - `any`\[] - - values to check -
- -## Returns - -`boolean` - -a boolean indicating if all values are the same - -## Throws - -if no values are passed in diff --git a/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpFeeOption.mdx b/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpFeeOption.mdx deleted file mode 100644 index ef34b1fcfb..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpFeeOption.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: applyUserOpFeeOption -description: Overview of the applyUserOpFeeOption function -slug: wallets/reference/aa-sdk/core/functions/applyUserOpFeeOption -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function applyUserOpFeeOption(value, feeOption?): any; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:116](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L116) - -Utility method for applying a UserOperationFeeOptionsField value -over the current value set for the field - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TValue` *extends* `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `value` - - `TValue` - - the current value of the field -
- `feeOption?` - - `any` - - the override value to apply -
- -## Returns - -`any` - -the new value of the field after applying the override diff --git a/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpOverride.mdx b/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpOverride.mdx deleted file mode 100644 index 133207afcf..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpOverride.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: applyUserOpOverride -description: Overview of the applyUserOpOverride function -slug: wallets/reference/aa-sdk/core/functions/applyUserOpOverride -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function applyUserOpOverride(value, override?): any; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L90) - -Utility method for applying a UserOperationOverrides field value -over the current value set for the field - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TValue` *extends* `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `value` - - `TValue` - - the current value of the field -
- `override?` - - `any` - - the override value to apply -
- -## Returns - -`any` - -the new value of the field after applying the override diff --git a/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpOverrideOrFeeOption.mdx b/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpOverrideOrFeeOption.mdx deleted file mode 100644 index 8c1fa1249e..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/applyUserOpOverrideOrFeeOption.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: applyUserOpOverrideOrFeeOption -description: Overview of the applyUserOpOverrideOrFeeOption function -slug: wallets/reference/aa-sdk/core/functions/applyUserOpOverrideOrFeeOption -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function applyUserOpOverrideOrFeeOption( - value, - override?, - feeOption?, -): any; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:145](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L145) - -Utility method for applying a UserOperationOverrides field value and -a UserOperationFeeOptionsField value over the current value set for the field, -with the override taking precedence over the fee option - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TValue` *extends* `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `value` - - `TValue` - - the current value of the field -
- `override?` - - `any` - - the override value to apply -
- `feeOption?` - - `any` - - the fee option field value to apply -
- -## Returns - -`any` - -the new value of the field after applying the override or fee option diff --git a/docs/pages/reference/aa-sdk/core/src/functions/asyncPipe.mdx b/docs/pages/reference/aa-sdk/core/src/functions/asyncPipe.mdx deleted file mode 100644 index 2213d75ac7..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/asyncPipe.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: asyncPipe -description: Overview of the asyncPipe function -slug: wallets/reference/aa-sdk/core/functions/asyncPipe -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function asyncPipe(...fns): (s, o?, f?) => Promise; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L12) - -Utility function that allows for piping a series of async functions together - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - -
Type Parameter
- `S` -
- `O` -
- `F` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- ...`fns` - - (`s`, `o?`, `f?`) => `Promise`\<`S`>\[] - - functions to pipe -
- -## Returns - -result of the pipe - -```ts -( - s, - o?, - f?): Promise; -``` - -### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `s` - - `S` -
- `o?` - - `O` -
- `f?` - - `F` -
- -### Returns - -`Promise`\<`S`> diff --git a/docs/pages/reference/aa-sdk/core/src/functions/bigIntClamp.mdx b/docs/pages/reference/aa-sdk/core/src/functions/bigIntClamp.mdx deleted file mode 100644 index d445d537be..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/bigIntClamp.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: bigIntClamp -description: Overview of the bigIntClamp function -slug: wallets/reference/aa-sdk/core/functions/bigIntClamp -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function bigIntClamp(value, lower, upper): bigint; -``` - -Defined in: [aa-sdk/core/src/utils/bigint.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bigint.ts#L41) - -Given a bigint and a min-max range, returns the min-max clamped bigint value - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `value` - - `BigNumberish` - - a bigint value to clamp -
- `lower` - - `any` - - lower bound min max tuple value -
- `upper` - - `any` - - upper bound min max tuple value -
- -## Returns - -`bigint` - -the clamped bigint value per given range diff --git a/docs/pages/reference/aa-sdk/core/src/functions/bigIntMax.mdx b/docs/pages/reference/aa-sdk/core/src/functions/bigIntMax.mdx deleted file mode 100644 index ae807e9941..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/bigIntMax.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: bigIntMax -description: Overview of the bigIntMax function -slug: wallets/reference/aa-sdk/core/functions/bigIntMax -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function bigIntMax(...args): bigint; -``` - -Defined in: [aa-sdk/core/src/utils/bigint.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bigint.ts#L11) - -Returns the max bigint in a list of bigints - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- ...`args` - - `bigint`\[] - - a list of bigints to get the max of -
- -## Returns - -`bigint` - -the max bigint in the list diff --git a/docs/pages/reference/aa-sdk/core/src/functions/bigIntMin.mdx b/docs/pages/reference/aa-sdk/core/src/functions/bigIntMin.mdx deleted file mode 100644 index 3cf1e1d508..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/bigIntMin.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: bigIntMin -description: Overview of the bigIntMin function -slug: wallets/reference/aa-sdk/core/functions/bigIntMin -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function bigIntMin(...args): bigint; -``` - -Defined in: [aa-sdk/core/src/utils/bigint.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bigint.ts#L25) - -Returns the min bigint in a list of bigints - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- ...`args` - - `bigint`\[] - - a list of bigints to get the max of -
- -## Returns - -`bigint` - -the min bigint in the list diff --git a/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperation.mdx b/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperation.mdx deleted file mode 100644 index dead2e05e8..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperation.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: buildUserOperation -description: Overview of the buildUserOperation function -slug: wallets/reference/aa-sdk/core/functions/buildUserOperation -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function buildUserOperation< - TTransport, - TChain, - TAccount, - TContext, - TEntryPointVersion, ->(client_, args): Promise>; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/buildUserOperation.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/buildUserOperation.ts#L42) - -Builds a user operation using the provided client and operation parameters. Ensures that the account exists and the client is compatible. - -## Example - -```ts -import { createSmartAccountClient } from "@aa-sdk/core"; - -// smart account client is already extended with buildUserOperation -const client = createSmartAccountClient(...); -const result = await client.buildUserOperation({ - uo: { - target: "0x...", - data: "0x...", // or "0x", - value: 0n, // optional - }, - account, // only required if the client above is not connected to an account -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TContext` *extends* `any` - - `any` -
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - [`GetEntryPointFromAccount`](../type-aliases/GetEntryPointFromAccount)\<`TAccount`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - the client instance used to build the user operation -
- `args` - - `BuildUserOperationParameters`\<`TAccount`, `TContext`, `TEntryPointVersion`> - - the parameters required to build the user operation, including account, overrides, and context -
- -## Returns - -`Promise`\<[`UserOperationStruct`](../type-aliases/UserOperationStruct)\<`TEntryPointVersion`>> - -a promise that resolves to a `UserOperationStruct` object containing the built user operation details diff --git a/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTx.mdx b/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTx.mdx deleted file mode 100644 index 93f91c3be1..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTx.mdx +++ /dev/null @@ -1,205 +0,0 @@ ---- -title: buildUserOperationFromTx -description: Overview of the buildUserOperationFromTx function -slug: wallets/reference/aa-sdk/core/functions/buildUserOperationFromTx -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function buildUserOperationFromTx< - TChain, - TAccount, - TChainOverride, - TContext, - TEntryPointVersion, ->( - client_, - args, - overrides?, - context?, -): Promise>; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTx.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTx.ts#L62) - -Performs `buildUserOperationFromTx` in batch and builds into a single, yet to be signed `UserOperation` (UO) struct. The output user operation struct will be filled with all gas fields (and paymaster data if a paymaster is used) based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, `maxPriorityFeePerGas`) computed using the configured `ClientMiddlewares` on the `SmartAccountClient` - -## Example - -```ts -import type { RpcTransactionRequest } from "viem"; -import { smartAccountClient } from "./smartAccountClient"; -// [!code focus:99] -// buildUserOperationFromTx converts a traditional Ethereum transaction and returns -// the unsigned user operation struct after constructing the user operation struct -// through the middleware pipeline -const tx: RpcTransactionRequest = { - from, // ignored - to, - data: encodeFunctionData({ - abi: ContractABI.abi, - functionName: "func", - args: [arg1, arg2, ...], - }), -}; -const uoStruct = await smartAccountClient.buildUserOperationFromTx(tx); - -// signUserOperation signs the above unsigned user operation struct built -// using the account connected to the smart account client -const request = await smartAccountClient.signUserOperation({ uoStruct }); - -// You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts) -// to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the -// EntryPoint contract pointed at by the entryPoint address parameter -const entryPointAddress = client.account.getEntryPoint().address; -const uoHash = await smartAccountClient.sendRawUserOperation({ request, entryPoint: entryPointAddress }); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TChainOverride` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TContext` *extends* - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) - - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) -
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - [`GetEntryPointFromAccount`](../type-aliases/GetEntryPointFromAccount)\<`TAccount`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<[`Transport`](https://viem.sh), `TChain`, `TAccount`> - - the smart account client to use for RPC requests -
- `args` - - [`SendTransactionParameters`](https://viem.sh)\<`TChain`, `TAccount`, `TChainOverride`> - - the send tx parameters -
- `overrides?` - - [`UserOperationOverrides`](../type-aliases/UserOperationOverrides)\<`TEntryPointVersion`> - - optional overrides to use for any of the fields -
- `context?` - - `TContext` - - if the smart account client requires additinoal context for building UOs -
- -## Returns - -`Promise`\<[`UserOperationStruct`](../type-aliases/UserOperationStruct)\<`TEntryPointVersion`>> - -a Promise containing the built user operation diff --git a/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTxs.mdx b/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTxs.mdx deleted file mode 100644 index e6cbf39735..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/buildUserOperationFromTxs.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: buildUserOperationFromTxs -description: Overview of the buildUserOperationFromTxs function -slug: wallets/reference/aa-sdk/core/functions/buildUserOperationFromTxs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function buildUserOperationFromTxs< - TTransport, - TChain, - TAccount, - TEntryPointVersion, - TContext, ->( - client_, - args, -): Promise>; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTxs.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/buildUserOperationFromTxs.ts#L74) - -Performs `buildUserOperationFromTx` in batch and builds into a single, -yet to be signed `UserOperation` (UO) struct. The output user operation struct -will be filled with all gas fields (and paymaster data if a paymaster is used) -based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, -`maxPriorityFeePerGas`) computed using the configured ClientMiddlewares on the SmartAccountClient. - -## Example - -```ts -import type { RpcTransactionRequest } from "viem"; -import { smartAccountClient } from "./smartAccountClient"; - -const requests: RpcTransactionRequest[] = [ - { - from, // ignored - to, - data: encodeFunctionData({ - abi: ContractABI.abi, - functionName: "func", - args: [arg1, arg2, ...], - }), - }, - { - from, // ignored - to, - data: encodeFunctionData({ - abi: ContractABI.abi, - functionName: "func", - args: [arg1, arg2, ...], - }), - }, -]; -const uoStruct = await smartAccountClient.buildUserOperationFromTxs({ - requests, -}); - -// signUserOperation signs the above unsigned user operation struct built -// using the account connected to the smart account client -const request = await smartAccountClient.signUserOperation({ uoStruct }); - -// You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts) -// to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the -// EntryPoint contract pointed at by the entryPoint address parameter -const entryPointAddress = client.account.getEntryPoint().address; -const uoHash = await smartAccountClient.sendRawUserOperation({ - request, - entryPoint: entryPointAddress, -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `any` - - `any` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- `TContext` *extends* `any` - - `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - the smart account client to use to make RPC calls -
- `args` - - `BuildTransactionParameters`\<`TAccount`, `TContext`, `TEntryPointVersion`> - - an object containing the requests to build as well as, the account if not hoisted, the context, the overrides, and optionally a flag to enable signing of the UO via the underlying middleware -
- -## Returns - -`Promise`\<`BuildUserOperationFromTransactionsResult`\<`TEntryPointVersion`>> - -a Promise containing the built user operation diff --git a/docs/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndData.mdx b/docs/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndData.mdx deleted file mode 100644 index 274419e7eb..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndData.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: bypassPaymasterAndData -description: Overview of the bypassPaymasterAndData function -slug: wallets/reference/aa-sdk/core/functions/bypassPaymasterAndData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function bypassPaymasterAndData(overrides): boolean; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:166](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L166) - -Utility method for checking whether the middleware pipeline should -bypass the paymaster middleware for the user operation with the given overrides, -either because the UserOp is paying for its own gas, or passing a specific paymaster - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `overrides` - - `any` - - the user operation overrides to check -
- -## Returns - -`boolean` - -whether the paymaster middleware should be bypassed diff --git a/docs/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndDataEmptyHex.mdx b/docs/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndDataEmptyHex.mdx deleted file mode 100644 index 29e989a0ed..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/bypassPaymasterAndDataEmptyHex.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: bypassPaymasterAndDataEmptyHex -description: Overview of the bypassPaymasterAndDataEmptyHex function -slug: wallets/reference/aa-sdk/core/functions/bypassPaymasterAndDataEmptyHex -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function bypassPaymasterAndDataEmptyHex(overrides): boolean; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:183](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L183) - -An alternative to `bypassPaymasterAndData` which only returns true if the data parameter -is "0x," this is useful for cases when middleware should be bypassed ONLY IF the UserOp will -pay for its own gas - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `overrides` - - `any` - - the user operation overrides to check -
- -## Returns - -`boolean` - -whether the paymaster middleware should be bypassed diff --git a/docs/pages/reference/aa-sdk/core/src/functions/checkGasSponsorshipEligibility.mdx b/docs/pages/reference/aa-sdk/core/src/functions/checkGasSponsorshipEligibility.mdx deleted file mode 100644 index 4ad6dd4bc1..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/checkGasSponsorshipEligibility.mdx +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: checkGasSponsorshipEligibility -description: Overview of the checkGasSponsorshipEligibility function -slug: wallets/reference/aa-sdk/core/functions/checkGasSponsorshipEligibility -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function checkGasSponsorshipEligibility( - client_, - args, -): Promise< - CheckGasSponsorshipEligibilityResult< - TAccount, - GetEntryPointFromAccount< - TAccount, - SmartContractAccount> - > - > ->; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts#L56) - -This function verifies 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`, 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. - -## Example - -```ts -import { smartAccountClient } from "./smartAccountClient"; -// [!code focus:99] -const { eligible } = await smartAccountClient.checkGasSponsorshipEligibility({ - uo: { - data: "0xCalldata", - target: "0xTarget", - value: 0n, - }, -}); - -console.log( - `User Operation is ${ - eligible ? "eligible" : "ineligible" - } for gas sponsorship.`, -); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TContext` *extends* `any` - - `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - the smart account client to use for making RPC calls -
- `args` - - `SendUserOperationParameters`\<`TAccount`, `TContext`> - - containing the user operation, account, context, and overrides -
- -## Returns - -`Promise`\<`CheckGasSponsorshipEligibilityResult`\<`TAccount`, [`GetEntryPointFromAccount`](../type-aliases/GetEntryPointFromAccount)\<`TAccount`, [`SmartContractAccount`](../type-aliases/SmartContractAccount)\<`string`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>>>>> - -a Promise containing a boolean indicating if the account is elgibile for sponsorship and the sponsored UO diff --git a/docs/pages/reference/aa-sdk/core/src/functions/clientHeaderTrack.mdx b/docs/pages/reference/aa-sdk/core/src/functions/clientHeaderTrack.mdx deleted file mode 100644 index 0b4d259299..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/clientHeaderTrack.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: clientHeaderTrack -description: Overview of the clientHeaderTrack function -slug: wallets/reference/aa-sdk/core/functions/clientHeaderTrack -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function clientHeaderTrack(client, crumb): X; -``` - -Defined in: [aa-sdk/core/src/client/addBreadcrumb.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/addBreadcrumb.ts#L20) - -Add a crumb to the breadcrumb. - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `X` *extends* `object` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `X` - - Clients are somethings like viem, that we are adding breadcrumbs to, and could be owning the transport. Usually a alchemy client. -
- `crumb` - - `string` - - The crumb to add to the breadcrumb -
- -## Returns - -`X` - -The updated client diff --git a/docs/pages/reference/aa-sdk/core/src/functions/concatPaymasterAndData.mdx b/docs/pages/reference/aa-sdk/core/src/functions/concatPaymasterAndData.mdx deleted file mode 100644 index 9247ed3dbf..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/concatPaymasterAndData.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: concatPaymasterAndData -description: Overview of the concatPaymasterAndData function -slug: wallets/reference/aa-sdk/core/functions/concatPaymasterAndData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function concatPaymasterAndData(paymasterAndData): `0x${string}`; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:216](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L216) - -Utility method for converting the object containing the paymaster address and paymaster data -to the paymaster and data concatenated hex string - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `paymasterAndData` - - `Pick`\<`UserOperationRequest`\<`"0.7.0"`>, `"paymaster"` | `"paymasterData"`> - - the object containing the picked paymaster and paymasterData fields of - entrypoint v0.7 user operation request -
- -## Returns - -`` `0x${string}` `` - -the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field diff --git a/docs/pages/reference/aa-sdk/core/src/functions/conditionalReturn.mdx b/docs/pages/reference/aa-sdk/core/src/functions/conditionalReturn.mdx deleted file mode 100644 index 650618aabc..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/conditionalReturn.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: conditionalReturn -description: Overview of the conditionalReturn function -slug: wallets/reference/aa-sdk/core/functions/conditionalReturn -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function conditionalReturn(condition, value): Promise; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:152](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L152) - -Utility method for checking the condition and return the value if condition holds true, undefined if not. - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `condition` - - `Promise`\<`boolean`> - - condition to check -
- `value` - - () => `Promise`\<`T`> - - value to return when condition holds true -
- -## Returns - -`Promise`\<`undefined` | `T`> - -the value if condition holds true, undefined if not diff --git a/docs/pages/reference/aa-sdk/core/src/functions/convertChainIdToCoinType.mdx b/docs/pages/reference/aa-sdk/core/src/functions/convertChainIdToCoinType.mdx deleted file mode 100644 index 32dd1e185f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/convertChainIdToCoinType.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: convertChainIdToCoinType -description: Overview of the convertChainIdToCoinType function -slug: wallets/reference/aa-sdk/core/functions/convertChainIdToCoinType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function convertChainIdToCoinType(chainId): number; -``` - -Defined in: [aa-sdk/core/src/ens/utils.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/ens/utils.ts#L22) - -Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains. - -## Example - -```ts -import { convertChainIdToCoinType } from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; - -const coinType = convertChainIdToCoinType(sepolia.id); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chainId` - - `number` - - the blockchain chain ID that you want to convert to a coin type -
- -## Returns - -`number` - -the corresponding coin type for the given chain ID diff --git a/docs/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChain.mdx b/docs/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChain.mdx deleted file mode 100644 index 1521b4f969..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChain.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: convertCoinTypeToChain -description: Overview of the convertCoinTypeToChain function -slug: wallets/reference/aa-sdk/core/functions/convertCoinTypeToChain -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function convertCoinTypeToChain(coinType): Chain; -``` - -Defined in: [aa-sdk/core/src/ens/utils.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/ens/utils.ts#L73) - -Converts a coin type to its corresponding blockchain chain based on a predefined mapping. - -## Example - -```ts -import { convertChainIdToCoinType, convertCoinTypeToChain } from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; - -const coinType = convertChainIdToCoinType(sepolia.id); -const chain = convertCoinTypeToChain(coinType); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `coinType` - - `number` - - The numerical identifier for the coin type -
- -## Returns - -[`Chain`](https://viem.sh) - -The corresponding blockchain chain - -## Throws - -If the coin type does not map to a supported chain diff --git a/docs/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChainId.mdx b/docs/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChainId.mdx deleted file mode 100644 index b35012c194..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/convertCoinTypeToChainId.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: convertCoinTypeToChainId -description: Overview of the convertCoinTypeToChainId function -slug: wallets/reference/aa-sdk/core/functions/convertCoinTypeToChainId -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function convertCoinTypeToChainId(coinType): number; -``` - -Defined in: [aa-sdk/core/src/ens/utils.ts:47](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/ens/utils.ts#L47) - -Converts a coin type to a chain ID based on predefined mappings. This function follows ENSIP-9 for coin type 60 and ENSIP-11 for other coin types. - -## Example - -```ts -import { - convertChainIdToCoinType, - convertCoinTypeToChainId, -} from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; - -const coinType = convertChainIdToCoinType(sepolia.id); -const chainId = convertCoinTypeToChainId(coinType); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `coinType` - - `number` - - the coin type to be converted to a chain ID -
- -## Returns - -`number` - -the corresponding chain ID diff --git a/docs/pages/reference/aa-sdk/core/src/functions/createBundlerClient.mdx b/docs/pages/reference/aa-sdk/core/src/functions/createBundlerClient.mdx deleted file mode 100644 index a88db6c9aa..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/createBundlerClient.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: createBundlerClient -description: Creates a Bundler Client using the provided configuration parameters, including chain and optional type. -slug: wallets/reference/aa-sdk/core/functions/createBundlerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createBundlerClient(args): BundlerClient; -``` - -Defined in: [aa-sdk/core/src/client/bundlerClient.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/bundlerClient.ts#L62) - -Creates a PublicClient with methods for calling Bundler RPC methods - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TTransport` *extends* [`Transport`](https://viem.sh) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - `object` & `object` - - configuration for the client -
- -## Returns - -[`BundlerClient`](../type-aliases/BundlerClient)\<`TTransport`> - -a PublicClient with methods for calling Bundler RPC methods diff --git a/docs/pages/reference/aa-sdk/core/src/functions/createSmartAccountClient.mdx b/docs/pages/reference/aa-sdk/core/src/functions/createSmartAccountClient.mdx deleted file mode 100644 index 1de98c7045..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/createSmartAccountClient.mdx +++ /dev/null @@ -1,253 +0,0 @@ ---- -title: createSmartAccountClient -description: Creates a smart account client using the provided configuration. This client handles various Ethereum transactions and message signing operations. -slug: wallets/reference/aa-sdk/core/functions/createSmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createSmartAccountClient( - config, -): SmartAccountClient; -``` - -Defined in: [aa-sdk/core/src/client/smartAccountClient.ts:131](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/smartAccountClient.ts#L131) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TContext` *extends* - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) - - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - \{ `account?`: `TAccount`; `addBreadCrumb?`: \<`T`>(`crumb`) => `T`; `customMiddleware?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `dummyPaymasterAndData?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `feeEstimator?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `gasEstimator?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `opts?`: `Object`; `paymasterAndData?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `signUserOperation?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `userOperationSimulator?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; } - - The configuration for creating the smart account client -
- `config.account?` - - `TAccount` - - ‐ -
- `config.addBreadCrumb?` - - \<`T`>(`crumb`) => `T` - - A function that adds a breadcrumb to the current context - Note, most implementations will override the client with the default alchemy transport and this - leads to the fact that a transport could be overwritten and not known until later. -
- `config.customMiddleware?` - - [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`> - - ‐ -
- `config.dummyPaymasterAndData?` - - [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`> - - ‐ -
- `config.feeEstimator?` - - [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`> - - ‐ -
- `config.gasEstimator?` - - [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`> - - ‐ -
- `config.opts?` - - `Object` - - ‐ -
- `config.paymasterAndData?` - - [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`> - - ‐ -
- `config.signUserOperation?` - - [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`> - - ‐ -
- `config.userOperationSimulator?` - - [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`> - - ‐ -
- -## Returns - -[`SmartAccountClient`](../type-aliases/SmartAccountClient)\<`TTransport`, `TChain`, `TAccount`> - -A smart account client capable of handling transactions, message signing, and other operations on a smart account diff --git a/docs/pages/reference/aa-sdk/core/src/functions/createSmartAccountClientFromExisting.mdx b/docs/pages/reference/aa-sdk/core/src/functions/createSmartAccountClientFromExisting.mdx deleted file mode 100644 index 67cb7cc6f1..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/createSmartAccountClientFromExisting.mdx +++ /dev/null @@ -1,192 +0,0 @@ ---- -title: createSmartAccountClientFromExisting -description: Creates a smart account client using an existing client and specific configuration. This function can be used to reuse a pre-existing BundlerClient while customizing other aspects of the smart account. -slug: wallets/reference/aa-sdk/core/functions/createSmartAccountClientFromExisting -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createSmartAccountClientFromExisting< - TTransport, - TChain, - TAccount, - TClient, - TActions, - TRpcSchema, - TContext, ->( - config, -): SmartAccountClient< - CustomTransport, - TChain, - TAccount, - TActions, - TRpcSchema, - TContext ->; -``` - -Defined in: [aa-sdk/core/src/client/smartAccountClient.ts:314](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/smartAccountClient.ts#L314) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TClient` *extends* [`BundlerClient`](../type-aliases/BundlerClient)\<`TTransport`> - - [`BundlerClient`](../type-aliases/BundlerClient)\<`TTransport`> -
- `TActions` *extends* [`SmartAccountClientActions`](../type-aliases/SmartAccountClientActions)\<`TChain`, `TAccount`, `TContext`> - - [`SmartAccountClientActions`](../type-aliases/SmartAccountClientActions)\<`TChain`, `TAccount`, - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext)> -
- `TRpcSchema` *extends* \[\{ - `Method`: `"eth_sendUserOperation"`; - `Parameters`: \[[`UserOperationRequest`](../type-aliases/UserOperationRequest), `` `0x${string}` ``]; - `ReturnType`: `` `0x${string}` ``; - }, \{ - `Method`: `"eth_estimateUserOperationGas"`; - `Parameters`: \[[`UserOperationRequest`](../type-aliases/UserOperationRequest), `` `0x${string}` ``, [`RpcStateOverride`](https://viem.sh)?]; - `ReturnType`: [`UserOperationEstimateGasResponse`](../interfaces/UserOperationEstimateGasResponse); - }, \{ - `Method`: `"eth_getUserOperationReceipt"`; - `Parameters`: \[`` `0x${string}` ``, (`"latest"` | `"pending"`)?]; - `ReturnType`: `null` | [`UserOperationReceipt`](../interfaces/UserOperationReceipt); - }, \{ - `Method`: `"eth_getUserOperationByHash"`; - `Parameters`: \[`` `0x${string}` ``]; - `ReturnType`: | `null` - | [`UserOperationResponse`](../interfaces/UserOperationResponse)\<`EntryPointVersion`>; - }] - - \[\{ - `Method`: `"eth_sendUserOperation"`; - `Parameters`: \[[`UserOperationRequest`](../type-aliases/UserOperationRequest), `` `0x${string}` ``]; - `ReturnType`: `` `0x${string}` ``; - }, \{ - `Method`: `"eth_estimateUserOperationGas"`; - `Parameters`: \[[`UserOperationRequest`](../type-aliases/UserOperationRequest), `` `0x${string}` ``, [`RpcStateOverride`](https://viem.sh)?]; - `ReturnType`: [`UserOperationEstimateGasResponse`](../interfaces/UserOperationEstimateGasResponse); - }, \{ - `Method`: `"eth_getUserOperationReceipt"`; - `Parameters`: \[`` `0x${string}` ``, (`"latest"` | `"pending"`)?]; - `ReturnType`: `null` | [`UserOperationReceipt`](../interfaces/UserOperationReceipt); - }, \{ - `Method`: `"eth_getUserOperationByHash"`; - `Parameters`: \[`` `0x${string}` ``]; - `ReturnType`: | `null` - | [`UserOperationResponse`](../interfaces/UserOperationResponse)\<`EntryPointVersion`>; - }] -
- `TContext` *extends* - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) - - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `Omit`\<\{ `account?`: `TAccount`; `addBreadCrumb?`: \<`T`>(`crumb`) => `T`; `customMiddleware?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `dummyPaymasterAndData?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `feeEstimator?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `gasEstimator?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `opts?`: `Object`; `paymasterAndData?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `signUserOperation?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; `userOperationSimulator?`: [`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn)\<`TContext`>; }, `"chain"` | `"transport"`> & `object` - - the configuration object which includes the client -
- -## Returns - -[`SmartAccountClient`](../type-aliases/SmartAccountClient)\<[`CustomTransport`](https://viem.sh), `TChain`, `TAccount`, `TActions`, `TRpcSchema`, `TContext`> - -A smart account client created from the existing BundlerClient diff --git a/docs/pages/reference/aa-sdk/core/src/functions/deepHexlify.mdx b/docs/pages/reference/aa-sdk/core/src/functions/deepHexlify.mdx deleted file mode 100644 index 01169ac812..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/deepHexlify.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: deepHexlify -description: Overview of the deepHexlify function -slug: wallets/reference/aa-sdk/core/functions/deepHexlify -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function deepHexlify(obj): any; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L59) - -Recursively converts all values in an object to hex strings - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `obj` - - `any` - - obj to deep hexlify -
- -## Returns - -`any` - -object with all of its values hexlified diff --git a/docs/pages/reference/aa-sdk/core/src/functions/defaultFeeEstimator.mdx b/docs/pages/reference/aa-sdk/core/src/functions/defaultFeeEstimator.mdx deleted file mode 100644 index de354e72b3..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/defaultFeeEstimator.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: defaultFeeEstimator -description: Overview of the defaultFeeEstimator function -slug: wallets/reference/aa-sdk/core/functions/defaultFeeEstimator -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function defaultFeeEstimator(client): ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/defaults/feeEstimator.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/defaults/feeEstimator.ts#L26) - -Default fee estimator middleware function that estimates the maximum fee per gas and maximum priority fee per gas for a given client and applies the necessary overrides and fee options. - -## Example - -```ts -import { createSmartAccountClient, defaultFeeEstimator, createBundlerClient } from "@aa-sdk/core"; - -const bundlerClient = createBundlerClient(...); - -// NOTE: this is already provided by the smart account client -const client = createSmartAccountClient({ - feeEstimator: defaultFeeEstimator(bundlerClient), - ...otherParams -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDescription
- `C` *extends* `MiddlewareClient` - - The type of the client -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `C` - - The client to perform the fee estimation -
- -## Returns - -`ClientMiddlewareFn` - -A middleware function that takes in the struct and options, estimates the fees, and updates the struct with the estimated fees diff --git a/docs/pages/reference/aa-sdk/core/src/functions/dropAndReplaceUserOperation.mdx b/docs/pages/reference/aa-sdk/core/src/functions/dropAndReplaceUserOperation.mdx deleted file mode 100644 index 0cf07418ae..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/dropAndReplaceUserOperation.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: dropAndReplaceUserOperation -description: Overview of the dropAndReplaceUserOperation function -slug: wallets/reference/aa-sdk/core/functions/dropAndReplaceUserOperation -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function dropAndReplaceUserOperation< - TTransport, - TChain, - TAccount, - TContext, - TEntryPointVersion, ->(client_, args): Promise>; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts:50](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts#L50) - -Drops an existing user operation and replaces it with a new one while ensuring the appropriate fees and overrides are applied. - -## Example - -```ts -import { - createSmartAccountClient, -} from "@aa-sdk/core"; - -// smart account client is already extended with dropAndReplaceUserOperation -const client = createSmartAccountClient(...); -const { request } = await client.sendUserOperation(...); -const result = await client.dropAndReplaceUserOperation({ - uoToDrop: request, - account, // only required if the client above is not connected to an account -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `any` - - `any` -
- `TContext` *extends* `any` - - `any` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client instance with the transport, chain, and account information -
- `args` - - `DropAndReplaceUserOperationParameters`\<`TAccount`, `TContext`> - - The parameters required for dropping and replacing the user operation including the account, operation to drop, overrides, and context -
- -## Returns - -`Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> - -A promise that resolves to the result of sending the new user operation diff --git a/docs/pages/reference/aa-sdk/core/src/functions/erc7677Middleware.mdx b/docs/pages/reference/aa-sdk/core/src/functions/erc7677Middleware.mdx deleted file mode 100644 index 1be7e5feda..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/erc7677Middleware.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: erc7677Middleware -description: Overview of the erc7677Middleware function -slug: wallets/reference/aa-sdk/core/functions/erc7677Middleware -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function erc7677Middleware( - params?, -): Required< - Pick ->; -``` - -Defined in: [aa-sdk/core/src/middleware/erc7677middleware.ts:97](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/erc7677middleware.ts#L97) - -Middleware function for interacting with ERC-7677 enabled clients. It supports resolving paymaster and data fields for user operations. -This middleware assumes that your RPC provider supports the ERC-7677 methods (pm_getPaymasterStubData and pm_getPaymasterData). - -## Example - -```ts -import { createSmartAccountClient, erc7677Middleware } from "@aa-sdk/core"; -import { http } from "viem"; -import { sepolia } from "viem/chains"; - -const client = createSmartAccountClient({ - transport: http("rpc-url"), - chain: sepolia, - // this assumes that your RPC provider supports the ERC-7677 methods AND takes no context - ...erc7677Middleware(), -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* `undefined` | `Record`\<`string`, `any`> - - `undefined` | `Record`\<`string`, `any`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params?` - - [`Erc7677MiddlewareParams`](../type-aliases/Erc7677MiddlewareParams)\<`TContext`, `EntryPointVersion`> - - Middleware parameters including context function or object. Context can be resolved dynamically by passing in a function which takes in the context at the time of sending a user op -
- -## Returns - -`Required`\<`Pick`\<`ClientMiddlewareConfig`, `"dummyPaymasterAndData"` | `"paymasterAndData"`>> - -An object containing middleware functions `dummyPaymasterAndData` and `paymasterAndData` for processing user operations with the paymaster data diff --git a/docs/pages/reference/aa-sdk/core/src/functions/filterUndefined.mdx b/docs/pages/reference/aa-sdk/core/src/functions/filterUndefined.mdx deleted file mode 100644 index 2b5f59d5d6..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/filterUndefined.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: filterUndefined -description: Overview of the filterUndefined function -slug: wallets/reference/aa-sdk/core/functions/filterUndefined -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function filterUndefined(obj): T; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:99](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L99) - -Filters out properties with undefined or null values from the provided object. - -## Example - -```ts -import { filterUndefined } from "@aa-sdk/core"; - -const result = filterUndefined({ - foo: undefined, - bar: null, - baz: "baz", -}); // { baz: "baz" } -``` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `obj` - - `T` - - the object from which to remove properties with undefined or null values -
- -## Returns - -`T` - -the object with undefined or null properties removed diff --git a/docs/pages/reference/aa-sdk/core/src/functions/getAccountAddress.mdx b/docs/pages/reference/aa-sdk/core/src/functions/getAccountAddress.mdx deleted file mode 100644 index 56e2d8c8a1..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/getAccountAddress.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: getAccountAddress -description: Overview of the getAccountAddress function -slug: wallets/reference/aa-sdk/core/functions/getAccountAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getAccountAddress(params): Promise<`0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:225](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L225) - -Retrieves the account address. Uses a provided `accountAddress` if available; otherwise, it computes the address using the entry point contract and the initial code. - -## Example - -```ts -import { getEntryPoint, getAccountAddress } from "@aa-sdk/core"; - -const accountAddress = await getAccountAddress({ - client, - entryPoint: getEntryPoint(chain), - getAccountInitCode: async () => "0x{factoryAddress}{factoryCallData}", -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`GetAccountAddressParams`](../type-aliases/GetAccountAddressParams) - - The configuration object -
- -## Returns - -`Promise`\<`` `0x${string}` ``> - -A promise that resolves to the account address diff --git a/docs/pages/reference/aa-sdk/core/src/functions/getDefaultUserOperationFeeOptions.mdx b/docs/pages/reference/aa-sdk/core/src/functions/getDefaultUserOperationFeeOptions.mdx deleted file mode 100644 index e974f1af35..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/getDefaultUserOperationFeeOptions.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getDefaultUserOperationFeeOptions -description: Overview of the getDefaultUserOperationFeeOptions function -slug: wallets/reference/aa-sdk/core/functions/getDefaultUserOperationFeeOptions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultUserOperationFeeOptions(chain): any; -``` - -Defined in: [aa-sdk/core/src/utils/defaults.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/defaults.ts#L11) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - [`Chain`](https://viem.sh) -
- -## Returns - -`any` diff --git a/docs/pages/reference/aa-sdk/core/src/functions/getEntryPoint.mdx b/docs/pages/reference/aa-sdk/core/src/functions/getEntryPoint.mdx deleted file mode 100644 index 4e1ace9009..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/getEntryPoint.mdx +++ /dev/null @@ -1,267 +0,0 @@ ---- -title: getEntryPoint -description: Retrieves the entry point definition for the specified chain and version, falling back to the default version if not provided. Throws an error if the entry point address cannot be found. -slug: wallets/reference/aa-sdk/core/functions/getEntryPoint -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Retrieves the entry point definition for the specified chain and version, falling back to the default version if not provided. Throws an error if the entry point address cannot be found. - -## Example - -```ts -import { getEntryPoint } from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; - -const entryPoint060 = getEntryPoint(sepolia); -const entryPoint070 = getEntryPoint(sepolia, { version: "0.7.0" }); -``` - -## Param - -The chain for which the entry point is being retrieved - -## Param - -Options containing the version and address overrides for the entry point - -## Call Signature - -```ts -function getEntryPoint( - chain, - options, -): EntryPointDefRegistry[TEntryPointVersion]; -``` - -Defined in: [aa-sdk/core/src/entrypoint/index.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/index.ts#L40) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - `OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>> -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- -### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - `TChain` -
- `options` - - [`GetEntryPointOptions`](../type-aliases/GetEntryPointOptions)\<`TEntryPointVersion`> -
- -### Returns - -[`EntryPointDefRegistry`](../interfaces/EntryPointDefRegistry)\<`TChain`>\[`TEntryPointVersion`] - -## Call Signature - -```ts -function getEntryPoint( - chain, - options?, -): EntryPointDefRegistry[TEntryPointVersion]; -``` - -Defined in: [aa-sdk/core/src/entrypoint/index.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/index.ts#L48) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>> - - `OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>> -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- -### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - `TChain` -
- `options?` - - [`GetEntryPointOptions`](../type-aliases/GetEntryPointOptions)\<`TEntryPointVersion`> -
- -### Returns - -[`EntryPointDefRegistry`](../interfaces/EntryPointDefRegistry)\<`TChain`>\[`TEntryPointVersion`] - -## Call Signature - -```ts -function getEntryPoint( - chain, - options?, -): OneOf<"0.6.0", keyof EntryPointRegistryBase>; -``` - -Defined in: [aa-sdk/core/src/entrypoint/index.ts:57](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/index.ts#L57) - -### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- -### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - `TChain` -
- `options?` - - [`GetEntryPointOptions`](../type-aliases/GetEntryPointOptions)\<`OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>>> -
- -### Returns - -`OneOf`\<`"0.6.0"`, keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>> diff --git a/docs/pages/reference/aa-sdk/core/src/functions/getUserOperationError.mdx b/docs/pages/reference/aa-sdk/core/src/functions/getUserOperationError.mdx deleted file mode 100644 index 2d42a1102e..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/getUserOperationError.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: getUserOperationError -description: Overview of the getUserOperationError function -slug: wallets/reference/aa-sdk/core/functions/getUserOperationError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getUserOperationError( - client, - request, - entryPoint, -): Promise; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/getUserOperationError.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/getUserOperationError.ts#L28) - -Retrieves the error message from an entrypoint for a User Operation. - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `BaseSmartAccountClient`\<`TTransport`, `TChain`, `TAccount`> - - the smart account client to use for RPC requests -
- `request` - - [`UserOperationRequest`](../type-aliases/UserOperationRequest) - - the uo request to get the error for -
- `entryPoint` - - [`EntryPointDef`](../type-aliases/EntryPointDef) - - the entrypoint instance to send the uo to -
- -## Returns - -`Promise`\<`void`> - -the error message from the entrypoint diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isBigNumberish.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isBigNumberish.mdx deleted file mode 100644 index 6e818a2885..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isBigNumberish.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: isBigNumberish -description: Overview of the isBigNumberish function -slug: wallets/reference/aa-sdk/core/functions/isBigNumberish -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isBigNumberish(x): x is BigNumberish; -``` - -Defined in: [aa-sdk/core/src/utils/schema.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/schema.ts#L40) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `x` - - `any` -
- -## Returns - -`x is BigNumberish` diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isEntryPointVersion.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isEntryPointVersion.mdx deleted file mode 100644 index bf06fbcee4..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isEntryPointVersion.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: isEntryPointVersion -description: Overview of the isEntryPointVersion function -slug: wallets/reference/aa-sdk/core/functions/isEntryPointVersion -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isEntryPointVersion(value): value is keyof EntryPointRegistry; -``` - -Defined in: [aa-sdk/core/src/entrypoint/index.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/index.ts#L34) - -Checks if the given value is a valid key of the EntryPointRegistry. - -## Example - -```ts -import { isEntryPointVersion } from "@aa-sdk/core"; - -const valid = isEntryPointVersion("0.6.0"); -const invalid = isEntryPointVersion("0.8.0"); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `value` - - `any` - - The value to be checked -
- -## Returns - -`value is keyof EntryPointRegistry` - -true if the value is a valid key of EntryPointRegistry, false otherwise diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isMultiplier.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isMultiplier.mdx deleted file mode 100644 index c42b073a7b..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isMultiplier.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: isMultiplier -description: Overview of the isMultiplier function -slug: wallets/reference/aa-sdk/core/functions/isMultiplier -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isMultiplier(x): x is Multiplier; -``` - -Defined in: [aa-sdk/core/src/utils/schema.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/schema.ts#L44) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `x` - - `any` -
- -## Returns - -`x is Multiplier` diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isSigner.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isSigner.mdx deleted file mode 100644 index 6d3202deec..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isSigner.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: isSigner -description: Overview of the isSigner function -slug: wallets/reference/aa-sdk/core/functions/isSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isSigner(signer): signer is SmartAccountSigner; -``` - -Defined in: [aa-sdk/core/src/signer/schema.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/schema.ts#L18) - -Checks if the provided object is a `SmartAccountSigner`. - -## Example - -```ts -import { isSigner, LocalAccountSigner } from "@aa-sdk/core"; - -const signer = new LocalAccountSigner(...); -console.log(isSigner(signer)); // true -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `signer` - - `any` - - the object to check -
- -## Returns - -`signer is SmartAccountSigner` - -A boolean indicating whether the object is a `SmartAccountSigner` diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isSmartAccountClient.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isSmartAccountClient.mdx deleted file mode 100644 index 179dfb8f81..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isSmartAccountClient.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: isSmartAccountClient -description: Overview of the isSmartAccountClient function -slug: wallets/reference/aa-sdk/core/functions/isSmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isSmartAccountClient( - client, -): client is SmartAccountClient; -``` - -Defined in: [aa-sdk/core/src/client/isSmartAccountClient.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/isSmartAccountClient.ts#L17) - -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 - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `any` - - `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - a viem client -
- -## Returns - -`client is SmartAccountClient` - -true if the client is a SmartAccountClient diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isSmartAccountWithSigner.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isSmartAccountWithSigner.mdx deleted file mode 100644 index 45e16b9589..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isSmartAccountWithSigner.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: isSmartAccountWithSigner -description: Overview of the isSmartAccountWithSigner function -slug: wallets/reference/aa-sdk/core/functions/isSmartAccountWithSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isSmartAccountWithSigner( - account, -): account is SmartContractAccountWithSigner< - string, - SmartAccountSigner, - keyof EntryPointRegistryBase ->; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:113](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L113) - -Determines if the given SmartContractAccount has a signer associated with it. - -## Example - -```ts -import { toSmartContractAccount } from "@aa-sdk/core"; - -const account = await toSmartContractAccount(...); - -console.log(isSmartAccountWithSigner(account)); // false: the base account does not have a publicly accessible signer -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `account` - - [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - The account to check. -
- -## Returns - -`account is SmartContractAccountWithSigner, keyof EntryPointRegistryBase>` - -true if the account has a signer, otherwise false. diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isValidFactoryAndData.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isValidFactoryAndData.mdx deleted file mode 100644 index 0ed4d85352..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isValidFactoryAndData.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: isValidFactoryAndData -description: Overview of the isValidFactoryAndData function -slug: wallets/reference/aa-sdk/core/functions/isValidFactoryAndData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isValidFactoryAndData(request): boolean; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:67](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L67) - -Utility method for asserting a UserOperationStruct has valid fields for the paymaster data - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `request` - - `UserOperationStruct`\<`TEntryPointVersion`> - - a UserOperationRequest to validate -
- -## Returns - -`boolean` - -a type guard that asserts the UserOperationStruct is a UserOperationRequest diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isValidPaymasterAndData.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isValidPaymasterAndData.mdx deleted file mode 100644 index 86411f80dc..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isValidPaymasterAndData.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: isValidPaymasterAndData -description: Overview of the isValidPaymasterAndData function -slug: wallets/reference/aa-sdk/core/functions/isValidPaymasterAndData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isValidPaymasterAndData(request): boolean; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L45) - -Utility method for asserting a UserOperationRequest has valid fields for the paymaster data - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `request` - - `UserOperationStruct`\<`TEntryPointVersion`> - - a UserOperationRequest to validate -
- -## Returns - -`boolean` - -a type guard that asserts the UserOperationRequest is a UserOperationRequest diff --git a/docs/pages/reference/aa-sdk/core/src/functions/isValidRequest.mdx b/docs/pages/reference/aa-sdk/core/src/functions/isValidRequest.mdx deleted file mode 100644 index 803fc23a62..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/isValidRequest.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: isValidRequest -description: Overview of the isValidRequest function -slug: wallets/reference/aa-sdk/core/functions/isValidRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isValidRequest( - request, -): request is UserOperationRequest; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L22) - -Utility method for asserting a UserOperationStruct has valid fields for the given entry point version - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `request` - - `UserOperationStruct`\<`TEntryPointVersion`> - - a UserOperationStruct to validate -
- -## Returns - -`request is UserOperationRequest` - -a type guard that asserts the UserOperationRequest is valid diff --git a/docs/pages/reference/aa-sdk/core/src/functions/middlewareActions.mdx b/docs/pages/reference/aa-sdk/core/src/functions/middlewareActions.mdx deleted file mode 100644 index 31d0cd1a11..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/middlewareActions.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: middlewareActions -description: Overview of the middlewareActions function -slug: wallets/reference/aa-sdk/core/functions/middlewareActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function middlewareActions( - overrides, -): (client) => object; -``` - -Defined in: [aa-sdk/core/src/middleware/actions.ts:50](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/actions.ts#L50) - -function that takes in ClientMiddlewareConfig used during client initiation -and returns the middleware actions object that the smart account client extends with - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `overrides` - - [`ClientMiddlewareConfig`](../type-aliases/ClientMiddlewareConfig) - - config used during client initiation for overriding default middlewares -
- -## Returns - -middleware actions object - -```ts -(client): object; -``` - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `client` - - [`MiddlewareClient`](../type-aliases/MiddlewareClient)\<`TTransport`, `TChain`, `TAccount`> -
- -### Returns - -`object` - - - - - - - - - - - - - - - - - -
NameType
- `middleware` - - [`ClientMiddleware`](../type-aliases/ClientMiddleware) -
diff --git a/docs/pages/reference/aa-sdk/core/src/functions/parseFactoryAddressFromAccountInitCode.mdx b/docs/pages/reference/aa-sdk/core/src/functions/parseFactoryAddressFromAccountInitCode.mdx deleted file mode 100644 index 5d4ce64c53..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/parseFactoryAddressFromAccountInitCode.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: parseFactoryAddressFromAccountInitCode -description: Overview of the parseFactoryAddressFromAccountInitCode function -slug: wallets/reference/aa-sdk/core/functions/parseFactoryAddressFromAccountInitCode -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function parseFactoryAddressFromAccountInitCode( - initCode, -): [`0x${string}`, `0x${string}`]; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:189](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L189) - -Parses the factory address and factory calldata from the provided account initialization code (initCode). - -## Example - -```ts -import { parseFactoryAddressFromAccountInitCode } from "@aa-sdk/core"; - -const [address, calldata] = - parseFactoryAddressFromAccountInitCode("0xAddressCalldata"); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `initCode` - - `` `0x${string}` `` - - The initialization code from which to parse the factory address and calldata -
- -## Returns - -\[`` `0x${string}` ``, `` `0x${string}` ``] - -A tuple containing the parsed factory address and factory calldata diff --git a/docs/pages/reference/aa-sdk/core/src/functions/parsePaymasterAndData.mdx b/docs/pages/reference/aa-sdk/core/src/functions/parsePaymasterAndData.mdx deleted file mode 100644 index 5186a2be81..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/parsePaymasterAndData.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: parsePaymasterAndData -description: Overview of the parsePaymasterAndData function -slug: wallets/reference/aa-sdk/core/functions/parsePaymasterAndData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function parsePaymasterAndData( - paymasterAndData, -): Pick, "paymaster" | "paymasterData">; -``` - -Defined in: [aa-sdk/core/src/utils/userop.ts:199](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/userop.ts#L199) - -Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `paymasterAndData` - - `` `0x${string}` `` - - the paymaster and data hex string to parse. - The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request -
- -## Returns - -`Pick`\<`UserOperationRequest`\<`"0.7.0"`>, `"paymaster"` | `"paymasterData"`> - -the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field diff --git a/docs/pages/reference/aa-sdk/core/src/functions/pick.mdx b/docs/pages/reference/aa-sdk/core/src/functions/pick.mdx deleted file mode 100644 index bb2b5b601b..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/pick.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: pick -description: Overview of the pick function -slug: wallets/reference/aa-sdk/core/functions/pick -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function pick(obj, keys): object; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:125](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L125) - -Picks the specified keys from an object and returns a new object containing only those key-value pairs. - -## Example - -```ts -import { pick } from "@aa-sdk/core"; - -const picked = pick( - { - foo: "foo", - bar: "bar", - }, - ["foo"], -); // { foo: "foo" } -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `obj` - - `Record`\<`string`, `unknown`> - - The object from which to pick keys -
- `keys` - - `string` | `string`\[] - - A single key or an array of keys to pick from the object -
- -## Returns - -`object` - -A new object containing only the picked key-value pairs diff --git a/docs/pages/reference/aa-sdk/core/src/functions/resolveProperties.mdx b/docs/pages/reference/aa-sdk/core/src/functions/resolveProperties.mdx deleted file mode 100644 index 5d2cdaae26..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/resolveProperties.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: resolveProperties -description: Overview of the resolveProperties function -slug: wallets/reference/aa-sdk/core/functions/resolveProperties -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function resolveProperties(object): Promise; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L37) - -Await all of the properties of a Deferrable object - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `object` - - [`Deferrable`](../type-aliases/Deferrable)\<`T`> - - a Deferrable object -
- -## Returns - -`Promise`\<`T`> - -the object with its properties resolved diff --git a/docs/pages/reference/aa-sdk/core/src/functions/sendTransaction.mdx b/docs/pages/reference/aa-sdk/core/src/functions/sendTransaction.mdx deleted file mode 100644 index a18b7ad499..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/sendTransaction.mdx +++ /dev/null @@ -1,185 +0,0 @@ ---- -title: sendTransaction -description: Overview of the sendTransaction function -slug: wallets/reference/aa-sdk/core/functions/sendTransaction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function sendTransaction< - TChain, - TAccount, - TChainOverride, - TContext, - TEntryPointVersion, ->(client_, args, overrides?, context?): Promise<`0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/sendTransaction.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/sendTransaction.ts#L48) - -Sends a transaction using the provided client, arguments, optional overrides, and context. -This sends a UO and then waits for it to be mined - -## Example - -```ts -import { createSmartAccountClient } from "@aa-sdk/core"; - -// smart account client is already extended with sendTransaction -const client = createSmartAccountClient(...); -const result = await client.sendTransaction({ - to: "0x...", - data: "0x...", // or "0x", - value: 0n, // optional - account, // only required if the client above is not connected to an account -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TChainOverride` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TContext` *extends* - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) - - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) -
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - [`GetEntryPointFromAccount`](../type-aliases/GetEntryPointFromAccount)\<`TAccount`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<[`Transport`](https://viem.sh), `TChain`, `TAccount`> - - The client to send the transaction through -
- `args` - - [`SendTransactionParameters`](https://viem.sh)\<`TChain`, `TAccount`, `TChainOverride`> - - The parameters required to send the transaction -
- `overrides?` - - [`UserOperationOverrides`](../type-aliases/UserOperationOverrides)\<`TEntryPointVersion`> - - Optional overrides for the user operation -
- `context?` - - `TContext` - - Optional context for the user operation -
- -## Returns - -`Promise`\<`` `0x${string}` ``> - -A promise that resolves to a hex string representing the transaction hash diff --git a/docs/pages/reference/aa-sdk/core/src/functions/sendTransactions.mdx b/docs/pages/reference/aa-sdk/core/src/functions/sendTransactions.mdx deleted file mode 100644 index 637219bb8b..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/sendTransactions.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: sendTransactions -description: Overview of the sendTransactions function -slug: wallets/reference/aa-sdk/core/functions/sendTransactions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function sendTransactions( - client_, - args, -): Promise<`0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/sendTransactions.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/sendTransactions.ts#L36) - -Sends transactions using the provided client and transaction parameters. This function builds user operations from the transactions, sends them, and waits for the transaction to be mined. - -## Example - -```ts -import { createSmartAccountClient } from "@aa-sdk/core"; - -// smart account client is already extended with sendTransactions -const client = createSmartAccountClient(...); -const result = await client.sendTransactions({ - requests: [{ - to: "0x...", - data: "0x...", // or "0x", - value: 0n, // optional - }], - account, // only required if the client above is not connected to an account -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TContext` *extends* `any` - - `UserOperationContext` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client used to send the transactions -
- `args` - - `SendTransactionsParameters`\<`TAccount`, `TContext`> - - The parameters for sending the transactions, including requests, overrides, account, and context -
- -## Returns - -`Promise`\<`` `0x${string}` ``> - -A promise that resolves to the transaction hash of the sent transactions diff --git a/docs/pages/reference/aa-sdk/core/src/functions/sendUserOperation.mdx b/docs/pages/reference/aa-sdk/core/src/functions/sendUserOperation.mdx deleted file mode 100644 index b7e153a052..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/sendUserOperation.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: sendUserOperation -description: Overview of the sendUserOperation function -slug: wallets/reference/aa-sdk/core/functions/sendUserOperation -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function sendUserOperation< - TTransport, - TChain, - TAccount, - TContext, - TEntryPointVersion, ->(client_, args): Promise>; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/sendUserOperation.ts#L39) - -Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline. - -## Example - -```ts -import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core"; - -const account = await toSmartContractAccount(...); -const result = await createSmartAccountClient(...).sendUserOperation({ - uo: { - target: "0x...", - data: "0x...", // or "0x", - value: 0n, // optional - } -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) - - | `undefined` - | [`SmartContractAccount`](../type-aliases/SmartContractAccount) -
- `TContext` *extends* - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) - - | `undefined` - | [`UserOperationContext`](../type-aliases/UserOperationContext) -
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - [`GetEntryPointFromAccount`](../type-aliases/GetEntryPointFromAccount)\<`TAccount`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client_` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - the smart account client to use for RPC requests -
- `args` - - `any` - - contains the UO or batch to send, context, overrides, and account if not hoisted on the client -
- -## Returns - -`Promise`\<[`SendUserOperationResult`](../type-aliases/SendUserOperationResult)\<`TEntryPointVersion`>> - -a Promise containing the result of the user operation diff --git a/docs/pages/reference/aa-sdk/core/src/functions/split.mdx b/docs/pages/reference/aa-sdk/core/src/functions/split.mdx deleted file mode 100644 index 3ebb739b49..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/split.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: split -description: Overview of the split function -slug: wallets/reference/aa-sdk/core/functions/split -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function split(params): CustomTransport; -``` - -Defined in: [aa-sdk/core/src/transport/split.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/transport/split.ts#L43) - -The Split Transport allows you to split RPC traffic for specific methods across -different RPC providers. This is done by specifying the methods you want handled -specially as overrides and providing a fallback transport for all other methods. - -## Example - -```ts -import { createPublicClient, http } from "viem"; -import { split } from "@aa-sdk/core"; - -const bundlerMethods = [ - "eth_sendUserOperation", - "eth_estimateUserOperationGas", - "eth_getUserOperationReceipt", - "eth_getUserOperationByHash", - "eth_supportedEntryPoints", -]; - -const clientWithSplit = createPublicClient({ - transport: split({ - overrides: [ - { - methods: bundlerMethods, - transport: http(BUNDLER_RPC_URL), - }, - ], - fallback: http(OTHER_RPC_URL), - }), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`SplitTransportParams`](../interfaces/SplitTransportParams) - - split transport configuration containing the methods overrides and fallback transport -
- -## Returns - -[`CustomTransport`](https://viem.sh) - -a viem Transport that splits traffic diff --git a/docs/pages/reference/aa-sdk/core/src/functions/stringToIndex.mdx b/docs/pages/reference/aa-sdk/core/src/functions/stringToIndex.mdx deleted file mode 100644 index 1e8228140f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/stringToIndex.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: stringToIndex -description: Overview of the stringToIndex function -slug: wallets/reference/aa-sdk/core/functions/stringToIndex -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function stringToIndex(phrase): bigint; -``` - -Defined in: [aa-sdk/core/src/utils/bigint.ts:117](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bigint.ts#L117) - -Useful if you want to use a string, such as a user's email address, as salt to generate a unique SmartAccount per user. - -example: - -``` -const salt = stringToIndex("alice@example.com"); - -export const account = new SimpleSmartContractAccount({ - index: salt, - // other args omitted... -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `phrase` - - `string` - - any string value. -
- -## Returns - -`bigint` - -the bigint value of the hashed string diff --git a/docs/pages/reference/aa-sdk/core/src/functions/takeBytes.mdx b/docs/pages/reference/aa-sdk/core/src/functions/takeBytes.mdx deleted file mode 100644 index f57751fb7f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/takeBytes.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: takeBytes -description: Overview of the takeBytes function -slug: wallets/reference/aa-sdk/core/functions/takeBytes -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function takeBytes(bytes, opts): `0x${string}`; -``` - -Defined in: [aa-sdk/core/src/utils/bytes.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bytes.ts#L17) - -Given a bytes string, returns a slice of the bytes - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `bytes` - - `` `0x${string}` `` - - the hex string representing bytes -
- `opts` - - `TakeBytesOpts` - - optional parameters for slicing the bytes -
- -## Returns - -`` `0x${string}` `` - -the sliced bytes diff --git a/docs/pages/reference/aa-sdk/core/src/functions/toRecord.mdx b/docs/pages/reference/aa-sdk/core/src/functions/toRecord.mdx deleted file mode 100644 index dcabb4f11b..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/toRecord.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: toRecord -description: Overview of the toRecord function -slug: wallets/reference/aa-sdk/core/functions/toRecord -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function toRecord(array, selector, fn): Record; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:177](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L177) - -Converts an array of objects into a record (object) where each key is determined by the specified selector and the value is determined by the provided function. - -## Example - -```ts -import { toRecord } from "@aa-sdk/core"; -import { sepolia, mainnet } from "viem/chains"; - -const addressesByChain = toRecord([sepolia, mainnet], "id", () => "0x..."); // { [sepolia.id]: "0x...", [mainnet.id]: "0x..." } -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* \{ \[K in string | number | symbol]: string | number | symbol } -
- `K` *extends* `string` | `number` | `symbol` -
- `V` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `array` - - `T`\[] - - The array of objects to convert to a record -
- `selector` - - `K` - - The key used to select the property that will become the record's key -
- `fn` - - (`item`) => `V` - - The function that transforms each item in the array into the record's value -
- -## Returns - -`Record`\<`T`\[`K`], `V`> - -The resulting record object diff --git a/docs/pages/reference/aa-sdk/core/src/functions/toSmartContractAccount.mdx b/docs/pages/reference/aa-sdk/core/src/functions/toSmartContractAccount.mdx deleted file mode 100644 index 0ea09a9851..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/toSmartContractAccount.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: toSmartContractAccount -description: Converts an account to a smart contract account and sets up various account-related methods using the provided parameters like transport, chain, entry point, and other utilities. -slug: wallets/reference/aa-sdk/core/functions/toSmartContractAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function toSmartContractAccount( - params, -): Promise>; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:266](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L266) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `Name` *extends* `string` - - `string` -
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`ToSmartContractAccountParams`](../type-aliases/ToSmartContractAccountParams)\<`Name`, `TTransport`, `TChain`, `TEntryPointVersion`> - - the parameters required for converting to a smart contract account -
- -## Returns - -`Promise`\<[`SmartContractAccount`](../type-aliases/SmartContractAccount)\<`Name`, `TEntryPointVersion`>> - -a promise that resolves to a SmartContractAccount object with methods and properties for interacting with the smart contract account diff --git a/docs/pages/reference/aa-sdk/core/src/functions/unpackSignRawMessageBytes.mdx b/docs/pages/reference/aa-sdk/core/src/functions/unpackSignRawMessageBytes.mdx deleted file mode 100644 index 68dcea57cc..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/unpackSignRawMessageBytes.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: unpackSignRawMessageBytes -description: Overview of the unpackSignRawMessageBytes function -slug: wallets/reference/aa-sdk/core/functions/unpackSignRawMessageBytes -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function unpackSignRawMessageBytes(hex): UnpackedSignature; -``` - -Defined in: [aa-sdk/core/src/utils/bytes.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bytes.ts#L31) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `hex` - - `` `0x${string}` `` -
- -## Returns - -[`UnpackedSignature`](../type-aliases/UnpackedSignature) diff --git a/docs/pages/reference/aa-sdk/core/src/functions/wrapSignatureWith6492.mdx b/docs/pages/reference/aa-sdk/core/src/functions/wrapSignatureWith6492.mdx deleted file mode 100644 index 65def93bae..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/functions/wrapSignatureWith6492.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: wrapSignatureWith6492 -description: Overview of the wrapSignatureWith6492 function -slug: wallets/reference/aa-sdk/core/functions/wrapSignatureWith6492 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function wrapSignatureWith6492(params): `0x${string}`; -``` - -Defined in: [aa-sdk/core/src/signer/utils.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/utils.ts#L36) - -Wraps a given signature with additional data following the EIP-6492 standard. - -## Example - -```ts -import { wrapSignatureWith6492 } from "@aa-sdk/core"; - -const signature = wrapSignatureWith6492({ - factoryAddress: "0x...", - factoryCalldata: "0x...", - signature: "0x...", -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `SignWith6492Params` - - The parameters to wrap the signature -
- -## Returns - -`` `0x${string}` `` - -The wrapped signature diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/AccountEntryPointRegistry.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/AccountEntryPointRegistry.mdx deleted file mode 100644 index 5433fda977..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/AccountEntryPointRegistry.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: AccountEntryPointRegistry -description: Overview of the AccountEntryPointRegistry interface -slug: wallets/reference/aa-sdk/core/interfaces/AccountEntryPointRegistry -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:145](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L145) - -## Extends - -- [`EntryPointRegistryBase`](EntryPointRegistryBase)\<[`SmartContractAccount`](../type-aliases/SmartContractAccount)\<`Name`, [`EntryPointVersion`](../type-aliases/EntryPointVersion)>> - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `Name` *extends* `string` - - `string` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `0.6.0` - - [`SmartContractAccount`](../type-aliases/SmartContractAccount)\<`Name`, `"0.6.0"`> -
- `0.7.0` - - [`SmartContractAccount`](../type-aliases/SmartContractAccount)\<`Name`, `"0.7.0"`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointDefRegistry.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointDefRegistry.mdx deleted file mode 100644 index ff6111f12f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointDefRegistry.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: EntryPointDefRegistry -description: Overview of the EntryPointDefRegistry interface -slug: wallets/reference/aa-sdk/core/interfaces/EntryPointDefRegistry -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:85](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L85) - -## Extends - -- [`EntryPointRegistryBase`](EntryPointRegistryBase)\<[`EntryPointDef`](../type-aliases/EntryPointDef)\<[`EntryPointVersion`](../type-aliases/EntryPointVersion), `TChain`, [`Abi`](https://abitype.dev)>> - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `0.6.0` - - [`EntryPointDef`](../type-aliases/EntryPointDef)\<`"0.6.0"`, `TChain`, `any`> -
- `0.7.0` - - [`EntryPointDef`](../type-aliases/EntryPointDef)\<`"0.7.0"`, `TChain`, `any`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistry.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistry.mdx deleted file mode 100644 index 17eb5a572e..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistry.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: EntryPointRegistry -description: Overview of the EntryPointRegistry interface -slug: wallets/reference/aa-sdk/core/interfaces/EntryPointRegistry -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:60](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L60) - -## Extends - -- [`EntryPointRegistryBase`](EntryPointRegistryBase)\<[`SupportedEntryPoint`](../type-aliases/SupportedEntryPoint)\<[`EntryPointVersion`](../type-aliases/EntryPointVersion), `TChain`, [`Abi`](https://abitype.dev)>> - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `0.6.0` - - [`SupportedEntryPoint`](../type-aliases/SupportedEntryPoint)\<`"0.6.0"`, `TChain`, `any`> -
- `0.7.0` - - [`SupportedEntryPoint`](../type-aliases/SupportedEntryPoint)\<`"0.7.0"`, `TChain`, `any`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistryBase.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistryBase.mdx deleted file mode 100644 index 90a48111ca..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/EntryPointRegistryBase.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: EntryPointRegistryBase -description: Overview of the EntryPointRegistryBase interface -slug: wallets/reference/aa-sdk/core/interfaces/EntryPointRegistryBase -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L16) - -## Extended by - -- [`AccountEntryPointRegistry`](AccountEntryPointRegistry) -- [`EntryPointRegistry`](EntryPointRegistry) -- [`EntryPointDefRegistry`](EntryPointDefRegistry) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `0.6.0` - - `T` -
- `0.7.0` - - `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/SmartAccountAuthenticator.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/SmartAccountAuthenticator.mdx deleted file mode 100644 index 7fbf11cb61..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/SmartAccountAuthenticator.mdx +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: SmartAccountAuthenticator -description: Extends the SmartAccountSigner interface with authentication. -slug: wallets/reference/aa-sdk/core/interfaces/SmartAccountAuthenticator -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/signer/types.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/types.ts#L18) - -Extends the SmartAccountSigner interface with authentication. - -## Extends - -- [`SmartAccountSigner`](SmartAccountSigner)\<`Inner`> - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault typeDescription
- `AuthParams` - - ‐ - - the generic type of the authentication parameters -
- `AuthDetails` - - ‐ - - the generic type of the authentication details -
- `Inner` - - `any` - - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc. -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `authenticate` - - (`params`) => `Promise`\<`AuthDetails`> -
- `getAddress` - - () => `Promise`\<`` `0x${string}` ``> -
- `getAuthDetails` - - () => `Promise`\<`AuthDetails`> -
- `inner` - - `Inner` -
- `signAuthorization?` - - (`unsignedAuthorization`) => `Promise`\<[`SignedAuthorization`](https://viem.sh)\<`number`>> -
- `signerType` - - `string` -
- `signMessage` - - (`message`) => `Promise`\<`` `0x${string}` ``> -
- `signTypedData` - - \<`TTypedData`, `TPrimaryType`>(`params`) => `Promise`\<`` `0x${string}` ``> -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/SmartAccountSigner.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/SmartAccountSigner.mdx deleted file mode 100644 index 5232d47cbd..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/SmartAccountSigner.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: SmartAccountSigner -description: A signer that can sign messages and typed data. -slug: wallets/reference/aa-sdk/core/interfaces/SmartAccountSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/signer/types.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/types.ts#L45) - -A signer that can sign messages and typed data. - -## Extended by - -- [`SmartAccountAuthenticator`](SmartAccountAuthenticator) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault typeDescription
- `Inner` - - `any` - - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc. -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `getAddress` - - () => `Promise`\<`` `0x${string}` ``> -
- `inner` - - `Inner` -
- `signAuthorization?` - - (`unsignedAuthorization`) => `Promise`\<[`SignedAuthorization`](https://viem.sh)\<`number`>> -
- `signerType` - - `string` -
- `signMessage` - - (`message`) => `Promise`\<`` `0x${string}` ``> -
- `signTypedData` - - \<`TTypedData`, `TPrimaryType`>(`params`) => `Promise`\<`` `0x${string}` ``> -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/SplitTransportParams.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/SplitTransportParams.mdx deleted file mode 100644 index 5518adbd4f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/SplitTransportParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: SplitTransportParams -description: Overview of the SplitTransportParams interface -slug: wallets/reference/aa-sdk/core/interfaces/SplitTransportParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/transport/split.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/transport/split.ts#L3) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `fallback` - - [`Transport`](https://viem.sh) -
- `overrides` - - `object`\[] -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationEstimateGasResponse.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationEstimateGasResponse.mdx deleted file mode 100644 index bff5a706ed..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationEstimateGasResponse.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: UserOperationEstimateGasResponse -description: Overview of the UserOperationEstimateGasResponse interface -slug: wallets/reference/aa-sdk/core/interfaces/UserOperationEstimateGasResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/types.ts:219](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L219) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `callGasLimit` - - `any` -
- `paymasterVerificationGasLimit` - - `TEntryPointVersion` *extends* `"0.7.0"` ? `any` : `never` -
- `preVerificationGas` - - `any` -
- `verificationGasLimit` - - `any` -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationReceipt.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationReceipt.mdx deleted file mode 100644 index 24109a0b8f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationReceipt.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: UserOperationReceipt -description: Overview of the UserOperationReceipt interface -slug: wallets/reference/aa-sdk/core/interfaces/UserOperationReceipt -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/types.ts:253](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L253) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `actualGasCost` - - `any` -
- `actualGasUsed` - - `any` -
- `entryPoint` - - `` `0x${string}` `` -
- `logs` - - `string`\[] -
- `nonce` - - `any` -
- `paymaster?` - - `` `0x${string}` `` -
- `reason?` - - `string` -
- `receipt` - - [`TransactionReceipt`](https://viem.sh) -
- `sender` - - `` `0x${string}` `` -
- `status` - - `string` -
- `success` - - `boolean` -
- `userOpHash` - - `` `0x${string}` `` -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v6.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v6.mdx deleted file mode 100644 index ecd6f80f54..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v6.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: UserOperationRequest_v6 -description: Overview of the UserOperationRequest_v6 interface -slug: wallets/reference/aa-sdk/core/interfaces/UserOperationRequest_v6 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/types.ts:138](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L138) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `callData` - - `` `0x${string}` `` -
- `callGasLimit` - - `` `0x${string}` `` -
- `initCode` - - `` `0x${string}` `` -
- `maxFeePerGas` - - `` `0x${string}` `` -
- `maxPriorityFeePerGas` - - `` `0x${string}` `` -
- `nonce` - - `` `0x${string}` `` -
- `paymasterAndData` - - `` `0x${string}` `` -
- `preVerificationGas` - - `` `0x${string}` `` -
- `sender` - - `` `0x${string}` `` -
- `signature` - - `` `0x${string}` `` -
- `verificationGasLimit` - - `` `0x${string}` `` -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v7.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v7.mdx deleted file mode 100644 index ba1253b520..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationRequest_v7.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: UserOperationRequest_v7 -description: Overview of the UserOperationRequest_v7 interface -slug: wallets/reference/aa-sdk/core/interfaces/UserOperationRequest_v7 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/types.ts:165](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L165) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `callData` - - `` `0x${string}` `` -
- `callGasLimit` - - `` `0x${string}` `` -
- `factory?` - - `` `0x${string}` `` -
- `factoryData?` - - `` `0x${string}` `` -
- `maxFeePerGas` - - `` `0x${string}` `` -
- `maxPriorityFeePerGas` - - `` `0x${string}` `` -
- `nonce` - - `` `0x${string}` `` -
- `paymaster?` - - `` `0x${string}` `` -
- `paymasterData?` - - `` `0x${string}` `` -
- `paymasterPostOpGasLimit?` - - `` `0x${string}` `` -
- `paymasterVerificationGasLimit?` - - `` `0x${string}` `` -
- `preVerificationGas` - - `` `0x${string}` `` -
- `sender` - - `` `0x${string}` `` -
- `signature` - - `` `0x${string}` `` -
- `verificationGasLimit` - - `` `0x${string}` `` -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationResponse.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationResponse.mdx deleted file mode 100644 index 747ff082ee..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationResponse.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: UserOperationResponse -description: Overview of the UserOperationResponse interface -slug: wallets/reference/aa-sdk/core/interfaces/UserOperationResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/types.ts:238](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L238) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `blockHash` - - `` `0x${string}` `` -
- `blockNumber` - - `any` -
- `entryPoint` - - `` `0x${string}` `` -
- `transactionHash` - - `` `0x${string}` `` -
- `userOperation` - - [`UserOperationRequest`](../type-aliases/UserOperationRequest)\<`TEntryPointVersion`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v6.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v6.mdx deleted file mode 100644 index 6b1b55c48e..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v6.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: UserOperationStruct_v6 -description: Overview of the UserOperationStruct_v6 interface -slug: wallets/reference/aa-sdk/core/interfaces/UserOperationStruct_v6 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/types.ts:282](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L282) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `callData` - - [`BytesLike`](../type-aliases/BytesLike) -
- `callGasLimit?` - - `any` -
- `initCode` - - [`BytesLike`](../type-aliases/BytesLike) -
- `maxFeePerGas?` - - `any` -
- `maxPriorityFeePerGas?` - - `any` -
- `nonce` - - `any` -
- `paymasterAndData` - - [`BytesLike`](../type-aliases/BytesLike) -
- `preVerificationGas?` - - `any` -
- `sender` - - `string` -
- `signature` - - [`BytesLike`](../type-aliases/BytesLike) -
- `verificationGasLimit?` - - `any` -
diff --git a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v7.mdx b/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v7.mdx deleted file mode 100644 index 7a1fa533f3..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/interfaces/UserOperationStruct_v7.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: UserOperationStruct_v7 -description: Overview of the UserOperationStruct_v7 interface -slug: wallets/reference/aa-sdk/core/interfaces/UserOperationStruct_v7 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/core/src/types.ts:309](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L309) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `callData` - - [`BytesLike`](../type-aliases/BytesLike) -
- `callGasLimit?` - - `any` -
- `factory?` - - `string` -
- `factoryData?` - - [`BytesLike`](../type-aliases/BytesLike) -
- `maxFeePerGas?` - - `any` -
- `maxPriorityFeePerGas?` - - `any` -
- `nonce` - - `any` -
- `paymaster?` - - `string` -
- `paymasterData?` - - [`BytesLike`](../type-aliases/BytesLike) -
- `paymasterPostOpGasLimit?` - - `any` -
- `paymasterVerificationGasLimit?` - - `any` -
- `preVerificationGas?` - - `any` -
- `sender` - - `string` -
- `signature` - - [`BytesLike`](../type-aliases/BytesLike) -
- `verificationGasLimit?` - - `any` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/AccountOp.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/AccountOp.mdx deleted file mode 100644 index e4dd6284d2..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/AccountOp.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: AccountOp -description: Overview of AccountOp -slug: wallets/reference/aa-sdk/core/type-aliases/AccountOp -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AccountOp = object; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L37) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `data` - - [`Hex`](https://viem.sh) | `"0x"` -
- `target` - - [`Address`](https://abitype.dev) -
- `value?` - - `bigint` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/AuthorizationRequest.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/AuthorizationRequest.mdx deleted file mode 100644 index c4216f9fc3..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/AuthorizationRequest.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: AuthorizationRequest -description: Overview of AuthorizationRequest -slug: wallets/reference/aa-sdk/core/type-aliases/AuthorizationRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AuthorizationRequest = OneOf< - | { - address: Address; - } - | { - contractAddress: Address; - } -> & - object; -``` - -Defined in: [aa-sdk/core/src/signer/types.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/types.ts#L26) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
- `chainId` - - `uint32` - - Chain ID. -
- `nonce` - - `uint32` - - Nonce of the EOA to delegate to. -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `uint32` - - `number` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClient.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClient.mdx deleted file mode 100644 index ab78862d4c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClient.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: BaseSmartAccountClient -description: Overview of BaseSmartAccountClient -slug: wallets/reference/aa-sdk/core/type-aliases/BaseSmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BaseSmartAccountClient = Prettify< - Client< - transport, - chain, - account, - [...BundlerRpcSchema, ...PublicRpcSchema], - object & SmartAccountClientOpts & BundlerActions & PublicActions - > ->; -``` - -Defined in: [aa-sdk/core/src/client/smartAccountClient.ts:108](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/smartAccountClient.ts#L108) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `transport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* [`SmartContractAccount`](SmartContractAccount) | `undefined` - - [`SmartContractAccount`](SmartContractAccount) | `undefined` -
- `context` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClientActions.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClientActions.mdx deleted file mode 100644 index de8a16bcc7..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BaseSmartAccountClientActions.mdx +++ /dev/null @@ -1,217 +0,0 @@ ---- -title: BaseSmartAccountClientActions -description: Overview of BaseSmartAccountClientActions -slug: wallets/reference/aa-sdk/core/type-aliases/BaseSmartAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BaseSmartAccountClientActions< - TChain, - TAccount, - TContext, - TEntryPointVersion, -> = object & IsUndefined extends false ? object : object; -``` - -Defined in: [aa-sdk/core/src/client/decorators/smartAccountClient.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/smartAccountClient.ts#L59) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `buildUserOperation()` - - (`args`) => `Promise`\<`UserOperationStruct`\<`TEntryPointVersion`>> -
- `buildUserOperationFromTx()` - - (`args`, `overrides?`, `context?`) => `Promise`\<`UserOperationStruct`\<`TEntryPointVersion`>> -
- `buildUserOperationFromTxs()` - - (`args`) => `Promise`\<`BuildUserOperationFromTransactionsResult`\<`TEntryPointVersion`>> -
- `checkGasSponsorshipEligibility()` - - \<`TContext`, `TEntryPointVersion`>(`args`) => `Promise`\<`CheckGasSponsorshipEligibilityResult`\<`TAccount`, `TEntryPointVersion`>> -
- `dropAndReplaceUserOperation()` - - (`args`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- `sendTransaction()` - - \<`TChainOverride`>(`args`, `overrides?`, `context?`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `sendTransactions()` - - (`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `sendUserOperation()` - - (`args`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- `signMessage()` - - (`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `signTypedData()` - - \<`TTypedData`, `TPrimaryType`>(`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `signUserOperation()` - - (`args`) => `Promise`\<`UserOperationRequest`\<`TEntryPointVersion`>> -
- `upgradeAccount()` - - (`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `waitForUserOperationTransaction()` - - (`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BatchUserOperationCallData.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BatchUserOperationCallData.mdx deleted file mode 100644 index ec17d28c6f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BatchUserOperationCallData.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: BatchUserOperationCallData -description: Overview of BatchUserOperationCallData -slug: wallets/reference/aa-sdk/core/type-aliases/BatchUserOperationCallData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BatchUserOperationCallData = Exclude[]; -``` - -Defined in: [aa-sdk/core/src/types.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L45) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BigNumberish.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BigNumberish.mdx deleted file mode 100644 index 47df178fdb..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BigNumberish.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: BigNumberish -description: Overview of BigNumberish -slug: wallets/reference/aa-sdk/core/type-aliases/BigNumberish -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BigNumberish = z.input; -``` - -Defined in: [aa-sdk/core/src/types.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L31) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BigNumberishRange.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BigNumberishRange.mdx deleted file mode 100644 index 627242cda4..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BigNumberishRange.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: BigNumberishRange -description: Overview of BigNumberishRange -slug: wallets/reference/aa-sdk/core/type-aliases/BigNumberishRange -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BigNumberishRange = z.input; -``` - -Defined in: [aa-sdk/core/src/types.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L32) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildTransactionParameters.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildTransactionParameters.mdx deleted file mode 100644 index 60fd0b2e7e..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildTransactionParameters.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: BuildTransactionParameters -description: Overview of BuildTransactionParameters -slug: wallets/reference/aa-sdk/core/type-aliases/BuildTransactionParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BuildTransactionParameters = - SendTransactionsParameters; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:81](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L81) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - ‐ -
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationFromTransactionsResult.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationFromTransactionsResult.mdx deleted file mode 100644 index 8c15ad0143..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationFromTransactionsResult.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: BuildUserOperationFromTransactionsResult -description: Overview of BuildUserOperationFromTransactionsResult -slug: wallets/reference/aa-sdk/core/type-aliases/BuildUserOperationFromTransactionsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BuildUserOperationFromTransactionsResult = object & - UserOperationOverridesParameter; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:130](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L130) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `batch` - - `BatchUserOperationCallData` -
- `uoStruct` - - `UserOperationStruct`\<`TEntryPointVersion`> -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationParameters.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationParameters.mdx deleted file mode 100644 index fe5968082d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BuildUserOperationParameters.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: BuildUserOperationParameters -description: Overview of BuildUserOperationParameters -slug: wallets/reference/aa-sdk/core/type-aliases/BuildUserOperationParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BuildUserOperationParameters = - SendUserOperationParameters; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L45) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - ‐ -
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerActions.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerActions.mdx deleted file mode 100644 index 9c0b5cbb08..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerActions.mdx +++ /dev/null @@ -1,331 +0,0 @@ ---- -title: BundlerActions -description: Overview of BundlerActions -slug: wallets/reference/aa-sdk/core/type-aliases/BundlerActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BundlerActions = object; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L53) - -## Methods - -### estimateUserOperationGas() - -```ts -estimateUserOperationGas( - request, - entryPoint, - stateOverride?): Promise>; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L62) - -calls `eth_estimateUserOperationGas` and returns the result - -#### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `request` - - [`UserOperationRequest`](UserOperationRequest)\<`TEntryPointVersion`> - - the UserOperationRequest to estimate gas for -
- `entryPoint` - - `` `0x${string}` `` - - the entry point address the op will be sent to -
- `stateOverride?` - - [`StateOverride`](https://viem.sh) - - the state override to use for the estimation -
- -#### Returns - -`Promise`\<[`UserOperationEstimateGasResponse`](../interfaces/UserOperationEstimateGasResponse)\<`TEntryPointVersion`>> - -the gas estimates for the given response - ---- - -### getSupportedEntryPoints() - -```ts -getSupportedEntryPoints(): Promise<`0x${string}`[]>; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:109](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L109) - -calls `eth_supportedEntryPoints` and returns the entry points the RPC supports - -#### Returns - -`Promise`\<`` `0x${string}` ``\[]> - -- an array of the entrypoint addresses supported - ---- - -### getUserOperationByHash() - -```ts -getUserOperationByHash(hash): Promise< - | null - | UserOperationResponse>; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L90) - -calls `eth_getUserOperationByHash` and returns the UserOperationResponse - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `hash` - - `` `0x${string}` `` - - the hash of the UserOperation to fetch -
- -#### Returns - -`Promise`\< -| `null` -| [`UserOperationResponse`](../interfaces/UserOperationResponse)\<`EntryPointVersion`>> - -- the user operation if found or null - ---- - -### getUserOperationReceipt() - -```ts -getUserOperationReceipt(hash, tag?): Promise; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:99](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L99) - -calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `hash` - - `` `0x${string}` `` - - the hash of the UserOperation to get the receipt for -
- `tag?` - - `"latest"` | `"pending"` - - if client want to get receipt for different block tag. -
- -#### Returns - -`Promise`\<`null` | [`UserOperationReceipt`](../interfaces/UserOperationReceipt)> - -- a user operation receipt or null if not found - ---- - -### sendRawUserOperation() - -```ts -sendRawUserOperation(request, entryPoint): Promise<`0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:77](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L77) - -calls `eth_sendUserOperation` and returns the hash of the sent UserOperation - -#### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> - - keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`> -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `request` - - [`UserOperationRequest`](UserOperationRequest)\<`TEntryPointVersion`> - - the UserOperationRequest to send -
- `entryPoint` - - `` `0x${string}` `` - - the entry point address the op will be sent to -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -the hash of the sent UserOperation diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerClient.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerClient.mdx deleted file mode 100644 index a278c75779..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerClient.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: BundlerClient -description: Overview of BundlerClient -slug: wallets/reference/aa-sdk/core/type-aliases/BundlerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BundlerClient = Client< - T, - Chain, - undefined, - [...PublicRpcSchema, ...BundlerRpcSchema], - PublicActions & BundlerActions ->; -``` - -Defined in: [aa-sdk/core/src/client/bundlerClient.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/bundlerClient.ts#L23) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `T` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerRpcSchema.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerRpcSchema.mdx deleted file mode 100644 index 412f99e12a..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BundlerRpcSchema.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: BundlerRpcSchema -description: Overview of BundlerRpcSchema -slug: wallets/reference/aa-sdk/core/type-aliases/BundlerRpcSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BundlerRpcSchema = [ - { - Method: "eth_sendUserOperation"; - Parameters: [UserOperationRequest, Address]; - ReturnType: Hash; - }, - { - Method: "eth_estimateUserOperationGas"; - Parameters: [UserOperationRequest, Address, RpcStateOverride?]; - ReturnType: UserOperationEstimateGasResponse; - }, - { - Method: "eth_getUserOperationReceipt"; - Parameters: [Hash, ("pending" | "latest")?]; - ReturnType: UserOperationReceipt | null; - }, - { - Method: "eth_getUserOperationByHash"; - Parameters: [Hash]; - ReturnType: UserOperationResponse | null; - }, - { - Method: "eth_supportedEntryPoints"; - Parameters: []; - ReturnType: Address[]; - }, -]; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L25) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/BytesLike.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/BytesLike.mdx deleted file mode 100644 index b75dfb4074..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/BytesLike.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: BytesLike -description: Overview of BytesLike -slug: wallets/reference/aa-sdk/core/type-aliases/BytesLike -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BytesLike = Uint8Array | Hex; -``` - -Defined in: [aa-sdk/core/src/types.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L28) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddleware.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddleware.mdx deleted file mode 100644 index 3cef7ebf63..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddleware.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: ClientMiddleware -description: Overview of ClientMiddleware -slug: wallets/reference/aa-sdk/core/type-aliases/ClientMiddleware -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientMiddleware = object; -``` - -Defined in: [aa-sdk/core/src/middleware/types.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/types.ts#L44) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `customMiddleware` - - [`ClientMiddlewareFn`](ClientMiddlewareFn)\<`TContext`> -
- `dummyPaymasterAndData` - - [`ClientMiddlewareFn`](ClientMiddlewareFn)\<`TContext`> -
- `feeEstimator` - - [`ClientMiddlewareFn`](ClientMiddlewareFn)\<`TContext`> -
- `gasEstimator` - - [`ClientMiddlewareFn`](ClientMiddlewareFn)\<`TContext`> -
- `paymasterAndData` - - [`ClientMiddlewareFn`](ClientMiddlewareFn)\<`TContext`> -
- `signUserOperation` - - [`ClientMiddlewareFn`](ClientMiddlewareFn)\<`TContext`> -
- `userOperationSimulator` - - [`ClientMiddlewareFn`](ClientMiddlewareFn)\<`TContext`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareArgs.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareArgs.mdx deleted file mode 100644 index 3179ca05a6..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareArgs.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: ClientMiddlewareArgs -description: Overview of ClientMiddlewareArgs -slug: wallets/reference/aa-sdk/core/type-aliases/ClientMiddlewareArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientMiddlewareArgs = object; -``` - -Defined in: [aa-sdk/core/src/middleware/types.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/types.ts#L14) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` - - ‐ -
- `C` *extends* `MiddlewareClient` - - ‐ -
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `account` - - `TAccount` -
- `client` - - `C` -
- `context?` - - `TContext` -
- `feeOptions?` - - `UserOperationFeeOptions` -
- `overrides?` - - `UserOperationOverrides`\<`TEntryPointVersion`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareConfig.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareConfig.mdx deleted file mode 100644 index 5117df50a8..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareConfig.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: ClientMiddlewareConfig -description: Overview of ClientMiddlewareConfig -slug: wallets/reference/aa-sdk/core/type-aliases/ClientMiddlewareConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientMiddlewareConfig = Partial>; -``` - -Defined in: [aa-sdk/core/src/client/types.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/types.ts#L28) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareFn.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareFn.mdx deleted file mode 100644 index aee1f2560a..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/ClientMiddlewareFn.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: ClientMiddlewareFn -description: Overview of ClientMiddlewareFn -slug: wallets/reference/aa-sdk/core/type-aliases/ClientMiddlewareFn -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientMiddlewareFn = ( - struct, - args, -) => Promise>>; -``` - -Defined in: [aa-sdk/core/src/middleware/types.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/types.ts#L30) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` - - ‐ -
- `C` *extends* `MiddlewareClient` - - ‐ -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `struct` - - `Deferrable`\<`UserOperationStruct`\<`TEntryPointVersion`>> -
- `args` - - [`ClientMiddlewareArgs`](ClientMiddlewareArgs)\<`TAccount`, `C`, `TContext`, `TEntryPointVersion`> -
- -## Returns - -`Promise`\<`Deferrable`\<`UserOperationStruct`\<`TEntryPointVersion`>>> diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/ConnectionConfig.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/ConnectionConfig.mdx deleted file mode 100644 index bbfbdb9943..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/ConnectionConfig.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ConnectionConfig -description: Overview of ConnectionConfig -slug: wallets/reference/aa-sdk/core/type-aliases/ConnectionConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ConnectionConfig = z.input; -``` - -Defined in: [aa-sdk/core/src/client/types.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/types.ts#L14) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/ConnectorData.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/ConnectorData.mdx deleted file mode 100644 index 7b2b01bf47..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/ConnectorData.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: ConnectorData -description: Overview of ConnectorData -slug: wallets/reference/aa-sdk/core/type-aliases/ConnectorData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ConnectorData = object; -``` - -Defined in: [aa-sdk/core/src/client/types.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/types.ts#L10) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `chainId?` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/DefaultEntryPointVersion.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/DefaultEntryPointVersion.mdx deleted file mode 100644 index 785eda17d0..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/DefaultEntryPointVersion.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: DefaultEntryPointVersion -description: Overview of DefaultEntryPointVersion -slug: wallets/reference/aa-sdk/core/type-aliases/DefaultEntryPointVersion -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type DefaultEntryPointVersion = OneOf<"0.6.0", EntryPointVersion>; -``` - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L21) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Deferrable.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Deferrable.mdx deleted file mode 100644 index 475d59b806..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Deferrable.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Deferrable -description: Overview of Deferrable -slug: wallets/reference/aa-sdk/core/type-aliases/Deferrable -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Deferrable = { [K in keyof T]: PromiseOrValue }; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L22) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/DropAndReplaceUserOperationParameters.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/DropAndReplaceUserOperationParameters.mdx deleted file mode 100644 index d4b5a58477..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/DropAndReplaceUserOperationParameters.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: DropAndReplaceUserOperationParameters -description: Overview of DropAndReplaceUserOperationParameters -slug: wallets/reference/aa-sdk/core/type-aliases/DropAndReplaceUserOperationParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type DropAndReplaceUserOperationParameters< - TAccount, - TContext, - TEntryPointVersion, -> = object & - GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L90) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `uoToDrop` - - `UserOperationRequest`\<`TEntryPointVersion`> -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - ‐ -
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/EQ.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/EQ.mdx deleted file mode 100644 index 3dfa33f8f5..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/EQ.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: EQ -description: Overview of EQ -slug: wallets/reference/aa-sdk/core/type-aliases/EQ -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EQ = [A] extends [B] ? ([B] extends [A] ? true : false) : false; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L51) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `A` -
- `B` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Eip7702ExtendedFields.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Eip7702ExtendedFields.mdx deleted file mode 100644 index 567f0fccf3..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Eip7702ExtendedFields.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: Eip7702ExtendedFields -description: Overview of Eip7702ExtendedFields -slug: wallets/reference/aa-sdk/core/type-aliases/Eip7702ExtendedFields -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Eip7702ExtendedFields = object; -``` - -Defined in: [aa-sdk/core/src/types.ts:198](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L198) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `eip7702Auth?` - - `object` -
- `eip7702Auth.address` - - [`Address`](https://abitype.dev) -
- `eip7702Auth.chainId` - - [`Hex`](https://viem.sh) -
- `eip7702Auth.nonce` - - [`Hex`](https://viem.sh) -
- `eip7702Auth.r` - - [`Hex`](https://viem.sh) -
- `eip7702Auth.s` - - [`Hex`](https://viem.sh) -
- `eip7702Auth.yParity` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/EmptyHex.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/EmptyHex.mdx deleted file mode 100644 index 29c359ba30..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/EmptyHex.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: EmptyHex -description: Overview of EmptyHex -slug: wallets/reference/aa-sdk/core/type-aliases/EmptyHex -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EmptyHex = "0x"; -``` - -Defined in: [aa-sdk/core/src/types.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L23) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointDef.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointDef.mdx deleted file mode 100644 index 616476ee70..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointDef.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: EntryPointDef -description: Overview of EntryPointDef -slug: wallets/reference/aa-sdk/core/type-aliases/EntryPointDef -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EntryPointDef = object; -``` - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L68) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - [`EntryPointVersion`](EntryPointVersion) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TAbi` *extends* [`Abi`](https://abitype.dev) | readonly `unknown`\[] - - [`Abi`](https://abitype.dev) -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `abi` - - [`GetContractParameters`](https://viem.sh)\<[`Transport`](https://viem.sh), `TChain`, [`Account`](https://viem.sh), `TAbi`>\[`"abi"`] -
- `address` - - [`Address`](https://abitype.dev) -
- `chain` - - `TChain` -
- `getUserOperationHash` - - (`request`) => [`Hex`](https://viem.sh) -
- `packUserOperation` - - (`userOperation`) => [`Hex`](https://viem.sh) -
- `version` - - `TEntryPointVersion` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointParameter.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointParameter.mdx deleted file mode 100644 index 31614f7684..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointParameter.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: EntryPointParameter -description: Overview of EntryPointParameter -slug: wallets/reference/aa-sdk/core/type-aliases/EntryPointParameter -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EntryPointParameter = - EQ extends true - ? object - : object; -``` - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:108](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L108) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - ‐ -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointVersion.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointVersion.mdx deleted file mode 100644 index 1df631da9e..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/EntryPointVersion.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: EntryPointVersion -description: Overview of EntryPointVersion -slug: wallets/reference/aa-sdk/core/type-aliases/EntryPointVersion -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EntryPointVersion = keyof EntryPointRegistryBase; -``` - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L20) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/EqualsOneOfTheComponents.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/EqualsOneOfTheComponents.mdx deleted file mode 100644 index 16414734b0..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/EqualsOneOfTheComponents.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: EqualsOneOfTheComponents -description: Overview of EqualsOneOfTheComponents -slug: wallets/reference/aa-sdk/core/type-aliases/EqualsOneOfTheComponents -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EqualsOneOfTheComponents = Union extends infer Component - ? EQ - : never; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:64](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L64) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T` -
- `Union` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677Client.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677Client.mdx deleted file mode 100644 index 36840fd257..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677Client.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Erc7677Client -description: Overview of Erc7677Client -slug: wallets/reference/aa-sdk/core/type-aliases/Erc7677Client -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Erc7677Client = Client< - T, - Chain, - undefined, - Erc7677RpcSchema ->; -``` - -Defined in: [aa-sdk/core/src/middleware/erc7677middleware.ts:54](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/erc7677middleware.ts#L54) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `T` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TContext` *extends* `Record`\<`string`, `any`> - - `Record`\<`string`, `any`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677MiddlewareParams.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677MiddlewareParams.mdx deleted file mode 100644 index 11bb5f6f47..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677MiddlewareParams.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Erc7677MiddlewareParams -description: Overview of Erc7677MiddlewareParams -slug: wallets/reference/aa-sdk/core/type-aliases/Erc7677MiddlewareParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Erc7677MiddlewareParams = object; -``` - -Defined in: [aa-sdk/core/src/middleware/erc7677middleware.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/erc7677middleware.ts#L59) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* `Record`\<`string`, `any`> | `undefined` - - `Record`\<`string`, `any`> | `undefined` -
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `context?` - - (`struct`, `args`) => `Promise`\<`TContext`> | `TContext` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677RpcSchema.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677RpcSchema.mdx deleted file mode 100644 index e82d4fcb5d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Erc7677RpcSchema.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Erc7677RpcSchema -description: Overview of Erc7677RpcSchema -slug: wallets/reference/aa-sdk/core/type-aliases/Erc7677RpcSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Erc7677RpcSchema = [ - { - Method: "pm_getPaymasterStubData"; - Parameters: [UserOperationRequest, Address, Hex, TContext]; - ReturnType: { - isFinal?: boolean; - paymaster?: Address; - paymasterAndData?: Hex; - paymasterData?: Hex; - paymasterPostOpGasLimit?: Hex; - paymasterVerificationGasLimit?: Hex; - sponsor?: { - icon?: string; - name: string; - }; - }; - }, - { - Method: "pm_getPaymasterData"; - Parameters: [UserOperationRequest, Address, Hex, TContext]; - ReturnType: { - paymaster?: Address; - paymasterAndData?: Hex; - paymasterData?: Hex; - paymasterPostOpGasLimit?: Hex; - paymasterVerificationGasLimit?: Hex; - }; - }, -]; -``` - -Defined in: [aa-sdk/core/src/middleware/erc7677middleware.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/erc7677middleware.ts#L25) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* `Record`\<`string`, `any`> - - `Record`\<`string`, `any`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetAccountAddressParams.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/GetAccountAddressParams.mdx deleted file mode 100644 index f77b572178..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetAccountAddressParams.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: GetAccountAddressParams -description: Overview of GetAccountAddressParams -slug: wallets/reference/aa-sdk/core/type-aliases/GetAccountAddressParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetAccountAddressParams = object; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:197](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L197) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accountAddress?` - - [`Address`](https://abitype.dev) -
- `client` - - [`PublicClient`](https://viem.sh) -
- `entryPoint` - - [`EntryPointDef`](EntryPointDef) -
- `getAccountInitCode` - - () => `Promise`\<[`Hex`](https://viem.sh)> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetAccountParameter.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/GetAccountParameter.mdx deleted file mode 100644 index 312d478c71..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetAccountParameter.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: GetAccountParameter -description: Overview of GetAccountParameter -slug: wallets/reference/aa-sdk/core/type-aliases/GetAccountParameter -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetAccountParameter = - IsUndefined extends true ? object : object; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:75](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L75) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`SmartContractAccount`](SmartContractAccount) | `undefined` - - [`SmartContractAccount`](SmartContractAccount) | `undefined` -
- `TAccountOverride` *extends* [`SmartContractAccount`](SmartContractAccount) - - [`SmartContractAccount`](SmartContractAccount) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetContextParameter.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/GetContextParameter.mdx deleted file mode 100644 index 5e6bdbe71d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetContextParameter.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: GetContextParameter -description: Overview of GetContextParameter -slug: wallets/reference/aa-sdk/core/type-aliases/GetContextParameter -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetContextParameter = - IsUndefined extends true ? object : object; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:139](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L139) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointFromAccount.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointFromAccount.mdx deleted file mode 100644 index e600345b57..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointFromAccount.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: GetEntryPointFromAccount -description: Overview of GetEntryPointFromAccount -slug: wallets/reference/aa-sdk/core/type-aliases/GetEntryPointFromAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetEntryPointFromAccount = - GetAccountParameter extends SmartContractAccount< - string, - infer TEntryPointVersion - > - ? TEntryPointVersion - : EntryPointVersion; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:64](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L64) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`SmartContractAccount`](SmartContractAccount) | `undefined` - - ‐ -
- `TAccountOverride` *extends* [`SmartContractAccount`](SmartContractAccount) - - [`SmartContractAccount`](SmartContractAccount) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointOptions.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointOptions.mdx deleted file mode 100644 index a44a69f201..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/GetEntryPointOptions.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: GetEntryPointOptions -description: Overview of GetEntryPointOptions -slug: wallets/reference/aa-sdk/core/type-aliases/GetEntryPointOptions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetEntryPointOptions = - EQ extends true - ? - | { - addressOverride?: Address; - version?: OneOf; - } - | undefined - : object; -``` - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:93](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L93) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - [`DefaultEntryPointVersion`](DefaultEntryPointVersion) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/IsMemberOrSubtypeOfAComponent.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/IsMemberOrSubtypeOfAComponent.mdx deleted file mode 100644 index cdd97cb00c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/IsMemberOrSubtypeOfAComponent.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: IsMemberOrSubtypeOfAComponent -description: Overview of IsMemberOrSubtypeOfAComponent -slug: wallets/reference/aa-sdk/core/type-aliases/IsMemberOrSubtypeOfAComponent -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type IsMemberOrSubtypeOfAComponent< - T, - Union, - ConjunctionOfExplicitComponentChecks, -> = [T] extends [Union] - ? true extends ConjunctionOfExplicitComponentChecks - ? true - : false - : false; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:69](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L69) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T` -
- `Union` -
- `ConjunctionOfExplicitComponentChecks` *extends* `boolean` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/IsOneOf.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/IsOneOf.mdx deleted file mode 100644 index 5757042a88..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/IsOneOf.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: IsOneOf -description: Overview of IsOneOf -slug: wallets/reference/aa-sdk/core/type-aliases/IsOneOf -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type IsOneOf = IsMemberOrSubtypeOfAComponent< - T, - Union, - EqualsOneOfTheComponents ->; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:91](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L91) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T` -
- `Union` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/IsUndefined.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/IsUndefined.mdx deleted file mode 100644 index 0b098d5151..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/IsUndefined.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: IsUndefined -description: Checks if T is `undefined` -slug: wallets/reference/aa-sdk/core/type-aliases/IsUndefined -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type IsUndefined = [undefined] extends [T] ? true : false; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L21) - -Checks if T is `undefined` - -## Example - -```ts -type Result = IsUndefined; -// ^? type Result = true -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDescription
- `T` - - Type to check -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/MiddlewareClient.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/MiddlewareClient.mdx deleted file mode 100644 index 9796891687..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/MiddlewareClient.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: MiddlewareClient -description: Middleware client type -slug: wallets/reference/aa-sdk/core/type-aliases/MiddlewareClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MiddlewareClient = Client< - TTransport, - TChain, - TAccount, - [...BundlerRpcSchema, ...PublicRpcSchema], - PublicActions & BundlerActions ->; -``` - -Defined in: [aa-sdk/core/src/middleware/actions.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/actions.ts#L28) - -Middleware client type - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault typeDescription
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) - -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` - -
- `TAccount` *extends* [`SmartContractAccount`](SmartContractAccount) | `undefined` - - [`SmartContractAccount`](SmartContractAccount) | `undefined` - -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Multiplier.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Multiplier.mdx deleted file mode 100644 index d62b2ef8c8..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Multiplier.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Multiplier -description: Overview of Multiplier -slug: wallets/reference/aa-sdk/core/type-aliases/Multiplier -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Multiplier = z.input; -``` - -Defined in: [aa-sdk/core/src/types.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L29) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Never.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Never.mdx deleted file mode 100644 index 4770a9f7ca..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Never.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Never -description: Overview of Never -slug: wallets/reference/aa-sdk/core/type-aliases/Never -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Never = T extends object ? { [K in keyof T]?: never } : never; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L23) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/NoUndefined.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/NoUndefined.mdx deleted file mode 100644 index d933fdb468..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/NoUndefined.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: NoUndefined -description: Constructs a type by excluding `undefined` from `T`. -slug: wallets/reference/aa-sdk/core/type-aliases/NoUndefined -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type NoUndefined = T extends undefined ? never : T; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L10) - -Constructs a type by excluding `undefined` from `T`. - -## Example - -```ts -NoUndefined -=> string -``` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/NotType.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/NotType.mdx deleted file mode 100644 index afb22c3a52..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/NotType.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: NotType -description: Used to ensure type doesn't extend another, for use in & chaining of properties -slug: wallets/reference/aa-sdk/core/type-aliases/NotType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type NotType = A extends B ? never : unknown; -``` - -Defined in: [aa-sdk/core/src/utils/index.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/index.ts#L29) - -Used to ensure type doesn't extend another, for use in & chaining of properties - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `A` -
- `B` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/NullAddress.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/NullAddress.mdx deleted file mode 100644 index 6ea6cd7abd..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/NullAddress.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: NullAddress -description: Overview of NullAddress -slug: wallets/reference/aa-sdk/core/type-aliases/NullAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type NullAddress = "0x0"; -``` - -Defined in: [aa-sdk/core/src/types.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L24) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/OneOf.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/OneOf.mdx deleted file mode 100644 index 5795819d17..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/OneOf.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: OneOf -description: Overview of OneOf -slug: wallets/reference/aa-sdk/core/type-aliases/OneOf -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OneOf = IsOneOf extends true ? T1 : never; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:97](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L97) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T1` -
- `T2` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/OptionalFields.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/OptionalFields.mdx deleted file mode 100644 index 04d60c3923..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/OptionalFields.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: OptionalFields -description: Overview of OptionalFields -slug: wallets/reference/aa-sdk/core/type-aliases/OptionalFields -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OptionalFields = Pick, K> & Omit; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:104](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L104) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T` -
- `K` *extends* keyof `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/Prettify.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/Prettify.mdx deleted file mode 100644 index ae1ae86b91..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/Prettify.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Prettify -description: Combines members of an intersection into a readable type. -slug: wallets/reference/aa-sdk/core/type-aliases/Prettify -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Prettify = { [K in keyof T]: T[K] } & object; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L42) - -Combines members of an intersection into a readable type. - -## Example - -```ts -Prettify<{ a: string } & { b: string } & { c: number, d: bigint }> -=> { a: string, b: string, c: number, d: bigint } -``` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
- -## See - -https://twitter.com/mattpocockuk/status/1622730173446557697?s=20\&t=NdpAcmEFXY01xkqU3KO0Mg diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/PromiseOrValue.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/PromiseOrValue.mdx deleted file mode 100644 index 742617bfd7..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/PromiseOrValue.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: PromiseOrValue -description: Overview of PromiseOrValue -slug: wallets/reference/aa-sdk/core/type-aliases/PromiseOrValue -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PromiseOrValue = T | Promise; -``` - -Defined in: [aa-sdk/core/src/types.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L27) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/RecordableKeys.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/RecordableKeys.mdx deleted file mode 100644 index 61d4d824ed..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/RecordableKeys.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: RecordableKeys -description: Overview of RecordableKeys -slug: wallets/reference/aa-sdk/core/type-aliases/RecordableKeys -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RecordableKeys = { - [K in keyof T]: T[K] extends string | number | symbol ? K : never; -}[keyof T]; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:99](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L99) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/RequiredBy.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/RequiredBy.mdx deleted file mode 100644 index 6d4aa8b619..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/RequiredBy.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: RequiredBy -description: Overview of RequiredBy -slug: wallets/reference/aa-sdk/core/type-aliases/RequiredBy -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RequiredBy = Required> & - Omit; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L29) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `TType` -
- `TKeys` *extends* keyof `TType` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SendTransactionsParameters.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SendTransactionsParameters.mdx deleted file mode 100644 index 132dfb0a82..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SendTransactionsParameters.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: SendTransactionsParameters -description: Overview of SendTransactionsParameters -slug: wallets/reference/aa-sdk/core/type-aliases/SendTransactionsParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendTransactionsParameters = - object & - GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L68) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `requests` - - [`RpcTransactionRequest`](https://viem.sh)\[] -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - ‐ -
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationParameters.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationParameters.mdx deleted file mode 100644 index b65c0cc83e..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationParameters.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: SendUserOperationParameters -description: Overview of SendUserOperationParameters -slug: wallets/reference/aa-sdk/core/type-aliases/SendUserOperationParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendUserOperationParameters = - object & - GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L32) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `uo` - - `UserOperationCallData` | `BatchUserOperationCallData` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - ‐ -
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationResult.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationResult.mdx deleted file mode 100644 index 6640f6117d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SendUserOperationResult.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: SendUserOperationResult -description: Overview of SendUserOperationResult -slug: wallets/reference/aa-sdk/core/type-aliases/SendUserOperationResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendUserOperationResult = object; -``` - -Defined in: [aa-sdk/core/src/client/types.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/types.ts#L16) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - [`EntryPointVersion`](EntryPointVersion) -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `hash` - - [`Hash`](https://viem.sh) -
- `request` - - [`UserOperationRequest`](UserOperationRequest)\<`TEntryPointVersion`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SignUserOperationParameters.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SignUserOperationParameters.mdx deleted file mode 100644 index a77d774e63..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SignUserOperationParameters.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: SignUserOperationParameters -description: Overview of SignUserOperationParameters -slug: wallets/reference/aa-sdk/core/type-aliases/SignUserOperationParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignUserOperationParameters = - object & GetAccountParameter & GetContextParameter; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:54](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L54) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `uoStruct` - - `UserOperationStruct`\<`TEntryPointVersion`> -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SignatureRequest.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SignatureRequest.mdx deleted file mode 100644 index de7f735c75..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SignatureRequest.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: SignatureRequest -description: Overview of SignatureRequest -slug: wallets/reference/aa-sdk/core/type-aliases/SignatureRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignatureRequest = - | { - data: SignableMessage; - type: "personal_sign"; - } - | { - data: TypedDataDefinition; - type: "eth_signTypedData_v4"; - }; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L49) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SigningMethods.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SigningMethods.mdx deleted file mode 100644 index 6c2a5c8544..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SigningMethods.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: SigningMethods -description: Overview of SigningMethods -slug: wallets/reference/aa-sdk/core/type-aliases/SigningMethods -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SigningMethods = object; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L59) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `formatSign` - - (`signature`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `prepareSign` - - (`request`) => `Promise`\<[`SignatureRequest`](SignatureRequest)> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClient.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClient.mdx deleted file mode 100644 index 2e6ea8061f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClient.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: SmartAccountClient -description: Overview of SmartAccountClient -slug: wallets/reference/aa-sdk/core/type-aliases/SmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartAccountClient< - transport, - chain, - account, - actions, - rpcSchema, - context, -> = Prettify< - Client< - transport, - chain, - account, - rpcSchema, - actions & SmartAccountClientActions - > ->; -``` - -Defined in: [aa-sdk/core/src/client/smartAccountClient.ts:87](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/smartAccountClient.ts#L87) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `transport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* [`SmartContractAccount`](SmartContractAccount) | `undefined` - - [`SmartContractAccount`](SmartContractAccount) | `undefined` -
- `actions` *extends* `Record`\<`string`, `unknown`> - - `Record`\<`string`, `unknown`> -
- `rpcSchema` *extends* [`RpcSchema`](https://viem.sh) - - [`SmartAccountClientRpcSchema`](SmartAccountClientRpcSchema) -
- `context` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientActions.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientActions.mdx deleted file mode 100644 index d9b7d129d4..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientActions.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: SmartAccountClientActions -description: Overview of SmartAccountClientActions -slug: wallets/reference/aa-sdk/core/type-aliases/SmartAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartAccountClientActions = - BaseSmartAccountClientActions & - BundlerActions & - PublicActions; -``` - -Defined in: [aa-sdk/core/src/client/smartAccountClient.ts:75](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/smartAccountClient.ts#L75) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* [`SmartContractAccount`](SmartContractAccount) | `undefined` - - [`SmartContractAccount`](SmartContractAccount) | `undefined` -
- `context` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientConfig.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientConfig.mdx deleted file mode 100644 index 89af887f25..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientConfig.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: SmartAccountClientConfig -description: Overview of SmartAccountClientConfig -slug: wallets/reference/aa-sdk/core/type-aliases/SmartAccountClientConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartAccountClientConfig = Prettify< - Pick< - ClientConfig, - | "cacheTime" - | "chain" - | "key" - | "name" - | "pollingInterval" - | "transport" - | "type" - > & - object & - ClientMiddlewareConfig ->; -``` - -Defined in: [aa-sdk/core/src/client/smartAccountClient.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/smartAccountClient.ts#L36) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `transport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* [`SmartContractAccount`](SmartContractAccount) | `undefined` - - [`SmartContractAccount`](SmartContractAccount) | `undefined` -
- `context` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientRpcSchema.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientRpcSchema.mdx deleted file mode 100644 index bf0f9388e4..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartAccountClientRpcSchema.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SmartAccountClientRpcSchema -description: Overview of SmartAccountClientRpcSchema -slug: wallets/reference/aa-sdk/core/type-aliases/SmartAccountClientRpcSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartAccountClientRpcSchema = [...BundlerRpcSchema, ...PublicRpcSchema]; -``` - -Defined in: [aa-sdk/core/src/client/smartAccountClient.ts:70](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/smartAccountClient.ts#L70) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccount.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccount.mdx deleted file mode 100644 index dbe5aabaef..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccount.mdx +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: SmartContractAccount -description: Overview of SmartContractAccount -slug: wallets/reference/aa-sdk/core/type-aliases/SmartContractAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartContractAccount = LocalAccount & - object & - SigningMethods; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:119](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L119) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `encodeBatchExecute()` - - (`txs`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `encodeExecute()` - - (`tx`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `encodeUpgradeToAndCall()` - - (`params`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `getDummySignature()` - - () => [`Hex`](https://viem.sh) | `Promise`\<[`Hex`](https://viem.sh)> -
- `getEntryPoint()` - - () => [`EntryPointDef`](EntryPointDef)\<`TEntryPointVersion`> -
- `getFactoryAddress()` - - () => `Promise`\<[`Address`](https://abitype.dev)> -
- `getFactoryData()` - - () => `Promise`\<[`Hex`](https://viem.sh)> -
- `getImplementationAddress()` - - () => `Promise`\<[`NullAddress`](NullAddress) | [`Address`](https://abitype.dev)> -
- `getInitCode()` - - () => `Promise`\<[`Hex`](https://viem.sh)> -
- `isAccountDeployed()` - - () => `Promise`\<`boolean`> -
- `signMessageWith6492()` - - (`params`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `signTypedDataWith6492()` - - \<`typedData`, `primaryType`>(`typedDataDefinition`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `signUserOperationHash()` - - (`uoHash`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `source` - - `Name` -
- `getAccountNonce()` - - (`nonceKey?`) => `Promise`\<`bigint`> -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `Name` *extends* `string` - - `string` -
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - [`EntryPointVersion`](EntryPointVersion) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccountWithSigner.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccountWithSigner.mdx deleted file mode 100644 index 1f876b54d8..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SmartContractAccountWithSigner.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: SmartContractAccountWithSigner -description: Overview of SmartContractAccountWithSigner -slug: wallets/reference/aa-sdk/core/type-aliases/SmartContractAccountWithSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartContractAccountWithSigner = - SmartContractAccount & object; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L90) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `getSigner()` - - () => `TSigner` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `Name` *extends* `string` - - `string` -
- `TSigner` *extends* [`SmartAccountSigner`](../interfaces/SmartAccountSigner) - - [`SmartAccountSigner`](../interfaces/SmartAccountSigner) -
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - [`EntryPointVersion`](EntryPointVersion) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/SupportedEntryPoint.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/SupportedEntryPoint.mdx deleted file mode 100644 index ef4be47f19..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/SupportedEntryPoint.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: SupportedEntryPoint -description: Overview of SupportedEntryPoint -slug: wallets/reference/aa-sdk/core/type-aliases/SupportedEntryPoint -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SupportedEntryPoint = object; -``` - -Defined in: [aa-sdk/core/src/entrypoint/types.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/types.ts#L23) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - [`EntryPointVersion`](EntryPointVersion) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TAbi` *extends* [`Abi`](https://abitype.dev) | readonly `unknown`\[] - - [`Abi`](https://abitype.dev) -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `abi` - - [`GetContractParameters`](https://viem.sh)\<[`Transport`](https://viem.sh), `TChain`, [`Account`](https://viem.sh), `TAbi`>\[`"abi"`] - - ‐ -
- `address` - - `Record`\<`TChain`\[`"id"`] | `"default"`, [`Address`](https://abitype.dev)> - - ‐ -
- `getUserOperationHash` - - (`request`, `entryPointAddress`, `chainId`) => [`Hash`](https://viem.sh) - - Generates a hash for a UserOperation valid from entry point version 0.6 onwards -
- `packUserOperation` - - (`userOperation`) => [`Hex`](https://viem.sh) - - Pack the user operation data into bytes for hashing for entry point version 0.6 onwards - Reference: - v6: https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOp.ts#L16-L61 - v7: https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOp.ts#L28-L67 -
- `version` - - `TEntryPointVersion` - - ‐ -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/ToSmartContractAccountParams.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/ToSmartContractAccountParams.mdx deleted file mode 100644 index 90b1897647..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/ToSmartContractAccountParams.mdx +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: ToSmartContractAccountParams -description: Overview of ToSmartContractAccountParams -slug: wallets/reference/aa-sdk/core/type-aliases/ToSmartContractAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ToSmartContractAccountParams = object & Omit & - | SigningMethods - | Never; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:153](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L153) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accountAddress?` - - [`Address`](https://abitype.dev) -
- `chain` - - `TChain` -
- `encodeBatchExecute()?` - - (`txs`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `encodeExecute()` - - (`tx`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `encodeUpgradeToAndCall()?` - - (`params`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `entryPoint` - - [`EntryPointDef`](EntryPointDef)\<`TEntryPointVersion`, `TChain`> -
- `getAccountInitCode()` - - () => `Promise`\<[`Hex`](https://viem.sh)> -
- `getDummySignature()` - - () => [`Hex`](https://viem.sh) | `Promise`\<[`Hex`](https://viem.sh)> -
- `getImplementationAddress()?` - - () => `Promise`\<[`NullAddress`](NullAddress) | [`Address`](https://abitype.dev)> -
- `getNonce()?` - - (`nonceKey?`) => `Promise`\<`bigint`> -
- `signUserOperationHash()?` - - (`uoHash`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `source` - - `Name` -
- `transport` - - `TTransport` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `Name` *extends* `string` - - `string` -
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TEntryPointVersion` *extends* [`EntryPointVersion`](EntryPointVersion) - - [`EntryPointVersion`](EntryPointVersion) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UnpackedSignature.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UnpackedSignature.mdx deleted file mode 100644 index 3369d4b8d7..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UnpackedSignature.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: UnpackedSignature -description: Overview of UnpackedSignature -slug: wallets/reference/aa-sdk/core/type-aliases/UnpackedSignature -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UnpackedSignature = object; -``` - -Defined in: [aa-sdk/core/src/utils/bytes.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bytes.ts#L25) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `r` - - `` `0x${string}` `` -
- `s` - - `` `0x${string}` `` -
- `v` - - `bigint` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeAccountParams.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeAccountParams.mdx deleted file mode 100644 index 85d7c0a420..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeAccountParams.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: UpgradeAccountParams -description: Overview of UpgradeAccountParams -slug: wallets/reference/aa-sdk/core/type-aliases/UpgradeAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UpgradeAccountParams = object & - GetAccountParameter & - GetContextParameter & - UserOperationOverridesParameter; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L18) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `upgradeTo` - - `UpgradeToData` -
- `waitForTx?` - - `boolean` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - ‐ -
- `TContext` *extends* [`UserOperationContext`](UserOperationContext) | `undefined` - - [`UserOperationContext`](UserOperationContext) | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToAndCallParams.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToAndCallParams.mdx deleted file mode 100644 index 4cad83cbf3..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToAndCallParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: UpgradeToAndCallParams -description: Overview of UpgradeToAndCallParams -slug: wallets/reference/aa-sdk/core/type-aliases/UpgradeToAndCallParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UpgradeToAndCallParams = object; -``` - -Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:85](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/account/smartContractAccount.ts#L85) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `upgradeToAddress` - - [`Address`](https://abitype.dev) -
- `upgradeToInitData` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToData.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToData.mdx deleted file mode 100644 index 849948af3d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UpgradeToData.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: UpgradeToData -description: Overview of UpgradeToData -slug: wallets/reference/aa-sdk/core/type-aliases/UpgradeToData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UpgradeToData = object; -``` - -Defined in: [aa-sdk/core/src/client/types.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/types.ts#L23) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `implAddress` - - [`Address`](https://abitype.dev) -
- `initializationData` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationCallData.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationCallData.mdx deleted file mode 100644 index de2ac55f4b..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationCallData.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: UserOperationCallData -description: Overview of UserOperationCallData -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationCallData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationCallData = - | { - data: Hex; - target: Address; - value?: bigint; - } - | Hex; -``` - -Defined in: [aa-sdk/core/src/types.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L34) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationContext.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationContext.mdx deleted file mode 100644 index b8da858a01..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationContext.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UserOperationContext -description: Overview of UserOperationContext -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationContext -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationContext = Record; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:137](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L137) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptions.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptions.mdx deleted file mode 100644 index dcf75fe86f..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptions.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: UserOperationFeeOptions -description: Overview of UserOperationFeeOptions -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationFeeOptions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationFeeOptions = - TEntryPointVersion extends "0.6.0" - ? z.input - : TEntryPointVersion extends "0.7.0" - ? z.input - : z.input; -``` - -Defined in: [aa-sdk/core/src/types.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L51) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptionsField.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptionsField.mdx deleted file mode 100644 index b485828232..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationFeeOptionsField.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: UserOperationFeeOptionsField -description: Overview of UserOperationFeeOptionsField -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationFeeOptionsField -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationFeeOptionsField = z.input< - typeof UserOperationFeeOptionsFieldSchema ->; -``` - -Defined in: [aa-sdk/core/src/types.ts:47](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L47) diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverrides.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverrides.mdx deleted file mode 100644 index b857122fdb..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverrides.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: UserOperationOverrides -description: Overview of UserOperationOverrides -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationOverrides -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationOverrides = Partial< - object & UserOperationPaymasterOverrides -> & - Partial< - | { - nonce: never; - nonceKey: bigint; - } - | { - nonce: bigint; - nonceKey: never; - } - >; -``` - -Defined in: [aa-sdk/core/src/types.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L90) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverridesParameter.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverridesParameter.mdx deleted file mode 100644 index 44981636b3..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationOverridesParameter.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: UserOperationOverridesParameter -description: Overview of UserOperationOverridesParameter -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationOverridesParameter -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationOverridesParameter = - Required extends true ? object : object; -``` - -Defined in: [aa-sdk/core/src/types.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L59) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- `Required` *extends* `boolean` - - `false` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationPaymasterOverrides.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationPaymasterOverrides.mdx deleted file mode 100644 index c48c423866..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationPaymasterOverrides.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: UserOperationPaymasterOverrides -description: Overview of UserOperationPaymasterOverrides -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationPaymasterOverrides -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationPaymasterOverrides = - TEntryPointVersion extends "0.6.0" - ? object - : TEntryPointVersion extends "0.7.0" - ? object - : object; -``` - -Defined in: [aa-sdk/core/src/types.ts:66](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L66) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationRequest.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationRequest.mdx deleted file mode 100644 index 44e10d4e40..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationRequest.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: UserOperationRequest -description: Overview of UserOperationRequest -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationRequest = - TEntryPointVersion extends "0.6.0" - ? UserOperationRequest_v6 - : TEntryPointVersion extends "0.7.0" - ? UserOperationRequest_v7 - : never & Eip7702ExtendedFields; -``` - -Defined in: [aa-sdk/core/src/types.ts:210](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L210) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationStruct.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationStruct.mdx deleted file mode 100644 index c1d3bd60a8..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/UserOperationStruct.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: UserOperationStruct -description: Overview of UserOperationStruct -slug: wallets/reference/aa-sdk/core/type-aliases/UserOperationStruct -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOperationStruct = - TEntryPointVersion extends "0.6.0" - ? UserOperationStruct_v6 - : TEntryPointVersion extends "0.7.0" - ? UserOperationStruct_v7 - : never & Eip7702ExtendedFields; -``` - -Defined in: [aa-sdk/core/src/types.ts:342](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/types.ts#L342) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/WaitForUserOperationTxParameters.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/WaitForUserOperationTxParameters.mdx deleted file mode 100644 index 933388aa2d..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/WaitForUserOperationTxParameters.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: WaitForUserOperationTxParameters -description: Overview of WaitForUserOperationTxParameters -slug: wallets/reference/aa-sdk/core/type-aliases/WaitForUserOperationTxParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type WaitForUserOperationTxParameters = object; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/types.ts:103](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/types.ts#L103) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `hash` - - [`Hex`](https://viem.sh) - - ‐ -
- `retries?` - - `object` - - Exponential backoff paramters that can be used to override - the configuration on the client. If not provided, this method - will use the paramters passed via the `opts` parameter on the - smart account client. -
- `retries.intervalMs` - - `number` - - the base retry interval or delay between requests -
- `retries.maxRetries` - - `number` - - the maximum number of retries before failing -
- `retries.multiplier` - - `number` - - the multiplier to exponentiate based on the number retries - setting this to one will result in a linear backoff -
- `tag?` - - `"pending"` | `"latest"` - - The tag to use for the UO status. -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/WithOptional.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/WithOptional.mdx deleted file mode 100644 index 0c3ec69a8b..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/WithOptional.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: WithOptional -description: Overview of WithOptional -slug: wallets/reference/aa-sdk/core/type-aliases/WithOptional -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type WithOptional = Pick, K>; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:47](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L47) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T` -
- `K` *extends* keyof `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/type-aliases/WithRequired.mdx b/docs/pages/reference/aa-sdk/core/src/type-aliases/WithRequired.mdx deleted file mode 100644 index 3cd27327a5..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/type-aliases/WithRequired.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: WithRequired -description: Overview of WithRequired -slug: wallets/reference/aa-sdk/core/type-aliases/WithRequired -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type WithRequired = Required>; -``` - -Defined in: [aa-sdk/core/src/utils/types.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/types.ts#L46) - -## Type Parameters - - - - - - - - - - - - - - - - - - -
Type Parameter
- `T` -
- `K` *extends* keyof `T` -
diff --git a/docs/pages/reference/aa-sdk/core/src/variables/ADD_BREADCRUMB.mdx b/docs/pages/reference/aa-sdk/core/src/variables/ADD_BREADCRUMB.mdx deleted file mode 100644 index a26fd58206..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/ADD_BREADCRUMB.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: ADD_BREADCRUMB -description: The symbol that is used to add a breadcrumb to the headers. Is an optional function that is used to add a breadcrumb to the headers. -slug: wallets/reference/aa-sdk/core/variables/ADD_BREADCRUMB -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const ADD_BREADCRUMB: typeof ADD_BREADCRUMB; -``` - -Defined in: [aa-sdk/core/src/client/addBreadcrumb.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/addBreadcrumb.ts#L5) - -The symbol that is used to add a breadcrumb to the headers. Is an optional -function that is used to add a breadcrumb to the headers. diff --git a/docs/pages/reference/aa-sdk/core/src/variables/BigNumberishRangeSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/BigNumberishRangeSchema.mdx deleted file mode 100644 index 5fc895e431..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/BigNumberishRangeSchema.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: BigNumberishRangeSchema -description: Overview of BigNumberishRangeSchema -slug: wallets/reference/aa-sdk/core/variables/BigNumberishRangeSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const BigNumberishRangeSchema: ZodObject< - { - max: ZodOptional< - ZodUnion< - [ - ZodType<`0x${string}`, ZodTypeDef, `0x${string}`>, - ZodNumber, - ZodBigInt, - ] - > - >; - min: ZodOptional< - ZodUnion< - [ - ZodType<`0x${string}`, ZodTypeDef, `0x${string}`>, - ZodNumber, - ZodBigInt, - ] - > - >; - }, - "strict", - ZodTypeAny, - { - min?: number | bigint | `0x${string}`; - max?: number | bigint | `0x${string}`; - }, - { - min?: number | bigint | `0x${string}`; - max?: number | bigint | `0x${string}`; - } ->; -``` - -Defined in: [aa-sdk/core/src/utils/schema.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/schema.ts#L19) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/BigNumberishSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/BigNumberishSchema.mdx deleted file mode 100644 index 9f6405e047..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/BigNumberishSchema.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: BigNumberishSchema -description: Overview of BigNumberishSchema -slug: wallets/reference/aa-sdk/core/variables/BigNumberishSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const BigNumberishSchema: ZodUnion< - [ZodType<`0x${string}`, ZodTypeDef, `0x${string}`>, ZodNumber, ZodBigInt] ->; -``` - -Defined in: [aa-sdk/core/src/utils/schema.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/schema.ts#L17) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/ChainSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/ChainSchema.mdx deleted file mode 100644 index 81e87d6133..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/ChainSchema.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ChainSchema -description: Overview of ChainSchema -slug: wallets/reference/aa-sdk/core/variables/ChainSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const ChainSchema: ZodType; -``` - -Defined in: [aa-sdk/core/src/utils/schema.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/schema.ts#L5) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/ConnectionConfigSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/ConnectionConfigSchema.mdx deleted file mode 100644 index 15de9f0318..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/ConnectionConfigSchema.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: ConnectionConfigSchema -description: Overview of ConnectionConfigSchema -slug: wallets/reference/aa-sdk/core/variables/ConnectionConfigSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const ConnectionConfigSchema: ZodIntersection< - ZodUnion< - [ - ZodObject< - { - apiKey: ZodString; - jwt: ZodOptional; - rpcUrl: ZodOptional; - }, - "strip", - ZodTypeAny, - { - apiKey: string; - rpcUrl?: undefined; - jwt?: undefined; - }, - { - apiKey: string; - rpcUrl?: undefined; - jwt?: undefined; - } - >, - ZodObject< - { - apiKey: ZodOptional; - jwt: ZodString; - rpcUrl: ZodOptional; - }, - "strip", - ZodTypeAny, - { - jwt: string; - apiKey?: undefined; - rpcUrl?: undefined; - }, - { - jwt: string; - apiKey?: undefined; - rpcUrl?: undefined; - } - >, - ZodObject< - { - apiKey: ZodOptional; - jwt: ZodOptional; - rpcUrl: ZodString; - }, - "strip", - ZodTypeAny, - { - rpcUrl: string; - apiKey?: undefined; - jwt?: undefined; - }, - { - rpcUrl: string; - apiKey?: undefined; - jwt?: undefined; - } - >, - ZodObject< - { - apiKey: ZodOptional; - jwt: ZodString; - rpcUrl: ZodString; - }, - "strip", - ZodTypeAny, - { - rpcUrl: string; - jwt: string; - apiKey?: undefined; - }, - { - rpcUrl: string; - jwt: string; - apiKey?: undefined; - } - >, - ] - >, - ZodObject< - { - chainAgnosticUrl: ZodOptional; - }, - "strip", - ZodTypeAny, - { - chainAgnosticUrl?: string; - }, - { - chainAgnosticUrl?: string; - } - > ->; -``` - -Defined in: [aa-sdk/core/src/client/schema.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/schema.ts#L22) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v6.mdx b/docs/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v6.mdx deleted file mode 100644 index 43eb4dc2ae..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v6.mdx +++ /dev/null @@ -1,1322 +0,0 @@ ---- -title: EntryPointAbi_v6 -description: Overview of EntryPointAbi_v6 -slug: wallets/reference/aa-sdk/core/variables/EntryPointAbi_v6 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const EntryPointAbi_v6: readonly [ - { - inputs: readonly [ - { - internalType: "uint256"; - name: "preOpGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "paid"; - type: "uint256"; - }, - { - internalType: "uint48"; - name: "validAfter"; - type: "uint48"; - }, - { - internalType: "uint48"; - name: "validUntil"; - type: "uint48"; - }, - { - internalType: "bool"; - name: "targetSuccess"; - type: "bool"; - }, - { - internalType: "bytes"; - name: "targetResult"; - type: "bytes"; - }, - ]; - name: "ExecutionResult"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "opIndex"; - type: "uint256"; - }, - { - internalType: "string"; - name: "reason"; - type: "string"; - }, - ]; - name: "FailedOp"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - ]; - name: "SenderAddressResult"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "aggregator"; - type: "address"; - }, - ]; - name: "SignatureValidationFailed"; - type: "error"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "uint256"; - name: "preOpGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "prefund"; - type: "uint256"; - }, - { - internalType: "bool"; - name: "sigFailed"; - type: "bool"; - }, - { - internalType: "uint48"; - name: "validAfter"; - type: "uint48"; - }, - { - internalType: "uint48"; - name: "validUntil"; - type: "uint48"; - }, - { - internalType: "bytes"; - name: "paymasterContext"; - type: "bytes"; - }, - ]; - internalType: "struct IEntryPoint.ReturnInfo"; - name: "returnInfo"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "uint256"; - name: "stake"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - internalType: "struct IStakeManager.StakeInfo"; - name: "senderInfo"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "uint256"; - name: "stake"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - internalType: "struct IStakeManager.StakeInfo"; - name: "factoryInfo"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "uint256"; - name: "stake"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - internalType: "struct IStakeManager.StakeInfo"; - name: "paymasterInfo"; - type: "tuple"; - }, - ]; - name: "ValidationResult"; - type: "error"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "uint256"; - name: "preOpGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "prefund"; - type: "uint256"; - }, - { - internalType: "bool"; - name: "sigFailed"; - type: "bool"; - }, - { - internalType: "uint48"; - name: "validAfter"; - type: "uint48"; - }, - { - internalType: "uint48"; - name: "validUntil"; - type: "uint48"; - }, - { - internalType: "bytes"; - name: "paymasterContext"; - type: "bytes"; - }, - ]; - internalType: "struct IEntryPoint.ReturnInfo"; - name: "returnInfo"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "uint256"; - name: "stake"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - internalType: "struct IStakeManager.StakeInfo"; - name: "senderInfo"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "uint256"; - name: "stake"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - internalType: "struct IStakeManager.StakeInfo"; - name: "factoryInfo"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "uint256"; - name: "stake"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - internalType: "struct IStakeManager.StakeInfo"; - name: "paymasterInfo"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "aggregator"; - type: "address"; - }, - { - components: readonly [ - { - internalType: "uint256"; - name: "stake"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - internalType: "struct IStakeManager.StakeInfo"; - name: "stakeInfo"; - type: "tuple"; - }, - ]; - internalType: "struct IEntryPoint.AggregatorStakeInfo"; - name: "aggregatorInfo"; - type: "tuple"; - }, - ]; - name: "ValidationResultWithAggregation"; - type: "error"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "factory"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "paymaster"; - type: "address"; - }, - ]; - name: "AccountDeployed"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly []; - name: "BeforeExecution"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "totalDeposit"; - type: "uint256"; - }, - ]; - name: "Deposited"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "aggregator"; - type: "address"; - }, - ]; - name: "SignatureAggregatorChanged"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "totalStaked"; - type: "uint256"; - }, - { - indexed: false; - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - name: "StakeLocked"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "withdrawTime"; - type: "uint256"; - }, - ]; - name: "StakeUnlocked"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "withdrawAddress"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "StakeWithdrawn"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "paymaster"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - indexed: false; - internalType: "bool"; - name: "success"; - type: "bool"; - }, - { - indexed: false; - internalType: "uint256"; - name: "actualGasCost"; - type: "uint256"; - }, - { - indexed: false; - internalType: "uint256"; - name: "actualGasUsed"; - type: "uint256"; - }, - ]; - name: "UserOperationEvent"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - indexed: false; - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "UserOperationRevertReason"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "withdrawAddress"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "Withdrawn"; - type: "event"; - }, - { - inputs: readonly []; - name: "SIG_VALIDATION_FAILED"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - ]; - name: "_validateSenderAndPaymaster"; - outputs: readonly []; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint32"; - name: "unstakeDelaySec"; - type: "uint32"; - }, - ]; - name: "addStake"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "balanceOf"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "depositTo"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - name: "deposits"; - outputs: readonly [ - { - internalType: "uint112"; - name: "deposit"; - type: "uint112"; - }, - { - internalType: "bool"; - name: "staked"; - type: "bool"; - }, - { - internalType: "uint112"; - name: "stake"; - type: "uint112"; - }, - { - internalType: "uint32"; - name: "unstakeDelaySec"; - type: "uint32"; - }, - { - internalType: "uint48"; - name: "withdrawTime"; - type: "uint48"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "getDepositInfo"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "uint112"; - name: "deposit"; - type: "uint112"; - }, - { - internalType: "bool"; - name: "staked"; - type: "bool"; - }, - { - internalType: "uint112"; - name: "stake"; - type: "uint112"; - }, - { - internalType: "uint32"; - name: "unstakeDelaySec"; - type: "uint32"; - }, - { - internalType: "uint48"; - name: "withdrawTime"; - type: "uint48"; - }, - ]; - internalType: "struct IStakeManager.DepositInfo"; - name: "info"; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint192"; - name: "key"; - type: "uint192"; - }, - ]; - name: "getNonce"; - outputs: readonly [ - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - ]; - name: "getSenderAddress"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - ]; - name: "getUserOpHash"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation[]"; - name: "userOps"; - type: "tuple[]"; - }, - { - internalType: "contract IAggregator"; - name: "aggregator"; - type: "address"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct IEntryPoint.UserOpsPerAggregator[]"; - name: "opsPerAggregator"; - type: "tuple[]"; - }, - { - internalType: "address payable"; - name: "beneficiary"; - type: "address"; - }, - ]; - name: "handleAggregatedOps"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation[]"; - name: "ops"; - type: "tuple[]"; - }, - { - internalType: "address payable"; - name: "beneficiary"; - type: "address"; - }, - ]; - name: "handleOps"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint192"; - name: "key"; - type: "uint192"; - }, - ]; - name: "incrementNonce"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - components: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "address"; - name: "paymaster"; - type: "address"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - ]; - internalType: "struct EntryPoint.MemoryUserOp"; - name: "mUserOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "prefund"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "contextOffset"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preOpGas"; - type: "uint256"; - }, - ]; - internalType: "struct EntryPoint.UserOpInfo"; - name: "opInfo"; - type: "tuple"; - }, - { - internalType: "bytes"; - name: "context"; - type: "bytes"; - }, - ]; - name: "innerHandleOp"; - outputs: readonly [ - { - internalType: "uint256"; - name: "actualGasCost"; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint192"; - name: ""; - type: "uint192"; - }, - ]; - name: "nonceSequenceNumber"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "op"; - type: "tuple"; - }, - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "bytes"; - name: "targetCallData"; - type: "bytes"; - }, - ]; - name: "simulateHandleOp"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - ]; - name: "simulateValidation"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "unlockStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "withdrawAddress"; - type: "address"; - }, - ]; - name: "withdrawStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "withdrawAddress"; - type: "address"; - }, - { - internalType: "uint256"; - name: "withdrawAmount"; - type: "uint256"; - }, - ]; - name: "withdrawTo"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, -]; -``` - -Defined in: [aa-sdk/core/src/abis/EntryPointAbi_v6.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/abis/EntryPointAbi_v6.ts#L1) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v7.mdx b/docs/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v7.mdx deleted file mode 100644 index a76c60aebf..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/EntryPointAbi_v7.mdx +++ /dev/null @@ -1,1009 +0,0 @@ ---- -title: EntryPointAbi_v7 -description: Overview of EntryPointAbi_v7 -slug: wallets/reference/aa-sdk/core/variables/EntryPointAbi_v7 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const EntryPointAbi_v7: readonly [ - { - inputs: readonly [ - { - internalType: "bool"; - name: "success"; - type: "bool"; - }, - { - internalType: "bytes"; - name: "ret"; - type: "bytes"; - }, - ]; - name: "DelegateAndRevert"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "opIndex"; - type: "uint256"; - }, - { - internalType: "string"; - name: "reason"; - type: "string"; - }, - ]; - name: "FailedOp"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "opIndex"; - type: "uint256"; - }, - { - internalType: "string"; - name: "reason"; - type: "string"; - }, - { - internalType: "bytes"; - name: "inner"; - type: "bytes"; - }, - ]; - name: "FailedOpWithRevert"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "returnData"; - type: "bytes"; - }, - ]; - name: "PostOpReverted"; - type: "error"; - }, - { - inputs: readonly []; - name: "ReentrancyGuardReentrantCall"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - ]; - name: "SenderAddressResult"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "aggregator"; - type: "address"; - }, - ]; - name: "SignatureValidationFailed"; - type: "error"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "factory"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "paymaster"; - type: "address"; - }, - ]; - name: "AccountDeployed"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly []; - name: "BeforeExecution"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "totalDeposit"; - type: "uint256"; - }, - ]; - name: "Deposited"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - indexed: false; - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "PostOpRevertReason"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "aggregator"; - type: "address"; - }, - ]; - name: "SignatureAggregatorChanged"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "totalStaked"; - type: "uint256"; - }, - { - indexed: false; - internalType: "uint256"; - name: "unstakeDelaySec"; - type: "uint256"; - }, - ]; - name: "StakeLocked"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "withdrawTime"; - type: "uint256"; - }, - ]; - name: "StakeUnlocked"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "withdrawAddress"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "StakeWithdrawn"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "paymaster"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - indexed: false; - internalType: "bool"; - name: "success"; - type: "bool"; - }, - { - indexed: false; - internalType: "uint256"; - name: "actualGasCost"; - type: "uint256"; - }, - { - indexed: false; - internalType: "uint256"; - name: "actualGasUsed"; - type: "uint256"; - }, - ]; - name: "UserOperationEvent"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - ]; - name: "UserOperationPrefundTooLow"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - indexed: true; - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - indexed: false; - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "UserOperationRevertReason"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "withdrawAddress"; - type: "address"; - }, - { - indexed: false; - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "Withdrawn"; - type: "event"; - }, - { - inputs: readonly [ - { - internalType: "uint32"; - name: "unstakeDelaySec"; - type: "uint32"; - }, - ]; - name: "addStake"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "balanceOf"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "delegateAndRevert"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "depositTo"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - name: "deposits"; - outputs: readonly [ - { - internalType: "uint256"; - name: "deposit"; - type: "uint256"; - }, - { - internalType: "bool"; - name: "staked"; - type: "bool"; - }, - { - internalType: "uint112"; - name: "stake"; - type: "uint112"; - }, - { - internalType: "uint32"; - name: "unstakeDelaySec"; - type: "uint32"; - }, - { - internalType: "uint48"; - name: "withdrawTime"; - type: "uint48"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "getDepositInfo"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "uint256"; - name: "deposit"; - type: "uint256"; - }, - { - internalType: "bool"; - name: "staked"; - type: "bool"; - }, - { - internalType: "uint112"; - name: "stake"; - type: "uint112"; - }, - { - internalType: "uint32"; - name: "unstakeDelaySec"; - type: "uint32"; - }, - { - internalType: "uint48"; - name: "withdrawTime"; - type: "uint48"; - }, - ]; - internalType: "struct IStakeManager.DepositInfo"; - name: "info"; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint192"; - name: "key"; - type: "uint192"; - }, - ]; - name: "getNonce"; - outputs: readonly [ - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - ]; - name: "getSenderAddress"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "bytes32"; - name: "accountGasLimits"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "bytes32"; - name: "gasFees"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct PackedUserOperation"; - name: "userOp"; - type: "tuple"; - }, - ]; - name: "getUserOpHash"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "bytes32"; - name: "accountGasLimits"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "bytes32"; - name: "gasFees"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct PackedUserOperation[]"; - name: "userOps"; - type: "tuple[]"; - }, - { - internalType: "contract IAggregator"; - name: "aggregator"; - type: "address"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct IEntryPoint.UserOpsPerAggregator[]"; - name: "opsPerAggregator"; - type: "tuple[]"; - }, - { - internalType: "address payable"; - name: "beneficiary"; - type: "address"; - }, - ]; - name: "handleAggregatedOps"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "bytes32"; - name: "accountGasLimits"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "bytes32"; - name: "gasFees"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct PackedUserOperation[]"; - name: "ops"; - type: "tuple[]"; - }, - { - internalType: "address payable"; - name: "beneficiary"; - type: "address"; - }, - ]; - name: "handleOps"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint192"; - name: "key"; - type: "uint192"; - }, - ]; - name: "incrementNonce"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - components: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "paymasterVerificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "paymasterPostOpGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "address"; - name: "paymaster"; - type: "address"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - ]; - internalType: "struct EntryPoint.MemoryUserOp"; - name: "mUserOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "prefund"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "contextOffset"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preOpGas"; - type: "uint256"; - }, - ]; - internalType: "struct EntryPoint.UserOpInfo"; - name: "opInfo"; - type: "tuple"; - }, - { - internalType: "bytes"; - name: "context"; - type: "bytes"; - }, - ]; - name: "innerHandleOp"; - outputs: readonly [ - { - internalType: "uint256"; - name: "actualGasCost"; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint192"; - name: ""; - type: "uint192"; - }, - ]; - name: "nonceSequenceNumber"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "unlockStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "withdrawAddress"; - type: "address"; - }, - ]; - name: "withdrawStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "withdrawAddress"; - type: "address"; - }, - { - internalType: "uint256"; - name: "withdrawAmount"; - type: "uint256"; - }, - ]; - name: "withdrawTo"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, -]; -``` - -Defined in: [aa-sdk/core/src/abis/EntryPointAbi_v7.ts:2](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/abis/EntryPointAbi_v7.ts#L2) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/HexSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/HexSchema.mdx deleted file mode 100644 index daf7f03cc7..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/HexSchema.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: HexSchema -description: Overview of HexSchema -slug: wallets/reference/aa-sdk/core/variables/HexSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const HexSchema: ZodType<`0x${string}`, ZodTypeDef, `0x${string}`>; -``` - -Defined in: [aa-sdk/core/src/utils/schema.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/schema.ts#L13) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/MultiplierSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/MultiplierSchema.mdx deleted file mode 100644 index b0aa05c2bb..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/MultiplierSchema.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: MultiplierSchema -description: Overview of MultiplierSchema -slug: wallets/reference/aa-sdk/core/variables/MultiplierSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultiplierSchema: ZodObject< - { - multiplier: ZodEffects; - }, - "strict", - ZodTypeAny, - { - multiplier: number; - }, - { - multiplier: number; - } ->; -``` - -Defined in: [aa-sdk/core/src/utils/schema.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/schema.ts#L26) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/SignerSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/SignerSchema.mdx deleted file mode 100644 index 24fb7c8c10..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/SignerSchema.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignerSchema -description: Overview of SignerSchema -slug: wallets/reference/aa-sdk/core/variables/SignerSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SignerSchema: ZodType; -``` - -Defined in: [aa-sdk/core/src/signer/schema.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/signer/schema.ts#L30) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v6.mdx b/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v6.mdx deleted file mode 100644 index 92ebbb2c2c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v6.mdx +++ /dev/null @@ -1,537 +0,0 @@ ---- -title: SimpleAccountAbi_v6 -description: Overview of SimpleAccountAbi_v6 -slug: wallets/reference/aa-sdk/core/variables/SimpleAccountAbi_v6 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SimpleAccountAbi_v6: readonly [ - { - inputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: "anEntryPoint"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: false; - internalType: "address"; - name: "previousAdmin"; - type: "address"; - }, - { - indexed: false; - internalType: "address"; - name: "newAdmin"; - type: "address"; - }, - ]; - name: "AdminChanged"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "beacon"; - type: "address"; - }, - ]; - name: "BeaconUpgraded"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: false; - internalType: "uint8"; - name: "version"; - type: "uint8"; - }, - ]; - name: "Initialized"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "contract IEntryPoint"; - name: "entryPoint"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "owner"; - type: "address"; - }, - ]; - name: "SimpleAccountInitialized"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "implementation"; - type: "address"; - }, - ]; - name: "Upgraded"; - type: "event"; - }, - { - inputs: readonly []; - name: "addDeposit"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly []; - name: "entryPoint"; - outputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "dest"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "func"; - type: "bytes"; - }, - ]; - name: "execute"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address[]"; - name: "dest"; - type: "address[]"; - }, - { - internalType: "bytes[]"; - name: "func"; - type: "bytes[]"; - }, - ]; - name: "executeBatch"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "getDeposit"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "getNonce"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "anOwner"; - type: "address"; - }, - ]; - name: "initialize"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256[]"; - name: ""; - type: "uint256[]"; - }, - { - internalType: "uint256[]"; - name: ""; - type: "uint256[]"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC1155BatchReceived"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC1155Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC721Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly []; - name: "owner"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "proxiableUUID"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "tokensReceived"; - outputs: readonly []; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "newImplementation"; - type: "address"; - }, - ]; - name: "upgradeTo"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "newImplementation"; - type: "address"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "upgradeToAndCall"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "missingAccountFunds"; - type: "uint256"; - }, - ]; - name: "validateUserOp"; - outputs: readonly [ - { - internalType: "uint256"; - name: "validationData"; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "withdrawAddress"; - type: "address"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "withdrawDepositTo"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, -]; -``` - -Defined in: [aa-sdk/core/src/abis/SimpleAccountAbi_v6.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/abis/SimpleAccountAbi_v6.ts#L1) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v7.mdx b/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v7.mdx deleted file mode 100644 index 062c4bce40..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountAbi_v7.mdx +++ /dev/null @@ -1,547 +0,0 @@ ---- -title: SimpleAccountAbi_v7 -description: Overview of SimpleAccountAbi_v7 -slug: wallets/reference/aa-sdk/core/variables/SimpleAccountAbi_v7 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SimpleAccountAbi_v7: readonly [ - { - inputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: "anEntryPoint"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - ]; - name: "AddressEmptyCode"; - type: "error"; - }, - { - inputs: readonly []; - name: "ECDSAInvalidSignature"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "length"; - type: "uint256"; - }, - ]; - name: "ECDSAInvalidSignatureLength"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "s"; - type: "bytes32"; - }, - ]; - name: "ECDSAInvalidSignatureS"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "implementation"; - type: "address"; - }, - ]; - name: "ERC1967InvalidImplementation"; - type: "error"; - }, - { - inputs: readonly []; - name: "ERC1967NonPayable"; - type: "error"; - }, - { - inputs: readonly []; - name: "FailedInnerCall"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidInitialization"; - type: "error"; - }, - { - inputs: readonly []; - name: "NotInitializing"; - type: "error"; - }, - { - inputs: readonly []; - name: "UUPSUnauthorizedCallContext"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "slot"; - type: "bytes32"; - }, - ]; - name: "UUPSUnsupportedProxiableUUID"; - type: "error"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: false; - internalType: "uint64"; - name: "version"; - type: "uint64"; - }, - ]; - name: "Initialized"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "contract IEntryPoint"; - name: "entryPoint"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "owner"; - type: "address"; - }, - ]; - name: "SimpleAccountInitialized"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "implementation"; - type: "address"; - }, - ]; - name: "Upgraded"; - type: "event"; - }, - { - inputs: readonly []; - name: "UPGRADE_INTERFACE_VERSION"; - outputs: readonly [ - { - internalType: "string"; - name: ""; - type: "string"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "addDeposit"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly []; - name: "entryPoint"; - outputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "dest"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "func"; - type: "bytes"; - }, - ]; - name: "execute"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address[]"; - name: "dest"; - type: "address[]"; - }, - { - internalType: "uint256[]"; - name: "value"; - type: "uint256[]"; - }, - { - internalType: "bytes[]"; - name: "func"; - type: "bytes[]"; - }, - ]; - name: "executeBatch"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "getDeposit"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "getNonce"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "anOwner"; - type: "address"; - }, - ]; - name: "initialize"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256[]"; - name: ""; - type: "uint256[]"; - }, - { - internalType: "uint256[]"; - name: ""; - type: "uint256[]"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC1155BatchReceived"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC1155Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC721Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly []; - name: "owner"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "proxiableUUID"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "newImplementation"; - type: "address"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "upgradeToAndCall"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "bytes32"; - name: "accountGasLimits"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "bytes32"; - name: "gasFees"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct PackedUserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "missingAccountFunds"; - type: "uint256"; - }, - ]; - name: "validateUserOp"; - outputs: readonly [ - { - internalType: "uint256"; - name: "validationData"; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "withdrawAddress"; - type: "address"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "withdrawDepositTo"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, -]; -``` - -Defined in: [aa-sdk/core/src/abis/SimpleAccountAbi_v7.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/abis/SimpleAccountAbi_v7.ts#L1) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountFactoryAbi.mdx b/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountFactoryAbi.mdx deleted file mode 100644 index 5ff06ac95c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/SimpleAccountFactoryAbi.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: SimpleAccountFactoryAbi -description: Overview of SimpleAccountFactoryAbi -slug: wallets/reference/aa-sdk/core/variables/SimpleAccountFactoryAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SimpleAccountFactoryAbi: readonly [ - { - inputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: "_entryPoint"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - inputs: readonly []; - name: "accountImplementation"; - outputs: readonly [ - { - internalType: "contract SimpleAccount"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - { - internalType: "uint256"; - name: "salt"; - type: "uint256"; - }, - ]; - name: "createAccount"; - outputs: readonly [ - { - internalType: "contract SimpleAccount"; - name: "ret"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - { - internalType: "uint256"; - name: "salt"; - type: "uint256"; - }, - ]; - name: "getAddress"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, -]; -``` - -Defined in: [aa-sdk/core/src/abis/SimpleAccountFactoryAbi.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/abis/SimpleAccountFactoryAbi.ts#L1) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/SmartAccountClientOptsSchema.mdx b/docs/pages/reference/aa-sdk/core/src/variables/SmartAccountClientOptsSchema.mdx deleted file mode 100644 index 844243012c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/SmartAccountClientOptsSchema.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -title: SmartAccountClientOptsSchema -description: Overview of SmartAccountClientOptsSchema -slug: wallets/reference/aa-sdk/core/variables/SmartAccountClientOptsSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SmartAccountClientOptsSchema: ZodObject<{ - feeOptions: ZodOptional>; - max: ZodOptional>; - multiplier: ZodOptional>; - }, "strict", ZodTypeAny, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }>>>; - maxPriorityFeePerGas: ZodOptional>; - max: ZodOptional>; - multiplier: ZodOptional>; - }, "strict", ZodTypeAny, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }>>>; - callGasLimit: ZodOptional>; - max: ZodOptional>; - multiplier: ZodOptional>; - }, "strict", ZodTypeAny, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }>>>; - verificationGasLimit: ZodOptional>; - max: ZodOptional>; - multiplier: ZodOptional>; - }, "strict", ZodTypeAny, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }>>>; - preVerificationGas: ZodOptional>; - max: ZodOptional>; - multiplier: ZodOptional>; - }, "strict", ZodTypeAny, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }, { - min?: number | bigint | `0x${(...)}`; - max?: number | bigint | `0x${(...)}`; - multiplier?: number; - }>>>; - paymasterVerificationGasLimit: ZodOptional>>; - max: ZodOptional>>; - multiplier: ZodOptional>; - }, "strict", ZodTypeAny, { - min?: number | bigint | `0x${string}`; - max?: number | bigint | `0x${string}`; - multiplier?: number; - }, { - min?: number | bigint | `0x${string}`; - max?: number | bigint | `0x${string}`; - multiplier?: number; - }>>; - paymasterPostOpGasLimit: ZodOptional>>; - max: ZodOptional>>; - multiplier: ZodOptional>; - }, "strict", ZodTypeAny, { - min?: number | bigint | `0x${string}`; - max?: number | bigint | `0x${string}`; - multiplier?: number; - }, { - min?: number | bigint | `0x${string}`; - max?: number | bigint | `0x${string}`; - multiplier?: number; - }>>; - }, "strict", ZodTypeAny, { - maxFeePerGas?: Object; - maxPriorityFeePerGas?: Object; - callGasLimit?: Object; - verificationGasLimit?: Object; - preVerificationGas?: Object; - paymasterVerificationGasLimit?: Object; - paymasterPostOpGasLimit?: Object; - }, { - maxFeePerGas?: Object; - maxPriorityFeePerGas?: Object; - callGasLimit?: Object; - verificationGasLimit?: Object; - preVerificationGas?: Object; - paymasterVerificationGasLimit?: Object; - paymasterPostOpGasLimit?: Object; - }>>; - txMaxRetries: ZodDefault>; - txRetryIntervalMs: ZodDefault>; - txRetryMultiplier: ZodDefault>; -}, "strict", ZodTypeAny, { - txMaxRetries: number; - txRetryIntervalMs: number; - txRetryMultiplier: number; - feeOptions?: Object; -}, { - txMaxRetries?: number; - txRetryIntervalMs?: number; - txRetryMultiplier?: number; - feeOptions?: Object; -}>; -``` - -Defined in: [aa-sdk/core/src/client/schema.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/schema.ts#L74) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_NAME.mdx b/docs/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_NAME.mdx deleted file mode 100644 index 0fad316a07..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_NAME.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: TRACE_HEADER_NAME -description: These are the headers that are used in the trace headers, could be found in the spec -slug: wallets/reference/aa-sdk/core/variables/TRACE_HEADER_NAME -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const TRACE_HEADER_NAME: "traceparent" = "traceparent"; -``` - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L16) - -These are the headers that are used in the trace headers, could be found in the spec - -## See - -https://www.w3.org/TR/trace-context/#design-overview diff --git a/docs/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_STATE.mdx b/docs/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_STATE.mdx deleted file mode 100644 index 0a41733796..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/TRACE_HEADER_STATE.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: TRACE_HEADER_STATE -description: These are the headers that are used in the trace headers, could be found in the spec -slug: wallets/reference/aa-sdk/core/variables/TRACE_HEADER_STATE -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const TRACE_HEADER_STATE: "tracestate" = "tracestate"; -``` - -Defined in: [aa-sdk/core/src/utils/traceHeader.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/traceHeader.ts#L22) - -These are the headers that are used in the trace headers, could be found in the spec - -## See - -https://www.w3.org/TR/trace-context/#design-overview diff --git a/docs/pages/reference/aa-sdk/core/src/variables/bundlerActions.mdx b/docs/pages/reference/aa-sdk/core/src/variables/bundlerActions.mdx deleted file mode 100644 index f5ddaa2f9a..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/bundlerActions.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: bundlerActions -description: "A viem client decorator that provides Bundler specific actions. These actions include estimating gas for user operations, sending raw user operations, retrieving user operations by hash, getting supported entry points, and getting user operation receipts. NOTE: this is already added to the client returned from `createBundlerClient`" -slug: wallets/reference/aa-sdk/core/variables/bundlerActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const bundlerActions: (client) => BundlerActions; -``` - -Defined in: [aa-sdk/core/src/client/decorators/bundlerClient.ts:121](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/bundlerClient.ts#L121) - -A viem client decorator that provides Bundler specific actions. -These actions include estimating gas for user operations, sending raw user operations, retrieving user operations by hash, getting supported entry points, and getting user operation receipts. - -NOTE: this is already added to the client returned from `createBundlerClient` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TClient` *extends* [`Client`](https://viem.sh)\<[`Transport`](https://viem.sh), [`Chain`](https://viem.sh) | `undefined`, `any`, \[`...PublicRpcSchema`, `...BundlerRpcSchema`]> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `TClient` - - The client instance that will be used to perform bundler actions -
- -## Returns - -[`BundlerActions`](../type-aliases/BundlerActions) - -An object containing various bundler-related actions that can be executed using the provided client diff --git a/docs/pages/reference/aa-sdk/core/src/variables/createBundlerClientFromExisting.mdx b/docs/pages/reference/aa-sdk/core/src/variables/createBundlerClientFromExisting.mdx deleted file mode 100644 index 9548d09c9b..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/createBundlerClientFromExisting.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: createBundlerClientFromExisting -description: Creates a bundler client from an existing public client with the provided transport and chain. -slug: wallets/reference/aa-sdk/core/variables/createBundlerClientFromExisting -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const createBundlerClientFromExisting: (client) => BundlerClient; -``` - -Defined in: [aa-sdk/core/src/client/bundlerClient.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/bundlerClient.ts#L46) - -Creates a bundler client from an existing public client with the provided transport and chain. - -## Example - -```ts -import { createPublicClient } from "viem"; -import { createBundlerClientFromExisting } from "@aa-sdk/core"; - -const publicClient = createPublicClient(...); -const bundlerClient = createBundlerClientFromExisting(publicClient); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `T` *extends* [`Transport`](https://viem.sh) | [`FallbackTransport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`PublicClient`](https://viem.sh)\<`T`, [`Chain`](https://viem.sh)> - - The existing public client to be extended with bundler actions -
- -## Returns - -[`BundlerClient`](../type-aliases/BundlerClient)\<`T`> - -A bundler client that extends the functionality of the provided public client diff --git a/docs/pages/reference/aa-sdk/core/src/variables/default7702GasEstimator.mdx b/docs/pages/reference/aa-sdk/core/src/variables/default7702GasEstimator.mdx deleted file mode 100644 index ffa8a1333c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/default7702GasEstimator.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: default7702GasEstimator -description: A middleware function to estimate the gas usage of a user operation when using an EIP-7702 delegated account. Has an optional custom gas estimator. This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. -slug: wallets/reference/aa-sdk/core/variables/default7702GasEstimator -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const default7702GasEstimator: (gasEstimator?) => ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts#L16) - -A middleware function to estimate the gas usage of a user operation when using an EIP-7702 delegated account. Has an optional custom gas estimator. -This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. - -## Deprecated - -The EIP-7702 auth is now set in initUserOperation instead. This middleware is no longer necessary. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `gasEstimator?` - - `ClientMiddlewareFn` - - Optional custom gas estimator function -
- -## Returns - -`ClientMiddlewareFn` - -A function that takes user operation struct and parameters, estimates gas usage, and returns the user operation with gas limits. diff --git a/docs/pages/reference/aa-sdk/core/src/variables/default7702UserOpSigner.mdx b/docs/pages/reference/aa-sdk/core/src/variables/default7702UserOpSigner.mdx deleted file mode 100644 index 01dccca1cc..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/default7702UserOpSigner.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: default7702UserOpSigner -description: Provides a default middleware function for signing user operations with a client account when using EIP-7702 delegated accounts. If the signer doesn't support `signAuthorization`, then this just runs the provided `signUserOperation` middleware. This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. -slug: wallets/reference/aa-sdk/core/variables/default7702UserOpSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const default7702UserOpSigner: (userOpSigner?) => ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/defaults/7702signer.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/defaults/7702signer.ts#L18) - -Provides a default middleware function for signing user operations with a client account when using EIP-7702 delegated accounts. -If the signer doesn't support `signAuthorization`, then this just runs the provided `signUserOperation` middleware. -This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. - -## Deprecated - -The EIP-7702 auth signature is now handled by the defaultUserOpSigner middleware. This middleware is no longer necessary. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `userOpSigner?` - - `ClientMiddlewareFn` - - Optional user operation signer function -
- -## Returns - -`ClientMiddlewareFn` - -A middleware function that signs EIP-7702 authorization tuples if necessary, and also uses the provided or default user operation signer to generate the user op signature. diff --git a/docs/pages/reference/aa-sdk/core/src/variables/defaultEntryPointVersion.mdx b/docs/pages/reference/aa-sdk/core/src/variables/defaultEntryPointVersion.mdx deleted file mode 100644 index 040ae624d1..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/defaultEntryPointVersion.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: defaultEntryPointVersion -description: Overview of defaultEntryPointVersion -slug: wallets/reference/aa-sdk/core/variables/defaultEntryPointVersion -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const defaultEntryPointVersion: DefaultEntryPointVersion = "0.6.0"; -``` - -Defined in: [aa-sdk/core/src/entrypoint/index.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/index.ts#L13) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/defaultGasEstimator.mdx b/docs/pages/reference/aa-sdk/core/src/variables/defaultGasEstimator.mdx deleted file mode 100644 index 318ae38f78..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/defaultGasEstimator.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: defaultGasEstimator -description: Description default gas estimator middleware for `SmartAccountClient` You can override this middleware with your custom gas estimator middleware by passing it to the client constructor -slug: wallets/reference/aa-sdk/core/variables/defaultGasEstimator -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const defaultGasEstimator: (client) => ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/defaults/gasEstimator.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/defaults/gasEstimator.ts#L19) - -Description default gas estimator middleware for `SmartAccountClient` -You can override this middleware with your custom gas estimator middleware -by passing it to the client constructor - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `C` *extends* [`MiddlewareClient`](../type-aliases/MiddlewareClient) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `C` - - smart account client instance to apply the middleware to -
- -## Returns - -[`ClientMiddlewareFn`](../type-aliases/ClientMiddlewareFn) - -middleware execution function used to estimate gas for user operations diff --git a/docs/pages/reference/aa-sdk/core/src/variables/defaultPaymasterAndData.mdx b/docs/pages/reference/aa-sdk/core/src/variables/defaultPaymasterAndData.mdx deleted file mode 100644 index 1454bb72c0..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/defaultPaymasterAndData.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: defaultPaymasterAndData -description: Middleware function that sets the `paymasterAndData` field in the given struct based on the entry point version of the account. This is the default used by `createSmartAccountClient` and is not necessary to be used directly. -slug: wallets/reference/aa-sdk/core/variables/defaultPaymasterAndData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const defaultPaymasterAndData: ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/defaults/paymasterAndData.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/defaults/paymasterAndData.ts#L12) - -Middleware function that sets the `paymasterAndData` field in the given struct based on the entry point version of the account. -This is the default used by `createSmartAccountClient` and is not necessary to be used directly. - -## Param - -the user operation structure to be modified - -## Param - -an object containing the account information - -## Returns - -a promise that resolves to the modified user operation structure diff --git a/docs/pages/reference/aa-sdk/core/src/variables/defaultUserOpSigner.mdx b/docs/pages/reference/aa-sdk/core/src/variables/defaultUserOpSigner.mdx deleted file mode 100644 index 4ea2748c10..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/defaultUserOpSigner.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: defaultUserOpSigner -description: Provides a default middleware function for signing user operations with a client account. This function validates the request and adds the signature to it. This is already included in the client returned from `createSmartAccountClient` -slug: wallets/reference/aa-sdk/core/variables/defaultUserOpSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const defaultUserOpSigner: ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/defaults/userOpSigner.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/defaults/userOpSigner.ts#L27) - -Provides a default middleware function for signing user operations with a client account. This function validates the request and adds the signature to it. -This is already included in the client returned from `createSmartAccountClient` - -## Param - -The user operation structure to be signed - -## Param - -The middleware context containing the client and account information - -## Param - -The client object, which should include account and chain information - -## Param - -Optional, the account used for signing, defaults to the client's account if not provided - -## Returns - -A promise that resolves to the signed user operation structure diff --git a/docs/pages/reference/aa-sdk/core/src/variables/entryPointRegistry.mdx b/docs/pages/reference/aa-sdk/core/src/variables/entryPointRegistry.mdx deleted file mode 100644 index 2e0e555be2..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/entryPointRegistry.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: entryPointRegistry -description: Overview of entryPointRegistry -slug: wallets/reference/aa-sdk/core/variables/entryPointRegistry -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const entryPointRegistry: EntryPointRegistry; -``` - -Defined in: [aa-sdk/core/src/entrypoint/index.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/entrypoint/index.ts#L15) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/minPriorityFeePerBidDefaults.mdx b/docs/pages/reference/aa-sdk/core/src/variables/minPriorityFeePerBidDefaults.mdx deleted file mode 100644 index f92af9ed00..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/minPriorityFeePerBidDefaults.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: minPriorityFeePerBidDefaults -description: Overview of minPriorityFeePerBidDefaults -slug: wallets/reference/aa-sdk/core/variables/minPriorityFeePerBidDefaults -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const minPriorityFeePerBidDefaults: Map; -``` - -Defined in: [aa-sdk/core/src/utils/defaults.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/defaults.ts#L5) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/noopMiddleware.mdx b/docs/pages/reference/aa-sdk/core/src/variables/noopMiddleware.mdx deleted file mode 100644 index 3f97ba1416..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/noopMiddleware.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: noopMiddleware -description: Noop middleware that does nothing and passes the arguments through -slug: wallets/reference/aa-sdk/core/variables/noopMiddleware -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const noopMiddleware: ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/noopMiddleware.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/noopMiddleware.ts#L10) - -Noop middleware that does nothing and passes the arguments through - -## Param - -the client middleware arguments passed to the middleware - -## Returns - -the arguments passed to the middleware and returned as is without modification diff --git a/docs/pages/reference/aa-sdk/core/src/variables/smartAccountClientActions.mdx b/docs/pages/reference/aa-sdk/core/src/variables/smartAccountClientActions.mdx deleted file mode 100644 index f42d452d66..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/smartAccountClientActions.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: smartAccountClientActions -description: "Provides a set of smart account client actions to decorate the provided client. These actions include building and signing user operations, sending transactions, and more. NOTE: this is already added to clients returned from `createSmartAccountClient`" -slug: wallets/reference/aa-sdk/core/variables/smartAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const smartAccountClientActions: ( - client, -) => BaseSmartAccountClientActions; -``` - -Defined in: [aa-sdk/core/src/client/decorators/smartAccountClient.ts:143](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/smartAccountClient.ts#L143) - -Provides a set of smart account client actions to decorate the provided client. These actions include building and signing user operations, sending transactions, and more. - -NOTE: this is already added to clients returned from `createSmartAccountClient` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client to bind the smart account actions to -
- -## Returns - -[`BaseSmartAccountClientActions`](../type-aliases/BaseSmartAccountClientActions)\<`TChain`, `TAccount`, `TContext`> - -An object containing various smart account client actions diff --git a/docs/pages/reference/aa-sdk/core/src/variables/smartAccountClientMethodKeys.mdx b/docs/pages/reference/aa-sdk/core/src/variables/smartAccountClientMethodKeys.mdx deleted file mode 100644 index 24447bbe92..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/smartAccountClientMethodKeys.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: smartAccountClientMethodKeys -description: Overview of smartAccountClientMethodKeys -slug: wallets/reference/aa-sdk/core/variables/smartAccountClientMethodKeys -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const smartAccountClientMethodKeys: Set; -``` - -Defined in: [aa-sdk/core/src/client/decorators/smartAccountClient.ts:176](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/client/decorators/smartAccountClient.ts#L176) diff --git a/docs/pages/reference/aa-sdk/core/src/variables/waitForUserOperationTransaction.mdx b/docs/pages/reference/aa-sdk/core/src/variables/waitForUserOperationTransaction.mdx deleted file mode 100644 index 37bb6d484c..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/waitForUserOperationTransaction.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: waitForUserOperationTransaction -description: Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached. -slug: wallets/reference/aa-sdk/core/variables/waitForUserOperationTransaction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const waitForUserOperationTransaction: ( - client, - args, -) => Promise; -``` - -Defined in: [aa-sdk/core/src/actions/smartAccount/waitForUserOperationTransacation.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/actions/smartAccount/waitForUserOperationTransacation.ts#L34) - -Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached. - -## Example - -```ts -import { createSmartAccountClient } from "@aa-sdk/core"; - -// smart account client is already extended with waitForUserOperationTransaction -const client = createSmartAccountClient(...); -const result = await client.waitForUserOperationTransaction({ - hash: "0x...", - retries: {...} // optional param to configure the retry amounts -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `any`> - - ‐ -
- `args` - - [`WaitForUserOperationTxParameters`](../type-aliases/WaitForUserOperationTxParameters) - - The parameters for the transaction to wait for -
- -## Returns - -`Promise`\<[`Hex`](https://viem.sh)> - -A promise that resolves to the transaction hash when the transaction is confirmed diff --git a/docs/pages/reference/aa-sdk/core/src/variables/webauthnGasEstimator.mdx b/docs/pages/reference/aa-sdk/core/src/variables/webauthnGasEstimator.mdx deleted file mode 100644 index f3ff3712c1..0000000000 --- a/docs/pages/reference/aa-sdk/core/src/variables/webauthnGasEstimator.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: webauthnGasEstimator -description: A middleware function to estimate the gas usage of a user operation when using a Modular Account V2 WebAuthn account. Has an optional custom gas estimator. This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. -slug: wallets/reference/aa-sdk/core/variables/webauthnGasEstimator -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const webauthnGasEstimator: (gasEstimator?) => ClientMiddlewareFn; -``` - -Defined in: [aa-sdk/core/src/middleware/defaults/webauthnGasEstimator.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/middleware/defaults/webauthnGasEstimator.ts#L46) - -A middleware function to estimate the gas usage of a user operation when using a Modular Account V2 WebAuthn account. Has an optional custom gas estimator. -This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`. - -## Example - -```ts twoslash -import { - webauthnGasEstimator, - createSmartAccountClient, - type SmartAccountClient, -} from "@aa-sdk/core"; -import { - createModularAccountV2, - type CreateModularAccountV2ClientParams, -} from "@account-kit/smart-contracts"; - -const credential = { - id: "credential-id", - publicKey: "0x...", -}; - -async function createWebauthnAccountClient( - config: CreateModularAccountV2ClientParams, -): Promise { - const webauthnAccount = await createModularAccountV2({ - ...config, - mode: "webauthn", - credential, - }); - - return createSmartAccountClient({ - account: webAuthnAccount, - gasEstimator: webauthnGasEstimator(config.gasEstimator), - ...config, - }); -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `gasEstimator?` - - `ClientMiddlewareFn` - - Optional custom gas estimator function -
- -## Returns - -`ClientMiddlewareFn` - -A function that takes user operation struct and parameters, estimates gas usage, and returns the user operation with gas limits. diff --git a/docs/pages/reference/aa-sdk/ethers/src/README.mdx b/docs/pages/reference/aa-sdk/ethers/src/README.mdx deleted file mode 100644 index 43a01ca154..0000000000 --- a/docs/pages/reference/aa-sdk/ethers/src/README.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: aa-sdk/ethers -description: Overview of aa-sdk/ethers -slug: wallets/reference/aa-sdk/ethers -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Classes - -| Class | Description | -| :-------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------- | -| [AccountSigner](/wallets/reference/aa-sdk/ethers/classes/AccountSigner) | Implementation of the ethers Signer interface to use with Smart Contract Accounts | -| [EthersProviderAdapter](/wallets/reference/aa-sdk/ethers/classes/EthersProviderAdapter) | Lightweight Adapter for SmtAccountProvider to enable Signer Creation | - -## Functions - -| Function | Description | -| :------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------- | -| [convertEthersSignerToAccountSigner](/wallets/reference/aa-sdk/ethers/functions/convertEthersSignerToAccountSigner) | Converts a ethers.js Signer to a SmartAccountSigner | -| [convertWalletToAccountSigner](/wallets/reference/aa-sdk/ethers/functions/convertWalletToAccountSigner) | Converts a ethersjs Wallet to a SmartAccountSigner | diff --git a/docs/pages/reference/aa-sdk/ethers/src/classes/AccountSigner.mdx b/docs/pages/reference/aa-sdk/ethers/src/classes/AccountSigner.mdx deleted file mode 100644 index 2aada0df4e..0000000000 --- a/docs/pages/reference/aa-sdk/ethers/src/classes/AccountSigner.mdx +++ /dev/null @@ -1,584 +0,0 @@ ---- -title: AccountSigner -description: Implementation of the ethers Signer interface to use with Smart Contract Accounts -slug: wallets/reference/aa-sdk/ethers/classes/AccountSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/ethers/src/account-signer.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L32) - -Implementation of the ethers Signer interface to use with Smart Contract Accounts - -## Extends - -- `Signer` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` - - `SmartContractAccount` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- -## Constructors - -### Constructor - -```ts -new AccountSigner(provider, account): AccountSigner; -``` - -Defined in: [aa-sdk/ethers/src/account-signer.ts:67](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L67) - -Creates a new AccountSigner with the given ethers Provider and Smart Contract Account - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; -import { http } from "viem"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter(); -const signer = new AccountSigner(provider, account); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `provider` - - [`EthersProviderAdapter`](EthersProviderAdapter) - - the ethers provider to use -
- `account` - - `TAccount` - - the smart contract account that will be used to sign user ops and send them -
- -#### Returns - -`AccountSigner`\<`TAccount`, `TEntryPointVersion`> - -#### Overrides - -```ts -Signer.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `account` - - `TAccount` - - ‐ -
- `provider` - - [`EthersProviderAdapter`](EthersProviderAdapter) - - the ethers provider to use -
- `sendUserOperation` - - (`args`, `overrides?`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> - - ‐ -
- `waitForUserOperationTransaction` - - `Object` - - ‐ -
- -## Methods - -### connect() - -```ts -connect(provider): AccountSigner; -``` - -Defined in: [aa-sdk/ethers/src/account-signer.ts:283](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L283) - -Sets the provider for the account signer and returns the updated account signer instance. -Note: this is not necessary since the Provider is required by the constructor. This is useful -if you want to change the provider after the account signer has been created. - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; -import { http } from "viem"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter(); -const signer = new AccountSigner(provider, account); - -signer.connect(provider); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `provider` - - [`EthersProviderAdapter`](EthersProviderAdapter) - - the provider to be set for the account signer -
- -#### Returns - -`AccountSigner`\<`TAccount`> - -the updated account signer instance - -#### Overrides - -```ts -Signer.connect; -``` - ---- - -### getAddress() - -```ts -getAddress(): Promise; -``` - -Defined in: [aa-sdk/ethers/src/account-signer.ts:115](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L115) - -Returns the account address if the account exists. - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; -import { http } from "viem"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter(); -const signer = new AccountSigner(provider, account); - -const address = await signer.getAddress(); -``` - -#### Returns - -`Promise`\<`string`> - -a promise that resolves to the account address - -#### Throws - -if the account is not found - -#### Overrides - -```ts -Signer.getAddress; -``` - ---- - -### getBundlerClient() - -```ts -getBundlerClient(): BundlerClient; -``` - -Defined in: [aa-sdk/ethers/src/account-signer.ts:251](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L251) - -Retrieves the BundlerClient instance from the provider. - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; -import { http } from "viem"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter(); -const signer = new AccountSigner(provider, account); - -const bundler = signer.getBundlerClient(); -``` - -#### Returns - -`BundlerClient`\<[`Transport`](https://viem.sh)> - -The BundlerClient instance - ---- - -### sendTransaction() - -```ts -sendTransaction(transaction): Promise; -``` - -Defined in: [aa-sdk/ethers/src/account-signer.ts:194](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L194) - -Sends a transaction using the account provider and returns the transaction response. - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; -import { http } from "viem"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter(); -const signer = new AccountSigner(provider, account); - -const tx = await signer.sendTransaction({ - to: "0x1234567890123456789012345678901234567890", - value: "0x0", - data: "0x", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `transaction` - - `Deferrable`\<`TransactionRequest`> - - the transaction request to be sent -
- -#### Returns - -`Promise`\<`TransactionResponse`> - -a promise that resolves to the transaction response - -#### Throws - -if the account is not found in the provider - -#### Overrides - -```ts -Signer.sendTransaction; -``` - ---- - -### signMessage() - -```ts -signMessage(message): Promise; -``` - -Defined in: [aa-sdk/ethers/src/account-signer.ts:150](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L150) - -Signs a message using the associated account. - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; -import { http } from "viem"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter(); -const signer = new AccountSigner(provider, account); - -const message = await signer.signMessage("hello"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `message` - - `string` | `Uint8Array`\<`ArrayBufferLike`> - - the message to be signed -
- -#### Returns - -`Promise`\<`string`> - -a promise that resolves to the signed message - -#### Throws - -if the account is not found - -#### Overrides - -```ts -Signer.signMessage; -``` - ---- - -### signTransaction() - -```ts -signTransaction(_transaction): Promise; -``` - -Defined in: [aa-sdk/ethers/src/account-signer.ts:218](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/account-signer.ts#L218) - -Throws an error indicating that transaction signing is not supported and advises to use `sendUserOperation` instead. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `_transaction` - - `Deferrable`\<`TransactionRequest`> - - The transaction request -
- -#### Returns - -`Promise`\<`string`> - -#### Throws - -Will always throw an error indicating transaction signing is unsupported - -#### Overrides - -```ts -Signer.signTransaction; -``` diff --git a/docs/pages/reference/aa-sdk/ethers/src/classes/EthersProviderAdapter.mdx b/docs/pages/reference/aa-sdk/ethers/src/classes/EthersProviderAdapter.mdx deleted file mode 100644 index 80dc7c7713..0000000000 --- a/docs/pages/reference/aa-sdk/ethers/src/classes/EthersProviderAdapter.mdx +++ /dev/null @@ -1,347 +0,0 @@ ---- -title: EthersProviderAdapter -description: Lightweight Adapter for SmtAccountProvider to enable Signer Creation -slug: wallets/reference/aa-sdk/ethers/classes/EthersProviderAdapter -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [aa-sdk/ethers/src/provider-adapter.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/provider-adapter.ts#L20) - -Lightweight Adapter for SmtAccountProvider to enable Signer Creation - -## Extends - -- `JsonRpcProvider` - -## Constructors - -### Constructor - -```ts -new EthersProviderAdapter(opts): EthersProviderAdapter; -``` - -Defined in: [aa-sdk/ethers/src/provider-adapter.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/provider-adapter.ts#L48) - -Configures and initializes the account provider based on the given options. - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter({ - account, - chain: sepolia, - rpcProvider: "https://eth-sepolia.g.alchemy.com/v2/your-api-key", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `EthersProviderAdapterOpts` - - The options for setting up the ethers provider adapter -
- -#### Returns - -`EthersProviderAdapter` - -#### Overrides - -```ts -JsonRpcProvider.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `accountProvider` - - `SmartAccountClient` -
- -## Methods - -### connectToAccount() - -```ts -connectToAccount(account): AccountSigner; -``` - -Defined in: [aa-sdk/ethers/src/provider-adapter.ts:90](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/provider-adapter.ts#L90) - -Connects the Provider to an Account and returns a Signer - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* `SmartContractAccount` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `account` - - `TAccount` - - the account to connect to -
- -#### Returns - -[`AccountSigner`](AccountSigner)\<`TAccount`> - -an AccountSigner that can be used to sign and send user operations - ---- - -### getBundlerClient() - -```ts -getBundlerClient(): BundlerClient; -``` - -Defined in: [aa-sdk/ethers/src/provider-adapter.ts:123](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/provider-adapter.ts#L123) - -Creates and returns a BundlerClient using the existing account provider's transport and chain. - -#### Example - -```ts -import { AccountSigner, EthersProviderAdapter } from "@aa-sdk/ethers"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; -import { createLightAccount } from "@account-kit/smart-contracts"; - -const account = await createLightAccount({ - transport: http("https://rpc.testnet.aepps.com"), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); - -const provider = new EthersProviderAdapter({ - account, - chain: sepolia, - rpcProvider: "https://eth-sepolia.g.alchemy.com/v2/your-api-key", -}); - -const bundlerClient = provider.getBundlerClient(); -``` - -#### Returns - -`BundlerClient`\<[`Transport`](https://viem.sh)> - -A bundler client configured with the existing account provider. - ---- - -### send() - -```ts -send(method, params): Promise; -``` - -Defined in: [aa-sdk/ethers/src/provider-adapter.ts:79](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/provider-adapter.ts#L79) - -Rewrites the send method to use the account provider's EIP-1193 -compliant request method - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `method` - - `any` - - the RPC method to call -
- `params` - - `any`\[] - - the params required by the RPC method -
- -#### Returns - -`Promise`\<`any`> - -the result of the RPC call - -#### Overrides - -```ts -JsonRpcProvider.send; -``` - ---- - -### fromEthersProvider() - -```ts -static fromEthersProvider(provider, chain): EthersProviderAdapter; -``` - -Defined in: [aa-sdk/ethers/src/provider-adapter.ts:139](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/provider-adapter.ts#L139) - -Creates an instance of EthersProviderAdapter from an ethers.js JsonRpcProvider. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `provider` - - `JsonRpcProvider` - - the ethers JSON RPC provider to convert -
- `chain` - - [`Chain`](https://viem.sh) - - the chain to connect to -
- -#### Returns - -`EthersProviderAdapter` - -an instance of EthersProviderAdapter diff --git a/docs/pages/reference/aa-sdk/ethers/src/functions/convertEthersSignerToAccountSigner.mdx b/docs/pages/reference/aa-sdk/ethers/src/functions/convertEthersSignerToAccountSigner.mdx deleted file mode 100644 index 4bf6566777..0000000000 --- a/docs/pages/reference/aa-sdk/ethers/src/functions/convertEthersSignerToAccountSigner.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: convertEthersSignerToAccountSigner -description: Overview of the convertEthersSignerToAccountSigner function -slug: wallets/reference/aa-sdk/ethers/functions/convertEthersSignerToAccountSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function convertEthersSignerToAccountSigner(signer): SmartAccountSigner; -``` - -Defined in: [aa-sdk/ethers/src/utils.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/utils.ts#L45) - -Converts a ethers.js Signer to a SmartAccountSigner - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `signer` - - `Signer` - - the Signer to convert -
- -## Returns - -`SmartAccountSigner`\<`Signer`> - -a signer that can be used to sign and send user operations diff --git a/docs/pages/reference/aa-sdk/ethers/src/functions/convertWalletToAccountSigner.mdx b/docs/pages/reference/aa-sdk/ethers/src/functions/convertWalletToAccountSigner.mdx deleted file mode 100644 index 2729cb38d7..0000000000 --- a/docs/pages/reference/aa-sdk/ethers/src/functions/convertWalletToAccountSigner.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: convertWalletToAccountSigner -description: Overview of the convertWalletToAccountSigner function -slug: wallets/reference/aa-sdk/ethers/functions/convertWalletToAccountSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function convertWalletToAccountSigner(wallet): SmartAccountSigner; -``` - -Defined in: [aa-sdk/ethers/src/utils.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/ethers/src/utils.ts#L12) - -Converts a ethersjs Wallet to a SmartAccountSigner - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `wallet` - - `Wallet` - - the Wallet to convert -
- -## Returns - -`SmartAccountSigner`\<`Wallet`> - -a signer that can be used to sign and send user operations diff --git a/docs/pages/reference/account-kit/core/src/README.mdx b/docs/pages/reference/account-kit/core/src/README.mdx deleted file mode 100644 index a5b831dfa9..0000000000 --- a/docs/pages/reference/account-kit/core/src/README.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: account-kit/core -description: Overview of account-kit/core -slug: wallets/reference/account-kit/core -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Classes - -| Class | Description | -| :--------------------------------------------------------------------------------------------- | :----------------------------------------------------------------- | -| [ClientOnlyPropertyError](/wallets/reference/account-kit/core/classes/ClientOnlyPropertyError) | Error thrown when a client only property is accessed on the server | - -## Type Aliases - -| Type Alias | Description | -| :---------------------------------------------------------------------------------------------------------- | :---------- | -| [AccountConfig](/wallets/reference/account-kit/core/type-aliases/AccountConfig) | - | -| [AccountState](/wallets/reference/account-kit/core/type-aliases/AccountState) | - | -| [AlchemyAccountsConfig](/wallets/reference/account-kit/core/type-aliases/AlchemyAccountsConfig) | - | -| [AlchemyClientState](/wallets/reference/account-kit/core/type-aliases/AlchemyClientState) | - | -| [AlchemySigner](/wallets/reference/account-kit/core/type-aliases/AlchemySigner) | - | -| [AlchemySignerClient](/wallets/reference/account-kit/core/type-aliases/AlchemySignerClient) | - | -| [BaseCreateConfigProps](/wallets/reference/account-kit/core/type-aliases/BaseCreateConfigProps) | - | -| [ClientActions](/wallets/reference/account-kit/core/type-aliases/ClientActions) | - | -| [ClientStoreConfig](/wallets/reference/account-kit/core/type-aliases/ClientStoreConfig) | - | -| [Connection](/wallets/reference/account-kit/core/type-aliases/Connection) | - | -| [CreateAccountParams](/wallets/reference/account-kit/core/type-aliases/CreateAccountParams) | - | -| [CreateConfigProps](/wallets/reference/account-kit/core/type-aliases/CreateConfigProps) | - | -| [GetAccountParams](/wallets/reference/account-kit/core/type-aliases/GetAccountParams) | - | -| [GetAccountResult](/wallets/reference/account-kit/core/type-aliases/GetAccountResult) | - | -| [GetSmartAccountClientParams](/wallets/reference/account-kit/core/type-aliases/GetSmartAccountClientParams) | - | -| [GetSmartAccountClientResult](/wallets/reference/account-kit/core/type-aliases/GetSmartAccountClientResult) | - | -| [GetSmartWalletClientParams](/wallets/reference/account-kit/core/type-aliases/GetSmartWalletClientParams) | - | -| [GetSmartWalletClientResult](/wallets/reference/account-kit/core/type-aliases/GetSmartWalletClientResult) | - | -| [GetUserResult](/wallets/reference/account-kit/core/type-aliases/GetUserResult) | - | -| [SignerStatus](/wallets/reference/account-kit/core/type-aliases/SignerStatus) | - | -| [SolanaConnection](/wallets/reference/account-kit/core/type-aliases/SolanaConnection) | - | -| [Store](/wallets/reference/account-kit/core/type-aliases/Store) | - | -| [StoredState](/wallets/reference/account-kit/core/type-aliases/StoredState) | - | -| [StoreState](/wallets/reference/account-kit/core/type-aliases/StoreState) | - | -| [SupportedAccount](/wallets/reference/account-kit/core/type-aliases/SupportedAccount) | - | -| [SupportedAccounts](/wallets/reference/account-kit/core/type-aliases/SupportedAccounts) | - | -| [SupportedAccountTypes](/wallets/reference/account-kit/core/type-aliases/SupportedAccountTypes) | - | - -## Variables - -| Variable | Description | -| :------------------------------------------------------------------------------------------------------- | :---------- | -| [DEFAULT_IFRAME_CONTAINER_ID](/wallets/reference/account-kit/core/variables/DEFAULT_IFRAME_CONTAINER_ID) | - | - -## Functions - -| Function | Description | -| :----------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [convertSignerStatusToState](/wallets/reference/account-kit/core/functions/convertSignerStatusToState) | Converts the AlchemySigner's status to a more readable object | -| [cookieStorage](/wallets/reference/account-kit/core/functions/cookieStorage) | Function to create cookie based Storage | -| [cookieToInitialState](/wallets/reference/account-kit/core/functions/cookieToInitialState) | Converts a cookie into an initial state object | -| [createAccount](/wallets/reference/account-kit/core/functions/createAccount) | Creates an account of a specified type using the provided parameters and configuration. Supports creating LightAccount and MultiOwnerModularAccount types. | -| [createConfig](/wallets/reference/account-kit/core/functions/createConfig) | Creates an AlchemyAccountsConfig object that can be used in conjunction with the actions exported from `@account-kit/core`. | -| [createDefaultAccountState](/wallets/reference/account-kit/core/functions/createDefaultAccountState) | Creates the default account state for the given chains. | -| [createSigner](/wallets/reference/account-kit/core/functions/createSigner) | Given initial client store parameters, it initializes an AlchemySigner instance. This should only be called on the client. | -| [defaultAccountState](/wallets/reference/account-kit/core/functions/defaultAccountState) | Returns the default state for an account of a supported type. | -| [disconnect](/wallets/reference/account-kit/core/functions/disconnect) | Disconnects the current signer, accounts, and clears the store. | -| [getAccount](/wallets/reference/account-kit/core/functions/getAccount) | Retrieves the account of the specified type from the client store based on the provided configuration. | -| [getBundlerClient](/wallets/reference/account-kit/core/functions/getBundlerClient) | Retrieves the BundlerClient from the core store of the given AlchemyAccountsConfig. | -| [getChain](/wallets/reference/account-kit/core/functions/getChain) | Gets the currently active chain | -| [getConnection](/wallets/reference/account-kit/core/functions/getConnection) | Used to get the connection for the currently active chain | -| [getSigner](/wallets/reference/account-kit/core/functions/getSigner) | If there is a signer attached to the client state, it will return it. The signer should always be null on the server, and will be set on the client if the store was properly hydrated. | -| [getSignerStatus](/wallets/reference/account-kit/core/functions/getSignerStatus) | Retrieves the signer status from the client's store in the provided configuration. | -| [~~getSmartAccountClient~~](/wallets/reference/account-kit/core/functions/getSmartAccountClient) | Obtains a smart account client based on the provided parameters and configuration. Supports creating any of the SupportAccountTypes in Account Kit. If the signer is not connected, or an account is already being intializes, this results in a loading state. | -| [getSmartWalletClient](/wallets/reference/account-kit/core/functions/getSmartWalletClient) | Creates and returns a Smart Wallet Client instance. Returns undefined if running in a server environment or if no signer is connected. Caches clients by chain ID & address for performance optimization. | -| [getSolanaConnection](/wallets/reference/account-kit/core/functions/getSolanaConnection) | Used to get the connection for the id | -| [getUser](/wallets/reference/account-kit/core/functions/getUser) | Returns the currently logged in user if using an SCA with the AlchemySigner or the connected EOA details. | -| [hydrate](/wallets/reference/account-kit/core/functions/hydrate) | Will hydrate the client store with the provided initial state if one is provided. | -| [isLightAccountParams](/wallets/reference/account-kit/core/functions/isLightAccountParams) | - | -| [isModularV2AccountParams](/wallets/reference/account-kit/core/functions/isModularV2AccountParams) | - | -| [isMultiOwnerLightAccountParams](/wallets/reference/account-kit/core/functions/isMultiOwnerLightAccountParams) | - | -| [isMultiOwnerModularAccountParams](/wallets/reference/account-kit/core/functions/isMultiOwnerModularAccountParams) | - | -| [parseCookie](/wallets/reference/account-kit/core/functions/parseCookie) | Helper function that can be used to parse a cookie string on the server or client | -| [reconnect](/wallets/reference/account-kit/core/functions/reconnect) | This method will use the current state in the client store and attempt to restore connected instances of previously used accounts and the signer. | -| [setChain](/wallets/reference/account-kit/core/functions/setChain) | Allows you to change the current chain in the core store. Note, this chain must be one of the chains configured in your original createConfig call. | -| [watchAccount](/wallets/reference/account-kit/core/functions/watchAccount) | Watches for changes to a specific type of account and triggers the provided callback function when changes occur. | -| [watchBundlerClient](/wallets/reference/account-kit/core/functions/watchBundlerClient) | Watches for changes to the bundler client within the given configuration and triggers a callback when changes occur. | -| [watchChain](/wallets/reference/account-kit/core/functions/watchChain) | Allows you to subscribe to changes of the chain in the client store. | -| [watchConnection](/wallets/reference/account-kit/core/functions/watchConnection) | Subscribe to changes to the active connection | -| [watchSigner](/wallets/reference/account-kit/core/functions/watchSigner) | Subscribe to changes of the signer instance on the client store. | -| [watchSignerStatus](/wallets/reference/account-kit/core/functions/watchSignerStatus) | Watches the signer status in the client store and triggers the provided callback function when the status changes. | -| [watchSmartAccountClient](/wallets/reference/account-kit/core/functions/watchSmartAccountClient) | Watches for changes to the smart account client and triggers the provided callback when a change is detected. | -| [watchSmartWalletClient](/wallets/reference/account-kit/core/functions/watchSmartWalletClient) | Creates a subscription function that watches for changes to the Smart Wallet Client. Triggers the onChange callback whenever the signer status or chain changes. | -| [watchSolanaConnection](/wallets/reference/account-kit/core/functions/watchSolanaConnection) | Subscribe to changes to the solana connection for the id | -| [watchUser](/wallets/reference/account-kit/core/functions/watchUser) | Watches for changes to the user in the client store and triggers the provided callback when a change is detected. | - -## References - -### internalCreateWebSigner - -Renames and re-exports [createSigner](/wallets/reference/account-kit/core/functions/createSigner) diff --git a/docs/pages/reference/account-kit/core/src/classes/ClientOnlyPropertyError.mdx b/docs/pages/reference/account-kit/core/src/classes/ClientOnlyPropertyError.mdx deleted file mode 100644 index 2d26ff3dcd..0000000000 --- a/docs/pages/reference/account-kit/core/src/classes/ClientOnlyPropertyError.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: ClientOnlyPropertyError -description: Error thrown when a client only property is accessed on the server -slug: wallets/reference/account-kit/core/classes/ClientOnlyPropertyError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/core/src/errors.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/errors.ts#L16) - -Error thrown when a client only property is accessed on the server - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new ClientOnlyPropertyError(property): ClientOnlyPropertyError; -``` - -Defined in: [account-kit/core/src/errors.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/errors.ts#L24) - -Creates a new ClientOnlyPropertyError - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `property` - - `string` - - the name of the property that is only available on the client -
- -#### Returns - -`ClientOnlyPropertyError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"ClientOnlyPropertyError"` -
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/account-kit/core/src/functions/convertSignerStatusToState.mdx b/docs/pages/reference/account-kit/core/src/functions/convertSignerStatusToState.mdx deleted file mode 100644 index 9be6ed67b3..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/convertSignerStatusToState.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: convertSignerStatusToState -description: Overview of the convertSignerStatusToState function -slug: wallets/reference/account-kit/core/functions/convertSignerStatusToState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function convertSignerStatusToState(alchemySignerStatus, error): SignerStatus; -``` - -Defined in: [account-kit/core/src/store/store.ts:280](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/store.ts#L280) - -Converts the AlchemySigner's status to a more readable object - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `alchemySignerStatus` - - `AlchemySignerStatus` - - Enum value of the AlchemySigner's status to convert -
- `error` - - `undefined` | `ErrorInfo` - - the current signer error, if present -
- -## Returns - -[`SignerStatus`](../type-aliases/SignerStatus) - -an object containing the original status as well as booleans to check the current state diff --git a/docs/pages/reference/account-kit/core/src/functions/cookieStorage.mdx b/docs/pages/reference/account-kit/core/src/functions/cookieStorage.mdx deleted file mode 100644 index 2c87abec09..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/cookieStorage.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: cookieStorage -description: Overview of the cookieStorage function -slug: wallets/reference/account-kit/core/functions/cookieStorage -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function cookieStorage(config?): Storage; -``` - -Defined in: [account-kit/core/src/utils/cookies.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/utils/cookies.ts#L20) - -Function to create cookie based Storage - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config?` - - \{ `domain?`: `string`; `sessionLength?`: `number`; } - - optional config object -
- `config.domain?` - - `string` - - optional domain to set the cookie on, eg: `example.com` if you want the cookie to work on all subdomains of example.com -
- `config.sessionLength?` - - `number` - - **Deprecated** - - this option is deprecated and will be ignored -
- -## Returns - -`Storage` - -an instance of a browser storage object that leverages cookies diff --git a/docs/pages/reference/account-kit/core/src/functions/cookieToInitialState.mdx b/docs/pages/reference/account-kit/core/src/functions/cookieToInitialState.mdx deleted file mode 100644 index c60e76aef0..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/cookieToInitialState.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: cookieToInitialState -description: Overview of the cookieToInitialState function -slug: wallets/reference/account-kit/core/functions/cookieToInitialState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function cookieToInitialState(config, cookie?): undefined | StoredState; -``` - -Defined in: [account-kit/core/src/utils/cookies.ts:77](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/utils/cookies.ts#L77) - -Converts a cookie into an initial state object - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - the account config containing the client store -
- `cookie?` - - `string` - - optional cookie string -
- -## Returns - -`undefined` | [`StoredState`](../type-aliases/StoredState) - -the deserialized AlchemyClientState if the cookie exists, otherwise undefined diff --git a/docs/pages/reference/account-kit/core/src/functions/createAccount.mdx b/docs/pages/reference/account-kit/core/src/functions/createAccount.mdx deleted file mode 100644 index fd77813e2c..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/createAccount.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: createAccount -description: Overview of the createAccount function -slug: wallets/reference/account-kit/core/functions/createAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createAccount(params, config): Promise; -``` - -Defined in: [account-kit/core/src/actions/createAccount.ts:78](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/createAccount.ts#L78) - -Creates an account of a specified type using the provided parameters and configuration. Supports creating LightAccount and MultiOwnerModularAccount types. - -## Example - -```ts -import { createAccount } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -const account = createAccount( - { - type: "LightAccount", - }, - config, -); -``` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* [`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`CreateAccountParams`](../type-aliases/CreateAccountParams)\<`TAccount`> - - The parameters required to create the account, including the type and account parameters -
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - The configuration object for Alchemy accounts -
- -## Returns - -`Promise`\<[`SupportedAccounts`](../type-aliases/SupportedAccounts)> - -A promise that resolves to the created account object diff --git a/docs/pages/reference/account-kit/core/src/functions/createConfig.mdx b/docs/pages/reference/account-kit/core/src/functions/createConfig.mdx deleted file mode 100644 index e9d2c4b4fa..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/createConfig.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: createConfig -description: Overview of the createConfig function -slug: wallets/reference/account-kit/core/functions/createConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createConfig(params): AlchemyAccountsConfig; -``` - -Defined in: [account-kit/core/src/createConfig.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/createConfig.ts#L37) - -Creates an AlchemyAccountsConfig object that can be used in conjunction with -the actions exported from `@account-kit/core`. - -The config contains core and client stores that can be used to manage account state -in your application. - -## Example - -```ts -import { createConfig } from "@account-kit/core"; -import { sepolia } from "@account-kit/infra"; - -const config = createConfig({ - chain: sepolia, - transport: alchemy({ apiKey: "your-api-key" }), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`CreateConfigProps`](../type-aliases/CreateConfigProps) - - The parameters to create the config with -
- -## Returns - -[`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - -An alchemy account config object containing the core and client store diff --git a/docs/pages/reference/account-kit/core/src/functions/createDefaultAccountState.mdx b/docs/pages/reference/account-kit/core/src/functions/createDefaultAccountState.mdx deleted file mode 100644 index 9fe96dd552..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/createDefaultAccountState.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: createDefaultAccountState -description: Overview of the createDefaultAccountState function -slug: wallets/reference/account-kit/core/functions/createDefaultAccountState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createDefaultAccountState(chains): object; -``` - -Defined in: [account-kit/core/src/store/store.ts:378](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/store.ts#L378) - -Creates the default account state for the given chains. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chains` - - [`Chain`](https://viem.sh)\[] - - The chains to create the account state for -
- -## Returns - -`object` - -The default account state for the given chains diff --git a/docs/pages/reference/account-kit/core/src/functions/createSigner.mdx b/docs/pages/reference/account-kit/core/src/functions/createSigner.mdx deleted file mode 100644 index 898150d711..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/createSigner.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: createSigner -description: Overview of the createSigner function -slug: wallets/reference/account-kit/core/functions/createSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createSigner(params): AlchemyWebSigner; -``` - -Defined in: [account-kit/core/src/environments/web/createSigner.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/environments/web/createSigner.ts#L12) - -Given initial client store parameters, it initializes an AlchemySigner instance. -This should only be called on the client. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `ClientStoreConfig` - - to configure and create the signer -
- -## Returns - -`AlchemyWebSigner` - -an instance of the AlchemySigner diff --git a/docs/pages/reference/account-kit/core/src/functions/defaultAccountState.mdx b/docs/pages/reference/account-kit/core/src/functions/defaultAccountState.mdx deleted file mode 100644 index bb058e36ab..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/defaultAccountState.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: defaultAccountState -description: Overview of the defaultAccountState function -slug: wallets/reference/account-kit/core/functions/defaultAccountState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function defaultAccountState(): AccountState; -``` - -Defined in: [account-kit/core/src/store/store.ts:311](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/store.ts#L311) - -Returns the default state for an account of a supported type. - -## Example - -```ts -import { defaultAccountState } from "@account-kit/core"; - -const defaultLightAccountState = defaultAccountState<"LightAccount">(); -``` - -## Type Parameters - - - - - - - - - - - - - - - - -
Type ParameterDescription
- `T` *extends* [`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes) - -
- -## Returns - -[`AccountState`](../type-aliases/AccountState)\<`T`> - -The default state for the specified account type diff --git a/docs/pages/reference/account-kit/core/src/functions/disconnect.mdx b/docs/pages/reference/account-kit/core/src/functions/disconnect.mdx deleted file mode 100644 index f488157d90..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/disconnect.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: disconnect -description: Overview of the disconnect function -slug: wallets/reference/account-kit/core/functions/disconnect -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function disconnect(config): Promise; -``` - -Defined in: [account-kit/core/src/actions/disconnect.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/disconnect.ts#L25) - -Disconnects the current signer, accounts, and clears the store. - -## Example - -```ts -import { disconnect, createConfig } from "@account-kit/core"; -import { sepolia } from "@account-kit/infra"; - -const config = createConfig({ - chain: sepolia, - apiKey: "your-api-key", -}); - -await disconnect(config); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - The configuration containing the store to be cleared -
- -## Returns - -`Promise`\<`void`> diff --git a/docs/pages/reference/account-kit/core/src/functions/getAccount.mdx b/docs/pages/reference/account-kit/core/src/functions/getAccount.mdx deleted file mode 100644 index 18ab3957eb..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getAccount.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: getAccount -description: Overview of the getAccount function -slug: wallets/reference/account-kit/core/functions/getAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getAccount(params, config): GetAccountResult; -``` - -Defined in: [account-kit/core/src/actions/getAccount.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getAccount.ts#L34) - -Retrieves the account of the specified type from the client store based on the provided configuration. - -## Example - -```ts -import { getAccount } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -const { account, status } = getAccount( - { - type: "LightAccount", - }, - config, -); -``` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* [`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`GetAccountParams`](../type-aliases/GetAccountParams)\<`TAccount`> - - The parameters containing the type of the account to retrieve -
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - The configuration containing the client store -
- -## Returns - -[`GetAccountResult`](../type-aliases/GetAccountResult)\<`TAccount`> - -The result which includes the account if found and its status diff --git a/docs/pages/reference/account-kit/core/src/functions/getBundlerClient.mdx b/docs/pages/reference/account-kit/core/src/functions/getBundlerClient.mdx deleted file mode 100644 index 5c9de35f87..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getBundlerClient.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: getBundlerClient -description: Overview of the getBundlerClient function -slug: wallets/reference/account-kit/core/functions/getBundlerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getBundlerClient(config): ClientWithAlchemyMethods; -``` - -Defined in: [account-kit/core/src/actions/getBundlerClient.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getBundlerClient.ts#L18) - -Retrieves the BundlerClient from the core store of the given AlchemyAccountsConfig. - -## Example - -```ts -// see `createConfig` for more information on how to create a config -import { config } from "./config"; - -const bundlerClient = getBundlerClient(config); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - The configuration object containing the core store. -
- -## Returns - -`ClientWithAlchemyMethods` - -The BundlerClient from the core store. diff --git a/docs/pages/reference/account-kit/core/src/functions/getChain.mdx b/docs/pages/reference/account-kit/core/src/functions/getChain.mdx deleted file mode 100644 index d2235ec75e..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getChain.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: getChain -description: Overview of the getChain function -slug: wallets/reference/account-kit/core/functions/getChain -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getChain(config): Chain; -``` - -Defined in: [account-kit/core/src/actions/getChain.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getChain.ts#L10) - -Gets the currently active chain - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - the account config object -
- -## Returns - -[`Chain`](https://viem.sh) - -the currently active chain diff --git a/docs/pages/reference/account-kit/core/src/functions/getConnection.mdx b/docs/pages/reference/account-kit/core/src/functions/getConnection.mdx deleted file mode 100644 index c914ef0698..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getConnection.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: getConnection -description: Overview of the getConnection function -slug: wallets/reference/account-kit/core/functions/getConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getConnection(config): Connection; -``` - -Defined in: [account-kit/core/src/actions/getConnection.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getConnection.ts#L19) - -Used to get the connection for the currently active chain - -## Example - -```ts -import { getConnection } from "@account-kit/core"; -import { config } from "./config"; - -const connection = getConnection(config); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - the account config -
- -## Returns - -[`Connection`](../type-aliases/Connection) - -a connection object for the current active chain diff --git a/docs/pages/reference/account-kit/core/src/functions/getSigner.mdx b/docs/pages/reference/account-kit/core/src/functions/getSigner.mdx deleted file mode 100644 index ccc46045fe..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getSigner.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: getSigner -description: Overview of the getSigner function -slug: wallets/reference/account-kit/core/functions/getSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSigner(config): null | T; -``` - -Defined in: [account-kit/core/src/actions/getSigner.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSigner.ts#L19) - -If there is a signer attached to the client state, it will return it. -The signer should always be null on the server, and will be set on the client -if the store was properly hydrated. - -## Example - -```ts -import { getSigner } from "@account-kit/core"; -import { config } from "./config"; - -const signer = getSigner(config); -``` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - The account config which contains the client store -
- -## Returns - -`null` | `T` - -the instance of the signer present in the store if it exists, otherwise null diff --git a/docs/pages/reference/account-kit/core/src/functions/getSignerStatus.mdx b/docs/pages/reference/account-kit/core/src/functions/getSignerStatus.mdx deleted file mode 100644 index b3a56bb0ff..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getSignerStatus.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: getSignerStatus -description: Overview of the getSignerStatus function -slug: wallets/reference/account-kit/core/functions/getSignerStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSignerStatus(config): any; -``` - -Defined in: [account-kit/core/src/actions/getSignerStatus.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSignerStatus.ts#L18) - -Retrieves the signer status from the client's store in the provided configuration. - -## Example - -```ts -import { getSignerStatus } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -const signerStatus = getSignerStatus(config); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - The configuration object containing the client store -
- -## Returns - -`any` - -The current signer status from the client store diff --git a/docs/pages/reference/account-kit/core/src/functions/getSmartAccountClient.mdx b/docs/pages/reference/account-kit/core/src/functions/getSmartAccountClient.mdx deleted file mode 100644 index 280381e670..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getSmartAccountClient.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: getSmartAccountClient -description: Obtains a smart account client based on the provided parameters and configuration. Supports creating any of the SupportAccountTypes in Account Kit. If the signer is not connected, or an account is already being intializes, this results in a loading state. -slug: wallets/reference/account-kit/core/functions/getSmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSmartAccountClient( - params, - config, -): GetSmartAccountClientResult>; -``` - -Defined in: [account-kit/core/src/actions/getSmartAccountClient.ts:70](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSmartAccountClient.ts#L70) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `SupportedAccountTypes` - - `SupportedAccountTypes` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`GetSmartAccountClientParams`](../type-aliases/GetSmartAccountClientParams)\<`TChain`, `TAccount`> - - Parameters for getting the smart account client, including account parameters and client parameters -
- `config` - - `AlchemyAccountsConfig` - - The configuration containing the client store and other necessary information -
- -## Returns - -[`GetSmartAccountClientResult`](../type-aliases/GetSmartAccountClientResult)\<`TChain`, `SupportedAccount`\<`TAccount`>> - -The result object which includes the client, address, and loading status of the client diff --git a/docs/pages/reference/account-kit/core/src/functions/getSmartWalletClient.mdx b/docs/pages/reference/account-kit/core/src/functions/getSmartWalletClient.mdx deleted file mode 100644 index f9120d28d6..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getSmartWalletClient.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: getSmartWalletClient -description: Creates and returns a Smart Wallet Client instance. Returns undefined if running in a server environment or if no signer is connected. Caches clients by chain ID & address for performance optimization. -slug: wallets/reference/account-kit/core/functions/getSmartWalletClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSmartWalletClient( - config, - params?, -): GetSmartWalletClientResult; -``` - -Defined in: [account-kit/core/src/actions/getSmartWalletClient.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSmartWalletClient.ts#L20) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` | `` `0x${string}` `` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - The configuration containing the client store and connection information -
- `params?` - - [`GetSmartWalletClientParams`](../type-aliases/GetSmartWalletClientParams)\<`TAccount`> - - Optional parameters including account address -
- -## Returns - -[`GetSmartWalletClientResult`](../type-aliases/GetSmartWalletClientResult)\<`TAccount`> - -The Smart Wallet Client instance or undefined if not available diff --git a/docs/pages/reference/account-kit/core/src/functions/getSolanaConnection.mdx b/docs/pages/reference/account-kit/core/src/functions/getSolanaConnection.mdx deleted file mode 100644 index d740a2ab1d..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getSolanaConnection.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: getSolanaConnection -description: Overview of the getSolanaConnection function -slug: wallets/reference/account-kit/core/functions/getSolanaConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSolanaConnection(config): null | SolanaConnection; -``` - -Defined in: [account-kit/core/src/actions/getSolanaConnection.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSolanaConnection.ts#L17) - -Used to get the connection for the id - -## Example - -```ts -import { getSolanaConnection } from "@account-kit/core"; -import { config } from "./config"; - -const connection = getSolanaConnection(config); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - the account config -
- -## Returns - -`null` | [`SolanaConnection`](../type-aliases/SolanaConnection) - -a connection object for the current active chain diff --git a/docs/pages/reference/account-kit/core/src/functions/getUser.mdx b/docs/pages/reference/account-kit/core/src/functions/getUser.mdx deleted file mode 100644 index 78b874393c..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/getUser.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: getUser -description: Overview of the getUser function -slug: wallets/reference/account-kit/core/functions/getUser -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getUser(config): null | (User & object); -``` - -Defined in: [account-kit/core/src/actions/getUser.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getUser.ts#L21) - -Returns the currently logged in user if using an SCA with the AlchemySigner -or the connected EOA details. - -## Example - -```ts -import { getUser } from "@account-kit/core"; -import { config } from "./config"; - -const user = getUser(config); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - the account config containing app state -
- -## Returns - -`null` | [`User`](../../../signer/src/type-aliases/User) & `object` - -the user if the signer or an EOA are connected diff --git a/docs/pages/reference/account-kit/core/src/functions/hydrate.mdx b/docs/pages/reference/account-kit/core/src/functions/hydrate.mdx deleted file mode 100644 index e6ba30ab5a..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/hydrate.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: hydrate -description: Overview of the hydrate function -slug: wallets/reference/account-kit/core/functions/hydrate -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function hydrate(config, initialState?): HydrateResult; -``` - -Defined in: [account-kit/core/src/hydrate.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/hydrate.ts#L37) - -Will hydrate the client store with the provided initial state if one is provided. - -## Example - -```ts -import { hydrate, cookieToInitialState } from "@account-kit/core"; -import { config } from "./config"; - -const initialState = cookieToInitialState(document.cookie); -const { onMount } = hydrate(config, initialState); -// call onMount once your component has mounted -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - the config containing the client store -
- `initialState?` - - [`StoredState`](../type-aliases/StoredState) - - optional param detailing the initial ClientState -
- -## Returns - -`HydrateResult` - -an object containing an onMount function that can be called when your component first renders on the client diff --git a/docs/pages/reference/account-kit/core/src/functions/isLightAccountParams.mdx b/docs/pages/reference/account-kit/core/src/functions/isLightAccountParams.mdx deleted file mode 100644 index fcc12656cf..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/isLightAccountParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: isLightAccountParams -description: Overview of the isLightAccountParams function -slug: wallets/reference/account-kit/core/functions/isLightAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isLightAccountParams( - params, -): params is GetAccountParams<"LightAccount">; -``` - -Defined in: [account-kit/core/src/actions/createAccount.ts:247](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/createAccount.ts#L247) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`CreateAccountParams`](../type-aliases/CreateAccountParams)\<[`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes)> -
- -## Returns - -`params is GetAccountParams<"LightAccount">` diff --git a/docs/pages/reference/account-kit/core/src/functions/isModularV2AccountParams.mdx b/docs/pages/reference/account-kit/core/src/functions/isModularV2AccountParams.mdx deleted file mode 100644 index 1bac38e696..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/isModularV2AccountParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: isModularV2AccountParams -description: Overview of the isModularV2AccountParams function -slug: wallets/reference/account-kit/core/functions/isModularV2AccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isModularV2AccountParams( - params, -): params is GetAccountParams<"ModularAccountV2">; -``` - -Defined in: [account-kit/core/src/actions/createAccount.ts:241](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/createAccount.ts#L241) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`CreateAccountParams`](../type-aliases/CreateAccountParams)\<[`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes)> -
- -## Returns - -`params is GetAccountParams<"ModularAccountV2">` diff --git a/docs/pages/reference/account-kit/core/src/functions/isMultiOwnerLightAccountParams.mdx b/docs/pages/reference/account-kit/core/src/functions/isMultiOwnerLightAccountParams.mdx deleted file mode 100644 index 66c09073c8..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/isMultiOwnerLightAccountParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: isMultiOwnerLightAccountParams -description: Overview of the isMultiOwnerLightAccountParams function -slug: wallets/reference/account-kit/core/functions/isMultiOwnerLightAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isMultiOwnerLightAccountParams( - params, -): params is GetAccountParams<"MultiOwnerLightAccount">; -``` - -Defined in: [account-kit/core/src/actions/createAccount.ts:253](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/createAccount.ts#L253) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`CreateAccountParams`](../type-aliases/CreateAccountParams)\<[`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes)> -
- -## Returns - -`params is GetAccountParams<"MultiOwnerLightAccount">` diff --git a/docs/pages/reference/account-kit/core/src/functions/isMultiOwnerModularAccountParams.mdx b/docs/pages/reference/account-kit/core/src/functions/isMultiOwnerModularAccountParams.mdx deleted file mode 100644 index 7b612fc4ff..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/isMultiOwnerModularAccountParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: isMultiOwnerModularAccountParams -description: Overview of the isMultiOwnerModularAccountParams function -slug: wallets/reference/account-kit/core/functions/isMultiOwnerModularAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isMultiOwnerModularAccountParams( - params, -): params is GetAccountParams<"MultiOwnerModularAccount">; -``` - -Defined in: [account-kit/core/src/actions/createAccount.ts:259](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/createAccount.ts#L259) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`CreateAccountParams`](../type-aliases/CreateAccountParams)\<[`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes)> -
- -## Returns - -`params is GetAccountParams<"MultiOwnerModularAccount">` diff --git a/docs/pages/reference/account-kit/core/src/functions/parseCookie.mdx b/docs/pages/reference/account-kit/core/src/functions/parseCookie.mdx deleted file mode 100644 index d3795757c9..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/parseCookie.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: parseCookie -description: Overview of the parseCookie function -slug: wallets/reference/account-kit/core/functions/parseCookie -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function parseCookie(cookie, key): undefined | string; -``` - -Defined in: [account-kit/core/src/utils/cookies.ts:116](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/utils/cookies.ts#L116) - -Helper function that can be used to parse a cookie string on the server or client - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `cookie` - - `string` - - the cookie string to parse -
- `key` - - `string` - - the key of the cookie to parse -
- -## Returns - -`undefined` | `string` - -the value of the cookie given a key if it exists, otherwise undefined diff --git a/docs/pages/reference/account-kit/core/src/functions/reconnect.mdx b/docs/pages/reference/account-kit/core/src/functions/reconnect.mdx deleted file mode 100644 index 4efdbfb0cb..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/reconnect.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: reconnect -description: Overview of the reconnect function -slug: wallets/reference/account-kit/core/functions/reconnect -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function reconnect(config): Promise; -``` - -Defined in: [account-kit/core/src/actions/reconnect.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/reconnect.ts#L19) - -This method will use the current state in the client store and attempt to restore -connected instances of previously used accounts and the signer. - -## Example - -```ts -import { reconnect } from "@account-kit/core"; -import { config } from "./config"; - -await reconnect(config); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - the account config which contains the client store -
- -## Returns - -`Promise`\<`void`> diff --git a/docs/pages/reference/account-kit/core/src/functions/setChain.mdx b/docs/pages/reference/account-kit/core/src/functions/setChain.mdx deleted file mode 100644 index 7cbc070f43..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/setChain.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: setChain -description: Overview of the setChain function -slug: wallets/reference/account-kit/core/functions/setChain -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function setChain(config, chain): Promise; -``` - -Defined in: [account-kit/core/src/actions/setChain.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/setChain.ts#L23) - -Allows you to change the current chain in the core store. Note, this chain -must be one of the chains configured in your original createConfig call. - -## Example - -```ts -import { setChain } from "@account-kit/core"; -import { config } from "./config"; -import { sepolia } from "@account-kit/infra"; - -await setChain(config, sepolia); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - the accounts config object -
- `chain` - - [`Chain`](https://viem.sh) - - the chain to change to. It must be present in the connections config object -
- -## Returns - -`Promise`\<`void`> diff --git a/docs/pages/reference/account-kit/core/src/functions/watchAccount.mdx b/docs/pages/reference/account-kit/core/src/functions/watchAccount.mdx deleted file mode 100644 index 5b0b7fd13d..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchAccount.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: watchAccount -description: Overview of the watchAccount function -slug: wallets/reference/account-kit/core/functions/watchAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchAccount(type, config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchAccount.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchAccount.ts#L24) - -Watches for changes to a specific type of account and triggers the provided callback function when changes occur. - -## Example - -```ts -import { watchAccount } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchAccount("LightAccount", config)(console.log); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDescription
- `TAccount` *extends* [`SupportedAccountTypes`](../type-aliases/SupportedAccountTypes) - - The type of account to watch -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `type` - - `TAccount` - - The type of account to watch -
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - The configuration containing client store settings -
- -## Returns - -A function that accepts a callback to be called when the account changes and returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`account`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchBundlerClient.mdx b/docs/pages/reference/account-kit/core/src/functions/watchBundlerClient.mdx deleted file mode 100644 index 48b3749f80..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchBundlerClient.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: watchBundlerClient -description: Overview of the watchBundlerClient function -slug: wallets/reference/account-kit/core/functions/watchBundlerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchBundlerClient(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchBundlerClient.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchBundlerClient.ts#L20) - -Watches for changes to the bundler client within the given configuration and triggers a callback when changes occur. - -## Example - -```ts -import { watchBundlerClient } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchBundlerClient(config)(console.log); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - The configuration object containing the core store -
- -## Returns - -A function accepting a callback function to invoke when the bundler client changes and returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`bundlerClient`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchChain.mdx b/docs/pages/reference/account-kit/core/src/functions/watchChain.mdx deleted file mode 100644 index a3b6d15b7e..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchChain.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: watchChain -description: Overview of the watchChain function -slug: wallets/reference/account-kit/core/functions/watchChain -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchChain(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchChain.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchChain.ts#L19) - -Allows you to subscribe to changes of the chain in the client store. - -## Example - -```ts -import { watchChain } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchChain(config)(console.log); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - the account config object -
- -## Returns - -a function which accepts an onChange callback that will be fired when the chain changes and returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`chain`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchConnection.mdx b/docs/pages/reference/account-kit/core/src/functions/watchConnection.mdx deleted file mode 100644 index 50951b67b6..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchConnection.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: watchConnection -description: Overview of the watchConnection function -slug: wallets/reference/account-kit/core/functions/watchConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchConnection(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchConnection.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchConnection.ts#L18) - -Subscribe to changes to the active connection - -## Example - -```ts -import { watchConnection } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchConnection(config)(console.log); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - the account config -
- -## Returns - -a function which accepts an onChange callback that will be fired when the connection changes and returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`connection`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchSigner.mdx b/docs/pages/reference/account-kit/core/src/functions/watchSigner.mdx deleted file mode 100644 index c816a9d9d7..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchSigner.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: watchSigner -description: Overview of the watchSigner function -slug: wallets/reference/account-kit/core/functions/watchSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchSigner(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchSigner.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchSigner.ts#L19) - -Subscribe to changes of the signer instance on the client store. - -## Example - -```ts -import { watchSigner } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchSigner(config)(console.log); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - the account config containing the client store -
- -## Returns - -a function which accepts an onChange callback that will be fired when the signer changes and returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`signer?`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchSignerStatus.mdx b/docs/pages/reference/account-kit/core/src/functions/watchSignerStatus.mdx deleted file mode 100644 index 2929ae9f9f..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchSignerStatus.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: watchSignerStatus -description: Overview of the watchSignerStatus function -slug: wallets/reference/account-kit/core/functions/watchSignerStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchSignerStatus(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchSignerStatus.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchSignerStatus.ts#L20) - -Watches the signer status in the client store and triggers the provided callback function when the status changes. - -## Example - -```ts -import { watchSignerStatus } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchSignerStatus(config)(console.log); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig) - - The configuration object containing the client store -
- -## Returns - -A function that accepts a callback to be called when the signer status changes which returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`status`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchSmartAccountClient.mdx b/docs/pages/reference/account-kit/core/src/functions/watchSmartAccountClient.mdx deleted file mode 100644 index 98ef331ad0..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchSmartAccountClient.mdx +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: watchSmartAccountClient -description: Overview of the watchSmartAccountClient function -slug: wallets/reference/account-kit/core/functions/watchSmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchSmartAccountClient( - params, - config, -): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchSmartAccountClient.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchSmartAccountClient.ts#L33) - -Watches for changes to the smart account client and triggers the provided callback when a change is detected. - -## Example - -```ts -import { watchSmartAccountClient } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchSmartAccountClient({ type: "LightAccount" }, config)(console.log); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault typeDescription
- `TAccount` *extends* `SupportedAccountTypes` - - ‐ - - extends SupportedAccountTypes -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) - - extends Chain | undefined = Chain | undefined -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`GetSmartAccountClientParams`](../type-aliases/GetSmartAccountClientParams)\<`TChain`, `TAccount`> - - the parameters needed to get the smart account client -
- `config` - - `AlchemyAccountsConfig` - - the configuration containing the client store and other settings -
- -## Returns - -a function that accepts a callback to be called when the client changes and returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`client`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchSmartWalletClient.mdx b/docs/pages/reference/account-kit/core/src/functions/watchSmartWalletClient.mdx deleted file mode 100644 index 0d190a5ec6..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchSmartWalletClient.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: watchSmartWalletClient -description: Overview of the watchSmartWalletClient function -slug: wallets/reference/account-kit/core/functions/watchSmartWalletClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchSmartWalletClient(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchSmartWalletClient.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchSmartWalletClient.ts#L29) - -Creates a subscription function that watches for changes to the Smart Wallet Client. -Triggers the onChange callback whenever the signer status or chain changes. - -## Example - -```ts -import { watchSmartWalletClient } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config.js"; - -const watchClient = watchSmartWalletClient(config); -const unsubscribe = watchClient((client) => { - console.log("Smart Wallet Client changed:", client); -}); - -// Clean up subscription -unsubscribe(); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - The configuration containing the client store and connection information -
- -## Returns - -A function that accepts an onChange callback and returns an unsubscribe function - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`client`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchSolanaConnection.mdx b/docs/pages/reference/account-kit/core/src/functions/watchSolanaConnection.mdx deleted file mode 100644 index a0ca2d68af..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchSolanaConnection.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: watchSolanaConnection -description: Overview of the watchSolanaConnection function -slug: wallets/reference/account-kit/core/functions/watchSolanaConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchSolanaConnection(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchSolanaConnection.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchSolanaConnection.ts#L18) - -Subscribe to changes to the solana connection for the id - -## Example - -```ts twoslash -import { watchSolanaConnection } from "@account-kit/core"; -// see createConfig for more information on how to create a config -const config = {} as any; - -watchSolanaConnection(config)(console.log); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - the account config of the connection -
- -## Returns - -a function which accepts an onChange callback that will be fired when the connection changes and returns a function to unsubscribe from the store - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`connection`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/functions/watchUser.mdx b/docs/pages/reference/account-kit/core/src/functions/watchUser.mdx deleted file mode 100644 index 2e1d617776..0000000000 --- a/docs/pages/reference/account-kit/core/src/functions/watchUser.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: watchUser -description: Overview of the watchUser function -slug: wallets/reference/account-kit/core/functions/watchUser -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function watchUser(config): (onChange) => any; -``` - -Defined in: [account-kit/core/src/actions/watchUser.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/watchUser.ts#L20) - -Watches for changes to the user in the client store and triggers the provided callback when a change is detected. - -## Example - -```ts -import { watchUser } from "@account-kit/core"; -// see createConfig for more information on how to create a config -import { config } from "./config"; - -watchUser(config)(console.log); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - `AlchemyAccountsConfig` - - the configuration containing the client store -
- -## Returns - -a function which accepts a callback that fires when the user changes and returns a function to unsubscribe from the user updates - -```ts -(onChange): any; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `onChange` - - (`user?`) => `void` -
- -### Returns - -`any` diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/AccountConfig.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/AccountConfig.mdx deleted file mode 100644 index 3763549cb6..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/AccountConfig.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: AccountConfig -description: Overview of AccountConfig -slug: wallets/reference/account-kit/core/type-aliases/AccountConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AccountConfig = TAccount extends "LightAccount" - ? OmitSignerTransportChain< - CreateLightAccountParams< - Transport, - AlchemySigner, - LightAccountVersion<"LightAccount"> - > - > - : TAccount extends "MultiOwnerLightAccount" - ? OmitSignerTransportChain< - CreateMultiOwnerLightAccountParams< - Transport, - AlchemySigner, - LightAccountVersion<"MultiOwnerLightAccount"> - > - > - : TAccount extends "MultiOwnerModularAccount" - ? OmitSignerTransportChain< - CreateMultiOwnerModularAccountParams - > - : TAccount extends "ModularAccountV2" - ? OmitSignerTransportChain< - CreateModularAccountV2Params - > - : never; -``` - -Defined in: [account-kit/core/src/actions/createAccount.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/createAccount.ts#L28) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* [`SupportedAccountTypes`](SupportedAccountTypes) -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/AccountState.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/AccountState.mdx deleted file mode 100644 index 0e6ec1e9a8..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/AccountState.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: AccountState -description: Overview of AccountState -slug: wallets/reference/account-kit/core/type-aliases/AccountState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AccountState = - | { - account: Promise>; - error?: never; - status: "INITIALIZING"; - } - | { - account: { - address: Address; - }; - error?: never; - status: "RECONNECTING"; - } - | { - account: SupportedAccount; - error?: never; - status: "READY"; - } - | { - account: undefined; - error?: never; - status: "DISCONNECTED"; - } - | { - account: undefined; - error: Error; - status: "ERROR"; - }; -``` - -Defined in: [account-kit/core/src/store/types.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/types.ts#L26) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* `SupportedAccountTypes` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemyAccountsConfig.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/AlchemyAccountsConfig.mdx deleted file mode 100644 index e104b30a70..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemyAccountsConfig.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: AlchemyAccountsConfig -description: Overview of AlchemyAccountsConfig -slug: wallets/reference/account-kit/core/type-aliases/AlchemyAccountsConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyAccountsConfig = object; -``` - -Defined in: [account-kit/core/src/types.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L59) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `_internal` - - `object` -
- `_internal.createSigner` - - (`config`) => [`AlchemySigner`](AlchemySigner) -
- `_internal.sessionLength` - - `number` -
- `_internal.ssr?` - - `boolean` -
- `_internal.storageKey` - - `string` -
- `_internal.wagmiConfig` - - `WagmiConfig` -
- `accountCreationHint?` - - [`CreateConfigProps`](CreateConfigProps)\[`"accountCreationHint"`] -
- `solana?` - - `object` -
- `solana.adapters?` - - `WalletAdapter`\[] | `"detect"` -
- `solana.connection` - - `SolanaWeb3Connection` -
- `store` - - `Store` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemyClientState.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/AlchemyClientState.mdx deleted file mode 100644 index 88f4b22c33..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemyClientState.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemyClientState -description: Overview of AlchemyClientState -slug: wallets/reference/account-kit/core/type-aliases/AlchemyClientState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyClientState = StoredState; -``` - -Defined in: [account-kit/core/src/types.ts:167](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L167) diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemySigner.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/AlchemySigner.mdx deleted file mode 100644 index 60f4c67aa4..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemySigner.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemySigner -description: Overview of AlchemySigner -slug: wallets/reference/account-kit/core/type-aliases/AlchemySigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySigner = AlchemyWebSigner | RNAlchemySigner; -``` - -Defined in: [account-kit/core/src/types.ts:169](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L169) diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemySignerClient.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/AlchemySignerClient.mdx deleted file mode 100644 index d5e3d20539..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/AlchemySignerClient.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemySignerClient -description: Overview of AlchemySignerClient -slug: wallets/reference/account-kit/core/type-aliases/AlchemySignerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySignerClient = AlchemyWebSigner | (RNSignerClient & object); -``` - -Defined in: [account-kit/core/src/types.ts:171](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L171) diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/BaseCreateConfigProps.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/BaseCreateConfigProps.mdx deleted file mode 100644 index d620de7c33..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/BaseCreateConfigProps.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: BaseCreateConfigProps -description: Overview of BaseCreateConfigProps -slug: wallets/reference/account-kit/core/type-aliases/BaseCreateConfigProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BaseCreateConfigProps = RpcConnectionConfig & - object & - Omit< - PartialBy< - Exclude, - "iframeConfig" - >, - "connection" - >; -``` - -Defined in: [account-kit/core/src/types.ts:173](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L173) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
- `accountCreationHint?` - - `NonNullable`\<`Parameters`\<`SmartWalletClient`\[`"requestAccount"`]>\[`0`]>\[`"creationHint"`] - - ‐ -
- `connectors?` - - `CreateConnectorFn`\[] - - ‐ -
- `enablePopupOauth?` - - `boolean` - - If set, calls `preparePopupOauth` immediately upon initializing the signer. - If you intend to use popup-based OAuth login, you must either set this - option to true or manually ensure that you call - `signer.preparePopupOauth()` at some point before the user interaction that - triggers the OAuth authentication flow. -
- `sessionConfig?` - - `AlchemySignerParams`\[`"sessionConfig"`] & `object` - - ‐ -
- `ssr?` - - `boolean` - - Enable this parameter if you are using the config in an SSR setting (eg. NextJS) - Turing this setting on will disable automatic hydration of the client store -
- `storage?` - - `CreateStorageFn` - - ‐ -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/ClientActions.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/ClientActions.mdx deleted file mode 100644 index 8e131016ed..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/ClientActions.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: ClientActions -description: Overview of ClientActions -slug: wallets/reference/account-kit/core/type-aliases/ClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientActions = TAccount extends LightAccount - ? LightAccountClientActions - : TAccount extends MultiOwnerModularAccount - ? MultiOwnerPluginActions> & - PluginManagerActions> & - AccountLoupeActions> - : TAccount extends MultiOwnerLightAccount - ? MultiOwnerLightAccountClientActions - : TAccount extends ModularAccountV2 - ? object - : never; -``` - -Defined in: [account-kit/core/src/actions/getSmartAccountClient.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSmartAccountClient.ts#L46) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/ClientStoreConfig.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/ClientStoreConfig.mdx deleted file mode 100644 index 2737862ef6..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/ClientStoreConfig.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: ClientStoreConfig -description: Overview of ClientStoreConfig -slug: wallets/reference/account-kit/core/type-aliases/ClientStoreConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientStoreConfig = object; -``` - -Defined in: [account-kit/core/src/store/types.ts:47](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/types.ts#L47) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - [`PartialBy`](https://viem.sh)\<`Exclude`\<`AlchemySignerParams`\[`"client"`], `AlchemySignerWebClient`>, `"iframeConfig"`> -
- `sessionConfig?` - - `AlchemySignerParams`\[`"sessionConfig"`] -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/Connection.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/Connection.mdx deleted file mode 100644 index 736523295f..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/Connection.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: Connection -description: Overview of Connection -slug: wallets/reference/account-kit/core/type-aliases/Connection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Connection = object; -``` - -Defined in: [account-kit/core/src/types.ts:113](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L113) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `chain` - - [`Chain`](https://viem.sh) -
- `policyId?` - - `string` | `string`\[] -
- `policyToken?` - - `PolicyToken` -
- `transport` - - `AlchemyTransportConfig` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/CreateAccountParams.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/CreateAccountParams.mdx deleted file mode 100644 index 94ea38008e..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/CreateAccountParams.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: CreateAccountParams -description: Overview of CreateAccountParams -slug: wallets/reference/account-kit/core/type-aliases/CreateAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateAccountParams = object; -``` - -Defined in: [account-kit/core/src/actions/createAccount.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/createAccount.ts#L55) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* [`SupportedAccountTypes`](SupportedAccountTypes) -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accountParams?` - - [`AccountConfig`](AccountConfig)\<`TAccount`> -
- `type` - - `TAccount` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/CreateConfigProps.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/CreateConfigProps.mdx deleted file mode 100644 index 7be2f9758e..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/CreateConfigProps.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: CreateConfigProps -description: Overview of CreateConfigProps -slug: wallets/reference/account-kit/core/type-aliases/CreateConfigProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateConfigProps = BaseCreateConfigProps & object; -``` - -Defined in: [account-kit/core/src/types.ts:205](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L205) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `_internal?` - - `object` -
- `_internal.createSigner()?` - - (`config`) => [`AlchemySigner`](AlchemySigner) -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/GetAccountParams.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/GetAccountParams.mdx deleted file mode 100644 index 28cbcb5d57..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/GetAccountParams.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: GetAccountParams -description: Overview of GetAccountParams -slug: wallets/reference/account-kit/core/type-aliases/GetAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetAccountParams = CreateAccountParams; -``` - -Defined in: [account-kit/core/src/actions/getAccount.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getAccount.ts#L13) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* [`SupportedAccountTypes`](SupportedAccountTypes) -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/GetAccountResult.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/GetAccountResult.mdx deleted file mode 100644 index 55dbc57f84..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/GetAccountResult.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: GetAccountResult -description: Overview of GetAccountResult -slug: wallets/reference/account-kit/core/type-aliases/GetAccountResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetAccountResult = AccountState; -``` - -Defined in: [account-kit/core/src/actions/getAccount.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getAccount.ts#L10) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* [`SupportedAccountTypes`](SupportedAccountTypes) -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientParams.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientParams.mdx deleted file mode 100644 index ebbd0d5d2c..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientParams.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: GetSmartAccountClientParams -description: Overview of GetSmartAccountClientParams -slug: wallets/reference/account-kit/core/type-aliases/GetSmartAccountClientParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetSmartAccountClientParams = Omit< - AlchemySmartAccountClientConfig>, - "transport" | "account" | "chain" -> & - GetAccountParams; -``` - -Defined in: [account-kit/core/src/actions/getSmartAccountClient.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSmartAccountClient.ts#L37) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SupportedAccountTypes` - - `SupportedAccountTypes` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientResult.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientResult.mdx deleted file mode 100644 index 20c8cf7a05..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartAccountClientResult.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: GetSmartAccountClientResult -description: Overview of GetSmartAccountClientResult -slug: wallets/reference/account-kit/core/type-aliases/GetSmartAccountClientResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetSmartAccountClientResult = object; -``` - -Defined in: [account-kit/core/src/actions/getSmartAccountClient.ts:60](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSmartAccountClient.ts#L60) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `address?` - - [`Address`](https://abitype.dev) -
- `client?` - - `AlchemySmartAccountClient`\<`TChain`, `TAccount`, [`ClientActions`](ClientActions)\<`TAccount`>> -
- `error?` - - `Error` -
- `isLoadingClient` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientParams.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientParams.mdx deleted file mode 100644 index d9222b38b9..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientParams.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: GetSmartWalletClientParams -description: Overview of GetSmartWalletClientParams -slug: wallets/reference/account-kit/core/type-aliases/GetSmartWalletClientParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetSmartWalletClientParams = object; -``` - -Defined in: [account-kit/core/src/actions/getSmartWalletClient.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSmartWalletClient.ts#L16) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
- -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `account?` - - `TAccount` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientResult.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientResult.mdx deleted file mode 100644 index 076be78155..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/GetSmartWalletClientResult.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: GetSmartWalletClientResult -description: Overview of GetSmartWalletClientResult -slug: wallets/reference/account-kit/core/type-aliases/GetSmartWalletClientResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetSmartWalletClientResult = - | SmartWalletClient - | undefined; -``` - -Defined in: [account-kit/core/src/actions/getSmartWalletClient.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getSmartWalletClient.ts#L12) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/GetUserResult.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/GetUserResult.mdx deleted file mode 100644 index 6381d00074..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/GetUserResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: GetUserResult -description: Overview of GetUserResult -slug: wallets/reference/account-kit/core/type-aliases/GetUserResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetUserResult = (User & object) | null; -``` - -Defined in: [account-kit/core/src/actions/getUser.ts:4](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/actions/getUser.ts#L4) diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/SignerStatus.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/SignerStatus.mdx deleted file mode 100644 index ce8d5cf881..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/SignerStatus.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: SignerStatus -description: Overview of SignerStatus -slug: wallets/reference/account-kit/core/type-aliases/SignerStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerStatus = object; -``` - -Defined in: [account-kit/core/src/store/types.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/types.ts#L55) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error?` - - `ErrorInfo` -
- `isAuthenticating` - - `boolean` -
- `isConnected` - - `boolean` -
- `isDisconnected` - - `boolean` -
- `isInitializing` - - `boolean` -
- `status` - - `AlchemySignerStatus` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/SolanaConnection.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/SolanaConnection.mdx deleted file mode 100644 index f79daccf5a..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/SolanaConnection.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: SolanaConnection -description: Overview of SolanaConnection -slug: wallets/reference/account-kit/core/type-aliases/SolanaConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SolanaConnection = object; -``` - -Defined in: [account-kit/core/src/types.ts:76](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L76) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `adapters?` - - `WalletAdapter`\[] | `"detect"` - - Array of Solana wallet adapters to be used for connecting to wallets. - Set to "detect" to auto-detect installed wallets, or provide explicit adapters. - These adapters will be made available in the React context for wallet selection. - - **Example** - - ```ts - import { PhantomWalletAdapter, SolflareWalletAdapter } from "@solana/wallet-adapter-wallets"; - - // Auto-detect installed wallets - const config = createConfig({ - // ... other config - solana: { - connection: solanaConnection, - adapters: "detect" - } - }); - - // Explicit wallet configuration - const config = createConfig({ - // ... other config - solana: { - connection: solanaConnection, - adapters: [ - new PhantomWalletAdapter(), - new SolflareWalletAdapter(), - ] - } - }); - ``` -
- `connection` - - `SolanaWeb3Connection` - - ‐ -
- `policyId?` - - `string` - - ‐ -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/Store.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/Store.mdx deleted file mode 100644 index ca30dc57a4..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/Store.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Store -description: Overview of Store -slug: wallets/reference/account-kit/core/type-aliases/Store -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Store = Expanded, Middleware>>; -``` - -Defined in: [account-kit/core/src/store/types.ts:125](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/types.ts#L125) diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/StoreState.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/StoreState.mdx deleted file mode 100644 index 1346a83039..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/StoreState.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: StoreState -description: Overview of StoreState -slug: wallets/reference/account-kit/core/type-aliases/StoreState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type StoreState = object; -``` - -Defined in: [account-kit/core/src/store/types.ts:82](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/types.ts#L82) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accountConfigs` - - `object` -
- `accounts?` - - `object` -
- `bundlerClient` - - `ClientWithAlchemyMethods` -
- `chain` - - [`Chain`](https://viem.sh) -
- `config` - - [`ClientStoreConfig`](ClientStoreConfig) -
- `connections` - - `Map`\<`number` | `string`, `Connection`> -
- `signer?` - - `AlchemySigner` -
- `signerStatus` - - [`SignerStatus`](SignerStatus) -
- `smartAccountClients` - - `object` -
- `smartWalletClients` - - `object` -
- `solana?` - - `SolanaConnection` -
- `user?` - - [`User`](../../../signer/src/type-aliases/User) -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/StoredState.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/StoredState.mdx deleted file mode 100644 index 5c49aefea4..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/StoredState.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: StoredState -description: Overview of StoredState -slug: wallets/reference/account-kit/core/type-aliases/StoredState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type StoredState = object; -``` - -Defined in: [account-kit/core/src/store/types.ts:64](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/store/types.ts#L64) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `alchemy` - - `Omit`\<[`StoreState`](StoreState), `"signer"` | `"accounts"` | `"bundlerClient"`> -
- `wagmi?` - - `WagmiState` -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccount.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccount.mdx deleted file mode 100644 index b439342fcc..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccount.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: SupportedAccount -description: Overview of SupportedAccount -slug: wallets/reference/account-kit/core/type-aliases/SupportedAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SupportedAccount = T extends "LightAccount" - ? LightAccount - : T extends "MultiOwnerModularAccount" - ? MultiOwnerModularAccount - : T extends "MultiOwnerLightAccount" - ? MultiOwnerLightAccount - : T extends "ModularAccountV2" - ? ModularAccountV2 - : never; -``` - -Defined in: [account-kit/core/src/types.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L48) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* [`SupportedAccountTypes`](SupportedAccountTypes) -
diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccountTypes.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccountTypes.mdx deleted file mode 100644 index b330e4e94e..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccountTypes.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: SupportedAccountTypes -description: Overview of SupportedAccountTypes -slug: wallets/reference/account-kit/core/type-aliases/SupportedAccountTypes -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SupportedAccountTypes = - | "MultiOwnerLightAccount" - | "LightAccount" - | "MultiOwnerModularAccount" - | "ModularAccountV2"; -``` - -Defined in: [account-kit/core/src/types.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L33) diff --git a/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccounts.mdx b/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccounts.mdx deleted file mode 100644 index edb99365b6..0000000000 --- a/docs/pages/reference/account-kit/core/src/type-aliases/SupportedAccounts.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: SupportedAccounts -description: Overview of SupportedAccounts -slug: wallets/reference/account-kit/core/type-aliases/SupportedAccounts -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SupportedAccounts = - | LightAccount> - | MultiOwnerModularAccount - | MultiOwnerLightAccount< - AlchemySigner, - LightAccountVersion<"MultiOwnerLightAccount"> - > - | ModularAccountV2; -``` - -Defined in: [account-kit/core/src/types.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/types.ts#L39) diff --git a/docs/pages/reference/account-kit/core/src/variables/DEFAULT_IFRAME_CONTAINER_ID.mdx b/docs/pages/reference/account-kit/core/src/variables/DEFAULT_IFRAME_CONTAINER_ID.mdx deleted file mode 100644 index 1f5b19bf8e..0000000000 --- a/docs/pages/reference/account-kit/core/src/variables/DEFAULT_IFRAME_CONTAINER_ID.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: DEFAULT_IFRAME_CONTAINER_ID -description: Overview of DEFAULT_IFRAME_CONTAINER_ID -slug: wallets/reference/account-kit/core/variables/DEFAULT_IFRAME_CONTAINER_ID -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const DEFAULT_IFRAME_CONTAINER_ID: "alchemy-signer-iframe-container" = - "alchemy-signer-iframe-container"; -``` - -Defined in: [account-kit/core/src/createConfig.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/core/src/createConfig.ts#L14) diff --git a/docs/pages/reference/account-kit/infra/src/exports/README.mdx b/docs/pages/reference/account-kit/infra/src/exports/README.mdx deleted file mode 100644 index 0f856a7dd6..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/README.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: account-kit/infra -description: Overview of account-kit/infra -slug: wallets/reference/account-kit/infra -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Enumerations - -| Enumeration | Description | -| :----------------------------------------------------------------------------------------- | :---------- | -| [SimulateAssetType](/wallets/reference/account-kit/infra/enumerations/SimulateAssetType) | - | -| [SimulateChangeType](/wallets/reference/account-kit/infra/enumerations/SimulateChangeType) | - | - -## Interfaces - -| Interface | Description | -| :----------------------------------------------------------------------------------------------------- | :---------- | -| [SimulateAssetChange](/wallets/reference/account-kit/infra/interfaces/SimulateAssetChange) | - | -| [SimulateAssetChangesError](/wallets/reference/account-kit/infra/interfaces/SimulateAssetChangesError) | - | - -## Type Aliases - -| Type Alias | Description | -| :--------------------------------------------------------------------------------------------------------------------------------------- | :---------- | -| [AlchemyChainConfig](/wallets/reference/account-kit/infra/type-aliases/AlchemyChainConfig) | - | -| [AlchemyRpcSchema](/wallets/reference/account-kit/infra/type-aliases/AlchemyRpcSchema) | - | -| [AlchemySmartAccountClient](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClient) | - | -| [AlchemySmartAccountClient_Base](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClient_Base) | - | -| [AlchemySmartAccountClientActions](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClientActions) | - | -| [AlchemySmartAccountClientConfig](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClientConfig) | - | -| [AlchemyTransport](/wallets/reference/account-kit/infra/type-aliases/AlchemyTransport) | - | -| [AlchemyTransportConfig](/wallets/reference/account-kit/infra/type-aliases/AlchemyTransportConfig) | - | -| [BaseAlchemyActions](/wallets/reference/account-kit/infra/type-aliases/BaseAlchemyActions) | - | -| [ClientWithAlchemyMethods](/wallets/reference/account-kit/infra/type-aliases/ClientWithAlchemyMethods) | - | -| [PaymasterContext](/wallets/reference/account-kit/infra/type-aliases/PaymasterContext) | - | -| [PolicyToken](/wallets/reference/account-kit/infra/type-aliases/PolicyToken) | - | -| [RequestGasAndPaymasterAndDataRequest](/wallets/reference/account-kit/infra/type-aliases/RequestGasAndPaymasterAndDataRequest) | - | -| [RequestGasAndPaymasterAndDataResponse](/wallets/reference/account-kit/infra/type-aliases/RequestGasAndPaymasterAndDataResponse) | - | -| [RequestPaymasterTokenQuoteRequest](/wallets/reference/account-kit/infra/type-aliases/RequestPaymasterTokenQuoteRequest) | - | -| [RequestPaymasterTokenQuoteResponse](/wallets/reference/account-kit/infra/type-aliases/RequestPaymasterTokenQuoteResponse) | - | -| [SimulateUserOperationAssetChangesRequest](/wallets/reference/account-kit/infra/type-aliases/SimulateUserOperationAssetChangesRequest) | - | -| [SimulateUserOperationAssetChangesResponse](/wallets/reference/account-kit/infra/type-aliases/SimulateUserOperationAssetChangesResponse) | - | - -## Variables - -| Variable | Description | -| :---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [alchemyActions](/wallets/reference/account-kit/infra/variables/alchemyActions) | Provides a set of actions for interacting with the Alchemy Smart Account client, including the ability to simulate user operations. | -| [AlchemyChainSchema](/wallets/reference/account-kit/infra/variables/AlchemyChainSchema) | - | -| [alchemyFeeEstimator](/wallets/reference/account-kit/infra/variables/alchemyFeeEstimator) | Function that estimates the transaction fees using Alchemy methods for a given client. It fetches the latest block and estimates the max priority fee per gas, applying any overrides or fee options provided. | -| [arbitrum](/wallets/reference/account-kit/infra/variables/arbitrum) | - | -| [arbitrumGoerli](/wallets/reference/account-kit/infra/variables/arbitrumGoerli) | - | -| [arbitrumNova](/wallets/reference/account-kit/infra/variables/arbitrumNova) | - | -| [arbitrumSepolia](/wallets/reference/account-kit/infra/variables/arbitrumSepolia) | - | -| [base](/wallets/reference/account-kit/infra/variables/base) | - | -| [baseGoerli](/wallets/reference/account-kit/infra/variables/baseGoerli) | - | -| [baseSepolia](/wallets/reference/account-kit/infra/variables/baseSepolia) | - | -| [beraChainBartio](/wallets/reference/account-kit/infra/variables/beraChainBartio) | - | -| [bobaMainnet](/wallets/reference/account-kit/infra/variables/bobaMainnet) | - | -| [bobaSepolia](/wallets/reference/account-kit/infra/variables/bobaSepolia) | - | -| [bsc](/wallets/reference/account-kit/infra/variables/bsc) | - | -| [bscTestnet](/wallets/reference/account-kit/infra/variables/bscTestnet) | - | -| [celoMainnet](/wallets/reference/account-kit/infra/variables/celoMainnet) | - | -| [celoSepolia](/wallets/reference/account-kit/infra/variables/celoSepolia) | - | -| [edgeMainnet](/wallets/reference/account-kit/infra/variables/edgeMainnet) | - | -| [fraxtal](/wallets/reference/account-kit/infra/variables/fraxtal) | - | -| [fraxtalSepolia](/wallets/reference/account-kit/infra/variables/fraxtalSepolia) | - | -| [gensynTestnet](/wallets/reference/account-kit/infra/variables/gensynTestnet) | - | -| [goerli](/wallets/reference/account-kit/infra/variables/goerli) | - | -| [hyperliquid](/wallets/reference/account-kit/infra/variables/hyperliquid) | - | -| [hyperliquidEvmTestnet](/wallets/reference/account-kit/infra/variables/hyperliquidEvmTestnet) | - | -| [inkMainnet](/wallets/reference/account-kit/infra/variables/inkMainnet) | - | -| [inkSepolia](/wallets/reference/account-kit/infra/variables/inkSepolia) | - | -| [mainnet](/wallets/reference/account-kit/infra/variables/mainnet) | - | -| [mekong](/wallets/reference/account-kit/infra/variables/mekong) | - | -| [monadMainnet](/wallets/reference/account-kit/infra/variables/monadMainnet) | - | -| [monadTestnet](/wallets/reference/account-kit/infra/variables/monadTestnet) | - | -| [mythosMainnet](/wallets/reference/account-kit/infra/variables/mythosMainnet) | - | -| [opbnbMainnet](/wallets/reference/account-kit/infra/variables/opbnbMainnet) | - | -| [opbnbTestnet](/wallets/reference/account-kit/infra/variables/opbnbTestnet) | - | -| [openlootSepolia](/wallets/reference/account-kit/infra/variables/openlootSepolia) | - | -| [optimism](/wallets/reference/account-kit/infra/variables/optimism) | - | -| [optimismGoerli](/wallets/reference/account-kit/infra/variables/optimismGoerli) | - | -| [optimismSepolia](/wallets/reference/account-kit/infra/variables/optimismSepolia) | - | -| [polygon](/wallets/reference/account-kit/infra/variables/polygon) | - | -| [polygonAmoy](/wallets/reference/account-kit/infra/variables/polygonAmoy) | - | -| [polygonMumbai](/wallets/reference/account-kit/infra/variables/polygonMumbai) | - | -| [riseTestnet](/wallets/reference/account-kit/infra/variables/riseTestnet) | - | -| [sepolia](/wallets/reference/account-kit/infra/variables/sepolia) | - | -| [shape](/wallets/reference/account-kit/infra/variables/shape) | - | -| [shapeSepolia](/wallets/reference/account-kit/infra/variables/shapeSepolia) | - | -| [simulateUserOperationChanges](/wallets/reference/account-kit/infra/variables/simulateUserOperationChanges) | Simulates user operation changes including asset changes for a specified user operation and returns the resulting state changes. | -| [soneiumMainnet](/wallets/reference/account-kit/infra/variables/soneiumMainnet) | - | -| [soneiumMinato](/wallets/reference/account-kit/infra/variables/soneiumMinato) | - | -| [stableMainnet](/wallets/reference/account-kit/infra/variables/stableMainnet) | - | -| [storyAeneid](/wallets/reference/account-kit/infra/variables/storyAeneid) | - | -| [storyMainnet](/wallets/reference/account-kit/infra/variables/storyMainnet) | - | -| [teaSepolia](/wallets/reference/account-kit/infra/variables/teaSepolia) | - | -| [unichainMainnet](/wallets/reference/account-kit/infra/variables/unichainMainnet) | - | -| [unichainSepolia](/wallets/reference/account-kit/infra/variables/unichainSepolia) | - | -| [worldChain](/wallets/reference/account-kit/infra/variables/worldChain) | - | -| [worldChainSepolia](/wallets/reference/account-kit/infra/variables/worldChainSepolia) | - | -| [worldl3devnet](/wallets/reference/account-kit/infra/variables/worldl3devnet) | - | -| [zora](/wallets/reference/account-kit/infra/variables/zora) | - | -| [zoraSepolia](/wallets/reference/account-kit/infra/variables/zoraSepolia) | - | - -## Functions - -| Function | Description | -| :-------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [alchemy](/wallets/reference/account-kit/infra/functions/alchemy) | Creates an Alchemy transport with the specified configuration options. When sending all traffic to Alchemy, you must pass in one of rpcUrl, apiKey, or jwt. If you want to send Bundler and Paymaster traffic to Alchemy and Node traffic to a different RPC, you must pass in alchemyConnection and nodeRpcUrl. | -| [alchemyGasAndPaymasterAndDataMiddleware](/wallets/reference/account-kit/infra/functions/alchemyGasAndPaymasterAndDataMiddleware) | Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring transactions. Uses Alchemy's custom `alchemy_requestGasAndPaymasterAndData` method instead of conforming to the standard ERC-7677 interface. Note that if you use `createAlchemySmartAccountClient`, this middleware is already used by default and you do not need to manually include it. | -| [alchemyGasManagerMiddleware](/wallets/reference/account-kit/infra/functions/alchemyGasManagerMiddleware) | Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring transactions. Adheres to the ERC-7677 standardized communication protocol. | -| [alchemyUserOperationSimulator](/wallets/reference/account-kit/infra/functions/alchemyUserOperationSimulator) | A middleware function to be used during simulation of user operations which leverages Alchemy's RPC uo simulation method. | -| [convertHeadersToObject](/wallets/reference/account-kit/infra/functions/convertHeadersToObject) | - | -| [createAlchemyPublicRpcClient](/wallets/reference/account-kit/infra/functions/createAlchemyPublicRpcClient) | Creates an Alchemy public RPC client with the provided chain, connection configuration, and optional fetch options. The client has alchemy methods and can dynamically update HTTP headers. | -| [createAlchemySmartAccountClient](/wallets/reference/account-kit/infra/functions/createAlchemySmartAccountClient) | Creates an Alchemy smart account client using the provided configuration options, including account details, gas manager configuration, and custom middleware. | -| [defineAlchemyChain](/wallets/reference/account-kit/infra/functions/defineAlchemyChain) | Defines an Alchemy chain configuration by adding an Alchemy-specific RPC base URL to the chain's RPC URLs. | -| [getAlchemyPaymasterAddress](/wallets/reference/account-kit/infra/functions/getAlchemyPaymasterAddress) | Retrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID. | -| [getDefaultUserOperationFeeOptions](/wallets/reference/account-kit/infra/functions/getDefaultUserOperationFeeOptions) | Retrieves the default user operation fee options for a given chain. Adjusts fees for specific chains like Arbitrum and Optimism. | -| [getSignerTypeHeader](/wallets/reference/account-kit/infra/functions/getSignerTypeHeader) | - | -| [headersUpdate](/wallets/reference/account-kit/infra/functions/headersUpdate) | Update the headers with the trace header and breadcrumb. | -| [isAlchemySmartAccountClient](/wallets/reference/account-kit/infra/functions/isAlchemySmartAccountClient) | Checks if a given client is an Alchemy Smart Account Client. The goal of this check is to ensure that the client supports certain RPC methods. | -| [isAlchemyTransport](/wallets/reference/account-kit/infra/functions/isAlchemyTransport) | A type guard for the transport to determine if it is an Alchemy transport. Used in cases where we would like to do switching depending on the transport, where there used to be two clients for an alchemy and a non-alchemy, and with this switch we don't need the two seperate clients. \* | -| [mutateRemoveTrackingHeaders](/wallets/reference/account-kit/infra/functions/mutateRemoveTrackingHeaders) | Remove the tracking headers. This is used in our split transport to ensure that we remove the headers that are not used by the other systems. | diff --git a/docs/pages/reference/account-kit/infra/src/exports/enumerations/SimulateAssetType.mdx b/docs/pages/reference/account-kit/infra/src/exports/enumerations/SimulateAssetType.mdx deleted file mode 100644 index 79b1750e67..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/enumerations/SimulateAssetType.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: SimulateAssetType -description: Overview of SimulateAssetType -slug: wallets/reference/account-kit/infra/enumerations/SimulateAssetType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/infra/src/actions/types.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L9) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValueDescription
- `ERC1155` - - `"ERC1155"` - - ‐ -
- `ERC20` - - `"ERC20"` - - ‐ -
- `ERC721` - - `"ERC721"` - - ‐ -
- `NATIVE` - - `"NATIVE"` - - ‐ -
- `SPECIAL_NFT` - - `"SPECIAL_NFT"` - - Special contracts that don't follow ERC 721/1155. Currently limited to - CryptoKitties and CryptoPunks. -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/enumerations/SimulateChangeType.mdx b/docs/pages/reference/account-kit/infra/src/exports/enumerations/SimulateChangeType.mdx deleted file mode 100644 index f508bee918..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/enumerations/SimulateChangeType.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: SimulateChangeType -description: Overview of SimulateChangeType -slug: wallets/reference/account-kit/infra/enumerations/SimulateChangeType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/infra/src/actions/types.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L21) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValue
- `APPROVE` - - `"APPROVE"` -
- `TRANSFER` - - `"TRANSFER"` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemy.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/alchemy.mdx deleted file mode 100644 index 1f951e81c3..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemy.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: alchemy -description: Overview of the alchemy function -slug: wallets/reference/account-kit/infra/functions/alchemy -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function alchemy(config): AlchemyTransport; -``` - -Defined in: [account-kit/infra/src/alchemyTransport.ts:143](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/alchemyTransport.ts#L143) - -Creates an Alchemy transport with the specified configuration options. -When sending all traffic to Alchemy, you must pass in one of rpcUrl, apiKey, or jwt. -If you want to send Bundler and Paymaster traffic to Alchemy and Node traffic to a different RPC, you must pass in alchemyConnection and nodeRpcUrl. - -## Example - -### Basic Example - -If the chain you're using is supported for both Bundler and Node RPCs, then you can do the following: - -```ts -import { alchemy } from "@account-kit/infra"; - -const transport = alchemy({ - // NOTE: you can also pass in an rpcUrl or jwt here or rpcUrl and jwt - apiKey: "your-api-key", -}); -``` - -### AA Only Chains - -For AA-only chains, you need to specify the alchemyConnection and nodeRpcUrl since Alchemy only -handles the Bundler and Paymaster RPCs for these chains. - -```ts -import { alchemy } from "@account-kit/infra"; - -const transport = alchemy({ - alchemyConnection: { - apiKey: "your-api-key", - }, - nodeRpcUrl: "https://zora.rpc.url", -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`AlchemyTransportConfig`](../type-aliases/AlchemyTransportConfig) - - The configuration object for the Alchemy transport. -
- -## Returns - -[`AlchemyTransport`](../type-aliases/AlchemyTransport) - -The configured Alchemy transport object. diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyGasAndPaymasterAndDataMiddleware.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyGasAndPaymasterAndDataMiddleware.mdx deleted file mode 100644 index d18d7e7e20..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyGasAndPaymasterAndDataMiddleware.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: alchemyGasAndPaymasterAndDataMiddleware -description: Overview of the alchemyGasAndPaymasterAndDataMiddleware function -slug: wallets/reference/account-kit/infra/functions/alchemyGasAndPaymasterAndDataMiddleware -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function alchemyGasAndPaymasterAndDataMiddleware( - params, -): Pick< - ClientMiddlewareConfig, - "dummyPaymasterAndData" | "feeEstimator" | "gasEstimator" | "paymasterAndData" ->; -``` - -Defined in: [account-kit/infra/src/middleware/gasManager.ts:186](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/middleware/gasManager.ts#L186) - -Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring -transactions. Uses Alchemy's custom `alchemy_requestGasAndPaymasterAndData` -method instead of conforming to the standard ERC-7677 interface. Note that -if you use `createAlchemySmartAccountClient`, this middleware is already -used by default and you do not need to manually include it. - -## Example - -```ts twoslash -import { - sepolia, - alchemy, - alchemyGasAndPaymasterAndDataMiddleware, -} from "@account-kit/infra"; -import { createSmartAccountClient } from "@aa-sdk/core"; - -const client = createSmartAccountClient({ - transport: alchemy({ apiKey: "your-api-key" }), - chain: sepolia, - ...alchemyGasAndPaymasterAndDataMiddleware({ - policyId: "policyId", - transport: alchemy({ apiKey: "your-api-key" }), - }), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `AlchemyGasAndPaymasterAndDataMiddlewareParams` - - configuration params -
- -## Returns - -`Pick`\<[`ClientMiddlewareConfig`](../../../../../aa-sdk/core/src/type-aliases/ClientMiddlewareConfig), -| `"dummyPaymasterAndData"` -| `"feeEstimator"` -| `"gasEstimator"` -| `"paymasterAndData"`> - -partial client middleware configuration containing `dummyPaymasterAndData`, `feeEstimator`, `gasEstimator`, and `paymasterAndData` diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyGasManagerMiddleware.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyGasManagerMiddleware.mdx deleted file mode 100644 index 7d034ca158..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyGasManagerMiddleware.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: alchemyGasManagerMiddleware -description: Overview of the alchemyGasManagerMiddleware function -slug: wallets/reference/account-kit/infra/functions/alchemyGasManagerMiddleware -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function alchemyGasManagerMiddleware( - policyId, - policyToken?, - webhookData?, -): Required< - Pick ->; -``` - -Defined in: [account-kit/infra/src/middleware/gasManager.ts:92](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/middleware/gasManager.ts#L92) - -Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring -transactions. Adheres to the ERC-7677 standardized communication protocol. - -## Example - -```ts -import { sepolia, alchemyGasManagerMiddleware } from "@account-kit/infra"; -import { http } from "viem"; - -const client = createSmartAccountClient({ - transport: http("rpc-url"), - chain: sepolia, - ...alchemyGasManagerMiddleware("policyId"), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `policyId` - - `string` | `string`\[] - - The policyId (or list of policyIds) for Alchemy's gas manager -
- `policyToken?` - - [`PolicyToken`](../type-aliases/PolicyToken) - - The policy token configuration -
- `webhookData?` - - `string` - - The webhook data to include in the request -
- -## Returns - -`Required`\<`Pick`\<[`ClientMiddlewareConfig`](../../../../../aa-sdk/core/src/type-aliases/ClientMiddlewareConfig), `"dummyPaymasterAndData"` | `"paymasterAndData"`>> - -Partial client middleware configuration containing `dummyPaymasterAndData` and `paymasterAndData` diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyUserOperationSimulator.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyUserOperationSimulator.mdx deleted file mode 100644 index e628da1efb..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/alchemyUserOperationSimulator.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: alchemyUserOperationSimulator -description: Overview of the alchemyUserOperationSimulator function -slug: wallets/reference/account-kit/infra/functions/alchemyUserOperationSimulator -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function alchemyUserOperationSimulator( - transport, -): ClientMiddlewareFn; -``` - -Defined in: [account-kit/infra/src/middleware/userOperationSimulator.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/middleware/userOperationSimulator.ts#L32) - -A middleware function to be used during simulation of user operations which leverages Alchemy's RPC uo simulation method. - -## Example - -```ts -import { - alchemyUserOperationSimulator, - alchemy, - sepolia, -} from "@account-kit/infra"; -import { createSmartAccountClient } from "@aa-sdk/core"; - -const alchemyTransport = alchemy({ - chain: sepolia, - apiKey: "your-api-key", -}); - -const client = createSmartAccountClient({ - chain: sepolia, - userOperationSimulator: alchemyUserOperationSimulator(alchemyTransport), - ...otherParams, -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TContext` *extends* `undefined` | `UserOperationContext` - - `undefined` | `UserOperationContext` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `transport` - - `AlchemyTransport` - - An Alchemy Transport that can be used for making RPC calls to alchemy -
- -## Returns - -`ClientMiddlewareFn`\<`TContext`> - -A middleware function to simulate and process user operations diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/convertHeadersToObject.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/convertHeadersToObject.mdx deleted file mode 100644 index 9fea916730..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/convertHeadersToObject.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: convertHeadersToObject -description: Overview of the convertHeadersToObject function -slug: wallets/reference/account-kit/infra/functions/convertHeadersToObject -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function convertHeadersToObject(headers?): Record; -``` - -Defined in: [account-kit/infra/src/alchemyTransport.ts:262](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/alchemyTransport.ts#L262) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `headers?` - - `HeadersInit` -
- -## Returns - -`Record`\<`string`, `string`> diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/createAlchemyPublicRpcClient.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/createAlchemyPublicRpcClient.mdx deleted file mode 100644 index 3277a99da3..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/createAlchemyPublicRpcClient.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: createAlchemyPublicRpcClient -description: Overview of the createAlchemyPublicRpcClient function -slug: wallets/reference/account-kit/infra/functions/createAlchemyPublicRpcClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createAlchemyPublicRpcClient(params): ClientWithAlchemyMethods; -``` - -Defined in: [account-kit/infra/src/client/rpcClient.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/rpcClient.ts#L28) - -Creates an Alchemy public RPC client with the provided chain, connection configuration, and optional fetch options. The client has alchemy methods and can dynamically update HTTP headers. - -## Example - -```ts -import { createAlchemyPublicRpcClient, alchemy } from "@account-kit/infra"; -import { sepolia } from "@account-kit/infra"; - -const client = createAlchemyPublicRpcClient({ - transport: alchemy({ - apiKey: "ALCHEMY_API_KEY", - }), - chain: sepolia, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - \{ `chain`: `undefined` | [`Chain`](https://viem.sh); `transport`: [`AlchemyTransport`](../type-aliases/AlchemyTransport); } - - The parameters for creating the Alchemy public RPC client -
- `params.chain` - - `undefined` | [`Chain`](https://viem.sh) - - The blockchain chain configuration -
- `params.transport` - - [`AlchemyTransport`](../type-aliases/AlchemyTransport) - - ‐ -
- -## Returns - -[`ClientWithAlchemyMethods`](../type-aliases/ClientWithAlchemyMethods) - -A client object tailored with Alchemy methods and capabilities to interact with the blockchain diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/createAlchemySmartAccountClient.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/createAlchemySmartAccountClient.mdx deleted file mode 100644 index 5439c9c462..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/createAlchemySmartAccountClient.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: createAlchemySmartAccountClient -description: Creates an Alchemy smart account client using the provided configuration options, including account details, gas manager configuration, and custom middleware. -slug: wallets/reference/account-kit/infra/functions/createAlchemySmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createAlchemySmartAccountClient( - params, -): AlchemySmartAccountClient, TContext>; -``` - -Defined in: [account-kit/infra/src/client/smartAccountClient.ts:107](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/smartAccountClient.ts#L107) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TAccount` *extends* `undefined` | `SmartContractAccount` - - `undefined` | `SmartContractAccount` -
- `TContext` *extends* `undefined` | `UserOperationContext` - - `undefined` | `UserOperationContext` -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`AlchemySmartAccountClientConfig`](../type-aliases/AlchemySmartAccountClientConfig)\<`TChain`, `TAccount`, `TContext`> -
- -## Returns - -[`AlchemySmartAccountClient`](../type-aliases/AlchemySmartAccountClient)\<`TChain`, `TAccount`, `Record`\<`string`, `never`>, `TContext`> - -An instance of `AlchemySmartAccountClient` configured based on the provided options diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/defineAlchemyChain.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/defineAlchemyChain.mdx deleted file mode 100644 index 677a45a2b8..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/defineAlchemyChain.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: defineAlchemyChain -description: Overview of the defineAlchemyChain function -slug: wallets/reference/account-kit/infra/functions/defineAlchemyChain -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function defineAlchemyChain(params): Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L56) - -Defines an Alchemy chain configuration by adding an Alchemy-specific RPC base URL to the chain's RPC URLs. - -## Example - -```ts -import { defineAlchemyChain } from "@account-kit/infra"; -import { sepolia } from "viem/chains"; - -const chain = defineAlchemyChain({ - chain: sepolia, - rpcBaseUrl: "https://eth-sepolia.g.alchemy.com/v2", -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - \{ `chain`: [`Chain`](https://viem.sh); `rpcBaseUrl`: `string`; } - - The parameters for defining the Alchemy chain -
- `params.chain` - - [`Chain`](https://viem.sh) - - The original chain configuration -
- `params.rpcBaseUrl` - - `string` - - The Alchemy-specific RPC base URL -
- -## Returns - -[`Chain`](https://viem.sh) - -The updated chain configuration with the Alchemy RPC URL added diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/getAlchemyPaymasterAddress.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/getAlchemyPaymasterAddress.mdx deleted file mode 100644 index ee70d8c000..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/getAlchemyPaymasterAddress.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: getAlchemyPaymasterAddress -description: Overview of the getAlchemyPaymasterAddress function -slug: wallets/reference/account-kit/infra/functions/getAlchemyPaymasterAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getAlchemyPaymasterAddress(chain, version): `0x${string}`; -``` - -Defined in: [account-kit/infra/src/gas-manager.ts:81](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/gas-manager.ts#L81) - -Retrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID. - -## Example - -```ts -import { sepolia, getAlchemyPaymasterAddress } from "@account-kit/infra"; - -const paymasterAddress = getAlchemyPaymasterAddress(sepolia, "0.6.0"); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - The chain for which the paymaster address is required -
- `version` - - keyof `EntryPointRegistryBase`\<`unknown`> - - The version of the entry point -
- -## Returns - -`` `0x${string}` `` - -The Alchemy paymaster address corresponding to the specified chain diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/getDefaultUserOperationFeeOptions.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/getDefaultUserOperationFeeOptions.mdx deleted file mode 100644 index f6768ed03c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/getDefaultUserOperationFeeOptions.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: getDefaultUserOperationFeeOptions -description: Overview of the getDefaultUserOperationFeeOptions function -slug: wallets/reference/account-kit/infra/functions/getDefaultUserOperationFeeOptions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultUserOperationFeeOptions(chain): any; -``` - -Defined in: [account-kit/infra/src/defaults.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/defaults.ts#L26) - -Retrieves the default user operation fee options for a given chain. Adjusts fees for specific chains like Arbitrum and Optimism. - -## Example - -```ts -import { getDefaultUserOperationFeeOptions } from "@account-kit/infra"; -import { arbitrum } from "@account-kit/infra"; - -const feeOpts = getDefaultUserOperationFeeOptions(arbitrum); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - The blockchain chain for which to get the fee options -
- -## Returns - -`any` - -An object containing the default fee options for user operations on the specified chain diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/getSignerTypeHeader.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/getSignerTypeHeader.mdx deleted file mode 100644 index b730e7d2b4..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/getSignerTypeHeader.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: getSignerTypeHeader -description: Overview of the getSignerTypeHeader function -slug: wallets/reference/account-kit/infra/functions/getSignerTypeHeader -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSignerTypeHeader(account): object; -``` - -Defined in: [account-kit/infra/src/client/smartAccountClient.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/smartAccountClient.ts#L33) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* `SmartContractAccountWithSigner` -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `account` - - `TAccount` -
- -## Returns - -`object` - - - - - - - - - - - - - - - - - -
NameType
- `Alchemy-Aa-Sdk-Signer` - - `string` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/headersUpdate.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/headersUpdate.mdx deleted file mode 100644 index 962fd6f05c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/headersUpdate.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: headersUpdate -description: Overview of the headersUpdate function -slug: wallets/reference/account-kit/infra/functions/headersUpdate -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function headersUpdate(crumb): (x) => object; -``` - -Defined in: [account-kit/infra/src/alchemyTrackerHeaders.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/alchemyTrackerHeaders.ts#L51) - -Update the headers with the trace header and breadcrumb. - -These trace headers are used in the imply ingestion pipeline to trace the request. -And the breadcrumb is used to get finer grain details in the trace. - -Then there are the trace headers that are part of the W3C trace context standard. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `crumb` - - `string` - - The crumb to add to the breadcrumb -
- -## Returns - -A function that updates the headers - -```ts -(x): object; -``` - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `x` - - `Record`\<`string`, `string`> -
- -### Returns - -`object` - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDefault value
- `X-Alchemy-Client-Breadcrumb` - - `string` - - ‐ -
- `X-Alchemy-Client-Trace-Id` - - `string` - - `traceHeader.parentId` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/isAlchemySmartAccountClient.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/isAlchemySmartAccountClient.mdx deleted file mode 100644 index 9d3e6acfbc..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/isAlchemySmartAccountClient.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: isAlchemySmartAccountClient -description: Overview of the isAlchemySmartAccountClient function -slug: wallets/reference/account-kit/infra/functions/isAlchemySmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isAlchemySmartAccountClient( - client, -): client is AlchemySmartAccountClient; -``` - -Defined in: [account-kit/infra/src/client/isAlchemySmartAccountClient.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/isAlchemySmartAccountClient.ts#L20) - -Checks if a given client is an Alchemy Smart Account Client. The goal of this check is to ensure that the client supports certain RPC methods. - -## Example - -```ts -import { isAlchemySmartAccountClient } from "@account-kit/infra"; - -if (isAlchemySmartAccountClient(client)) { - // do things with the client as an Alchemy Smart Account Client -} -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `undefined` | `SmartContractAccount` - - `undefined` | `SmartContractAccount` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<[`Transport`](https://viem.sh), `TChain`, `TAccount`> - - The client instance to be checked -
- -## Returns - -`client is AlchemySmartAccountClient` - -`true` if the client is an Alchemy Smart Account Client, otherwise `false` diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/isAlchemyTransport.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/isAlchemyTransport.mdx deleted file mode 100644 index 45439c1167..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/isAlchemyTransport.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: isAlchemyTransport -description: Overview of the isAlchemyTransport function -slug: wallets/reference/account-kit/infra/functions/isAlchemyTransport -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isAlchemyTransport(transport, chain): transport is AlchemyTransport; -``` - -Defined in: [account-kit/infra/src/alchemyTransport.ts:94](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/alchemyTransport.ts#L94) - -A type guard for the transport to determine if it is an Alchemy transport. -Used in cases where we would like to do switching depending on the transport, where there used -to be two clients for an alchemy and a non-alchemy, and with this switch we don't need the two seperate clients. \* - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `transport` - - [`Transport`](https://viem.sh) - - The transport to check -
- `chain` - - [`Chain`](https://viem.sh) - - Chain for the transport to run its function to return the transport config -
- -## Returns - -`transport is AlchemyTransport` - -`true` if the transport is an Alchemy transport, otherwise `false` diff --git a/docs/pages/reference/account-kit/infra/src/exports/functions/mutateRemoveTrackingHeaders.mdx b/docs/pages/reference/account-kit/infra/src/exports/functions/mutateRemoveTrackingHeaders.mdx deleted file mode 100644 index ce63a5b2d0..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/functions/mutateRemoveTrackingHeaders.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: mutateRemoveTrackingHeaders -description: Overview of the mutateRemoveTrackingHeaders function -slug: wallets/reference/account-kit/infra/functions/mutateRemoveTrackingHeaders -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function mutateRemoveTrackingHeaders(x?): void; -``` - -Defined in: [account-kit/infra/src/alchemyTrackerHeaders.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/alchemyTrackerHeaders.ts#L26) - -Remove the tracking headers. This is used in our split transport to ensure that we remove the headers that -are not used by the other systems. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `x?` - - `unknown` - - The headers to remove the tracking headers from -
- -## Returns - -`void` diff --git a/docs/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChange.mdx b/docs/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChange.mdx deleted file mode 100644 index 7dbb5a2bdb..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChange.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: SimulateAssetChange -description: Overview of the SimulateAssetChange interface -slug: wallets/reference/account-kit/infra/interfaces/SimulateAssetChange -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/infra/src/actions/types.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L41) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `amount?` - - `string` -
- `assetType` - - [`SimulateAssetType`](../enumerations/SimulateAssetType) -
- `changeType` - - [`SimulateChangeType`](../enumerations/SimulateChangeType) -
- `contactAddress` - - `` `0x${string}` `` -
- `decimals` - - `number` -
- `from` - - `` `0x${string}` `` -
- - `string` -
- `name?` - - `string` -
- `rawAmount?` - - `string` -
- `symbol` - - `string` -
- `to` - - `` `0x${string}` `` -
- `tokenId?` - - `string` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChangesError.mdx b/docs/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChangesError.mdx deleted file mode 100644 index 69ce65407a..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/interfaces/SimulateAssetChangesError.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: SimulateAssetChangesError -description: Overview of the SimulateAssetChangesError interface -slug: wallets/reference/account-kit/infra/interfaces/SimulateAssetChangesError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/infra/src/actions/types.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L37) - -## Extends - -- `Record`\<`string`, `any`> - -## Indexable - -```ts -[key: string]: any -``` - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `message` - - `string` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyChainConfig.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyChainConfig.mdx deleted file mode 100644 index b2329e2371..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyChainConfig.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: AlchemyChainConfig -description: Overview of AlchemyChainConfig -slug: wallets/reference/account-kit/infra/type-aliases/AlchemyChainConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyChainConfig = object; -``` - -Defined in: [account-kit/infra/src/chains.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L32) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `chain` - - [`Chain`](https://viem.sh) -
- `rpcBaseUrl` - - `string` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyRpcSchema.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyRpcSchema.mdx deleted file mode 100644 index 7b214188e7..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyRpcSchema.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: AlchemyRpcSchema -description: Overview of AlchemyRpcSchema -slug: wallets/reference/account-kit/infra/type-aliases/AlchemyRpcSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyRpcSchema = [ - { - Method: "alchemy_simulateUserOperationAssetChanges"; - Parameters: SimulateUserOperationAssetChangesRequest; - ReturnType: SimulateUserOperationAssetChangesResponse; - }, - { - Method: "rundler_maxPriorityFeePerGas"; - Parameters: []; - ReturnType: UserOperationRequest["maxPriorityFeePerGas"]; - }, - ...Erc7677RpcSchema<{ policyId: string }>, - { - Method: "alchemy_requestGasAndPaymasterAndData"; - Parameters: RequestGasAndPaymasterAndDataRequest; - ReturnType: RequestGasAndPaymasterAndDataResponse; - }, - { - Method: "alchemy_requestPaymasterTokenQuote"; - Parameters: RequestPaymasterTokenQuoteRequest; - ReturnType: RequestPaymasterTokenQuoteResponse; - }, -]; -``` - -Defined in: [account-kit/infra/src/client/types.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/types.ts#L16) diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient.mdx deleted file mode 100644 index ac67f20749..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: AlchemySmartAccountClient -description: Overview of AlchemySmartAccountClient -slug: wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySmartAccountClient = Prettify< - AlchemySmartAccountClient_Base ->; -``` - -Defined in: [account-kit/infra/src/client/smartAccountClient.ts:96](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/smartAccountClient.ts#L96) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `actions` *extends* `Record`\<`string`, `unknown`> - - `Record`\<`string`, `unknown`> -
- `context` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientActions.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientActions.mdx deleted file mode 100644 index 3fad45259d..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientActions.mdx +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: AlchemySmartAccountClientActions -description: Overview of AlchemySmartAccountClientActions -slug: wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySmartAccountClientActions< - TAccount, - TContext, - TChain, - TEntryPointVersion, -> = object; -``` - -Defined in: [account-kit/infra/src/client/decorators/smartAccount.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/decorators/smartAccount.ts#L26) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `sendTransaction` - - \<`TChainOverride`>(`args`, `overrides?`, `context?`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `sendTransactions` - - (`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `sendUserOperation` - - (`args`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- `simulateUserOperation` - - (`args`) => `Promise`\<[`SimulateUserOperationAssetChangesResponse`](SimulateUserOperationAssetChangesResponse)> -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientConfig.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientConfig.mdx deleted file mode 100644 index f3dbad661c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClientConfig.mdx +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: AlchemySmartAccountClientConfig -description: Overview of AlchemySmartAccountClientConfig -slug: wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClientConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySmartAccountClientConfig = object & - Pick< - SmartAccountClientConfig, - | "customMiddleware" - | "feeEstimator" - | "gasEstimator" - | "signUserOperation" - | "transport" - | "chain" - | "opts" - >; -``` - -Defined in: [account-kit/infra/src/client/smartAccountClient.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/smartAccountClient.ts#L40) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `account?` - - `account` -
- `policyId?` - - `string` | `string`\[] -
- `policyToken?` - - [`PolicyToken`](PolicyToken) -
- `useSimulation?` - - `boolean` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `context` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient_Base.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient_Base.mdx deleted file mode 100644 index 7078f829cc..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemySmartAccountClient_Base.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: AlchemySmartAccountClient_Base -description: Overview of AlchemySmartAccountClient_Base -slug: wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClient_Base -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySmartAccountClient_Base = - Prettify< - SmartAccountClient< - AlchemyTransport, - chain, - account, - actions & BaseAlchemyActions, - [...SmartAccountClientRpcSchema, ...AlchemyRpcSchema], - context - > - >; -``` - -Defined in: [account-kit/infra/src/client/smartAccountClient.ts:76](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/smartAccountClient.ts#L76) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `actions` *extends* `Record`\<`string`, `unknown`> - - `Record`\<`string`, `unknown`> -
- `context` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransport.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransport.mdx deleted file mode 100644 index cdbf4f72f9..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransport.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: AlchemyTransport -description: Overview of AlchemyTransport -slug: wallets/reference/account-kit/infra/type-aliases/AlchemyTransport -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyTransport = AlchemyTransportBase & object; -``` - -Defined in: [account-kit/infra/src/alchemyTransport.ts:79](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/alchemyTransport.ts#L79) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `config` - - [`AlchemyTransportConfig`](AlchemyTransportConfig) -
- `dynamicFetchOptions` - - [`AlchemyTransportConfig`](AlchemyTransportConfig)\[`"fetchOptions"`] -
- `updateHeaders()` - - (`newHeaders`) => `void` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransportConfig.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransportConfig.mdx deleted file mode 100644 index 9486fb9245..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/AlchemyTransportConfig.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: AlchemyTransportConfig -description: Overview of AlchemyTransportConfig -slug: wallets/reference/account-kit/infra/type-aliases/AlchemyTransportConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyTransportConfig = - | (AlchemyConnectionConfig & Never) - | (SplitTransportConfig & Never & object); -``` - -Defined in: [account-kit/infra/src/alchemyTransport.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/alchemyTransport.ts#L59) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
- `fetchOptions?` - - `NoUndefined`\<[`HttpTransportConfig`](https://viem.sh)\[`"fetchOptions"`]> - - ‐ -
- `retryCount?` - - [`TransportConfig`](https://viem.sh)\[`"retryCount"`] - - The max number of times to retry. -
- `retryDelay?` - - [`TransportConfig`](https://viem.sh)\[`"retryDelay"`] - - The base delay (in ms) between retries. -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/BaseAlchemyActions.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/BaseAlchemyActions.mdx deleted file mode 100644 index 5d31f247af..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/BaseAlchemyActions.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: BaseAlchemyActions -description: Overview of BaseAlchemyActions -slug: wallets/reference/account-kit/infra/type-aliases/BaseAlchemyActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BaseAlchemyActions = SmartAccountClientActions< - chain, - account, - context -> & - AlchemySmartAccountClientActions; -``` - -Defined in: [account-kit/infra/src/client/smartAccountClient.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/smartAccountClient.ts#L65) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `chain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `account` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `context` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/ClientWithAlchemyMethods.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/ClientWithAlchemyMethods.mdx deleted file mode 100644 index 7f31fe5e49..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/ClientWithAlchemyMethods.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: ClientWithAlchemyMethods -description: Overview of ClientWithAlchemyMethods -slug: wallets/reference/account-kit/infra/type-aliases/ClientWithAlchemyMethods -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientWithAlchemyMethods = BundlerClient & object; -``` - -Defined in: [account-kit/infra/src/client/types.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/types.ts#L40) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `request` - - `BundlerClient`\<`AlchemyTransport`>\[`"request"`] & `object`\[`"request"`] -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/PaymasterContext.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/PaymasterContext.mdx deleted file mode 100644 index a9742171d5..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/PaymasterContext.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: PaymasterContext -description: Overview of PaymasterContext -slug: wallets/reference/account-kit/infra/type-aliases/PaymasterContext -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PaymasterContext = object; -``` - -Defined in: [account-kit/infra/src/middleware/gasManager.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/middleware/gasManager.ts#L49) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `erc20Context?` - - `object` -
- `erc20Context.maxTokenAmount?` - - `bigint` -
- `erc20Context.permit?` - - [`Hex`](https://viem.sh) -
- `erc20Context.tokenAddress` - - [`Address`](https://abitype.dev) -
- `policyId` - - `string` | `string`\[] -
- `webhookData?` - - `string` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/PolicyToken.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/PolicyToken.mdx deleted file mode 100644 index 37370de6d2..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/PolicyToken.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: PolicyToken -description: Overview of PolicyToken -slug: wallets/reference/account-kit/infra/type-aliases/PolicyToken -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PolicyToken = object; -``` - -Defined in: [account-kit/infra/src/middleware/gasManager.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/middleware/gasManager.ts#L59) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `address` - - [`Address`](https://abitype.dev) -
- `maxTokenAmount` - - `bigint` -
- `permit?` - - `object` -
- `permit.autoPermitApproveTo` - - `bigint` -
- `permit.autoPermitBelow` - - `bigint` -
- `permit.erc20Name` - - `string` -
- `permit.paymasterAddress?` - - [`Address`](https://abitype.dev) -
- `permit.version` - - `string` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataRequest.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataRequest.mdx deleted file mode 100644 index fb9e1a765d..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataRequest.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: RequestGasAndPaymasterAndDataRequest -description: Overview of RequestGasAndPaymasterAndDataRequest -slug: wallets/reference/account-kit/infra/type-aliases/RequestGasAndPaymasterAndDataRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RequestGasAndPaymasterAndDataRequest = [ - { - dummySignature: Hex; - entryPoint: Address; - erc20Context?: { - maxTokenAmount?: BigInt; - permit?: Hex; - tokenAddress: Address; - }; - overrides?: UserOperationOverrides; - policyId: string | string[]; - userOperation: UserOperationRequest; - }, -]; -``` - -Defined in: [account-kit/infra/src/actions/types.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L56) diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataResponse.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataResponse.mdx deleted file mode 100644 index 63e075394b..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestGasAndPaymasterAndDataResponse.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: RequestGasAndPaymasterAndDataResponse -description: Overview of RequestGasAndPaymasterAndDataResponse -slug: wallets/reference/account-kit/infra/type-aliases/RequestGasAndPaymasterAndDataResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RequestGasAndPaymasterAndDataResponse = Pick< - UserOperationRequest, - | "callGasLimit" - | "preVerificationGas" - | "verificationGasLimit" - | "maxFeePerGas" - | "maxPriorityFeePerGas" -> & - TEntryPointVersion extends "0.6.0" - ? object - : TEntryPointVersion extends "0.7.0" - ? Pick< - UserOperationRequest<"0.7.0">, - | "paymaster" - | "paymasterData" - | "paymasterVerificationGasLimit" - | "paymasterPostOpGasLimit" - > - : never; -``` - -Defined in: [account-kit/infra/src/actions/types.ts:71](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L71) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteRequest.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteRequest.mdx deleted file mode 100644 index 9d165fe8e3..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteRequest.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: RequestPaymasterTokenQuoteRequest -description: Overview of RequestPaymasterTokenQuoteRequest -slug: wallets/reference/account-kit/infra/type-aliases/RequestPaymasterTokenQuoteRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RequestPaymasterTokenQuoteRequest = [ - { - dummySignature: Hex; - entryPoint: Address; - erc20Context?: { - maxTokenAmount?: BigInt; - permit?: Hex; - tokenAddress: Address; - }; - overrides?: UserOperationOverrides; - policyId: string; - userOperation: UserOperationRequest; - }, -]; -``` - -Defined in: [account-kit/infra/src/actions/types.ts:95](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L95) diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteResponse.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteResponse.mdx deleted file mode 100644 index b1d799bd1d..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/RequestPaymasterTokenQuoteResponse.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: RequestPaymasterTokenQuoteResponse -description: Overview of RequestPaymasterTokenQuoteResponse -slug: wallets/reference/account-kit/infra/type-aliases/RequestPaymasterTokenQuoteResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RequestPaymasterTokenQuoteResponse = object; -``` - -Defined in: [account-kit/infra/src/actions/types.ts:110](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L110) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `estimatedTokenAmount` - - `string` -
- `estimatedUsd` - - `number` -
- `tokensPerEth` - - `string` -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesRequest.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesRequest.mdx deleted file mode 100644 index daa591dee1..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: SimulateUserOperationAssetChangesRequest -description: Overview of SimulateUserOperationAssetChangesRequest -slug: wallets/reference/account-kit/infra/type-aliases/SimulateUserOperationAssetChangesRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SimulateUserOperationAssetChangesRequest = [ - UserOperationStruct, - Address, - Hash, -]; -``` - -Defined in: [account-kit/infra/src/actions/types.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L26) diff --git a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesResponse.mdx b/docs/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesResponse.mdx deleted file mode 100644 index 629c33e2a5..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/type-aliases/SimulateUserOperationAssetChangesResponse.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: SimulateUserOperationAssetChangesResponse -description: Overview of SimulateUserOperationAssetChangesResponse -slug: wallets/reference/account-kit/infra/type-aliases/SimulateUserOperationAssetChangesResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SimulateUserOperationAssetChangesResponse = object; -``` - -Defined in: [account-kit/infra/src/actions/types.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/types.ts#L32) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `changes` - - [`SimulateAssetChange`](../interfaces/SimulateAssetChange)\[] -
- `error?` - - [`SimulateAssetChangesError`](../interfaces/SimulateAssetChangesError) -
diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/AlchemyChainSchema.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/AlchemyChainSchema.mdx deleted file mode 100644 index 7a36895077..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/AlchemyChainSchema.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemyChainSchema -description: Overview of AlchemyChainSchema -slug: wallets/reference/account-kit/infra/variables/AlchemyChainSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const AlchemyChainSchema: ZodType; -``` - -Defined in: [account-kit/infra/src/schema.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/schema.ts#L5) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/alchemyActions.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/alchemyActions.mdx deleted file mode 100644 index cddc916782..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/alchemyActions.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: alchemyActions -description: Provides a set of actions for interacting with the Alchemy Smart Account client, including the ability to simulate user operations. -slug: wallets/reference/account-kit/infra/variables/alchemyActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const alchemyActions: ( - client, -) => AlchemySmartAccountClientActions; -``` - -Defined in: [account-kit/infra/src/client/decorators/smartAccount.ts:72](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/client/decorators/smartAccount.ts#L72) - -Provides a set of actions for interacting with the Alchemy Smart Account client, including the ability to simulate user operations. - -## Example - -```ts -import { alchemyActions } from "@account-kit/infra"; -import { createPublicClient } from "viem"; - -const client = createPublicClient(...); -const clientWithAlchemyActions = client.extend(alchemyActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> -
- -## Returns - -[`AlchemySmartAccountClientActions`](../type-aliases/AlchemySmartAccountClientActions)\<`TAccount`, `TContext`, `TChain`> - -An object containing Alchemy Smart Account client actions diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/alchemyFeeEstimator.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/alchemyFeeEstimator.mdx deleted file mode 100644 index 0a9703969d..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/alchemyFeeEstimator.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: alchemyFeeEstimator -description: Function that estimates the transaction fees using Alchemy methods for a given client. It fetches the latest block and estimates the max priority fee per gas, applying any overrides or fee options provided. -slug: wallets/reference/account-kit/infra/variables/alchemyFeeEstimator -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const alchemyFeeEstimator: (transport) => ClientMiddlewareFn; -``` - -Defined in: [account-kit/infra/src/middleware/feeEstimator.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/middleware/feeEstimator.ts#L32) - -Function that estimates the transaction fees using Alchemy methods for a given client. -It fetches the latest block and estimates the max priority fee per gas, applying any overrides or fee options provided. - -## Example - -```ts -import { alchemyFeeEstimator, alchemy } from "@account-kit/infra"; -import { createSmartAccountClient } from "@aa-sdk/core"; - -const alchemyTransport = alchemy({ - chain: sepolia, - apiKey: "your-api-key", -}); - -const client = createSmartAccountClient({ - feeEstimator: alchemyFeeEstimator(alchemyTransport), - ...otherParams, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `transport` - - `AlchemyTransport` - - An alchemy transport for making Alchemy specific RPC calls -
- -## Returns - -`ClientMiddlewareFn` - -A middleware function that takes a transaction structure and fee options, and returns the augmented structure with estimated fees diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrum.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrum.mdx deleted file mode 100644 index 183f133165..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrum.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: arbitrum -description: Overview of arbitrum -slug: wallets/reference/account-kit/infra/variables/arbitrum -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const arbitrum: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L74) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumGoerli.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumGoerli.mdx deleted file mode 100644 index dea848f33c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumGoerli.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: arbitrumGoerli -description: Overview of arbitrumGoerli -slug: wallets/reference/account-kit/infra/variables/arbitrumGoerli -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const arbitrumGoerli: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:84](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L84) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumNova.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumNova.mdx deleted file mode 100644 index e7016b100f..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumNova.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: arbitrumNova -description: Overview of arbitrumNova -slug: wallets/reference/account-kit/infra/variables/arbitrumNova -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const arbitrumNova: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:485](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L485) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumSepolia.mdx deleted file mode 100644 index 383132b7bc..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/arbitrumSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: arbitrumSepolia -description: Overview of arbitrumSepolia -slug: wallets/reference/account-kit/infra/variables/arbitrumSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const arbitrumSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:94](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L94) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/base.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/base.mdx deleted file mode 100644 index cdcfc5604c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/base.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: base -description: Overview of base -slug: wallets/reference/account-kit/infra/variables/base -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const base: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:157](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L157) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/baseGoerli.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/baseGoerli.mdx deleted file mode 100644 index 6e57d39cc4..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/baseGoerli.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: baseGoerli -description: Overview of baseGoerli -slug: wallets/reference/account-kit/infra/variables/baseGoerli -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const baseGoerli: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:166](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L166) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/baseSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/baseSepolia.mdx deleted file mode 100644 index 9050a556f8..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/baseSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: baseSepolia -description: Overview of baseSepolia -slug: wallets/reference/account-kit/infra/variables/baseSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const baseSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:175](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L175) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/beraChainBartio.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/beraChainBartio.mdx deleted file mode 100644 index e5e8ff3787..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/beraChainBartio.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: beraChainBartio -description: Overview of beraChainBartio -slug: wallets/reference/account-kit/infra/variables/beraChainBartio -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const beraChainBartio: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:431](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L431) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/bobaMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/bobaMainnet.mdx deleted file mode 100644 index 4cee94279c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/bobaMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: bobaMainnet -description: Overview of bobaMainnet -slug: wallets/reference/account-kit/infra/variables/bobaMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const bobaMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:774](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L774) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/bobaSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/bobaSepolia.mdx deleted file mode 100644 index 8e3e5eb413..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/bobaSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: bobaSepolia -description: Overview of bobaSepolia -slug: wallets/reference/account-kit/infra/variables/bobaSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const bobaSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:750](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L750) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/bsc.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/bsc.mdx deleted file mode 100644 index 7bc3359a50..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/bsc.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: bsc -description: Overview of bsc -slug: wallets/reference/account-kit/infra/variables/bsc -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const bsc: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:185](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L185) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/bscTestnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/bscTestnet.mdx deleted file mode 100644 index c09d360d7f..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/bscTestnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: bscTestnet -description: Overview of bscTestnet -slug: wallets/reference/account-kit/infra/variables/bscTestnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const bscTestnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:195](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L195) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/celoMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/celoMainnet.mdx deleted file mode 100644 index 028612f4e7..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/celoMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: celoMainnet -description: Overview of celoMainnet -slug: wallets/reference/account-kit/infra/variables/celoMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const celoMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:678](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L678) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/celoSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/celoSepolia.mdx deleted file mode 100644 index 4887fbab12..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/celoSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: celoSepolia -description: Overview of celoSepolia -slug: wallets/reference/account-kit/infra/variables/celoSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const celoSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:702](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L702) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/edgeMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/edgeMainnet.mdx deleted file mode 100644 index e3ae1b9505..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/edgeMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: edgeMainnet -description: Overview of edgeMainnet -slug: wallets/reference/account-kit/infra/variables/edgeMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const edgeMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:798](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L798) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/fraxtal.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/fraxtal.mdx deleted file mode 100644 index 203dad796b..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/fraxtal.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: fraxtal -description: Overview of fraxtal -slug: wallets/reference/account-kit/infra/variables/fraxtal -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const fraxtal: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:235](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L235) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/fraxtalSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/fraxtalSepolia.mdx deleted file mode 100644 index 49369ecabf..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/fraxtalSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: fraxtalSepolia -description: Overview of fraxtalSepolia -slug: wallets/reference/account-kit/infra/variables/fraxtalSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const fraxtalSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:242](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L242) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/gensynTestnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/gensynTestnet.mdx deleted file mode 100644 index 0a1e657a12..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/gensynTestnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: gensynTestnet -description: Overview of gensynTestnet -slug: wallets/reference/account-kit/infra/variables/gensynTestnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const gensynTestnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:582](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L582) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/goerli.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/goerli.mdx deleted file mode 100644 index c0003693fa..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/goerli.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: goerli -description: Overview of goerli -slug: wallets/reference/account-kit/infra/variables/goerli -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const goerli: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:103](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L103) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/hyperliquid.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/hyperliquid.mdx deleted file mode 100644 index 95c70a7210..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/hyperliquid.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: hyperliquid -description: Overview of hyperliquid -slug: wallets/reference/account-kit/infra/variables/hyperliquid -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const hyperliquid: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:894](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L894) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/hyperliquidEvmTestnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/hyperliquidEvmTestnet.mdx deleted file mode 100644 index 1bc87c9cae..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/hyperliquidEvmTestnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: hyperliquidEvmTestnet -description: Overview of hyperliquidEvmTestnet -slug: wallets/reference/account-kit/infra/variables/hyperliquidEvmTestnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const hyperliquidEvmTestnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:904](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L904) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/inkMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/inkMainnet.mdx deleted file mode 100644 index 1e512cf3fc..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/inkMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: inkMainnet -description: Overview of inkMainnet -slug: wallets/reference/account-kit/infra/variables/inkMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const inkMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:449](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L449) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/inkSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/inkSepolia.mdx deleted file mode 100644 index 20e84d4633..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/inkSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: inkSepolia -description: Overview of inkSepolia -slug: wallets/reference/account-kit/infra/variables/inkSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const inkSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:467](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L467) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/mainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/mainnet.mdx deleted file mode 100644 index 2808d1179e..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/mainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: mainnet -description: Overview of mainnet -slug: wallets/reference/account-kit/infra/variables/mainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const mainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:112](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L112) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/mekong.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/mekong.mdx deleted file mode 100644 index 91ca373f2d..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/mekong.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: mekong -description: Overview of mekong -slug: wallets/reference/account-kit/infra/variables/mekong -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const mekong: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:540](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L540) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/monadMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/monadMainnet.mdx deleted file mode 100644 index 1f29fff547..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/monadMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: monadMainnet -description: Overview of monadMainnet -slug: wallets/reference/account-kit/infra/variables/monadMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const monadMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:516](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L516) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/monadTestnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/monadTestnet.mdx deleted file mode 100644 index 6a64bf9bdc..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/monadTestnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: monadTestnet -description: Overview of monadTestnet -slug: wallets/reference/account-kit/infra/variables/monadTestnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const monadTestnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:492](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L492) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/mythosMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/mythosMainnet.mdx deleted file mode 100644 index 95bb6b1065..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/mythosMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: mythosMainnet -description: Overview of mythosMainnet -slug: wallets/reference/account-kit/infra/variables/mythosMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const mythosMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:870](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L870) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/opbnbMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/opbnbMainnet.mdx deleted file mode 100644 index c57a38402c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/opbnbMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: opbnbMainnet -description: Overview of opbnbMainnet -slug: wallets/reference/account-kit/infra/variables/opbnbMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const opbnbMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:413](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L413) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/opbnbTestnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/opbnbTestnet.mdx deleted file mode 100644 index 313774aac7..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/opbnbTestnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: opbnbTestnet -description: Overview of opbnbTestnet -slug: wallets/reference/account-kit/infra/variables/opbnbTestnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const opbnbTestnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:395](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L395) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/openlootSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/openlootSepolia.mdx deleted file mode 100644 index 7cc4000cba..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/openlootSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: openlootSepolia -description: Overview of openlootSepolia -slug: wallets/reference/account-kit/infra/variables/openlootSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const openlootSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:558](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L558) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/optimism.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/optimism.mdx deleted file mode 100644 index 7d9449144c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/optimism.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: optimism -description: Overview of optimism -slug: wallets/reference/account-kit/infra/variables/optimism -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const optimism: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:121](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L121) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/optimismGoerli.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/optimismGoerli.mdx deleted file mode 100644 index e75e487cfd..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/optimismGoerli.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: optimismGoerli -description: Overview of optimismGoerli -slug: wallets/reference/account-kit/infra/variables/optimismGoerli -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const optimismGoerli: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:130](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L130) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/optimismSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/optimismSepolia.mdx deleted file mode 100644 index 7b53cef7f7..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/optimismSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: optimismSepolia -description: Overview of optimismSepolia -slug: wallets/reference/account-kit/infra/variables/optimismSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const optimismSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:139](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L139) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/polygon.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/polygon.mdx deleted file mode 100644 index 38594e2d17..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/polygon.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: polygon -description: Overview of polygon -slug: wallets/reference/account-kit/infra/variables/polygon -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const polygon: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:225](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L225) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/polygonAmoy.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/polygonAmoy.mdx deleted file mode 100644 index 9361e86fc2..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/polygonAmoy.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: polygonAmoy -description: Overview of polygonAmoy -slug: wallets/reference/account-kit/infra/variables/polygonAmoy -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const polygonAmoy: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:215](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L215) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/polygonMumbai.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/polygonMumbai.mdx deleted file mode 100644 index d2aabe50c0..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/polygonMumbai.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: polygonMumbai -description: Overview of polygonMumbai -slug: wallets/reference/account-kit/infra/variables/polygonMumbai -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const polygonMumbai: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:205](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L205) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/riseTestnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/riseTestnet.mdx deleted file mode 100644 index f9da78f401..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/riseTestnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: riseTestnet -description: Overview of riseTestnet -slug: wallets/reference/account-kit/infra/variables/riseTestnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const riseTestnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:606](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L606) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/sepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/sepolia.mdx deleted file mode 100644 index d9f7198418..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/sepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: sepolia -description: Overview of sepolia -slug: wallets/reference/account-kit/infra/variables/sepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const sepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:148](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L148) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/shape.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/shape.mdx deleted file mode 100644 index 2294bfb450..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/shape.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: shape -description: Overview of shape -slug: wallets/reference/account-kit/infra/variables/shape -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const shape: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:305](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L305) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/shapeSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/shapeSepolia.mdx deleted file mode 100644 index a17629aa36..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/shapeSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: shapeSepolia -description: Overview of shapeSepolia -slug: wallets/reference/account-kit/infra/variables/shapeSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const shapeSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:287](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L287) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/simulateUserOperationChanges.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/simulateUserOperationChanges.mdx deleted file mode 100644 index e29f5fca21..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/simulateUserOperationChanges.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: simulateUserOperationChanges -description: Simulates user operation changes including asset changes for a specified user operation and returns the resulting state changes. -slug: wallets/reference/account-kit/infra/variables/simulateUserOperationChanges -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const simulateUserOperationChanges: ( - client, - args, -) => Promise; -``` - -Defined in: [account-kit/infra/src/actions/simulateUserOperationChanges.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/actions/simulateUserOperationChanges.ts#L30) - -Simulates user operation changes including asset changes for a specified user operation and returns the resulting state changes. - -## Example - -```ts -import { simulateUserOperationChanges, createAlchemyPublicRpcClient } from "@account-kit/infra"; - -const client = createAlchemyPublicRpcClient(...); -const response = await simulateUserOperationChanges(client, { - uo: ... -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<[`Transport`](https://viem.sh), `TChain`, `TAccount`, [`AlchemyRpcSchema`](../type-aliases/AlchemyRpcSchema)> - - The client instance used to send the simulation request -
- `args` - - `SendUserOperationParameters`\<`TAccount`> - - The parameters of the user operation including the account and other overrides -
- -## Returns - -`Promise`\<[`SimulateUserOperationAssetChangesResponse`](../type-aliases/SimulateUserOperationAssetChangesResponse)> - -A promise that resolves to the response of the simulation showing the asset changes diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/soneiumMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/soneiumMainnet.mdx deleted file mode 100644 index 8320dc15eb..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/soneiumMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: soneiumMainnet -description: Overview of soneiumMainnet -slug: wallets/reference/account-kit/infra/variables/soneiumMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const soneiumMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:377](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L377) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/soneiumMinato.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/soneiumMinato.mdx deleted file mode 100644 index 0f79873f6c..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/soneiumMinato.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: soneiumMinato -description: Overview of soneiumMinato -slug: wallets/reference/account-kit/infra/variables/soneiumMinato -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const soneiumMinato: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:359](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L359) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/stableMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/stableMainnet.mdx deleted file mode 100644 index 56034289e9..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/stableMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: stableMainnet -description: Overview of stableMainnet -slug: wallets/reference/account-kit/infra/variables/stableMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const stableMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:846](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L846) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/storyAeneid.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/storyAeneid.mdx deleted file mode 100644 index 5dbc9175cd..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/storyAeneid.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: storyAeneid -description: Overview of storyAeneid -slug: wallets/reference/account-kit/infra/variables/storyAeneid -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const storyAeneid: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:654](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L654) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/storyMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/storyMainnet.mdx deleted file mode 100644 index 8905fc6284..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/storyMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: storyMainnet -description: Overview of storyMainnet -slug: wallets/reference/account-kit/infra/variables/storyMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const storyMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:630](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L630) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/teaSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/teaSepolia.mdx deleted file mode 100644 index 1e2f455429..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/teaSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: teaSepolia -description: Overview of teaSepolia -slug: wallets/reference/account-kit/infra/variables/teaSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const teaSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:726](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L726) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/unichainMainnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/unichainMainnet.mdx deleted file mode 100644 index 2864461187..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/unichainMainnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: unichainMainnet -description: Overview of unichainMainnet -slug: wallets/reference/account-kit/infra/variables/unichainMainnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const unichainMainnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:323](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L323) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/unichainSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/unichainSepolia.mdx deleted file mode 100644 index 87f5dfa9f8..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/unichainSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: unichainSepolia -description: Overview of unichainSepolia -slug: wallets/reference/account-kit/infra/variables/unichainSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const unichainSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:341](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L341) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/worldChain.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/worldChain.mdx deleted file mode 100644 index 9cded6ddce..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/worldChain.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: worldChain -description: Overview of worldChain -slug: wallets/reference/account-kit/infra/variables/worldChain -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const worldChain: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:277](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L277) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/worldChainSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/worldChainSepolia.mdx deleted file mode 100644 index 7d2125c029..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/worldChainSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: worldChainSepolia -description: Overview of worldChainSepolia -slug: wallets/reference/account-kit/infra/variables/worldChainSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const worldChainSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:267](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L267) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/worldl3devnet.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/worldl3devnet.mdx deleted file mode 100644 index 3697029484..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/worldl3devnet.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: worldl3devnet -description: Overview of worldl3devnet -slug: wallets/reference/account-kit/infra/variables/worldl3devnet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const worldl3devnet: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:822](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L822) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/zora.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/zora.mdx deleted file mode 100644 index 9df22d7f62..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/zora.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: zora -description: Overview of zora -slug: wallets/reference/account-kit/infra/variables/zora -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const zora: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:253](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L253) diff --git a/docs/pages/reference/account-kit/infra/src/exports/variables/zoraSepolia.mdx b/docs/pages/reference/account-kit/infra/src/exports/variables/zoraSepolia.mdx deleted file mode 100644 index a752c8f817..0000000000 --- a/docs/pages/reference/account-kit/infra/src/exports/variables/zoraSepolia.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: zoraSepolia -description: Overview of zoraSepolia -slug: wallets/reference/account-kit/infra/variables/zoraSepolia -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const zoraSepolia: Chain; -``` - -Defined in: [account-kit/infra/src/chains.ts:260](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/infra/src/chains.ts#L260) diff --git a/docs/pages/reference/account-kit/react-native/src/README.mdx b/docs/pages/reference/account-kit/react-native/src/README.mdx deleted file mode 100644 index eacfe937d0..0000000000 --- a/docs/pages/reference/account-kit/react-native/src/README.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: account-kit/react-native -description: Overview of account-kit/react-native -slug: wallets/reference/account-kit/react-native -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Type Aliases - -| Type Alias | Description | -| :-------------------------------------------------------------------------------------------------------------------- | :---------- | -| [AlchemyAccountContextProps](/wallets/reference/account-kit/react-native/type-aliases/AlchemyAccountContextProps) | - | -| [AlchemyAccountsProviderProps](/wallets/reference/account-kit/react-native/type-aliases/AlchemyAccountsProviderProps) | - | - -## Functions - -| Function | Description | -| :----------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [AlchemyAccountProvider](/wallets/reference/account-kit/react-native/functions/AlchemyAccountProvider) | Provider for Alchemy accounts. | -| [createConfig](/wallets/reference/account-kit/react-native/functions/createConfig) | Creates an AlchemyAccountsConfig by using the provided parameters to configure the core settings, including the required transport. It includes a signer creation function internally. | diff --git a/docs/pages/reference/account-kit/react-native/src/functions/AlchemyAccountProvider.mdx b/docs/pages/reference/account-kit/react-native/src/functions/AlchemyAccountProvider.mdx deleted file mode 100644 index b6fd0b5377..0000000000 --- a/docs/pages/reference/account-kit/react-native/src/functions/AlchemyAccountProvider.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: AlchemyAccountProvider -description: Overview of the AlchemyAccountProvider component -slug: wallets/reference/account-kit/react-native/components/AlchemyAccountProvider -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function AlchemyAccountProvider(props): Element; -``` - -Defined in: [account-kit/react-native/src/context.tsx:58](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react-native/src/context.tsx#L58) - -Provider for Alchemy accounts. - -## Example - -```tsx -import { AlchemyAccountProvider, createConfig } from "@account-kit/react"; -import { sepolia } from "@account-kit/infra"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; - -const config = createConfig({ - apiKey: "your-api-key", - chain: sepolia, -}); - -const queryClient = new QueryClient(); - -function App({ children }: React.PropsWithChildren) { - return ( - - - {children} - - - ); -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `props` - - `PropsWithChildren`\<[`AlchemyAccountsProviderProps`](../type-aliases/AlchemyAccountsProviderProps)> - - alchemy accounts provider props -
- -## Returns - -`Element` - -The element to wrap your application in for Alchemy Accounts context. diff --git a/docs/pages/reference/account-kit/react-native/src/functions/createConfig.mdx b/docs/pages/reference/account-kit/react-native/src/functions/createConfig.mdx deleted file mode 100644 index 5813b126bf..0000000000 --- a/docs/pages/reference/account-kit/react-native/src/functions/createConfig.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: createConfig -description: Overview of the createConfig function -slug: wallets/reference/account-kit/react-native/functions/createConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createConfig(params): AlchemyAccountsConfig; -``` - -Defined in: [account-kit/react-native/src/createConfig.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react-native/src/createConfig.ts#L15) - -Creates an AlchemyAccountsConfig by using the provided parameters to configure the core settings, including the required transport. It includes a signer creation function internally. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `BaseCreateConfigProps` - - The base properties required for creating the config and establishing client store settings -
- -## Returns - -`AlchemyAccountsConfig` - -An object of type AlchemyAccountsConfig containing the configured properties diff --git a/docs/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountContextProps.mdx b/docs/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountContextProps.mdx deleted file mode 100644 index 278ec65f41..0000000000 --- a/docs/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountContextProps.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: AlchemyAccountContextProps -description: Overview of AlchemyAccountContextProps -slug: wallets/reference/account-kit/react-native/type-aliases/AlchemyAccountContextProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyAccountContextProps = object; -``` - -Defined in: [account-kit/react-native/src/context.tsx:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react-native/src/context.tsx#L10) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `config` - - `AlchemyAccountsConfig` -
- `queryClient` - - `QueryClient` -
diff --git a/docs/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountsProviderProps.mdx b/docs/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountsProviderProps.mdx deleted file mode 100644 index c325b8c011..0000000000 --- a/docs/pages/reference/account-kit/react-native/src/type-aliases/AlchemyAccountsProviderProps.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: AlchemyAccountsProviderProps -description: Overview of AlchemyAccountsProviderProps -slug: wallets/reference/account-kit/react-native/type-aliases/AlchemyAccountsProviderProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyAccountsProviderProps = object; -``` - -Defined in: [account-kit/react-native/src/context.tsx:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react-native/src/context.tsx#L15) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `config` - - `AlchemyAccountsConfig` -
- `initialState?` - - `AlchemyClientState` -
- `queryClient` - - `QueryClient` -
diff --git a/docs/pages/reference/account-kit/react/src/README.mdx b/docs/pages/reference/account-kit/react/src/README.mdx deleted file mode 100644 index ec20c4a127..0000000000 --- a/docs/pages/reference/account-kit/react/src/README.mdx +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: account-kit/react -description: Overview of account-kit/react -slug: wallets/reference/account-kit/react -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Classes - -| Class | Description | -| :-------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------- | -| [NoAlchemyAccountContextError](/wallets/reference/account-kit/react/classes/NoAlchemyAccountContextError) | Error thrown when a hook is called without a AlchemyAccountProvider. | - -## Interfaces - -| Interface | Description | -| :--------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [ConfigForExternalWalletsParams](/wallets/reference/account-kit/react/interfaces/ConfigForExternalWalletsParams) | - | -| [SendVerificationCodeParams](/wallets/reference/account-kit/react/interfaces/SendVerificationCodeParams) | - | -| [SolanaConnection](/wallets/reference/account-kit/react/interfaces/SolanaConnection) | Returned from the solana connection. | -| [SolanaTransaction](/wallets/reference/account-kit/react/interfaces/SolanaTransaction) | We wanted to make sure that this will be using the same useMutation that the useSendUserOperation does. We are going to flatten it to make sure that we are abstracting it, and that we have the flattened version here for readability. | -| [UseChainResult](/wallets/reference/account-kit/react/interfaces/UseChainResult) | - | -| [UseWaitForCallsStatusParams](/wallets/reference/account-kit/react/interfaces/UseWaitForCallsStatusParams) | - | - -## Type Aliases - -| Type Alias | Description | -| :------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [AlchemyAccountContextProps](/wallets/reference/account-kit/react/type-aliases/AlchemyAccountContextProps) | - | -| [AlchemyAccountsConfigWithUI](/wallets/reference/account-kit/react/type-aliases/AlchemyAccountsConfigWithUI) | - | -| [AlchemyAccountsProviderProps](/wallets/reference/account-kit/react/type-aliases/AlchemyAccountsProviderProps) | - | -| [AlchemyAccountsUIConfig](/wallets/reference/account-kit/react/type-aliases/AlchemyAccountsUIConfig) | - | -| [AuthType](/wallets/reference/account-kit/react/type-aliases/AuthType) | - | -| [ChainType](/wallets/reference/account-kit/react/type-aliases/ChainType) | - | -| [ClientActionParameters](/wallets/reference/account-kit/react/type-aliases/ClientActionParameters) | - | -| [ConnectedUser](/wallets/reference/account-kit/react/type-aliases/ConnectedUser) | - | -| [ExecutableFunctionArgs](/wallets/reference/account-kit/react/type-aliases/ExecutableFunctionArgs) | - | -| [ExecutableFunctionName](/wallets/reference/account-kit/react/type-aliases/ExecutableFunctionName) | - | -| [ExecuteableFunctionResult](/wallets/reference/account-kit/react/type-aliases/ExecuteableFunctionResult) | - | -| [ExportAccountComponentProps](/wallets/reference/account-kit/react/type-aliases/ExportAccountComponentProps) | Props for the `ExportAccountComponent` component. This component is returned from the `useExportAccount` hook and should be rendered in the parent component to display the account recovery details in an iframe. | -| [SendUserOperationWithEOA](/wallets/reference/account-kit/react/type-aliases/SendUserOperationWithEOA) | - | -| [SetEmailParams](/wallets/reference/account-kit/react/type-aliases/SetEmailParams) | - | -| [SignMessageArgs](/wallets/reference/account-kit/react/type-aliases/SignMessageArgs) | - | -| [SignTypedDataArgs](/wallets/reference/account-kit/react/type-aliases/SignTypedDataArgs) | - | -| [UiConfigStore](/wallets/reference/account-kit/react/type-aliases/UiConfigStore) | - | -| [UseAccountMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseAccountMutationArgs) | - | -| [UseAccountProps](/wallets/reference/account-kit/react/type-aliases/UseAccountProps) | - | -| [UseAccountResult](/wallets/reference/account-kit/react/type-aliases/UseAccountResult) | - | -| [UseAddOauthProviderMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseAddOauthProviderMutationArgs) | - | -| [UseAddOauthProviderResult](/wallets/reference/account-kit/react/type-aliases/UseAddOauthProviderResult) | - | -| [UseAddPasskeyMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseAddPasskeyMutationArgs) | - | -| [UseAddPasskeyResult](/wallets/reference/account-kit/react/type-aliases/UseAddPasskeyResult) | - | -| [UseAuthenticateMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseAuthenticateMutationArgs) | - | -| [UseAuthenticateResult](/wallets/reference/account-kit/react/type-aliases/UseAuthenticateResult) | - | -| [UseAuthErrorResult](/wallets/reference/account-kit/react/type-aliases/UseAuthErrorResult) | - | -| [UseBundlerClientResult](/wallets/reference/account-kit/react/type-aliases/UseBundlerClientResult) | - | -| [UseCallsStatusParams](/wallets/reference/account-kit/react/type-aliases/UseCallsStatusParams) | - | -| [UseCallsStatusResult](/wallets/reference/account-kit/react/type-aliases/UseCallsStatusResult) | - | -| [UseChainParams](/wallets/reference/account-kit/react/type-aliases/UseChainParams) | - | -| [UseClientActionsProps](/wallets/reference/account-kit/react/type-aliases/UseClientActionsProps) | - | -| [UseClientActionsResult](/wallets/reference/account-kit/react/type-aliases/UseClientActionsResult) | - | -| [UseConnectedUserResult](/wallets/reference/account-kit/react/type-aliases/UseConnectedUserResult) | - | -| [UseDropAndReplaceUserOperationArgs](/wallets/reference/account-kit/react/type-aliases/UseDropAndReplaceUserOperationArgs) | - | -| [UseDropAndReplaceUserOperationMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseDropAndReplaceUserOperationMutationArgs) | - | -| [UseDropAndReplaceUserOperationResult](/wallets/reference/account-kit/react/type-aliases/UseDropAndReplaceUserOperationResult) | - | -| [UseExportAccountMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseExportAccountMutationArgs) | - | -| [UseExportAccountResult](/wallets/reference/account-kit/react/type-aliases/UseExportAccountResult) | - | -| [UseGrantPermissionsParams](/wallets/reference/account-kit/react/type-aliases/UseGrantPermissionsParams) | - | -| [UseGrantPermissionsResult](/wallets/reference/account-kit/react/type-aliases/UseGrantPermissionsResult) | - | -| [UseLogoutMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseLogoutMutationArgs) | - | -| [UseLogoutResult](/wallets/reference/account-kit/react/type-aliases/UseLogoutResult) | - | -| [UseMFAResult](/wallets/reference/account-kit/react/type-aliases/UseMFAResult) | - | -| [UsePrepareCallsParams](/wallets/reference/account-kit/react/type-aliases/UsePrepareCallsParams) | - | -| [UsePrepareCallsResult](/wallets/reference/account-kit/react/type-aliases/UsePrepareCallsResult) | - | -| [UsePrepareSwapParams](/wallets/reference/account-kit/react/type-aliases/UsePrepareSwapParams) | - | -| [UsePrepareSwapResult](/wallets/reference/account-kit/react/type-aliases/UsePrepareSwapResult) | - | -| [UseRemoveEmailMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseRemoveEmailMutationArgs) | - | -| [UseRemoveEmailResult](/wallets/reference/account-kit/react/type-aliases/UseRemoveEmailResult) | - | -| [UseRemoveOauthProviderMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseRemoveOauthProviderMutationArgs) | - | -| [UseRemoveOauthProviderResult](/wallets/reference/account-kit/react/type-aliases/UseRemoveOauthProviderResult) | - | -| [UseRemovePasskeyMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseRemovePasskeyMutationArgs) | - | -| [UseRemovePasskeyResult](/wallets/reference/account-kit/react/type-aliases/UseRemovePasskeyResult) | - | -| [UseSendCallsParams](/wallets/reference/account-kit/react/type-aliases/UseSendCallsParams) | - | -| [UseSendCallsResult](/wallets/reference/account-kit/react/type-aliases/UseSendCallsResult) | - | -| [UseSendPreparedCallsParams](/wallets/reference/account-kit/react/type-aliases/UseSendPreparedCallsParams) | - | -| [UseSendPreparedCallsResult](/wallets/reference/account-kit/react/type-aliases/UseSendPreparedCallsResult) | - | -| [UseSendUserOperationArgs](/wallets/reference/account-kit/react/type-aliases/UseSendUserOperationArgs) | - | -| [UseSendUserOperationMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseSendUserOperationMutationArgs) | - | -| [UseSendUserOperationResult](/wallets/reference/account-kit/react/type-aliases/UseSendUserOperationResult) | - | -| [UseSendVerificationCodeMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseSendVerificationCodeMutationArgs) | - | -| [UseSendVerificationCodeResult](/wallets/reference/account-kit/react/type-aliases/UseSendVerificationCodeResult) | - | -| [UseSetEmailMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseSetEmailMutationArgs) | - | -| [UseSetEmailResult](/wallets/reference/account-kit/react/type-aliases/UseSetEmailResult) | - | -| [UseSignAndSendPreparedCallsParams](/wallets/reference/account-kit/react/type-aliases/UseSignAndSendPreparedCallsParams) | - | -| [UseSignAndSendPreparedCallsResult](/wallets/reference/account-kit/react/type-aliases/UseSignAndSendPreparedCallsResult) | - | -| [UseSignerStatusResult](/wallets/reference/account-kit/react/type-aliases/UseSignerStatusResult) | - | -| [UseSignMessageArgs](/wallets/reference/account-kit/react/type-aliases/UseSignMessageArgs) | - | -| [UseSignMessagedMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseSignMessagedMutationArgs) | - | -| [UseSignMessageResult](/wallets/reference/account-kit/react/type-aliases/UseSignMessageResult) | - | -| [UseSignTypedDataArgs](/wallets/reference/account-kit/react/type-aliases/UseSignTypedDataArgs) | - | -| [UseSignTypedDataMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseSignTypedDataMutationArgs) | - | -| [UseSignTypedDataResult](/wallets/reference/account-kit/react/type-aliases/UseSignTypedDataResult) | - | -| [UseSmartAccountClientProps](/wallets/reference/account-kit/react/type-aliases/UseSmartAccountClientProps) | - | -| [UseSmartAccountClientResult](/wallets/reference/account-kit/react/type-aliases/UseSmartAccountClientResult) | - | -| [UseUserResult](/wallets/reference/account-kit/react/type-aliases/UseUserResult) | - | -| [UseWaitForCallsStatusResult](/wallets/reference/account-kit/react/type-aliases/UseWaitForCallsStatusResult) | - | -| [UseWaitForUserOperationTransactionArgs](/wallets/reference/account-kit/react/type-aliases/UseWaitForUserOperationTransactionArgs) | - | -| [UseWaitForUserOperationTransactionMutationArgs](/wallets/reference/account-kit/react/type-aliases/UseWaitForUserOperationTransactionMutationArgs) | - | -| [UseWaitForUserOperationTransactionResult](/wallets/reference/account-kit/react/type-aliases/UseWaitForUserOperationTransactionResult) | - | - -## Variables - -| Variable | Description | -| :-------------------------------------------------------------------------------------------- | :---------- | -| [AlchemyAccountContext](/wallets/reference/account-kit/react/variables/AlchemyAccountContext) | - | -| [DEFAULT_UI_CONFIG](/wallets/reference/account-kit/react/variables/DEFAULT_UI_CONFIG) | - | - -## Functions - -| Function | Description | -| :---------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [AlchemyAccountProvider](/wallets/reference/account-kit/react/functions/AlchemyAccountProvider) | Provider for Alchemy accounts. | -| [AuthCard](/wallets/reference/account-kit/react/functions/AuthCard) | React component containing an Auth view with configured auth methods and options based on the config passed to the AlchemyAccountProvider | -| [configForExternalWallets](/wallets/reference/account-kit/react/functions/configForExternalWallets) | Configure external wallets for Account Kit with simplified wallet name-based configuration Handles both EVM connectors and Solana adapters, returns config for core and UI | -| [createConfig](/wallets/reference/account-kit/react/functions/createConfig) | Wraps the `createConfig` that is exported from `@aa-sdk/core` to allow passing an additional argument, the configuration object for the Auth Components UI (the modal and AuthCard). | -| [createUiConfigStore](/wallets/reference/account-kit/react/functions/createUiConfigStore) | - | -| [Dialog](/wallets/reference/account-kit/react/functions/Dialog) | Dialog component that renders a modal dialog. | -| [getListAuthMethodsQueryKey](/wallets/reference/account-kit/react/functions/getListAuthMethodsQueryKey) | - | -| [getSocialProviderDisplayName](/wallets/reference/account-kit/react/functions/getSocialProviderDisplayName) | - | -| [Hydrate](/wallets/reference/account-kit/react/functions/Hydrate) | A react component that can be used to hydrate the client store with the provided initial state. This method will use `hydrate` to hydrate the client store with the provided initial state if one is provided. If ssr is set on the account config, then it will run the onMount function within a useEffect hook. Otherwise, It will run onMount as soon as the compoonent is rendered. | -| [UiConfigProvider](/wallets/reference/account-kit/react/functions/UiConfigProvider) | - | -| [useAccount](/wallets/reference/account-kit/react/functions/useAccount) | [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAccount.ts) to subscribe to account state and interactions, including creation, connection, and status monitoring. It synchronizes with external store updates and provides status-dependent results. The supported account types are: LightAccount, MultiOwnerLightAccount, MultiOwnerModularAccount, and ModularAccountV2. Primarily used to get the smart account address before deployment. Dependent on the signer: if the signer has not been initialized and authenticated, `address` and `isLoadingAccount` return null. | -| [useAddOauthProvider](/wallets/reference/account-kit/react/functions/useAddOauthProvider) | A custom hook to handle adding an OAuth provider to an already authenticated account, which includes executing a mutation with optional parameters. | -| [useAddPasskey](/wallets/reference/account-kit/react/functions/useAddPasskey) | A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts) to handle the addition of a passkey to an already authenticated account, which includes executing a mutation with optional parameters. | -| [useAlchemyAccountContext](/wallets/reference/account-kit/react/functions/useAlchemyAccountContext) | Internal Only hook used to access the alchemy account context. This hook is meant to be consumed by other hooks exported by this package. | -| [useAuthContext](/wallets/reference/account-kit/react/functions/useAuthContext) | A custom hook that provides the authentication context based on the specified authentication step type. It ensures that the hook is used within an `AuthModalProvider` and throws an error if the context is not available or if the current auth step type does not match the expected type. | -| [useAuthenticate](/wallets/reference/account-kit/react/functions/useAuthenticate) | [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthenticate.ts) that provides functions and state for authenticating a user using a signer. It includes methods for both synchronous and asynchronous mutations. Useful if building your own UI components and want to control the authentication flow. For authenticate vs authenticateAsync, use authenticate when you want the hook the handle state changes for you, authenticateAsync when you need to wait for the result to finish processing. | -| [useAuthError](/wallets/reference/account-kit/react/functions/useAuthError) | Returns the error returned from the current auth step, if it exists | -| [useAuthModal](/wallets/reference/account-kit/react/functions/useAuthModal) | A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthModal.ts) that returns the open and close functions for the Auth Modal if uiConfig is enabled on the Account Provider | -| [useBundlerClient](/wallets/reference/account-kit/react/functions/useBundlerClient) | Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useBundlerClient.ts) to get a bundler client using the Alchemy account context. It uses `useSyncExternalStore` to watch for any changes in the bundler client configuration and provides the updated bundler client. React hooks don’t handle their own state management directly, so they rely on external stores, like `useSyncExternalStore`, to manage state. `useBundlerClient`’s only job is to call the bundler JSON RPC methods directly; it does not do additional processing, unlike `useSmartAccountClient`. For example, if you call `sendUserOperation`, it expects a fully formed user operation. It is an extension of [Viem’s Public Client](https://viem.sh/docs/clients/public) and provides access to public actions, talking to public RPC APIs like `getBlock`, `eth_call`, etc. It does not require an account as context. Use cases: connecting with a EOA or checking for gas eligibility. | -| [useCallsStatus](/wallets/reference/account-kit/react/functions/useCallsStatus) | Hook to retrieve the status of prepared calls from the Wallet API. | -| [useChain](/wallets/reference/account-kit/react/functions/useChain) | A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useChain.ts) that returns the current chain as well as a function to set the chain. Note: when calling `setChain` the chain that's passed in must be defined in your initial `createConfig` call. Calling `setChain` causes the chain to change across the board. For example, if you use set chain then use `useSmartAccountClient`, the client will flip to the loading state and address for the account on the changed chain. | -| [useClientActions](/wallets/reference/account-kit/react/functions/useClientActions) | A [hook](https://github.com/alchemyplatform/aa-sdk/blob/4c3956c01ce5ae3c157f006bf58fffde758e5d1b/account-kit/react/src/hooks/useClientActions.ts) that allows you to leverage client decorators to execute actions and await them in your UX. This is particularly useful for using Plugins with Modular Accounts. | -| [useConnect](/wallets/reference/account-kit/react/functions/useConnect) | Re-exported [wagmi hook](https://wagmi.sh/react/api/hooks/useConnect) for connecting an EOA. This hook uses the internal wagmi config though so that the state is in sync with the rest of the Alchemy Account hook state. Useful if you wnat to connect to an EOA. | -| [useConnectedUser](/wallets/reference/account-kit/react/functions/useConnectedUser) | A React hook that returns the currently connected user across external wallets (EVM or Solana) or the smart account user from the client store. It prioritizes the EVM wallet connection, then Solana, and finally the smart account user. | -| [useConnection](/wallets/reference/account-kit/react/functions/useConnection) | A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useConnection.ts) that returns the current connection including chain, policy, and transport that you’re currently using. | -| [useDropAndReplaceUserOperation](/wallets/reference/account-kit/react/functions/useDropAndReplaceUserOperation) | Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts) that handles the drop and replace user operation for a given client and mutation arguments. | -| [useExportAccount](/wallets/reference/account-kit/react/functions/useExportAccount) | A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts) used to export the private key for an account. It returns the mutation functions to kick off the export process, as well as a component to render the account recovery details in an iframe. What is returned is dependent on what you used most recently used to authenticate. If your session was initiated with a passkey, then a private key is returned. Otherwise, a seed phrase. | -| [useGrantPermissions](/wallets/reference/account-kit/react/functions/useGrantPermissions) | React hook for granting permissions on the smart account to a given keypair This enables dapps to request specific permissions from smart accounts, such as spending limits or execution permissions. Returns an error if called with an EOA wallet connection. | -| [useListAuthMethods](/wallets/reference/account-kit/react/functions/useListAuthMethods) | A hook to list the authentication methods for a user. | -| [useLogout](/wallets/reference/account-kit/react/functions/useLogout) | Provides a [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useLogout.ts) to log out a user, disconnecting the signer and triggering the disconnectAsync function. This will disconnect both EVM and Solana wallets. | -| [useMFA](/wallets/reference/account-kit/react/functions/useMFA) | [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useMFA.ts) that provides functions and state for managing multi-factor authentication (MFA) operations. Handles adding, verifying, removing, and getting MFA factors for an authenticated account. | -| [usePrepareCalls](/wallets/reference/account-kit/react/functions/usePrepareCalls) | Hook for preparing calls to a smart account. | -| [usePrepareSwap](/wallets/reference/account-kit/react/functions/usePrepareSwap) | Hook for requesting swap quotes from a smart account. | -| [useRemoveEmail](/wallets/reference/account-kit/react/functions/useRemoveEmail) | A custom hook to handle the removal of an email from an already authenticated account, which includes executing a mutation with optional parameters. | -| [useRemoveOauthProvider](/wallets/reference/account-kit/react/functions/useRemoveOauthProvider) | A custom hook to handle removing an OAuth provider from an already authenticated account, which includes executing a mutation with optional parameters. | -| [useRemovePasskey](/wallets/reference/account-kit/react/functions/useRemovePasskey) | A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts) to handle the addition of a passkey to an already authenticated account, which includes executing a mutation with optional parameters. | -| [useSendCalls](/wallets/reference/account-kit/react/functions/useSendCalls) | Hook for sending calls to a smart account or EOA wallet. | -| [useSendPreparedCalls](/wallets/reference/account-kit/react/functions/useSendPreparedCalls) | Hook for sending prepared calls to a smart account. | -| [useSendUserOperation](/wallets/reference/account-kit/react/functions/useSendUserOperation) | A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSendUserOperation.ts) that returns functions for sending user operations. You can also optionally wait for a user operation to be mined and get the transaction hash before returning using `waitForTx`. Like any method that takes a smart account client, throws an error if client undefined or is signer not authenticated. | -| [useSendVerificationCode](/wallets/reference/account-kit/react/functions/useSendVerificationCode) | A custom hook to send OTP verification codes to email or SMS for account verification. | -| [useSetEmail](/wallets/reference/account-kit/react/functions/useSetEmail) | A custom hook to set an email address for an already authenticated account. | -| [useSignAndSendPreparedCalls](/wallets/reference/account-kit/react/functions/useSignAndSendPreparedCalls) | Hook for signing and sending prepared calls from a smart account. | -| [useSigner](/wallets/reference/account-kit/react/functions/useSigner) | [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSigner.ts) for accessing the current Alchemy signer within a React component. It uses a synchronous external store for updates. This is a good use case if you want to use the signer as an EOA, giving you direct access to it. The signer returned from `useSigner` just does a `personal_sign` or `eth_signTypedData` without any additional logic, but a smart contract account might have additional logic for creating signatures for 1271 validation so `useSignMessage` or `useSignTypeData` instead. | -| [useSignerStatus](/wallets/reference/account-kit/react/functions/useSignerStatus) | [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignerStatus.ts) to get the signer status, optionally using an override configuration, useful if you’re building your own login. | -| [useSignMessage](/wallets/reference/account-kit/react/functions/useSignMessage) | Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignMessage.ts) to sign a message using the provided client. Provides a way to sign messages within the context of an account using Ethereum-specific signature in EIP-191 format. Uses `personal_sign` to sign arbitrary messages (usually strings). Accepts any plain message as input. | -| [useSignTypedData](/wallets/reference/account-kit/react/functions/useSignTypedData) | Similar to `useSignMessage`, [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignTypedData.ts) for signing typed data, supporting both connected accounts and clients in EIP 712 format. | -| [useSmartAccountClient](/wallets/reference/account-kit/react/functions/useSmartAccountClient) | [Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSmartAccountClient.ts) that uses the provided smart account client parameters to create or retrieve an existing smart account client, handling different types of accounts including LightAccount, MultiOwnerLightAccount, and MultiOwnerModularAccount. Under the hood, Smart Account Client takes care of all the necessary middleware operations needed to populate a user operation such as gas estimation and paymaster data. | -| [useSmartWalletClient](/wallets/reference/account-kit/react/functions/useSmartWalletClient) | React hook that provides a Smart Wallet Client instance. Returns undefined if an EOA wallet is connected via wagmi, as Smart Wallet Clients are only for smart accounts. The hook automatically subscribes to changes in signer status and chain configuration. | -| [useSolanaConnection](/wallets/reference/account-kit/react/functions/useSolanaConnection) | This hook is used for establishing a connection to Solana and returns the connection object and the signer object. | -| [useSolanaSignMessage](/wallets/reference/account-kit/react/functions/useSolanaSignMessage) | This is the hook that will be used to sign a message. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected. | -| [useSolanaTransaction](/wallets/reference/account-kit/react/functions/useSolanaTransaction) | This is the hook that will be used to send a transaction. It will prioritize external connected Solana wallets, falling back to the internal signer when not connected. Supports sponsorship for both external wallets and internal signers. | -| [useSolanaWallet](/wallets/reference/account-kit/react/functions/useSolanaWallet) | A React hook that mirrors the behavior and return type of `useWallet` from `@solana/wallet-adapter-react`, but safely degrades when Solana is not enabled for your application. | -| [useUiConfig](/wallets/reference/account-kit/react/functions/useUiConfig) | A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx) for accessing UI configuration from the `UiConfigContext`. Allows optional selection of specific parts of the UI config state using a selector function. For editing and updating the underlying UI config on the fly. | -| [useUser](/wallets/reference/account-kit/react/functions/useUser) | A React [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUser.ts) that returns the current user information, either from an External Owned Account (EOA) or from the client store. It uses the Alchemy account context and synchronizes with external store updates. The best way to check if user is logged in for both smart account contract users and EOA. | -| [useWaitForCallsStatus](/wallets/reference/account-kit/react/functions/useWaitForCallsStatus) | Hook to wait for calls status to be confirmed. It will poll until the calls reach the desired status or until a timeout occurs. | -| [useWaitForUserOperationTransaction](/wallets/reference/account-kit/react/functions/useWaitForUserOperationTransaction) | Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts) to wait for a user operation transaction and manage its state (pending, error, result). | diff --git a/docs/pages/reference/account-kit/react/src/classes/NoAlchemyAccountContextError.mdx b/docs/pages/reference/account-kit/react/src/classes/NoAlchemyAccountContextError.mdx deleted file mode 100644 index 8f95615b0a..0000000000 --- a/docs/pages/reference/account-kit/react/src/classes/NoAlchemyAccountContextError.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: NoAlchemyAccountContextError -description: Error thrown when a hook is called without a AlchemyAccountProvider. -slug: wallets/reference/account-kit/react/classes/NoAlchemyAccountContextError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/react/src/errors.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/errors.ts#L18) - -Error thrown when a hook is called without a AlchemyAccountProvider. - -## Param - -The name of the hook. - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new NoAlchemyAccountContextError(hookName): NoAlchemyAccountContextError; -``` - -Defined in: [account-kit/react/src/errors.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/errors.ts#L24) - -Constructs an error message indicating that a specific hook must be used within an AlchemyAccountProvider. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `hookName` - - `string` - - The name of the hook that must be used within the AlchemyAccountProvider -
- -#### Returns - -`NoAlchemyAccountContextError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `version` - - `string` - - `VERSION` -
diff --git a/docs/pages/reference/account-kit/react/src/functions/AlchemyAccountProvider.mdx b/docs/pages/reference/account-kit/react/src/functions/AlchemyAccountProvider.mdx deleted file mode 100644 index 604fe67e43..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/AlchemyAccountProvider.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: AlchemyAccountProvider -description: Overview of the AlchemyAccountProvider component -slug: wallets/reference/account-kit/react/components/AlchemyAccountProvider -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function AlchemyAccountProvider(props): Element; -``` - -Defined in: [account-kit/react/src/AlchemyAccountProvider.tsx:58](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/AlchemyAccountProvider.tsx#L58) - -Provider for Alchemy accounts. - -## Example - -```tsx -import { AlchemyAccountProvider, createConfig } from "@account-kit/react"; -import { sepolia } from "@account-kit/infra"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; - -const config = createConfig({ - apiKey: "your-api-key", - chain: sepolia, -}); - -const queryClient = new QueryClient(); - -function App({ children }: React.PropsWithChildren) { - return ( - - - {children} - - - ); -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `props` - - `PropsWithChildren`\<[`AlchemyAccountsProviderProps`](../type-aliases/AlchemyAccountsProviderProps)> - - alchemy accounts provider props -
- -## Returns - -`Element` - -The element to wrap your application in for Alchemy Accounts context. diff --git a/docs/pages/reference/account-kit/react/src/functions/AuthCard.mdx b/docs/pages/reference/account-kit/react/src/functions/AuthCard.mdx deleted file mode 100644 index e0b4f922b4..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/AuthCard.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: AuthCard -description: Overview of the AuthCard component -slug: wallets/reference/account-kit/react/components/AuthCard -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function AuthCard(props): Element; -``` - -Defined in: [account-kit/react/src/components/auth/card/index.tsx:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/components/auth/card/index.tsx#L46) - -React component containing an Auth view with configured auth methods -and options based on the config passed to the AlchemyAccountProvider - -## Example - -```tsx -import { AuthCard, useAlchemyAccountContext } from "@account-kit/react"; - -function ComponentWithAuthCard() { - // assumes you've passed in a UI config to the Account Provider - // you can also directly set the properties on the AuthCard component - const { uiConfig } = useAlchemyAccountContext(); - - return ; -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `props` - - `AuthCardProps` - - Card Props -
- -## Returns - -`Element` - -a react component containing the AuthCard diff --git a/docs/pages/reference/account-kit/react/src/functions/Dialog.mdx b/docs/pages/reference/account-kit/react/src/functions/Dialog.mdx deleted file mode 100644 index 8f57ec6869..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/Dialog.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Dialog -description: Overview of the Dialog component -slug: wallets/reference/account-kit/react/components/Dialog -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function Dialog(props): null | ReactPortal; -``` - -Defined in: [account-kit/react/src/components/dialog/dialog.tsx:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/components/dialog/dialog.tsx#L28) - -Dialog component that renders a modal dialog. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `props` - - `DialogProps` - - The props for the Dialog component. -
- -## Returns - -`null` | `ReactPortal` - -The rendered Dialog component. diff --git a/docs/pages/reference/account-kit/react/src/functions/Hydrate.mdx b/docs/pages/reference/account-kit/react/src/functions/Hydrate.mdx deleted file mode 100644 index bb75924198..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/Hydrate.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: Hydrate -description: Overview of the Hydrate component -slug: wallets/reference/account-kit/react/components/Hydrate -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function Hydrate(props): ReactNode; -``` - -Defined in: [account-kit/react/src/hydrate.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hydrate.ts#L29) - -A react component that can be used to hydrate the client store with the provided initial state. -This method will use `hydrate` to hydrate the client store with the provided initial state if one is provided. -If ssr is set on the account config, then it will run the onMount function within a useEffect hook. Otherwise, -It will run onMount as soon as the compoonent is rendered. - -based on https://github.com/wevm/wagmi/blob/main/packages/react/src/hydrate.ts - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `props` - - `PropsWithChildren`\<`HydrateProps`> - - component props containing the config and initial state as well as children to render -
- -## Returns - -`ReactNode` - -the children to render diff --git a/docs/pages/reference/account-kit/react/src/functions/UiConfigProvider.mdx b/docs/pages/reference/account-kit/react/src/functions/UiConfigProvider.mdx deleted file mode 100644 index 669f56f6ed..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/UiConfigProvider.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: UiConfigProvider -description: Overview of the UiConfigProvider component -slug: wallets/reference/account-kit/react/components/UiConfigProvider -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function UiConfigProvider(__namedParameters): Element; -``` - -Defined in: [account-kit/react/src/hooks/useUiConfig.tsx:94](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useUiConfig.tsx#L94) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `__namedParameters` - - `PropsWithChildren`\<\{ `initialConfig?`: [`AlchemyAccountsUIConfig`](../type-aliases/AlchemyAccountsUIConfig); }> -
- -## Returns - -`Element` diff --git a/docs/pages/reference/account-kit/react/src/functions/configForExternalWallets.mdx b/docs/pages/reference/account-kit/react/src/functions/configForExternalWallets.mdx deleted file mode 100644 index 45ef68d2e4..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/configForExternalWallets.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: configForExternalWallets -description: Overview of the configForExternalWallets function -slug: wallets/reference/account-kit/react/functions/configForExternalWallets -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function configForExternalWallets(root0): ConfigForExternalWalletsResult; -``` - -Defined in: [account-kit/react/src/configForExternalWallets.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/configForExternalWallets.ts#L56) - -Configure external wallets for Account Kit with simplified wallet name-based configuration -Handles both EVM connectors and Solana adapters, returns config for core and UI - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `root0` - - [`ConfigForExternalWalletsParams`](../interfaces/ConfigForExternalWalletsParams) - - Configuration parameters object -
- -## Returns - -`ConfigForExternalWalletsResult` - -Object containing connectors, adapters, and UI config diff --git a/docs/pages/reference/account-kit/react/src/functions/createConfig.mdx b/docs/pages/reference/account-kit/react/src/functions/createConfig.mdx deleted file mode 100644 index 4935d9798e..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/createConfig.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: createConfig -description: Overview of the createConfig function -slug: wallets/reference/account-kit/react/functions/createConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createConfig(props, ui?): AlchemyAccountsConfigWithUI; -``` - -Defined in: [account-kit/react/src/createConfig.ts:52](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/createConfig.ts#L52) - -Wraps the `createConfig` that is exported from `@aa-sdk/core` to allow passing -an additional argument, the configuration object for the Auth Components UI -(the modal and AuthCard). - -## Example - -```ts -import { sepolia, alchemy } from "@account-kit/infra" -import { AlchemyAccountsUIConfig, createConfig } from "@account-kit/react" -import { QueryClient } from "@tanstack/react-query"; - -const uiConfig: AlchemyAccountsUIConfig = { - illustrationStyle: "linear", - auth: { - sections: [[{ type: "email" }], [{ type: "passkey" }]], - addPasskeyOnSignup: true, - }, -} - -const config = createConfig({ - transport: alchemy({ apiKey: "your_api_key" }) - chain: sepolia, - ssr: true, - sessionConfig: { - expirationTimeMs: 1000 * 60 * 60, // 1 hour (defaults to 15 min) - }, -}, uiConfig) - -export const queryClient = new QueryClient(); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `props` - - `CreateConfigProps` - - for creating an alchemy account config -
- `ui?` - - `any` - - (optional) configuration to use for the Auth Components UI -
- -## Returns - -[`AlchemyAccountsConfigWithUI`](../type-aliases/AlchemyAccountsConfigWithUI) - -an alchemy account config object containing the core and client store, as well as the UI config diff --git a/docs/pages/reference/account-kit/react/src/functions/createUiConfigStore.mdx b/docs/pages/reference/account-kit/react/src/functions/createUiConfigStore.mdx deleted file mode 100644 index f7a035d8fb..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/createUiConfigStore.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: createUiConfigStore -description: Overview of the createUiConfigStore function -slug: wallets/reference/account-kit/react/functions/createUiConfigStore -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createUiConfigStore( - initialConfig, -): UseBoundStore>; -``` - -Defined in: [account-kit/react/src/hooks/useUiConfig.tsx:44](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useUiConfig.tsx#L44) - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault value
- `initialConfig` - - [`AlchemyAccountsUIConfig`](../type-aliases/AlchemyAccountsUIConfig) - - `DEFAULT_UI_CONFIG` -
- -## Returns - -`UseBoundStore`\<`StoreApi`\<[`UiConfigStore`](../type-aliases/UiConfigStore)>> diff --git a/docs/pages/reference/account-kit/react/src/functions/getListAuthMethodsQueryKey.mdx b/docs/pages/reference/account-kit/react/src/functions/getListAuthMethodsQueryKey.mdx deleted file mode 100644 index 600b032e47..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/getListAuthMethodsQueryKey.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getListAuthMethodsQueryKey -description: Overview of the getListAuthMethodsQueryKey function -slug: wallets/reference/account-kit/react/functions/getListAuthMethodsQueryKey -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getListAuthMethodsQueryKey(user): any[]; -``` - -Defined in: [account-kit/react/src/hooks/useListAuthMethods.ts:35](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useListAuthMethods.ts#L35) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `UseUserResult` -
- -## Returns - -`any`\[] diff --git a/docs/pages/reference/account-kit/react/src/functions/getSocialProviderDisplayName.mdx b/docs/pages/reference/account-kit/react/src/functions/getSocialProviderDisplayName.mdx deleted file mode 100644 index ecf516027e..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/getSocialProviderDisplayName.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getSocialProviderDisplayName -description: Overview of the getSocialProviderDisplayName function -slug: wallets/reference/account-kit/react/functions/getSocialProviderDisplayName -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSocialProviderDisplayName(authType): string; -``` - -Defined in: [account-kit/react/src/components/auth/types.ts:54](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/components/auth/types.ts#L54) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `authType` - - `object` & (\{ authProviderId: "auth0"; isCustomProvider?: false | undefined; auth0Connection?: string | undefined; displayName: string; logoUrl: string; logoUrlDark?: string | undefined; } | \{ ...; }) & OauthRedirectConfig -
- -## Returns - -`string` diff --git a/docs/pages/reference/account-kit/react/src/functions/useAccount.mdx b/docs/pages/reference/account-kit/react/src/functions/useAccount.mdx deleted file mode 100644 index a48522b862..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAccount.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: useAccount -description: Overview of the useAccount hook -slug: wallets/reference/account-kit/react/hooks/useAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAccount(params): UseAccountResult; -``` - -Defined in: [account-kit/react/src/hooks/useAccount.ts:54](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAccount.ts#L54) - -[Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAccount.ts) to subscribe to account state and interactions, including creation, connection, and status monitoring. It synchronizes with external store updates and provides status-dependent results. -The supported account types are: LightAccount, MultiOwnerLightAccount, MultiOwnerModularAccount, and ModularAccountV2. Primarily used to get the smart account address before deployment. Dependent on the signer: if the signer has not been initialized and authenticated, `address` and `isLoadingAccount` return null. - -If using a smart contract account, returns instance of a smart contract account that the user is connected to. Returns address of smart contract account, not address of the signer. - -If using an EOA, returns address of signer - -## Example - -```ts twoslash -import { useAccount } from "@account-kit/react"; - -const { account, address, isLoadingAccount } = useAccount({ - type: "LightAccount", -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDescription
- `TAccount` *extends* `SupportedAccountTypes` - - The type of account to use -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseAccountProps`](../type-aliases/UseAccountProps)\<`TAccount`> - - The parameters required for account management, including account type, specific account parameters, and optional mutation arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAccount.ts#L28) -
- -## Returns - -[`UseAccountResult`](../type-aliases/UseAccountResult)\<`TAccount`> - -An object containing the account information, address, and loading state. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAccount.ts#L22) diff --git a/docs/pages/reference/account-kit/react/src/functions/useAddOauthProvider.mdx b/docs/pages/reference/account-kit/react/src/functions/useAddOauthProvider.mdx deleted file mode 100644 index fa4e8499b2..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAddOauthProvider.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: useAddOauthProvider -description: Overview of the useAddOauthProvider hook -slug: wallets/reference/account-kit/react/hooks/useAddOauthProvider -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAddOauthProvider(mutationArgs?): UseAddOauthProviderResult; -``` - -Defined in: [account-kit/react/src/hooks/useAddOauthProvider.ts:61](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAddOauthProvider.ts#L61) - -A custom hook to handle adding an OAuth provider to an already authenticated account, which includes executing a mutation with optional parameters. - -## Example - -```ts twoslash -import { useAddOauthProvider } from "@account-kit/react"; - -const { addOauthProvider, isAddingOauthProvider, error } = useAddOauthProvider({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`OauthProviderInfo`, `Error`, `Omit`\<`object` & OauthProviderConfig & OauthRedirectConfig, `"type"`>, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional arguments for the mutation used for adding an OAuth provider. -
- -## Returns - -[`UseAddOauthProviderResult`](../type-aliases/UseAddOauthProviderResult) - -An object containing the `addOauthProvider` function, `addOauthProviderAsync` for async execution, a boolean `isAddingOauthProvider` to track the mutation status, and any error encountered. diff --git a/docs/pages/reference/account-kit/react/src/functions/useAddPasskey.mdx b/docs/pages/reference/account-kit/react/src/functions/useAddPasskey.mdx deleted file mode 100644 index 21c7423052..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAddPasskey.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: useAddPasskey -description: Overview of the useAddPasskey hook -slug: wallets/reference/account-kit/react/hooks/useAddPasskey -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAddPasskey(mutationArgs?): UseAddPasskeyResult; -``` - -Defined in: [account-kit/react/src/hooks/useAddPasskey.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAddPasskey.ts#L56) - -A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts) to handle the addition of a passkey to an already authenticated account, which includes executing a mutation with optional parameters. - -## Example - -```ts twoslash -import { useAddPasskey } from "@account-kit/react"; - -const { addPasskey, isAddingPasskey, error } = useAddPasskey({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`string`\[], `Error`, `undefined` | `void` | `CredentialCreationOptions`, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional arguments for the mutation used for adding a passkey. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts#L8) -
- -## Returns - -[`UseAddPasskeyResult`](../type-aliases/UseAddPasskeyResult) - -An object containing the `addPasskey` function, `addPasskeyAsync` for async execution, a boolean `isAddingPasskey` to track the mutation status, and any error encountered. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts#L13) diff --git a/docs/pages/reference/account-kit/react/src/functions/useAlchemyAccountContext.mdx b/docs/pages/reference/account-kit/react/src/functions/useAlchemyAccountContext.mdx deleted file mode 100644 index 83b05f1e2e..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAlchemyAccountContext.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: useAlchemyAccountContext -description: Overview of the useAlchemyAccountContext hook -slug: wallets/reference/account-kit/react/hooks/useAlchemyAccountContext -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAlchemyAccountContext(override?): AlchemyAccountContextProps; -``` - -Defined in: [account-kit/react/src/hooks/useAlchemyAccountContext.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAlchemyAccountContext.ts#L21) - -Internal Only hook used to access the alchemy account context. -This hook is meant to be consumed by other hooks exported by this package. - -## Example - -```ts twoslash -import { useAlchemyAccountContext } from "@account-kit/react"; - -const { config, queryClient } = useAlchemyAccountContext(); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `override?` - - [`AlchemyAccountContextProps`](../type-aliases/AlchemyAccountContextProps) - - optional context override that can be used to return a custom context -
- -## Returns - -[`AlchemyAccountContextProps`](../type-aliases/AlchemyAccountContextProps) - -The alchemy account context if one exists - -## Throws - -if used outside of the AlchemyAccountProvider diff --git a/docs/pages/reference/account-kit/react/src/functions/useAuthContext.mdx b/docs/pages/reference/account-kit/react/src/functions/useAuthContext.mdx deleted file mode 100644 index b132ba49a7..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAuthContext.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: useAuthContext -description: A custom hook that provides the authentication context based on the specified authentication step type. It ensures that the hook is used within an `AuthModalProvider` and throws an error if the context is not available or if the current auth step type does not match the expected type. -slug: wallets/reference/account-kit/react/hooks/useAuthContext -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAuthContext(type?): AuthContextType; -``` - -Defined in: [account-kit/react/src/components/auth/context.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/components/auth/context.ts#L73) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TType` *extends* - | `undefined` - | `"email_verify"` - | `"otp_verify"` - | `"totp_verify"` - | `"passkey_verify"` - | `"passkey_create"` - | `"passkey_create_success"` - | `"email_completing"` - | `"oauth_completing"` - | `"initial"` - | `"complete"` - | `"eoa_connect"` - | `"wallet_connect"` - | `"pick_eoa"` - - | `undefined` - | `"email_verify"` - | `"otp_verify"` - | `"totp_verify"` - | `"passkey_verify"` - | `"passkey_create"` - | `"passkey_create_success"` - | `"email_completing"` - | `"oauth_completing"` - | `"initial"` - | `"complete"` - | `"eoa_connect"` - | `"wallet_connect"` - | `"pick_eoa"` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `type?` - - `TType` - - Optional type of authentication step to validate against the current context -
- -## Returns - -`AuthContextType`\<`TType`> - -The authentication context for the current component diff --git a/docs/pages/reference/account-kit/react/src/functions/useAuthError.mdx b/docs/pages/reference/account-kit/react/src/functions/useAuthError.mdx deleted file mode 100644 index d629abc075..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAuthError.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: useAuthError -description: Overview of the useAuthError hook -slug: wallets/reference/account-kit/react/hooks/useAuthError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAuthError(): UseAuthErrorResult; -``` - -Defined in: [account-kit/react/src/hooks/useAuthError.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAuthError.ts#L21) - -Returns the error returned from the current auth step, if it exists - -## Example - -```ts twoslash -import { useAuthError } from "@account-kit/react"; - -const error = useAuthError(); - -if (error) { - console.error("Error occurred during auth step", error); -} -``` - -## Returns - -[`UseAuthErrorResult`](../type-aliases/UseAuthErrorResult) - -the current Error object diff --git a/docs/pages/reference/account-kit/react/src/functions/useAuthModal.mdx b/docs/pages/reference/account-kit/react/src/functions/useAuthModal.mdx deleted file mode 100644 index fefdba84a9..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAuthModal.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: useAuthModal -description: Overview of the useAuthModal hook -slug: wallets/reference/account-kit/react/hooks/useAuthModal -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAuthModal(): object; -``` - -Defined in: [account-kit/react/src/hooks/useAuthModal.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAuthModal.ts#L31) - -A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthModal.ts) that returns the open and close functions for the Auth Modal if uiConfig -is enabled on the Account Provider - -## Example - -```tsx twoslash -import React from "react"; -import { useAuthModal } from "@account-kit/react"; - -const ComponentWithAuthModal = () => { - const { openAuthModal } = useAuthModal(); - - return ( -
- -
- ); -}; -``` - -## Returns - -`object` - -an object containing methods for opening or closing the auth modal. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthModal.ts#L4) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `closeAuthModal()` - - () => `void` -
- `isOpen` - - `boolean` -
- `openAuthModal()` - - () => `void` -
diff --git a/docs/pages/reference/account-kit/react/src/functions/useAuthenticate.mdx b/docs/pages/reference/account-kit/react/src/functions/useAuthenticate.mdx deleted file mode 100644 index b93cf1eb59..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useAuthenticate.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: useAuthenticate -description: Overview of the useAuthenticate hook -slug: wallets/reference/account-kit/react/hooks/useAuthenticate -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useAuthenticate(mutationArgs?): UseAuthenticateResult; -``` - -Defined in: [account-kit/react/src/hooks/useAuthenticate.ts:50](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAuthenticate.ts#L50) - -[Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthenticate.ts) that provides functions and state for authenticating a user using a signer. It includes methods for both synchronous and asynchronous mutations. -Useful if building your own UI components and want to control the authentication flow. -For authenticate vs authenticateAsync, use authenticate when you want the hook the handle state changes for you, authenticateAsync when you need to wait for the result to finish processing. - -This can be complex for magic link or OTP flows: OPT calls authenticate twice, but this should be handled by the signer. - -## Example - -```ts twoslash -import { useAuthenticate } from "@account-kit/react"; - -const { authenticate, authenticateAsync, isPending, error } = useAuthenticate({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<[`User`](../../../signer/src/type-aliases/User), `Error`, `AuthParams`, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional mutation arguments to configure the authentication mutation. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthenticate.ts#L15) -
- -## Returns - -[`UseAuthenticateResult`](../type-aliases/UseAuthenticateResult) - -An object containing functions and state for handling user authentication, including methods for synchronously and asynchronously executing the authentication. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthenticate.ts#L20) diff --git a/docs/pages/reference/account-kit/react/src/functions/useBundlerClient.mdx b/docs/pages/reference/account-kit/react/src/functions/useBundlerClient.mdx deleted file mode 100644 index d0d00448d1..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useBundlerClient.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: useBundlerClient -description: Overview of the useBundlerClient hook -slug: wallets/reference/account-kit/react/hooks/useBundlerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useBundlerClient(): ClientWithAlchemyMethods; -``` - -Defined in: [account-kit/react/src/hooks/useBundlerClient.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useBundlerClient.ts#L25) - -Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useBundlerClient.ts) to get a bundler client using the Alchemy account context. -It uses `useSyncExternalStore` to watch for any changes in the bundler client configuration and provides the updated bundler client. React hooks don’t handle their own state management directly, so they rely on external stores, like `useSyncExternalStore`, to manage state. `useBundlerClient`’s only job is to call the bundler JSON RPC methods directly; it does not do additional processing, unlike `useSmartAccountClient`. For example, if you call `sendUserOperation`, it expects a fully formed user operation. -It is an extension of [Viem’s Public Client](https://viem.sh/docs/clients/public) and provides access to public actions, talking to public RPC APIs like `getBlock`, `eth_call`, etc. It does not require an account as context. -Use cases: connecting with a EOA or checking for gas eligibility. - -## Example - -```ts twoslash -import { useBundlerClient } from "@account-kit/react"; - -const bundlerClient = useBundlerClient(); -``` - -## Returns - -`ClientWithAlchemyMethods` - -The bundler client based on the current Alchemy account configuration. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/client/bundlerClient.ts#L24) diff --git a/docs/pages/reference/account-kit/react/src/functions/useCallsStatus.mdx b/docs/pages/reference/account-kit/react/src/functions/useCallsStatus.mdx deleted file mode 100644 index f836658e06..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useCallsStatus.mdx +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: useCallsStatus -description: Overview of the useCallsStatus hook -slug: wallets/reference/account-kit/react/hooks/useCallsStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useCallsStatus(params): UseCallsStatusResult; -``` - -Defined in: [account-kit/react/src/hooks/useCallsStatus.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useCallsStatus.ts#L55) - -Hook to retrieve the status of prepared calls from the Wallet API. - -This hook queries the status of a specific call ID that was returned from `wallet_sendPreparedCalls`. -The status indicates whether the batch of calls has been processed, confirmed, or failed on-chain. - -## Example - -```tsx twoslash -import { useCallsStatus } from "@account-kit/react"; - -function MyComponent() { - const { - data: callsStatus, - isLoading, - error, - } = useCallsStatus({ - client: smartWalletClient, - callId: "0x1234...", // The call ID from sendPreparedCalls - queryOptions: { - // Refetch every 2 sec while pending. - refetchInterval: (q) => (q.state.data?.status === 100 ? 2000 : false), - }, - }); -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseCallsStatusParams`](../type-aliases/UseCallsStatusParams) - - Parameters for the hook -
- -## Returns - -[`UseCallsStatusResult`](../type-aliases/UseCallsStatusResult) - -Query result diff --git a/docs/pages/reference/account-kit/react/src/functions/useChain.mdx b/docs/pages/reference/account-kit/react/src/functions/useChain.mdx deleted file mode 100644 index 08f336b864..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useChain.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: useChain -description: Overview of the useChain hook -slug: wallets/reference/account-kit/react/hooks/useChain -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useChain(mutationArgs?): UseChainResult; -``` - -Defined in: [account-kit/react/src/hooks/useChain.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useChain.ts#L51) - -A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useChain.ts) that returns the current chain as well as a function to set the chain. -Note: when calling `setChain` the chain that's passed in must be defined in -your initial `createConfig` call. Calling `setChain` causes the chain to change across the board. For example, if you use set chain then use `useSmartAccountClient`, the client will flip to the loading state and address for the account on the changed chain. - -For switching chains, you can also use [createBundlerClient](https://www.alchemy.com/docs/wallets/reference/aa-sdk/core/functions/createBundlerClient#createbundlerclient) or [createSmartAccoutClient](https://www.alchemy.com/docs/wallets/reference/aa-sdk/core/functions/createSmartAccountClient) directly and create a different client for each chain. You would have to manage different clients, but you wouldn't have to wait for any hooks to complete and can run these queries in parallel. This way the chain set in the config that the smart account client and other hooks inherit is not also affected. - -## Example - -```tsx twoslash -import React from "react"; -import { useChain } from "@account-kit/react"; -// Assuming the chain sepolia is defined in your initial createConfig call -import { sepolia } from "@account-kit/infra"; - -function ComponentUsingChain() { - const { chain, setChain, isSettingChain } = useChain(); - - return ( -
-

Current Chain: {chain.id}

- -
- ); -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, \{ `chain`: [`Chain`](https://viem.sh); }, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - optional properties which contain mutation arg overrides. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useChain.ts#L14) -
- -## Returns - -[`UseChainResult`](../interfaces/UseChainResult) - -an object containing the current chain and a function to set the chain as well as loading state of setting the chain. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useChain.ts#L16) diff --git a/docs/pages/reference/account-kit/react/src/functions/useClientActions.mdx b/docs/pages/reference/account-kit/react/src/functions/useClientActions.mdx deleted file mode 100644 index 1093d03718..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useClientActions.mdx +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: useClientActions -description: Overview of the useClientActions hook -slug: wallets/reference/account-kit/react/hooks/useClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useClientActions( - args, -): UseClientActionsResult; -``` - -Defined in: [account-kit/react/src/hooks/useClientActions.ts:111](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useClientActions.ts#L111) - -A [hook](https://github.com/alchemyplatform/aa-sdk/blob/4c3956c01ce5ae3c157f006bf58fffde758e5d1b/account-kit/react/src/hooks/useClientActions.ts) that allows you to leverage client decorators to execute actions -and await them in your UX. This is particularly useful for using Plugins -with Modular Accounts. - -## Example - -```tsx twoslash -import React from "react"; -import { useSmartAccountClient } from "@account-kit/react"; -import { sessionKeyPluginActions } from "@account-kit/smart-contracts"; -import { useClientActions } from "@account-kit/react"; - -const Foo = () => { - const { client } = useSmartAccountClient({ - type: "MultiOwnerModularAccount", - }); - const { executeAction } = useClientActions({ - client: client, - actions: sessionKeyPluginActions, - }); - - executeAction({ - functionName: "isAccountSessionKey", - args: [{ key: "0x0" }], - }); -}; -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TActions` *extends* `object` - - `object` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - [`UseClientActionsProps`](../type-aliases/UseClientActionsProps)\<`TTransport`, `TChain`, `TActions`> - - the hooks arguments highlighted below. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useClientActions.ts#L10) -
- -## Returns - -[`UseClientActionsResult`](../type-aliases/UseClientActionsResult)\<`TActions`> - -an object containing methods to execute the actions as well loading and error states [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useClientActions.ts#L21) diff --git a/docs/pages/reference/account-kit/react/src/functions/useConnect.mdx b/docs/pages/reference/account-kit/react/src/functions/useConnect.mdx deleted file mode 100644 index 11d33e6928..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useConnect.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: useConnect -description: Overview of the useConnect hook -slug: wallets/reference/account-kit/react/hooks/useConnect -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useConnect(params?): UseConnectReturnType; -``` - -Defined in: [account-kit/react/src/hooks/useConnect.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useConnect.ts#L34) - -Re-exported [wagmi hook](https://wagmi.sh/react/api/hooks/useConnect) for connecting an EOA. This hook -uses the internal wagmi config though so that the state -is in sync with the rest of the Alchemy Account hook state. -Useful if you wnat to connect to an EOA. - -## Example - -```ts twoslash -import { useConnect } from "@account-kit/react"; - -const { connectors, connect } = useConnect({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params?` - - `Object` - - mutation parameters to use for the connect mutation -
- -## Returns - -`UseConnectReturnType`\<`Config`> - -the wagmi useConnect return type diff --git a/docs/pages/reference/account-kit/react/src/functions/useConnectedUser.mdx b/docs/pages/reference/account-kit/react/src/functions/useConnectedUser.mdx deleted file mode 100644 index e052c84901..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useConnectedUser.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: useConnectedUser -description: Overview of the useConnectedUser hook -slug: wallets/reference/account-kit/react/hooks/useConnectedUser -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useConnectedUser(): UseConnectedUserResult; -``` - -Defined in: [account-kit/react/src/hooks/useConnectedUser.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useConnectedUser.ts#L48) - -A React hook that returns the currently connected user across external wallets (EVM or Solana) -or the smart account user from the client store. It prioritizes the EVM wallet connection, then -Solana, and finally the smart account user. - -Useful for building UI that needs a single "connected user" concept regardless of whether a -smart account session exists. - -- If an EVM wallet is connected, returns `{ address, type: "eoa", orgId?, userId? }`. -- If a Solana wallet is connected, returns `{ solanaAddress, type: "eoa", orgId?, userId? }` and - `address` may be undefined. `orgId` and `userId` may also be undefined. -- Otherwise, returns the smart account user from the store with `type: "sca"`, or `null` if no - user exists. - -## Example - -```ts twoslash -import { useConnectedUser } from "@account-kit/react"; - -const user = useConnectedUser(); - -if (user?.type === "eoa") { - // EVM wallets expose `address`; Solana wallets expose `solanaAddress`. - console.log("Connected EOA:", user.address ?? user.solanaAddress); -} -``` - -## Returns - -[`UseConnectedUserResult`](../type-aliases/UseConnectedUserResult) - -The connected user, or `null` if no user is available. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useConnectedUser.ts) diff --git a/docs/pages/reference/account-kit/react/src/functions/useConnection.mdx b/docs/pages/reference/account-kit/react/src/functions/useConnection.mdx deleted file mode 100644 index 6c09307b69..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useConnection.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: useConnection -description: Overview of the useConnection hook -slug: wallets/reference/account-kit/react/hooks/useConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useConnection(): Connection; -``` - -Defined in: [account-kit/react/src/hooks/useConnection.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useConnection.ts#L16) - -A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useConnection.ts) that returns the current connection including chain, policy, and transport that you’re currently using. - -## Returns - -`Connection` - -the current connection. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/types.ts#L56) diff --git a/docs/pages/reference/account-kit/react/src/functions/useDropAndReplaceUserOperation.mdx b/docs/pages/reference/account-kit/react/src/functions/useDropAndReplaceUserOperation.mdx deleted file mode 100644 index 0f9ae139b8..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useDropAndReplaceUserOperation.mdx +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: useDropAndReplaceUserOperation -description: Overview of the useDropAndReplaceUserOperation hook -slug: wallets/reference/account-kit/react/hooks/useDropAndReplaceUserOperation -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useDropAndReplaceUserOperation( - config, -): UseDropAndReplaceUserOperationResult; -``` - -Defined in: [account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts:110](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L110) - -Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts) that handles the drop and replace user operation for a given client and mutation arguments. - -## Example - -```tsx twoslash -import React from "react"; -import { - useDropAndReplaceUserOperation, - useSendUserOperation, - useSmartAccountClient, -} from "@account-kit/react"; - -export function ComponentWithDropAndReplaceUO() { - const { client } = useSmartAccountClient({}); - - const { sendUserOperationAsync, isSendingUserOperation } = - useSendUserOperation({ - client, - }); - const { dropAndReplaceUserOperation, isDroppingAndReplacingUserOperation } = - useDropAndReplaceUserOperation({ - client, - onSuccess: ({ hash, request }) => { - // [optional] Do something with the hash and request - }, - onError: (error) => { - // [optional] Do something with the error - }, - // [optional] ...additional mutationArgs - }); - - return ( -
- -
- ); -} -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* keyof `EntryPointRegistryBase`\<`unknown`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`UseDropAndReplaceUserOperationArgs`](../type-aliases/UseDropAndReplaceUserOperationArgs)\<`TEntryPointVersion`, `TAccount`> - - The configuration parameters including the client and other mutation arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L23) -
- -## Returns - -[`UseDropAndReplaceUserOperationResult`](../type-aliases/UseDropAndReplaceUserOperationResult)\<`TEntryPointVersion`, `TAccount`> - -The result containing the mutation function, result data, loading state, and any error. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L30) diff --git a/docs/pages/reference/account-kit/react/src/functions/useExportAccount.mdx b/docs/pages/reference/account-kit/react/src/functions/useExportAccount.mdx deleted file mode 100644 index 6d27cd3c58..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useExportAccount.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: useExportAccount -description: Overview of the useExportAccount hook -slug: wallets/reference/account-kit/react/hooks/useExportAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useExportAccount(args?): UseExportAccountResult; -``` - -Defined in: [account-kit/react/src/hooks/useExportAccount.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useExportAccount.ts#L68) - -A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts) used to export the private key for an account. It returns the mutation functions to kick off the export process, as well as a component to render the account recovery details in an iframe. -What is returned is dependent on what you used most recently used to authenticate. If your session was initiated with a passkey, then a private key is returned. Otherwise, a seed phrase. - -## Example - -```ts twoslash -import { useExportAccount } from "@account-kit/react"; - -const { - exportAccount, - isExported, - isExporting, - error, - ExportAccountComponent, -} = useExportAccount({ - params: { - iframeContainerId: "my-iframe-container", - }, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args?` - - [`UseExportAccountMutationArgs`](../type-aliases/UseExportAccountMutationArgs) - - Optional arguments for the mutation and export parameters. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts#L11) -
- -## Returns - -[`UseExportAccountResult`](../type-aliases/UseExportAccountResult) - -An object containing the export state, possible error, and the export account function and component. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useExportAccount.ts#L32)\* diff --git a/docs/pages/reference/account-kit/react/src/functions/useGrantPermissions.mdx b/docs/pages/reference/account-kit/react/src/functions/useGrantPermissions.mdx deleted file mode 100644 index 9e5739cc48..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useGrantPermissions.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: useGrantPermissions -description: Overview of the useGrantPermissions hook -slug: wallets/reference/account-kit/react/hooks/useGrantPermissions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useGrantPermissions(params): UseGrantPermissionsResult; -``` - -Defined in: [account-kit/react/src/hooks/useGrantPermissions.ts:98](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useGrantPermissions.ts#L98) - -React hook for granting permissions on the smart account to a given keypair -This enables dapps to request specific permissions from smart accounts, such as spending limits or execution permissions. -Returns an error if called with an EOA wallet connection. - -## Example - -```tsx twoslash -import { useGrantPermissions, useSmartAccountClient } from "@account-kit/react"; - -function PermissionsComponent() { - const { client } = useSmartAccountClient({}); - const { grantPermissions, isGrantingPermissions } = useGrantPermissions({ - client, - }); - - const handleGrantPermissions = () => { - grantPermissions({ - permissions: [ - { - type: "native-token-spending-limit", - data: { - amount: "1000000000000000000", // 1 ETH in wei - }, - }, - ], - expiry: Math.floor(Date.now() / 1000) + 3600, // 1 hour from now - }); - }; - - return ( - - ); -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseGrantPermissionsParams`](../type-aliases/UseGrantPermissionsParams) - - Configuration object containing the smart account client -
- -## Returns - -[`UseGrantPermissionsResult`](../type-aliases/UseGrantPermissionsResult) - -Object containing mutation functions, loading state, result, and error diff --git a/docs/pages/reference/account-kit/react/src/functions/useListAuthMethods.mdx b/docs/pages/reference/account-kit/react/src/functions/useListAuthMethods.mdx deleted file mode 100644 index d1ae6fe2dd..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useListAuthMethods.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: useListAuthMethods -description: Overview of the useListAuthMethods hook -slug: wallets/reference/account-kit/react/hooks/useListAuthMethods -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useListAuthMethods(): UseQueryResult; -``` - -Defined in: [account-kit/react/src/hooks/useListAuthMethods.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useListAuthMethods.ts#L14) - -A hook to list the authentication methods for a user. - -## Returns - -`UseQueryResult`\<`AuthMethods`> - -The authentication methods for the user. diff --git a/docs/pages/reference/account-kit/react/src/functions/useLogout.mdx b/docs/pages/reference/account-kit/react/src/functions/useLogout.mdx deleted file mode 100644 index d7e970ad9d..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useLogout.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: useLogout -description: Overview of the useLogout hook -slug: wallets/reference/account-kit/react/hooks/useLogout -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useLogout(mutationArgs?): UseLogoutResult; -``` - -Defined in: [account-kit/react/src/hooks/useLogout.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useLogout.ts#L38) - -Provides a [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useLogout.ts) to log out a user, disconnecting the signer and triggering the disconnectAsync function. -This will disconnect both EVM and Solana wallets. - -## Example - -```ts twoslash -import { useLogout } from "@account-kit/react"; - -const { logout, isLoggingOut, error } = useLogout({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, `void`, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - optional arguments to customize the mutation behavior -
- -## Returns - -[`UseLogoutResult`](../type-aliases/UseLogoutResult) - -an object containing the logout function, a boolean indicating if logout is in progress, and any error encountered during logout diff --git a/docs/pages/reference/account-kit/react/src/functions/useMFA.mdx b/docs/pages/reference/account-kit/react/src/functions/useMFA.mdx deleted file mode 100644 index 455ce005b5..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useMFA.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: useMFA -description: Overview of the useMFA hook -slug: wallets/reference/account-kit/react/hooks/useMFA -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useMFA(): UseMFAResult; -``` - -Defined in: [account-kit/react/src/hooks/useMFA.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useMFA.ts#L53) - -[Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useMFA.ts) that provides functions and state for managing multi-factor authentication (MFA) operations. -Handles adding, verifying, removing, and getting MFA factors for an authenticated account. - -The hook checks if the signer is connected before allowing MFA operations and provides an `isReady` flag -to indicate whether MFA operations can be performed. - -## Example - -```ts twoslash -import { useMFA } from "@account-kit/react"; - -const { addMFA, verifyMFA, removeMFA, getMFAFactors, isReady } = useMFA(); -``` - -## Returns - -[`UseMFAResult`](../type-aliases/UseMFAResult) - -An object containing functions and state for handling MFA operations diff --git a/docs/pages/reference/account-kit/react/src/functions/usePrepareCalls.mdx b/docs/pages/reference/account-kit/react/src/functions/usePrepareCalls.mdx deleted file mode 100644 index 48df541dc9..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/usePrepareCalls.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: usePrepareCalls -description: Overview of the usePrepareCalls hook -slug: wallets/reference/account-kit/react/hooks/usePrepareCalls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function usePrepareCalls(params): UsePrepareCallsResult; -``` - -Defined in: [account-kit/react/src/hooks/usePrepareCalls.ts:88](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/usePrepareCalls.ts#L88) - -Hook for preparing calls to a smart account. - -This hook provides functionality to prepare calls for execution on a smart account. -It handles the preparation step of the Account Abstraction flow, but does not support EOA wallets. - -## Example - -```ts twoslash -import { usePrepareCalls } from "@account-kit/react"; - -const { prepareCalls, prepareCallsAsync, isPreparingCalls, error } = - usePrepareCalls(); - -// Prepare calls -await prepareCallsAsync({ - calls: [ - { - to: "0x...", - data: "0x...", - value: "0x0", - }, - ], -}); -``` - -## Remarks - -- This hook only works with smart accounts and does not support EOA wallets -- The hook handles the preparation step of the Account Abstraction flow -- Prepared calls must be signed, then can be used with `useSendPreparedCalls` to complete the execution - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UsePrepareCallsParams`](../type-aliases/UsePrepareCallsParams) - - Configuration parameters for the hook -
- -## Returns - -[`UsePrepareCallsResult`](../type-aliases/UsePrepareCallsResult) - -An object containing: - -- `prepareCalls`: Function to prepare calls synchronously (returns void) -- `prepareCallsAsync`: Async function to prepare calls (returns Promise) -- `preparedCalls`: The result of the last successful call preparation -- `isPreparingCalls`: Boolean indicating if calls are currently being prepared -- `error`: Error from the last failed call preparation, if any diff --git a/docs/pages/reference/account-kit/react/src/functions/usePrepareSwap.mdx b/docs/pages/reference/account-kit/react/src/functions/usePrepareSwap.mdx deleted file mode 100644 index f96788e6c1..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/usePrepareSwap.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: usePrepareSwap -description: Overview of the usePrepareSwap hook -slug: wallets/reference/account-kit/react/hooks/usePrepareSwap -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function usePrepareSwap(params): UsePrepareSwapResult; -``` - -Defined in: [account-kit/react/src/hooks/usePrepareSwap.ts:85](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/usePrepareSwap.ts#L85) - -Hook for requesting swap quotes from a smart account. - -This hook provides functionality to request swap quotes for token swaps. - -## Example - -```ts twoslash -import { usePrepareSwap } from "@account-kit/react"; - -const { prepareSwapAsync, isPreparingSwap, error } = usePrepareSwap(); - -// Request a swap quote -const quote = await prepareSwapAsync({ - fromToken: "0x...", - toToken: "0x...", - minimumToAmount: "0x...", -}); -``` - -## Remarks - -- This hook only works with smart accounts and does not support EOA wallets -- The hook handles the quote request step of the swap flow -- The returned quote can be used with `useSignAndSendPreparedCalls` to complete the swap. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UsePrepareSwapParams`](../type-aliases/UsePrepareSwapParams) - - Configuration parameters for the hook -
- -## Returns - -[`UsePrepareSwapResult`](../type-aliases/UsePrepareSwapResult) - -An object containing: - -- `prepareSwap`: Function to request quote and prepare the swap synchronously -- `prepareSwapAsync`: Async function to request quote and prepare the swap (returns Promise) -- `quote`: The result of the last successful quote request -- `isPreparingSwap`: Boolean indicating if a quote is currently being requested -- `error`: Error from the last failed quote request, if any diff --git a/docs/pages/reference/account-kit/react/src/functions/useRemoveEmail.mdx b/docs/pages/reference/account-kit/react/src/functions/useRemoveEmail.mdx deleted file mode 100644 index fab46a9a7a..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useRemoveEmail.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: useRemoveEmail -description: Overview of the useRemoveEmail hook -slug: wallets/reference/account-kit/react/hooks/useRemoveEmail -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useRemoveEmail(mutationArgs?): UseRemoveEmailResult; -``` - -Defined in: [account-kit/react/src/hooks/useRemoveEmail.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemoveEmail.ts#L44) - -A custom hook to handle the removal of an email from an already authenticated account, which includes executing a mutation with optional parameters. - -## Example - -```ts twoslash -import { useRemoveEmail } from "@account-kit/react"; - -const { removeEmail, isRemovingEmail, error } = useRemoveEmail({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, `void`, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional arguments for the mutation used for removing an email. -
- -## Returns - -[`UseRemoveEmailResult`](../type-aliases/UseRemoveEmailResult) - -An object containing the `removeEmail` function, `removeEmailAsync` for async execution, a boolean `isRemovingEmail` to track the mutation status, and any error encountered. diff --git a/docs/pages/reference/account-kit/react/src/functions/useRemoveOauthProvider.mdx b/docs/pages/reference/account-kit/react/src/functions/useRemoveOauthProvider.mdx deleted file mode 100644 index dbb5cba68c..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useRemoveOauthProvider.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: useRemoveOauthProvider -description: Overview of the useRemoveOauthProvider hook -slug: wallets/reference/account-kit/react/hooks/useRemoveOauthProvider -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useRemoveOauthProvider(mutationArgs?): UseRemoveOauthProviderResult; -``` - -Defined in: [account-kit/react/src/hooks/useRemoveOauthProvider.ts:52](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemoveOauthProvider.ts#L52) - -A custom hook to handle removing an OAuth provider from an already authenticated account, which includes executing a mutation with optional parameters. - -## Example - -```ts twoslash -import { useRemoveOauthProvider } from "@account-kit/react"; - -const { removeOauthProvider, isRemovingOauthProvider, error } = - useRemoveOauthProvider({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), - }); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, `string`, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional arguments for the mutation used for removing an OAuth provider. -
- -## Returns - -[`UseRemoveOauthProviderResult`](../type-aliases/UseRemoveOauthProviderResult) - -An object containing the `removeOauthProvider` function, `removeOauthProviderAsync` for async execution, a boolean `isRemovingOauthProvider` to track the mutation status, and any error encountered. diff --git a/docs/pages/reference/account-kit/react/src/functions/useRemovePasskey.mdx b/docs/pages/reference/account-kit/react/src/functions/useRemovePasskey.mdx deleted file mode 100644 index 99a7b1e744..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useRemovePasskey.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: useRemovePasskey -description: Overview of the useRemovePasskey hook -slug: wallets/reference/account-kit/react/hooks/useRemovePasskey -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useRemovePasskey(mutationArgs?): UseRemovePasskeyResult; -``` - -Defined in: [account-kit/react/src/hooks/useRemovePasskey.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemovePasskey.ts#L42) - -A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts) to handle the addition of a passkey to an already authenticated account, which includes executing a mutation with optional parameters. - -## Example - -```ts twoslash -import { useRemovePasskey } from "@account-kit/react"; - -const { removePasskey, isRemovingPasskey, error } = useRemovePasskey({ - // these are optional - onSuccess: () => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, `string`, `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional arguments for the mutation used for removing a passkey. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemovePasskey.ts#L8) -
- -## Returns - -[`UseRemovePasskeyResult`](../type-aliases/UseRemovePasskeyResult) - -An object containing the `removePasskey` function, `removePasskeyAsync` for async execution, a boolean `isRemovingPasskey` to track the mutation status, and any error encountered. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemovePasskey.ts#L13) diff --git a/docs/pages/reference/account-kit/react/src/functions/useSendCalls.mdx b/docs/pages/reference/account-kit/react/src/functions/useSendCalls.mdx deleted file mode 100644 index 1995955d05..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSendCalls.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: useSendCalls -description: Overview of the useSendCalls hook -slug: wallets/reference/account-kit/react/hooks/useSendCalls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSendCalls( - params, -): UseSendCallsResult; -``` - -Defined in: [account-kit/react/src/hooks/useSendCalls.ts:120](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendCalls.ts#L120) - -Hook for sending calls to a smart account or EOA wallet. - -This hook provides functionality to execute calls on a smart account using Account Abstraction, -or fall back to regular EOA transactions when connected to an EOA wallet. It handles the complete -flow of preparing, signing, and sending calls. - -\ -If using this hook with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden -from the user. It is recommended to use the `usePrepareCalls` hook instead to manually handle the permit signature. -\ - -## Example - -```ts twoslash -import { useSendCalls } from "@account-kit/react"; - -const { sendCalls, sendCallsAsync, isSendingCalls, error } = useSendCalls(); - -// Send a single call -await sendCallsAsync({ - calls: [ - { - to: "0x...", - data: "0x...", - value: "0x0", - }, - ], -}); - -// Send multiple calls (smart account only) -await sendCallsAsync({ - calls: [ - { to: "0x...", data: "0x..." }, - { to: "0x...", data: "0x..." }, - ], -}); -``` - -## Remarks - -- When connected to an EOA wallet, only single calls are supported (batch execution is not allowed) -- For smart accounts, the returned `ids` are the prepared call IDs -- For EOA wallets, the returned `ids` are transaction hashes - -## Type Parameters - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault typeDescription
- `TEntryPointVersion` *extends* keyof `EntryPointRegistryBase`\<`unknown`> - - keyof `EntryPointRegistryBase`\<`unknown`> - - The entry point version to use for user operations (defaults to EntryPointVersion) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseSendCallsParams`](../type-aliases/UseSendCallsParams) - - Configuration parameters for the hook -
- -## Returns - -[`UseSendCallsResult`](../type-aliases/UseSendCallsResult)\<`TEntryPointVersion`> - -An object containing: - -- `sendCalls`: Function to send calls synchronously (returns void) -- `sendCallsAsync`: Async function to send calls (returns Promise) -- `sendCallsResult`: The result of the last successful call execution -- `isSendingCalls`: Boolean indicating if calls are currently being sent -- `error`: Error from the last failed call execution, if any diff --git a/docs/pages/reference/account-kit/react/src/functions/useSendPreparedCalls.mdx b/docs/pages/reference/account-kit/react/src/functions/useSendPreparedCalls.mdx deleted file mode 100644 index 263e63ef84..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSendPreparedCalls.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: useSendPreparedCalls -description: Overview of the useSendPreparedCalls hook -slug: wallets/reference/account-kit/react/hooks/useSendPreparedCalls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSendPreparedCalls(params): UseSendPreparedCallsResult; -``` - -Defined in: [account-kit/react/src/hooks/useSendPreparedCalls.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendPreparedCalls.ts#L86) - -Hook for sending prepared calls to a smart account. - -This hook provides functionality to send previously prepared calls to a smart account. -It handles the signing and sending of prepared calls, but does not support EOA wallets. - -## Example - -```ts twoslash -import { useSendPreparedCalls } from "@account-kit/react"; - -const { - sendPreparedCalls, - sendPreparedCallsAsync, - isSendingPreparedCalls, - error, -} = useSendPreparedCalls(); - -// Send prepared calls -await sendPreparedCallsAsync({ - preparedCalls: [ - // prepared call objects - ], -}); -``` - -## Remarks - -- This hook only works with smart accounts and does not support EOA wallets -- The hook handles the signing and sending of prepared calls -- The returned result contains the prepared call IDs - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseSendPreparedCallsParams`](../type-aliases/UseSendPreparedCallsParams) - - Configuration parameters for the hook -
- -## Returns - -[`UseSendPreparedCallsResult`](../type-aliases/UseSendPreparedCallsResult) - -An object containing: - -- `sendPreparedCalls`: Function to send prepared calls synchronously (returns void) -- `sendPreparedCallsAsync`: Async function to send prepared calls (returns Promise) -- `sendPreparedCallsResult`: The result of the last successful prepared call execution -- `isSendingPreparedCalls`: Boolean indicating if prepared calls are currently being sent -- `error`: Error from the last failed prepared call execution, if any diff --git a/docs/pages/reference/account-kit/react/src/functions/useSendUserOperation.mdx b/docs/pages/reference/account-kit/react/src/functions/useSendUserOperation.mdx deleted file mode 100644 index d2e520011b..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSendUserOperation.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: useSendUserOperation -description: Overview of the useSendUserOperation hook -slug: wallets/reference/account-kit/react/hooks/useSendUserOperation -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSendUserOperation( - params, -): UseSendUserOperationResult; -``` - -Defined in: [account-kit/react/src/hooks/useSendUserOperation.ts:131](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendUserOperation.ts#L131) - -A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSendUserOperation.ts) that returns functions for sending user operations. -You can also optionally wait for a user operation to be mined and get the transaction hash before returning using `waitForTx`. -Like any method that takes a smart account client, throws an error if client undefined or is signer not authenticated. - -## Example - -```tsx twoslash -import React from "react"; -import { - useSendUserOperation, - useSmartAccountClient, -} from "@account-kit/react"; - -function ComponentWithSendUserOperation() { - const { client } = useSmartAccountClient({}); - - const { sendUserOperation, isSendingUserOperation } = useSendUserOperation({ - client, - // optional parameter that will wait for the transaction to be mined before returning - waitForTxn: true, - onSuccess: ({ hash, request }) => { - // [optional] Do something with the hash and request - }, - onError: (error) => { - // [optional] Do something with the error - }, - // [optional] ...additional mutationArgs - }); - - return ( -
- -
- ); -} -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* keyof `EntryPointRegistryBase`\<`unknown`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseSendUserOperationArgs`](../type-aliases/UseSendUserOperationArgs)\<`TEntryPointVersion`, `TAccount`> - - the parameters for the hook including the client, a flag to wait for tx mining, and mutation args. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSendUserOperation.ts#L45) -
- -## Returns - -[`UseSendUserOperationResult`](../type-aliases/UseSendUserOperationResult)\<`TEntryPointVersion`, `TAccount`> - -functions and state for sending UOs. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSendUserOperation.ts#L53) diff --git a/docs/pages/reference/account-kit/react/src/functions/useSendVerificationCode.mdx b/docs/pages/reference/account-kit/react/src/functions/useSendVerificationCode.mdx deleted file mode 100644 index 0fe6051361..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSendVerificationCode.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: useSendVerificationCode -description: Overview of the useSendVerificationCode hook -slug: wallets/reference/account-kit/react/hooks/useSendVerificationCode -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSendVerificationCode(mutationArgs?): UseSendVerificationCodeResult; -``` - -Defined in: [account-kit/react/src/hooks/useSendVerificationCode.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendVerificationCode.ts#L74) - -A custom hook to send OTP verification codes to email or SMS for account verification. - -## Example - -```ts twoslash -import { useSendVerificationCode } from "@account-kit/react"; - -const { sendVerificationCode, isSendingCode, error } = useSendVerificationCode({ - onSuccess: (data) => { - console.log("OTP sent"); - }, - onError: (error) => console.error(error), -}); - -// Send verification code to email -sendVerificationCode({ - type: "email", - contact: "user@example.com", -}); - -// Send verification code to SMS -sendVerificationCodeAsync({ - type: "sms", - contact: "+1234567890", -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, [`SendVerificationCodeParams`](../interfaces/SendVerificationCodeParams), `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional arguments for the mutation -
- -## Returns - -[`UseSendVerificationCodeResult`](../type-aliases/UseSendVerificationCodeResult) - -An object containing functions and state for sending verification codes diff --git a/docs/pages/reference/account-kit/react/src/functions/useSetEmail.mdx b/docs/pages/reference/account-kit/react/src/functions/useSetEmail.mdx deleted file mode 100644 index 4742063546..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSetEmail.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: useSetEmail -description: Overview of the useSetEmail hook -slug: wallets/reference/account-kit/react/hooks/useSetEmail -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSetEmail(mutationArgs?): UseSetEmailResult; -``` - -Defined in: [account-kit/react/src/hooks/useSetEmail.ts:76](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSetEmail.ts#L76) - -A custom hook to set an email address for an already authenticated account. - -**Note:** You should first use the `useSendVerificationCode` hook to send -a verification code to the email address before calling this hook. - -## Example - -```ts twoslash -import { useSetEmail, useSendVerificationCode } from "@account-kit/react"; - -// First, send verification code -const { sendVerificationCode } = useSendVerificationCode(); - -const { setEmail, isSettingEmail, error } = useSetEmail({ - onSuccess: () => { - // do something when email is successfully set - }, - onError: (error) => console.error(error), -}); - -// Step 1: Send verification code to email -await sendVerificationCode({ - type: "email", - contact: "user@example.com", -}); - -// Step 2: Update email using verification code -setEmail({ - verificationCode: "123456", // code user received -}); - -// DEPRECATED: Use with just email string (for backward compatibility) -setEmail("user@example.com"); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `mutationArgs?` - - `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, [`SetEmailParams`](../type-aliases/SetEmailParams), `unknown`>, `"mutationFn"` | `"mutationKey"`>> - - Optional arguments for the setEmail mutation -
- -## Returns - -[`UseSetEmailResult`](../type-aliases/UseSetEmailResult) - -An object containing functions and state for setting the email diff --git a/docs/pages/reference/account-kit/react/src/functions/useSignAndSendPreparedCalls.mdx b/docs/pages/reference/account-kit/react/src/functions/useSignAndSendPreparedCalls.mdx deleted file mode 100644 index b9b14b1806..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSignAndSendPreparedCalls.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: useSignAndSendPreparedCalls -description: Overview of the useSignAndSendPreparedCalls hook -slug: wallets/reference/account-kit/react/hooks/useSignAndSendPreparedCalls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSignAndSendPreparedCalls(params): UseSignAndSendPreparedCallsResult; -``` - -Defined in: [account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts#L86) - -Hook for signing and sending prepared calls from a smart account. - -This hook provides functionality to sign and send previously prepared calls to a smart account. -It handles both the signing and sending of prepared calls in a single operation, and does not support EOA wallets. - -## Example - -```ts twoslash -import { useSignAndSendPreparedCalls } from "@account-kit/react"; - -const { - signAndSendPreparedCalls, - signAndSendPreparedCallsAsync, - isSigningAndSendingPreparedCalls, - error, -} = useSignAndSendPreparedCalls(); - -// Sign and send prepared calls -await signAndSendPreparedCallsAsync({ - preparedCalls: [ - // unsigned prepared call objects - ], -}); -``` - -## Remarks - -- This hook only works with smart accounts and does not support EOA wallets -- The hook handles both signing and sending of prepared calls in a single operation -- The returned result contains the prepared call IDs - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseSignAndSendPreparedCallsParams`](../type-aliases/UseSignAndSendPreparedCallsParams) - - Configuration parameters for the hook -
- -## Returns - -[`UseSignAndSendPreparedCallsResult`](../type-aliases/UseSignAndSendPreparedCallsResult) - -An object containing: - -- `signAndSendPreparedCalls`: Function to sign and send prepared calls synchronously (returns void) -- `signAndSendPreparedCallsAsync`: Async function to sign and send prepared calls (returns Promise) -- `signAndSendPreparedCallsResult`: The result of the last successful prepared call execution -- `isSigningAndSendingPreparedCalls`: Boolean indicating if prepared calls are currently being signed and sent -- `error`: Error from the last failed prepared call execution, if any diff --git a/docs/pages/reference/account-kit/react/src/functions/useSignMessage.mdx b/docs/pages/reference/account-kit/react/src/functions/useSignMessage.mdx deleted file mode 100644 index 3eb54cda65..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSignMessage.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: useSignMessage -description: Overview of the useSignMessage hook -slug: wallets/reference/account-kit/react/hooks/useSignMessage -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSignMessage(config): UseSignMessageResult; -``` - -Defined in: [account-kit/react/src/hooks/useSignMessage.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignMessage.ts#L73) - -Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignMessage.ts) to sign a message using the provided client. -Provides a way to sign messages within the context of an account using Ethereum-specific signature in EIP-191 format. Uses `personal_sign` to sign arbitrary messages (usually strings). Accepts any plain message as input. - -Until the method completes, `isSigningMessage` is true and `signedMessage` is null until eventually returning either a 1271 or 6492 signature (if the smart contract account has not been deployed yet), which is useful if you need to render the signature to the UI. `signedMessageAsync` is useful over `signedMessage` if you need to chain calls together. - -Using 1271 validation, the mechanisms by which you can validate the smart contract account, we verify the message was signed by the smart contract itself rather than the EOA signer. - -To reiterate, the signature that is returned must be verified against the account itself not the signer. The final structure of the signature is dictated by how the account does 1271 validation. You don’t want to be verifying in a different way than the way the account itself structures the signatures to be validated. For example LightAccount has three different ways to validate the account. - -## Example - -```ts twoslash -import { useSignMessage, useSmartAccountClient } from "@account-kit/react"; -const data = "messageToSign"; -const { client } = useSmartAccountClient({}); - -const { - signMessage, - signMessageAsync, - signedMessage, - isSigningMessage, - error, -} = useSignMessage({ - client, - // these are optional - onSuccess: (result) => { - // do something on success - }, - onError: (error) => console.error(error), -}); - -const result = await signMessage({ message: data }); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`UseSignMessageArgs`](../type-aliases/UseSignMessageArgs) - - The configuration arguments for the hook, including the client and additional mutation arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignMessage.ts#L25) -
- -## Returns - -[`UseSignMessageResult`](../type-aliases/UseSignMessageResult) - -An object containing methods and state for signing messages. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignMessage.ts#L29) diff --git a/docs/pages/reference/account-kit/react/src/functions/useSignTypedData.mdx b/docs/pages/reference/account-kit/react/src/functions/useSignTypedData.mdx deleted file mode 100644 index f01328dd8c..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSignTypedData.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: useSignTypedData -description: Overview of the useSignTypedData hook -slug: wallets/reference/account-kit/react/hooks/useSignTypedData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSignTypedData(args): UseSignTypedDataResult; -``` - -Defined in: [account-kit/react/src/hooks/useSignTypedData.ts:72](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignTypedData.ts#L72) - -Similar to `useSignMessage`, [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignTypedData.ts) for signing typed data, supporting both connected accounts and clients in EIP 712 format. - -Uses `eth_signTypedData` to sign structured, typed data. Accepts typed, complex data structures as input. Like `useSignMessage`, this hook also handles deployed (1271) and undeployed accounts (6492). - -## Example - -```ts twoslash -import { useSignTypedData, useSmartAccountClient } from "@account-kit/react"; -const typedData = { - types: { - Message: [{ name: "content", type: "string" }], - }, - primaryType: "Message", - message: { content: "Hello" }, -}; -const { client } = useSmartAccountClient({}); -const { - signTypedData, - signTypedDataAsync, - signedTypedData, - isSigningTypedData, - error, -} = useSignTypedData({ - client, - // these are optional - onSuccess: (result) => { - // do something on success - }, - onError: (error) => console.error(error), -}); - -const result = await signTypedData({ typedData }); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - [`UseSignTypedDataArgs`](../type-aliases/UseSignTypedDataArgs) - - The arguments for the hook, including client and mutation-related arguments. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignTypedData.ts#L24) -
- -## Returns - -[`UseSignTypedDataResult`](../type-aliases/UseSignTypedDataResult) - -An object containing methods and state related to the sign typed data mutation process. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignTypedData.ts#L28) diff --git a/docs/pages/reference/account-kit/react/src/functions/useSigner.mdx b/docs/pages/reference/account-kit/react/src/functions/useSigner.mdx deleted file mode 100644 index 485bebe705..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSigner.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: useSigner -description: Overview of the useSigner hook -slug: wallets/reference/account-kit/react/hooks/useSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSigner(override?): null | T; -``` - -Defined in: [account-kit/react/src/hooks/useSigner.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSigner.ts#L23) - -[Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSigner.ts) for accessing the current Alchemy signer within a React component. It uses a synchronous external store for updates. -This is a good use case if you want to use the signer as an EOA, giving you direct access to it. The signer returned from `useSigner` just does a `personal_sign` or `eth_signTypedData` without any additional logic, but a smart contract account might have additional logic for creating signatures for 1271 validation so `useSignMessage` or `useSignTypeData` instead. - -## Example - -```ts twoslash -import { useSigner } from "@account-kit/react"; -import type { AlchemyWebSigner } from "@account-kit/signer"; - -const signer: AlchemyWebSigner | null = useSigner(); -``` - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `override?` - - [`AlchemyAccountContextProps`](../type-aliases/AlchemyAccountContextProps) - - optional configuration to override the default context. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/AlchemyAccountContext.ts#L7) -
- -## Returns - -`null` | `T` - -The current Alchemy signer or null if none is available. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/signer/src/client/index.ts#L50) diff --git a/docs/pages/reference/account-kit/react/src/functions/useSignerStatus.mdx b/docs/pages/reference/account-kit/react/src/functions/useSignerStatus.mdx deleted file mode 100644 index 7722fe57bf..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSignerStatus.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: useSignerStatus -description: Overview of the useSignerStatus hook -slug: wallets/reference/account-kit/react/hooks/useSignerStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSignerStatus(override?): SignerStatus; -``` - -Defined in: [account-kit/react/src/hooks/useSignerStatus.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignerStatus.ts#L24) - -[Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSignerStatus.ts) to get the signer status, optionally using an override configuration, useful if you’re building your own login. - -## Example - -```ts twoslash -import { useSignerStatus } from "@account-kit/react"; - -const signerStatus = useSignerStatus(); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `override?` - - [`AlchemyAccountContextProps`](../type-aliases/AlchemyAccountContextProps) - - optional configuration to override the default context. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/AlchemyAccountContext.ts#L7) -
- -## Returns - -`SignerStatus` - -the current state of the signer. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/store/types.ts#L53) diff --git a/docs/pages/reference/account-kit/react/src/functions/useSmartAccountClient.mdx b/docs/pages/reference/account-kit/react/src/functions/useSmartAccountClient.mdx deleted file mode 100644 index 79e3ce7605..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSmartAccountClient.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: useSmartAccountClient -description: "[Hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSmartAccountClient.ts) that uses the provided smart account client parameters to create or retrieve an existing smart account client, handling different types of accounts including LightAccount, MultiOwnerLightAccount, and MultiOwnerModularAccount. Under the hood, Smart Account Client takes care of all the necessary middleware operations needed to populate a user operation such as gas estimation and paymaster data. If passing in an undefined client, Smart Account Client will treat the connected account as an EOA. If using with an EOA, Smart Account Client won’t throw an error, but the client itself will stay undefined forever. We recommend useBundlerClient instead when using an EOA. The EOA must also be connected or authenticated with a signer." -slug: wallets/reference/account-kit/react/hooks/useSmartAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSmartAccountClient( - args, -): UseSmartAccountClientResult< - TChain, - SupportedAccount ->; -``` - -Defined in: [account-kit/react/src/hooks/useSmartAccountClient.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSmartAccountClient.ts#L37) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `undefined` | `SupportedAccountTypes` - - `"ModularAccountV2"` -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - [`UseSmartAccountClientProps`](../type-aliases/UseSmartAccountClientProps)\<`TChain`, `TAccount`> -
- -## Returns - -[`UseSmartAccountClientResult`](../type-aliases/UseSmartAccountClientResult)\<`TChain`, `SupportedAccount`\<`TAccount` _extends_ `undefined` ? `"ModularAccountV2"` : `TAccount`>> - -An object containing the smart account client, the address, and a loading state. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useSmartAccountClient.ts#L24) diff --git a/docs/pages/reference/account-kit/react/src/functions/useSmartWalletClient.mdx b/docs/pages/reference/account-kit/react/src/functions/useSmartWalletClient.mdx deleted file mode 100644 index 2b0283007c..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSmartWalletClient.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: useSmartWalletClient -description: Overview of the useSmartWalletClient hook -slug: wallets/reference/account-kit/react/hooks/useSmartWalletClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSmartWalletClient( - params, -): GetSmartWalletClientResult; -``` - -Defined in: [account-kit/react/src/hooks/useSmartWalletClient.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSmartWalletClient.ts#L42) - -React hook that provides a Smart Wallet Client instance. -Returns undefined if an EOA wallet is connected via wagmi, as Smart Wallet Clients are only for smart accounts. -The hook automatically subscribes to changes in signer status and chain configuration. - -## Example - -```tsx twoslash -import { useSmartWalletClient } from "@account-kit/react"; - -function MyComponent() { - const client = useSmartWalletClient(); - - // With specific account address - const clientWithAccount = useSmartWalletClient({ - account: "0x1234...", - }); - - if (client) { - // Use the client for wallet operations - console.log("Smart Wallet Client ready:", client); - } - - return
...
; -} -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` | `` `0x${string}` `` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `GetSmartWalletClientParams`\<`TAccount`> - - Parameters for getting the smart wallet client, including optional account address -
- -## Returns - -`GetSmartWalletClientResult`\<`TAccount`> - -The Smart Wallet Client instance or undefined if an EOA is connected or client is unavailable diff --git a/docs/pages/reference/account-kit/react/src/functions/useSolanaConnection.mdx b/docs/pages/reference/account-kit/react/src/functions/useSolanaConnection.mdx deleted file mode 100644 index f48be674b7..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSolanaConnection.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: useSolanaConnection -description: Overview of the useSolanaConnection hook -slug: wallets/reference/account-kit/react/hooks/useSolanaConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSolanaConnection(opts): SolanaConnection; -``` - -Defined in: [account-kit/react/src/hooks/useSolanaConnection.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaConnection.ts#L39) - -This hook is used for establishing a connection to Solana and returns the connection object and the signer object. - -## Example - -```ts twoslash -import { useSolanaConnection } from "@account-kit/react"; - -const { connection } = useSolanaConnection(); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `SolanaConnectionHookParams` - - Options for the hook to get setup -
- -## Returns - -[`SolanaConnection`](../interfaces/SolanaConnection) - -The transaction hook. diff --git a/docs/pages/reference/account-kit/react/src/functions/useSolanaSignMessage.mdx b/docs/pages/reference/account-kit/react/src/functions/useSolanaSignMessage.mdx deleted file mode 100644 index f7471b4029..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSolanaSignMessage.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: useSolanaSignMessage -description: Overview of the useSolanaSignMessage hook -slug: wallets/reference/account-kit/react/hooks/useSolanaSignMessage -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSolanaSignMessage(opts): SolanaSignedMessage; -``` - -Defined in: [account-kit/react/src/hooks/useSolanaSignMessage.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaSignMessage.ts#L65) - -This is the hook that will be used to sign a message. It will prioritize external -connected Solana wallets, falling back to the internal signer when not connected. - -## Example - -```ts twoslash -import { useSolanaSignMessage } from "@account-kit/react"; - -const { - isPending: isSigningMessage, - mutate: signHello, - data: signature, - reset, -} = useSolanaSignMessage({}); - -signHello({ message: "Hello" }); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `UseSolanaSignMessageParams` - - Options for the hook to get setup. -
- -## Returns - -`SolanaSignedMessage` - -This should be hook mutations plus a few more. Used to get the end result of the signing and the callbacks. diff --git a/docs/pages/reference/account-kit/react/src/functions/useSolanaTransaction.mdx b/docs/pages/reference/account-kit/react/src/functions/useSolanaTransaction.mdx deleted file mode 100644 index 2f3c144e4d..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSolanaTransaction.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: useSolanaTransaction -description: Overview of the useSolanaTransaction hook -slug: wallets/reference/account-kit/react/hooks/useSolanaTransaction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSolanaTransaction(opts): SolanaTransaction; -``` - -Defined in: [account-kit/react/src/hooks/useSolanaTransaction.ts:124](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaTransaction.ts#L124) - -This is the hook that will be used to send a transaction. It will prioritize external -connected Solana wallets, falling back to the internal signer when not connected. -Supports sponsorship for both external wallets and internal signers. - -## Example - -```ts twoslash -import { useSolanaTransaction } from "@account-kit/react"; - -const { mutate } = useSolanaTransaction({ - policyId: "", -}); - -mutate({ - transfer: { - amount: 0, - toAddress: "", - }, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `SolanaTransactionHookParams` - - Options for the hook to get setup, The transaction is required. -
- -## Returns - -[`SolanaTransaction`](../interfaces/SolanaTransaction) - -The transaction hook. diff --git a/docs/pages/reference/account-kit/react/src/functions/useSolanaWallet.mdx b/docs/pages/reference/account-kit/react/src/functions/useSolanaWallet.mdx deleted file mode 100644 index 509580d19f..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useSolanaWallet.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: useSolanaWallet -description: Overview of the useSolanaWallet hook -slug: wallets/reference/account-kit/react/hooks/useSolanaWallet -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useSolanaWallet(): WalletContextState; -``` - -Defined in: [account-kit/react/src/hooks/useSolanaWallet.ts:83](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaWallet.ts#L83) - -A React hook that mirrors the behavior and return type of -`useWallet` from `@solana/wallet-adapter-react`, but safely degrades when -Solana is not enabled for your application. - -Context: - -- This repository is an external SDK that supports multiple chains. To avoid - forcing Solana dependencies on apps that do not use Solana, the Solana - wallet context is only considered "active" if Solana has been initialized - in the `AlchemyAccountProvider` configuration. -- If Solana is not initialized, this hook returns a stable, frozen - `EMPTY_WALLET_CONTEXT_STATE` instead of reading from `WalletContext`. This - prevents runtime errors when the Solana provider is not present and keeps - type-safe parity with `useWallet` consumers. - -Behavior: - -- When Solana is configured (i.e. adapters are provided or set to "detect"), - this hook returns the live `WalletContext` from - `@solana/wallet-adapter-react`. -- Otherwise, it returns `EMPTY_WALLET_CONTEXT_STATE` where actions such as - `signMessage`, `sendTransaction`, etc., will reject with - "Solana wallet not available". - -## Example - -```ts twoslash -import { useSolanaWallet } from "@account-kit/react"; - -const wallet = useSolanaWallet(); - -if (wallet.connected) { - // Safe to use wallet.publicKey, sendTransaction, etc. -} else { - // Solana not configured or not connected; UI can conditionally render. -} -``` - -## Returns - -`WalletContextState` - -The Solana wallet context when enabled; a -frozen, safe no-op context when Solana is not configured. diff --git a/docs/pages/reference/account-kit/react/src/functions/useUiConfig.mdx b/docs/pages/reference/account-kit/react/src/functions/useUiConfig.mdx deleted file mode 100644 index a0cbdad2e2..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useUiConfig.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: useUiConfig -description: A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx) for accessing UI configuration from the `UiConfigContext`. Allows optional selection of specific parts of the UI config state using a selector function. For editing and updating the underlying UI config on the fly. -slug: wallets/reference/account-kit/react/hooks/useUiConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useUiConfig(selector?): T; -``` - -Defined in: [account-kit/react/src/hooks/useUiConfig.tsx:63](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useUiConfig.tsx#L63) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `T` - - [`UiConfigStore`](../type-aliases/UiConfigStore) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `selector?` - - (`state`) => `T` - - An optional function to select specific parts of the UI config state. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUiConfig.tsx#L23) -
- -## Returns - -`T` - -- The selected state passed through the selector function or the entire state if no selector is provided diff --git a/docs/pages/reference/account-kit/react/src/functions/useUser.mdx b/docs/pages/reference/account-kit/react/src/functions/useUser.mdx deleted file mode 100644 index 9df9b81cd6..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useUser.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: useUser -description: Overview of the useUser hook -slug: wallets/reference/account-kit/react/hooks/useUser -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useUser(): UseUserResult; -``` - -Defined in: [account-kit/react/src/hooks/useUser.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useUser.ts#L29) - -A React [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUser.ts) that returns the current user information, either from an External Owned Account (EOA) or from the client store. It uses the Alchemy account context and synchronizes with external store updates. -The best way to check if user is logged in for both smart account contract users and EOA. - -If using smart contract account, returns address of the signer. If only using smart account contracts then you can use [useSignerStatus](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useSignerStatus#usesignerstatus) or [useAccount](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useAccount#useaccount) to see if the account is defined. - -## Example - -```ts twoslash -import { useUser } from "@account-kit/react"; -import type { User } from "@account-kit/signer"; -type UseUserResult = (User & { type: "eoa" | "sca" }) | null; - -const user = useUser(); -``` - -## Returns - -[`UseUserResult`](../type-aliases/UseUserResult) - -The user information, including address, orgId, userId, and type. If the user is not connected, it returns null. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useUser.ts#L9) diff --git a/docs/pages/reference/account-kit/react/src/functions/useWaitForCallsStatus.mdx b/docs/pages/reference/account-kit/react/src/functions/useWaitForCallsStatus.mdx deleted file mode 100644 index a05ea929db..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useWaitForCallsStatus.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: useWaitForCallsStatus -description: Overview of the useWaitForCallsStatus hook -slug: wallets/reference/account-kit/react/hooks/useWaitForCallsStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useWaitForCallsStatus(params): UseWaitForCallsStatusResult; -``` - -Defined in: [account-kit/react/src/hooks/useWaitForCallsStatus.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useWaitForCallsStatus.ts#L46) - -Hook to wait for calls status to be confirmed. -It will poll until the calls reach the desired status or until a timeout occurs. - -## Example - -```tsx twoslash -import { useWaitForCallsStatus } from "@account-kit/react"; - -function MyComponent() { - const { - data: result, - isLoading, - error, - } = useWaitForCallsStatus({ - client: smartWalletClient, - id: "0x1234...", // The call ID from sendPreparedCalls - timeout: 30_000, // 30 second timeout - }); -} -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`UseWaitForCallsStatusParams`](../interfaces/UseWaitForCallsStatusParams) - - Parameters for the hook -
- -## Returns - -[`UseWaitForCallsStatusResult`](../type-aliases/UseWaitForCallsStatusResult) - -Query result containing the final status diff --git a/docs/pages/reference/account-kit/react/src/functions/useWaitForUserOperationTransaction.mdx b/docs/pages/reference/account-kit/react/src/functions/useWaitForUserOperationTransaction.mdx deleted file mode 100644 index 8b188e0b5d..0000000000 --- a/docs/pages/reference/account-kit/react/src/functions/useWaitForUserOperationTransaction.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: useWaitForUserOperationTransaction -description: Overview of the useWaitForUserOperationTransaction hook -slug: wallets/reference/account-kit/react/hooks/useWaitForUserOperationTransaction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function useWaitForUserOperationTransaction( - config, -): UseWaitForUserOperationTransactionResult; -``` - -Defined in: [account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts:63](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L63) - -Custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts) to wait for a user operation transaction and manage its state (pending, error, result). - -## Example - -```ts twoslash -import { - useWaitForUserOperationTransaction, - useSmartAccountClient, -} from "@account-kit/react"; - -const { client } = useSmartAccountClient({}); -const { - waitForUserOperationTransaction, - waitForUserOperationTransactionResult, - isWaitingForUserOperationTransaction, - error, -} = useWaitForUserOperationTransaction({ - client, - // these are optional - onSuccess: (result) => { - // do something on success - }, - onError: (error) => console.error(error), -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`UseWaitForUserOperationTransactionArgs`](../type-aliases/UseWaitForUserOperationTransactionArgs) - - Configuration object containing the client. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L15) -
- -## Returns - -[`UseWaitForUserOperationTransactionResult`](../type-aliases/UseWaitForUserOperationTransactionResult) - -An object containing methods and state related to waiting for a user operation transaction. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L19) diff --git a/docs/pages/reference/account-kit/react/src/interfaces/ConfigForExternalWalletsParams.mdx b/docs/pages/reference/account-kit/react/src/interfaces/ConfigForExternalWalletsParams.mdx deleted file mode 100644 index 87cda31051..0000000000 --- a/docs/pages/reference/account-kit/react/src/interfaces/ConfigForExternalWalletsParams.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: ConfigForExternalWalletsParams -description: Overview of the ConfigForExternalWalletsParams interface -slug: wallets/reference/account-kit/react/interfaces/ConfigForExternalWalletsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/react/src/configForExternalWallets.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/configForExternalWallets.ts#L8) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `chainType` - - [`ChainType`](../type-aliases/ChainType)\[] -
- `hideMoreButton?` - - `boolean` -
- `moreButtonText?` - - `string` -
- `numFeaturedWallets?` - - `number` -
- `walletConnectProjectId?` - - `string` -
- `wallets` - - `string`\[] -
diff --git a/docs/pages/reference/account-kit/react/src/interfaces/SendVerificationCodeParams.mdx b/docs/pages/reference/account-kit/react/src/interfaces/SendVerificationCodeParams.mdx deleted file mode 100644 index 88356f2779..0000000000 --- a/docs/pages/reference/account-kit/react/src/interfaces/SendVerificationCodeParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: SendVerificationCodeParams -description: Overview of the SendVerificationCodeParams interface -slug: wallets/reference/account-kit/react/interfaces/SendVerificationCodeParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/react/src/hooks/useSendVerificationCode.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendVerificationCode.ts#L13) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `contact` - - `string` -
- `type` - - `"email"` | `"sms"` -
diff --git a/docs/pages/reference/account-kit/react/src/interfaces/SolanaConnection.mdx b/docs/pages/reference/account-kit/react/src/interfaces/SolanaConnection.mdx deleted file mode 100644 index f99a636c20..0000000000 --- a/docs/pages/reference/account-kit/react/src/interfaces/SolanaConnection.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: SolanaConnection -description: Returned from the solana connection. -slug: wallets/reference/account-kit/react/interfaces/SolanaConnection -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/react/src/hooks/useSolanaConnection.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaConnection.ts#L13) - -Returned from the solana connection. - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `connection` - - `null` | `Connection` - - The solana connection used to send the transaction -
- `signer` - - `null` | `SolanaSigner` - - The solana signer used to send the transaction -
diff --git a/docs/pages/reference/account-kit/react/src/interfaces/SolanaTransaction.mdx b/docs/pages/reference/account-kit/react/src/interfaces/SolanaTransaction.mdx deleted file mode 100644 index 257030c56c..0000000000 --- a/docs/pages/reference/account-kit/react/src/interfaces/SolanaTransaction.mdx +++ /dev/null @@ -1,203 +0,0 @@ ---- -title: SolanaTransaction -description: We wanted to make sure that this will be using the same useMutation that the useSendUserOperation does. We are going to flatten it to make sure that we are abstracting it, and that we have the flattened version here for readability. -slug: wallets/reference/account-kit/react/interfaces/SolanaTransaction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/react/src/hooks/useSolanaTransaction.ts:64](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaTransaction.ts#L64) - -We wanted to make sure that this will be using the same useMutation that the -useSendUserOperation does. -We are going to flatten it to make sure that we are abstracting it, and that we have -the flattened version here for readability. - -## See - -- [useSendUserOperation](../functions/useSendUserOperation) -- [TanStack Query useMutation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `connection` - - `null` | `Connection` - - The solana connection used to send the transaction -
- `data` - - | `void` | \{ `hash`: `string`; } - - The result of the transaction -
- `error` - - `null` | `Error` - - The error that occurred -
- `isPending` - - `boolean` - - Is the use sending a transaction -
- `signer` - - `null` | `SolanaSigner` - - The solana signer used to send the transaction -
- -## Methods - -### reset() - -```ts -reset(): void; -``` - -Defined in: [account-kit/react/src/hooks/useSolanaTransaction.ts:75](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaTransaction.ts#L75) - -#### Returns - -`void` - ---- - -### sendTransaction() - -```ts -sendTransaction(params): void; -``` - -Defined in: [account-kit/react/src/hooks/useSolanaTransaction.ts:77](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaTransaction.ts#L77) - -Send the transaction - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `SolanaTransactionParams` -
- -#### Returns - -`void` - ---- - -### sendTransactionAsync() - -```ts -sendTransactionAsync(params): Promise<{ - hash: string; -}>; -``` - -Defined in: [account-kit/react/src/hooks/useSolanaTransaction.ts:79](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSolanaTransaction.ts#L79) - -Send the transaction asynchronously - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `SolanaTransactionParams` -
- -#### Returns - -`Promise`\<\{ -`hash`: `string`; -}> diff --git a/docs/pages/reference/account-kit/react/src/interfaces/UseChainResult.mdx b/docs/pages/reference/account-kit/react/src/interfaces/UseChainResult.mdx deleted file mode 100644 index 99b59aa136..0000000000 --- a/docs/pages/reference/account-kit/react/src/interfaces/UseChainResult.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: UseChainResult -description: Overview of the UseChainResult interface -slug: wallets/reference/account-kit/react/interfaces/UseChainResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/react/src/hooks/useChain.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useChain.ts#L16) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `chain` - - [`Chain`](https://viem.sh) -
- `isSettingChain` - - `boolean` -
- `setChain` - - (`params`) => `void` -
diff --git a/docs/pages/reference/account-kit/react/src/interfaces/UseWaitForCallsStatusParams.mdx b/docs/pages/reference/account-kit/react/src/interfaces/UseWaitForCallsStatusParams.mdx deleted file mode 100644 index e5e0ba53ad..0000000000 --- a/docs/pages/reference/account-kit/react/src/interfaces/UseWaitForCallsStatusParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: UseWaitForCallsStatusParams -description: Overview of the UseWaitForCallsStatusParams interface -slug: wallets/reference/account-kit/react/interfaces/UseWaitForCallsStatusParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/react/src/hooks/useWaitForCallsStatus.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useWaitForCallsStatus.ts#L14) - -## Extends - -- `Omit`\<[`WaitForCallsStatusParameters`](https://viem.sh), `"id"`> - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - | `undefined` | `AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `SupportedAccounts`, | \{ } | `LightAccountClientActions`\<`AlchemySigner`> | `ExecutionActions`\<`MultiOwnerModularAccount`\<`AlchemySigner`>, `undefined`, keyof EntryPointRegistryBase\> & `ManagementActions`\<`MultiOwnerModularAccount`\<`AlchemySigner`>, `undefined`, keyof EntryPointRegistryBase\> & `ReadAndEncodeActions`\<`MultiOwnerModularAccount`\<`AlchemySigner`>> & `object` & `object` & `PluginManagerActions`\<`MultiOwnerModularAccount`\<`AlchemySigner`>> & `AccountLoupeActions`\<`MultiOwnerModularAccount`\<`AlchemySigner`>> | `MultiOwnerLightAccountClientActions`\<`AlchemySigner`>> -
- `id` - - `undefined` | `` `0x${string}` `` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountContextProps.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountContextProps.mdx deleted file mode 100644 index 26dda2b272..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountContextProps.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: AlchemyAccountContextProps -description: Overview of AlchemyAccountContextProps -slug: wallets/reference/account-kit/react/type-aliases/AlchemyAccountContextProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyAccountContextProps = object; -``` - -Defined in: [account-kit/react/src/AlchemyAccountContext.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/AlchemyAccountContext.ts#L7) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `config` - - `AlchemyAccountsConfig` -
- `queryClient` - - `QueryClient` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsConfigWithUI.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsConfigWithUI.mdx deleted file mode 100644 index 87e9cd63a0..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsConfigWithUI.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: AlchemyAccountsConfigWithUI -description: Overview of AlchemyAccountsConfigWithUI -slug: wallets/reference/account-kit/react/type-aliases/AlchemyAccountsConfigWithUI -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyAccountsConfigWithUI = AlchemyAccountsConfig & object; -``` - -Defined in: [account-kit/react/src/createConfig.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/createConfig.ts#L13) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `ui?` - - `AlchemyAccountsUIConfig` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsProviderProps.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsProviderProps.mdx deleted file mode 100644 index 712a18cfd9..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsProviderProps.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: AlchemyAccountsProviderProps -description: Overview of AlchemyAccountsProviderProps -slug: wallets/reference/account-kit/react/type-aliases/AlchemyAccountsProviderProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyAccountsProviderProps = object; -``` - -Defined in: [account-kit/react/src/AlchemyAccountProvider.tsx:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/AlchemyAccountProvider.tsx#L18) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `config` - - [`AlchemyAccountsConfigWithUI`](AlchemyAccountsConfigWithUI) -
- `initialState?` - - `AlchemyClientState` -
- `queryClient` - - `QueryClient` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsUIConfig.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsUIConfig.mdx deleted file mode 100644 index 35500ddac7..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/AlchemyAccountsUIConfig.mdx +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: AlchemyAccountsUIConfig -description: Overview of AlchemyAccountsUIConfig -slug: wallets/reference/account-kit/react/type-aliases/AlchemyAccountsUIConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyAccountsUIConfig = object; -``` - -Defined in: [account-kit/react/src/types.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/types.ts#L5) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `auth?` - - `object` - - ‐ -
- `auth.addPasskeyOnSignup?` - - `boolean` - - If this is true, then auth components will prompt users to add - a passkey after signing in for the first time -
- `auth.header?` - - `ReactNode` - - ‐ -
- `auth.hideError?` - - `boolean` - - If hideError is true, then the auth component will not - render the global error component -
- `auth.hideSignInText?` - - `boolean` - - Whether to show the "Sign in" header text in the first auth step -
- `auth.onAuthSuccess?` - - () => `void` - - ‐ -
- `auth.sections` - - [`AuthType`](AuthType)\[]\[] - - Each section can contain multiple auth types which will be grouped together - and separated by an OR divider -
- `illustrationStyle?` - - `"outline"` | `"linear"` | `"filled"` | `"flat"` - - ‐ -
- `modalBaseClassName?` - - `string` - - This class name will be applied to any modals that are rendered -
- `supportUrl?` - - `string` - - This is the URL that will be used to link to the support page -
- `uiMode?` - - `"modal"` | `"embedded"` - - Set to "embedded" if the auth component will be rendered within a parent - component in your UI. The default "modal" should be used if the auth component will be rendered in a modal overlay. -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/AuthType.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/AuthType.mdx deleted file mode 100644 index 19b6a6313f..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/AuthType.mdx +++ /dev/null @@ -1,299 +0,0 @@ ---- -title: AuthType -description: Overview of AuthType -slug: wallets/reference/account-kit/react/type-aliases/AuthType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AuthType = - | { - buttonLabel?: string; - emailMode?: "magicLink" | "otp"; - hideButton?: boolean; - placeholder?: string; - type: "email"; -} - | { - type: "passkey"; -} - | { - chainType?: ChainType[]; - hideMoreButton?: boolean; - moreButtonText?: string; - numFeaturedWallets?: number; - type: "external_wallets"; - walletConnect?: WalletConnectParameters; - walletConnectProjectId?: string; - wallets?: string[]; -} - | object & - | { - auth0Connection?: string; - authProviderId: "auth0"; - displayName: string; - isCustomProvider?: false; - logoUrl: string; - logoUrlDark?: string; -} - | { - auth0Connection?: never; - authProviderId: KnownAuthProvider; - displayName?: never; - isCustomProvider?: false; - logoUrl?: never; - logoUrlDark?: never; -} & OauthRedirectConfig; -``` - -Defined in: [account-kit/react/src/components/auth/types.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/components/auth/types.ts#L11) - -## Type Declaration - -```ts -{ - buttonLabel?: string; - emailMode?: "magicLink" | "otp"; - hideButton?: boolean; - placeholder?: string; - type: "email"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
- `buttonLabel?` - - `string` - - ‐ -
- `emailMode?` - - `"magicLink"` | `"otp"` - - **Deprecated** - - This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. -
- `hideButton?` - - `boolean` - - ‐ -
- `placeholder?` - - `string` - - ‐ -
- `type` - - `"email"` - - ‐ -
- -```ts -{ - type: "passkey"; -} -``` - - - - - - - - - - - - - - - - - -
NameType
- `type` - - `"passkey"` -
- -```ts -{ - chainType?: ChainType[]; - hideMoreButton?: boolean; - moreButtonText?: string; - numFeaturedWallets?: number; - type: "external_wallets"; - walletConnect?: WalletConnectParameters; - walletConnectProjectId?: string; - wallets?: string[]; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `chainType?` - - [`ChainType`](ChainType)\[] -
- `hideMoreButton?` - - `boolean` -
- `moreButtonText?` - - `string` -
- `numFeaturedWallets?` - - `number` -
- `type` - - `"external_wallets"` -
- `walletConnect?` - - `WalletConnectParameters` -
- `walletConnectProjectId?` - - `string` -
- `wallets?` - - `string`\[] -
- -`object` & -| \{ -`auth0Connection?`: `string`; -`authProviderId`: `"auth0"`; -`displayName`: `string`; -`isCustomProvider?`: `false`; -`logoUrl`: `string`; -`logoUrlDark?`: `string`; -} -| \{ -`auth0Connection?`: `never`; -`authProviderId`: `KnownAuthProvider`; -`displayName?`: `never`; -`isCustomProvider?`: `false`; -`logoUrl?`: `never`; -`logoUrlDark?`: `never`; -} & `OauthRedirectConfig` diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/ChainType.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/ChainType.mdx deleted file mode 100644 index ff427f33bd..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/ChainType.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ChainType -description: Overview of ChainType -slug: wallets/reference/account-kit/react/type-aliases/ChainType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ChainType = "evm" | "svm"; -``` - -Defined in: [account-kit/react/src/configForExternalWallets.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/configForExternalWallets.ts#L6) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/ClientActionParameters.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/ClientActionParameters.mdx deleted file mode 100644 index 781b5160fe..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/ClientActionParameters.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: ClientActionParameters -description: Overview of ClientActionParameters -slug: wallets/reference/account-kit/react/type-aliases/ClientActionParameters -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ClientActionParameters = object; -``` - -Defined in: [account-kit/react/src/hooks/useClientActions.ts:63](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useClientActions.ts#L63) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TActions` *extends* `object` - - `object` -
- `TFunctionName` *extends* [`ExecutableFunctionName`](ExecutableFunctionName)\<`TActions`> - - [`ExecutableFunctionName`](ExecutableFunctionName)\<`TActions`> -
- `allArgs` - - [`ExecutableFunctionArgs`](ExecutableFunctionArgs)\<`TActions`, `TFunctionName` *extends* [`ExecutableFunctionName`](ExecutableFunctionName)\<`TActions`> ? `TFunctionName` : [`ExecutableFunctionName`](ExecutableFunctionName)\<`TActions`>> -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `args` - - `allArgs` -
- `functionName` - - `TFunctionName` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/ConnectedUser.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/ConnectedUser.mdx deleted file mode 100644 index 54315811b2..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/ConnectedUser.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: ConnectedUser -description: Overview of ConnectedUser -slug: wallets/reference/account-kit/react/type-aliases/ConnectedUser -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ConnectedUser = Omit & object; -``` - -Defined in: [account-kit/react/src/hooks/useConnectedUser.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useConnectedUser.ts#L11) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `address?` - - [`Address`](https://abitype.dev) -
- `orgId?` - - `string` -
- `userId?` - - `string` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionArgs.mdx deleted file mode 100644 index 211332c60a..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionArgs.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: ExecutableFunctionArgs -description: Overview of ExecutableFunctionArgs -slug: wallets/reference/account-kit/react/type-aliases/ExecutableFunctionArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExecutableFunctionArgs = Parameters< - TActions[TFunctionName] ->; -``` - -Defined in: [account-kit/react/src/hooks/useClientActions.ts:54](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useClientActions.ts#L54) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TActions` *extends* `object` - - `object` -
- `TFunctionName` *extends* [`ExecutableFunctionName`](ExecutableFunctionName)\<`TActions`> - - [`ExecutableFunctionName`](ExecutableFunctionName)\<`TActions`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionName.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionName.mdx deleted file mode 100644 index dbbe75f3b8..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/ExecutableFunctionName.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: ExecutableFunctionName -description: Overview of ExecutableFunctionName -slug: wallets/reference/account-kit/react/type-aliases/ExecutableFunctionName -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExecutableFunctionName = - keyof TActions extends infer functionName - ? [functionName] extends [never] - ? string - : functionName - : string; -``` - -Defined in: [account-kit/react/src/hooks/useClientActions.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useClientActions.ts#L37) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TActions` *extends* `object` - - `object` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/ExecuteableFunctionResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/ExecuteableFunctionResult.mdx deleted file mode 100644 index 009cc51d8c..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/ExecuteableFunctionResult.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: ExecuteableFunctionResult -description: Overview of ExecuteableFunctionResult -slug: wallets/reference/account-kit/react/type-aliases/ExecuteableFunctionResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExecuteableFunctionResult = ReturnType< - TActions[TFunctionName] ->; -``` - -Defined in: [account-kit/react/src/hooks/useClientActions.ts:47](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useClientActions.ts#L47) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TFunctionName` *extends* [`ExecutableFunctionName`](ExecutableFunctionName)\<`TActions`> - - ‐ -
- `TActions` *extends* `object` - - `object` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/ExportAccountComponentProps.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/ExportAccountComponentProps.mdx deleted file mode 100644 index 4c02343a73..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/ExportAccountComponentProps.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: ExportAccountComponentProps -description: Props for the `ExportAccountComponent` component. This component is returned from the `useExportAccount` hook and should be rendered in the parent component to display the account recovery details in an iframe. iframeCss [optional] - CSS to apply to the iframe. className [optional] - Class name to apply to the container div. isExported - Whether the account has been exported. -slug: wallets/reference/account-kit/react/type-aliases/ExportAccountComponentProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExportAccountComponentProps = object; -``` - -Defined in: [account-kit/react/src/hooks/useExportAccount.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useExportAccount.ts#L30) - -Props for the `ExportAccountComponent` component. This component is -returned from the `useExportAccount` hook and should be rendered in the -parent component to display the account recovery details in an iframe. - -iframeCss \[optional] - CSS to apply to the iframe. - -className \[optional] - Class name to apply to the container div. - -isExported - Whether the account has been exported. - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `className?` - - `string` -
- `iframeCss?` - - `CSSProperties` -
- `isExported` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/SendUserOperationWithEOA.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/SendUserOperationWithEOA.mdx deleted file mode 100644 index 22c3f08b53..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/SendUserOperationWithEOA.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: SendUserOperationWithEOA -description: Overview of SendUserOperationWithEOA -slug: wallets/reference/account-kit/react/type-aliases/SendUserOperationWithEOA -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendUserOperationWithEOA = - | SendUserOperationResult - | { - hash: Hex; - request?: never; - }; -``` - -Defined in: [account-kit/react/src/hooks/useSendUserOperation.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendUserOperation.ts#L29) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TEntryPointVersion` *extends* `EntryPointVersion` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/SetEmailParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/SetEmailParams.mdx deleted file mode 100644 index 1751f499d2..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/SetEmailParams.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: SetEmailParams -description: Overview of SetEmailParams -slug: wallets/reference/account-kit/react/type-aliases/SetEmailParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SetEmailParams = - | string - | { - verificationCode: string; - }; -``` - -Defined in: [account-kit/react/src/hooks/useSetEmail.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSetEmail.ts#L16) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/SignMessageArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/SignMessageArgs.mdx deleted file mode 100644 index a54f64aa88..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/SignMessageArgs.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: SignMessageArgs -description: Overview of SignMessageArgs -slug: wallets/reference/account-kit/react/type-aliases/SignMessageArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignMessageArgs = object; -``` - -Defined in: [account-kit/react/src/hooks/useSignMessage.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignMessage.ts#L18) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `message` - - [`SignableMessage`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/SignTypedDataArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/SignTypedDataArgs.mdx deleted file mode 100644 index 633152db4c..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/SignTypedDataArgs.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: SignTypedDataArgs -description: Overview of SignTypedDataArgs -slug: wallets/reference/account-kit/react/type-aliases/SignTypedDataArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignTypedDataArgs = object; -``` - -Defined in: [account-kit/react/src/hooks/useSignTypedData.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignTypedData.ts#L17) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `typedData` - - [`TypedDataDefinition`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UiConfigStore.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UiConfigStore.mdx deleted file mode 100644 index 9e93e83eb8..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UiConfigStore.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: UiConfigStore -description: Overview of UiConfigStore -slug: wallets/reference/account-kit/react/type-aliases/UiConfigStore -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UiConfigStore = AlchemyAccountsUIConfig & object; -``` - -Defined in: [account-kit/react/src/hooks/useUiConfig.tsx:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useUiConfig.tsx#L23) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `isModalOpen` - - `boolean` -
- `setModalOpen()` - - (`isOpen`) => `void` -
- `updateConfig()` - - (`config`) => `void` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountMutationArgs.mdx deleted file mode 100644 index e167b82ae6..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountMutationArgs.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: UseAccountMutationArgs -description: Overview of UseAccountMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseAccountMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAccountMutationArgs = BaseHookMutationArgs< - SupportedAccount | SupportedAccounts, - void ->; -``` - -Defined in: [account-kit/react/src/hooks/useAccount.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAccount.ts#L19) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* `SupportedAccountTypes` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountProps.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountProps.mdx deleted file mode 100644 index a4a707005d..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountProps.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: UseAccountProps -description: Overview of UseAccountProps -slug: wallets/reference/account-kit/react/type-aliases/UseAccountProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAccountProps = GetAccountParams & - object & - UseAccountMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useAccount.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAccount.ts#L28) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `skipCreate?` - - `boolean` -
- -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* `SupportedAccountTypes` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountResult.mdx deleted file mode 100644 index 9960c9caa5..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAccountResult.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: UseAccountResult -description: Overview of UseAccountResult -slug: wallets/reference/account-kit/react/type-aliases/UseAccountResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAccountResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useAccount.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAccount.ts#L22) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* `SupportedAccountTypes` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `account?` - - `SupportedAccount`\<`TAccount`> -
- `address?` - - [`Address`](https://abitype.dev) -
- `isLoadingAccount` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderMutationArgs.mdx deleted file mode 100644 index b258222ccb..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderMutationArgs.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: UseAddOauthProviderMutationArgs -description: Overview of UseAddOauthProviderMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseAddOauthProviderMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAddOauthProviderMutationArgs = BaseHookMutationArgs< - OauthProviderInfo, - Omit< - Extract< - AuthParams, - { - type: "oauth"; - } - >, - "type" - > ->; -``` - -Defined in: [account-kit/react/src/hooks/useAddOauthProvider.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAddOauthProvider.ts#L20) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderResult.mdx deleted file mode 100644 index 43996500d8..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddOauthProviderResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseAddOauthProviderResult -description: Overview of UseAddOauthProviderResult -slug: wallets/reference/account-kit/react/type-aliases/UseAddOauthProviderResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAddOauthProviderResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useAddOauthProvider.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAddOauthProvider.ts#L25) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `addOauthProvider` - - `UseMutateFunction`\<`OauthProviderInfo`, `Error`, `Omit`\<`Extract`\<`AuthParams`, \{ `type`: `"oauth"`; }>, `"type"`>, `unknown`> -
- `addOauthProviderAsync` - - `UseMutateAsyncFunction`\<`OauthProviderInfo`, `Error`, `Omit`\<`Extract`\<`AuthParams`, \{ `type`: `"oauth"`; }>, `"type"`>, `unknown`> -
- `error` - - `Error` | `null` -
- `isAddingOauthProvider` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyMutationArgs.mdx deleted file mode 100644 index a571929b3b..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyMutationArgs.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: UseAddPasskeyMutationArgs -description: Overview of UseAddPasskeyMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseAddPasskeyMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAddPasskeyMutationArgs = BaseHookMutationArgs< - string[], - CredentialCreationOptions | undefined | void ->; -``` - -Defined in: [account-kit/react/src/hooks/useAddPasskey.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAddPasskey.ts#L15) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyResult.mdx deleted file mode 100644 index 89a3b70ab9..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAddPasskeyResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseAddPasskeyResult -description: Overview of UseAddPasskeyResult -slug: wallets/reference/account-kit/react/type-aliases/UseAddPasskeyResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAddPasskeyResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useAddPasskey.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAddPasskey.ts#L20) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `addPasskey` - - `UseMutateFunction`\<`string`\[], `Error`, `CredentialCreationOptions` | `undefined` | `void`, `unknown`> -
- `addPasskeyAsync` - - `UseMutateAsyncFunction`\<`string`\[], `Error`, `CredentialCreationOptions` | `undefined` | `void`, `unknown`> -
- `error` - - `Error` | `null` -
- `isAddingPasskey` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthErrorResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthErrorResult.mdx deleted file mode 100644 index 7d996dd410..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthErrorResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseAuthErrorResult -description: Overview of UseAuthErrorResult -slug: wallets/reference/account-kit/react/type-aliases/UseAuthErrorResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAuthErrorResult = Error | undefined; -``` - -Defined in: [account-kit/react/src/hooks/useAuthError.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAuthError.ts#L3) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateMutationArgs.mdx deleted file mode 100644 index 457ee7d8f9..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateMutationArgs.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseAuthenticateMutationArgs -description: Overview of UseAuthenticateMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseAuthenticateMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAuthenticateMutationArgs = BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useAuthenticate.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAuthenticate.ts#L15) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateResult.mdx deleted file mode 100644 index 3ec273145a..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseAuthenticateResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseAuthenticateResult -description: Overview of UseAuthenticateResult -slug: wallets/reference/account-kit/react/type-aliases/UseAuthenticateResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseAuthenticateResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useAuthenticate.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useAuthenticate.ts#L20) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `authenticate` - - `UseMutateFunction`\<[`User`](../../../signer/src/type-aliases/User), `Error`, `AuthParams`, `unknown`> -
- `authenticateAsync` - - `UseMutateAsyncFunction`\<[`User`](../../../signer/src/type-aliases/User), `Error`, `AuthParams`, `unknown`> -
- `error` - - `Error` | `null` -
- `isPending` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseBundlerClientResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseBundlerClientResult.mdx deleted file mode 100644 index 629cdb4480..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseBundlerClientResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseBundlerClientResult -description: Overview of UseBundlerClientResult -slug: wallets/reference/account-kit/react/type-aliases/UseBundlerClientResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseBundlerClientResult = ClientWithAlchemyMethods; -``` - -Defined in: [account-kit/react/src/hooks/useBundlerClient.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useBundlerClient.ts#L8) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusParams.mdx deleted file mode 100644 index 1feb94818d..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusParams.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: UseCallsStatusParams -description: Overview of UseCallsStatusParams -slug: wallets/reference/account-kit/react/type-aliases/UseCallsStatusParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseCallsStatusParams = object; -``` - -Defined in: [account-kit/react/src/hooks/useCallsStatus.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useCallsStatus.ts#L17) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `callId` - - [`Hex`](https://viem.sh) | `undefined` -
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] | `undefined` -
- `queryOptions?` - - `Omit`\<`UseQueryOptions`\<`QueryResult`>, `"queryKey"` | `"queryFn"`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusResult.mdx deleted file mode 100644 index 3fbcb45b22..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseCallsStatusResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseCallsStatusResult -description: Overview of UseCallsStatusResult -slug: wallets/reference/account-kit/react/type-aliases/UseCallsStatusResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseCallsStatusResult = UseQueryResult; -``` - -Defined in: [account-kit/react/src/hooks/useCallsStatus.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useCallsStatus.ts#L25) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseChainParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseChainParams.mdx deleted file mode 100644 index 30e6ff86e9..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseChainParams.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: UseChainParams -description: Overview of UseChainParams -slug: wallets/reference/account-kit/react/type-aliases/UseChainParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseChainParams = BaseHookMutationArgs< - void, - { - chain: Chain; - } ->; -``` - -Defined in: [account-kit/react/src/hooks/useChain.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useChain.ts#L14) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseClientActionsProps.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseClientActionsProps.mdx deleted file mode 100644 index e7769dc7e6..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseClientActionsProps.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: UseClientActionsProps -description: Overview of UseClientActionsProps -slug: wallets/reference/account-kit/react/type-aliases/UseClientActionsProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseClientActionsProps = object; -``` - -Defined in: [account-kit/react/src/hooks/useClientActions.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useClientActions.ts#L10) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TActions` *extends* `object` - - `object` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `actions` - - (`client`) => `TActions` -
- `client?` - - `UseSmartAccountClientResult`\<`TChain`, `SupportedAccounts`>\[`"client"`] -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseClientActionsResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseClientActionsResult.mdx deleted file mode 100644 index 92e56bc05c..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseClientActionsResult.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: UseClientActionsResult -description: Overview of UseClientActionsResult -slug: wallets/reference/account-kit/react/type-aliases/UseClientActionsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseClientActionsResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useClientActions.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useClientActions.ts#L21) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TActions` *extends* `object` - - `object` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `data` - - `ReturnType`\<`TActions`\[keyof `TActions`]> | `undefined` -
- `error?` - - `Error` | `null` -
- `executeAction` - - \<`TFunctionName`>(`params`) => `void` -
- `executeActionAsync` - - \<`TFunctionName`>(`params`) => `Promise`\<[`ExecuteableFunctionResult`](ExecuteableFunctionResult)\<`TFunctionName`>> -
- `isExecutingAction` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseConnectedUserResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseConnectedUserResult.mdx deleted file mode 100644 index b2a1cac077..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseConnectedUserResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseConnectedUserResult -description: Overview of UseConnectedUserResult -slug: wallets/reference/account-kit/react/type-aliases/UseConnectedUserResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseConnectedUserResult = (ConnectedUser & object) | null; -``` - -Defined in: [account-kit/react/src/hooks/useConnectedUser.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useConnectedUser.ts#L16) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationArgs.mdx deleted file mode 100644 index f977e4d72f..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationArgs.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: UseDropAndReplaceUserOperationArgs -description: Overview of UseDropAndReplaceUserOperationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseDropAndReplaceUserOperationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseDropAndReplaceUserOperationArgs = object & - UseDropAndReplaceUserOperationMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L23) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] - | `undefined` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationMutationArgs.mdx deleted file mode 100644 index 943ede5429..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationMutationArgs.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: UseDropAndReplaceUserOperationMutationArgs -description: Overview of UseDropAndReplaceUserOperationMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseDropAndReplaceUserOperationMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseDropAndReplaceUserOperationMutationArgs = - BaseHookMutationArgs< - SendUserOperationResult, - DropAndReplaceUserOperationParameters - >; -``` - -Defined in: [account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L15) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationResult.mdx deleted file mode 100644 index b250c70f7e..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseDropAndReplaceUserOperationResult.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: UseDropAndReplaceUserOperationResult -description: Overview of UseDropAndReplaceUserOperationResult -slug: wallets/reference/account-kit/react/type-aliases/UseDropAndReplaceUserOperationResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseDropAndReplaceUserOperationResult = - object; -``` - -Defined in: [account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useDropAndReplaceUserOperation.ts#L30) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `dropAndReplaceUserOperation` - - `UseMutateFunction`\<`SendUserOperationResult`\<`TEntryPointVersion`>, `Error`, `DropAndReplaceUserOperationParameters`\<`TAccount`>, `unknown`> -
- `dropAndReplaceUserOperationResult` - - `SendUserOperationResult`\<`TEntryPointVersion`> | `undefined` -
- `error` - - `Error` | `null` -
- `isDroppingAndReplacingUserOperation` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseExportAccountMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseExportAccountMutationArgs.mdx deleted file mode 100644 index 9aed6f9e75..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseExportAccountMutationArgs.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: UseExportAccountMutationArgs -description: Overview of UseExportAccountMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseExportAccountMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseExportAccountMutationArgs = object & - BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useExportAccount.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useExportAccount.ts#L15) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `params?` - - `ExportAccountParams` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseExportAccountResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseExportAccountResult.mdx deleted file mode 100644 index 6d2372837c..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseExportAccountResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UseExportAccountResult -description: Overview of UseExportAccountResult -slug: wallets/reference/account-kit/react/type-aliases/UseExportAccountResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseExportAccountResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useExportAccount.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useExportAccount.ts#L36) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `exportAccount` - - `UseMutateFunction`\<`ExportWalletOutput`, `Error`, `void`, `unknown`> -
- `ExportAccountComponent` - - (`props`) => `JSX.Element` -
- `isExported` - - `boolean` -
- `isExporting` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsParams.mdx deleted file mode 100644 index d5e69b4c59..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: UseGrantPermissionsParams -description: Overview of UseGrantPermissionsParams -slug: wallets/reference/account-kit/react/type-aliases/UseGrantPermissionsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseGrantPermissionsParams = object; -``` - -Defined in: [account-kit/react/src/hooks/useGrantPermissions.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useGrantPermissions.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsResult.mdx deleted file mode 100644 index 549e0a66fc..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseGrantPermissionsResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UseGrantPermissionsResult -description: Overview of UseGrantPermissionsResult -slug: wallets/reference/account-kit/react/type-aliases/UseGrantPermissionsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseGrantPermissionsResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useGrantPermissions.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useGrantPermissions.ts#L36) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `grantPermissions` - - `UseMutateFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `grantPermissionsAsync` - - `UseMutateAsyncFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `grantPermissionsResult` - - `MutationResult` | `undefined` -
- `isGrantingPermissions` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseLogoutMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseLogoutMutationArgs.mdx deleted file mode 100644 index 0b73b2dfcc..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseLogoutMutationArgs.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseLogoutMutationArgs -description: Overview of UseLogoutMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseLogoutMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseLogoutMutationArgs = BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useLogout.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useLogout.ts#L10) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseLogoutResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseLogoutResult.mdx deleted file mode 100644 index 9e67f15cfd..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseLogoutResult.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: UseLogoutResult -description: Overview of UseLogoutResult -slug: wallets/reference/account-kit/react/type-aliases/UseLogoutResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseLogoutResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useLogout.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useLogout.ts#L12) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isLoggingOut` - - `boolean` -
- `logout` - - `UseMutateFunction`\<`void`, `Error`, `void`, `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseMFAResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseMFAResult.mdx deleted file mode 100644 index c1c44426cf..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseMFAResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UseMFAResult -description: Overview of UseMFAResult -slug: wallets/reference/account-kit/react/type-aliases/UseMFAResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseMFAResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useMFA.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useMFA.ts#L15) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `addMFA` - - `UseMutationResult`\<`AddMfaResult`, `Error`, `AddMfaParams`> -
- `getMFAFactors` - - `UseMutationResult`\<\{ `multiFactors`: `MfaFactor`\[]; }, `Error`, `void`> -
- `isReady` - - `boolean` -
- `removeMFA` - - `UseMutationResult`\<\{ `multiFactors`: `MfaFactor`\[]; }, `Error`, `RemoveMfaParams`> -
- `verifyMFA` - - `UseMutationResult`\<\{ `multiFactors`: `MfaFactor`\[]; }, `Error`, `VerifyMfaParams`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsParams.mdx deleted file mode 100644 index 81b36854c6..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: UsePrepareCallsParams -description: Overview of UsePrepareCallsParams -slug: wallets/reference/account-kit/react/type-aliases/UsePrepareCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UsePrepareCallsParams = object; -``` - -Defined in: [account-kit/react/src/hooks/usePrepareCalls.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/usePrepareCalls.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsResult.mdx deleted file mode 100644 index e4cf3998bf..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareCallsResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UsePrepareCallsResult -description: Overview of UsePrepareCallsResult -slug: wallets/reference/account-kit/react/type-aliases/UsePrepareCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UsePrepareCallsResult = object; -``` - -Defined in: [account-kit/react/src/hooks/usePrepareCalls.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/usePrepareCalls.ts#L33) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isPreparingCalls` - - `boolean` -
- `prepareCalls` - - `UseMutateFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `prepareCallsAsync` - - `UseMutateAsyncFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `preparedCalls` - - `MutationResult` | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapParams.mdx deleted file mode 100644 index 51925ac936..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: UsePrepareSwapParams -description: Overview of UsePrepareSwapParams -slug: wallets/reference/account-kit/react/type-aliases/UsePrepareSwapParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UsePrepareSwapParams = object; -``` - -Defined in: [account-kit/react/src/hooks/usePrepareSwap.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/usePrepareSwap.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapResult.mdx deleted file mode 100644 index 79696dc786..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UsePrepareSwapResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UsePrepareSwapResult -description: Overview of UsePrepareSwapResult -slug: wallets/reference/account-kit/react/type-aliases/UsePrepareSwapResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UsePrepareSwapResult = object; -``` - -Defined in: [account-kit/react/src/hooks/usePrepareSwap.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/usePrepareSwap.ts#L33) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isPreparingSwap` - - `boolean` -
- `prepareSwap` - - `UseMutateFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `prepareSwapAsync` - - `UseMutateAsyncFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `quote` - - `MutationResult` | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailMutationArgs.mdx deleted file mode 100644 index fa16c16d38..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailMutationArgs.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseRemoveEmailMutationArgs -description: Overview of UseRemoveEmailMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseRemoveEmailMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseRemoveEmailMutationArgs = BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useRemoveEmail.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemoveEmail.ts#L16) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailResult.mdx deleted file mode 100644 index 507d3f2888..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveEmailResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseRemoveEmailResult -description: Overview of UseRemoveEmailResult -slug: wallets/reference/account-kit/react/type-aliases/UseRemoveEmailResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseRemoveEmailResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useRemoveEmail.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemoveEmail.ts#L18) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isRemovingEmail` - - `boolean` -
- `removeEmail` - - `UseMutateFunction`\<`void`, `Error`, `void`, `unknown`> -
- `removeEmailAsync` - - `UseMutateAsyncFunction`\<`void`, `Error`, `void`, `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderMutationArgs.mdx deleted file mode 100644 index 4166cbb218..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderMutationArgs.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseRemoveOauthProviderMutationArgs -description: Overview of UseRemoveOauthProviderMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseRemoveOauthProviderMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseRemoveOauthProviderMutationArgs = BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useRemoveOauthProvider.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemoveOauthProvider.ts#L16) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderResult.mdx deleted file mode 100644 index 3855b6a1c4..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemoveOauthProviderResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseRemoveOauthProviderResult -description: Overview of UseRemoveOauthProviderResult -slug: wallets/reference/account-kit/react/type-aliases/UseRemoveOauthProviderResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseRemoveOauthProviderResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useRemoveOauthProvider.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemoveOauthProvider.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isRemovingOauthProvider` - - `boolean` -
- `removeOauthProvider` - - `UseMutateFunction`\<`void`, `Error`, `string`, `unknown`> -
- `removeOauthProviderAsync` - - `UseMutateAsyncFunction`\<`void`, `Error`, `string`, `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyMutationArgs.mdx deleted file mode 100644 index 536702d806..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyMutationArgs.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseRemovePasskeyMutationArgs -description: Overview of UseRemovePasskeyMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseRemovePasskeyMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseRemovePasskeyMutationArgs = BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useRemovePasskey.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemovePasskey.ts#L14) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyResult.mdx deleted file mode 100644 index 6dc58cfd43..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseRemovePasskeyResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseRemovePasskeyResult -description: Overview of UseRemovePasskeyResult -slug: wallets/reference/account-kit/react/type-aliases/UseRemovePasskeyResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseRemovePasskeyResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useRemovePasskey.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useRemovePasskey.ts#L16) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isRemovingPasskey` - - `boolean` -
- `removePasskey` - - `UseMutateFunction`\<`void`, `Error`, `string`, `unknown`> -
- `removePasskeyAsync` - - `UseMutateAsyncFunction`\<`void`, `Error`, `string`, `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendCallsParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendCallsParams.mdx deleted file mode 100644 index 3125b752b6..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendCallsParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: UseSendCallsParams -description: Overview of UseSendCallsParams -slug: wallets/reference/account-kit/react/type-aliases/UseSendCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendCallsParams = object; -``` - -Defined in: [account-kit/react/src/hooks/useSendCalls.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendCalls.ts#L30) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendCallsResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendCallsResult.mdx deleted file mode 100644 index 2ab6f1488e..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendCallsResult.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: UseSendCallsResult -description: Overview of UseSendCallsResult -slug: wallets/reference/account-kit/react/type-aliases/UseSendCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendCallsResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSendCalls.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendCalls.ts#L46) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSendingCalls` - - `boolean` -
- `sendCalls` - - `UseMutateFunction`\<`MutationResult`\<`TEntryPointVersion`>, `Error`, `MutationParams`, `unknown`> -
- `sendCallsAsync` - - `UseMutateAsyncFunction`\<`MutationResult`\<`TEntryPointVersion`>, `Error`, `MutationParams`, `unknown`> -
- `sendCallsResult` - - `MutationResult` | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsParams.mdx deleted file mode 100644 index cd703a4566..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: UseSendPreparedCallsParams -description: Overview of UseSendPreparedCallsParams -slug: wallets/reference/account-kit/react/type-aliases/UseSendPreparedCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendPreparedCallsParams = object; -``` - -Defined in: [account-kit/react/src/hooks/useSendPreparedCalls.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendPreparedCalls.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsResult.mdx deleted file mode 100644 index 2ce71d7c40..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendPreparedCallsResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UseSendPreparedCallsResult -description: Overview of UseSendPreparedCallsResult -slug: wallets/reference/account-kit/react/type-aliases/UseSendPreparedCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendPreparedCallsResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSendPreparedCalls.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendPreparedCalls.ts#L33) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSendingPreparedCalls` - - `boolean` -
- `sendPreparedCalls` - - `UseMutateFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `sendPreparedCallsAsync` - - `UseMutateAsyncFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `sendPreparedCallsResult` - - `MutationResult` | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationArgs.mdx deleted file mode 100644 index 92baa846c5..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationArgs.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: UseSendUserOperationArgs -description: Overview of UseSendUserOperationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSendUserOperationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendUserOperationArgs = object & - UseSendUserOperationMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useSendUserOperation.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendUserOperation.ts#L46) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] - | `undefined` -
- `waitForTxn?` - - `boolean` -
- `waitForTxnTag?` - - `"pending"` | `"latest"` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationMutationArgs.mdx deleted file mode 100644 index 9f2fc416f4..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationMutationArgs.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: UseSendUserOperationMutationArgs -description: Overview of UseSendUserOperationMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSendUserOperationMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendUserOperationMutationArgs = - BaseHookMutationArgs< - SendUserOperationWithEOA, - SendUserOperationParameters - >; -``` - -Defined in: [account-kit/react/src/hooks/useSendUserOperation.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendUserOperation.ts#L38) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationResult.mdx deleted file mode 100644 index f0c20e2e21..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendUserOperationResult.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: UseSendUserOperationResult -description: Overview of UseSendUserOperationResult -slug: wallets/reference/account-kit/react/type-aliases/UseSendUserOperationResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendUserOperationResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSendUserOperation.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendUserOperation.ts#L55) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - ‐ -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSendingUserOperation` - - `boolean` -
- `sendUserOperation` - - `UseMutateFunction`\<[`SendUserOperationWithEOA`](SendUserOperationWithEOA)\<`TEntryPointVersion`>, `Error`, `SendUserOperationParameters`\<`TAccount`>, `unknown`> -
- `sendUserOperationAsync` - - `UseMutateAsyncFunction`\<[`SendUserOperationWithEOA`](SendUserOperationWithEOA)\<`TEntryPointVersion`>, `Error`, `SendUserOperationParameters`\<`TAccount`>, `unknown`> -
- `sendUserOperationResult` - - | [`SendUserOperationWithEOA`](SendUserOperationWithEOA)\<`TEntryPointVersion`> | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeMutationArgs.mdx deleted file mode 100644 index afdde06c57..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeMutationArgs.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: UseSendVerificationCodeMutationArgs -description: Overview of UseSendVerificationCodeMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSendVerificationCodeMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendVerificationCodeMutationArgs = BaseHookMutationArgs< - void, - SendVerificationCodeParams ->; -``` - -Defined in: [account-kit/react/src/hooks/useSendVerificationCode.ts:35](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendVerificationCode.ts#L35) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeResult.mdx deleted file mode 100644 index 6d191351ff..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSendVerificationCodeResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseSendVerificationCodeResult -description: Overview of UseSendVerificationCodeResult -slug: wallets/reference/account-kit/react/type-aliases/UseSendVerificationCodeResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSendVerificationCodeResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSendVerificationCode.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSendVerificationCode.ts#L18) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSendingCode` - - `boolean` -
- `sendVerificationCode` - - `UseMutateFunction`\<`void`, `Error`, [`SendVerificationCodeParams`](../interfaces/SendVerificationCodeParams), `unknown`> -
- `sendVerificationCodeAsync` - - `UseMutateAsyncFunction`\<`void`, `Error`, [`SendVerificationCodeParams`](../interfaces/SendVerificationCodeParams), `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSetEmailMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSetEmailMutationArgs.mdx deleted file mode 100644 index 0f82684800..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSetEmailMutationArgs.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseSetEmailMutationArgs -description: Overview of UseSetEmailMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSetEmailMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSetEmailMutationArgs = BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useSetEmail.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSetEmail.ts#L22) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSetEmailResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSetEmailResult.mdx deleted file mode 100644 index f604aaa2e3..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSetEmailResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseSetEmailResult -description: Overview of UseSetEmailResult -slug: wallets/reference/account-kit/react/type-aliases/UseSetEmailResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSetEmailResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSetEmail.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSetEmail.ts#L27) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSettingEmail` - - `boolean` -
- `setEmail` - - `UseMutateFunction`\<`void`, `Error`, [`SetEmailParams`](SetEmailParams), `unknown`> -
- `setEmailAsync` - - `UseMutateAsyncFunction`\<`void`, `Error`, [`SetEmailParams`](SetEmailParams), `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsParams.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsParams.mdx deleted file mode 100644 index ab66b022ae..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: UseSignAndSendPreparedCallsParams -description: Overview of UseSignAndSendPreparedCallsParams -slug: wallets/reference/account-kit/react/type-aliases/UseSignAndSendPreparedCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignAndSendPreparedCallsParams = object; -``` - -Defined in: [account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsResult.mdx deleted file mode 100644 index dde9815b54..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignAndSendPreparedCallsResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UseSignAndSendPreparedCallsResult -description: Overview of UseSignAndSendPreparedCallsResult -slug: wallets/reference/account-kit/react/type-aliases/UseSignAndSendPreparedCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignAndSendPreparedCallsResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts#L33) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSigningAndSendingPreparedCalls` - - `boolean` -
- `signAndSendPreparedCalls` - - `UseMutateFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `signAndSendPreparedCallsAsync` - - `UseMutateAsyncFunction`\<`MutationResult`, `Error`, `MutationParams`, `unknown`> -
- `signAndSendPreparedCallsResult` - - `MutationResult` | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessageArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessageArgs.mdx deleted file mode 100644 index 63bfe193b2..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessageArgs.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: UseSignMessageArgs -description: Overview of UseSignMessageArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSignMessageArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignMessageArgs = object & UseSignMessagedMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useSignMessage.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignMessage.ts#L25) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `client` - - | \{ - `account`: \{ - `address`: [`Address`](https://abitype.dev); - }; - } - | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessageResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessageResult.mdx deleted file mode 100644 index efc8a5b8d2..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessageResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UseSignMessageResult -description: Overview of UseSignMessageResult -slug: wallets/reference/account-kit/react/type-aliases/UseSignMessageResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignMessageResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSignMessage.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignMessage.ts#L29) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSigningMessage` - - `boolean` -
- `signedMessage` - - [`Hex`](https://viem.sh) | `undefined` -
- `signMessage` - - `UseMutateFunction`\<[`Hex`](https://viem.sh), `Error`, [`SignMessageArgs`](SignMessageArgs), `unknown`> -
- `signMessageAsync` - - `UseMutateAsyncFunction`\<[`Hex`](https://viem.sh), `Error`, [`SignMessageArgs`](SignMessageArgs), `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessagedMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessagedMutationArgs.mdx deleted file mode 100644 index b89aa127d5..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignMessagedMutationArgs.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseSignMessagedMutationArgs -description: Overview of UseSignMessagedMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSignMessagedMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignMessagedMutationArgs = BaseHookMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useSignMessage.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignMessage.ts#L20) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataArgs.mdx deleted file mode 100644 index 44b16be6d4..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataArgs.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: UseSignTypedDataArgs -description: Overview of UseSignTypedDataArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSignTypedDataArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignTypedDataArgs = object & UseSignTypedDataMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useSignTypedData.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignTypedData.ts#L24) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `client` - - | \{ - `account`: \{ - `address`: [`Address`](https://abitype.dev); - }; - } - | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataMutationArgs.mdx deleted file mode 100644 index d2908d244d..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataMutationArgs.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: UseSignTypedDataMutationArgs -description: Overview of UseSignTypedDataMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseSignTypedDataMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignTypedDataMutationArgs = BaseHookMutationArgs< - Hex, - SignTypedDataArgs ->; -``` - -Defined in: [account-kit/react/src/hooks/useSignTypedData.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignTypedData.ts#L19) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataResult.mdx deleted file mode 100644 index 8619d90b3d..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignTypedDataResult.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: UseSignTypedDataResult -description: Overview of UseSignTypedDataResult -slug: wallets/reference/account-kit/react/type-aliases/UseSignTypedDataResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignTypedDataResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useSignTypedData.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignTypedData.ts#L28) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isSigningTypedData` - - `boolean` -
- `signedTypedData` - - [`Hex`](https://viem.sh) | `undefined` -
- `signTypedData` - - `UseMutateFunction`\<[`Hex`](https://viem.sh), `Error`, [`SignTypedDataArgs`](SignTypedDataArgs), `unknown`> -
- `signTypedDataAsync` - - `UseMutateAsyncFunction`\<[`Hex`](https://viem.sh), `Error`, [`SignTypedDataArgs`](SignTypedDataArgs), `unknown`> -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignerStatusResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSignerStatusResult.mdx deleted file mode 100644 index 49559551ea..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSignerStatusResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseSignerStatusResult -description: Overview of UseSignerStatusResult -slug: wallets/reference/account-kit/react/type-aliases/UseSignerStatusResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSignerStatusResult = SignerStatus; -``` - -Defined in: [account-kit/react/src/hooks/useSignerStatus.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSignerStatus.ts#L9) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientProps.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientProps.mdx deleted file mode 100644 index fa4d37be04..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientProps.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: UseSmartAccountClientProps -description: Overview of UseSmartAccountClientProps -slug: wallets/reference/account-kit/react/type-aliases/UseSmartAccountClientProps -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSmartAccountClientProps = OptionalFields< - GetSmartAccountClientParams< - TChain, - TAccount extends undefined ? "ModularAccountV2" : TAccount - >, - "type" ->; -``` - -Defined in: [account-kit/react/src/hooks/useSmartAccountClient.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSmartAccountClient.ts#L19) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SupportedAccountTypes` | `undefined` - - `SupportedAccountTypes` | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientResult.mdx deleted file mode 100644 index 6aeb333a95..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseSmartAccountClientResult.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: UseSmartAccountClientResult -description: Overview of UseSmartAccountClientResult -slug: wallets/reference/account-kit/react/type-aliases/UseSmartAccountClientResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseSmartAccountClientResult = - GetSmartAccountClientResult; -``` - -Defined in: [account-kit/react/src/hooks/useSmartAccountClient.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useSmartAccountClient.ts#L32) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SupportedAccounts` - - `SupportedAccounts` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseUserResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseUserResult.mdx deleted file mode 100644 index 5f2d484f6e..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseUserResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseUserResult -description: Overview of UseUserResult -slug: wallets/reference/account-kit/react/type-aliases/UseUserResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseUserResult = (User & object) | null; -``` - -Defined in: [account-kit/react/src/hooks/useUser.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useUser.ts#L9) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForCallsStatusResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForCallsStatusResult.mdx deleted file mode 100644 index e854435dce..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForCallsStatusResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UseWaitForCallsStatusResult -description: Overview of UseWaitForCallsStatusResult -slug: wallets/reference/account-kit/react/type-aliases/UseWaitForCallsStatusResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseWaitForCallsStatusResult = UseQueryResult; -``` - -Defined in: [account-kit/react/src/hooks/useWaitForCallsStatus.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useWaitForCallsStatus.ts#L22) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionArgs.mdx deleted file mode 100644 index af80e153c9..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionArgs.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: UseWaitForUserOperationTransactionArgs -description: Overview of UseWaitForUserOperationTransactionArgs -slug: wallets/reference/account-kit/react/type-aliases/UseWaitForUserOperationTransactionArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseWaitForUserOperationTransactionArgs = object & - UseWaitForUserOperationTransactionMutationArgs; -``` - -Defined in: [account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L21) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `client` - - | [`UseSmartAccountClientResult`](UseSmartAccountClientResult)\[`"client"`] - | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionMutationArgs.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionMutationArgs.mdx deleted file mode 100644 index dc7c5a38f3..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionMutationArgs.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: UseWaitForUserOperationTransactionMutationArgs -description: Overview of UseWaitForUserOperationTransactionMutationArgs -slug: wallets/reference/account-kit/react/type-aliases/UseWaitForUserOperationTransactionMutationArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseWaitForUserOperationTransactionMutationArgs = BaseHookMutationArgs< - Hash, - WaitForUserOperationTxParameters ->; -``` - -Defined in: [account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L18) diff --git a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionResult.mdx b/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionResult.mdx deleted file mode 100644 index 3c304c34be..0000000000 --- a/docs/pages/reference/account-kit/react/src/type-aliases/UseWaitForUserOperationTransactionResult.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: UseWaitForUserOperationTransactionResult -description: Overview of UseWaitForUserOperationTransactionResult -slug: wallets/reference/account-kit/react/type-aliases/UseWaitForUserOperationTransactionResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UseWaitForUserOperationTransactionResult = object; -``` - -Defined in: [account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useWaitForUserOperationTransaction.ts#L25) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `error` - - `Error` | `null` -
- `isWaitingForUserOperationTransaction` - - `boolean` -
- `waitForUserOperationTransaction` - - `UseMutateFunction`\<[`Hash`](https://viem.sh), `Error`, `WaitForUserOperationTxParameters`, `unknown`> -
- `waitForUserOperationTransactionResult` - - [`Hash`](https://viem.sh) | `undefined` -
diff --git a/docs/pages/reference/account-kit/react/src/variables/AlchemyAccountContext.mdx b/docs/pages/reference/account-kit/react/src/variables/AlchemyAccountContext.mdx deleted file mode 100644 index af6202600f..0000000000 --- a/docs/pages/reference/account-kit/react/src/variables/AlchemyAccountContext.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemyAccountContext -description: Overview of AlchemyAccountContext -slug: wallets/reference/account-kit/react/variables/AlchemyAccountContext -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const AlchemyAccountContext: Context; -``` - -Defined in: [account-kit/react/src/AlchemyAccountContext.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/AlchemyAccountContext.ts#L12) diff --git a/docs/pages/reference/account-kit/react/src/variables/DEFAULT_UI_CONFIG.mdx b/docs/pages/reference/account-kit/react/src/variables/DEFAULT_UI_CONFIG.mdx deleted file mode 100644 index 6e829a5328..0000000000 --- a/docs/pages/reference/account-kit/react/src/variables/DEFAULT_UI_CONFIG.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: DEFAULT_UI_CONFIG -description: Overview of DEFAULT_UI_CONFIG -slug: wallets/reference/account-kit/react/variables/DEFAULT_UI_CONFIG -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const DEFAULT_UI_CONFIG: AlchemyAccountsUIConfigWithDefaults; -``` - -Defined in: [account-kit/react/src/hooks/useUiConfig.tsx:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/react/src/hooks/useUiConfig.tsx#L29) diff --git a/docs/pages/reference/account-kit/rn-signer/src/README.mdx b/docs/pages/reference/account-kit/rn-signer/src/README.mdx deleted file mode 100644 index b8a9bf3df9..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/README.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: account-kit/rn-signer -description: Overview of account-kit/rn-signer -slug: wallets/reference/account-kit/rn-signer -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Classes - -| Class | Description | -| :---------------------------------------------------------------------------------------------------- | :---------- | -| [RNAlchemySignerSingleton](/wallets/reference/account-kit/rn-signer/classes/RNAlchemySignerSingleton) | - | -| [RNSignerClient](/wallets/reference/account-kit/rn-signer/classes/RNSignerClient) | - | - -## Type Aliases - -| Type Alias | Description | -| :--------------------------------------------------------------------------------------------------- | :---------- | -| [ExportWalletParams](/wallets/reference/account-kit/rn-signer/type-aliases/ExportWalletParams) | - | -| [ExportWalletResult](/wallets/reference/account-kit/rn-signer/type-aliases/ExportWalletResult) | - | -| [RNAlchemySignerParams](/wallets/reference/account-kit/rn-signer/type-aliases/RNAlchemySignerParams) | - | -| [RNAlchemySignerType](/wallets/reference/account-kit/rn-signer/type-aliases/RNAlchemySignerType) | - | - -## Functions - -| Function | Description | -| :------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------ | -| [RNAlchemySigner](/wallets/reference/account-kit/rn-signer/functions/RNAlchemySigner) | Factory function to create or retrieve a singleton instance of RNAlchemySigner. | diff --git a/docs/pages/reference/account-kit/rn-signer/src/classes/RNAlchemySignerSingleton.mdx b/docs/pages/reference/account-kit/rn-signer/src/classes/RNAlchemySignerSingleton.mdx deleted file mode 100644 index d47ee078fd..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/classes/RNAlchemySignerSingleton.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: RNAlchemySignerSingleton -description: Overview of the RNAlchemySignerSingleton class -slug: wallets/reference/account-kit/rn-signer/classes/RNAlchemySignerSingleton -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/rn-signer/src/signer.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/signer.ts#L22) - -## Extends - -- `BaseAlchemySigner`\<[`RNSignerClient`](RNSignerClient)> - -## Methods - -### getInstance() - -```ts -static getInstance(params): RNAlchemySignerSingleton; -``` - -Defined in: [account-kit/rn-signer/src/signer.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/signer.ts#L49) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Object` -
- -#### Returns - -`RNAlchemySignerSingleton` diff --git a/docs/pages/reference/account-kit/rn-signer/src/classes/RNSignerClient.mdx b/docs/pages/reference/account-kit/rn-signer/src/classes/RNSignerClient.mdx deleted file mode 100644 index 3fbe9998d3..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/classes/RNSignerClient.mdx +++ /dev/null @@ -1,734 +0,0 @@ ---- -title: RNSignerClient -description: Overview of the RNSignerClient class -slug: wallets/reference/account-kit/rn-signer/classes/RNSignerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/rn-signer/src/client.ts:67](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L67) - -## Extends - -- `BaseSignerClient`\<[`ExportWalletParams`](../type-aliases/ExportWalletParams), `string`> - -## Constructors - -### Constructor - -```ts -new RNSignerClient(params): RNSignerClient; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:79](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L79) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Object` -
- -#### Returns - -`RNSignerClient` - -#### Overrides - -```ts -BaseSignerClient< - ExportWalletParams, - string ->.constructor -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `oauthCallbackUrl` - - `string` -
- `rpId` - - `undefined` | `string` -
- -## Methods - -### completeAuthWithBundle() - -```ts -completeAuthWithBundle(params): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:182](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L182) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - \{ `accessToken?`: `string`; `authenticatingType`: `"email"` | `"otp"` | `"sms"` | `"passkey"` | `"oauth"` | `"otpVerify"` | `"custom-jwt"`; `bundle`: `string`; `connectedEventName`: keyof `AlchemySignerClientEvents`; `idToken?`: `string`; `orgId`: `string`; } -
- `params.accessToken?` - - `string` -
- `params.authenticatingType` - - `"email"` | `"otp"` | `"sms"` | `"passkey"` | `"oauth"` | `"otpVerify"` | `"custom-jwt"` -
- `params.bundle` - - `string` -
- `params.connectedEventName` - - keyof `AlchemySignerClientEvents` -
- `params.idToken?` - - `string` -
- `params.orgId` - - `string` -
- -#### Returns - -`Promise`\<[`User`](../../../signer/src/type-aliases/User)> - -#### Overrides - -```ts -BaseSignerClient.completeAuthWithBundle; -``` - ---- - -### disconnect() - -```ts -disconnect(): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:296](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L296) - -#### Returns - -`Promise`\<`void`> - -#### Overrides - -```ts -BaseSignerClient.disconnect; -``` - ---- - -### exportWallet() - -```ts -exportWallet(params?): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:309](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L309) - -Exports the wallet and returns the decrypted private key or seed phrase. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params?` - - [`ExportWalletParams`](../type-aliases/ExportWalletParams) - - exportWallet parameters -
- -#### Returns - -`Promise`\<`string`> - -The decrypted private key or seed phrase - -#### Throws - -If the user is not authenticated or export fails - -#### Overrides - -```ts -BaseSignerClient.exportWallet; -``` - ---- - -### getOauthConfig() - -```ts -protected getOauthConfig(): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:464](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L464) - -#### Returns - -`Promise`\<`OauthConfig`> - -#### Overrides - -```ts -BaseSignerClient.getOauthConfig; -``` - ---- - -### getWebAuthnAttestation() - -```ts -protected getWebAuthnAttestation(options?, userDetails?): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:433](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L433) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `options?` - - `CredentialCreationOptionOverrides` -
- `userDetails?` - - \{ `username`: `string`; } -
- `userDetails.username?` - - `string` -
- -#### Returns - -`Promise`\<`GetWebAuthnAttestationResult` & `object`> - -#### Overrides - -```ts -BaseSignerClient.getWebAuthnAttestation; -``` - ---- - -### initEmailAuth() - -```ts -initEmailAuth(params): Promise<{ - multiFactors?: MfaFactor[]; - orgId: string; - otpId?: string; -}>; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:130](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L130) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Omit`\<`EmailAuthParams`, `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<\{ -`multiFactors?`: `MfaFactor`\[]; -`orgId`: `string`; -`otpId?`: `string`; -}> - -#### Overrides - -```ts -BaseSignerClient.initEmailAuth; -``` - ---- - -### initSessionStamper() - -```ts -protected initSessionStamper(): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:476](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L476) - -Initializes the session stamper and returns its public key. - -#### Returns - -`Promise`\<`string`> - -#### Overrides - -```ts -BaseSignerClient.initSessionStamper; -``` - ---- - -### initSmsAuth() - -```ts -initSmsAuth(params): Promise<{ - orgId: string; - otpId?: string; -}>; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:155](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L155) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Omit`\<`SmsAuthParams`, `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<\{ -`orgId`: `string`; -`otpId?`: `string`; -}> - -#### Overrides - -```ts -BaseSignerClient.initSmsAuth; -``` - ---- - -### initWebauthnStamper() - -```ts -protected initWebauthnStamper(user, options?): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:495](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L495) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `undefined` | [`User`](../../../signer/src/type-aliases/User) -
- `options?` - - `CredentialCreationOptionOverrides` -
- -#### Returns - -`Promise`\<`void`> - -#### Overrides - -```ts -BaseSignerClient.initWebauthnStamper; -``` - ---- - -### oauthWithPopup() - -```ts -oauthWithPopup(_args): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:290](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L290) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `_args` - - `any` -
- -#### Returns - -`Promise`\<[`User`](../../../signer/src/type-aliases/User)> - -#### Overrides - -```ts -BaseSignerClient.oauthWithPopup; -``` - ---- - -### oauthWithRedirect() - -```ts -oauthWithRedirect(args): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:216](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L216) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `any` -
- -#### Returns - -`Promise`\<[`User`](../../../signer/src/type-aliases/User) | `IdTokenOnly`> - -#### Overrides - -```ts -BaseSignerClient.oauthWithRedirect; -``` - ---- - -### submitJwt() - -```ts -submitJwt(args): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:168](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L168) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `Omit`\<`JwtParams`, `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<`JwtResponse`> - -#### Overrides - -```ts -BaseSignerClient.submitJwt; -``` - ---- - -### submitOtpCode() - -```ts -submitOtpCode(args): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:93](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L93) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `Omit`\<`OtpParams`, `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<`SubmitOtpCodeResponse`> - -#### Overrides - -```ts -BaseSignerClient.submitOtpCode; -``` - ---- - -### targetPublicKey() - -```ts -targetPublicKey(): Promise; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:429](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L429) - -#### Returns - -`Promise`\<`string`> - -#### Overrides - -```ts -BaseSignerClient.targetPublicKey; -``` diff --git a/docs/pages/reference/account-kit/rn-signer/src/functions/RNAlchemySigner.mdx b/docs/pages/reference/account-kit/rn-signer/src/functions/RNAlchemySigner.mdx deleted file mode 100644 index 33085ef933..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/functions/RNAlchemySigner.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: RNAlchemySigner -description: Overview of the RNAlchemySigner function -slug: wallets/reference/account-kit/rn-signer/functions/RNAlchemySigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function RNAlchemySigner(params): RNAlchemySignerSingleton; -``` - -Defined in: [account-kit/rn-signer/src/signer.ts:80](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/signer.ts#L80) - -Factory function to create or retrieve a singleton instance of RNAlchemySigner. - -## Example - -```ts twoslash -import { RNAlchemySigner } from "@account-kit/react-native-signer"; - -const signer = RNAlchemySigner({ - client: { - connection: { - apiKey: "YOUR_API_KEY", - }, - }, - // optional config to override default session manager configs - sessionConfig: { - expirationTimeMs: 1000 * 60 * 60, // 60 minutes - }, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `Object` - - The parameters required to configure the RNAlchemySigner instance. -
- -## Returns - -[`RNAlchemySignerSingleton`](../classes/RNAlchemySignerSingleton) - -The singleton instance of RNAlchemySigner configured with the provided parameters. diff --git a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletParams.mdx b/docs/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletParams.mdx deleted file mode 100644 index a6ea190941..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: ExportWalletParams -description: Overview of ExportWalletParams -slug: wallets/reference/account-kit/rn-signer/type-aliases/ExportWalletParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExportWalletParams = object; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:58](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L58) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `exportAs?` - - `"PRIVATE_KEY"` | `"SEED_PHRASE"` -
diff --git a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletResult.mdx b/docs/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletResult.mdx deleted file mode 100644 index bfc1cfe640..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/ExportWalletResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ExportWalletResult -description: Overview of ExportWalletResult -slug: wallets/reference/account-kit/rn-signer/type-aliases/ExportWalletResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExportWalletResult = string; -``` - -Defined in: [account-kit/rn-signer/src/client.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/client.ts#L62) diff --git a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerParams.mdx b/docs/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerParams.mdx deleted file mode 100644 index a6db35a599..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerParams.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: RNAlchemySignerParams -description: Overview of RNAlchemySignerParams -slug: wallets/reference/account-kit/rn-signer/type-aliases/RNAlchemySignerParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RNAlchemySignerParams = z.input; -``` - -Defined in: [account-kit/rn-signer/src/signer.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/signer.ts#L20) diff --git a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerType.mdx b/docs/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerType.mdx deleted file mode 100644 index a8ad040b87..0000000000 --- a/docs/pages/reference/account-kit/rn-signer/src/type-aliases/RNAlchemySignerType.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: RNAlchemySignerType -description: Overview of RNAlchemySignerType -slug: wallets/reference/account-kit/rn-signer/type-aliases/RNAlchemySignerType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RNAlchemySignerType = RNAlchemySignerSingleton; -``` - -Defined in: [account-kit/rn-signer/src/signer.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/rn-signer/src/signer.ts#L86) diff --git a/docs/pages/reference/account-kit/signer/src/README.mdx b/docs/pages/reference/account-kit/signer/src/README.mdx deleted file mode 100644 index 6cbe4ba5fb..0000000000 --- a/docs/pages/reference/account-kit/signer/src/README.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: account-kit/signer -description: Overview of account-kit/signer -slug: wallets/reference/account-kit/signer -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Enumerations - -| Enumeration | Description | -| :-------------------------------------------------------------------------------------------- | :---------- | -| [AlchemyMfaStatus](/wallets/reference/account-kit/signer/enumerations/AlchemyMfaStatus) | - | -| [AlchemySignerStatus](/wallets/reference/account-kit/signer/enumerations/AlchemySignerStatus) | - | - -## Classes - -| Class | Description | -| :--------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [AlchemyServerSigner](/wallets/reference/account-kit/signer/classes/AlchemyServerSigner) | AlchemyServerSigner is a signer that can sign messages and typed data using an access key. It extends the SmartAccountSigner interface and uses the ServerSignerClient to sign requests. Primarily intended to be used server-side. | -| [AlchemySignerWebClient](/wallets/reference/account-kit/signer/classes/AlchemySignerWebClient) | A lower level client used by the AlchemySigner used to communicate with Alchemy's signer service. | -| [AlchemyWebSigner](/wallets/reference/account-kit/signer/classes/AlchemyWebSigner) | A SmartAccountSigner that can be used with any SmartContractAccount | -| [BaseAlchemySigner](/wallets/reference/account-kit/signer/classes/BaseAlchemySigner) | Base abstract class for Alchemy Signer, providing authentication and session management for smart accounts. Implements the `SmartAccountAuthenticator` interface and handles various signer events. | -| [BaseSignerClient](/wallets/reference/account-kit/signer/classes/BaseSignerClient) | Base class for all Alchemy Signer clients | -| [MfaRequiredError](/wallets/reference/account-kit/signer/classes/MfaRequiredError) | - | -| [NotAuthenticatedError](/wallets/reference/account-kit/signer/classes/NotAuthenticatedError) | - | -| [OauthCancelledError](/wallets/reference/account-kit/signer/classes/OauthCancelledError) | This error is thrown when the OAuth flow is cancelled because the auth popup window was closed. | -| [OauthFailedError](/wallets/reference/account-kit/signer/classes/OauthFailedError) | This error is thrown when an error occurs during the OAuth login flow. | -| [OAuthProvidersError](/wallets/reference/account-kit/signer/classes/OAuthProvidersError) | - | -| [ServerSignerClient](/wallets/reference/account-kit/signer/classes/ServerSignerClient) | ServerSignerClient is a client for signing messages using an access key. It extends the BaseSignerClient and uses the ApiKeyStamper for signing. Primarily intended to be used server-side. | -| [SolanaSigner](/wallets/reference/account-kit/signer/classes/SolanaSigner) | The SolanaSigner class is used to sign transactions and messages for the Solana blockchain. It provides methods to add signatures to transactions and sign messages. | - -## Interfaces - -| Interface | Description | -| :---------------------------------------------------------------------- | :---------- | -| [ErrorInfo](/wallets/reference/account-kit/signer/interfaces/ErrorInfo) | - | - -## Type Aliases - -| Type Alias | Description | -| :------------------------------------------------------------------------------------------------------------------------ | :---------- | -| [AccessKeyAuthParams](/wallets/reference/account-kit/signer/type-aliases/AccessKeyAuthParams) | - | -| [AccessKeyAuthParamsPublicKeyOnly](/wallets/reference/account-kit/signer/type-aliases/AccessKeyAuthParamsPublicKeyOnly) | - | -| [AddMfaParams](/wallets/reference/account-kit/signer/type-aliases/AddMfaParams) | - | -| [AddMfaResult](/wallets/reference/account-kit/signer/type-aliases/AddMfaResult) | - | -| [AddOauthProviderParams](/wallets/reference/account-kit/signer/type-aliases/AddOauthProviderParams) | - | -| [AlchemySignerClientEvent](/wallets/reference/account-kit/signer/type-aliases/AlchemySignerClientEvent) | - | -| [AlchemySignerClientEvents](/wallets/reference/account-kit/signer/type-aliases/AlchemySignerClientEvents) | - | -| [AlchemySignerEvent](/wallets/reference/account-kit/signer/type-aliases/AlchemySignerEvent) | - | -| [AlchemySignerEvents](/wallets/reference/account-kit/signer/type-aliases/AlchemySignerEvents) | - | -| [AlchemySignerParams](/wallets/reference/account-kit/signer/type-aliases/AlchemySignerParams) | - | -| [AuthenticatingEventMetadata](/wallets/reference/account-kit/signer/type-aliases/AuthenticatingEventMetadata) | - | -| [AuthLinkingPrompt](/wallets/reference/account-kit/signer/type-aliases/AuthLinkingPrompt) | - | -| [AuthMethods](/wallets/reference/account-kit/signer/type-aliases/AuthMethods) | - | -| [AuthParams](/wallets/reference/account-kit/signer/type-aliases/AuthParams) | - | -| [AuthProviderConfig](/wallets/reference/account-kit/signer/type-aliases/AuthProviderConfig) | - | -| [CreateAccountParams](/wallets/reference/account-kit/signer/type-aliases/CreateAccountParams) | - | -| [CredentialCreationOptionOverrides](/wallets/reference/account-kit/signer/type-aliases/CredentialCreationOptionOverrides) | - | -| [EmailAuthParams](/wallets/reference/account-kit/signer/type-aliases/EmailAuthParams) | - | -| [EmailConfig](/wallets/reference/account-kit/signer/type-aliases/EmailConfig) | - | -| [EmailType](/wallets/reference/account-kit/signer/type-aliases/EmailType) | - | -| [experimental_CreateApiKeyParams](/wallets/reference/account-kit/signer/type-aliases/experimental_CreateApiKeyParams) | - | -| [ExportWalletOutput](/wallets/reference/account-kit/signer/type-aliases/ExportWalletOutput) | - | -| [ExportWalletParams](/wallets/reference/account-kit/signer/type-aliases/ExportWalletParams) | - | -| [GetOauthProviderUrlArgs](/wallets/reference/account-kit/signer/type-aliases/GetOauthProviderUrlArgs) | - | -| [GetWebAuthnAttestationResult](/wallets/reference/account-kit/signer/type-aliases/GetWebAuthnAttestationResult) | - | -| [IdTokenOnly](/wallets/reference/account-kit/signer/type-aliases/IdTokenOnly) | - | -| [JwtParams](/wallets/reference/account-kit/signer/type-aliases/JwtParams) | - | -| [JwtResponse](/wallets/reference/account-kit/signer/type-aliases/JwtResponse) | - | -| [KnownAuthProvider](/wallets/reference/account-kit/signer/type-aliases/KnownAuthProvider) | - | -| [MfaChallenge](/wallets/reference/account-kit/signer/type-aliases/MfaChallenge) | - | -| [MfaFactor](/wallets/reference/account-kit/signer/type-aliases/MfaFactor) | - | -| [OauthConfig](/wallets/reference/account-kit/signer/type-aliases/OauthConfig) | - | -| [OauthMode](/wallets/reference/account-kit/signer/type-aliases/OauthMode) | - | -| [OauthParams](/wallets/reference/account-kit/signer/type-aliases/OauthParams) | - | -| [OauthProviderConfig](/wallets/reference/account-kit/signer/type-aliases/OauthProviderConfig) | - | -| [OauthProviderInfo](/wallets/reference/account-kit/signer/type-aliases/OauthProviderInfo) | - | -| [OauthRedirectConfig](/wallets/reference/account-kit/signer/type-aliases/OauthRedirectConfig) | - | -| [OauthState](/wallets/reference/account-kit/signer/type-aliases/OauthState) | - | -| [OtpParams](/wallets/reference/account-kit/signer/type-aliases/OtpParams) | - | -| [OtpResponse](/wallets/reference/account-kit/signer/type-aliases/OtpResponse) | - | -| [PasskeyInfo](/wallets/reference/account-kit/signer/type-aliases/PasskeyInfo) | - | -| [RemoveMfaParams](/wallets/reference/account-kit/signer/type-aliases/RemoveMfaParams) | - | -| [SignerBody](/wallets/reference/account-kit/signer/type-aliases/SignerBody) | - | -| [SignerConfig](/wallets/reference/account-kit/signer/type-aliases/SignerConfig) | - | -| [SignerEndpoints](/wallets/reference/account-kit/signer/type-aliases/SignerEndpoints) | - | -| [SignerResponse](/wallets/reference/account-kit/signer/type-aliases/SignerResponse) | - | -| [SignerRoutes](/wallets/reference/account-kit/signer/type-aliases/SignerRoutes) | - | -| [SignupResponse](/wallets/reference/account-kit/signer/type-aliases/SignupResponse) | - | -| [SmsAuthParams](/wallets/reference/account-kit/signer/type-aliases/SmsAuthParams) | - | -| [SubmitOtpCodeResponse](/wallets/reference/account-kit/signer/type-aliases/SubmitOtpCodeResponse) | - | -| [User](/wallets/reference/account-kit/signer/type-aliases/User) | - | -| [ValidateMultiFactorsArgs](/wallets/reference/account-kit/signer/type-aliases/ValidateMultiFactorsArgs) | - | -| [ValidateMultiFactorsParams](/wallets/reference/account-kit/signer/type-aliases/ValidateMultiFactorsParams) | - | -| [VerificationOtp](/wallets/reference/account-kit/signer/type-aliases/VerificationOtp) | - | -| [VerifyMfaParams](/wallets/reference/account-kit/signer/type-aliases/VerifyMfaParams) | - | - -## Variables - -| Variable | Description | -| :------------------------------------------------------------------------------------------------------- | :---------- | -| [AlchemySignerParamsSchema](/wallets/reference/account-kit/signer/variables/AlchemySignerParamsSchema) | - | -| [DEFAULT_SESSION_MS](/wallets/reference/account-kit/signer/variables/DEFAULT_SESSION_MS) | - | -| [SessionManagerParamsSchema](/wallets/reference/account-kit/signer/variables/SessionManagerParamsSchema) | - | - -## Functions - -| Function | Description | -| :------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | -| [createServerSigner](/wallets/reference/account-kit/signer/functions/createServerSigner) | Creates a new server signer. | -| [createSolanaSponsoredTransaction](/wallets/reference/account-kit/signer/functions/createSolanaSponsoredTransaction) | This function wraps instructions in a sponsored transaction using Alchemy's fee payer service | -| [createSolanaTransaction](/wallets/reference/account-kit/signer/functions/createSolanaTransaction) | Creates a regular (non-sponsored) Solana transaction from instructions | -| [generateAccessKey](/wallets/reference/account-kit/signer/functions/generateAccessKey) | Generates a new access key for use in the server signer | diff --git a/docs/pages/reference/account-kit/signer/src/classes/AlchemyServerSigner.mdx b/docs/pages/reference/account-kit/signer/src/classes/AlchemyServerSigner.mdx deleted file mode 100644 index 11c36376d7..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/AlchemyServerSigner.mdx +++ /dev/null @@ -1,567 +0,0 @@ ---- -title: AlchemyServerSigner -description: AlchemyServerSigner is a signer that can sign messages and typed data using an access key. It extends the SmartAccountSigner interface and uses the ServerSignerClient to sign requests. Primarily intended to be used server-side. -slug: wallets/reference/account-kit/signer/classes/AlchemyServerSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/serverSigner.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L31) - -AlchemyServerSigner is a signer that can sign messages and typed data using an access key. -It extends the SmartAccountSigner interface and uses the ServerSignerClient to sign requests. -Primarily intended to be used server-side. - -## Implements - -- `SmartAccountSigner` - -## Constructors - -### Constructor - -```ts -new AlchemyServerSigner(client): AlchemyServerSigner; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L40) - -Creates an instance of AlchemyServerSigner. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`ServerSignerClient`](ServerSignerClient) - - The underlying signer client -
- -#### Returns - -`AlchemyServerSigner` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `inner` - - [`ServerSignerClient`](ServerSignerClient) - - `undefined` -
- `signerType` - - `string` - - `"alchemy-server-signer"` -
- -## Methods - -### getAddress() - -```ts -getAddress(): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:50](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L50) - -Gets the address of the user from the signer client. - -#### Returns - -`Promise`\<`` `0x${string}` ``> - -The address of the user - -#### Throws - -If the user cannot be retrieved from the signer client - -#### Implementation of - -```ts -SmartAccountSigner.getAddress; -``` - ---- - -### signAuthorization() - -```ts -signAuthorization(unsignedAuthorization): Promise>; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L86) - -Signs an authorization using the inner client. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `unsignedAuthorization` - - `AuthorizationRequest`\<`number`> - - The unsigned authorization to sign -
- -#### Returns - -`Promise`\<[`SignedAuthorization`](https://viem.sh)\<`number`>> - -The signed authorization - -#### Implementation of - -```ts -SmartAccountSigner.signAuthorization; -``` - ---- - -### signMessage() - -```ts -signMessage(msg): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:61](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L61) - -Signs a message using the inner client. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - [`SignableMessage`](https://viem.sh) - - The message to sign -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -The signed message - -#### Implementation of - -```ts -SmartAccountSigner.signMessage; -``` - ---- - -### signTypedData() - -```ts -signTypedData(params): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:72](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L72) - -Signs typed data using the inner client. - -#### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTypedData` *extends* - | \{ - \[`key`: `string`]: readonly [`TypedDataParameter`](https://abitype.dev)\[]; - \[`key`: `` `string[${string}]` ``]: `undefined`; - \[`key`: `` `function[${string}]` ``]: `undefined`; - \[`key`: `` `address[${string}]` ``]: `undefined`; - \[`key`: `` `bool[${string}]` ``]: `undefined`; - \[`key`: `` `bytes[${string}]` ``]: `undefined`; - \[`key`: `` `bytes1[${string}]` ``]: `undefined`; - \[`key`: `` `bytes2[${string}]` ``]: `undefined`; - \[`key`: `` `bytes3[${string}]` ``]: `undefined`; - \[`key`: `` `bytes4[${string}]` ``]: `undefined`; - \[`key`: `` `bytes5[${string}]` ``]: `undefined`; - \[`key`: `` `bytes6[${string}]` ``]: `undefined`; - \[`key`: `` `bytes7[${string}]` ``]: `undefined`; - \[`key`: `` `bytes8[${string}]` ``]: `undefined`; - \[`key`: `` `bytes9[${string}]` ``]: `undefined`; - \[`key`: `` `bytes10[${string}]` ``]: `undefined`; - \[`key`: `` `bytes11[${string}]` ``]: `undefined`; - \[`key`: `` `bytes12[${string}]` ``]: `undefined`; - \[`key`: `` `bytes13[${string}]` ``]: `undefined`; - \[`key`: `` `bytes14[${string}]` ``]: `undefined`; - \[`key`: `` `bytes15[${string}]` ``]: `undefined`; - \[`key`: `` `bytes16[${string}]` ``]: `undefined`; - \[`key`: `` `bytes17[${string}]` ``]: `undefined`; - \[`key`: `` `bytes18[${string}]` ``]: `undefined`; - \[`key`: `` `bytes19[${string}]` ``]: `undefined`; - \[`key`: `` `bytes20[${string}]` ``]: `undefined`; - \[`key`: `` `bytes21[${string}]` ``]: `undefined`; - \[`key`: `` `bytes22[${string}]` ``]: `undefined`; - \[`key`: `` `bytes23[${string}]` ``]: `undefined`; - \[`key`: `` `bytes24[${string}]` ``]: `undefined`; - \[`key`: `` `bytes25[${string}]` ``]: `undefined`; - \[`key`: `` `bytes26[${string}]` ``]: `undefined`; - \[`key`: `` `bytes27[${string}]` ``]: `undefined`; - \[`key`: `` `bytes28[${string}]` ``]: `undefined`; - \[`key`: `` `bytes29[${string}]` ``]: `undefined`; - \[`key`: `` `bytes30[${string}]` ``]: `undefined`; - \[`key`: `` `bytes31[${string}]` ``]: `undefined`; - \[`key`: `` `bytes32[${string}]` ``]: `undefined`; - \[`key`: `` `int[${string}]` ``]: `undefined`; - \[`key`: `` `int8[${string}]` ``]: `undefined`; - \[`key`: `` `int16[${string}]` ``]: `undefined`; - \[`key`: `` `int24[${string}]` ``]: `undefined`; - \[`key`: `` `int32[${string}]` ``]: `undefined`; - \[`key`: `` `int40[${string}]` ``]: `undefined`; - \[`key`: `` `int48[${string}]` ``]: `undefined`; - \[`key`: `` `int56[${string}]` ``]: `undefined`; - \[`key`: `` `int64[${string}]` ``]: `undefined`; - \[`key`: `` `int72[${string}]` ``]: `undefined`; - \[`key`: `` `int80[${string}]` ``]: `undefined`; - \[`key`: `` `int88[${string}]` ``]: `undefined`; - \[`key`: `` `int96[${string}]` ``]: `undefined`; - \[`key`: `` `int104[${string}]` ``]: `undefined`; - \[`key`: `` `int112[${string}]` ``]: `undefined`; - \[`key`: `` `int120[${string}]` ``]: `undefined`; - \[`key`: `` `int128[${string}]` ``]: `undefined`; - \[`key`: `` `int136[${string}]` ``]: `undefined`; - \[`key`: `` `int144[${string}]` ``]: `undefined`; - \[`key`: `` `int152[${string}]` ``]: `undefined`; - \[`key`: `` `int160[${string}]` ``]: `undefined`; - \[`key`: `` `int168[${string}]` ``]: `undefined`; - \[`key`: `` `int176[${string}]` ``]: `undefined`; - \[`key`: `` `int184[${string}]` ``]: `undefined`; - \[`key`: `` `int192[${string}]` ``]: `undefined`; - \[`key`: `` `int200[${string}]` ``]: `undefined`; - \[`key`: `` `int208[${string}]` ``]: `undefined`; - \[`key`: `` `int216[${string}]` ``]: `undefined`; - \[`key`: `` `int224[${string}]` ``]: `undefined`; - \[`key`: `` `int232[${string}]` ``]: `undefined`; - \[`key`: `` `int240[${string}]` ``]: `undefined`; - \[`key`: `` `int248[${string}]` ``]: `undefined`; - \[`key`: `` `int256[${string}]` ``]: `undefined`; - \[`key`: `` `uint[${string}]` ``]: `undefined`; - \[`key`: `` `uint8[${string}]` ``]: `undefined`; - \[`key`: `` `uint16[${string}]` ``]: `undefined`; - \[`key`: `` `uint24[${string}]` ``]: `undefined`; - \[`key`: `` `uint32[${string}]` ``]: `undefined`; - \[`key`: `` `uint40[${string}]` ``]: `undefined`; - \[`key`: `` `uint48[${string}]` ``]: `undefined`; - \[`key`: `` `uint56[${string}]` ``]: `undefined`; - \[`key`: `` `uint64[${string}]` ``]: `undefined`; - \[`key`: `` `uint72[${string}]` ``]: `undefined`; - \[`key`: `` `uint80[${string}]` ``]: `undefined`; - \[`key`: `` `uint88[${string}]` ``]: `undefined`; - \[`key`: `` `uint96[${string}]` ``]: `undefined`; - \[`key`: `` `uint104[${string}]` ``]: `undefined`; - \[`key`: `` `uint112[${string}]` ``]: `undefined`; - \[`key`: `` `uint120[${string}]` ``]: `undefined`; - \[`key`: `` `uint128[${string}]` ``]: `undefined`; - \[`key`: `` `uint136[${string}]` ``]: `undefined`; - \[`key`: `` `uint144[${string}]` ``]: `undefined`; - \[`key`: `` `uint152[${string}]` ``]: `undefined`; - \[`key`: `` `uint160[${string}]` ``]: `undefined`; - \[`key`: `` `uint168[${string}]` ``]: `undefined`; - \[`key`: `` `uint176[${string}]` ``]: `undefined`; - \[`key`: `` `uint184[${string}]` ``]: `undefined`; - \[`key`: `` `uint192[${string}]` ``]: `undefined`; - \[`key`: `` `uint200[${string}]` ``]: `undefined`; - \[`key`: `` `uint208[${string}]` ``]: `undefined`; - \[`key`: `` `uint216[${string}]` ``]: `undefined`; - \[`key`: `` `uint224[${string}]` ``]: `undefined`; - \[`key`: `` `uint232[${string}]` ``]: `undefined`; - \[`key`: `` `uint240[${string}]` ``]: `undefined`; - \[`key`: `` `uint248[${string}]` ``]: `undefined`; - \[`key`: `` `uint256[${string}]` ``]: `undefined`; - `string?`: `undefined`; - `address?`: `undefined`; - `bool?`: `undefined`; - `bytes?`: `undefined`; - `bytes1?`: `undefined`; - `bytes2?`: `undefined`; - `bytes3?`: `undefined`; - `bytes4?`: `undefined`; - `bytes5?`: `undefined`; - `bytes6?`: `undefined`; - `bytes7?`: `undefined`; - `bytes8?`: `undefined`; - `bytes9?`: `undefined`; - `bytes10?`: `undefined`; - `bytes11?`: `undefined`; - `bytes12?`: `undefined`; - `bytes13?`: `undefined`; - `bytes14?`: `undefined`; - `bytes15?`: `undefined`; - `bytes16?`: `undefined`; - `bytes17?`: `undefined`; - `bytes18?`: `undefined`; - `bytes19?`: `undefined`; - `bytes20?`: `undefined`; - `bytes21?`: `undefined`; - `bytes22?`: `undefined`; - `bytes23?`: `undefined`; - `bytes24?`: `undefined`; - `bytes25?`: `undefined`; - `bytes26?`: `undefined`; - `bytes27?`: `undefined`; - `bytes28?`: `undefined`; - `bytes29?`: `undefined`; - `bytes30?`: `undefined`; - `bytes31?`: `undefined`; - `bytes32?`: `undefined`; - `int8?`: `undefined`; - `int16?`: `undefined`; - `int24?`: `undefined`; - `int32?`: `undefined`; - `int40?`: `undefined`; - `int48?`: `undefined`; - `int56?`: `undefined`; - `int64?`: `undefined`; - `int72?`: `undefined`; - `int80?`: `undefined`; - `int88?`: `undefined`; - `int96?`: `undefined`; - `int104?`: `undefined`; - `int112?`: `undefined`; - `int120?`: `undefined`; - `int128?`: `undefined`; - `int136?`: `undefined`; - `int144?`: `undefined`; - `int152?`: `undefined`; - `int160?`: `undefined`; - `int168?`: `undefined`; - `int176?`: `undefined`; - `int184?`: `undefined`; - `int192?`: `undefined`; - `int200?`: `undefined`; - `int208?`: `undefined`; - `int216?`: `undefined`; - `int224?`: `undefined`; - `int232?`: `undefined`; - `int240?`: `undefined`; - `int248?`: `undefined`; - `int256?`: `undefined`; - `uint8?`: `undefined`; - `uint16?`: `undefined`; - `uint24?`: `undefined`; - `uint32?`: `undefined`; - `uint40?`: `undefined`; - `uint48?`: `undefined`; - `uint56?`: `undefined`; - `uint64?`: `undefined`; - `uint72?`: `undefined`; - `uint80?`: `undefined`; - `uint88?`: `undefined`; - `uint96?`: `undefined`; - `uint104?`: `undefined`; - `uint112?`: `undefined`; - `uint120?`: `undefined`; - `uint128?`: `undefined`; - `uint136?`: `undefined`; - `uint144?`: `undefined`; - `uint152?`: `undefined`; - `uint160?`: `undefined`; - `uint168?`: `undefined`; - `uint176?`: `undefined`; - `uint184?`: `undefined`; - `uint192?`: `undefined`; - `uint200?`: `undefined`; - `uint208?`: `undefined`; - `uint216?`: `undefined`; - `uint224?`: `undefined`; - `uint232?`: `undefined`; - `uint240?`: `undefined`; - `uint248?`: `undefined`; - `uint256?`: `undefined`; - } - | `Record`\<`string`, `unknown`> - - ‐ -
- `TPrimaryType` *extends* `string` | `number` | `symbol` - - keyof `TTypedData` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`TypedDataDefinition`](https://viem.sh)\<`TTypedData`, `TPrimaryType`> - - The typed data to sign -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -The signed typed data - -#### Implementation of - -```ts -SmartAccountSigner.signTypedData; -``` - ---- - -### toSolanaSigner() - -```ts -toSolanaSigner(): SolanaSigner; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:122](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L122) - -Creates a new instance of `SolanaSigner` using the inner client. - -#### Example - -```ts -import { AlchemyServerSigner } from "@account-kit/signer"; - -const signer = await createServerSigner({ - auth: { accessKey }, - connection: { - apiKey: "alchemy-api-key", - }, -}); - -const solanaSigner = signer.toSolanaSigner(); -``` - -#### Returns - -[`SolanaSigner`](SolanaSigner) - -A new instance of `SolanaSigner` diff --git a/docs/pages/reference/account-kit/signer/src/classes/AlchemySignerWebClient.mdx b/docs/pages/reference/account-kit/signer/src/classes/AlchemySignerWebClient.mdx deleted file mode 100644 index 3a5fe0a2bb..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/AlchemySignerWebClient.mdx +++ /dev/null @@ -1,3562 +0,0 @@ ---- -title: AlchemySignerWebClient -description: A lower level client used by the AlchemySigner used to communicate with Alchemy's signer service. -slug: wallets/reference/account-kit/signer/classes/AlchemySignerWebClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/client/index.ts:60](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L60) - -A lower level client used by the AlchemySigner used to communicate with -Alchemy's signer service. - -## Extends - -- [`BaseSignerClient`](BaseSignerClient)\<[`ExportWalletParams`](../type-aliases/ExportWalletParams), [`ExportWalletOutput`](../type-aliases/ExportWalletOutput)> - -## Constructors - -### Constructor - -```ts -new AlchemySignerWebClient(params): AlchemySignerWebClient; -``` - -Defined in: [account-kit/signer/src/client/index.ts:95](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L95) - -Initializes a new instance with the given parameters, setting up the connection, iframe configuration, and WebAuthn stamper. - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `Object` - - the parameters required to initialize the client -
- -#### Returns - -`AlchemySignerWebClient` - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`constructor`](BaseSignerClient#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `eventEmitter` - - `EventEmitter`\<[`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents)> -
- `iframeConfig` - - `object` -
- `iframeConfig.iframeContainerId` - - `string` -
- `iframeConfig.iframeElementId` - - `string` -
- `oauthCallbackUrl` - - `string` -
- `oauthConfig` - - `undefined` | [`OauthConfig`](../type-aliases/OauthConfig) -
- `rootOrg` - - `string` -
- `turnkeyClient` - - `TurnkeyClient` -
- -## Accessors - -### user - -#### Get Signature - -```ts -get protected user(): undefined | User; -``` - -Defined in: [account-kit/signer/src/client/base.ts:147](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L147) - -##### Returns - -`undefined` | [`User`](../type-aliases/User) - -#### Set Signature - -```ts -set protected user(user): void; -``` - -Defined in: [account-kit/signer/src/client/base.ts:151](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L151) - -##### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `undefined` | [`User`](../type-aliases/User) -
- -##### Returns - -`void` - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`user`](BaseSignerClient#user) - -## Methods - -### addMfa() - -```ts -addMfa(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1174](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1174) - -Initiates the setup of a new MFA factor for the current user. Mfa will need to be verified before it is active. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`AddMfaParams`](../type-aliases/AddMfaParams) - - The parameters required to enable a new MFA factor -
- -#### Returns - -`Promise`\<[`AddMfaResult`](../type-aliases/AddMfaResult)> - -A promise that resolves to the factor setup information - -#### Throws - -If no user is authenticated - -#### Throws - -If an unsupported factor type is provided - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`addMfa`](BaseSignerClient#addmfa) - ---- - -### addOauthProvider() - -```ts -addOauthProvider(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:616](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L616) - -Adds an OAuth provider for the authenticated user using the provided parameters. Throws an error if the user is not authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`AddOauthProviderParams`](../type-aliases/AddOauthProviderParams) - - The parameters for adding an OAuth provider, including `providerName` and `oidcToken`. -
- -#### Returns - -`Promise`\<[`OauthProviderInfo`](../type-aliases/OauthProviderInfo)> - -A Promise that resolves when the OAuth provider is added. - -#### Throws - -Throws if the user is not authenticated. - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`addOauthProvider`](BaseSignerClient#addoauthprovider) - ---- - -### addPasskey() - -```ts -addPasskey(options): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:509](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L509) - -Handles the creation of authenticators using WebAuthn attestation and the provided options. Requires the user to be authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `options` - - `CredentialCreationOptions` - - The options used to create the WebAuthn attestation -
- -#### Returns - -`Promise`\<`string`\[]> - -A promise that resolves to an array of authenticator IDs - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`addPasskey`](BaseSignerClient#addpasskey) - ---- - -### completeAuthWithBundle() - -```ts -completeAuthWithBundle(config): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:337](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L337) - -Completes auth for the user by injecting a credential bundle and retrieving -the user information based on the provided organization ID. Emits events -during the process. - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const account = await client.completeAuthWithBundle({ - orgId: "user-org-id", - bundle: "bundle-from-email", - connectedEventName: "connectedEmail", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - \{ `accessToken?`: `string`; `authenticatingType`: `"email"` | `"otp"` | `"sms"` | `"passkey"` | `"oauth"` | `"otpVerify"` | `"custom-jwt"`; `bundle`: `string`; `connectedEventName`: keyof [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents); `idToken?`: `string`; `orgId`: `string`; } - - The configuration object for the authentication function containing the - credential bundle to inject and the organization id associated with the - user, as well as the event to be emitted on success and optionally an OIDC - ID token with extra user information -
- `config.accessToken?` - - `string` - - ‐ -
- `config.authenticatingType` - - `"email"` | `"otp"` | `"sms"` | `"passkey"` | `"oauth"` | `"otpVerify"` | `"custom-jwt"` - - ‐ -
- `config.bundle` - - `string` - - ‐ -
- `config.connectedEventName` - - keyof [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents) - - ‐ -
- `config.idToken?` - - `string` - - ‐ -
- `config.orgId` - - `string` - - ‐ -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the authenticated user -information - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`completeAuthWithBundle`](BaseSignerClient#completeauthwithbundle) - ---- - -### createAccount() - -```ts -createAccount(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:176](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L176) - -Authenticates the user by either email or passkey account creation flow. Emits events during the process. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`CreateAccountParams`](../type-aliases/CreateAccountParams) - - The parameters for creating an account, including the type (email or passkey) and additional details. -
- -#### Returns - -`Promise`\<[`SignupResponse`](../type-aliases/SignupResponse)> - -A promise that resolves with the response object containing the account creation result. - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`createAccount`](BaseSignerClient#createaccount) - ---- - -### disconnect() - -```ts -disconnect(): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:461](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L461) - -Asynchronous function that clears the user and resets the iframe stamper. - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const account = await client.disconnect(); -``` - -#### Returns - -`Promise`\<`void`> - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`disconnect`](BaseSignerClient#disconnect) - ---- - -### experimental_addToMultiOwner() - -```ts -experimental_addToMultiOwner(orgId, members): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1019](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1019) - -This will add additional members to an existing multi-sig account - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId` - - `string` - - orgId of the multi-sig to add members to -
- `members` - - `` `0x${string}` ``\[] - - the addresses of the members to add -
- -#### Returns - -`Promise`\<`void`> - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_addToMultiOwner`](BaseSignerClient#experimental_addtomultiowner) - ---- - -### experimental_createApiKey() - -```ts -experimental_createApiKey(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:782](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L782) - -Creates an API key that can take any action on behalf of the current user. -(Note that this method is currently experimental and is subject to change.) - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`experimental_CreateApiKeyParams`](../type-aliases/experimental_CreateApiKeyParams) - - Parameters for creating the API key. -
- -#### Returns - -`Promise`\<`void`> - -#### Throws - -If there is no authenticated user or the API key creation fails. - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_createApiKey`](BaseSignerClient#experimental_createapikey) - ---- - -### experimental_createMultiOwner() - -```ts -experimental_createMultiOwner(additionalMembers): Promise<{ - evmSignerAddress: `0x${string}`; - members: object[]; - orgId: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:997](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L997) - -This will create a multi-owner account with the current user and additional specified signers - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `additionalMembers` - - `` `0x${string}` ``\[] - - members to add, aside from the currently authenticated user -
- -#### Returns - -`Promise`\<\{ -`evmSignerAddress`: `` `0x${string}` ``; -`members`: `object`\[]; -`orgId`: `string`; -}> - -created multi-owner account - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_createMultiOwner`](BaseSignerClient#experimental_createmultiowner) - ---- - -### experimental_deleteFromMultiOwner() - -```ts -experimental_deleteFromMultiOwner(orgId, members): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1057](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1057) - -This will remove members from an existing multi-sig account - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId` - - `string` - - orgId of the multi-sig to remove members from -
- `members` - - `` `0x${string}` ``\[] - - the addresses of the members to remove -
- -#### Returns - -`Promise`\<`void`> - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_deleteFromMultiOwner`](BaseSignerClient#experimental_deletefrommultiowner) - ---- - -### experimental_multiOwnerExportPrivateKeyEncrypted() - -```ts -experimental_multiOwnerExportPrivateKeyEncrypted(opts): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1571](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1571) - -Exports a private key for a given account in a multi-owner org - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `MultiOwnerExportPrivateKeyParams` & `object` - - the parameters for the export -
- -#### Returns - -`Promise`\<`ExportPrivateKeyEncryptedResult`> - -the private key - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_multiOwnerExportPrivateKeyEncrypted`](BaseSignerClient#experimental_multiownerexportprivatekeyencrypted) - ---- - -### experimental_multiOwnerSignRawMessage() - -```ts -experimental_multiOwnerSignRawMessage( - msg, - orgId, - orgAddress): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:960](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L960) - -This will sign on behalf of the multi-owner org, without doing any transformations on the message. -For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass -that result here. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `` `0x${string}` `` - - the hex representation of the bytes to sign -
- `orgId` - - `string` - - orgId of the multi-owner org to sign on behalf of -
- `orgAddress` - - `string` - - address of the multi-owner org to sign on behalf of -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -the signature over the raw hex - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_multiOwnerSignRawMessage`](BaseSignerClient#experimental_multiownersignrawmessage) - ---- - -### exportPrivateKeyEncrypted() - -```ts -exportPrivateKeyEncrypted(opts): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1519](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1519) - -Exports a private key for a given account encrypted with the provided public key - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `ExportPrivateKeyParams` & `object` - - the parameters for the export -
- -#### Returns - -`Promise`\<`ExportPrivateKeyEncryptedResult`> - -the private key - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`exportPrivateKeyEncrypted`](BaseSignerClient#exportprivatekeyencrypted) - ---- - -### exportWallet() - -```ts -exportWallet(config): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:395](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L395) - -Initiates the export of a wallet by creating an iframe stamper and calling the appropriate export function. -The export can be based on a seed phrase or a private key. - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const account = await client.exportWallet({ - iframeContainerId: "export-iframe-container", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`ExportWalletParams`](../type-aliases/ExportWalletParams) - - The parameters for exporting the wallet -
- -#### Returns - -`Promise`\<`boolean`> - -A promise that resolves when the export process is complete - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`exportWallet`](BaseSignerClient#exportwallet) - ---- - -### exportWalletInner() - -```ts -protected exportWalletInner(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:427](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L427) - -Exports wallet credentials based on the specified type, either as a SEED_PHRASE or PRIVATE_KEY. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - \{ `exportAs`: `"SEED_PHRASE"` | `"PRIVATE_KEY"`; `exportStamper`: `ExportWalletStamper`; } - - The parameters for exporting the wallet -
- `params.exportAs` - - `"SEED_PHRASE"` | `"PRIVATE_KEY"` - - Specifies the format for exporting the wallet, either as a SEED\_PHRASE or PRIVATE\_KEY -
- `params.exportStamper` - - `ExportWalletStamper` - - The stamper used for exporting the wallet -
- -#### Returns - -`Promise`\<`boolean`> - -A promise that resolves to true if the export is successful - ---- - -### getMfaFactors() - -```ts -getMfaFactors(): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1142](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1142) - -Retrieves the list of MFA factors configured for the current user. - -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to an array of configured MFA factors - -#### Throws - -If no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getMfaFactors`](BaseSignerClient#getmfafactors) - ---- - -### getOauthConfig() - -```ts -protected getOauthConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:730](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L730) - -#### Returns - -`Promise`\<[`OauthConfig`](../type-aliases/OauthConfig)> - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`getOauthConfig`](BaseSignerClient#getoauthconfig) - ---- - -### getOauthNonce() - -```ts -protected getOauthNonce(turnkeyPublicKey): string; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1509](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1509) - -Turnkey requires the nonce in the id token to be in this format. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `turnkeyPublicKey` - - `string` - - key from a Turnkey iframe -
- -#### Returns - -`string` - -nonce to be used in OIDC - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getOauthNonce`](BaseSignerClient#getoauthnonce) - ---- - -### getOauthProviderUrl() - -```ts -protected getOauthProviderUrl(args): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1334](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1334) - -Returns the authentication url for the selected OAuth Proivder - -#### Example - -```ts - -cosnt oauthParams = { - authProviderId: "google", - isCustomProvider: false, - auth0Connection: undefined, - scope: undefined, - claims: undefined, - mode: "redirect", - redirectUrl: "https://your-url-path/oauth-return", - expirationSeconds: 3000 -}; - -const turnkeyPublicKey = await this.initIframeStamper(); -const oauthCallbackUrl = this.oauthCallbackUrl; -const oauthConfig = this.getOauthConfig() // Optional value for OauthConfig() -const usesRelativeUrl = true // Optional value to determine if we use a relative (or absolute) url for the `redirect_url` - -const oauthProviderUrl = getOauthProviderUrl({ - oauthParams, - turnkeyPublicKey, - oauthCallbackUrl -}) - -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - [`GetOauthProviderUrlArgs`](../type-aliases/GetOauthProviderUrlArgs) - - Required. The Oauth provider's auth parameters -
- -#### Returns - -`Promise`\<`string`> - -returns the Oauth provider's url - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getOauthProviderUrl`](BaseSignerClient#getoauthproviderurl) - ---- - -### getPasskeyStatus() - -```ts -getPasskeyStatus(): Promise<{ - isPasskeyAdded: boolean; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:594](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L594) - -Retrieves the status of the passkey for the current user. Requires the user to be authenticated. - -#### Returns - -`Promise`\<\{ -`isPasskeyAdded`: `boolean`; -}> - -A promise that resolves to an object containing the passkey status - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getPasskeyStatus`](BaseSignerClient#getpasskeystatus) - ---- - -### getUser() - -```ts -getUser(): null | User; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1092](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1092) - -Returns the current user or null if no user is set. - -#### Returns - -`null` | [`User`](../type-aliases/User) - -the current user object or null if no user is available - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getUser`](BaseSignerClient#getuser) - ---- - -### getWebAuthnAttestation() - -```ts -protected getWebAuthnAttestation(options?, userDetails?): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:675](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L675) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `options?` - - [`CredentialCreationOptionOverrides`](../type-aliases/CredentialCreationOptionOverrides) -
- `userDetails?` - - \{ `username`: `string`; } -
- `userDetails.username?` - - `string` -
- -#### Returns - -`Promise`\<[`GetWebAuthnAttestationResult`](../type-aliases/GetWebAuthnAttestationResult)> - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`getWebAuthnAttestation`](BaseSignerClient#getwebauthnattestation) - ---- - -### initEmailAuth() - -```ts -initEmailAuth(params): Promise<{ - multiFactors?: MfaFactor[]; - orgId: string; - otpId?: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/index.ts:144](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L144) - -Begin authenticating a user with their email and an expiration time for the authentication request. Initializes the iframe stamper to get the target public key. -This method sends an email to the user to complete their login - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const account = await client.initEmailAuth({ email: "you@mail.com" }); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `Omit`\<[`EmailAuthParams`](../type-aliases/EmailAuthParams), `"targetPublicKey"`> - - The parameters for email authentication, excluding the target public key -
- -#### Returns - -`Promise`\<\{ -`multiFactors?`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -`orgId`: `string`; -`otpId?`: `string`; -}> - -The response from the authentication request - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`initEmailAuth`](BaseSignerClient#initemailauth) - ---- - -### initOauth() - -```ts -initOauth(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:142](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L142) - -Asynchronously fetches and sets the OAuth configuration. - -#### Returns - -`Promise`\<[`OauthConfig`](../type-aliases/OauthConfig)> - -A promise that resolves to the OAuth configuration - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`initOauth`](BaseSignerClient#initoauth) - ---- - -### initOtp() - -```ts -initOtp(type, contact): Promise<{ - otpId: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:492](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L492) - -Initiates an OTP (One-Time Password) verification process for a user contact. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `type` - - `"email"` | `"sms"` - - The type of OTP to send, either "email" or "sms" -
- `contact` - - `string` - - The email address or phone number to send the OTP to -
- -#### Returns - -`Promise`\<\{ -`otpId`: `string`; -}> - -A promise that resolves to an object containing the OTP ID - -#### Throws - -When no user is currently authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`initOtp`](BaseSignerClient#initotp) - ---- - -### initSessionStamper() - -```ts -protected initSessionStamper(): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:742](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L742) - -Initializes the session stamper and returns its public key. - -#### Returns - -`Promise`\<`string`> - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`initSessionStamper`](BaseSignerClient#initsessionstamper) - ---- - -### initSmsAuth() - -```ts -initSmsAuth(params): Promise<{ - multiFactors?: MfaFactor[]; - orgId: string; - otpId?: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/index.ts:195](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L195) - -Begin authenticating a user through sms. Initializes the iframe stamper to get the target public key. -This method sends a text message to the user to complete their login - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const account = await client.initSmsAuth({ phone: "+1234567890" }); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `Omit`\<[`SmsAuthParams`](../type-aliases/SmsAuthParams), `"targetPublicKey"`> - - The parameters for sms authentication, excluding the target public key -
- -#### Returns - -`Promise`\<\{ -`multiFactors?`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -`orgId`: `string`; -`otpId?`: `string`; -}> - -The response from the authentication request - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`initSmsAuth`](BaseSignerClient#initsmsauth) - ---- - -### initWebauthnStamper() - -```ts -protected initWebauthnStamper(user): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:765](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L765) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `undefined` | [`User`](../type-aliases/User) -
- -#### Returns - -`Promise`\<`void`> - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`initWebauthnStamper`](BaseSignerClient#initwebauthnstamper) - ---- - -### listAuthMethods() - -```ts -listAuthMethods(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:666](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L666) - -Retrieves the list of authentication methods for the current user. - -#### Returns - -`Promise`\<[`AuthMethods`](../type-aliases/AuthMethods)> - -A promise that resolves to the list of authentication methods - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`listAuthMethods`](BaseSignerClient#listauthmethods) - ---- - -### lookupUserByAccessKey() - -```ts -lookupUserByAccessKey(params): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:835](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L835) - -Looks up information based on an access key. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `LookupUserByAccessKeyParams` - - The access key parameters -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -The result of the lookup request - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserByAccessKey`](BaseSignerClient#lookupuserbyaccesskey) - ---- - -### lookupUserByEmail() - -```ts -lookupUserByEmail(email): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:815](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L815) - -Looks up information based on an email address. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - the email address to look up -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -the result of the lookup request - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserByEmail`](BaseSignerClient#lookupuserbyemail) - ---- - -### lookupUserByPhone() - -```ts -lookupUserByPhone(phone): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:825](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L825) - -Looks up information based on a phone number. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `phone` - - `string` - - the phone number to look up -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -the result of the lookup request - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserByPhone`](BaseSignerClient#lookupuserbyphone) - ---- - -### lookupUserWithPasskey() - -```ts -lookupUserWithPasskey(user?): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:572](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L572) - -Asynchronously handles the authentication process using WebAuthn Stamper. If a user is provided, sets the user and returns it. Otherwise, retrieves the current user and initializes the WebAuthn stamper. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault valueDescription
- `user?` - - [`User`](../type-aliases/User) - - `undefined` - - An optional user object to authenticate -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the authenticated user object - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserWithPasskey`](BaseSignerClient#lookupuserwithpasskey) - ---- - -### oauthWithPopup() - -```ts -oauthWithPopup(args): Promise< - | User - | AuthLinkingPrompt - | IdTokenOnly>; -``` - -Defined in: [account-kit/signer/src/client/index.ts:550](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L550) - -Initiates an OAuth authentication flow in a popup window and returns the authenticated user. - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const user = await client.oauthWithPopup({ - type: "oauth", - authProviderId: "google", - mode: "popup", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - | `object` & `object` & `object` | `object` & `object` & `object` | `object` & `object` & `object` - - The authentication parameters specifying OAuth type and popup mode -
- -#### Returns - -`Promise`\< -| [`User`](../type-aliases/User) -| [`AuthLinkingPrompt`](../type-aliases/AuthLinkingPrompt) -| [`IdTokenOnly`](../type-aliases/IdTokenOnly)> - -A promise that resolves to a `User` object containing the authenticated user information - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`oauthWithPopup`](BaseSignerClient#oauthwithpopup) - ---- - -### oauthWithRedirect() - -```ts -oauthWithRedirect(args): Promise< - | User - | IdTokenOnly>; -``` - -Defined in: [account-kit/signer/src/client/index.ts:506](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L506) - -Redirects the user to the OAuth provider URL based on the provided arguments. This function will always reject after 1 second if the redirection does not occur. - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -await client.oauthWithRedirect({ - type: "oauth", - authProviderId: "google", - mode: "redirect", - redirectUrl: "/", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - | `object` & `object` & `object` | `object` & `object` & `object` | `object` & `object` & `object` - - The arguments required to obtain the OAuth provider URL -
- -#### Returns - -`Promise`\< -| [`User`](../type-aliases/User) -| [`IdTokenOnly`](../type-aliases/IdTokenOnly)> - -A promise that will never resolve, only reject if the redirection fails - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`oauthWithRedirect`](BaseSignerClient#oauthwithredirect) - ---- - -### on() - -```ts -on(event, listener): () => any; -``` - -Defined in: [account-kit/signer/src/client/base.ts:314](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L314) - -Listen to events emitted by the client - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `E` *extends* keyof [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents) -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `event` - - `E` - - the event you want to listen to -
- `listener` - - [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents)\[`E`] - - the callback function to execute when an event is fired -
- -#### Returns - -a function that will remove the listener when called - -```ts -(): any; -``` - -##### Returns - -`any` - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`on`](BaseSignerClient#on) - ---- - -### pollActivityCompletion() - -```ts -protected pollActivityCompletion( - activity, - organizationId, - resultKey): Promise>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1454](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1454) - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* - | `"createOrganizationResult"` - | `"createAuthenticatorsResult"` - | `"createUsersResult"` - | `"createPrivateKeysResult"` - | `"createInvitationsResult"` - | `"acceptInvitationResult"` - | `"signRawPayloadResult"` - | `"createPolicyResult"` - | `"disablePrivateKeyResult"` - | `"deleteUsersResult"` - | `"deleteAuthenticatorsResult"` - | `"deleteInvitationResult"` - | `"deleteOrganizationResult"` - | `"deletePolicyResult"` - | `"createUserTagResult"` - | `"deleteUserTagsResult"` - | `"signTransactionResult"` - | `"deleteApiKeysResult"` - | `"createApiKeysResult"` - | `"createPrivateKeyTagResult"` - | `"deletePrivateKeyTagsResult"` - | `"setPaymentMethodResult"` - | `"activateBillingTierResult"` - | `"deletePaymentMethodResult"` - | `"createApiOnlyUsersResult"` - | `"updateRootQuorumResult"` - | `"updateUserTagResult"` - | `"updatePrivateKeyTagResult"` - | `"createSubOrganizationResult"` - | `"updateAllowedOriginsResult"` - | `"createPrivateKeysResultV2"` - | `"updateUserResult"` - | `"updatePolicyResult"` - | `"createSubOrganizationResultV3"` - | `"createWalletResult"` - | `"createWalletAccountsResult"` - | `"initUserEmailRecoveryResult"` - | `"recoverUserResult"` - | `"setOrganizationFeatureResult"` - | `"removeOrganizationFeatureResult"` - | `"exportPrivateKeyResult"` - | `"exportWalletResult"` - | `"createSubOrganizationResultV4"` - | `"emailAuthResult"` - | `"exportWalletAccountResult"` - | `"initImportWalletResult"` - | `"importWalletResult"` - | `"initImportPrivateKeyResult"` - | `"importPrivateKeyResult"` - | `"createPoliciesResult"` - | `"signRawPayloadsResult"` - | `"createReadOnlySessionResult"` - | `"createOauthProvidersResult"` - | `"deleteOauthProvidersResult"` - | `"createSubOrganizationResultV5"` - | `"oauthResult"` - | `"createReadWriteSessionResult"` - | `"createSubOrganizationResultV6"` - | `"deletePrivateKeysResult"` - | `"deleteWalletsResult"` - | `"createReadWriteSessionResultV2"` - | `"deleteSubOrganizationResult"` - | `"initOtpAuthResult"` - | `"otpAuthResult"` - | `"createSubOrganizationResultV7"` - | `"updateWalletResult"` - | `"updatePolicyResultV2"` - | `"initOtpAuthResultV2"` - | `"initOtpResult"` - | `"verifyOtpResult"` - | `"otpLoginResult"` - | `"stampLoginResult"` - | `"oauthLoginResult"` - | `"updateUserNameResult"` - | `"updateUserEmailResult"` - | `"updateUserPhoneNumberResult"` - | `"initFiatOnRampResult"` - | `"createSmartContractInterfaceResult"` - | `"deleteSmartContractInterfaceResult"` - | `"enableAuthProxyResult"` - | `"disableAuthProxyResult"` - | `"updateAuthProxyConfigResult"` - | `"createOauth2CredentialResult"` - | `"updateOauth2CredentialResult"` - | `"deleteOauth2CredentialResult"` - | `"oauth2AuthenticateResult"` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `activity` - - `Object` -
- `organizationId` - - `string` -
- `resultKey` - - `T` -
- -#### Returns - -`Promise`\<`NonNullable`\<`object`\[`T`]>> - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`pollActivityCompletion`](BaseSignerClient#pollactivitycompletion) - ---- - -### removeEmail() - -```ts -removeEmail(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:382](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L382) - -Removes the email for the authenticated user, disallowing them from login with that email. - -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the email is removed - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removeEmail`](BaseSignerClient#removeemail) - ---- - -### removeMfa() - -```ts -removeMfa(params): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1244](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1244) - -Removes existing MFA factors by ID. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`RemoveMfaParams`](../type-aliases/RemoveMfaParams) - - The parameters specifying which factors to disable -
- -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to the updated list of MFA factors - -#### Throws - -If no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removeMfa`](BaseSignerClient#removemfa) - ---- - -### removeOauthProvider() - -```ts -removeOauthProvider(providerId): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:644](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L644) - -Deletes a specified OAuth provider for the authenticated user. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `providerId` - - `string` - - The ID of the provider to be deleted -
- -#### Returns - -`Promise`\<`void`> - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removeOauthProvider`](BaseSignerClient#removeoauthprovider) - ---- - -### removePasskey() - -```ts -removePasskey(authenticatorId): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:551](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L551) - -Removes a passkey authenticator from the user's account. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `authenticatorId` - - `string` - - The ID of the authenticator to remove. -
- -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the authenticator is removed. - -#### Throws - -If the user is not authenticated. - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removePasskey`](BaseSignerClient#removepasskey) - ---- - -### removePhoneNumber() - -```ts -removePhoneNumber(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:451](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L451) - -Removes the phone number for the authenticated user, disallowing them from login with that phone number. - -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the phone number is removed - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removePhoneNumber`](BaseSignerClient#removephonenumber) - ---- - -### request() - -```ts -request(route, body): Promise>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1104](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1104) - -Sends a POST request to the given signer route with the specified body and returns the response. -Not intended to be used directly, use the specific methods instead on the client instead. - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `R` *extends* - | `"/v1/signup"` - | `"/v1/whoami"` - | `"/v1/auth"` - | `"/v1/lookup"` - | `"/v1/init-otp"` - | `"/v1/verify-otp"` - | `"/v1/sign-payload"` - | `"/v1/update-email-auth"` - | `"/v1/update-phone-auth"` - | `"/v1/add-oauth-provider"` - | `"/v1/remove-oauth-provider"` - | `"/v1/list-auth-methods"` - | `"/v1/prepare-oauth"` - | `"/v1/otp"` - | `"/v1/auth-list-multi-factors"` - | `"/v1/auth-delete-multi-factors"` - | `"/v1/auth-request-multi-factor"` - | `"/v1/auth-verify-multi-factor"` - | `"/v1/auth-jwt"` - | `"/v1/signer-config"` - | `"/v1/auth-validate-multi-factors"` - | `"/v1/multi-owner-create"` - | `"/v1/multi-owner-prepare-add"` - | `"/v1/multi-owner-add"` - | `"/v1/multi-owner-update-root-quorum"` - | `"/v1/multi-owner-sign-raw-payload"` - | `"/v1/multi-owner-prepare-delete"` - | `"/v1/multi-owner-delete"` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `route` - - `R` - - The route to which the request should be sent -
- `body` - - [`SignerBody`](../type-aliases/SignerBody)\<`R`> - - The request body containing the data to be sent -
- -#### Returns - -`Promise`\<[`SignerResponse`](../type-aliases/SignerResponse)\<`R`>> - -A promise that resolves to the response from the signer - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`request`](BaseSignerClient#request) - ---- - -### setEmail() - -Implementation for setEmail method with optional OTP verification. - -#### Param - -An OTP object containing the OTP ID & OTP code (or an email address for legacy usage) - -#### Call Signature - -```ts -setEmail(email): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:336](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L336) - -Sets the email for the authenticated user, allowing them to login with that -email. - -##### Deprecated - -You must contact Alchemy to enable this feature for your team, -as there are important security considerations. In particular, you must not -call this without first validating that the user owns this email account. -Recommended to use the email verification flow instead. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - The email to set for the user -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email - -##### Throws - -If the user is not authenticated - -##### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setEmail`](BaseSignerClient#setemail) - -#### Call Signature - -```ts -setEmail(otp): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:346](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L346) - -Sets the email for the authenticated user, allowing them to login with that -email. Must be called after calling `initOtp` with the email. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `otp` - - [`VerificationOtp`](../type-aliases/VerificationOtp) - - The OTP verification object including the OTP ID and OTP code -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email - -##### Throws - -If the user is not authenticated - -##### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setEmail`](BaseSignerClient#setemail) - ---- - -### setPhoneNumber() - -```ts -setPhoneNumber(otp): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:436](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L436) - -Updates the phone number for the authenticated user, allowing them to login with that -phone number. Must be called after calling `initOtp` with the phone number. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `otp` - - [`VerificationOtp`](../type-aliases/VerificationOtp) - - The OTP object including the OTP ID and OTP code -
- -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the phone number is set - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setPhoneNumber`](BaseSignerClient#setphonenumber) - ---- - -### setStamper() - -```ts -protected setStamper(stamper): void; -``` - -Defined in: [account-kit/signer/src/client/base.ts:166](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L166) - -Sets the stamper of the TurnkeyClient. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `stamper` - - `TStamper` - - the stamper function to set for the TurnkeyClient -
- -#### Returns - -`void` - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setStamper`](BaseSignerClient#setstamper) - ---- - -### signRawMessage() - -```ts -signRawMessage(msg, mode): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:852](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L852) - -This will sign a message with the user's private key, without doing any transformations on the message. -For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass -that result here. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault valueDescription
- `msg` - - `` `0x${string}` `` - - `undefined` - - the hex representation of the bytes to sign -
- `mode` - - `"SOLANA"` | `"ETHEREUM"` - - `"ETHEREUM"` - - specify if signing should happen for solana or ethereum -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -the signature over the raw hex - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`signRawMessage`](BaseSignerClient#signrawmessage) - ---- - -### stampGetOrganization() - -```ts -stampGetOrganization(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:760](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L760) - -Generates a stamped getOrganization request for the current user. - -#### Returns - -`Promise`\<`TSignedRequest`> - -a promise that resolves to the "getOrganization" information for the logged in user - -#### Throws - -if no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`stampGetOrganization`](BaseSignerClient#stampgetorganization) - ---- - -### stampWhoami() - -```ts -stampWhoami(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:744](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L744) - -Generates a stamped whoami request for the current user. This request can then be used to call /signer/v1/whoami to get the user information. -This is useful if you want to get the user information in a different context like a server. You can pass the stamped request to the server -and then call our API to get the user information. Using this stamp is the most trusted way to get the user information since a stamp can only -belong to the user who created it. - -#### Returns - -`Promise`\<`TSignedRequest`> - -a promise that resolves to the "whoami" information for the logged in user - -#### Throws - -if no organization ID is provided - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`stampWhoami`](BaseSignerClient#stampwhoami) - ---- - -### submitJwt() - -```ts -submitJwt(args): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:295](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L295) - -Authenticates using a custom issued JWT - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const account = await client.submitJwt({ - jwt: "custom-issued-jwt", - authProvider: "auth-provider-name", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - `Omit`\<[`JwtParams`](../type-aliases/JwtParams), `"targetPublicKey"`> - - The parameters for the JWT request, excluding the target public key. -
- -#### Returns - -`Promise`\<[`JwtResponse`](../type-aliases/JwtResponse)> - -A promise that resolves to an object containing the credential bundle. - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`submitJwt`](BaseSignerClient#submitjwt) - ---- - -### submitOtpCode() - -```ts -submitOtpCode(args): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:234](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L234) - -Authenticates using an OTP code which was previously received via email. - -#### Example - -```ts -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const account = await client.submitOtpCode({ - orgId: "user-org-id", - otpId: "opt-returned-from-initEmailAuth", - otpCode: "otp-code-from-email", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - `Omit`\<[`OtpParams`](../type-aliases/OtpParams), `"targetPublicKey"`> - - The parameters for the OTP request, excluding the target public key. -
- -#### Returns - -`Promise`\<[`SubmitOtpCodeResponse`](../type-aliases/SubmitOtpCodeResponse)> - -A promise that resolves to an object containing the credential bundle. - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`submitOtpCode`](BaseSignerClient#submitotpcode) - ---- - -### targetPublicKey() - -```ts -targetPublicKey(): Promise; -``` - -Defined in: [account-kit/signer/src/client/index.ts:671](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L671) - -Initializes the iframe stamper and returns its public key. - -#### Example - -```ts twoslash -import { AlchemySignerWebClient } from "@account-kit/signer"; - -const client = new AlchemySignerWebClient({ - connection: { - apiKey: "your-api-key", - }, - iframeConfig: { - iframeContainerId: "signer-iframe-container", - }, -}); - -const publicKey = await client.targetPublicKey(); -``` - -#### Returns - -`Promise`\<`string`> - -A promise that resolves with the target public key when the iframe stamper is successfully initialized, or throws an error if the target public key is not supported. - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`targetPublicKey`](BaseSignerClient#targetpublickey) - ---- - -### validateMultiFactors() - -```ts -validateMultiFactors(params): Promise<{ - bundle: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1276](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1276) - -Validates multiple MFA factors using the provided encrypted payload and MFA codes. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`ValidateMultiFactorsParams`](../type-aliases/ValidateMultiFactorsParams) - - The validation parameters -
- -#### Returns - -`Promise`\<\{ -`bundle`: `string`; -}> - -A promise that resolves to an object containing the credential bundle - -#### Throws - -If no credential bundle is returned from the server - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`validateMultiFactors`](BaseSignerClient#validatemultifactors) - ---- - -### verifyMfa() - -```ts -verifyMfa(params): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1211](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1211) - -Verifies a newly created MFA factor to complete the setup process. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`VerifyMfaParams`](../type-aliases/VerifyMfaParams) - - The parameters required to verify the MFA factor -
- -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to the updated list of MFA factors - -#### Throws - -If no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`verifyMfa`](BaseSignerClient#verifymfa) - ---- - -### whoami() - -```ts -whoami( - orgId?, - idToken?, - accessToken?): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:684](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L684) - -Retrieves the current user or fetches the user information if not already available. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId?` - - `string` - - optional organization ID, defaults to the user's organization ID -
- `idToken?` - - `string` - - an OIDC ID token containing additional user information -
- `accessToken?` - - `string` - - an access token which if provided will be added to the user -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the user object - -#### Throws - -if no organization ID is provided when there is no current user - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`whoami`](BaseSignerClient#whoami) diff --git a/docs/pages/reference/account-kit/signer/src/classes/AlchemyWebSigner.mdx b/docs/pages/reference/account-kit/signer/src/classes/AlchemyWebSigner.mdx deleted file mode 100644 index c78ed980bf..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/AlchemyWebSigner.mdx +++ /dev/null @@ -1,1737 +0,0 @@ ---- -title: AlchemyWebSigner -description: A SmartAccountSigner that can be used with any SmartContractAccount -slug: wallets/reference/account-kit/signer/classes/AlchemyWebSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/signer.ts:122](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L122) - -A SmartAccountSigner that can be used with any SmartContractAccount - -## Extends - -- [`BaseAlchemySigner`](BaseAlchemySigner)\<[`AlchemySignerWebClient`](AlchemySignerWebClient)> - -## Constructors - -### Constructor - -```ts -new AlchemyWebSigner(params): AlchemyWebSigner; -``` - -Defined in: [account-kit/signer/src/signer.ts:146](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L146) - -Initializes an instance with the provided Alchemy signer parameters after parsing them with a schema. - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `Object` - - The parameters for the Alchemy signer, including the client and session configuration -
- -#### Returns - -`AlchemyWebSigner` - -#### Overrides - -[`BaseAlchemySigner`](BaseAlchemySigner).[`constructor`](BaseAlchemySigner#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault valueDescription
- `addMfa` - - (`params`) => `Promise`\<[`AddMfaResult`](../type-aliases/AddMfaResult)> - - `undefined` - - Initiates the setup of a new MFA factor for the current user. - The factor will need to be verified using verifyMfa before it becomes active. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.addMfa({ multiFactorType: "totp" }); - // Result contains multiFactorTotpUrl to display as QR code - ``` - - **Throws** - - If no user is authenticated -
- `addPasskey` - - (`params?`) => `Promise`\<`string`\[]> - - `undefined` - - Adds a passkey to the user's account - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.addPasskey() - ``` -
- `authenticate` - - (`params`) => `Promise`\<[`User`](../type-aliases/User)> - - `undefined` - - Authenticate a user with either an email or a passkey and create a session for that user - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.authenticate({ - type: "email", - email: "foo@mail.com", - }); - ``` -
- `disconnect` - - () => `Promise`\<`void`> - - `undefined` - - Clear a user session and log them out - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - await signer.disconnect(); - ``` -
- `exportPrivateKeyEncrypted` - - (`opts`) => `Promise`\<`ExportPrivateKeyEncryptedResult`> - - `undefined` - - Exports a private key for a given account encrypted with the provided public key - - **Param** - - the parameters for the export -
- `exportWallet` - - (`config`) => `Promise`\<`boolean`> - - `undefined` - - Used to export the wallet for a given user - If the user is authenticated with an Email, this will return a seed phrase - If the user is authenticated with a Passkey, this will return a private key - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - // the params passed to this are different based on the specific signer - const result = signer.exportWallet() - ``` - - **Param** - - exportWallet parameters -
- `getAddress` - - () => `Promise`\<`` `0x${string}` ``> - - `undefined` - - Retrieves the address of the current user by calling the `whoami` method on `this.inner`. -
- `getMfaFactors` - - () => `Promise`\<\{ `multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; }> - - `undefined` - - Retrieves the list of MFA factors configured for the current user. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const { multiFactors } = await signer.getMfaFactors(); - ``` - - **Throws** - - If no user is authenticated -
- `getPasskeyStatus` - - () => `Promise`\<\{ `isPasskeyAdded`: `boolean`; }> - - `undefined` - - ‐ -
- `inner` - - [`AlchemySignerWebClient`](AlchemySignerWebClient) - - `undefined` - - ‐ -
- `removeEmail` - - () => `Promise`\<`void`> - - `undefined` - - Removes the email for the authenticated user, disallowing them from login with that email. - - **Throws** - - If the user is not authenticated -
- `removeMfa` - - (`params`) => `Promise`\<\{ `multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; }> - - `undefined` - - Removes existing MFA factors by their IDs. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.removeMfa({ - multiFactorIds: ["factor-id-1", "factor-id-2"] - }); - ``` - - **Throws** - - If no user is authenticated -
- `removePasskey` - - (`authenticatorId`) => `Promise`\<`void`> - - `undefined` - - Removes a passkey from a user's account - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const authMethods = await signer.listAuthMethods(); - const passkey = authMethods.passkeys[0]; - - const result = await signer.removePasskey(passkey.authenticatorId); - ``` -
- `removePhoneNumber` - - () => `Promise`\<`void`> - - `undefined` - - Removes the phone number for the authenticated user, disallowing them from login with that phone number. - - **Throws** - - If the user is not authenticated -
- `sendVerificationCode` - - (`type`, `contact`) => `Promise`\<\{ `otpId`: `string`; }> - - `undefined` - - Initiates an OTP (One-Time Password) verification process for a user contact. - Use this method before calling `setEmail` with verification code to verify ownership of the email address. - - **Throws** - - If the user is not authenticated -
- `setPhoneNumber` - - (`params`) => `Promise`\<`void`> - - `undefined` - - Sets the phone number for the authenticated user, allowing them to login with that - phone number. `sendVerificationCode` should be called first to obtain the code. - - **Throws** - - If the user is not authenticated -
- `signAuthorization` - - (`unsignedAuthorization`) => `Promise`\<[`SignedAuthorization`](https://viem.sh)\<`number`>> - - `undefined` - - Signs an EIP-7702 Authorization and then returns the authorization with the signature. - - **Example** - - ```ts twoslash - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const tx = await signer.signAuthorization({ - contractAddress: "0x1234123412341234123412341234123412341234", - chainId: 1, - nonce: 0, - }); - ``` -
- `signerType` - - `"alchemy-signer"` | `"rn-alchemy-signer"` - - `"alchemy-signer"` - - ‐ -
- `signMessage` - - (`msg`) => `Promise`\<`` `0x${string}` ``> - - `undefined` - - Signs a raw message after hashing it. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const signature = await signer.signMessage("Hello, world!"); - ``` -
- `signTransaction` - - \<`serializer`, `transaction`>(`transaction`, `options?`) => `Promise`\<[`IsNarrowable`](https://viem.sh)\<[`TransactionSerialized`](https://viem.sh)\<[`GetTransactionType`](https://viem.sh)\<`transaction`>>, `` `0x${string}` ``> *extends* `true` ? [`TransactionSerialized`](https://viem.sh)\<[`GetTransactionType`](https://viem.sh)\<`transaction`>> : `` `0x${string}` ``> - - `undefined` - - Serializes a transaction, signs it with a raw message, and then returns the serialized transaction with the signature. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const tx = await signer.signTransaction({ - to: "0x1234", - value: "0x1234", - data: "0x1234", - }); - ``` -
- `signTypedData` - - \<`TTypedData`, `TPrimaryType`>(`params`) => `Promise`\<`` `0x${string}` ``> - - `undefined` - - Signs a typed message by first hashing it and then signing the hashed message using the `signRawMessage` method. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const signature = await signer.signTypedData({ - domain: {}, - types: {}, - primaryType: "", - message: {}, - }); - ``` -
- `verifyMfa` - - (`params`) => `Promise`\<\{ `multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; }> - - `undefined` - - Verifies a newly created MFA factor to complete the setup process. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.verifyMfa({ - multiFactorId: "factor-id", - multiFactorCode: "123456" // 6-digit code from authenticator app - }); - ``` - - **Throws** - - If no user is authenticated -
- -## Methods - -### addOauthProvider() - -```ts -addOauthProvider(args): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1270](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1270) - -Handles OAuth authentication by augmenting the provided arguments with a type and performing authentication based on the OAuth mode (either using redirect or popup). - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - `Omit`\<`Extract`\<`AuthParams`, \{ `type`: `"oauth"`; }>, `"type"`> - - Authentication parameters omitting the type, which will be set to "oauth" -
- -#### Returns - -`Promise`\<[`OauthProviderInfo`](../type-aliases/OauthProviderInfo)> - -A promise that resolves to an `OauthProviderInfo` object containing provider information and the ID token. - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`addOauthProvider`](BaseAlchemySigner#addoauthprovider) - ---- - -### fetchConfig() - -```ts -protected fetchConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1892](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1892) - -#### Returns - -`Promise`\<`SignerConfig`> - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`fetchConfig`](BaseAlchemySigner#fetchconfig) - ---- - -### getAuthDetails() - -```ts -getAuthDetails(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:479](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L479) - -Gets the current logged in user -If a user has an ongoing session, it will use that session and -try to authenticate - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -// throws if not logged in -const user = await signer.getAuthDetails(); -``` - -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -the current user - -#### Throws - -if there is no user logged in - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`getAuthDetails`](BaseAlchemySigner#getauthdetails) - ---- - -### getConfig() - -```ts -getConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1884](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1884) - -Returns the signer configuration while fetching it if it's not already initialized. - -#### Returns - -`Promise`\<`SignerConfig`> - -A promise that resolves to the signer configuration - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`getConfig`](BaseAlchemySigner#getconfig) - ---- - -### getMfaStatus() - -```ts -getMfaStatus(): object; -``` - -Defined in: [account-kit/signer/src/base.ts:719](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L719) - -Gets the current MFA status - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const mfaStatus = signer.getMfaStatus(); -if (mfaStatus === AlchemyMfaStatus.REQUIRED) { - // Handle MFA requirement -} -``` - -#### Returns - -`object` - -The current MFA status - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `mfaFactorId?` - - `string` -
- `mfaRequired` - - `boolean` -
- -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`getMfaStatus`](BaseAlchemySigner#getmfastatus) - ---- - -### getUser() - -Unauthenticated call to look up a user's organizationId by email or phone - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const result = await signer.getUser({ type: "email", value: "foo@mail.com" }); -``` - -#### Param - -the params to look up - -#### Call Signature - -```ts -getUser(email): Promise< - | null - | { - orgId: string; -}>; -``` - -Defined in: [account-kit/signer/src/base.ts:752](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L752) - -Unauthenticated call to look up a user's organizationId by email - -##### Deprecated - -Use getUser(\{ type: "email", value: email }) instead - -##### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const result = await signer.getUser("foo@mail.com"); -``` - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - the email to lookup -
- -##### Returns - -`Promise`\< -| `null` -| \{ -`orgId`: `string`; -}> - -the organization id for the user if they exist - -##### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`getUser`](BaseAlchemySigner#getuser) - -#### Call Signature - -```ts -getUser(params): Promise< - | null - | { - orgId: string; -}>; -``` - -Defined in: [account-kit/signer/src/base.ts:777](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L777) - -Unauthenticated call to look up a user's organizationId by email or phone - -##### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const result = await signer.getUser({ type: "email", value: "foo@mail.com" }); -``` - -##### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `GetUserParams` -
- -##### Returns - -`Promise`\< -| `null` -| \{ -`orgId`: `string`; -}> - -the organization id for the user if they exist - -##### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`getUser`](BaseAlchemySigner#getuser) - ---- - -### initConfig() - -```ts -protected initConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1874](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1874) - -#### Returns - -`Promise`\<`SignerConfig`> - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`initConfig`](BaseAlchemySigner#initconfig) - ---- - -### listAuthMethods() - -```ts -listAuthMethods(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1315](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1315) - -Retrieves a list of auth methods associated with the authenticated user. - -#### Returns - -`Promise`\<[`AuthMethods`](../type-aliases/AuthMethods)> - -A promise that resolves to an `AuthMethods` object containing the user's email, OAuth providers, and passkeys. - -#### Throws - -Thrown if the user is not authenticated - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`listAuthMethods`](BaseAlchemySigner#listauthmethods) - ---- - -### on() - -```ts -on(event, listener): () => void; -``` - -Defined in: [account-kit/signer/src/base.ts:183](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L183) - -Allows you to subscribe to events emitted by the signer - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `E` *extends* keyof [`AlchemySignerEvents`](../type-aliases/AlchemySignerEvents) -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `event` - - `E` - - the event to subscribe to -
- `listener` - - [`AlchemySignerEvents`](../type-aliases/AlchemySignerEvents)\[`E`] - - the function to run when the event is emitted -
- -#### Returns - -a function to remove the listener - -```ts -(): void; -``` - -##### Returns - -`void` - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`on`](BaseAlchemySigner#on) - ---- - -### preparePopupOauth() - -```ts -preparePopupOauth(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:285](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L285) - -Prepares the config needed to use popup-based OAuth login. This must be -called before calling `.authenticate` with params `{ type: "oauth", mode: -"popup" }`, and is recommended to be called on page load. - -This method exists because browsers may prevent popups from opening unless -triggered by user interaction, and so the OAuth config must already have -been fetched at the time a user clicks a social login button. - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -await signer.preparePopupOauth(); -``` - -#### Returns - -`Promise`\<[`OauthConfig`](../type-aliases/OauthConfig)> - -the config which must be loaded before -using popup-based OAuth - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`preparePopupOauth`](BaseAlchemySigner#preparepopupoauth) - ---- - -### removeOauthProvider() - -```ts -removeOauthProvider(providerId): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1302](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1302) - -Removes an OAuth provider by its ID if the user is authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `providerId` - - `string` - - The ID of the OAuth provider to be removed, as obtained from `listOauthProviders` -
- -#### Returns - -`Promise`\<`any`> - -A promise indicating the result of the removal process - -#### Throws - -Thrown if the user is not authenticated - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`removeOauthProvider`](BaseAlchemySigner#removeoauthprovider) - ---- - -### setEmail() - -Implementation for setEmail method. - -#### Param - -An object containing the verificationCode (or simply an email for legacy usage) - -#### Call Signature - -```ts -setEmail(email): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:842](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L842) - -Sets the email for the authenticated user, allowing them to login with that -email. - -##### Deprecated - -You must contact Alchemy to enable this feature for your team, -as there are important security considerations. In particular, you must not -call this without first validating that the user owns this email account. -It is recommended to now use the email verification flow instead. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - The email to set for the user -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email address - -##### Throws - -If the user is not authenticated - -##### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`setEmail`](BaseAlchemySigner#setemail) - -#### Call Signature - -```ts -setEmail(params): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:854](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L854) - -Uses a verification code to update a user's email, allowing them to login -with that email. `sendVerificationCode` should be called first to obtain -the code. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `VerificationParams` - - An object containing the verification code -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email address - -##### Throws - -If the user is not authenticated - -##### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`setEmail`](BaseAlchemySigner#setemail) - ---- - -### toSolanaSigner() - -```ts -toSolanaSigner(): SolanaSigner; -``` - -Defined in: [account-kit/signer/src/base.ts:1133](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1133) - -Creates a new instance of `SolanaSigner` using the provided inner value. -This requires the signer to be authenticated first - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const solanaSigner = signer.toSolanaSigner(); -``` - -#### Returns - -[`SolanaSigner`](SolanaSigner) - -A new instance of `SolanaSigner` - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`toSolanaSigner`](BaseAlchemySigner#tosolanasigner) - ---- - -### toViemAccount() - -```ts -toViemAccount(): Object; -``` - -Defined in: [account-kit/signer/src/base.ts:1089](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1089) - -This method lets you adapt your AlchemySigner to a viem LocalAccount, which -will let you use the signer as an EOA directly. - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const account = signer.toViemAccount(); -``` - -#### Returns - -`Object` - -a LocalAccount object that can be used with viem's wallet client - -#### Throws - -if your signer is not authenticated - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`toViemAccount`](BaseAlchemySigner#toviemaccount) - ---- - -### validateMultiFactors() - -```ts -validateMultiFactors(params): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1815](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1815) - -Validates MFA factors that were required during authentication. -This function should be called after MFA is required and the user has provided their MFA code. -It completes the authentication process by validating the MFA factors and completing the auth bundle. - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -// After MFA is required and user provides code -const user = await signer.validateMultiFactors({ - multiFactorCode: "123456", // 6-digit code from authenticator app - multiFactorId: "factor-id", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`ValidateMultiFactorsArgs`](../type-aliases/ValidateMultiFactorsArgs) - - Parameters for validating MFA factors -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the authenticated user - -#### Throws - -If there is no pending MFA context or if orgId is not found - -#### Inherited from - -[`BaseAlchemySigner`](BaseAlchemySigner).[`validateMultiFactors`](BaseAlchemySigner#validatemultifactors) diff --git a/docs/pages/reference/account-kit/signer/src/classes/BaseAlchemySigner.mdx b/docs/pages/reference/account-kit/signer/src/classes/BaseAlchemySigner.mdx deleted file mode 100644 index d87ece40ae..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/BaseAlchemySigner.mdx +++ /dev/null @@ -1,1679 +0,0 @@ ---- -title: BaseAlchemySigner -description: Base abstract class for Alchemy Signer, providing authentication and session management for smart accounts. Implements the `SmartAccountAuthenticator` interface and handles various signer events. -slug: wallets/reference/account-kit/signer/classes/BaseAlchemySigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/base.ts:119](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L119) - -Base abstract class for Alchemy Signer, providing authentication and session management for smart accounts. -Implements the `SmartAccountAuthenticator` interface and handles various signer events. - -## Extended by - -- [`AlchemyWebSigner`](AlchemyWebSigner) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TClient` *extends* `BaseSignerClient` -
- -## Implements - -- `SmartAccountAuthenticator`\<`AuthParams`, [`User`](../type-aliases/User), `TClient`> - -## Constructors - -### Constructor - -```ts -new BaseAlchemySigner(param0): BaseAlchemySigner; -``` - -Defined in: [account-kit/signer/src/base.ts:138](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L138) - -Initializes an instance with the provided client and session configuration. -This function sets up the internal store, initializes the session manager, -registers listeners and initializes the session manager to manage session state. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `param0` - - `BaseAlchemySignerParams`\<`TClient`> - - Object containing the client and session configuration -
- -#### Returns - -`BaseAlchemySigner`\<`TClient`> - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault valueDescription
- `addMfa` - - (`params`) => `Promise`\<[`AddMfaResult`](../type-aliases/AddMfaResult)> - - `undefined` - - Initiates the setup of a new MFA factor for the current user. - The factor will need to be verified using verifyMfa before it becomes active. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.addMfa({ multiFactorType: "totp" }); - // Result contains multiFactorTotpUrl to display as QR code - ``` - - **Throws** - - If no user is authenticated -
- `addPasskey` - - (`params?`) => `Promise`\<`string`\[]> - - `undefined` - - Adds a passkey to the user's account - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.addPasskey() - ``` -
- `authenticate` - - (`params`) => `Promise`\<[`User`](../type-aliases/User)> - - `undefined` - - Authenticate a user with either an email or a passkey and create a session for that user - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.authenticate({ - type: "email", - email: "foo@mail.com", - }); - ``` -
- `disconnect` - - () => `Promise`\<`void`> - - `undefined` - - Clear a user session and log them out - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - await signer.disconnect(); - ``` -
- `exportPrivateKeyEncrypted` - - `TClient`\[`"exportPrivateKeyEncrypted"`] - - `undefined` - - Exports a private key for a given account encrypted with the provided public key - - **Param** - - the parameters for the export -
- `exportWallet` - - `TClient`\[`"exportWallet"`] - - `undefined` - - Used to export the wallet for a given user - If the user is authenticated with an Email, this will return a seed phrase - If the user is authenticated with a Passkey, this will return a private key - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - // the params passed to this are different based on the specific signer - const result = signer.exportWallet() - ``` - - **Param** - - exportWallet parameters -
- `getAddress` - - () => `Promise`\<`` `0x${string}` ``> - - `undefined` - - Retrieves the address of the current user by calling the `whoami` method on `this.inner`. -
- `getMfaFactors` - - () => `Promise`\<\{ `multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; }> - - `undefined` - - Retrieves the list of MFA factors configured for the current user. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const { multiFactors } = await signer.getMfaFactors(); - ``` - - **Throws** - - If no user is authenticated -
- `getPasskeyStatus` - - () => `Promise`\<\{ `isPasskeyAdded`: `boolean`; }> - - `undefined` - - ‐ -
- `inner` - - `TClient` - - `undefined` - - ‐ -
- `removeEmail` - - () => `Promise`\<`void`> - - `undefined` - - Removes the email for the authenticated user, disallowing them from login with that email. - - **Throws** - - If the user is not authenticated -
- `removeMfa` - - (`params`) => `Promise`\<\{ `multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; }> - - `undefined` - - Removes existing MFA factors by their IDs. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.removeMfa({ - multiFactorIds: ["factor-id-1", "factor-id-2"] - }); - ``` - - **Throws** - - If no user is authenticated -
- `removePasskey` - - (`authenticatorId`) => `Promise`\<`void`> - - `undefined` - - Removes a passkey from a user's account - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const authMethods = await signer.listAuthMethods(); - const passkey = authMethods.passkeys[0]; - - const result = await signer.removePasskey(passkey.authenticatorId); - ``` -
- `removePhoneNumber` - - () => `Promise`\<`void`> - - `undefined` - - Removes the phone number for the authenticated user, disallowing them from login with that phone number. - - **Throws** - - If the user is not authenticated -
- `sendVerificationCode` - - (`type`, `contact`) => `Promise`\<\{ `otpId`: `string`; }> - - `undefined` - - Initiates an OTP (One-Time Password) verification process for a user contact. - Use this method before calling `setEmail` with verification code to verify ownership of the email address. - - **Throws** - - If the user is not authenticated -
- `setPhoneNumber` - - (`params`) => `Promise`\<`void`> - - `undefined` - - Sets the phone number for the authenticated user, allowing them to login with that - phone number. `sendVerificationCode` should be called first to obtain the code. - - **Throws** - - If the user is not authenticated -
- `signAuthorization` - - (`unsignedAuthorization`) => `Promise`\<[`SignedAuthorization`](https://viem.sh)\<`number`>> - - `undefined` - - Signs an EIP-7702 Authorization and then returns the authorization with the signature. - - **Example** - - ```ts twoslash - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const tx = await signer.signAuthorization({ - contractAddress: "0x1234123412341234123412341234123412341234", - chainId: 1, - nonce: 0, - }); - ``` -
- `signerType` - - `"alchemy-signer"` | `"rn-alchemy-signer"` - - `"alchemy-signer"` - - ‐ -
- `signMessage` - - (`msg`) => `Promise`\<`` `0x${string}` ``> - - `undefined` - - Signs a raw message after hashing it. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const signature = await signer.signMessage("Hello, world!"); - ``` -
- `signTransaction` - - \<`serializer`, `transaction`>(`transaction`, `options?`) => `Promise`\<[`IsNarrowable`](https://viem.sh)\<[`TransactionSerialized`](https://viem.sh)\<[`GetTransactionType`](https://viem.sh)\<`transaction`>>, `` `0x${string}` ``> *extends* `true` ? [`TransactionSerialized`](https://viem.sh)\<[`GetTransactionType`](https://viem.sh)\<`transaction`>> : `` `0x${string}` ``> - - `undefined` - - Serializes a transaction, signs it with a raw message, and then returns the serialized transaction with the signature. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const tx = await signer.signTransaction({ - to: "0x1234", - value: "0x1234", - data: "0x1234", - }); - ``` -
- `signTypedData` - - \<`TTypedData`, `TPrimaryType`>(`params`) => `Promise`\<`` `0x${string}` ``> - - `undefined` - - Signs a typed message by first hashing it and then signing the hashed message using the `signRawMessage` method. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const signature = await signer.signTypedData({ - domain: {}, - types: {}, - primaryType: "", - message: {}, - }); - ``` -
- `verifyMfa` - - (`params`) => `Promise`\<\{ `multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; }> - - `undefined` - - Verifies a newly created MFA factor to complete the setup process. - - **Example** - - ```ts - import { AlchemyWebSigner } from "@account-kit/signer"; - - const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, - }); - - const result = await signer.verifyMfa({ - multiFactorId: "factor-id", - multiFactorCode: "123456" // 6-digit code from authenticator app - }); - ``` - - **Throws** - - If no user is authenticated -
- -## Methods - -### addOauthProvider() - -```ts -addOauthProvider(args): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1270](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1270) - -Handles OAuth authentication by augmenting the provided arguments with a type and performing authentication based on the OAuth mode (either using redirect or popup). - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - `Omit`\<`Extract`\<`AuthParams`, \{ `type`: `"oauth"`; }>, `"type"`> - - Authentication parameters omitting the type, which will be set to "oauth" -
- -#### Returns - -`Promise`\<[`OauthProviderInfo`](../type-aliases/OauthProviderInfo)> - -A promise that resolves to an `OauthProviderInfo` object containing provider information and the ID token. - ---- - -### fetchConfig() - -```ts -protected fetchConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1892](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1892) - -#### Returns - -`Promise`\<`SignerConfig`> - ---- - -### getAuthDetails() - -```ts -getAuthDetails(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:479](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L479) - -Gets the current logged in user -If a user has an ongoing session, it will use that session and -try to authenticate - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -// throws if not logged in -const user = await signer.getAuthDetails(); -``` - -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -the current user - -#### Throws - -if there is no user logged in - -#### Implementation of - -```ts -SmartAccountAuthenticator.getAuthDetails; -``` - ---- - -### getConfig() - -```ts -getConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1884](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1884) - -Returns the signer configuration while fetching it if it's not already initialized. - -#### Returns - -`Promise`\<`SignerConfig`> - -A promise that resolves to the signer configuration - ---- - -### getMfaStatus() - -```ts -getMfaStatus(): object; -``` - -Defined in: [account-kit/signer/src/base.ts:719](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L719) - -Gets the current MFA status - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const mfaStatus = signer.getMfaStatus(); -if (mfaStatus === AlchemyMfaStatus.REQUIRED) { - // Handle MFA requirement -} -``` - -#### Returns - -`object` - -The current MFA status - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `mfaFactorId?` - - `string` -
- `mfaRequired` - - `boolean` -
- ---- - -### getUser() - -Unauthenticated call to look up a user's organizationId by email or phone - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const result = await signer.getUser({ type: "email", value: "foo@mail.com" }); -``` - -#### Param - -the params to look up - -#### Call Signature - -```ts -getUser(email): Promise< - | null - | { - orgId: string; -}>; -``` - -Defined in: [account-kit/signer/src/base.ts:752](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L752) - -Unauthenticated call to look up a user's organizationId by email - -##### Deprecated - -Use getUser(\{ type: "email", value: email }) instead - -##### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const result = await signer.getUser("foo@mail.com"); -``` - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - the email to lookup -
- -##### Returns - -`Promise`\< -| `null` -| \{ -`orgId`: `string`; -}> - -the organization id for the user if they exist - -#### Call Signature - -```ts -getUser(params): Promise< - | null - | { - orgId: string; -}>; -``` - -Defined in: [account-kit/signer/src/base.ts:777](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L777) - -Unauthenticated call to look up a user's organizationId by email or phone - -##### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const result = await signer.getUser({ type: "email", value: "foo@mail.com" }); -``` - -##### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `GetUserParams` -
- -##### Returns - -`Promise`\< -| `null` -| \{ -`orgId`: `string`; -}> - -the organization id for the user if they exist - ---- - -### initConfig() - -```ts -protected initConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1874](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1874) - -#### Returns - -`Promise`\<`SignerConfig`> - ---- - -### listAuthMethods() - -```ts -listAuthMethods(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1315](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1315) - -Retrieves a list of auth methods associated with the authenticated user. - -#### Returns - -`Promise`\<[`AuthMethods`](../type-aliases/AuthMethods)> - -A promise that resolves to an `AuthMethods` object containing the user's email, OAuth providers, and passkeys. - -#### Throws - -Thrown if the user is not authenticated - ---- - -### on() - -```ts -on(event, listener): () => void; -``` - -Defined in: [account-kit/signer/src/base.ts:183](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L183) - -Allows you to subscribe to events emitted by the signer - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `E` *extends* keyof [`AlchemySignerEvents`](../type-aliases/AlchemySignerEvents) -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `event` - - `E` - - the event to subscribe to -
- `listener` - - [`AlchemySignerEvents`](../type-aliases/AlchemySignerEvents)\[`E`] - - the function to run when the event is emitted -
- -#### Returns - -a function to remove the listener - -```ts -(): void; -``` - -##### Returns - -`void` - ---- - -### preparePopupOauth() - -```ts -preparePopupOauth(): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:285](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L285) - -Prepares the config needed to use popup-based OAuth login. This must be -called before calling `.authenticate` with params `{ type: "oauth", mode: -"popup" }`, and is recommended to be called on page load. - -This method exists because browsers may prevent popups from opening unless -triggered by user interaction, and so the OAuth config must already have -been fetched at the time a user clicks a social login button. - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -await signer.preparePopupOauth(); -``` - -#### Returns - -`Promise`\<[`OauthConfig`](../type-aliases/OauthConfig)> - -the config which must be loaded before -using popup-based OAuth - ---- - -### removeOauthProvider() - -```ts -removeOauthProvider(providerId): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1302](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1302) - -Removes an OAuth provider by its ID if the user is authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `providerId` - - `string` - - The ID of the OAuth provider to be removed, as obtained from `listOauthProviders` -
- -#### Returns - -`Promise`\<`any`> - -A promise indicating the result of the removal process - -#### Throws - -Thrown if the user is not authenticated - ---- - -### setEmail() - -Implementation for setEmail method. - -#### Param - -An object containing the verificationCode (or simply an email for legacy usage) - -#### Call Signature - -```ts -setEmail(email): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:842](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L842) - -Sets the email for the authenticated user, allowing them to login with that -email. - -##### Deprecated - -You must contact Alchemy to enable this feature for your team, -as there are important security considerations. In particular, you must not -call this without first validating that the user owns this email account. -It is recommended to now use the email verification flow instead. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - The email to set for the user -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email address - -##### Throws - -If the user is not authenticated - -#### Call Signature - -```ts -setEmail(params): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:854](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L854) - -Uses a verification code to update a user's email, allowing them to login -with that email. `sendVerificationCode` should be called first to obtain -the code. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `VerificationParams` - - An object containing the verification code -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email address - -##### Throws - -If the user is not authenticated - ---- - -### toSolanaSigner() - -```ts -toSolanaSigner(): SolanaSigner; -``` - -Defined in: [account-kit/signer/src/base.ts:1133](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1133) - -Creates a new instance of `SolanaSigner` using the provided inner value. -This requires the signer to be authenticated first - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const solanaSigner = signer.toSolanaSigner(); -``` - -#### Returns - -[`SolanaSigner`](SolanaSigner) - -A new instance of `SolanaSigner` - ---- - -### toViemAccount() - -```ts -toViemAccount(): Object; -``` - -Defined in: [account-kit/signer/src/base.ts:1089](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1089) - -This method lets you adapt your AlchemySigner to a viem LocalAccount, which -will let you use the signer as an EOA directly. - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -const account = signer.toViemAccount(); -``` - -#### Returns - -`Object` - -a LocalAccount object that can be used with viem's wallet client - -#### Throws - -if your signer is not authenticated - ---- - -### validateMultiFactors() - -```ts -validateMultiFactors(params): Promise; -``` - -Defined in: [account-kit/signer/src/base.ts:1815](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/base.ts#L1815) - -Validates MFA factors that were required during authentication. -This function should be called after MFA is required and the user has provided their MFA code. -It completes the authentication process by validating the MFA factors and completing the auth bundle. - -#### Example - -```ts -import { AlchemyWebSigner } from "@account-kit/signer"; - -const signer = new AlchemyWebSigner({ - client: { - connection: { - rpcUrl: "/api/rpc", - }, - iframeConfig: { - iframeContainerId: "alchemy-signer-iframe-container", - }, - }, -}); - -// After MFA is required and user provides code -const user = await signer.validateMultiFactors({ - multiFactorCode: "123456", // 6-digit code from authenticator app - multiFactorId: "factor-id", -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`ValidateMultiFactorsArgs`](../type-aliases/ValidateMultiFactorsArgs) - - Parameters for validating MFA factors -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the authenticated user - -#### Throws - -If there is no pending MFA context or if orgId is not found diff --git a/docs/pages/reference/account-kit/signer/src/classes/BaseSignerClient.mdx b/docs/pages/reference/account-kit/signer/src/classes/BaseSignerClient.mdx deleted file mode 100644 index 8fb2678b98..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/BaseSignerClient.mdx +++ /dev/null @@ -1,2943 +0,0 @@ ---- -title: BaseSignerClient -description: Base class for all Alchemy Signer clients -slug: wallets/reference/account-kit/signer/classes/BaseSignerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/client/base.ts:111](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L111) - -Base class for all Alchemy Signer clients - -## Extended by - -- [`AlchemySignerWebClient`](AlchemySignerWebClient) -- [`ServerSignerClient`](ServerSignerClient) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TExportWalletParams` - - `unknown` -
- `TExportWalletOutput` - - `unknown` -
- -## Constructors - -### Constructor - -```ts -new BaseSignerClient(params): BaseSignerClient; -``` - -Defined in: [account-kit/signer/src/client/base.ts:126](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L126) - -Create a new instance of the Alchemy Signer client - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `BaseSignerClientParams` - - the parameters required to create the client -
- -#### Returns - -`BaseSignerClient`\<`TExportWalletParams`, `TExportWalletOutput`> - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `eventEmitter` - - `EventEmitter`\<[`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents)> -
- `oauthConfig` - - `undefined` | [`OauthConfig`](../type-aliases/OauthConfig) -
- `rootOrg` - - `string` -
- `turnkeyClient` - - `TurnkeyClient` -
- -## Accessors - -### user - -#### Get Signature - -```ts -get protected user(): undefined | User; -``` - -Defined in: [account-kit/signer/src/client/base.ts:147](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L147) - -##### Returns - -`undefined` | [`User`](../type-aliases/User) - -#### Set Signature - -```ts -set protected user(user): void; -``` - -Defined in: [account-kit/signer/src/client/base.ts:151](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L151) - -##### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `undefined` | [`User`](../type-aliases/User) -
- -##### Returns - -`void` - -## Methods - -### addMfa() - -```ts -addMfa(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1174](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1174) - -Initiates the setup of a new MFA factor for the current user. Mfa will need to be verified before it is active. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`AddMfaParams`](../type-aliases/AddMfaParams) - - The parameters required to enable a new MFA factor -
- -#### Returns - -`Promise`\<[`AddMfaResult`](../type-aliases/AddMfaResult)> - -A promise that resolves to the factor setup information - -#### Throws - -If no user is authenticated - -#### Throws - -If an unsupported factor type is provided - ---- - -### addOauthProvider() - -```ts -addOauthProvider(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:616](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L616) - -Adds an OAuth provider for the authenticated user using the provided parameters. Throws an error if the user is not authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`AddOauthProviderParams`](../type-aliases/AddOauthProviderParams) - - The parameters for adding an OAuth provider, including `providerName` and `oidcToken`. -
- -#### Returns - -`Promise`\<[`OauthProviderInfo`](../type-aliases/OauthProviderInfo)> - -A Promise that resolves when the OAuth provider is added. - -#### Throws - -Throws if the user is not authenticated. - ---- - -### addPasskey() - -```ts -addPasskey(options): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:509](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L509) - -Handles the creation of authenticators using WebAuthn attestation and the provided options. Requires the user to be authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `options` - - `CredentialCreationOptions` - - The options used to create the WebAuthn attestation -
- -#### Returns - -`Promise`\<`string`\[]> - -A promise that resolves to an array of authenticator IDs - -#### Throws - -If the user is not authenticated - ---- - -### completeAuthWithBundle() - -```ts -abstract completeAuthWithBundle(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:253](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L253) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - \{ `accessToken?`: `string`; `authenticatingType`: `"email"` | `"otp"` | `"sms"` | `"passkey"` | `"oauth"` | `"otpVerify"` | `"custom-jwt"`; `bundle`: `string`; `connectedEventName`: keyof [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents); `idToken?`: `string`; `orgId`: `string`; } -
- `params.accessToken?` - - `string` -
- `params.authenticatingType` - - `"email"` | `"otp"` | `"sms"` | `"passkey"` | `"oauth"` | `"otpVerify"` | `"custom-jwt"` -
- `params.bundle` - - `string` -
- `params.connectedEventName` - - keyof [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents) -
- `params.idToken?` - - `string` -
- `params.orgId` - - `string` -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - ---- - -### createAccount() - -```ts -createAccount(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:176](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L176) - -Authenticates the user by either email or passkey account creation flow. Emits events during the process. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`CreateAccountParams`](../type-aliases/CreateAccountParams) - - The parameters for creating an account, including the type (email or passkey) and additional details. -
- -#### Returns - -`Promise`\<[`SignupResponse`](../type-aliases/SignupResponse)> - -A promise that resolves with the response object containing the account creation result. - ---- - -### disconnect() - -```ts -abstract disconnect(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:278](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L278) - -#### Returns - -`Promise`\<`void`> - ---- - -### experimental_addToMultiOwner() - -```ts -experimental_addToMultiOwner(orgId, members): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1019](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1019) - -This will add additional members to an existing multi-sig account - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId` - - `string` - - orgId of the multi-sig to add members to -
- `members` - - `` `0x${string}` ``\[] - - the addresses of the members to add -
- -#### Returns - -`Promise`\<`void`> - ---- - -### experimental_createApiKey() - -```ts -experimental_createApiKey(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:782](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L782) - -Creates an API key that can take any action on behalf of the current user. -(Note that this method is currently experimental and is subject to change.) - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`experimental_CreateApiKeyParams`](../type-aliases/experimental_CreateApiKeyParams) - - Parameters for creating the API key. -
- -#### Returns - -`Promise`\<`void`> - -#### Throws - -If there is no authenticated user or the API key creation fails. - ---- - -### experimental_createMultiOwner() - -```ts -experimental_createMultiOwner(additionalMembers): Promise<{ - evmSignerAddress: `0x${string}`; - members: object[]; - orgId: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:997](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L997) - -This will create a multi-owner account with the current user and additional specified signers - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `additionalMembers` - - `` `0x${string}` ``\[] - - members to add, aside from the currently authenticated user -
- -#### Returns - -`Promise`\<\{ -`evmSignerAddress`: `` `0x${string}` ``; -`members`: `object`\[]; -`orgId`: `string`; -}> - -created multi-owner account - ---- - -### experimental_deleteFromMultiOwner() - -```ts -experimental_deleteFromMultiOwner(orgId, members): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1057](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1057) - -This will remove members from an existing multi-sig account - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId` - - `string` - - orgId of the multi-sig to remove members from -
- `members` - - `` `0x${string}` ``\[] - - the addresses of the members to remove -
- -#### Returns - -`Promise`\<`void`> - ---- - -### experimental_multiOwnerExportPrivateKeyEncrypted() - -```ts -experimental_multiOwnerExportPrivateKeyEncrypted(opts): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1571](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1571) - -Exports a private key for a given account in a multi-owner org - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `MultiOwnerExportPrivateKeyParams` & `object` - - the parameters for the export -
- -#### Returns - -`Promise`\<`ExportPrivateKeyEncryptedResult`> - -the private key - ---- - -### experimental_multiOwnerSignRawMessage() - -```ts -experimental_multiOwnerSignRawMessage( - msg, - orgId, - orgAddress): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:960](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L960) - -This will sign on behalf of the multi-owner org, without doing any transformations on the message. -For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass -that result here. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `` `0x${string}` `` - - the hex representation of the bytes to sign -
- `orgId` - - `string` - - orgId of the multi-owner org to sign on behalf of -
- `orgAddress` - - `string` - - address of the multi-owner org to sign on behalf of -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -the signature over the raw hex - ---- - -### exportPrivateKeyEncrypted() - -```ts -exportPrivateKeyEncrypted(opts): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1519](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1519) - -Exports a private key for a given account encrypted with the provided public key - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `ExportPrivateKeyParams` & `object` - - the parameters for the export -
- -#### Returns - -`Promise`\<`ExportPrivateKeyEncryptedResult`> - -the private key - ---- - -### exportWallet() - -```ts -abstract exportWallet(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:280](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L280) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `TExportWalletParams` -
- -#### Returns - -`Promise`\<`TExportWalletOutput`> - ---- - -### getMfaFactors() - -```ts -getMfaFactors(): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1142](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1142) - -Retrieves the list of MFA factors configured for the current user. - -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to an array of configured MFA factors - -#### Throws - -If no user is authenticated - ---- - -### getOauthConfig() - -```ts -abstract protected getOauthConfig(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:286](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L286) - -#### Returns - -`Promise`\<[`OauthConfig`](../type-aliases/OauthConfig)> - ---- - -### getOauthNonce() - -```ts -protected getOauthNonce(turnkeyPublicKey): string; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1509](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1509) - -Turnkey requires the nonce in the id token to be in this format. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `turnkeyPublicKey` - - `string` - - key from a Turnkey iframe -
- -#### Returns - -`string` - -nonce to be used in OIDC - ---- - -### getOauthProviderUrl() - -```ts -protected getOauthProviderUrl(args): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1334](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1334) - -Returns the authentication url for the selected OAuth Proivder - -#### Example - -```ts - -cosnt oauthParams = { - authProviderId: "google", - isCustomProvider: false, - auth0Connection: undefined, - scope: undefined, - claims: undefined, - mode: "redirect", - redirectUrl: "https://your-url-path/oauth-return", - expirationSeconds: 3000 -}; - -const turnkeyPublicKey = await this.initIframeStamper(); -const oauthCallbackUrl = this.oauthCallbackUrl; -const oauthConfig = this.getOauthConfig() // Optional value for OauthConfig() -const usesRelativeUrl = true // Optional value to determine if we use a relative (or absolute) url for the `redirect_url` - -const oauthProviderUrl = getOauthProviderUrl({ - oauthParams, - turnkeyPublicKey, - oauthCallbackUrl -}) - -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - [`GetOauthProviderUrlArgs`](../type-aliases/GetOauthProviderUrlArgs) - - Required. The Oauth provider's auth parameters -
- -#### Returns - -`Promise`\<`string`> - -returns the Oauth provider's url - ---- - -### getPasskeyStatus() - -```ts -getPasskeyStatus(): Promise<{ - isPasskeyAdded: boolean; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:594](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L594) - -Retrieves the status of the passkey for the current user. Requires the user to be authenticated. - -#### Returns - -`Promise`\<\{ -`isPasskeyAdded`: `boolean`; -}> - -A promise that resolves to an object containing the passkey status - -#### Throws - -If the user is not authenticated - ---- - -### getUser() - -```ts -getUser(): null | User; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1092](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1092) - -Returns the current user or null if no user is set. - -#### Returns - -`null` | [`User`](../type-aliases/User) - -the current user object or null if no user is available - ---- - -### getWebAuthnAttestation() - -```ts -abstract protected getWebAuthnAttestation(options?, userDetails?): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:288](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L288) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `options?` - - [`CredentialCreationOptionOverrides`](../type-aliases/CredentialCreationOptionOverrides) -
- `userDetails?` - - \{ `username`: `string`; } -
- `userDetails.username?` - - `string` -
- -#### Returns - -`Promise`\<[`GetWebAuthnAttestationResult`](../type-aliases/GetWebAuthnAttestationResult)> - ---- - -### initEmailAuth() - -```ts -abstract initEmailAuth(params): Promise<{ - multiFactors?: MfaFactor[]; - orgId: string; - otpId?: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:245](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L245) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Omit`\<[`EmailAuthParams`](../type-aliases/EmailAuthParams), `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<\{ -`multiFactors?`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -`orgId`: `string`; -`otpId?`: `string`; -}> - ---- - -### initOauth() - -```ts -initOauth(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:142](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L142) - -Asynchronously fetches and sets the OAuth configuration. - -#### Returns - -`Promise`\<[`OauthConfig`](../type-aliases/OauthConfig)> - -A promise that resolves to the OAuth configuration - ---- - -### initOtp() - -```ts -initOtp(type, contact): Promise<{ - otpId: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:492](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L492) - -Initiates an OTP (One-Time Password) verification process for a user contact. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `type` - - `"email"` | `"sms"` - - The type of OTP to send, either "email" or "sms" -
- `contact` - - `string` - - The email address or phone number to send the OTP to -
- -#### Returns - -`Promise`\<\{ -`otpId`: `string`; -}> - -A promise that resolves to an object containing the OTP ID - -#### Throws - -When no user is currently authenticated - ---- - -### initSessionStamper() - -```ts -abstract protected initSessionStamper(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:296](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L296) - -Initializes the session stamper and returns its public key. - -#### Returns - -`Promise`\<`string`> - ---- - -### initSmsAuth() - -```ts -abstract initSmsAuth(params): Promise<{ - orgId: string; - otpId?: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:249](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L249) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Omit`\<[`SmsAuthParams`](../type-aliases/SmsAuthParams), `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<\{ -`orgId`: `string`; -`otpId?`: `string`; -}> - ---- - -### initWebauthnStamper() - -```ts -abstract protected initWebauthnStamper(user, options): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:298](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L298) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `undefined` | [`User`](../type-aliases/User) -
- `options` - - | `undefined` | [`CredentialCreationOptionOverrides`](../type-aliases/CredentialCreationOptionOverrides) -
- -#### Returns - -`Promise`\<`void`> - ---- - -### listAuthMethods() - -```ts -listAuthMethods(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:666](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L666) - -Retrieves the list of authentication methods for the current user. - -#### Returns - -`Promise`\<[`AuthMethods`](../type-aliases/AuthMethods)> - -A promise that resolves to the list of authentication methods - -#### Throws - -If the user is not authenticated - ---- - -### lookupUserByAccessKey() - -```ts -lookupUserByAccessKey(params): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:835](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L835) - -Looks up information based on an access key. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `LookupUserByAccessKeyParams` - - The access key parameters -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -The result of the lookup request - ---- - -### lookupUserByEmail() - -```ts -lookupUserByEmail(email): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:815](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L815) - -Looks up information based on an email address. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - the email address to look up -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -the result of the lookup request - ---- - -### lookupUserByPhone() - -```ts -lookupUserByPhone(phone): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:825](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L825) - -Looks up information based on a phone number. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `phone` - - `string` - - the phone number to look up -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -the result of the lookup request - ---- - -### lookupUserWithPasskey() - -```ts -lookupUserWithPasskey(user?): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:572](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L572) - -Asynchronously handles the authentication process using WebAuthn Stamper. If a user is provided, sets the user and returns it. Otherwise, retrieves the current user and initializes the WebAuthn stamper. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault valueDescription
- `user?` - - [`User`](../type-aliases/User) - - `undefined` - - An optional user object to authenticate -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the authenticated user object - ---- - -### oauthWithPopup() - -```ts -abstract oauthWithPopup(args): Promise< - | User - | AuthLinkingPrompt - | IdTokenOnly>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:266](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L266) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `any` -
- -#### Returns - -`Promise`\< -| [`User`](../type-aliases/User) -| [`AuthLinkingPrompt`](../type-aliases/AuthLinkingPrompt) -| [`IdTokenOnly`](../type-aliases/IdTokenOnly)> - ---- - -### oauthWithRedirect() - -```ts -abstract oauthWithRedirect(args): Promise< - | User - | IdTokenOnly>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:262](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L262) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `any` -
- -#### Returns - -`Promise`\< -| [`User`](../type-aliases/User) -| [`IdTokenOnly`](../type-aliases/IdTokenOnly)> - ---- - -### on() - -```ts -on(event, listener): () => any; -``` - -Defined in: [account-kit/signer/src/client/base.ts:314](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L314) - -Listen to events emitted by the client - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `E` *extends* keyof [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents) -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `event` - - `E` - - the event you want to listen to -
- `listener` - - [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents)\[`E`] - - the callback function to execute when an event is fired -
- -#### Returns - -a function that will remove the listener when called - -```ts -(): any; -``` - -##### Returns - -`any` - ---- - -### pollActivityCompletion() - -```ts -protected pollActivityCompletion( - activity, - organizationId, - resultKey): Promise>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1454](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1454) - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* - | `"createOrganizationResult"` - | `"createAuthenticatorsResult"` - | `"createUsersResult"` - | `"createPrivateKeysResult"` - | `"createInvitationsResult"` - | `"acceptInvitationResult"` - | `"signRawPayloadResult"` - | `"createPolicyResult"` - | `"disablePrivateKeyResult"` - | `"deleteUsersResult"` - | `"deleteAuthenticatorsResult"` - | `"deleteInvitationResult"` - | `"deleteOrganizationResult"` - | `"deletePolicyResult"` - | `"createUserTagResult"` - | `"deleteUserTagsResult"` - | `"signTransactionResult"` - | `"deleteApiKeysResult"` - | `"createApiKeysResult"` - | `"createPrivateKeyTagResult"` - | `"deletePrivateKeyTagsResult"` - | `"setPaymentMethodResult"` - | `"activateBillingTierResult"` - | `"deletePaymentMethodResult"` - | `"createApiOnlyUsersResult"` - | `"updateRootQuorumResult"` - | `"updateUserTagResult"` - | `"updatePrivateKeyTagResult"` - | `"createSubOrganizationResult"` - | `"updateAllowedOriginsResult"` - | `"createPrivateKeysResultV2"` - | `"updateUserResult"` - | `"updatePolicyResult"` - | `"createSubOrganizationResultV3"` - | `"createWalletResult"` - | `"createWalletAccountsResult"` - | `"initUserEmailRecoveryResult"` - | `"recoverUserResult"` - | `"setOrganizationFeatureResult"` - | `"removeOrganizationFeatureResult"` - | `"exportPrivateKeyResult"` - | `"exportWalletResult"` - | `"createSubOrganizationResultV4"` - | `"emailAuthResult"` - | `"exportWalletAccountResult"` - | `"initImportWalletResult"` - | `"importWalletResult"` - | `"initImportPrivateKeyResult"` - | `"importPrivateKeyResult"` - | `"createPoliciesResult"` - | `"signRawPayloadsResult"` - | `"createReadOnlySessionResult"` - | `"createOauthProvidersResult"` - | `"deleteOauthProvidersResult"` - | `"createSubOrganizationResultV5"` - | `"oauthResult"` - | `"createReadWriteSessionResult"` - | `"createSubOrganizationResultV6"` - | `"deletePrivateKeysResult"` - | `"deleteWalletsResult"` - | `"createReadWriteSessionResultV2"` - | `"deleteSubOrganizationResult"` - | `"initOtpAuthResult"` - | `"otpAuthResult"` - | `"createSubOrganizationResultV7"` - | `"updateWalletResult"` - | `"updatePolicyResultV2"` - | `"initOtpAuthResultV2"` - | `"initOtpResult"` - | `"verifyOtpResult"` - | `"otpLoginResult"` - | `"stampLoginResult"` - | `"oauthLoginResult"` - | `"updateUserNameResult"` - | `"updateUserEmailResult"` - | `"updateUserPhoneNumberResult"` - | `"initFiatOnRampResult"` - | `"createSmartContractInterfaceResult"` - | `"deleteSmartContractInterfaceResult"` - | `"enableAuthProxyResult"` - | `"disableAuthProxyResult"` - | `"updateAuthProxyConfigResult"` - | `"createOauth2CredentialResult"` - | `"updateOauth2CredentialResult"` - | `"deleteOauth2CredentialResult"` - | `"oauth2AuthenticateResult"` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `activity` - - `Object` -
- `organizationId` - - `string` -
- `resultKey` - - `T` -
- -#### Returns - -`Promise`\<`NonNullable`\<`object`\[`T`]>> - ---- - -### removeEmail() - -```ts -removeEmail(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:382](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L382) - -Removes the email for the authenticated user, disallowing them from login with that email. - -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the email is removed - -#### Throws - -If the user is not authenticated - ---- - -### removeMfa() - -```ts -removeMfa(params): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1244](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1244) - -Removes existing MFA factors by ID. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`RemoveMfaParams`](../type-aliases/RemoveMfaParams) - - The parameters specifying which factors to disable -
- -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to the updated list of MFA factors - -#### Throws - -If no user is authenticated - ---- - -### removeOauthProvider() - -```ts -removeOauthProvider(providerId): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:644](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L644) - -Deletes a specified OAuth provider for the authenticated user. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `providerId` - - `string` - - The ID of the provider to be deleted -
- -#### Returns - -`Promise`\<`void`> - -#### Throws - -If the user is not authenticated - ---- - -### removePasskey() - -```ts -removePasskey(authenticatorId): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:551](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L551) - -Removes a passkey authenticator from the user's account. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `authenticatorId` - - `string` - - The ID of the authenticator to remove. -
- -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the authenticator is removed. - -#### Throws - -If the user is not authenticated. - ---- - -### removePhoneNumber() - -```ts -removePhoneNumber(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:451](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L451) - -Removes the phone number for the authenticated user, disallowing them from login with that phone number. - -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the phone number is removed - -#### Throws - -If the user is not authenticated - ---- - -### request() - -```ts -request(route, body): Promise>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1104](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1104) - -Sends a POST request to the given signer route with the specified body and returns the response. -Not intended to be used directly, use the specific methods instead on the client instead. - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `R` *extends* - | `"/v1/signup"` - | `"/v1/whoami"` - | `"/v1/auth"` - | `"/v1/lookup"` - | `"/v1/init-otp"` - | `"/v1/verify-otp"` - | `"/v1/sign-payload"` - | `"/v1/update-email-auth"` - | `"/v1/update-phone-auth"` - | `"/v1/add-oauth-provider"` - | `"/v1/remove-oauth-provider"` - | `"/v1/list-auth-methods"` - | `"/v1/prepare-oauth"` - | `"/v1/otp"` - | `"/v1/auth-list-multi-factors"` - | `"/v1/auth-delete-multi-factors"` - | `"/v1/auth-request-multi-factor"` - | `"/v1/auth-verify-multi-factor"` - | `"/v1/auth-jwt"` - | `"/v1/signer-config"` - | `"/v1/auth-validate-multi-factors"` - | `"/v1/multi-owner-create"` - | `"/v1/multi-owner-prepare-add"` - | `"/v1/multi-owner-add"` - | `"/v1/multi-owner-update-root-quorum"` - | `"/v1/multi-owner-sign-raw-payload"` - | `"/v1/multi-owner-prepare-delete"` - | `"/v1/multi-owner-delete"` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `route` - - `R` - - The route to which the request should be sent -
- `body` - - [`SignerBody`](../type-aliases/SignerBody)\<`R`> - - The request body containing the data to be sent -
- -#### Returns - -`Promise`\<[`SignerResponse`](../type-aliases/SignerResponse)\<`R`>> - -A promise that resolves to the response from the signer - ---- - -### setEmail() - -Implementation for setEmail method with optional OTP verification. - -#### Param - -An OTP object containing the OTP ID & OTP code (or an email address for legacy usage) - -#### Call Signature - -```ts -setEmail(email): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:336](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L336) - -Sets the email for the authenticated user, allowing them to login with that -email. - -##### Deprecated - -You must contact Alchemy to enable this feature for your team, -as there are important security considerations. In particular, you must not -call this without first validating that the user owns this email account. -Recommended to use the email verification flow instead. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - The email to set for the user -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email - -##### Throws - -If the user is not authenticated - -#### Call Signature - -```ts -setEmail(otp): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:346](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L346) - -Sets the email for the authenticated user, allowing them to login with that -email. Must be called after calling `initOtp` with the email. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `otp` - - [`VerificationOtp`](../type-aliases/VerificationOtp) - - The OTP verification object including the OTP ID and OTP code -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email - -##### Throws - -If the user is not authenticated - ---- - -### setPhoneNumber() - -```ts -setPhoneNumber(otp): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:436](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L436) - -Updates the phone number for the authenticated user, allowing them to login with that -phone number. Must be called after calling `initOtp` with the phone number. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `otp` - - [`VerificationOtp`](../type-aliases/VerificationOtp) - - The OTP object including the OTP ID and OTP code -
- -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the phone number is set - -#### Throws - -If the user is not authenticated - ---- - -### setStamper() - -```ts -protected setStamper(stamper): void; -``` - -Defined in: [account-kit/signer/src/client/base.ts:166](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L166) - -Sets the stamper of the TurnkeyClient. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `stamper` - - `TStamper` - - the stamper function to set for the TurnkeyClient -
- -#### Returns - -`void` - ---- - -### signRawMessage() - -```ts -signRawMessage(msg, mode): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:852](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L852) - -This will sign a message with the user's private key, without doing any transformations on the message. -For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass -that result here. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault valueDescription
- `msg` - - `` `0x${string}` `` - - `undefined` - - the hex representation of the bytes to sign -
- `mode` - - `"SOLANA"` | `"ETHEREUM"` - - `"ETHEREUM"` - - specify if signing should happen for solana or ethereum -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -the signature over the raw hex - ---- - -### stampGetOrganization() - -```ts -stampGetOrganization(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:760](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L760) - -Generates a stamped getOrganization request for the current user. - -#### Returns - -`Promise`\<`TSignedRequest`> - -a promise that resolves to the "getOrganization" information for the logged in user - -#### Throws - -if no user is authenticated - ---- - -### stampWhoami() - -```ts -stampWhoami(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:744](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L744) - -Generates a stamped whoami request for the current user. This request can then be used to call /signer/v1/whoami to get the user information. -This is useful if you want to get the user information in a different context like a server. You can pass the stamped request to the server -and then call our API to get the user information. Using this stamp is the most trusted way to get the user information since a stamp can only -belong to the user who created it. - -#### Returns - -`Promise`\<`TSignedRequest`> - -a promise that resolves to the "whoami" information for the logged in user - -#### Throws - -if no organization ID is provided - ---- - -### submitJwt() - -```ts -abstract submitJwt(args): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:274](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L274) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `Omit`\<[`JwtParams`](../type-aliases/JwtParams), `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<[`JwtResponse`](../type-aliases/JwtResponse)> - ---- - -### submitOtpCode() - -```ts -abstract submitOtpCode(args): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:270](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L270) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `Omit`\<[`OtpParams`](../type-aliases/OtpParams), `"targetPublicKey"`> -
- -#### Returns - -`Promise`\<[`SubmitOtpCodeResponse`](../type-aliases/SubmitOtpCodeResponse)> - ---- - -### targetPublicKey() - -```ts -abstract targetPublicKey(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:284](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L284) - -#### Returns - -`Promise`\<`string`> - ---- - -### validateMultiFactors() - -```ts -validateMultiFactors(params): Promise<{ - bundle: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1276](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1276) - -Validates multiple MFA factors using the provided encrypted payload and MFA codes. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`ValidateMultiFactorsParams`](../type-aliases/ValidateMultiFactorsParams) - - The validation parameters -
- -#### Returns - -`Promise`\<\{ -`bundle`: `string`; -}> - -A promise that resolves to an object containing the credential bundle - -#### Throws - -If no credential bundle is returned from the server - ---- - -### verifyMfa() - -```ts -verifyMfa(params): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1211](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1211) - -Verifies a newly created MFA factor to complete the setup process. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`VerifyMfaParams`](../type-aliases/VerifyMfaParams) - - The parameters required to verify the MFA factor -
- -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to the updated list of MFA factors - -#### Throws - -If no user is authenticated - ---- - -### whoami() - -```ts -whoami( - orgId?, - idToken?, - accessToken?): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:684](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L684) - -Retrieves the current user or fetches the user information if not already available. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId?` - - `string` - - optional organization ID, defaults to the user's organization ID -
- `idToken?` - - `string` - - an OIDC ID token containing additional user information -
- `accessToken?` - - `string` - - an access token which if provided will be added to the user -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the user object - -#### Throws - -if no organization ID is provided when there is no current user diff --git a/docs/pages/reference/account-kit/signer/src/classes/MfaRequiredError.mdx b/docs/pages/reference/account-kit/signer/src/classes/MfaRequiredError.mdx deleted file mode 100644 index 9457ae456b..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/MfaRequiredError.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: MfaRequiredError -description: Overview of the MfaRequiredError class -slug: wallets/reference/account-kit/signer/classes/MfaRequiredError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/errors.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/errors.ts#L27) - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new MfaRequiredError(multiFactors): MfaRequiredError; -``` - -Defined in: [account-kit/signer/src/errors.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/errors.ts#L31) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `multiFactors` - - `MfaFactor`\[] -
- -#### Returns - -`MfaRequiredError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `multiFactors` - - `MfaFactor`\[] - - `undefined` -
- `name` - - `string` - - `"MfaRequiredError"` -
diff --git a/docs/pages/reference/account-kit/signer/src/classes/NotAuthenticatedError.mdx b/docs/pages/reference/account-kit/signer/src/classes/NotAuthenticatedError.mdx deleted file mode 100644 index 72b0279b49..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/NotAuthenticatedError.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: NotAuthenticatedError -description: Overview of the NotAuthenticatedError class -slug: wallets/reference/account-kit/signer/classes/NotAuthenticatedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/errors.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/errors.ts#L3) - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new NotAuthenticatedError(): NotAuthenticatedError; -``` - -Defined in: [account-kit/signer/src/errors.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/errors.ts#L5) - -#### Returns - -`NotAuthenticatedError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"NotAuthenticatedError"` -
diff --git a/docs/pages/reference/account-kit/signer/src/classes/OAuthProvidersError.mdx b/docs/pages/reference/account-kit/signer/src/classes/OAuthProvidersError.mdx deleted file mode 100644 index ba7431f592..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/OAuthProvidersError.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: OAuthProvidersError -description: Overview of the OAuthProvidersError class -slug: wallets/reference/account-kit/signer/classes/OAuthProvidersError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/errors.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/errors.ts#L18) - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new OAuthProvidersError(): OAuthProvidersError; -``` - -Defined in: [account-kit/signer/src/errors.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/errors.ts#L20) - -#### Returns - -`OAuthProvidersError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"OAuthProvidersError"` -
diff --git a/docs/pages/reference/account-kit/signer/src/classes/OauthCancelledError.mdx b/docs/pages/reference/account-kit/signer/src/classes/OauthCancelledError.mdx deleted file mode 100644 index d77c40c97b..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/OauthCancelledError.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: OauthCancelledError -description: This error is thrown when the OAuth flow is cancelled because the auth popup window was closed. -slug: wallets/reference/account-kit/signer/classes/OauthCancelledError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/client/index.ts:876](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L876) - -This error is thrown when the OAuth flow is cancelled because the auth popup -window was closed. - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new OauthCancelledError(): OauthCancelledError; -``` - -Defined in: [account-kit/signer/src/client/index.ts:883](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L883) - -Constructor for initializing an error indicating that the OAuth flow was -cancelled. - -#### Returns - -`OauthCancelledError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"OauthCancelledError"` -
diff --git a/docs/pages/reference/account-kit/signer/src/classes/OauthFailedError.mdx b/docs/pages/reference/account-kit/signer/src/classes/OauthFailedError.mdx deleted file mode 100644 index 753260d831..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/OauthFailedError.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: OauthFailedError -description: This error is thrown when an error occurs during the OAuth login flow. -slug: wallets/reference/account-kit/signer/classes/OauthFailedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/client/index.ts:891](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/index.ts#L891) - -This error is thrown when an error occurs during the OAuth login flow. - -## Extends - -- `BaseError` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"OauthFailedError"` -
diff --git a/docs/pages/reference/account-kit/signer/src/classes/ServerSignerClient.mdx b/docs/pages/reference/account-kit/signer/src/classes/ServerSignerClient.mdx deleted file mode 100644 index a8254b5d9e..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/ServerSignerClient.mdx +++ /dev/null @@ -1,2797 +0,0 @@ ---- -title: ServerSignerClient -description: ServerSignerClient is a client for signing messages using an access key. It extends the BaseSignerClient and uses the ApiKeyStamper for signing. Primarily intended to be used server-side. -slug: wallets/reference/account-kit/signer/classes/ServerSignerClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/client/server.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/server.ts#L34) - -ServerSignerClient is a client for signing messages using an access key. -It extends the BaseSignerClient and uses the ApiKeyStamper for signing. -Primarily intended to be used server-side. - -## Extends - -- [`BaseSignerClient`](BaseSignerClient)\<`undefined`> - -## Constructors - -### Constructor - -```ts -new ServerSignerClient(params): ServerSignerClient; -``` - -Defined in: [account-kit/signer/src/client/server.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/server.ts#L43) - -Creates an instance of ServerSignerClient. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `ServerSignerClientParams` - - The parameters for the client, including the access key and connection configuration -
- -#### Returns - -`ServerSignerClient` - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`constructor`](BaseSignerClient#constructor) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `completeAuthWithBundle` - - () => `never` - - ‐ -
- `eventEmitter` - - `EventEmitter`\<[`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents)> - - ‐ -
- `exportWallet` - - () => `never` - - ‐ -
- `getOauthConfig` - - () => `never` - - ‐ -
- `getWebAuthnAttestation` - - () => `never` - - ‐ -
- `initEmailAuth` - - () => `never` - - ‐ -
- `initSessionStamper` - - () => `never` - - Initializes the session stamper and returns its public key. -
- `initSmsAuth` - - () => `never` - - Unimplemented functions for server signer. - Required to extend the BaseSignerClient class. -
- `initWebauthnStamper` - - () => `never` - - ‐ -
- `oauthConfig` - - `undefined` | [`OauthConfig`](../type-aliases/OauthConfig) - - ‐ -
- `oauthWithPopup` - - () => `never` - - ‐ -
- `oauthWithRedirect` - - () => `never` - - ‐ -
- `rootOrg` - - `string` - - ‐ -
- `submitJwt` - - () => `never` - - ‐ -
- `submitOtpCode` - - () => `never` - - ‐ -
- `targetPublicKey` - - () => `never` - - ‐ -
- `turnkeyClient` - - `TurnkeyClient` - - ‐ -
- -## Accessors - -### user - -#### Get Signature - -```ts -get protected user(): undefined | User; -``` - -Defined in: [account-kit/signer/src/client/base.ts:147](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L147) - -##### Returns - -`undefined` | [`User`](../type-aliases/User) - -#### Set Signature - -```ts -set protected user(user): void; -``` - -Defined in: [account-kit/signer/src/client/base.ts:151](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L151) - -##### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `undefined` | [`User`](../type-aliases/User) -
- -##### Returns - -`void` - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`user`](BaseSignerClient#user) - -## Methods - -### addMfa() - -```ts -addMfa(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1174](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1174) - -Initiates the setup of a new MFA factor for the current user. Mfa will need to be verified before it is active. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`AddMfaParams`](../type-aliases/AddMfaParams) - - The parameters required to enable a new MFA factor -
- -#### Returns - -`Promise`\<[`AddMfaResult`](../type-aliases/AddMfaResult)> - -A promise that resolves to the factor setup information - -#### Throws - -If no user is authenticated - -#### Throws - -If an unsupported factor type is provided - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`addMfa`](BaseSignerClient#addmfa) - ---- - -### addOauthProvider() - -```ts -addOauthProvider(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:616](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L616) - -Adds an OAuth provider for the authenticated user using the provided parameters. Throws an error if the user is not authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`AddOauthProviderParams`](../type-aliases/AddOauthProviderParams) - - The parameters for adding an OAuth provider, including `providerName` and `oidcToken`. -
- -#### Returns - -`Promise`\<[`OauthProviderInfo`](../type-aliases/OauthProviderInfo)> - -A Promise that resolves when the OAuth provider is added. - -#### Throws - -Throws if the user is not authenticated. - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`addOauthProvider`](BaseSignerClient#addoauthprovider) - ---- - -### addPasskey() - -```ts -addPasskey(options): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:509](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L509) - -Handles the creation of authenticators using WebAuthn attestation and the provided options. Requires the user to be authenticated. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `options` - - `CredentialCreationOptions` - - The options used to create the WebAuthn attestation -
- -#### Returns - -`Promise`\<`string`\[]> - -A promise that resolves to an array of authenticator IDs - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`addPasskey`](BaseSignerClient#addpasskey) - ---- - -### authenticateWithAccessKey() - -```ts -authenticateWithAccessKey(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/server.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/server.ts#L86) - -Authenticates the user with an access key. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `any` - - The parameters for the authentication -
- -#### Returns - -`Promise`\<`User`> - -A promise that resolves to the user - ---- - -### createAccount() - -```ts -createAccount(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/server.ts:63](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/server.ts#L63) - -Creates a new user with the given parameters. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `CreateAccountParams` - - The parameters for creating the account -
- -#### Returns - -`Promise`\<`SignupResponse`> - -A promise that resolves to the signup response - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`createAccount`](BaseSignerClient#createaccount) - ---- - -### disconnect() - -```ts -disconnect(): Promise; -``` - -Defined in: [account-kit/signer/src/client/server.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/server.ts#L53) - -Unsets the user for the client - -#### Returns - -`Promise`\<`void`> - -#### Overrides - -[`BaseSignerClient`](BaseSignerClient).[`disconnect`](BaseSignerClient#disconnect) - ---- - -### experimental_addToMultiOwner() - -```ts -experimental_addToMultiOwner(orgId, members): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1019](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1019) - -This will add additional members to an existing multi-sig account - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId` - - `string` - - orgId of the multi-sig to add members to -
- `members` - - `` `0x${string}` ``\[] - - the addresses of the members to add -
- -#### Returns - -`Promise`\<`void`> - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_addToMultiOwner`](BaseSignerClient#experimental_addtomultiowner) - ---- - -### experimental_createApiKey() - -```ts -experimental_createApiKey(params): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:782](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L782) - -Creates an API key that can take any action on behalf of the current user. -(Note that this method is currently experimental and is subject to change.) - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`experimental_CreateApiKeyParams`](../type-aliases/experimental_CreateApiKeyParams) - - Parameters for creating the API key. -
- -#### Returns - -`Promise`\<`void`> - -#### Throws - -If there is no authenticated user or the API key creation fails. - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_createApiKey`](BaseSignerClient#experimental_createapikey) - ---- - -### experimental_createMultiOwner() - -```ts -experimental_createMultiOwner(additionalMembers): Promise<{ - evmSignerAddress: `0x${string}`; - members: object[]; - orgId: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:997](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L997) - -This will create a multi-owner account with the current user and additional specified signers - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `additionalMembers` - - `` `0x${string}` ``\[] - - members to add, aside from the currently authenticated user -
- -#### Returns - -`Promise`\<\{ -`evmSignerAddress`: `` `0x${string}` ``; -`members`: `object`\[]; -`orgId`: `string`; -}> - -created multi-owner account - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_createMultiOwner`](BaseSignerClient#experimental_createmultiowner) - ---- - -### experimental_deleteFromMultiOwner() - -```ts -experimental_deleteFromMultiOwner(orgId, members): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1057](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1057) - -This will remove members from an existing multi-sig account - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId` - - `string` - - orgId of the multi-sig to remove members from -
- `members` - - `` `0x${string}` ``\[] - - the addresses of the members to remove -
- -#### Returns - -`Promise`\<`void`> - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_deleteFromMultiOwner`](BaseSignerClient#experimental_deletefrommultiowner) - ---- - -### experimental_multiOwnerExportPrivateKeyEncrypted() - -```ts -experimental_multiOwnerExportPrivateKeyEncrypted(opts): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1571](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1571) - -Exports a private key for a given account in a multi-owner org - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `MultiOwnerExportPrivateKeyParams` & `object` - - the parameters for the export -
- -#### Returns - -`Promise`\<`ExportPrivateKeyEncryptedResult`> - -the private key - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_multiOwnerExportPrivateKeyEncrypted`](BaseSignerClient#experimental_multiownerexportprivatekeyencrypted) - ---- - -### experimental_multiOwnerSignRawMessage() - -```ts -experimental_multiOwnerSignRawMessage( - msg, - orgId, - orgAddress): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:960](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L960) - -This will sign on behalf of the multi-owner org, without doing any transformations on the message. -For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass -that result here. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `msg` - - `` `0x${string}` `` - - the hex representation of the bytes to sign -
- `orgId` - - `string` - - orgId of the multi-owner org to sign on behalf of -
- `orgAddress` - - `string` - - address of the multi-owner org to sign on behalf of -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -the signature over the raw hex - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`experimental_multiOwnerSignRawMessage`](BaseSignerClient#experimental_multiownersignrawmessage) - ---- - -### exportPrivateKeyEncrypted() - -```ts -exportPrivateKeyEncrypted(opts): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1519](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1519) - -Exports a private key for a given account encrypted with the provided public key - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `opts` - - `ExportPrivateKeyParams` & `object` - - the parameters for the export -
- -#### Returns - -`Promise`\<`ExportPrivateKeyEncryptedResult`> - -the private key - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`exportPrivateKeyEncrypted`](BaseSignerClient#exportprivatekeyencrypted) - ---- - -### getMfaFactors() - -```ts -getMfaFactors(): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1142](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1142) - -Retrieves the list of MFA factors configured for the current user. - -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to an array of configured MFA factors - -#### Throws - -If no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getMfaFactors`](BaseSignerClient#getmfafactors) - ---- - -### getOauthNonce() - -```ts -protected getOauthNonce(turnkeyPublicKey): string; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1509](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1509) - -Turnkey requires the nonce in the id token to be in this format. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `turnkeyPublicKey` - - `string` - - key from a Turnkey iframe -
- -#### Returns - -`string` - -nonce to be used in OIDC - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getOauthNonce`](BaseSignerClient#getoauthnonce) - ---- - -### getOauthProviderUrl() - -```ts -protected getOauthProviderUrl(args): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1334](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1334) - -Returns the authentication url for the selected OAuth Proivder - -#### Example - -```ts - -cosnt oauthParams = { - authProviderId: "google", - isCustomProvider: false, - auth0Connection: undefined, - scope: undefined, - claims: undefined, - mode: "redirect", - redirectUrl: "https://your-url-path/oauth-return", - expirationSeconds: 3000 -}; - -const turnkeyPublicKey = await this.initIframeStamper(); -const oauthCallbackUrl = this.oauthCallbackUrl; -const oauthConfig = this.getOauthConfig() // Optional value for OauthConfig() -const usesRelativeUrl = true // Optional value to determine if we use a relative (or absolute) url for the `redirect_url` - -const oauthProviderUrl = getOauthProviderUrl({ - oauthParams, - turnkeyPublicKey, - oauthCallbackUrl -}) - -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - [`GetOauthProviderUrlArgs`](../type-aliases/GetOauthProviderUrlArgs) - - Required. The Oauth provider's auth parameters -
- -#### Returns - -`Promise`\<`string`> - -returns the Oauth provider's url - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getOauthProviderUrl`](BaseSignerClient#getoauthproviderurl) - ---- - -### getPasskeyStatus() - -```ts -getPasskeyStatus(): Promise<{ - isPasskeyAdded: boolean; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:594](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L594) - -Retrieves the status of the passkey for the current user. Requires the user to be authenticated. - -#### Returns - -`Promise`\<\{ -`isPasskeyAdded`: `boolean`; -}> - -A promise that resolves to an object containing the passkey status - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getPasskeyStatus`](BaseSignerClient#getpasskeystatus) - ---- - -### getUser() - -```ts -getUser(): null | User; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1092](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1092) - -Returns the current user or null if no user is set. - -#### Returns - -`null` | [`User`](../type-aliases/User) - -the current user object or null if no user is available - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`getUser`](BaseSignerClient#getuser) - ---- - -### initOauth() - -```ts -initOauth(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:142](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L142) - -Asynchronously fetches and sets the OAuth configuration. - -#### Returns - -`Promise`\<[`OauthConfig`](../type-aliases/OauthConfig)> - -A promise that resolves to the OAuth configuration - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`initOauth`](BaseSignerClient#initoauth) - ---- - -### initOtp() - -```ts -initOtp(type, contact): Promise<{ - otpId: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:492](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L492) - -Initiates an OTP (One-Time Password) verification process for a user contact. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `type` - - `"email"` | `"sms"` - - The type of OTP to send, either "email" or "sms" -
- `contact` - - `string` - - The email address or phone number to send the OTP to -
- -#### Returns - -`Promise`\<\{ -`otpId`: `string`; -}> - -A promise that resolves to an object containing the OTP ID - -#### Throws - -When no user is currently authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`initOtp`](BaseSignerClient#initotp) - ---- - -### listAuthMethods() - -```ts -listAuthMethods(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:666](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L666) - -Retrieves the list of authentication methods for the current user. - -#### Returns - -`Promise`\<[`AuthMethods`](../type-aliases/AuthMethods)> - -A promise that resolves to the list of authentication methods - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`listAuthMethods`](BaseSignerClient#listauthmethods) - ---- - -### lookupUserByAccessKey() - -```ts -lookupUserByAccessKey(params): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:835](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L835) - -Looks up information based on an access key. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `LookupUserByAccessKeyParams` - - The access key parameters -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -The result of the lookup request - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserByAccessKey`](BaseSignerClient#lookupuserbyaccesskey) - ---- - -### lookupUserByEmail() - -```ts -lookupUserByEmail(email): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:815](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L815) - -Looks up information based on an email address. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - the email address to look up -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -the result of the lookup request - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserByEmail`](BaseSignerClient#lookupuserbyemail) - ---- - -### lookupUserByPhone() - -```ts -lookupUserByPhone(phone): Promise<{ - orgId: null | string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:825](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L825) - -Looks up information based on a phone number. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `phone` - - `string` - - the phone number to look up -
- -#### Returns - -`Promise`\<\{ -`orgId`: `null` | `string`; -}> - -the result of the lookup request - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserByPhone`](BaseSignerClient#lookupuserbyphone) - ---- - -### lookupUserWithPasskey() - -```ts -lookupUserWithPasskey(user?): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:572](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L572) - -Asynchronously handles the authentication process using WebAuthn Stamper. If a user is provided, sets the user and returns it. Otherwise, retrieves the current user and initializes the WebAuthn stamper. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault valueDescription
- `user?` - - [`User`](../type-aliases/User) - - `undefined` - - An optional user object to authenticate -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the authenticated user object - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`lookupUserWithPasskey`](BaseSignerClient#lookupuserwithpasskey) - ---- - -### on() - -```ts -on(event, listener): () => any; -``` - -Defined in: [account-kit/signer/src/client/base.ts:314](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L314) - -Listen to events emitted by the client - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `E` *extends* keyof [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents) -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `event` - - `E` - - the event you want to listen to -
- `listener` - - [`AlchemySignerClientEvents`](../type-aliases/AlchemySignerClientEvents)\[`E`] - - the callback function to execute when an event is fired -
- -#### Returns - -a function that will remove the listener when called - -```ts -(): any; -``` - -##### Returns - -`any` - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`on`](BaseSignerClient#on) - ---- - -### pollActivityCompletion() - -```ts -protected pollActivityCompletion( - activity, - organizationId, - resultKey): Promise>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1454](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1454) - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* - | `"createOrganizationResult"` - | `"createAuthenticatorsResult"` - | `"createUsersResult"` - | `"createPrivateKeysResult"` - | `"createInvitationsResult"` - | `"acceptInvitationResult"` - | `"signRawPayloadResult"` - | `"createPolicyResult"` - | `"disablePrivateKeyResult"` - | `"deleteUsersResult"` - | `"deleteAuthenticatorsResult"` - | `"deleteInvitationResult"` - | `"deleteOrganizationResult"` - | `"deletePolicyResult"` - | `"createUserTagResult"` - | `"deleteUserTagsResult"` - | `"signTransactionResult"` - | `"deleteApiKeysResult"` - | `"createApiKeysResult"` - | `"createPrivateKeyTagResult"` - | `"deletePrivateKeyTagsResult"` - | `"setPaymentMethodResult"` - | `"activateBillingTierResult"` - | `"deletePaymentMethodResult"` - | `"createApiOnlyUsersResult"` - | `"updateRootQuorumResult"` - | `"updateUserTagResult"` - | `"updatePrivateKeyTagResult"` - | `"createSubOrganizationResult"` - | `"updateAllowedOriginsResult"` - | `"createPrivateKeysResultV2"` - | `"updateUserResult"` - | `"updatePolicyResult"` - | `"createSubOrganizationResultV3"` - | `"createWalletResult"` - | `"createWalletAccountsResult"` - | `"initUserEmailRecoveryResult"` - | `"recoverUserResult"` - | `"setOrganizationFeatureResult"` - | `"removeOrganizationFeatureResult"` - | `"exportPrivateKeyResult"` - | `"exportWalletResult"` - | `"createSubOrganizationResultV4"` - | `"emailAuthResult"` - | `"exportWalletAccountResult"` - | `"initImportWalletResult"` - | `"importWalletResult"` - | `"initImportPrivateKeyResult"` - | `"importPrivateKeyResult"` - | `"createPoliciesResult"` - | `"signRawPayloadsResult"` - | `"createReadOnlySessionResult"` - | `"createOauthProvidersResult"` - | `"deleteOauthProvidersResult"` - | `"createSubOrganizationResultV5"` - | `"oauthResult"` - | `"createReadWriteSessionResult"` - | `"createSubOrganizationResultV6"` - | `"deletePrivateKeysResult"` - | `"deleteWalletsResult"` - | `"createReadWriteSessionResultV2"` - | `"deleteSubOrganizationResult"` - | `"initOtpAuthResult"` - | `"otpAuthResult"` - | `"createSubOrganizationResultV7"` - | `"updateWalletResult"` - | `"updatePolicyResultV2"` - | `"initOtpAuthResultV2"` - | `"initOtpResult"` - | `"verifyOtpResult"` - | `"otpLoginResult"` - | `"stampLoginResult"` - | `"oauthLoginResult"` - | `"updateUserNameResult"` - | `"updateUserEmailResult"` - | `"updateUserPhoneNumberResult"` - | `"initFiatOnRampResult"` - | `"createSmartContractInterfaceResult"` - | `"deleteSmartContractInterfaceResult"` - | `"enableAuthProxyResult"` - | `"disableAuthProxyResult"` - | `"updateAuthProxyConfigResult"` - | `"createOauth2CredentialResult"` - | `"updateOauth2CredentialResult"` - | `"deleteOauth2CredentialResult"` - | `"oauth2AuthenticateResult"` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `activity` - - `Object` -
- `organizationId` - - `string` -
- `resultKey` - - `T` -
- -#### Returns - -`Promise`\<`NonNullable`\<`object`\[`T`]>> - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`pollActivityCompletion`](BaseSignerClient#pollactivitycompletion) - ---- - -### removeEmail() - -```ts -removeEmail(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:382](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L382) - -Removes the email for the authenticated user, disallowing them from login with that email. - -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the email is removed - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removeEmail`](BaseSignerClient#removeemail) - ---- - -### removeMfa() - -```ts -removeMfa(params): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1244](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1244) - -Removes existing MFA factors by ID. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`RemoveMfaParams`](../type-aliases/RemoveMfaParams) - - The parameters specifying which factors to disable -
- -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to the updated list of MFA factors - -#### Throws - -If no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removeMfa`](BaseSignerClient#removemfa) - ---- - -### removeOauthProvider() - -```ts -removeOauthProvider(providerId): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:644](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L644) - -Deletes a specified OAuth provider for the authenticated user. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `providerId` - - `string` - - The ID of the provider to be deleted -
- -#### Returns - -`Promise`\<`void`> - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removeOauthProvider`](BaseSignerClient#removeoauthprovider) - ---- - -### removePasskey() - -```ts -removePasskey(authenticatorId): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:551](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L551) - -Removes a passkey authenticator from the user's account. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `authenticatorId` - - `string` - - The ID of the authenticator to remove. -
- -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the authenticator is removed. - -#### Throws - -If the user is not authenticated. - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removePasskey`](BaseSignerClient#removepasskey) - ---- - -### removePhoneNumber() - -```ts -removePhoneNumber(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:451](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L451) - -Removes the phone number for the authenticated user, disallowing them from login with that phone number. - -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the phone number is removed - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`removePhoneNumber`](BaseSignerClient#removephonenumber) - ---- - -### request() - -```ts -request(route, body): Promise>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1104](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1104) - -Sends a POST request to the given signer route with the specified body and returns the response. -Not intended to be used directly, use the specific methods instead on the client instead. - -#### Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `R` *extends* - | `"/v1/signup"` - | `"/v1/whoami"` - | `"/v1/auth"` - | `"/v1/lookup"` - | `"/v1/init-otp"` - | `"/v1/verify-otp"` - | `"/v1/sign-payload"` - | `"/v1/update-email-auth"` - | `"/v1/update-phone-auth"` - | `"/v1/add-oauth-provider"` - | `"/v1/remove-oauth-provider"` - | `"/v1/list-auth-methods"` - | `"/v1/prepare-oauth"` - | `"/v1/otp"` - | `"/v1/auth-list-multi-factors"` - | `"/v1/auth-delete-multi-factors"` - | `"/v1/auth-request-multi-factor"` - | `"/v1/auth-verify-multi-factor"` - | `"/v1/auth-jwt"` - | `"/v1/signer-config"` - | `"/v1/auth-validate-multi-factors"` - | `"/v1/multi-owner-create"` - | `"/v1/multi-owner-prepare-add"` - | `"/v1/multi-owner-add"` - | `"/v1/multi-owner-update-root-quorum"` - | `"/v1/multi-owner-sign-raw-payload"` - | `"/v1/multi-owner-prepare-delete"` - | `"/v1/multi-owner-delete"` -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `route` - - `R` - - The route to which the request should be sent -
- `body` - - [`SignerBody`](../type-aliases/SignerBody)\<`R`> - - The request body containing the data to be sent -
- -#### Returns - -`Promise`\<[`SignerResponse`](../type-aliases/SignerResponse)\<`R`>> - -A promise that resolves to the response from the signer - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`request`](BaseSignerClient#request) - ---- - -### setEmail() - -Implementation for setEmail method with optional OTP verification. - -#### Param - -An OTP object containing the OTP ID & OTP code (or an email address for legacy usage) - -#### Call Signature - -```ts -setEmail(email): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:336](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L336) - -Sets the email for the authenticated user, allowing them to login with that -email. - -##### Deprecated - -You must contact Alchemy to enable this feature for your team, -as there are important security considerations. In particular, you must not -call this without first validating that the user owns this email account. -Recommended to use the email verification flow instead. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `email` - - `string` - - The email to set for the user -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email - -##### Throws - -If the user is not authenticated - -##### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setEmail`](BaseSignerClient#setemail) - -#### Call Signature - -```ts -setEmail(otp): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:346](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L346) - -Sets the email for the authenticated user, allowing them to login with that -email. Must be called after calling `initOtp` with the email. - -##### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `otp` - - [`VerificationOtp`](../type-aliases/VerificationOtp) - - The OTP verification object including the OTP ID and OTP code -
- -##### Returns - -`Promise`\<`string`> - -A promise that resolves to the updated email - -##### Throws - -If the user is not authenticated - -##### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setEmail`](BaseSignerClient#setemail) - ---- - -### setPhoneNumber() - -```ts -setPhoneNumber(otp): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:436](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L436) - -Updates the phone number for the authenticated user, allowing them to login with that -phone number. Must be called after calling `initOtp` with the phone number. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `otp` - - [`VerificationOtp`](../type-aliases/VerificationOtp) - - The OTP object including the OTP ID and OTP code -
- -#### Returns - -`Promise`\<`void`> - -A promise that resolves when the phone number is set - -#### Throws - -If the user is not authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setPhoneNumber`](BaseSignerClient#setphonenumber) - ---- - -### setStamper() - -```ts -protected setStamper(stamper): void; -``` - -Defined in: [account-kit/signer/src/client/base.ts:166](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L166) - -Sets the stamper of the TurnkeyClient. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `stamper` - - `TStamper` - - the stamper function to set for the TurnkeyClient -
- -#### Returns - -`void` - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`setStamper`](BaseSignerClient#setstamper) - ---- - -### signRawMessage() - -```ts -signRawMessage(msg, mode): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:852](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L852) - -This will sign a message with the user's private key, without doing any transformations on the message. -For SignMessage or SignTypedData, the caller should hash the message before calling this method and pass -that result here. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault valueDescription
- `msg` - - `` `0x${string}` `` - - `undefined` - - the hex representation of the bytes to sign -
- `mode` - - `"SOLANA"` | `"ETHEREUM"` - - `"ETHEREUM"` - - specify if signing should happen for solana or ethereum -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -the signature over the raw hex - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`signRawMessage`](BaseSignerClient#signrawmessage) - ---- - -### stampGetOrganization() - -```ts -stampGetOrganization(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:760](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L760) - -Generates a stamped getOrganization request for the current user. - -#### Returns - -`Promise`\<`TSignedRequest`> - -a promise that resolves to the "getOrganization" information for the logged in user - -#### Throws - -if no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`stampGetOrganization`](BaseSignerClient#stampgetorganization) - ---- - -### stampWhoami() - -```ts -stampWhoami(): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:744](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L744) - -Generates a stamped whoami request for the current user. This request can then be used to call /signer/v1/whoami to get the user information. -This is useful if you want to get the user information in a different context like a server. You can pass the stamped request to the server -and then call our API to get the user information. Using this stamp is the most trusted way to get the user information since a stamp can only -belong to the user who created it. - -#### Returns - -`Promise`\<`TSignedRequest`> - -a promise that resolves to the "whoami" information for the logged in user - -#### Throws - -if no organization ID is provided - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`stampWhoami`](BaseSignerClient#stampwhoami) - ---- - -### validateMultiFactors() - -```ts -validateMultiFactors(params): Promise<{ - bundle: string; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1276](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1276) - -Validates multiple MFA factors using the provided encrypted payload and MFA codes. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`ValidateMultiFactorsParams`](../type-aliases/ValidateMultiFactorsParams) - - The validation parameters -
- -#### Returns - -`Promise`\<\{ -`bundle`: `string`; -}> - -A promise that resolves to an object containing the credential bundle - -#### Throws - -If no credential bundle is returned from the server - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`validateMultiFactors`](BaseSignerClient#validatemultifactors) - ---- - -### verifyMfa() - -```ts -verifyMfa(params): Promise<{ - multiFactors: MfaFactor[]; -}>; -``` - -Defined in: [account-kit/signer/src/client/base.ts:1211](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L1211) - -Verifies a newly created MFA factor to complete the setup process. - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`VerifyMfaParams`](../type-aliases/VerifyMfaParams) - - The parameters required to verify the MFA factor -
- -#### Returns - -`Promise`\<\{ -`multiFactors`: [`MfaFactor`](../type-aliases/MfaFactor)\[]; -}> - -A promise that resolves to the updated list of MFA factors - -#### Throws - -If no user is authenticated - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`verifyMfa`](BaseSignerClient#verifymfa) - ---- - -### whoami() - -```ts -whoami( - orgId?, - idToken?, - accessToken?): Promise; -``` - -Defined in: [account-kit/signer/src/client/base.ts:684](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/base.ts#L684) - -Retrieves the current user or fetches the user information if not already available. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `orgId?` - - `string` - - optional organization ID, defaults to the user's organization ID -
- `idToken?` - - `string` - - an OIDC ID token containing additional user information -
- `accessToken?` - - `string` - - an access token which if provided will be added to the user -
- -#### Returns - -`Promise`\<[`User`](../type-aliases/User)> - -A promise that resolves to the user object - -#### Throws - -if no organization ID is provided when there is no current user - -#### Inherited from - -[`BaseSignerClient`](BaseSignerClient).[`whoami`](BaseSignerClient#whoami) diff --git a/docs/pages/reference/account-kit/signer/src/classes/SolanaSigner.mdx b/docs/pages/reference/account-kit/signer/src/classes/SolanaSigner.mdx deleted file mode 100644 index 63a3480369..0000000000 --- a/docs/pages/reference/account-kit/signer/src/classes/SolanaSigner.mdx +++ /dev/null @@ -1,446 +0,0 @@ ---- -title: SolanaSigner -description: The SolanaSigner class is used to sign transactions and messages for the Solana blockchain. It provides methods to add signatures to transactions and sign messages. -slug: wallets/reference/account-kit/signer/classes/SolanaSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/solanaSigner.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L18) - -The SolanaSigner class is used to sign transactions and messages for the Solana blockchain. -It provides methods to add signatures to transactions and sign messages. - -## Constructors - -### Constructor - -```ts -new SolanaSigner(client): SolanaSigner; -``` - -Defined in: [account-kit/signer/src/solanaSigner.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L27) - -Constructor for the SolanaSigner class which is a wrapper around the alchemy client, and is more focused on the solana web3 - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `BaseSignerClient` - - This is the client that will be used to sign the transaction, and we are just having functions on top of it. -
- -#### Returns - -`SolanaSigner` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `address` - - `string` -
- `alchemyClient` - - `BaseSignerClient` -
- -## Methods - -### addSignature() - -```ts -addSignature(transaction): Promise; -``` - -Defined in: [account-kit/signer/src/solanaSigner.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L41) - -Adds a signature of the client user to a transaction - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `transaction` - - `Transaction` | `VersionedTransaction` - - The transaction to add the signature to -
- -#### Returns - -`Promise`\<`Transaction` | `VersionedTransaction`> - -The transaction with the signature added - ---- - -### addSponsorship() - -```ts -addSponsorship( - instructions, - connection, - policyId?): Promise; -``` - -Defined in: [account-kit/signer/src/solanaSigner.ts:158](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L158) - -Adds sponsorship to a transaction. Used to have a party like Alchemy pay for the transaction. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `instructions` - - `TransactionInstruction`\[] - - The instructions to add to the transaction -
- `connection` - - `Connection` - - The connection to use for the transaction -
- `policyId?` - - `string` - - The policy ID to add sponsorship to -
- -#### Returns - -`Promise`\<`VersionedTransaction`> - -The transaction with sponsorship added - ---- - -### createTransaction() - -Creates a transfer transaction. Used for the SolanaCard example. - -#### Param - -The instructions to add to the transaction - -#### Param - -The connection to use for the transaction - -#### Param - -The version of the transaction - -#### Call Signature - -```ts -createTransaction( - instructions, - connection, - version?): Promise; -``` - -Defined in: [account-kit/signer/src/solanaSigner.ts:92](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L92) - -##### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `instructions` - - `TransactionInstruction`\[] -
- `connection` - - `Connection` -
- `version?` - - `"versioned"` -
- -##### Returns - -`Promise`\<`VersionedTransaction`> - -#### Call Signature - -```ts -createTransaction( - instructions, - connection, - version?): Promise; -``` - -Defined in: [account-kit/signer/src/solanaSigner.ts:97](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L97) - -##### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `instructions` - - `TransactionInstruction`\[] -
- `connection` - - `Connection` -
- `version?` - - `"legacy"` -
- -##### Returns - -`Promise`\<`Transaction`> - -#### Call Signature - -```ts -createTransaction(instructions, connection): Promise; -``` - -Defined in: [account-kit/signer/src/solanaSigner.ts:102](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L102) - -##### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `instructions` - - `TransactionInstruction`\[] -
- `connection` - - `Connection` -
- -##### Returns - -`Promise`\<`VersionedTransaction`> - ---- - -### signMessage() - -```ts -signMessage(message): Promise; -``` - -Defined in: [account-kit/signer/src/solanaSigner.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/solanaSigner.ts#L73) - -Signs a message - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `message` - - `Uint8Array` - - The message to sign -
- -#### Returns - -`Promise`\<[`ByteArray`](https://viem.sh)> - -The signature of the message diff --git a/docs/pages/reference/account-kit/signer/src/enumerations/AlchemyMfaStatus.mdx b/docs/pages/reference/account-kit/signer/src/enumerations/AlchemyMfaStatus.mdx deleted file mode 100644 index 66b84a5ffb..0000000000 --- a/docs/pages/reference/account-kit/signer/src/enumerations/AlchemyMfaStatus.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: AlchemyMfaStatus -description: Overview of AlchemyMfaStatus -slug: wallets/reference/account-kit/signer/enumerations/AlchemyMfaStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/types.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L33) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValue
- `NOT_REQUIRED` - - `"not_required"` -
- `REQUIRED` - - `"required"` -
diff --git a/docs/pages/reference/account-kit/signer/src/enumerations/AlchemySignerStatus.mdx b/docs/pages/reference/account-kit/signer/src/enumerations/AlchemySignerStatus.mdx deleted file mode 100644 index 1a82954f20..0000000000 --- a/docs/pages/reference/account-kit/signer/src/enumerations/AlchemySignerStatus.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: AlchemySignerStatus -description: Overview of AlchemySignerStatus -slug: wallets/reference/account-kit/signer/enumerations/AlchemySignerStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/types.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L19) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValue
- `AUTHENTICATING_EMAIL` - - `"AUTHENTICATING_EMAIL"` -
- `AUTHENTICATING_JWT` - - `"AUTHENTICATING_JWT"` -
- `AUTHENTICATING_OAUTH` - - `"AUTHENTICATING_OAUTH"` -
- `AUTHENTICATING_PASSKEY` - - `"AUTHENTICATING_PASSKEY"` -
- `AWAITING_EMAIL_AUTH` - - `"AWAITING_EMAIL_AUTH"` -
- `AWAITING_MFA_AUTH` - - `"AWAITING_MFA_AUTH"` -
- `AWAITING_OTP_AUTH` - - `"AWAITING_OTP_AUTH"` -
- `AWAITING_SMS_AUTH` - - `"AWAITING_SMS_AUTH"` -
- `CONNECTED` - - `"CONNECTED"` -
- `DISCONNECTED` - - `"DISCONNECTED"` -
- `INITIALIZING` - - `"INITIALIZING"` -
diff --git a/docs/pages/reference/account-kit/signer/src/functions/createServerSigner.mdx b/docs/pages/reference/account-kit/signer/src/functions/createServerSigner.mdx deleted file mode 100644 index 8fe22148d4..0000000000 --- a/docs/pages/reference/account-kit/signer/src/functions/createServerSigner.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: createServerSigner -description: Overview of the createServerSigner function -slug: wallets/reference/account-kit/signer/functions/createServerSigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createServerSigner(params): Promise; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:151](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L151) - -Creates a new server signer. - -## Example - -```ts -const signer = await createServerSigner({ - auth: { accessKey }, - connection: { - apiKey: "alchemy-api-key", - }, -}); - -console.log("Signer address:", await signer.getAddress()); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `CreateServerSignerParams` - - Parameters -
- -## Returns - -`Promise`\<[`AlchemyServerSigner`](../classes/AlchemyServerSigner)> - -A promise that resolves to a server signer diff --git a/docs/pages/reference/account-kit/signer/src/functions/createSolanaSponsoredTransaction.mdx b/docs/pages/reference/account-kit/signer/src/functions/createSolanaSponsoredTransaction.mdx deleted file mode 100644 index c710508e6a..0000000000 --- a/docs/pages/reference/account-kit/signer/src/functions/createSolanaSponsoredTransaction.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: createSolanaSponsoredTransaction -description: Overview of the createSolanaSponsoredTransaction function -slug: wallets/reference/account-kit/signer/functions/createSolanaSponsoredTransaction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createSolanaSponsoredTransaction( - instructions, - connection, - policyId, - address, -): Promise; -``` - -Defined in: [account-kit/signer/src/utils/solana.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/utils/solana.ts#L18) - -This function wraps instructions in a sponsored transaction using Alchemy's fee payer service - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `instructions` - - `TransactionInstruction`\[] - - The instructions to add sponsorship to -
- `connection` - - `Connection` - - The connection to use -
- `policyId` - - `string` - - The policy id to use -
- `address` - - `string` - - The address to use -
- -## Returns - -`Promise`\<`VersionedTransaction`> - -- The sponsored transaction diff --git a/docs/pages/reference/account-kit/signer/src/functions/createSolanaTransaction.mdx b/docs/pages/reference/account-kit/signer/src/functions/createSolanaTransaction.mdx deleted file mode 100644 index 9373a5f6a5..0000000000 --- a/docs/pages/reference/account-kit/signer/src/functions/createSolanaTransaction.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: createSolanaTransaction -description: Overview of the createSolanaTransaction function -slug: wallets/reference/account-kit/signer/functions/createSolanaTransaction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createSolanaTransaction( - instructions, - connection, - address, -): Promise; -``` - -Defined in: [account-kit/signer/src/utils/solana.ts:82](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/utils/solana.ts#L82) - -Creates a regular (non-sponsored) Solana transaction from instructions - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `instructions` - - `TransactionInstruction`\[] - - The instructions to create transaction from -
- `connection` - - `Connection` - - The connection to use -
- `address` - - `string` - - The payer address -
- -## Returns - -`Promise`\<`VersionedTransaction`> - -- The transaction diff --git a/docs/pages/reference/account-kit/signer/src/functions/generateAccessKey.mdx b/docs/pages/reference/account-kit/signer/src/functions/generateAccessKey.mdx deleted file mode 100644 index e802226b3e..0000000000 --- a/docs/pages/reference/account-kit/signer/src/functions/generateAccessKey.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: generateAccessKey -description: Overview of the generateAccessKey function -slug: wallets/reference/account-kit/signer/functions/generateAccessKey -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function generateAccessKey(): string; -``` - -Defined in: [account-kit/signer/src/serverSigner.ts:170](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/serverSigner.ts#L170) - -Generates a new access key for use in the server signer - -## Returns - -`string` - -A randomly generated access key diff --git a/docs/pages/reference/account-kit/signer/src/interfaces/ErrorInfo.mdx b/docs/pages/reference/account-kit/signer/src/interfaces/ErrorInfo.mdx deleted file mode 100644 index 9c83bbf4c5..0000000000 --- a/docs/pages/reference/account-kit/signer/src/interfaces/ErrorInfo.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: ErrorInfo -description: Overview of the ErrorInfo interface -slug: wallets/reference/account-kit/signer/interfaces/ErrorInfo -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/signer/src/types.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L38) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `message` - - `string` -
- `name` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParams.mdx deleted file mode 100644 index a4d4ed7df3..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: AccessKeyAuthParams -description: Overview of AccessKeyAuthParams -slug: wallets/reference/account-kit/signer/type-aliases/AccessKeyAuthParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AccessKeyAuthParams = object; -``` - -Defined in: [account-kit/signer/src/signer.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L14) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accessKey` - - `string` -
- `accountId?` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParamsPublicKeyOnly.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParamsPublicKeyOnly.mdx deleted file mode 100644 index d44f6b547e..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AccessKeyAuthParamsPublicKeyOnly.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: AccessKeyAuthParamsPublicKeyOnly -description: Overview of AccessKeyAuthParamsPublicKeyOnly -slug: wallets/reference/account-kit/signer/type-aliases/AccessKeyAuthParamsPublicKeyOnly -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AccessKeyAuthParamsPublicKeyOnly = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:87](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L87) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accessKey` - - `object` -
- `accessKey.accountId?` - - `string` -
- `accessKey.publicKey` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AddMfaParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AddMfaParams.mdx deleted file mode 100644 index 198f9d3e44..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AddMfaParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: AddMfaParams -description: Overview of AddMfaParams -slug: wallets/reference/account-kit/signer/type-aliases/AddMfaParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AddMfaParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:521](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L521) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `multiFactorType` - - `MultiFactorType` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AddMfaResult.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AddMfaResult.mdx deleted file mode 100644 index a744ed02b5..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AddMfaResult.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: AddMfaResult -description: Overview of AddMfaResult -slug: wallets/reference/account-kit/signer/type-aliases/AddMfaResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AddMfaResult = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:525](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L525) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `multiFactorId` - - `string` -
- `multiFactorTotpUrl` - - `string` -
- `multiFactorType` - - `MultiFactorType` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AddOauthProviderParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AddOauthProviderParams.mdx deleted file mode 100644 index 5579bd8c83..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AddOauthProviderParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: AddOauthProviderParams -description: Overview of AddOauthProviderParams -slug: wallets/reference/account-kit/signer/type-aliases/AddOauthProviderParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AddOauthProviderParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:558](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L558) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `oidcToken` - - `string` -
- `providerName` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvent.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvent.mdx deleted file mode 100644 index a20d269961..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvent.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemySignerClientEvent -description: Overview of AlchemySignerClientEvent -slug: wallets/reference/account-kit/signer/type-aliases/AlchemySignerClientEvent -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySignerClientEvent = keyof AlchemySignerClientEvents; -``` - -Defined in: [account-kit/signer/src/client/types.ts:470](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L470) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvents.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvents.mdx deleted file mode 100644 index c8cf5e7f60..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerClientEvents.mdx +++ /dev/null @@ -1,348 +0,0 @@ ---- -title: AlchemySignerClientEvents -description: Overview of AlchemySignerClientEvents -slug: wallets/reference/account-kit/signer/type-aliases/AlchemySignerClientEvents -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySignerClientEvents = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:458](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L458) - -## Methods - -### authenticating() - -```ts -authenticating(data): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:461](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L461) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `data` - - [`AuthenticatingEventMetadata`](AuthenticatingEventMetadata) -
- -#### Returns - -`void` - ---- - -### connected() - -```ts -connected(user): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:459](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L459) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - [`User`](User) -
- -#### Returns - -`void` - ---- - -### connectedEmail() - -```ts -connectedEmail(user, bundle): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:462](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L462) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - [`User`](User) -
- `bundle` - - `string` -
- -#### Returns - -`void` - ---- - -### connectedJwt() - -```ts -connectedJwt(user, bundle): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:466](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L466) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - [`User`](User) -
- `bundle` - - `string` -
- -#### Returns - -`void` - ---- - -### connectedOauth() - -```ts -connectedOauth(user, bundle): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:464](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L464) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - [`User`](User) -
- `bundle` - - `string` -
- -#### Returns - -`void` - ---- - -### connectedOtp() - -```ts -connectedOtp(user, bundle): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:465](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L465) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - [`User`](User) -
- `bundle` - - `string` -
- -#### Returns - -`void` - ---- - -### connectedPasskey() - -```ts -connectedPasskey(user): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:463](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L463) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - [`User`](User) -
- -#### Returns - -`void` - ---- - -### disconnected() - -```ts -disconnected(): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:467](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L467) - -#### Returns - -`void` - ---- - -### newUserSignup() - -```ts -newUserSignup(): void; -``` - -Defined in: [account-kit/signer/src/client/types.ts:460](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L460) - -#### Returns - -`void` diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvent.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvent.mdx deleted file mode 100644 index bedd496149..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvent.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemySignerEvent -description: Overview of AlchemySignerEvent -slug: wallets/reference/account-kit/signer/type-aliases/AlchemySignerEvent -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySignerEvent = keyof AlchemySignerEvents; -``` - -Defined in: [account-kit/signer/src/types.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L17) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvents.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvents.mdx deleted file mode 100644 index f8856ade2a..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerEvents.mdx +++ /dev/null @@ -1,262 +0,0 @@ ---- -title: AlchemySignerEvents -description: Overview of AlchemySignerEvents -slug: wallets/reference/account-kit/signer/type-aliases/AlchemySignerEvents -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySignerEvents = object; -``` - -Defined in: [account-kit/signer/src/types.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L3) - -## Methods - -### connected() - -```ts -connected(user): void; -``` - -Defined in: [account-kit/signer/src/types.ts:4](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L4) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `user` - - `User` -
- -#### Returns - -`void` - ---- - -### disconnected() - -```ts -disconnected(): void; -``` - -Defined in: [account-kit/signer/src/types.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L6) - -#### Returns - -`void` - ---- - -### emailAuthLinkingRequired() - -```ts -emailAuthLinkingRequired(email): void; -``` - -Defined in: [account-kit/signer/src/types.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L14) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `email` - - `string` -
- -#### Returns - -`void` - ---- - -### errorChanged() - -```ts -errorChanged(error): void; -``` - -Defined in: [account-kit/signer/src/types.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L8) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `error` - - `undefined` | [`ErrorInfo`](../interfaces/ErrorInfo) -
- -#### Returns - -`void` - ---- - -### mfaStatusChanged() - -```ts -mfaStatusChanged(mfaStatus): void; -``` - -Defined in: [account-kit/signer/src/types.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L9) - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `mfaStatus` - - \{ `encryptedPayload?`: `string`; `mfaFactorId?`: `string`; `mfaRequired`: `boolean`; } -
- `mfaStatus.encryptedPayload?` - - `string` -
- `mfaStatus.mfaFactorId?` - - `string` -
- `mfaStatus.mfaRequired` - - `boolean` -
- -#### Returns - -`void` - ---- - -### newUserSignup() - -```ts -newUserSignup(): void; -``` - -Defined in: [account-kit/signer/src/types.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L5) - -#### Returns - -`void` - ---- - -### statusChanged() - -```ts -statusChanged(status): void; -``` - -Defined in: [account-kit/signer/src/types.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L7) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `status` - - [`AlchemySignerStatus`](../enumerations/AlchemySignerStatus) -
- -#### Returns - -`void` diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerParams.mdx deleted file mode 100644 index 70112ead9e..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AlchemySignerParams.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: AlchemySignerParams -description: Overview of AlchemySignerParams -slug: wallets/reference/account-kit/signer/type-aliases/AlchemySignerParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemySignerParams = z.input; -``` - -Defined in: [account-kit/signer/src/signer.ts:117](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L117) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthLinkingPrompt.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AuthLinkingPrompt.mdx deleted file mode 100644 index ec724afa98..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthLinkingPrompt.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: AuthLinkingPrompt -description: Overview of AuthLinkingPrompt -slug: wallets/reference/account-kit/signer/type-aliases/AuthLinkingPrompt -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AuthLinkingPrompt = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:478](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L478) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accessToken?` - - `string` -
- `email` - - `string` -
- `idToken` - - `string` -
- `orgId` - - `string` -
- `otpId` - - `string` -
- `providerName` - - `string` -
- `status` - - `"ACCOUNT_LINKING_CONFIRMATION_REQUIRED"` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthMethods.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AuthMethods.mdx deleted file mode 100644 index 03b1a29386..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthMethods.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: AuthMethods -description: Overview of AuthMethods -slug: wallets/reference/account-kit/signer/type-aliases/AuthMethods -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AuthMethods = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:563](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L563) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `email?` - - `string` -
- `oauthProviders` - - [`OauthProviderInfo`](OauthProviderInfo)\[] -
- `passkeys` - - [`PasskeyInfo`](PasskeyInfo)\[] -
- `phone?` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AuthParams.mdx deleted file mode 100644 index 6daecf2bdd..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthParams.mdx +++ /dev/null @@ -1,600 +0,0 @@ ---- -title: AuthParams -description: Overview of AuthParams -slug: wallets/reference/account-kit/signer/type-aliases/AuthParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AuthParams = - | { - email: string; - emailMode?: "magicLink" | "otp"; - multiFactors?: VerifyMfaParams[]; - redirectParams?: URLSearchParams; - type: "email"; - } - | { - bundle: string; - isNewUser?: boolean; - orgId?: string; - type: "email"; - } - | { - phone: string; - type: "sms"; - } - | { - creationOpts?: CredentialCreationOptionOverrides; - email: string; - type: "passkey"; - } - | { - createNew: false; - type: "passkey"; - } - | { - createNew: true; - creationOpts?: CredentialCreationOptionOverrides; - type: "passkey"; - username: string; - } - | (object & OauthProviderConfig & OauthRedirectConfig) - | { - accessToken?: string; - bundle: string; - idToken: string; - isNewUser?: boolean; - orgId: string; - type: "oauthReturn"; - } - | { - authProviderId?: string; - jwt: string; - type: "custom-jwt"; - } - | { - multiFactors?: VerifyMfaParams[]; - otpCode: string; - type: "otp"; - } - | (object & AccessKeyAuthParams); -``` - -Defined in: [account-kit/signer/src/signer.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L19) - -## Type Declaration - -```ts -{ - email: string; - emailMode?: "magicLink" | "otp"; - multiFactors?: VerifyMfaParams[]; - redirectParams?: URLSearchParams; - type: "email"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
- `email` - - `string` - - ‐ -
- `emailMode?` - - `"magicLink"` | `"otp"` - - **Deprecated** - - This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. -
- `multiFactors?` - - [`VerifyMfaParams`](VerifyMfaParams)\[] - - ‐ -
- `redirectParams?` - - `URLSearchParams` - - ‐ -
- `type` - - `"email"` - - ‐ -
- -```ts -{ - bundle: string; - isNewUser?: boolean; - orgId?: string; - type: "email"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `bundle` - - `string` -
- `isNewUser?` - - `boolean` -
- `orgId?` - - `string` -
- `type` - - `"email"` -
- -```ts -{ - phone: string; - type: "sms"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `phone` - - `string` -
- `type` - - `"sms"` -
- -```ts -{ - creationOpts?: CredentialCreationOptionOverrides; - email: string; - type: "passkey"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `creationOpts?` - - [`CredentialCreationOptionOverrides`](CredentialCreationOptionOverrides) -
- `email` - - `string` -
- `type` - - `"passkey"` -
- -```ts -{ - createNew: false; - type: "passkey"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `createNew` - - `false` -
- `type` - - `"passkey"` -
- -```ts -{ - createNew: true; - creationOpts?: CredentialCreationOptionOverrides; - type: "passkey"; - username: string; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `createNew` - - `true` -
- `creationOpts?` - - [`CredentialCreationOptionOverrides`](CredentialCreationOptionOverrides) -
- `type` - - `"passkey"` -
- `username` - - `string` -
- -`object` & [`OauthProviderConfig`](OauthProviderConfig) & [`OauthRedirectConfig`](OauthRedirectConfig) - -```ts -{ - accessToken?: string; - bundle: string; - idToken: string; - isNewUser?: boolean; - orgId: string; - type: "oauthReturn"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accessToken?` - - `string` -
- `bundle` - - `string` -
- `idToken` - - `string` -
- `isNewUser?` - - `boolean` -
- `orgId` - - `string` -
- `type` - - `"oauthReturn"` -
- -```ts -{ - authProviderId?: string; - jwt: string; - type: "custom-jwt"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `authProviderId?` - - `string` -
- `jwt` - - `string` -
- `type` - - `"custom-jwt"` -
- -```ts -{ - multiFactors?: VerifyMfaParams[]; - otpCode: string; - type: "otp"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `multiFactors?` - - [`VerifyMfaParams`](VerifyMfaParams)\[] -
- `otpCode` - - `string` -
- `type` - - `"otp"` -
- -`object` & [`AccessKeyAuthParams`](AccessKeyAuthParams) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthProviderConfig.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AuthProviderConfig.mdx deleted file mode 100644 index 64124af99b..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthProviderConfig.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: AuthProviderConfig -description: Overview of AuthProviderConfig -slug: wallets/reference/account-kit/signer/type-aliases/AuthProviderConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AuthProviderConfig = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:154](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L154) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `authEndpoint` - - `string` -
- `clientId` - - `string` -
- `id` - - `string` -
- `isCustomProvider?` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthenticatingEventMetadata.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/AuthenticatingEventMetadata.mdx deleted file mode 100644 index 99deaacfa6..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/AuthenticatingEventMetadata.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: AuthenticatingEventMetadata -description: Overview of AuthenticatingEventMetadata -slug: wallets/reference/account-kit/signer/type-aliases/AuthenticatingEventMetadata -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AuthenticatingEventMetadata = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:447](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L447) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `type` - - `"email"` | `"passkey"` | `"oauth"` | `"otp"` | `"otpVerify"` | `"custom-jwt"` | `"sms"` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/CreateAccountParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/CreateAccountParams.mdx deleted file mode 100644 index d83a7afb93..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/CreateAccountParams.mdx +++ /dev/null @@ -1,326 +0,0 @@ ---- -title: CreateAccountParams -description: Overview of CreateAccountParams -slug: wallets/reference/account-kit/signer/type-aliases/CreateAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateAccountParams = - | { - email: string; - emailMode?: EmailType; - expirationSeconds?: number; - redirectParams?: URLSearchParams; - type: "email"; - } - | { - phone: string; - type: "sms"; - } - | { - creationOpts?: CredentialCreationOptionOverrides; - email: string; - type: "passkey"; - } - | { - creationOpts?: CredentialCreationOptionOverrides; - type: "passkey"; - username: string; - } - | { - accountId?: string; - publicKey: string; - type: "accessKey"; - }; -``` - -Defined in: [account-kit/signer/src/client/types.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L41) - -## Type Declaration - -```ts -{ - email: string; - emailMode?: EmailType; - expirationSeconds?: number; - redirectParams?: URLSearchParams; - type: "email"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
- `email` - - `string` - - ‐ -
- `emailMode?` - - [`EmailType`](EmailType) - - **Deprecated** - - This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. -
- `expirationSeconds?` - - `number` - - ‐ -
- `redirectParams?` - - `URLSearchParams` - - ‐ -
- `type` - - `"email"` - - ‐ -
- -```ts -{ - phone: string; - type: "sms"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `phone` - - `string` -
- `type` - - `"sms"` -
- -```ts -{ - creationOpts?: CredentialCreationOptionOverrides; - email: string; - type: "passkey"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `creationOpts?` - - [`CredentialCreationOptionOverrides`](CredentialCreationOptionOverrides) -
- `email` - - `string` -
- `type` - - `"passkey"` -
- -```ts -{ - creationOpts?: CredentialCreationOptionOverrides; - type: "passkey"; - username: string; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `creationOpts?` - - [`CredentialCreationOptionOverrides`](CredentialCreationOptionOverrides) -
- `type` - - `"passkey"` -
- `username` - - `string` -
- -```ts -{ - accountId?: string; - publicKey: string; - type: "accessKey"; -} -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accountId?` - - `string` -
- `publicKey` - - `string` -
- `type` - - `"accessKey"` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/CredentialCreationOptionOverrides.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/CredentialCreationOptionOverrides.mdx deleted file mode 100644 index 8e0b011403..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/CredentialCreationOptionOverrides.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: CredentialCreationOptionOverrides -description: Overview of CredentialCreationOptionOverrides -slug: wallets/reference/account-kit/signer/type-aliases/CredentialCreationOptionOverrides -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CredentialCreationOptionOverrides = object & - Pick; -``` - -Defined in: [account-kit/signer/src/client/types.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L17) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `publicKey?` - - `Partial`\<`CredentialCreationOptions`\[`"publicKey"`]> -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/EmailAuthParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/EmailAuthParams.mdx deleted file mode 100644 index 0a41e95709..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/EmailAuthParams.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: EmailAuthParams -description: Overview of EmailAuthParams -slug: wallets/reference/account-kit/signer/type-aliases/EmailAuthParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EmailAuthParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:72](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L72) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `email` - - `string` - - ‐ -
- ~~`emailMode?`~~ - - [`EmailType`](EmailType) - - **Deprecated** - - This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release. -
- `expirationSeconds?` - - `number` - - ‐ -
- `multiFactors?` - - [`VerifyMfaParams`](VerifyMfaParams)\[] - - ‐ -
- `redirectParams?` - - `URLSearchParams` - - ‐ -
- `targetPublicKey` - - `string` - - ‐ -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/EmailConfig.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/EmailConfig.mdx deleted file mode 100644 index 55eb2fc47d..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/EmailConfig.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: EmailConfig -description: Overview of EmailConfig -slug: wallets/reference/account-kit/signer/type-aliases/EmailConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EmailConfig = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:146](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L146) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `mode?` - - `"MAGIC_LINK"` | `"OTP"` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/EmailType.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/EmailType.mdx deleted file mode 100644 index 7b8a073e60..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/EmailType.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: EmailType -description: Overview of EmailType -slug: wallets/reference/account-kit/signer/type-aliases/EmailType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type EmailType = "magicLink" | "otp"; -``` - -Defined in: [account-kit/signer/src/client/types.ts:70](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L70) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/ExportWalletOutput.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/ExportWalletOutput.mdx deleted file mode 100644 index 67baeb19e0..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/ExportWalletOutput.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ExportWalletOutput -description: Overview of ExportWalletOutput -slug: wallets/reference/account-kit/signer/type-aliases/ExportWalletOutput -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExportWalletOutput = boolean; -``` - -Defined in: [account-kit/signer/src/client/types.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L39) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/ExportWalletParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/ExportWalletParams.mdx deleted file mode 100644 index ece4b048e5..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/ExportWalletParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: ExportWalletParams -description: Overview of ExportWalletParams -slug: wallets/reference/account-kit/signer/type-aliases/ExportWalletParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExportWalletParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L34) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `iframeContainerId` - - `string` -
- `iframeElementId?` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/GetOauthProviderUrlArgs.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/GetOauthProviderUrlArgs.mdx deleted file mode 100644 index a95775d47a..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/GetOauthProviderUrlArgs.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: GetOauthProviderUrlArgs -description: Overview of GetOauthProviderUrlArgs -slug: wallets/reference/account-kit/signer/type-aliases/GetOauthProviderUrlArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetOauthProviderUrlArgs = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:506](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L506) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `oauthCallbackUrl` - - `string` -
- `oauthConfig?` - - [`OauthConfig`](OauthConfig) -
- `oauthParams` - - [`OauthParams`](OauthParams) -
- `turnkeyPublicKey` - - `string` -
- `usesRelativeUrl?` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/GetWebAuthnAttestationResult.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/GetWebAuthnAttestationResult.mdx deleted file mode 100644 index b6c43f388e..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/GetWebAuthnAttestationResult.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: GetWebAuthnAttestationResult -description: Overview of GetWebAuthnAttestationResult -slug: wallets/reference/account-kit/signer/type-aliases/GetWebAuthnAttestationResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetWebAuthnAttestationResult = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:472](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L472) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `attestation` - - `Awaited`\<`ReturnType`\<*typeof* `getWebAuthnAttestation`>> -
- `authenticatorUserId` - - `BufferSource` -
- `challenge` - - `ArrayBuffer` | `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/IdTokenOnly.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/IdTokenOnly.mdx deleted file mode 100644 index 231b94ac9c..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/IdTokenOnly.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: IdTokenOnly -description: Overview of IdTokenOnly -slug: wallets/reference/account-kit/signer/type-aliases/IdTokenOnly -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type IdTokenOnly = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:488](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L488) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accessToken?` - - `string` -
- `idToken` - - `string` -
- `providerName` - - `string` -
- `status` - - `"FETCHED_ID_TOKEN_ONLY"` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/JwtParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/JwtParams.mdx deleted file mode 100644 index 0a5e184867..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/JwtParams.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: JwtParams -description: Overview of JwtParams -slug: wallets/reference/account-kit/signer/type-aliases/JwtParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type JwtParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:119](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L119) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `authProvider?` - - `string` -
- `expirationSeconds?` - - `number` -
- `jwt` - - `string` -
- `targetPublicKey` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/JwtResponse.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/JwtResponse.mdx deleted file mode 100644 index 1a94f25459..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/JwtResponse.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: JwtResponse -description: Overview of JwtResponse -slug: wallets/reference/account-kit/signer/type-aliases/JwtResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type JwtResponse = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:126](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L126) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `credentialBundle` - - `string` -
- `isSignUp` - - `boolean` -
- `orgId` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/KnownAuthProvider.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/KnownAuthProvider.mdx deleted file mode 100644 index 709412b950..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/KnownAuthProvider.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: KnownAuthProvider -description: Overview of KnownAuthProvider -slug: wallets/reference/account-kit/signer/type-aliases/KnownAuthProvider -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type KnownAuthProvider = "google" | "apple" | "facebook" | "twitch" | "auth0"; -``` - -Defined in: [account-kit/signer/src/signer.ts:96](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L96) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/MfaChallenge.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/MfaChallenge.mdx deleted file mode 100644 index f2376d0f08..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/MfaChallenge.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: MfaChallenge -description: Overview of MfaChallenge -slug: wallets/reference/account-kit/signer/type-aliases/MfaChallenge -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MfaChallenge = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:545](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L545) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `multiFactorChallenge` - - | \{ `code`: `string`; } | `Record`\<`string`, `any`> -
- `multiFactorId` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/MfaFactor.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/MfaFactor.mdx deleted file mode 100644 index 9e05f19bdc..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/MfaFactor.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: MfaFactor -description: Overview of MfaFactor -slug: wallets/reference/account-kit/signer/type-aliases/MfaFactor -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MfaFactor = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:514](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L514) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `multiFactorId` - - `string` -
- `multiFactorType` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthConfig.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OauthConfig.mdx deleted file mode 100644 index d6f33833fd..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthConfig.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: OauthConfig -description: Overview of OauthConfig -slug: wallets/reference/account-kit/signer/type-aliases/OauthConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OauthConfig = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:140](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L140) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `authProviders` - - [`AuthProviderConfig`](AuthProviderConfig)\[] -
- `codeChallenge` - - `string` -
- `requestKey` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthMode.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OauthMode.mdx deleted file mode 100644 index fbabd0eeb8..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthMode.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: OauthMode -description: Overview of OauthMode -slug: wallets/reference/account-kit/signer/type-aliases/OauthMode -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OauthMode = "redirect" | "popup"; -``` - -Defined in: [account-kit/signer/src/signer.ts:103](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L103) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OauthParams.mdx deleted file mode 100644 index 94c236413d..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthParams.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: OauthParams -description: Overview of OauthParams -slug: wallets/reference/account-kit/signer/type-aliases/OauthParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OauthParams = Extract< - AuthParams, - { - type: "oauth"; - } -> & - object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:94](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L94) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `expirationSeconds?` - - `number` -
- `fetchIdTokenOnly?` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthProviderConfig.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OauthProviderConfig.mdx deleted file mode 100644 index 9cfb83ebc5..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthProviderConfig.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: OauthProviderConfig -description: Overview of OauthProviderConfig -slug: wallets/reference/account-kit/signer/type-aliases/OauthProviderConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OauthProviderConfig = - | { - auth0Connection?: string; - authProviderId: "auth0"; - isCustomProvider?: false; - } - | { - auth0Connection?: never; - authProviderId: KnownAuthProvider; - isCustomProvider?: false; - } - | { - auth0Connection?: never; - authProviderId: string; - isCustomProvider: true; - }; -``` - -Defined in: [account-kit/signer/src/signer.ts:75](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L75) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthProviderInfo.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OauthProviderInfo.mdx deleted file mode 100644 index e62c7a097f..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthProviderInfo.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: OauthProviderInfo -description: Overview of OauthProviderInfo -slug: wallets/reference/account-kit/signer/type-aliases/OauthProviderInfo -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OauthProviderInfo = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:570](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L570) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `issuer` - - `string` -
- `providerId` - - `string` -
- `providerName?` - - `string` -
- `userDisplayName?` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthRedirectConfig.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OauthRedirectConfig.mdx deleted file mode 100644 index 625be96bb1..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthRedirectConfig.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: OauthRedirectConfig -description: Overview of OauthRedirectConfig -slug: wallets/reference/account-kit/signer/type-aliases/OauthRedirectConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OauthRedirectConfig = - | { - mode: "redirect"; - redirectUrl: string; - } - | { - mode: "popup"; - redirectUrl?: never; - }; -``` - -Defined in: [account-kit/signer/src/signer.ts:92](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L92) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthState.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OauthState.mdx deleted file mode 100644 index 0fe1408d51..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OauthState.mdx +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: OauthState -description: Overview of OauthState -slug: wallets/reference/account-kit/signer/type-aliases/OauthState -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OauthState = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:495](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L495) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `authProviderId` - - `string` -
- `expirationSeconds?` - - `number` -
- `fetchIdTokenOnly?` - - `boolean` -
- `isCustomProvider?` - - `boolean` -
- `openerOrigin?` - - `string` -
- `redirectUrl?` - - `string` -
- `requestKey` - - `string` -
- `turnkeyPublicKey` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OtpParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OtpParams.mdx deleted file mode 100644 index 5fc1d8e337..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OtpParams.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: OtpParams -description: Overview of OtpParams -slug: wallets/reference/account-kit/signer/type-aliases/OtpParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OtpParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:99](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L99) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `expirationSeconds?` - - `number` -
- `multiFactors?` - - [`VerifyMfaParams`](VerifyMfaParams)\[] -
- `orgId` - - `string` -
- `otpCode` - - `string` -
- `otpId` - - `string` -
- `targetPublicKey` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/OtpResponse.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/OtpResponse.mdx deleted file mode 100644 index 3171d84d1d..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/OtpResponse.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: OtpResponse -description: Overview of OtpResponse -slug: wallets/reference/account-kit/signer/type-aliases/OtpResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type OtpResponse = - | { - credentialBundle: string; - status: "SUCCESS"; - } - | { - encryptedPayload: string; - multiFactors: MfaFactor[]; - status: "MFA_REQUIRED"; - }; -``` - -Defined in: [account-kit/signer/src/client/types.ts:108](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L108) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/PasskeyInfo.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/PasskeyInfo.mdx deleted file mode 100644 index 7341321249..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/PasskeyInfo.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: PasskeyInfo -description: Overview of PasskeyInfo -slug: wallets/reference/account-kit/signer/type-aliases/PasskeyInfo -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PasskeyInfo = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:577](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L577) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `authenticatorId` - - `string` -
- `createdAt` - - `number` -
- `name` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/RemoveMfaParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/RemoveMfaParams.mdx deleted file mode 100644 index ff1a89a2e8..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/RemoveMfaParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: RemoveMfaParams -description: Overview of RemoveMfaParams -slug: wallets/reference/account-kit/signer/type-aliases/RemoveMfaParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RemoveMfaParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:536](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L536) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `multiFactorIds` - - `string`\[] -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerBody.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SignerBody.mdx deleted file mode 100644 index f686663031..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerBody.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: SignerBody -description: Overview of SignerBody -slug: wallets/reference/account-kit/signer/type-aliases/SignerBody -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerBody = Extract< - SignerEndpoints[number], - { - Route: T; - } ->["Body"]; -``` - -Defined in: [account-kit/signer/src/client/types.ts:162](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L162) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* [`SignerRoutes`](SignerRoutes) -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerConfig.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SignerConfig.mdx deleted file mode 100644 index f27f24fb27..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerConfig.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: SignerConfig -description: Overview of SignerConfig -slug: wallets/reference/account-kit/signer/type-aliases/SignerConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerConfig = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:150](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L150) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `email` - - [`EmailConfig`](EmailConfig) -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerEndpoints.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SignerEndpoints.mdx deleted file mode 100644 index aee0bc0a7f..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerEndpoints.mdx +++ /dev/null @@ -1,271 +0,0 @@ ---- -title: SignerEndpoints -description: Overview of SignerEndpoints -slug: wallets/reference/account-kit/signer/type-aliases/SignerEndpoints -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerEndpoints = [ - { - Body: - | (Omit & object) - | SmsAuthParams - | { - passkey: { - attestation: Awaited>; - challenge: string; - }; - } - | AccessKeyAuthParamsPublicKeyOnly; - Response: SignupResponse; - Route: "/v1/signup"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: User; - Route: "/v1/whoami"; - }, - { - Body: (Omit & object) | SmsAuthParams; - Response: { - multiFactors?: MfaFactor[]; - orgId: string; - otpId?: string; - }; - Route: "/v1/auth"; - }, - { - Body: { - accessKey?: { - accountId?: string; - publicKey: string; - }; - email?: string; - phone?: string; - }; - Response: { - orgId: string | null; - }; - Route: "/v1/lookup"; - }, - { - Body: { - contact: string; - otpType: "OTP_TYPE_SMS" | "OTP_TYPE_EMAIL"; - }; - Response: { - otpId: string; - }; - Route: "/v1/init-otp"; - }, - { - Body: { - otpCode: string; - otpId: string; - }; - Response: { - verificationToken: string; - }; - Route: "/v1/verify-otp"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - signature: Hex; - }; - Route: "/v1/sign-payload"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: void; - Route: "/v1/update-email-auth"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: void; - Route: "/v1/update-phone-auth"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - oauthProviders: OauthProviderInfo[]; - }; - Route: "/v1/add-oauth-provider"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: void; - Route: "/v1/remove-oauth-provider"; - }, - { - Body: {}; - Response: AuthMethods; - Route: "/v1/list-auth-methods"; - }, - { - Body: { - nonce: string; - }; - Response: OauthConfig; - Route: "/v1/prepare-oauth"; - }, - { - Body: OtpParams; - Response: OtpResponse; - Route: "/v1/otp"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - multiFactors: MfaFactor[]; - }; - Route: "/v1/auth-list-multi-factors"; - }, - { - Body: { - multiFactorIds: string[]; - stampedRequest: TSignedRequest; - }; - Response: { - multiFactors: MfaFactor[]; - }; - Route: "/v1/auth-delete-multi-factors"; - }, - { - Body: { - multiFactorType: MultiFactorType; - stampedRequest: TSignedRequest; - }; - Response: AddMfaResult; - Route: "/v1/auth-request-multi-factor"; - }, - { - Body: VerifyMfaParams & object; - Response: { - multiFactors: MfaFactor[]; - }; - Route: "/v1/auth-verify-multi-factor"; - }, - { - Body: JwtParams; - Response: JwtResponse; - Route: "/v1/auth-jwt"; - }, - { - Body: {}; - Response: SignerConfig; - Route: "/v1/signer-config"; - }, - { - Body: { - encryptedPayload: string; - multiFactors: VerifyMfaParams[]; - }; - Response: { - multiFactors: MfaFactor[]; - payload: { - credentialBundle?: string; - }; - }; - Route: "/v1/auth-validate-multi-factors"; - }, - { - Body: { - members: object[]; - }; - Response: { - result: { - evmSignerAddress: Address; - members: object[]; - orgId: string; - }; - }; - Route: "/v1/multi-owner-create"; - }, - { - Body: { - members: object[]; - organizationId: string; - }; - Response: { - result: TurnkeyApiTypes["v1CreateUsersRequest"]; - }; - Route: "/v1/multi-owner-prepare-add"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: { - members: object[]; - updateRootQuorumRequest: TurnkeyApiTypes["v1UpdateRootQuorumRequest"]; - }; - }; - Route: "/v1/multi-owner-add"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: TurnkeyApiTypes["v1UpdateRootQuorumResult"]; - }; - Route: "/v1/multi-owner-update-root-quorum"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: { - signRawPayloadResult: TurnkeyApiTypes["v1SignRawPayloadResult"]; - }; - }; - Route: "/v1/multi-owner-sign-raw-payload"; - }, - { - Body: { - members: object[]; - organizationId: string; - }; - Response: { - result: { - deleteMembersRequest: TurnkeyApiTypes["v1DeleteUsersRequest"]; - updateRootQuorumRequest: TurnkeyApiTypes["v1UpdateRootQuorumRequest"]; - }; - }; - Route: "/v1/multi-owner-prepare-delete"; - }, - { - Body: { - stampedRequest: TSignedRequest; - }; - Response: { - result: { - deletedUserIds: string[]; - }; - }; - Route: "/v1/multi-owner-delete"; - }, -]; -``` - -Defined in: [account-kit/signer/src/client/types.ts:171](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L171) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerResponse.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SignerResponse.mdx deleted file mode 100644 index 06fe9d67b2..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerResponse.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: SignerResponse -description: Overview of SignerResponse -slug: wallets/reference/account-kit/signer/type-aliases/SignerResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerResponse = Extract< - SignerEndpoints[number], - { - Route: T; - } ->["Response"]; -``` - -Defined in: [account-kit/signer/src/client/types.ts:166](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L166) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `T` *extends* [`SignerRoutes`](SignerRoutes) -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerRoutes.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SignerRoutes.mdx deleted file mode 100644 index 77a19638d6..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SignerRoutes.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignerRoutes -description: Overview of SignerRoutes -slug: wallets/reference/account-kit/signer/type-aliases/SignerRoutes -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerRoutes = SignerEndpoints[number]["Route"]; -``` - -Defined in: [account-kit/signer/src/client/types.ts:161](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L161) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SignupResponse.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SignupResponse.mdx deleted file mode 100644 index dada333a98..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SignupResponse.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: SignupResponse -description: Overview of SignupResponse -slug: wallets/reference/account-kit/signer/type-aliases/SignupResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignupResponse = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:132](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L132) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `address?` - - [`Address`](https://abitype.dev) -
- `orgId` - - `string` -
- `otpId?` - - `string` -
- `solanaAddress?` - - `string` -
- `userId?` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SmsAuthParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SmsAuthParams.mdx deleted file mode 100644 index e4096fe037..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SmsAuthParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: SmsAuthParams -description: Overview of SmsAuthParams -slug: wallets/reference/account-kit/signer/type-aliases/SmsAuthParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmsAuthParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:82](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L82) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `phone` - - `string` -
- `targetPublicKey` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/SubmitOtpCodeResponse.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/SubmitOtpCodeResponse.mdx deleted file mode 100644 index 8d6258c020..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/SubmitOtpCodeResponse.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: SubmitOtpCodeResponse -description: Overview of SubmitOtpCodeResponse -slug: wallets/reference/account-kit/signer/type-aliases/SubmitOtpCodeResponse -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SubmitOtpCodeResponse = - | { - bundle: string; - mfaRequired: false; - } - | { - encryptedPayload: string; - mfaRequired: true; - multiFactors: MfaFactor[]; - }; -``` - -Defined in: [account-kit/signer/src/client/types.ts:554](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L554) diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/User.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/User.mdx deleted file mode 100644 index 8e88bd7493..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/User.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: User -description: Overview of User -slug: wallets/reference/account-kit/signer/type-aliases/User -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type User = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `accessToken?` - - `string` -
- `address` - - [`Address`](https://abitype.dev) -
- `claims?` - - `Record`\<`string`, `unknown`> -
- `credentialId?` - - `string` -
- `email?` - - `string` -
- `idToken?` - - `string` -
- `orgId` - - `string` -
- `phone?` - - `string` -
- `solanaAddress?` - - `string` -
- `userId` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsArgs.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsArgs.mdx deleted file mode 100644 index ec5723e322..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsArgs.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: ValidateMultiFactorsArgs -description: Overview of ValidateMultiFactorsArgs -slug: wallets/reference/account-kit/signer/type-aliases/ValidateMultiFactorsArgs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ValidateMultiFactorsArgs = object; -``` - -Defined in: [account-kit/signer/src/types.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/types.ts#L43) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `multiFactorCode` - - `string` -
- `multiFactorId?` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsParams.mdx deleted file mode 100644 index fa5d8e2070..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/ValidateMultiFactorsParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: ValidateMultiFactorsParams -description: Overview of ValidateMultiFactorsParams -slug: wallets/reference/account-kit/signer/type-aliases/ValidateMultiFactorsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ValidateMultiFactorsParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:540](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L540) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `encryptedPayload` - - `string` -
- `multiFactors` - - [`VerifyMfaParams`](VerifyMfaParams)\[] -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/VerificationOtp.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/VerificationOtp.mdx deleted file mode 100644 index e83711cce8..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/VerificationOtp.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: VerificationOtp -description: Overview of VerificationOtp -slug: wallets/reference/account-kit/signer/type-aliases/VerificationOtp -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type VerificationOtp = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L10) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `code` - - `string` - - The OTP code received by the user -
- `id` - - `string` - - The OTP ID returned from initOtp -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/VerifyMfaParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/VerifyMfaParams.mdx deleted file mode 100644 index 9b7e85e7be..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/VerifyMfaParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: VerifyMfaParams -description: Overview of VerifyMfaParams -slug: wallets/reference/account-kit/signer/type-aliases/VerifyMfaParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type VerifyMfaParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:531](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L531) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `multiFactorCode` - - `string` -
- `multiFactorId` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/type-aliases/experimental_CreateApiKeyParams.mdx b/docs/pages/reference/account-kit/signer/src/type-aliases/experimental_CreateApiKeyParams.mdx deleted file mode 100644 index 904287b713..0000000000 --- a/docs/pages/reference/account-kit/signer/src/type-aliases/experimental_CreateApiKeyParams.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: experimental_CreateApiKeyParams -description: Overview of experimental_CreateApiKeyParams -slug: wallets/reference/account-kit/signer/type-aliases/experimental_CreateApiKeyParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type experimental_CreateApiKeyParams = object; -``` - -Defined in: [account-kit/signer/src/client/types.ts:583](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/client/types.ts#L583) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `expirationSec` - - `number` -
- `name` - - `string` -
- `publicKey` - - `string` -
diff --git a/docs/pages/reference/account-kit/signer/src/variables/AlchemySignerParamsSchema.mdx b/docs/pages/reference/account-kit/signer/src/variables/AlchemySignerParamsSchema.mdx deleted file mode 100644 index 35766afc3b..0000000000 --- a/docs/pages/reference/account-kit/signer/src/variables/AlchemySignerParamsSchema.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: AlchemySignerParamsSchema -description: Overview of AlchemySignerParamsSchema -slug: wallets/reference/account-kit/signer/variables/AlchemySignerParamsSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const AlchemySignerParamsSchema: ZodObject< - object & object, - "strip", - ZodTypeAny, - { - client: - | AlchemySignerWebClient - | { - connection: {} | {} | {} | ({} & object); - iframeConfig: Object; - rootOrgId: string; - oauthCallbackUrl: string; - enablePopupOauth: boolean; - rpId?: string; - }; - sessionConfig?: Object; - }, - { - client: - | AlchemySignerWebClient - | { - connection: {} | {} | {} | ({} & object); - iframeConfig: Object; - rpId?: string; - rootOrgId?: string; - oauthCallbackUrl?: string; - enablePopupOauth?: boolean; - }; - sessionConfig?: Object; - } ->; -``` - -Defined in: [account-kit/signer/src/signer.ts:105](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/signer.ts#L105) diff --git a/docs/pages/reference/account-kit/signer/src/variables/DEFAULT_SESSION_MS.mdx b/docs/pages/reference/account-kit/signer/src/variables/DEFAULT_SESSION_MS.mdx deleted file mode 100644 index 14bafb4d25..0000000000 --- a/docs/pages/reference/account-kit/signer/src/variables/DEFAULT_SESSION_MS.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: DEFAULT_SESSION_MS -description: Overview of DEFAULT_SESSION_MS -slug: wallets/reference/account-kit/signer/variables/DEFAULT_SESSION_MS -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const DEFAULT_SESSION_MS: number; -``` - -Defined in: [account-kit/signer/src/session/manager.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/session/manager.ts#L18) diff --git a/docs/pages/reference/account-kit/signer/src/variables/SessionManagerParamsSchema.mdx b/docs/pages/reference/account-kit/signer/src/variables/SessionManagerParamsSchema.mdx deleted file mode 100644 index d616ec4f38..0000000000 --- a/docs/pages/reference/account-kit/signer/src/variables/SessionManagerParamsSchema.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: SessionManagerParamsSchema -description: Overview of SessionManagerParamsSchema -slug: wallets/reference/account-kit/signer/variables/SessionManagerParamsSchema -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SessionManagerParamsSchema: ZodObject< - { - client: ZodType; - expirationTimeMs: ZodDefault; - sessionKey: ZodDefault; - storage: ZodUnion< - [ - ZodDefault>, - ZodType, - ] - >; - }, - "strip", - ZodTypeAny, - { - sessionKey: string; - storage: "localStorage" | "sessionStorage" | Storage; - expirationTimeMs: number; - client?: any; - }, - { - client?: any; - sessionKey?: string; - storage?: "localStorage" | "sessionStorage" | Storage; - expirationTimeMs?: number; - } ->; -``` - -Defined in: [account-kit/signer/src/session/manager.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/signer/src/session/manager.ts#L20) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/README.mdx b/docs/pages/reference/account-kit/smart-contracts/src/README.mdx deleted file mode 100644 index 706325d0a8..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/README.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -title: account-kit/smart-contracts -description: Overview of account-kit/smart-contracts -slug: wallets/reference/account-kit/smart-contracts -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Enumerations - -| Enumeration | Description | -| :--------------------------------------------------------------------------------------------------------------- | :---------- | -| [SessionKeyAccessListType](/wallets/reference/account-kit/smart-contracts/enumerations/SessionKeyAccessListType) | - | - -## Classes - -| Class | Description | -| :------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [InvalidAggregatedSignatureError](/wallets/reference/account-kit/smart-contracts/classes/InvalidAggregatedSignatureError) | Error thrown when the aggregated signature is invalid | -| [InvalidContextSignatureError](/wallets/reference/account-kit/smart-contracts/classes/InvalidContextSignatureError) | Error thrown when the context signature is invalid | -| [MultisigAccountExpectedError](/wallets/reference/account-kit/smart-contracts/classes/MultisigAccountExpectedError) | Error thrown when the expected account is not a multisig modular account | -| [MultisigMissingSignatureError](/wallets/reference/account-kit/smart-contracts/classes/MultisigMissingSignatureError) | Error thrown when a multisig user op is missing a signature | -| [SessionKeyPermissionsBuilder](/wallets/reference/account-kit/smart-contracts/classes/SessionKeyPermissionsBuilder) | A builder for creating the hex-encoded data for updating session key permissions. | -| [SessionKeySigner](/wallets/reference/account-kit/smart-contracts/classes/SessionKeySigner) | A simple session key signer that uses localStorage or sessionStorage to store a private key. If the key is not found, it will generate a new one and store it in the storage. | - -## Type Aliases - -| Type Alias | Description | -| :--------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------ | -| [AccountLoupeActions](/wallets/reference/account-kit/smart-contracts/type-aliases/AccountLoupeActions) | - | -| [AlchemyLightAccountClientConfig](/wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyLightAccountClientConfig) | - | -| [AlchemyModularAccountClientConfig](/wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyModularAccountClientConfig) | - | -| [AlchemyMultiOwnerLightAccountClientConfig](/wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyMultiOwnerLightAccountClientConfig) | - | -| [AlchemyMultisigAccountClientConfig](/wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyMultisigAccountClientConfig) | - | -| [BuildDeferredActionDigestParams](/wallets/reference/account-kit/smart-contracts/type-aliases/BuildDeferredActionDigestParams) | - | -| [BuildNonceParams](/wallets/reference/account-kit/smart-contracts/type-aliases/BuildNonceParams) | - | -| [ContractAccessEntry](/wallets/reference/account-kit/smart-contracts/type-aliases/ContractAccessEntry) | - | -| [ContractMethodEntry](/wallets/reference/account-kit/smart-contracts/type-aliases/ContractMethodEntry) | - | -| [CreateLightAccountParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateLightAccountParams) | - | -| [CreateMAV2BaseParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateMAV2BaseParams) | - | -| [CreateMAV2BaseReturnType](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateMAV2BaseReturnType) | - | -| [CreateModularAccountV2AlchemyClientParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateModularAccountV2AlchemyClientParams) | - | -| [CreateModularAccountV2ClientParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateModularAccountV2ClientParams) | - | -| [CreateModularAccountV2Params](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateModularAccountV2Params) | - | -| [CreateMultiOwnerLightAccountParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateMultiOwnerLightAccountParams) | - | -| [CreateMultiOwnerModularAccountParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateMultiOwnerModularAccountParams) | - | -| [CreateMultisigModularAccountParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateMultisigModularAccountParams) | - | -| [CreateWebauthnMAV2BaseParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateWebauthnMAV2BaseParams) | - | -| [CreateWebauthnModularAccountV2ClientParams](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateWebauthnModularAccountV2ClientParams) | - | -| [CreateWebauthnModularAccountV2Params](/wallets/reference/account-kit/smart-contracts/type-aliases/CreateWebauthnModularAccountV2Params) | - | -| [Erc20TokenLimit](/wallets/reference/account-kit/smart-contracts/type-aliases/Erc20TokenLimit) | - | -| [ExecutionDataView](/wallets/reference/account-kit/smart-contracts/type-aliases/ExecutionDataView) | - | -| [ExecutionFunctionConfig](/wallets/reference/account-kit/smart-contracts/type-aliases/ExecutionFunctionConfig) | - | -| [ExecutionHooks](/wallets/reference/account-kit/smart-contracts/type-aliases/ExecutionHooks) | - | -| [FunctionId](/wallets/reference/account-kit/smart-contracts/type-aliases/FunctionId) | - | -| [FunctionReference](/wallets/reference/account-kit/smart-contracts/type-aliases/FunctionReference) | - | -| [GasSpendLimit](/wallets/reference/account-kit/smart-contracts/type-aliases/GasSpendLimit) | - | -| [GetLightAccountType](/wallets/reference/account-kit/smart-contracts/type-aliases/GetLightAccountType) | - | -| [GetMAV2UpgradeToData](/wallets/reference/account-kit/smart-contracts/type-aliases/GetMAV2UpgradeToData) | - | -| [GetPluginAddressParameter](/wallets/reference/account-kit/smart-contracts/type-aliases/GetPluginAddressParameter) | - | -| [InstallMultiOwnerPluginParams](/wallets/reference/account-kit/smart-contracts/type-aliases/InstallMultiOwnerPluginParams) | - | -| [InstallMultisigPluginParams](/wallets/reference/account-kit/smart-contracts/type-aliases/InstallMultisigPluginParams) | - | -| [InstallPluginParams](/wallets/reference/account-kit/smart-contracts/type-aliases/InstallPluginParams) | - | -| [InstallSessionKeyPluginParams](/wallets/reference/account-kit/smart-contracts/type-aliases/InstallSessionKeyPluginParams) | - | -| [LightAccount](/wallets/reference/account-kit/smart-contracts/type-aliases/LightAccount) | - | -| [LightAccountClientActions](/wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountClientActions) | - | -| [LightAccountEntryPointVersion](/wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountEntryPointVersion) | - | -| [LightAccountType](/wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountType) | Light account types supported: LightAccount, MultiOwnerLightAccount | -| [LightAccountVersion](/wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountVersion) | - | -| [LightAccountVersionConfig](/wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountVersionConfig) | - | -| [LightAccountVersionConfigs](/wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountVersionConfigs) | - | -| [ModularAccountsV2](/wallets/reference/account-kit/smart-contracts/type-aliases/ModularAccountsV2) | - | -| [ModularAccountV2](/wallets/reference/account-kit/smart-contracts/type-aliases/ModularAccountV2) | - | -| [ModularAccountV2Client](/wallets/reference/account-kit/smart-contracts/type-aliases/ModularAccountV2Client) | - | -| [MultiOwnerLightAccount](/wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerLightAccount) | - | -| [MultiOwnerLightAccountClientActions](/wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerLightAccountClientActions) | - | -| [MultiOwnerModularAccount](/wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerModularAccount) | - | -| [MultiOwnerPluginActions](/wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerPluginActions) | - | -| [MultisigModularAccount](/wallets/reference/account-kit/smart-contracts/type-aliases/MultisigModularAccount) | - | -| [MultisigPluginActions](/wallets/reference/account-kit/smart-contracts/type-aliases/MultisigPluginActions) | - | -| [MultisigUserOperationContext](/wallets/reference/account-kit/smart-contracts/type-aliases/MultisigUserOperationContext) | - | -| [NativeTokenLimit](/wallets/reference/account-kit/smart-contracts/type-aliases/NativeTokenLimit) | - | -| [Pack1271SignatureParams](/wallets/reference/account-kit/smart-contracts/type-aliases/Pack1271SignatureParams) | - | -| [PackUOSignatureParams](/wallets/reference/account-kit/smart-contracts/type-aliases/PackUOSignatureParams) | - | -| [Plugin](/wallets/reference/account-kit/smart-contracts/type-aliases/Plugin) | - | -| [PluginManagerActions](/wallets/reference/account-kit/smart-contracts/type-aliases/PluginManagerActions) | - | -| [PreValidationHooks](/wallets/reference/account-kit/smart-contracts/type-aliases/PreValidationHooks) | - | -| [ProposeUserOperationResult](/wallets/reference/account-kit/smart-contracts/type-aliases/ProposeUserOperationResult) | - | -| [SessionKeyPluginActions](/wallets/reference/account-kit/smart-contracts/type-aliases/SessionKeyPluginActions) | - | -| [Signature](/wallets/reference/account-kit/smart-contracts/type-aliases/Signature) | - | -| [SignerEntity](/wallets/reference/account-kit/smart-contracts/type-aliases/SignerEntity) | - | -| [SignerType](/wallets/reference/account-kit/smart-contracts/type-aliases/SignerType) | - | -| [SignMultisigUserOperationResult](/wallets/reference/account-kit/smart-contracts/type-aliases/SignMultisigUserOperationResult) | - | -| [TimeRange](/wallets/reference/account-kit/smart-contracts/type-aliases/TimeRange) | - | -| [UninstallPluginParams](/wallets/reference/account-kit/smart-contracts/type-aliases/UninstallPluginParams) | - | -| [UserOpSignatureType](/wallets/reference/account-kit/smart-contracts/type-aliases/UserOpSignatureType) | - | -| [ValidationDataParams](/wallets/reference/account-kit/smart-contracts/type-aliases/ValidationDataParams) | - | -| [ValidationDataView](/wallets/reference/account-kit/smart-contracts/type-aliases/ValidationDataView) | - | -| [WebauthnModularAccountV2](/wallets/reference/account-kit/smart-contracts/type-aliases/WebauthnModularAccountV2) | - | -| [WebauthnModularAccountV2Client](/wallets/reference/account-kit/smart-contracts/type-aliases/WebauthnModularAccountV2Client) | - | - -## Variables - -| Variable | Description | -| :------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [accountLoupeActions](/wallets/reference/account-kit/smart-contracts/variables/accountLoupeActions) | Provides a set of actions for account loupe operations using the specified client. NOTE: this is already added to the client when using any of the Modular Account Clients. | -| [AccountVersionRegistry](/wallets/reference/account-kit/smart-contracts/variables/AccountVersionRegistry) | Account version registry interface that defines the light account versions and the version definition for each light account type | -| [DEFAULT_OWNER_ENTITY_ID](/wallets/reference/account-kit/smart-contracts/variables/DEFAULT_OWNER_ENTITY_ID) | - | -| [entityIdAndNonceReaderBytecode](/wallets/reference/account-kit/smart-contracts/variables/entityIdAndNonceReaderBytecode) | - | -| [executeUserOpSelector](/wallets/reference/account-kit/smart-contracts/variables/executeUserOpSelector) | - | -| [IAccountLoupeAbi](/wallets/reference/account-kit/smart-contracts/variables/IAccountLoupeAbi) | - | -| [IPluginAbi](/wallets/reference/account-kit/smart-contracts/variables/IPluginAbi) | - | -| [IPluginManagerAbi](/wallets/reference/account-kit/smart-contracts/variables/IPluginManagerAbi) | - | -| [IStandardExecutorAbi](/wallets/reference/account-kit/smart-contracts/variables/IStandardExecutorAbi) | - | -| [lightAccountClientActions](/wallets/reference/account-kit/smart-contracts/variables/lightAccountClientActions) | Provides a set of actions for managing a light account client, including transferring ownership. | -| [LightAccountUnsupported1271Factories](/wallets/reference/account-kit/smart-contracts/variables/LightAccountUnsupported1271Factories) | Can be used to check if the account with one of the following factory addresses to not support 1271 signing. | -| [LightAccountUnsupported1271Impls](/wallets/reference/account-kit/smart-contracts/variables/LightAccountUnsupported1271Impls) | Can be used to check if the account with one of the following implementation addresses to not support 1271 signing. | -| [mintableERC20Abi](/wallets/reference/account-kit/smart-contracts/variables/mintableERC20Abi) | - | -| [mintableERC20Bytecode](/wallets/reference/account-kit/smart-contracts/variables/mintableERC20Bytecode) | - | -| [multiOwnerLightAccountClientActions](/wallets/reference/account-kit/smart-contracts/variables/multiOwnerLightAccountClientActions) | Generates client actions for a multi-owner light account, including the ability to update owners. | -| [MultiOwnerModularAccountFactoryAbi](/wallets/reference/account-kit/smart-contracts/variables/MultiOwnerModularAccountFactoryAbi) | - | -| [MultiOwnerPlugin](/wallets/reference/account-kit/smart-contracts/variables/MultiOwnerPlugin) | - | -| [MultiOwnerPluginAbi](/wallets/reference/account-kit/smart-contracts/variables/MultiOwnerPluginAbi) | - | -| [multiOwnerPluginActions](/wallets/reference/account-kit/smart-contracts/variables/multiOwnerPluginActions) | Creates actions for the MultiOwner plugin, including reading owners and checking ownership. NOTE: this is already added to the client returned from createMultiOwnerModularAccountClient | -| [MultiOwnerPluginExecutionFunctionAbi](/wallets/reference/account-kit/smart-contracts/variables/MultiOwnerPluginExecutionFunctionAbi) | - | -| [MULTISIG_ACCOUNT_SOURCE](/wallets/reference/account-kit/smart-contracts/variables/MULTISIG_ACCOUNT_SOURCE) | - | -| [MultisigModularAccountFactoryAbi](/wallets/reference/account-kit/smart-contracts/variables/MultisigModularAccountFactoryAbi) | - | -| [MultisigPlugin](/wallets/reference/account-kit/smart-contracts/variables/MultisigPlugin) | - | -| [MultisigPluginAbi](/wallets/reference/account-kit/smart-contracts/variables/MultisigPluginAbi) | - | -| [multisigPluginActions](/wallets/reference/account-kit/smart-contracts/variables/multisigPluginActions) | Provides actions for managing a multisig plugin within the specified client, including reading owners, checking ownership, getting the threshold, proposing user operations, and signing multisig user operations. | -| [MultisigPluginExecutionFunctionAbi](/wallets/reference/account-kit/smart-contracts/variables/MultisigPluginExecutionFunctionAbi) | - | -| [multisigSignatureMiddleware](/wallets/reference/account-kit/smart-contracts/variables/multisigSignatureMiddleware) | A signer middleware to be used with Multisig Account Clients. This middleware handles correctly aggregating signatures passed through as context when sending UserOperations, proposing UserOperations, or adding signatures to a UserOperation. | -| [semiModularAccountBytecodeAbi](/wallets/reference/account-kit/smart-contracts/variables/semiModularAccountBytecodeAbi) | - | -| [SessionKeyPlugin](/wallets/reference/account-kit/smart-contracts/variables/SessionKeyPlugin) | - | -| [SessionKeyPluginAbi](/wallets/reference/account-kit/smart-contracts/variables/SessionKeyPluginAbi) | - | -| [sessionKeyPluginActions](/wallets/reference/account-kit/smart-contracts/variables/sessionKeyPluginActions) | Creates actions for managing session keys in a smart contract associated with a client, including adding, removing, rotating, and updating session key permissions. | -| [SessionKeyPluginExecutionFunctionAbi](/wallets/reference/account-kit/smart-contracts/variables/SessionKeyPluginExecutionFunctionAbi) | - | -| [standardExecutor](/wallets/reference/account-kit/smart-contracts/variables/standardExecutor) | - | -| [updateMultiOwnerLightAccountOwners](/wallets/reference/account-kit/smart-contracts/variables/updateMultiOwnerLightAccountOwners) | Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones. | -| [UpgradeableModularAccountAbi](/wallets/reference/account-kit/smart-contracts/variables/UpgradeableModularAccountAbi) | - | - -## Functions - -| Function | Description | -| :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------- | -| [assertNever](/wallets/reference/account-kit/smart-contracts/functions/assertNever) | - | -| [buildDeferredActionDigest](/wallets/reference/account-kit/smart-contracts/functions/buildDeferredActionDigest) | Creates the digest which must be prepended to the userOp signature. | -| [buildFullNonceKey](/wallets/reference/account-kit/smart-contracts/functions/buildFullNonceKey) | - | -| [buildSessionKeysToRemoveStruct](/wallets/reference/account-kit/smart-contracts/functions/buildSessionKeysToRemoveStruct) | Finds predecessors for each provided key and returns them in the struct `ISessionKeyPlugin.SessionKeyToRemove[]`. | -| [combineSignatures](/wallets/reference/account-kit/smart-contracts/functions/combineSignatures) | Combines multiple signatures with provided upper limit values for gas fees and returns the concatenated result. | -| [createLightAccount](/wallets/reference/account-kit/smart-contracts/functions/createLightAccount) | Creates a light account based on the provided parameters such as transport, chain, signer, init code, and more. Ensures that an account is configured and returned with various capabilities, such as transferring ownership and retrieving the owner's address. | -| [~~createLightAccountAlchemyClient~~](/wallets/reference/account-kit/smart-contracts/functions/createLightAccountAlchemyClient) | Creates an Alchemy smart account client connected to a Light Account instance. | -| [createLightAccountClient](/wallets/reference/account-kit/smart-contracts/functions/createLightAccountClient) | Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions. | -| [createMAv2Base](/wallets/reference/account-kit/smart-contracts/functions/createMAv2Base) | - | -| [~~createModularAccountAlchemyClient~~](/wallets/reference/account-kit/smart-contracts/functions/createModularAccountAlchemyClient) | Creates a modular account Alchemy client with the provided configuration. | -| [createModularAccountV2](/wallets/reference/account-kit/smart-contracts/functions/createModularAccountV2) | Creates a ModularAccount V2 account, with the mode depending on the provided "mode" field. Possible modes include: "default", which is SMA Bytecode, and "7702", which is SMA 7702. Handles nonce generation, transaction encoding, and mode variant-specific behavior like initcode construction. | -| [createModularAccountV2Client](/wallets/reference/account-kit/smart-contracts/functions/createModularAccountV2Client) | Creates a Modular Account V2 client using the provided configuration parameters. | -| [createMultiOwnerLightAccount](/wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerLightAccount) | Creates a multi-owner light account using the provided parameters, including transport, chain, signer, initialization code, version, account address, factory address, salt, and owners. Ensures the owners list is deduplicated, ordered, and valid. | -| [~~createMultiOwnerLightAccountAlchemyClient~~](/wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerLightAccountAlchemyClient) | Creates a multi-owner light account Alchemy client using the provided configuration. | -| [createMultiOwnerLightAccountClient](/wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerLightAccountClient) | Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations. | -| [createMultiOwnerModularAccount](/wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerModularAccount) | Creates a multi-owner modular account with the given parameters, including transport, chain, signer, account address, initialization code, entry point, factory address, owners, and salt. Ensures that the owners are unique, ordered, and non-zero. | -| [createMultiOwnerModularAccountClient](/wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerModularAccountClient) | Creates a multi-owner modular account client with the provided parameters including account, transport, chain, and additional client configuration. This function uses a modular account and extends it with various plugin actions. | -| [~~createMultisigAccountAlchemyClient~~](/wallets/reference/account-kit/smart-contracts/functions/createMultisigAccountAlchemyClient) | Creates an Alchemy client for a multisig account using the provided configuration. | -| [createMultisigModularAccount](/wallets/reference/account-kit/smart-contracts/functions/createMultisigModularAccount) | Creates a multisig modular account using the provided parameters, including transport, chain, signer, account address, and other account settings. It configures the account with multiple owners and the specified threshold. | -| [createMultisigModularAccountClient](/wallets/reference/account-kit/smart-contracts/functions/createMultisigModularAccountClient) | Creates a multisig modular account client using the provided parameters including account details, transport, chain, and additional client configuration. This function constructs the multisig modular account and extends it with various actions to create a comprehensive client. | -| [defaultLightAccountVersion](/wallets/reference/account-kit/smart-contracts/functions/defaultLightAccountVersion) | Get the default light account version for the given light account type | -| [formatSignatures](/wallets/reference/account-kit/smart-contracts/functions/formatSignatures) | Formats a collection of Signature objects into a single aggregated signature. The format is in the form of EOA_SIGS | CONTRACT_SIG_DATAS. The signatures are ordered by signer address. The EOA SIGS contain the 65 signautre data for EOA signers and 65 bytes containing SIGNER | OFFSET | V for contract signers. The OFFSET is used to fetch the signature data from the CONTRACT_SIG_DATAS. | -| [getDefaultLightAccountFactoryAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultLightAccountFactoryAddress) | Utility method returning the default light account factory address given a Chain object | -| [getDefaultMAV2Address](/wallets/reference/account-kit/smart-contracts/functions/getDefaultMAV2Address) | - | -| [getDefaultMAV2FactoryAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultMAV2FactoryAddress) | - | -| [getDefaultMultiOwnerLightAccountFactoryAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultMultiOwnerLightAccountFactoryAddress) | Utility method returning the default multi owner light account factory address given a Chain object | -| [getDefaultMultiOwnerModularAccountFactoryAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultMultiOwnerModularAccountFactoryAddress) | Utility method returning the default multi owner msca factory address given a chain | -| [getDefaultMultisigModularAccountFactoryAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultMultisigModularAccountFactoryAddress) | Utility method returning the default multi sig msca factory address given a chain | -| [getDefaultSMAV27702Address](/wallets/reference/account-kit/smart-contracts/functions/getDefaultSMAV27702Address) | - | -| [getDefaultSMAV2BytecodeAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultSMAV2BytecodeAddress) | - | -| [getDefaultSMAV2StorageAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultSMAV2StorageAddress) | - | -| [getDefaultWebAuthnMAV2FactoryAddress](/wallets/reference/account-kit/smart-contracts/functions/getDefaultWebAuthnMAV2FactoryAddress) | - | -| [getLightAccountVersionForAccount](/wallets/reference/account-kit/smart-contracts/functions/getLightAccountVersionForAccount) | Get the light account version definition for the given light account and chain | -| [getMAInitializationData](/wallets/reference/account-kit/smart-contracts/functions/getMAInitializationData) | Retrieves the initialization data for a multi-owner modular account. Throws an error if the client's chain is not found or if the multi-owner plugin address is not retrievable. | -| [getMAV2UpgradeToData](/wallets/reference/account-kit/smart-contracts/functions/getMAV2UpgradeToData) | Retrieves the data necessary to upgrade to a Modular Account V2 (MA v2). Note that the upgrade will be to the Semi Modular Account Storage variant | -| [getMSCAUpgradeToData](/wallets/reference/account-kit/smart-contracts/functions/getMSCAUpgradeToData) | Retrieves the data necessary to upgrade to a Multi-Signature Contract Account (MSCA) and provides a method to create a Multi-Owner Modular Account. | -| [getSignerType](/wallets/reference/account-kit/smart-contracts/functions/getSignerType) | Determines the type of signer (Externally Owned Account (EOA) or CONTRACT) based on the provided client, signature, and signer. | -| [installPlugin](/wallets/reference/account-kit/smart-contracts/functions/installPlugin) | Installs a plugin on a smart account via the client, sending the user operation with the appropriate parameters. NOTE: it's recommended to just use the installPlugin action returned from generated plugins | -| [isDeferredAction](/wallets/reference/account-kit/smart-contracts/functions/isDeferredAction) | Type guard to check if a TypedDataDefinition is a deferred action. | -| [isModularAccountV2](/wallets/reference/account-kit/smart-contracts/functions/isModularAccountV2) | - | -| [isMultisigModularAccount](/wallets/reference/account-kit/smart-contracts/functions/isMultisigModularAccount) | - | -| [pack1271EOASignature](/wallets/reference/account-kit/smart-contracts/functions/pack1271EOASignature) | - | -| [pack1271WebAuthnSignature](/wallets/reference/account-kit/smart-contracts/functions/pack1271WebAuthnSignature) | - | -| [packUOSignature](/wallets/reference/account-kit/smart-contracts/functions/packUOSignature) | - | -| [parseDeferredAction](/wallets/reference/account-kit/smart-contracts/functions/parseDeferredAction) | - | -| [pluginManagerActions](/wallets/reference/account-kit/smart-contracts/functions/pluginManagerActions) | Provides actions for managing plugins on a given client, including installing and uninstalling plugins. NOTE: this is provided by default when using a modular account client | -| [predictLightAccountAddress](/wallets/reference/account-kit/smart-contracts/functions/predictLightAccountAddress) | Predicts the address of a light account based on provided parameters such as factory address, salt, owner address, and version. | -| [predictModularAccountV2Address](/wallets/reference/account-kit/smart-contracts/functions/predictModularAccountV2Address) | Predicts the address of a modular account V2 based on the provided parameters, which include factory address, salt, and implementation address. This function supports different types of accounts including "SMA", "MA", and "WebAuthn". | -| [predictMultiOwnerLightAccountAddress](/wallets/reference/account-kit/smart-contracts/functions/predictMultiOwnerLightAccountAddress) | Predicts the address of a **Multi-Owner Light Account** given the factory, salt and the set of owner addresses. | -| [splitAggregatedSignature](/wallets/reference/account-kit/smart-contracts/functions/splitAggregatedSignature) | Takes an aggregated signature and threshold and splits it into its components | -| [transferLightAccountOwnership](/wallets/reference/account-kit/smart-contracts/functions/transferLightAccountOwnership) | Transfers the ownership of a light account to a new owner. This function ensures that the client is a compatible smart acccount client and that a Light Account is provided. If the waitForTxn parameter is true, it will wait for the transaction to be completed before returning. | diff --git a/docs/pages/reference/account-kit/smart-contracts/src/classes/InvalidAggregatedSignatureError.mdx b/docs/pages/reference/account-kit/smart-contracts/src/classes/InvalidAggregatedSignatureError.mdx deleted file mode 100644 index 6f5782f119..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/classes/InvalidAggregatedSignatureError.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: InvalidAggregatedSignatureError -description: Error thrown when the aggregated signature is invalid -slug: wallets/reference/account-kit/smart-contracts/classes/InvalidAggregatedSignatureError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L6) - -Error thrown when the aggregated signature is invalid - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new InvalidAggregatedSignatureError(): InvalidAggregatedSignatureError; -``` - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L8) - -#### Returns - -`InvalidAggregatedSignatureError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidAggregatedSignatureError"` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/classes/InvalidContextSignatureError.mdx b/docs/pages/reference/account-kit/smart-contracts/src/classes/InvalidContextSignatureError.mdx deleted file mode 100644 index 1289ca6264..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/classes/InvalidContextSignatureError.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: InvalidContextSignatureError -description: Error thrown when the context signature is invalid -slug: wallets/reference/account-kit/smart-contracts/classes/InvalidContextSignatureError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L16) - -Error thrown when the context signature is invalid - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new InvalidContextSignatureError(): InvalidContextSignatureError; -``` - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L18) - -#### Returns - -`InvalidContextSignatureError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"InvalidContextSignatureError"` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/classes/MultisigAccountExpectedError.mdx b/docs/pages/reference/account-kit/smart-contracts/src/classes/MultisigAccountExpectedError.mdx deleted file mode 100644 index 9f51ea3902..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/classes/MultisigAccountExpectedError.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: MultisigAccountExpectedError -description: Error thrown when the expected account is not a multisig modular account -slug: wallets/reference/account-kit/smart-contracts/classes/MultisigAccountExpectedError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L26) - -Error thrown when the expected account is not a multisig modular account - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new MultisigAccountExpectedError(): MultisigAccountExpectedError; -``` - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L28) - -#### Returns - -`MultisigAccountExpectedError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"MultisigAccountExpectedError"` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/classes/MultisigMissingSignatureError.mdx b/docs/pages/reference/account-kit/smart-contracts/src/classes/MultisigMissingSignatureError.mdx deleted file mode 100644 index 25c0f489b7..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/classes/MultisigMissingSignatureError.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: MultisigMissingSignatureError -description: Error thrown when a multisig user op is missing a signature -slug: wallets/reference/account-kit/smart-contracts/classes/MultisigMissingSignatureError -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L36) - -Error thrown when a multisig user op is missing a signature - -## Extends - -- `BaseError` - -## Constructors - -### Constructor - -```ts -new MultisigMissingSignatureError(): MultisigMissingSignatureError; -``` - -Defined in: [account-kit/smart-contracts/src/msca/errors.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/errors.ts#L38) - -#### Returns - -`MultisigMissingSignatureError` - -#### Overrides - -```ts -BaseError.constructor; -``` - -## Properties - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDefault value
- `name` - - `string` - - `"MultisigMissingSignatureError"` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/classes/SessionKeyPermissionsBuilder.mdx b/docs/pages/reference/account-kit/smart-contracts/src/classes/SessionKeyPermissionsBuilder.mdx deleted file mode 100644 index aebf548237..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/classes/SessionKeyPermissionsBuilder.mdx +++ /dev/null @@ -1,521 +0,0 @@ ---- -title: SessionKeyPermissionsBuilder -description: A builder for creating the hex-encoded data for updating session key permissions. -slug: wallets/reference/account-kit/smart-contracts/classes/SessionKeyPermissionsBuilder -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L62) - -A builder for creating the hex-encoded data for updating session key permissions. - -## Constructors - -### Constructor - -```ts -new SessionKeyPermissionsBuilder(): SessionKeyPermissionsBuilder; -``` - -#### Returns - -`SessionKeyPermissionsBuilder` - -## Methods - -### addContractAddressAccessEntry() - -```ts -addContractAddressAccessEntry(entry): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:110](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L110) - -Adds a contract access entry to the internal list of contract address access entries. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.addContractAddressAccessEntry({ - contractAddress: "0x1234", - isOnList: true, - checkSelectors: true, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `entry` - - [`ContractAccessEntry`](../type-aliases/ContractAccessEntry) - - the contract access entry to be added -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -the instance of the current class for chaining - ---- - -### addContractFunctionAccessEntry() - -```ts -addContractFunctionAccessEntry(entry): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:133](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L133) - -Adds a contract method entry to the `_contractMethodAccessEntrys` array. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.addContractAddressAccessEntry({ - contractAddress: "0x1234", - methodSelector: "0x45678", - isOnList: true, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `entry` - - [`ContractMethodEntry`](../type-aliases/ContractMethodEntry) - - The contract method entry to be added -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -The instance of the class for method chaining - ---- - -### addErc20TokenSpendLimit() - -```ts -addErc20TokenSpendLimit(limit): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:200](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L200) - -Adds an ERC20 token spend limit to the list of limits and returns the updated object. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.addErc20TokenSpendLimit({ - tokenAddress: "0x1234", - spendLimit: 1000000000000000000n, - refreshInterval: 3600, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `limit` - - [`Erc20TokenLimit`](../type-aliases/Erc20TokenLimit) - - The ERC20 token spend limit to be added -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -The updated object with the new ERC20 token spend limit - ---- - -### encode() - -```ts -encode(): `0x${string}`[]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:259](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L259) - -Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.setRequiredPaymaster("0x1234"); -const encoded = builder.encode(); -``` - -#### Returns - -`` `0x${string}` ``\[] - -An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits. - ---- - -### setContractAccessControlType() - -```ts -setContractAccessControlType(aclType): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:87](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L87) - -Sets the access control type for the contract and returns the current instance for method chaining. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `aclType` - - [`SessionKeyAccessListType`](../enumerations/SessionKeyAccessListType) - - The access control type for the session key -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -The current instance for method chaining - ---- - -### setGasSpendLimit() - -```ts -setGasSpendLimit(limit): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:221](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L221) - -Sets the gas spend limit and returns the current instance for method chaining. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.setGasSpendLimit({ - spendLimit: 1000000000000000000n, - refreshInterval: 3600, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `limit` - - [`GasSpendLimit`](../type-aliases/GasSpendLimit) - - The gas spend limit to be set -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -The current instance for chaining - ---- - -### setNativeTokenSpendLimit() - -```ts -setNativeTokenSpendLimit(limit): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:177](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L177) - -Sets the native token spend limit and returns the instance for chaining. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.setNativeTokenSpendLimit({ - spendLimit: 1000000000000000000n, - refreshInterval: 3600, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `limit` - - [`NativeTokenLimit`](../type-aliases/NativeTokenLimit) - - The limit to set for native token spending -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -The instance for chaining - ---- - -### setRequiredPaymaster() - -```ts -setRequiredPaymaster(paymaster): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:240](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L240) - -Sets the required paymaster address. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.setRequiredPaymaster("0x1234"); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `paymaster` - - `` `0x${string}` `` - - the address of the paymaster to be set -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -the current instance for method chaining - ---- - -### setTimeRange() - -```ts -setTimeRange(timeRange): SessionKeyPermissionsBuilder; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:155](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L155) - -Sets the time range for an object and returns the object itself for chaining. - -#### Example - -```ts -import { SessionKeyPermissionsBuilder } from "@account-kit/smart-contracts"; - -const builder = new SessionKeyPermissionsBuilder(); -builder.setTimeRange({ - validFrom: Date.now(), - validUntil: Date.now() + 15 * 60 * 1000, -}); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `timeRange` - - [`TimeRange`](../type-aliases/TimeRange) - - The time range to be set -
- -#### Returns - -`SessionKeyPermissionsBuilder` - -The current object for method chaining diff --git a/docs/pages/reference/account-kit/smart-contracts/src/classes/SessionKeySigner.mdx b/docs/pages/reference/account-kit/smart-contracts/src/classes/SessionKeySigner.mdx deleted file mode 100644 index 63ee125a31..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/classes/SessionKeySigner.mdx +++ /dev/null @@ -1,509 +0,0 @@ ---- -title: SessionKeySigner -description: A simple session key signer that uses localStorage or sessionStorage to store a private key. If the key is not found, it will generate a new one and store it in the storage. -slug: wallets/reference/account-kit/smart-contracts/classes/SessionKeySigner -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts#L28) - -A simple session key signer that uses localStorage or sessionStorage to store -a private key. If the key is not found, it will generate a new one and store -it in the storage. - -## Implements - -- `SmartAccountSigner`\<`LocalAccountSigner`\<[`PrivateKeyAccount`](https://viem.sh)>> - -## Constructors - -### Constructor - -```ts -new SessionKeySigner(config_): SessionKeySigner; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts#L48) - -Initializes a new instance of a session key signer with the provided configuration. This will set the `signerType`, `storageKey`, and `storageType`. It will also manage the session key, either fetching it from storage or generating a new one if it doesn't exist. - -#### Example - -```ts -import { SessionKeySigner } from "@account-kit/smart-contracts"; - -const signer = new SessionKeySigner(); -``` - -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config_` - - `Object` - - the configuration for initializing the session key signer -
- -#### Returns - -`SessionKeySigner` - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyTypeDescription
- `getAddress` - - () => `Promise`\<`` `0x${string}` ``> - - An async function that retrieves the address using the inner object's `getAddress` method. - - **Example** - - ```ts - import { SessionKeySigner } from "@account-kit/smart-contracts"; - - const signer = new SessionKeySigner(); - const sessionKeyAddress = await signer.getAddress(); - ``` -
- `inner` - - `LocalAccountSigner`\<\{ }> - - ‐ -
- `signerType` - - `string` - - ‐ -
- `signMessage` - - (`msg`) => `Promise`\<`` `0x${string}` ``> - - Signs a message using the inner signer. - - **Example** - - ```ts - import { SessionKeySigner } from "@account-kit/smart-contracts"; - - const signer = new SessionKeySigner(); - const sessionKeyAddress = await signer.signMessage("hello"); - ``` -
- -## Methods - -### generateNewKey() - -```ts -generateNewKey(): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts:157](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts#L157) - -Generates a new private key and stores it in the storage. - -#### Example - -```ts -import { SessionKeySigner } from "@account-kit/smart-contracts"; - -const signer = new SessionKeySigner(); -const newSessionKey = signer.generateNewKey(); -``` - -#### Returns - -`` `0x${string}` `` - -The public address of the new key. - ---- - -### signTypedData() - -```ts -signTypedData(params): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts:135](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/signer.ts#L135) - -Signs the provided typed data using the inner signer. - -#### Example - -```ts -import { SessionKeySigner } from "@account-kit/smart-contracts"; - -const signer = new SessionKeySigner(); -console.log( - await signer.signTypedData({ - types: { - Message: [{ name: "content", type: "string" }], - }, - primaryType: "Message", - message: { content: "Hello" }, - }), -); -``` - -#### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault typeDescription
- `TTypedData` *extends* - | \{ - \[`key`: `string`]: readonly [`TypedDataParameter`](https://abitype.dev)\[]; - \[`key`: `` `string[${string}]` ``]: `undefined`; - \[`key`: `` `function[${string}]` ``]: `undefined`; - \[`key`: `` `address[${string}]` ``]: `undefined`; - \[`key`: `` `bool[${string}]` ``]: `undefined`; - \[`key`: `` `bytes[${string}]` ``]: `undefined`; - \[`key`: `` `bytes1[${string}]` ``]: `undefined`; - \[`key`: `` `bytes2[${string}]` ``]: `undefined`; - \[`key`: `` `bytes3[${string}]` ``]: `undefined`; - \[`key`: `` `bytes4[${string}]` ``]: `undefined`; - \[`key`: `` `bytes5[${string}]` ``]: `undefined`; - \[`key`: `` `bytes6[${string}]` ``]: `undefined`; - \[`key`: `` `bytes7[${string}]` ``]: `undefined`; - \[`key`: `` `bytes8[${string}]` ``]: `undefined`; - \[`key`: `` `bytes9[${string}]` ``]: `undefined`; - \[`key`: `` `bytes10[${string}]` ``]: `undefined`; - \[`key`: `` `bytes11[${string}]` ``]: `undefined`; - \[`key`: `` `bytes12[${string}]` ``]: `undefined`; - \[`key`: `` `bytes13[${string}]` ``]: `undefined`; - \[`key`: `` `bytes14[${string}]` ``]: `undefined`; - \[`key`: `` `bytes15[${string}]` ``]: `undefined`; - \[`key`: `` `bytes16[${string}]` ``]: `undefined`; - \[`key`: `` `bytes17[${string}]` ``]: `undefined`; - \[`key`: `` `bytes18[${string}]` ``]: `undefined`; - \[`key`: `` `bytes19[${string}]` ``]: `undefined`; - \[`key`: `` `bytes20[${string}]` ``]: `undefined`; - \[`key`: `` `bytes21[${string}]` ``]: `undefined`; - \[`key`: `` `bytes22[${string}]` ``]: `undefined`; - \[`key`: `` `bytes23[${string}]` ``]: `undefined`; - \[`key`: `` `bytes24[${string}]` ``]: `undefined`; - \[`key`: `` `bytes25[${string}]` ``]: `undefined`; - \[`key`: `` `bytes26[${string}]` ``]: `undefined`; - \[`key`: `` `bytes27[${string}]` ``]: `undefined`; - \[`key`: `` `bytes28[${string}]` ``]: `undefined`; - \[`key`: `` `bytes29[${string}]` ``]: `undefined`; - \[`key`: `` `bytes30[${string}]` ``]: `undefined`; - \[`key`: `` `bytes31[${string}]` ``]: `undefined`; - \[`key`: `` `bytes32[${string}]` ``]: `undefined`; - \[`key`: `` `int[${string}]` ``]: `undefined`; - \[`key`: `` `int8[${string}]` ``]: `undefined`; - \[`key`: `` `int16[${string}]` ``]: `undefined`; - \[`key`: `` `int24[${string}]` ``]: `undefined`; - \[`key`: `` `int32[${string}]` ``]: `undefined`; - \[`key`: `` `int40[${string}]` ``]: `undefined`; - \[`key`: `` `int48[${string}]` ``]: `undefined`; - \[`key`: `` `int56[${string}]` ``]: `undefined`; - \[`key`: `` `int64[${string}]` ``]: `undefined`; - \[`key`: `` `int72[${string}]` ``]: `undefined`; - \[`key`: `` `int80[${string}]` ``]: `undefined`; - \[`key`: `` `int88[${string}]` ``]: `undefined`; - \[`key`: `` `int96[${string}]` ``]: `undefined`; - \[`key`: `` `int104[${string}]` ``]: `undefined`; - \[`key`: `` `int112[${string}]` ``]: `undefined`; - \[`key`: `` `int120[${string}]` ``]: `undefined`; - \[`key`: `` `int128[${string}]` ``]: `undefined`; - \[`key`: `` `int136[${string}]` ``]: `undefined`; - \[`key`: `` `int144[${string}]` ``]: `undefined`; - \[`key`: `` `int152[${string}]` ``]: `undefined`; - \[`key`: `` `int160[${string}]` ``]: `undefined`; - \[`key`: `` `int168[${string}]` ``]: `undefined`; - \[`key`: `` `int176[${string}]` ``]: `undefined`; - \[`key`: `` `int184[${string}]` ``]: `undefined`; - \[`key`: `` `int192[${string}]` ``]: `undefined`; - \[`key`: `` `int200[${string}]` ``]: `undefined`; - \[`key`: `` `int208[${string}]` ``]: `undefined`; - \[`key`: `` `int216[${string}]` ``]: `undefined`; - \[`key`: `` `int224[${string}]` ``]: `undefined`; - \[`key`: `` `int232[${string}]` ``]: `undefined`; - \[`key`: `` `int240[${string}]` ``]: `undefined`; - \[`key`: `` `int248[${string}]` ``]: `undefined`; - \[`key`: `` `int256[${string}]` ``]: `undefined`; - \[`key`: `` `uint[${string}]` ``]: `undefined`; - \[`key`: `` `uint8[${string}]` ``]: `undefined`; - \[`key`: `` `uint16[${string}]` ``]: `undefined`; - \[`key`: `` `uint24[${string}]` ``]: `undefined`; - \[`key`: `` `uint32[${string}]` ``]: `undefined`; - \[`key`: `` `uint40[${string}]` ``]: `undefined`; - \[`key`: `` `uint48[${string}]` ``]: `undefined`; - \[`key`: `` `uint56[${string}]` ``]: `undefined`; - \[`key`: `` `uint64[${string}]` ``]: `undefined`; - \[`key`: `` `uint72[${string}]` ``]: `undefined`; - \[`key`: `` `uint80[${string}]` ``]: `undefined`; - \[`key`: `` `uint88[${string}]` ``]: `undefined`; - \[`key`: `` `uint96[${string}]` ``]: `undefined`; - \[`key`: `` `uint104[${string}]` ``]: `undefined`; - \[`key`: `` `uint112[${string}]` ``]: `undefined`; - \[`key`: `` `uint120[${string}]` ``]: `undefined`; - \[`key`: `` `uint128[${string}]` ``]: `undefined`; - \[`key`: `` `uint136[${string}]` ``]: `undefined`; - \[`key`: `` `uint144[${string}]` ``]: `undefined`; - \[`key`: `` `uint152[${string}]` ``]: `undefined`; - \[`key`: `` `uint160[${string}]` ``]: `undefined`; - \[`key`: `` `uint168[${string}]` ``]: `undefined`; - \[`key`: `` `uint176[${string}]` ``]: `undefined`; - \[`key`: `` `uint184[${string}]` ``]: `undefined`; - \[`key`: `` `uint192[${string}]` ``]: `undefined`; - \[`key`: `` `uint200[${string}]` ``]: `undefined`; - \[`key`: `` `uint208[${string}]` ``]: `undefined`; - \[`key`: `` `uint216[${string}]` ``]: `undefined`; - \[`key`: `` `uint224[${string}]` ``]: `undefined`; - \[`key`: `` `uint232[${string}]` ``]: `undefined`; - \[`key`: `` `uint240[${string}]` ``]: `undefined`; - \[`key`: `` `uint248[${string}]` ``]: `undefined`; - \[`key`: `` `uint256[${string}]` ``]: `undefined`; - `string?`: `undefined`; - `address?`: `undefined`; - `bool?`: `undefined`; - `bytes?`: `undefined`; - `bytes1?`: `undefined`; - `bytes2?`: `undefined`; - `bytes3?`: `undefined`; - `bytes4?`: `undefined`; - `bytes5?`: `undefined`; - `bytes6?`: `undefined`; - `bytes7?`: `undefined`; - `bytes8?`: `undefined`; - `bytes9?`: `undefined`; - `bytes10?`: `undefined`; - `bytes11?`: `undefined`; - `bytes12?`: `undefined`; - `bytes13?`: `undefined`; - `bytes14?`: `undefined`; - `bytes15?`: `undefined`; - `bytes16?`: `undefined`; - `bytes17?`: `undefined`; - `bytes18?`: `undefined`; - `bytes19?`: `undefined`; - `bytes20?`: `undefined`; - `bytes21?`: `undefined`; - `bytes22?`: `undefined`; - `bytes23?`: `undefined`; - `bytes24?`: `undefined`; - `bytes25?`: `undefined`; - `bytes26?`: `undefined`; - `bytes27?`: `undefined`; - `bytes28?`: `undefined`; - `bytes29?`: `undefined`; - `bytes30?`: `undefined`; - `bytes31?`: `undefined`; - `bytes32?`: `undefined`; - `int8?`: `undefined`; - `int16?`: `undefined`; - `int24?`: `undefined`; - `int32?`: `undefined`; - `int40?`: `undefined`; - `int48?`: `undefined`; - `int56?`: `undefined`; - `int64?`: `undefined`; - `int72?`: `undefined`; - `int80?`: `undefined`; - `int88?`: `undefined`; - `int96?`: `undefined`; - `int104?`: `undefined`; - `int112?`: `undefined`; - `int120?`: `undefined`; - `int128?`: `undefined`; - `int136?`: `undefined`; - `int144?`: `undefined`; - `int152?`: `undefined`; - `int160?`: `undefined`; - `int168?`: `undefined`; - `int176?`: `undefined`; - `int184?`: `undefined`; - `int192?`: `undefined`; - `int200?`: `undefined`; - `int208?`: `undefined`; - `int216?`: `undefined`; - `int224?`: `undefined`; - `int232?`: `undefined`; - `int240?`: `undefined`; - `int248?`: `undefined`; - `int256?`: `undefined`; - `uint8?`: `undefined`; - `uint16?`: `undefined`; - `uint24?`: `undefined`; - `uint32?`: `undefined`; - `uint40?`: `undefined`; - `uint48?`: `undefined`; - `uint56?`: `undefined`; - `uint64?`: `undefined`; - `uint72?`: `undefined`; - `uint80?`: `undefined`; - `uint88?`: `undefined`; - `uint96?`: `undefined`; - `uint104?`: `undefined`; - `uint112?`: `undefined`; - `uint120?`: `undefined`; - `uint128?`: `undefined`; - `uint136?`: `undefined`; - `uint144?`: `undefined`; - `uint152?`: `undefined`; - `uint160?`: `undefined`; - `uint168?`: `undefined`; - `uint176?`: `undefined`; - `uint184?`: `undefined`; - `uint192?`: `undefined`; - `uint200?`: `undefined`; - `uint208?`: `undefined`; - `uint216?`: `undefined`; - `uint224?`: `undefined`; - `uint232?`: `undefined`; - `uint240?`: `undefined`; - `uint248?`: `undefined`; - `uint256?`: `undefined`; - } - | \{ - \[`key`: `string`]: `unknown`; - } - - ‐ - - The typed data type, which extends `TypedData` or a record of unknown keys to unknown values. -
- `TPrimaryType` *extends* `string` | `number` | `symbol` - - keyof `TTypedData` - - The primary type of the typed data. -
- -#### Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`TypedDataDefinition`](https://viem.sh)\<`TTypedData`, `TPrimaryType`> - - The parameters containing the typed data definition and primary type. -
- -#### Returns - -`Promise`\<`` `0x${string}` ``> - -A promise that resolves to the signed typed data as a string. - -#### Implementation of - -```ts -SmartAccountSigner.signTypedData; -``` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/enumerations/SessionKeyAccessListType.mdx b/docs/pages/reference/account-kit/smart-contracts/src/enumerations/SessionKeyAccessListType.mdx deleted file mode 100644 index c734284974..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/enumerations/SessionKeyAccessListType.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: SessionKeyAccessListType -description: Overview of SessionKeyAccessListType -slug: wallets/reference/account-kit/smart-contracts/enumerations/SessionKeyAccessListType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:4](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L4) - -## Enumeration Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Enumeration MemberValue
- `ALLOW_ALL_ACCESS` - - `2` -
- `ALLOWLIST` - - `0` -
- `DENYLIST` - - `1` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/assertNever.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/assertNever.mdx deleted file mode 100644 index 73fcc6d905..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/assertNever.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: assertNever -description: Overview of the assertNever function -slug: wallets/reference/account-kit/smart-contracts/functions/assertNever -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function assertNever(_val, msg): never; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:341](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L341) - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - -
ParameterType
- `_val` - - `never` -
- `msg` - - `string` -
- -## Returns - -`never` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/buildDeferredActionDigest.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/buildDeferredActionDigest.mdx deleted file mode 100644 index 8e0ed2030f..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/buildDeferredActionDigest.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: buildDeferredActionDigest -description: Overview of the buildDeferredActionDigest function -slug: wallets/reference/account-kit/smart-contracts/functions/buildDeferredActionDigest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function buildDeferredActionDigest(args): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:327](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L327) - -Creates the digest which must be prepended to the userOp signature. - -Assumption: The client this extends is used to sign the typed data. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - [`BuildDeferredActionDigestParams`](../type-aliases/BuildDeferredActionDigestParams) - - The argument object containing the following: -
- -## Returns - -`` `0x${string}` `` - -The encoded digest to be prepended to the userOp signature diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/buildFullNonceKey.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/buildFullNonceKey.mdx deleted file mode 100644 index 453aeb2264..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/buildFullNonceKey.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: buildFullNonceKey -description: Overview of the buildFullNonceKey function -slug: wallets/reference/account-kit/smart-contracts/functions/buildFullNonceKey -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function buildFullNonceKey(__namedParameters): bigint; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:278](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L278) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `__namedParameters` - - [`BuildNonceParams`](../type-aliases/BuildNonceParams) -
- -## Returns - -`bigint` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/buildSessionKeysToRemoveStruct.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/buildSessionKeysToRemoveStruct.mdx deleted file mode 100644 index 82625b0736..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/buildSessionKeysToRemoveStruct.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: buildSessionKeysToRemoveStruct -description: Overview of the buildSessionKeysToRemoveStruct function -slug: wallets/reference/account-kit/smart-contracts/functions/buildSessionKeysToRemoveStruct -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function buildSessionKeysToRemoveStruct( - client, - args, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/utils.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/utils.ts#L33) - -Finds predecessors for each provided key and returns them in the struct `ISessionKeyPlugin.SessionKeyToRemove[]`. - -## Example - -```ts -import { buildSessionKeysToRemoveStruct } from "@account-kit/smart-contracts"; - -const client = createSmartAccountClient(...); - -const keysToRemove = await buildSessionKeysToRemoveStruct(client, { - keys: ["0x...", "0x..."], -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `undefined` | `SmartContractAccount` - - `undefined` | `SmartContractAccount` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client instance used to interact with the smart account -
- `args` - - `BuildSessionKeysToRemoveStructParams` - - Arguments to configure the session key removal process -
- -## Returns - -`Promise`\<`object`\[]> - -A promise that resolves to an array of objects each containing a session key and its predecessor diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/combineSignatures.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/combineSignatures.mdx deleted file mode 100644 index 5dddc95e80..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/combineSignatures.mdx +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: combineSignatures -description: Overview of the combineSignatures function -slug: wallets/reference/account-kit/smart-contracts/functions/combineSignatures -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function combineSignatures(params): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/utils/combineSignatures.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/utils/combineSignatures.ts#L38) - -Combines multiple signatures with provided upper limit values for gas fees and returns the concatenated result. - -## Example - -```ts -import { combineSignatures } from "@account-kit/smart-contracts"; - -const combinedSignature = combineSignatures({ - // this is the upper limit pre-verification gas - upperLimitPvg: "0x01", - upperLimitMaxFeePerGas: "0x02", - upperLimitMaxPriorityFeePerGas: "0x03", - signatures: [{ - signerType: "EOA", - userOpSigType: "UPPERLIMIT", - signer: `0x...`, - signature: `0x...`, - }] - usingMaxValues: false, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `CombineSignaturesParams` - - The function parameters -
- -## Returns - -`` `0x${string}` `` - -The concatenated result of padding and formatting the provided values and signatures diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccount.mdx deleted file mode 100644 index abf526805a..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccount.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: createLightAccount -description: Creates a light account based on the provided parameters such as transport, chain, signer, init code, and more. Ensures that an account is configured and returned with various capabilities, such as transferring ownership and retrieving the owner's address. -slug: wallets/reference/account-kit/smart-contracts/functions/createLightAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createLightAccount( - config, -): Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/account.ts:75](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/account.ts#L75) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- `TLightAccountVersion` *extends* `"v1.0.1"` | `"v1.0.2"` | `"v1.1.0"` | `"v2.0.0"` - - `"v2.0.0"` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`CreateLightAccountParams`](../type-aliases/CreateLightAccountParams)\<`TTransport`, `TSigner`, `TLightAccountVersion`> - - The parameters for creating a light account -
- -## Returns - -`Promise`\<[`LightAccount`](../type-aliases/LightAccount)\<`TSigner`, `TLightAccountVersion`>> - -A promise that resolves to a `LightAccount` object containing the created account information and methods diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountAlchemyClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountAlchemyClient.mdx deleted file mode 100644 index c2ef12521f..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountAlchemyClient.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: createLightAccountAlchemyClient -description: Creates an Alchemy smart account client connected to a Light Account instance. -slug: wallets/reference/account-kit/smart-contracts/functions/createLightAccountAlchemyClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createLightAccountAlchemyClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - LightAccount, - LightAccountClientActions - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/alchemyClient.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/alchemyClient.ts#L22) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`AlchemyLightAccountClientConfig`](../type-aliases/AlchemyLightAccountClientConfig)\<`TSigner`> -
- -## Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `LightAccount`\<`TSigner`>, `LightAccountClientActions`\<`TSigner`>>> - -A promise that resolves to an `AlchemySmartAccountClient` object containing the created client diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountClient.mdx deleted file mode 100644 index 607d191753..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createLightAccountClient.mdx +++ /dev/null @@ -1,202 +0,0 @@ ---- -title: createLightAccountClient -description: Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions. Also, we modified the return type to be the light account alchemy client if the transport is alchemy. -slug: wallets/reference/account-kit/smart-contracts/functions/createLightAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions. - -Also, we modified the return type to be the light account alchemy client if the transport is alchemy. - -## Examples - -```ts -import { createLightAccountClient } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; -import { http, generatePrivateKey } from "viem"; - -const account = await createLightAccountClient({ - chain: sepolia, - transport: http("RPC_URL"), - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); -``` - -```ts -import { createLightAccountClient } from "@account-kit/smart-contracts"; -import { sepolia, alchemy } from "@account-kit/infra"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem"; - -const lightAlchemyAccountClient = await createLightAccountClient({ - transport: alchemy({ apiKey: "your-api-key" }), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); -``` - -## Param - -The parameters for creating a light account client - -## Call Signature - -```ts -function createLightAccountClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - LightAccount, - LightAccountClientActions - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/client.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/client.ts#L41) - -### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Omit`\<`CreateLightAccountParams`\<[`HttpTransport`](https://viem.sh), `TSigner`>, `"transport"`> & `Omit`\<`AlchemySmartAccountClientConfig`\<[`Chain`](https://viem.sh), `LightAccount`\<`TSigner`>>, `"account"`> & `object` -
- -### Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `LightAccount`\<`TSigner`>, [`LightAccountClientActions`](../type-aliases/LightAccountClientActions)\<`TSigner`>>> - -## Call Signature - -```ts -function createLightAccountClient( - args, -): Promise< - SmartAccountClient< - CustomTransport, - TChain, - LightAccount, - SmartAccountClientActions & - LightAccountClientActions> - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/client.ts:54](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/client.ts#L54) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `object` & `Omit`\<`CreateLightAccountParams`\<`TTransport`, `TSigner`>, `"chain"` | `"transport"`> & `Omit`\<\{ }, `"account"` | `"chain"` | `"transport"`> & `NotType`\<`TTransport`, `AlchemyTransport`> -
- -### Returns - -`Promise`\<`SmartAccountClient`\<[`CustomTransport`](https://viem.sh), `TChain`, `LightAccount`\<`TSigner`>, `SmartAccountClientActions`\<[`Chain`](https://viem.sh), `SmartContractAccount`> & [`LightAccountClientActions`](../type-aliases/LightAccountClientActions)\<`TSigner`, `LightAccount`\<`TSigner`>>>> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMAv2Base.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMAv2Base.mdx deleted file mode 100644 index 013ec1281c..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMAv2Base.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: createMAv2Base -description: Overview of the createMAv2Base function -slug: wallets/reference/account-kit/smart-contracts/functions/createMAv2Base -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Call Signature - -```ts -function createMAv2Base(config): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:130](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L130) - -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `config` - - [`CreateWebauthnMAV2BaseParams`](../type-aliases/CreateWebauthnMAV2BaseParams) -
- -### Returns - -`Promise`\<[`WebauthnModularAccountV2`](../type-aliases/WebauthnModularAccountV2)> - -## Call Signature - -```ts -function createMAv2Base(config): CreateMAV2BaseReturnType; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:134](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L134) - -### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `config` - - [`CreateMAV2BaseParams`](../type-aliases/CreateMAV2BaseParams) -
- -### Returns - -[`CreateMAV2BaseReturnType`](../type-aliases/CreateMAV2BaseReturnType)\<`TSigner`> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountAlchemyClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountAlchemyClient.mdx deleted file mode 100644 index c7db39a26d..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountAlchemyClient.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: createModularAccountAlchemyClient -description: Creates a modular account Alchemy client with the provided configuration. -slug: wallets/reference/account-kit/smart-contracts/functions/createModularAccountAlchemyClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createModularAccountAlchemyClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - MultiOwnerModularAccount, - ExecutionActions< - MultiOwnerModularAccount, - undefined, - keyof EntryPointRegistryBase - > & - ManagementActions< - MultiOwnerModularAccount, - undefined, - keyof EntryPointRegistryBase - > & - ReadAndEncodeActions> & - object & - object & - PluginManagerActions> & - AccountLoupeActions> - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/alchemyClient.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/alchemyClient.ts#L28) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`AlchemyModularAccountClientConfig`](../type-aliases/AlchemyModularAccountClientConfig)\<`TSigner`> -
- -## Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `MultiOwnerModularAccount`\<`TSigner`>, `ExecutionActions`\<`MultiOwnerModularAccount`\<`TSigner`>, `undefined`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ManagementActions`\<`MultiOwnerModularAccount`\<`TSigner`>, `undefined`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ReadAndEncodeActions`\<`MultiOwnerModularAccount`\<`TSigner`>> & `object` & `object` & `PluginManagerActions`\<`MultiOwnerModularAccount`\<`TSigner`>> & `AccountLoupeActions`\<`MultiOwnerModularAccount`\<`TSigner`>>>> - -A promise that resolves to an `AlchemySmartAccountClient` configured with the desired plugins and actions diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2.mdx deleted file mode 100644 index aaf2c8eb91..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: createModularAccountV2 -description: 'Creates a ModularAccount V2 account, with the mode depending on the provided "mode" field. Possible modes include: "default", which is SMA Bytecode, and "7702", which is SMA 7702. Handles nonce generation, transaction encoding, and mode variant-specific behavior like initcode construction.' -slug: wallets/reference/account-kit/smart-contracts/functions/createModularAccountV2 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Creates a ModularAccount V2 account, with the mode depending on the provided "mode" field. -Possible modes include: "default", which is SMA Bytecode, and "7702", which is SMA 7702. -Handles nonce generation, transaction encoding, and mode variant-specific behavior like initcode construction. - -## Example - -```ts twoslash -import { createModularAccountV2 } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { alchemy, sepolia } from "@account-kit/infra"; - -const MNEMONIC = "..."; -const RPC_URL = "..."; - -const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - -const chain = sepolia; - -const transport = alchemy({ rpcUrl: RPC_URL }); - -const modularAccountV2 = await createModularAccountV2({ - mode: "default", // or "7702" - chain, - signer, - transport, -}); -``` - -## Param - -Configuration parameters for creating a Modular Account V2. - -## Call Signature - -```ts -function createModularAccountV2( - config, -): Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts:87](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts#L87) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `config` - - [`CreateModularAccountV2Params`](../type-aliases/CreateModularAccountV2Params)\<`TTransport`, `TSigner`> -
- -### Returns - -`Promise`\<[`ModularAccountV2`](../type-aliases/ModularAccountV2)\<`TSigner`>> - -## Call Signature - -```ts -function createModularAccountV2( - config, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts:94](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts#L94) - -### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `config` - - [`CreateWebauthnModularAccountV2Params`](../type-aliases/CreateWebauthnModularAccountV2Params)\<`TTransport`> -
- -### Returns - -`Promise`\<[`WebauthnModularAccountV2`](../type-aliases/WebauthnModularAccountV2)> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2Client.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2Client.mdx deleted file mode 100644 index d0d65ec5e6..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createModularAccountV2Client.mdx +++ /dev/null @@ -1,266 +0,0 @@ ---- -title: createModularAccountV2Client -description: Creates a Modular Account V2 client using the provided configuration parameters. -slug: wallets/reference/account-kit/smart-contracts/functions/createModularAccountV2Client -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Creates a Modular Account V2 client using the provided configuration parameters. - -## Example - -```ts twoslash -import { createModularAccountV2Client } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { alchemy, sepolia } from "@account-kit/infra"; - -const MNEMONIC = "..."; -const RPC_URL = "..."; - -const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - -const chain = sepolia; - -const transport = alchemy({ rpcUrl: RPC_URL }); - -const policyId = "..."; - -const modularAccountV2Client = await createModularAccountV2Client({ - chain, - signer, - transport, - policyId, // NOTE: you may only pass in a gas policy ID if you provide an Alchemy transport! -}); -``` - -## Param - -The configuration parameters required to create the Modular Account v2 account client - -## Call Signature - -```ts -function createModularAccountV2Client( - args, -): Promise>>; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L86) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - [`CreateModularAccountV2AlchemyClientParams`](../type-aliases/CreateModularAccountV2AlchemyClientParams)\<`AlchemyTransport`, `TChain`, `TSigner`> -
- -### Returns - -`Promise`\<`AlchemySmartAccountClient`\<`TChain`, [`ModularAccountV2`](../type-aliases/ModularAccountV2)\<`TSigner`>>> - -## Call Signature - -```ts -function createModularAccountV2Client( - args, -): Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:97](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L97) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - [`CreateModularAccountV2ClientParams`](../type-aliases/CreateModularAccountV2ClientParams)\<`TTransport`, `TChain`, `TSigner`> -
- -### Returns - -`Promise`\<[`ModularAccountV2Client`](../type-aliases/ModularAccountV2Client)\<`TSigner`, `TChain`, `TTransport`>> - -## Call Signature - -```ts -function createModularAccountV2Client( - args, -): Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:105](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L105) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - [`CreateWebauthnModularAccountV2ClientParams`](../type-aliases/CreateWebauthnModularAccountV2ClientParams)\<`TTransport`, `TChain`> -
- -### Returns - -`Promise`\<[`WebauthnModularAccountV2Client`](../type-aliases/WebauthnModularAccountV2Client)\<`TChain`, `TTransport`>> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccount.mdx deleted file mode 100644 index ef4705ee36..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccount.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: createMultiOwnerLightAccount -description: Creates a multi-owner light account using the provided parameters, including transport, chain, signer, initialization code, version, account address, factory address, salt, and owners. Ensures the owners list is deduplicated, ordered, and valid. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerLightAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createMultiOwnerLightAccount< - TTransport, - TSigner, - TLightAccountVersion, ->(config): Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts:83](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts#L83) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- `TLightAccountVersion` *extends* `"v2.0.0"` - - `"v2.0.0"` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`CreateMultiOwnerLightAccountParams`](../type-aliases/CreateMultiOwnerLightAccountParams)\<`TTransport`, `TSigner`, `TLightAccountVersion`> - - The parameters for creating a multi-owner light account -
- -## Returns - -`Promise`\<[`MultiOwnerLightAccount`](../type-aliases/MultiOwnerLightAccount)\<`TSigner`, `TLightAccountVersion`>> - -A promise that resolves to a `MultiOwnerLightAccount` object containing the created account information and methods diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountAlchemyClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountAlchemyClient.mdx deleted file mode 100644 index e69dc20e81..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountAlchemyClient.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: createMultiOwnerLightAccountAlchemyClient -description: Creates a multi-owner light account Alchemy client using the provided configuration. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerLightAccountAlchemyClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createMultiOwnerLightAccountAlchemyClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - MultiOwnerLightAccount, - MultiOwnerLightAccountClientActions - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.ts#L25) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`AlchemyMultiOwnerLightAccountClientConfig`](../type-aliases/AlchemyMultiOwnerLightAccountClientConfig)\<`TSigner`> -
- -## Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `MultiOwnerLightAccount`\<`TSigner`>, `MultiOwnerLightAccountClientActions`\<`TSigner`>>> - -A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountClient.mdx deleted file mode 100644 index 618c53a670..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerLightAccountClient.mdx +++ /dev/null @@ -1,205 +0,0 @@ ---- -title: createMultiOwnerLightAccountClient -description: Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerLightAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations. - -## Examples - -```ts -import { createMultiOwnerLightAccountClient } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; -import { http, generatePrivateKey } from "viem"; - -const account = await createMultiOwnerLightAccountClient({ - chain: sepolia, - transport: http("RPC_URL"), - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); -``` - -```ts -import { createMultiOwnerLightAccountClient } from "@account-kit/smart-contracts"; -import { sepolia, alchemy } from "@account-kit/infra"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem" - -const lightAccountClient = await createMultiOwnerLightAccountClient({ - transport: alchemy({ - apiKey: "your-api-key", - }), - chain: sepolia - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()) -}); -``` - -## Param - -the configuration for creating the multi-owner light / alchemy account client with the provided parameters transport - -## Call Signature - -```ts -function createMultiOwnerLightAccountClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - MultiOwnerLightAccount, - MultiOwnerLightAccountClientActions - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts#L55) - -### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Omit`\<`CreateMultiOwnerLightAccountParams`\<[`HttpTransport`](https://viem.sh), `TSigner`>, `"type"` | `"transport"`> & `Omit`\<`AlchemySmartAccountClientConfig`\<[`Chain`](https://viem.sh), `MultiOwnerLightAccount`\<`TSigner`>>, `"account"`> & `object` -
- -### Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `MultiOwnerLightAccount`\<`TSigner`>, `MultiOwnerLightAccountClientActions`\<`TSigner`>>> - -## Call Signature - -```ts -function createMultiOwnerLightAccountClient( - args, -): Promise< - SmartAccountClient< - CustomTransport, - Chain, - MultiOwnerLightAccount, - SmartAccountClientActions & - MultiOwnerLightAccountClientActions< - TSigner, - MultiOwnerLightAccount - > - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts:69](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/multiOwnerLightAccount.ts#L69) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `object` & `Omit`\<`CreateMultiOwnerLightAccountParams`\<`TTransport`, `TSigner`>, `"chain"` | `"transport"`> & `Omit`\<\{ }, `"account"` | `"chain"` | `"transport"`> & `NotType`\<`TTransport`, `AlchemyTransport`> -
- -### Returns - -`Promise`\<`SmartAccountClient`\<[`CustomTransport`](https://viem.sh), [`Chain`](https://viem.sh), `MultiOwnerLightAccount`\<`TSigner`>, `SmartAccountClientActions`\<[`Chain`](https://viem.sh), `SmartContractAccount`> & `MultiOwnerLightAccountClientActions`\<`TSigner`, `MultiOwnerLightAccount`\<`TSigner`>>>> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccount.mdx deleted file mode 100644 index ed15743209..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccount.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: createMultiOwnerModularAccount -description: Creates a multi-owner modular account with the given parameters, including transport, chain, signer, account address, initialization code, entry point, factory address, owners, and salt. Ensures that the owners are unique, ordered, and non-zero. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerModularAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createMultiOwnerModularAccount( - config, -): Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts#L56) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`CreateMultiOwnerModularAccountParams`](../type-aliases/CreateMultiOwnerModularAccountParams)\<`TTransport`, `TSigner`> - - Configuration parameters for creating a multi-owner modular account -
- -## Returns - -`Promise`\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>> - -A promise that resolves to a `MultiOwnerModularAccount` object containing the created account information and methods diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccountClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccountClient.mdx deleted file mode 100644 index fe7ed279a0..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultiOwnerModularAccountClient.mdx +++ /dev/null @@ -1,228 +0,0 @@ ---- -title: createMultiOwnerModularAccountClient -description: Creates a multi-owner modular account client with the provided parameters including account, transport, chain, and additional client configuration. This function uses a modular account and extends it with various plugin actions. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultiOwnerModularAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Creates a multi-owner modular account client with the provided parameters including account, transport, chain, and additional client configuration. This function uses a modular account and extends it with various plugin actions. - -## Examples - -```ts -import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; -import { http } from "viem"; -import { generatePrivateKey } from "viem/accounts"; - -const accountClient = await createMultiOwnerModularAccountClient({ - chain: sepolia, - transport: http("RPC_URL"), - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); -``` - -```ts -import { createMultiOwnerModularAccountClient } from "@account-kit/smart-contracts"; -import { sepolia, alchemy } from "@account-kit/infra"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem"; - -const alchemyAccountClient = await createMultiOwnerModularAccountClient({ - transport: alchemy({ apiKey: "your-api-key" }), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), -}); -``` - -## Param - -The parameters for creating the multi-owner modular account client - -## Call Signature - -```ts -function createMultiOwnerModularAccountClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - MultiOwnerModularAccount, - ExecutionActions< - MultiOwnerModularAccount, - undefined, - keyof EntryPointRegistryBase - > & - ManagementActions< - MultiOwnerModularAccount, - undefined, - keyof EntryPointRegistryBase - > & - ReadAndEncodeActions> & - object & - object & - PluginManagerActions> & - AccountLoupeActions> - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/client.ts:91](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/client.ts#L91) - -### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - `Omit`\<`CreateMultiOwnerModularAccountParams`\<[`HttpTransport`](https://viem.sh), `TSigner`>, `"transport"`> & `Omit`\<`AlchemySmartAccountClientConfig`\<[`Chain`](https://viem.sh), `LightAccount`\<`TSigner`>>, `"account"`> & `object` -
- -### Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), [`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>, `ExecutionActions`\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>, `undefined`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ManagementActions`\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>, `undefined`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ReadAndEncodeActions`\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>> & `object` & `object` & [`PluginManagerActions`](../type-aliases/PluginManagerActions)\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>> & [`AccountLoupeActions`](../type-aliases/AccountLoupeActions)\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>>>> - -## Call Signature - -```ts -function createMultiOwnerModularAccountClient( - args, -): Promise< - SmartAccountClient< - CustomTransport, - Chain, - MultiOwnerModularAccount, - ExecutionActions< - MultiOwnerModularAccount, - undefined, - keyof EntryPointRegistryBase - > & - ManagementActions< - MultiOwnerModularAccount, - undefined, - keyof EntryPointRegistryBase - > & - ReadAndEncodeActions> & - object & - object & - PluginManagerActions> & - AccountLoupeActions> - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/client.ts:107](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/client.ts#L107) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `CreateMultiOwnerModularAccountClientParams`\<`TTransport`, `TChain`, `TSigner`> & `NotType`\<`TTransport`, `AlchemyTransport`> -
- -### Returns - -`Promise`\<`SmartAccountClient`\<[`CustomTransport`](https://viem.sh), [`Chain`](https://viem.sh), [`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>, `ExecutionActions`\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>, `undefined`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ManagementActions`\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>, `undefined`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ReadAndEncodeActions`\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>> & `object` & `object` & [`PluginManagerActions`](../type-aliases/PluginManagerActions)\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>> & [`AccountLoupeActions`](../type-aliases/AccountLoupeActions)\<[`MultiOwnerModularAccount`](../type-aliases/MultiOwnerModularAccount)\<`TSigner`>>>> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigAccountAlchemyClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigAccountAlchemyClient.mdx deleted file mode 100644 index a8385ae1fb..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigAccountAlchemyClient.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: createMultisigAccountAlchemyClient -description: Creates an Alchemy client for a multisig account using the provided configuration. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultisigAccountAlchemyClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createMultisigAccountAlchemyClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - MultisigModularAccount, - ExecutionActions< - MultisigModularAccount, - MultisigUserOperationContext, - keyof EntryPointRegistryBase - > & - ManagementActions< - MultisigModularAccount, - MultisigUserOperationContext, - keyof EntryPointRegistryBase - > & - ReadAndEncodeActions> & - object & - object & - PluginManagerActions> & - AccountLoupeActions>, - MultisigUserOperationContext - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/multiSigAlchemyClient.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/multiSigAlchemyClient.ts#L36) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`AlchemyMultisigAccountClientConfig`](../type-aliases/AlchemyMultisigAccountClientConfig)\<`TSigner`> -
- -## Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), `MultisigModularAccount`\<`TSigner`>, `ExecutionActions`\<`MultisigModularAccount`\<`TSigner`>, `MultisigUserOperationContext`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ManagementActions`\<`MultisigModularAccount`\<`TSigner`>, `MultisigUserOperationContext`, keyof `EntryPointRegistryBase`\<`unknown`>> & `ReadAndEncodeActions`\<`MultisigModularAccount`\<`TSigner`>> & `object` & `object` & `PluginManagerActions`\<`MultisigModularAccount`\<`TSigner`>> & `AccountLoupeActions`\<`MultisigModularAccount`\<`TSigner`>>, `MultisigUserOperationContext`>> - -A promise that resolves to an Alchemy Smart Account Client for multisig accounts with extended functionalities. diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccount.mdx deleted file mode 100644 index c2f3e8d473..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccount.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: createMultisigModularAccount -description: Creates a multisig modular account using the provided parameters, including transport, chain, signer, account address, and other account settings. It configures the account with multiple owners and the specified threshold. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultisigModularAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createMultisigModularAccount( - config, -): Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multisigAccount.ts:60](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multisigAccount.ts#L60) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `config` - - [`CreateMultisigModularAccountParams`](../type-aliases/CreateMultisigModularAccountParams)\<`TTransport`, `TSigner`> - - The parameters for creating a multisig modular account. -
- -## Returns - -`Promise`\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>> - -A promise that resolves to a `MultisigModularAccount` object containing the created account information and methods. diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccountClient.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccountClient.mdx deleted file mode 100644 index 68a82b4404..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/createMultisigModularAccountClient.mdx +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: createMultisigModularAccountClient -description: Creates a multisig modular account client using the provided parameters including account details, transport, chain, and additional client configuration. This function constructs the multisig modular account and extends it with various actions to create a comprehensive client. -slug: wallets/reference/account-kit/smart-contracts/functions/createMultisigModularAccountClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -Creates a multisig modular account client using the provided parameters including account details, transport, chain, and additional client configuration. This function constructs the multisig modular account and extends it with various actions to create a comprehensive client. - -## Examples - -```ts -import { createMultisigModularAccountClient } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "viem/chains"; -import { http } from "viem"; -import { generatePrivateKey } from "viem/accounts"; - -const accountClient = await createMultisigModularAccountClient({ - chain: sepolia, - transport: http("RPC_URL"), - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), - owners: [], // other owners on the account - threshold: 2, // 2 of N signatures -}); -``` - -```ts -import { createMultisigModularAccountClient } from "@account-kit/smart-contracts"; -import { sepolia } from "@account-kit/infra"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { generatePrivateKey } from "viem" - -const alchemyAccountClient = await createMultisigModularAccountClient({ - transport: alchemy({ apiKey: "your-api-key" }), - chain: sepolia, - signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()), - owners: [...], // other owners on the account - threshold: 2, // 2 of N signatures -}); -``` - -## Param - -the parameters for configuring the multisig modular account client - -## Call Signature - -```ts -function createMultisigModularAccountClient( - params, -): Promise< - AlchemySmartAccountClient< - undefined | Chain, - MultisigModularAccount, - ExecutionActions< - MultisigModularAccount, - MultisigUserOperationContext, - keyof EntryPointRegistryBase - > & - ManagementActions< - MultisigModularAccount, - MultisigUserOperationContext, - keyof EntryPointRegistryBase - > & - ReadAndEncodeActions> & - object & - object & - PluginManagerActions> & - AccountLoupeActions>, - MultisigUserOperationContext - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/client.ts:201](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/client.ts#L201) - -### Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `params` - - [`AlchemyMultisigAccountClientConfig`](../type-aliases/AlchemyMultisigAccountClientConfig)\<`TSigner`> -
- -### Returns - -`Promise`\<`AlchemySmartAccountClient`\<`undefined` | [`Chain`](https://viem.sh), [`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>, `ExecutionActions`\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>, [`MultisigUserOperationContext`](../type-aliases/MultisigUserOperationContext), keyof `EntryPointRegistryBase`\<`unknown`>> & `ManagementActions`\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>, [`MultisigUserOperationContext`](../type-aliases/MultisigUserOperationContext), keyof `EntryPointRegistryBase`\<`unknown`>> & `ReadAndEncodeActions`\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>> & `object` & `object` & [`PluginManagerActions`](../type-aliases/PluginManagerActions)\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>> & [`AccountLoupeActions`](../type-aliases/AccountLoupeActions)\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>>, [`MultisigUserOperationContext`](../type-aliases/MultisigUserOperationContext)>> - -## Call Signature - -```ts -function createMultisigModularAccountClient( - args, -): Promise< - SmartAccountClient< - CustomTransport, - Chain, - MultisigModularAccount, - ExecutionActions< - MultisigModularAccount, - MultisigUserOperationContext, - keyof EntryPointRegistryBase - > & - ManagementActions< - MultisigModularAccount, - MultisigUserOperationContext, - keyof EntryPointRegistryBase - > & - ReadAndEncodeActions> & - object & - object & - PluginManagerActions> & - AccountLoupeActions>, - [{}, {}, {}, {}], - MultisigUserOperationContext - > ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/client.ts:216](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/client.ts#L216) - -### Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- -### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `CreateMultisigModularAccountClientParams`\<`TTransport`, `TChain`, `TSigner`> & `NotType`\<`TTransport`, `AlchemyTransport`> -
- -### Returns - -`Promise`\<`SmartAccountClient`\<[`CustomTransport`](https://viem.sh), [`Chain`](https://viem.sh), [`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>, `ExecutionActions`\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>, [`MultisigUserOperationContext`](../type-aliases/MultisigUserOperationContext), keyof `EntryPointRegistryBase`\<`unknown`>> & `ManagementActions`\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>, [`MultisigUserOperationContext`](../type-aliases/MultisigUserOperationContext), keyof `EntryPointRegistryBase`\<`unknown`>> & `ReadAndEncodeActions`\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>> & `object` & `object` & [`PluginManagerActions`](../type-aliases/PluginManagerActions)\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>> & [`AccountLoupeActions`](../type-aliases/AccountLoupeActions)\<[`MultisigModularAccount`](../type-aliases/MultisigModularAccount)\<`TSigner`>>, \[\{ -}, \{ -}, \{ -}, \{ -}], [`MultisigUserOperationContext`](../type-aliases/MultisigUserOperationContext)>> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/defaultLightAccountVersion.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/defaultLightAccountVersion.mdx deleted file mode 100644 index 5ce4030c4c..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/defaultLightAccountVersion.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: defaultLightAccountVersion -description: Overview of the defaultLightAccountVersion function -slug: wallets/reference/account-kit/smart-contracts/functions/defaultLightAccountVersion -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function defaultLightAccountVersion< - TLightAccountType, ->(): LightAccountVersion; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/utils.ts:79](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/utils.ts#L79) - -Get the default light account version for the given light account type - -## Type Parameters - - - - - - - - - - - - - - - - -
Type ParameterDescription
- `TLightAccountType` *extends* `LightAccountType` - -
- -## Returns - -`LightAccountVersion`\<`TLightAccountType`> - -the default version for the given light account type diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/formatSignatures.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/formatSignatures.mdx deleted file mode 100644 index 0ccab3f094..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/formatSignatures.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: formatSignatures -description: Overview of the formatSignatures function -slug: wallets/reference/account-kit/smart-contracts/functions/formatSignatures -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function formatSignatures(signatures, usingMaxValues): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/utils/formatSignatures.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/utils/formatSignatures.ts#L15) - -Formats a collection of Signature objects into a single aggregated signature. -The format is in the form of EOA_SIGS | CONTRACT_SIG_DATAS. The signatures are ordered -by signer address. The EOA SIGS contain the 65 signautre data for EOA signers and 65 bytes containing SIGNER | OFFSET | V for contract signers. -The OFFSET is used to fetch the signature data from the CONTRACT_SIG_DATAS. - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDefault valueDescription
- `signatures` - - `Signature`\[] - - `undefined` - - the array of Signature objects to combine into the correct aggregated signature format excluding the upper limits -
- `usingMaxValues` - - `boolean` - - `false` - - a boolean indicating wether or not the UserOperation is using the UPPER\_LIMIT for the gas and fee values -
- -## Returns - -`` `0x${string}` `` - -the Hex representation of the signature diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultLightAccountFactoryAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultLightAccountFactoryAddress.mdx deleted file mode 100644 index a312d26b35..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultLightAccountFactoryAddress.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: getDefaultLightAccountFactoryAddress -description: Overview of the getDefaultLightAccountFactoryAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultLightAccountFactoryAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultLightAccountFactoryAddress(chain, version): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/utils.ts:91](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/utils.ts#L91) - -Utility method returning the default light account factory address given a Chain object - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - a Chain object -
- `version` - - `LightAccountVersion`\<`"LightAccount"`> - - the version of the light account to get the factory address for -
- -## Returns - -`` `0x${string}` `` - -an for the given chain - -## Throws - -if the chain doesn't have an address currently deployed diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2Address.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2Address.mdx deleted file mode 100644 index 5978e1ef6e..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2Address.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getDefaultMAV2Address -description: Overview of the getDefaultMAV2Address function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultMAV2Address -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultMAV2Address(chain): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:169](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L169) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - [`Chain`](https://viem.sh) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2FactoryAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2FactoryAddress.mdx deleted file mode 100644 index df5b594571..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMAV2FactoryAddress.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getDefaultMAV2FactoryAddress -description: Overview of the getDefaultMAV2FactoryAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultMAV2FactoryAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultMAV2FactoryAddress(chain): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:97](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L97) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - [`Chain`](https://viem.sh) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerLightAccountFactoryAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerLightAccountFactoryAddress.mdx deleted file mode 100644 index a66ac955f9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerLightAccountFactoryAddress.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: getDefaultMultiOwnerLightAccountFactoryAddress -description: Overview of the getDefaultMultiOwnerLightAccountFactoryAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultMultiOwnerLightAccountFactoryAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultMultiOwnerLightAccountFactoryAddress(chain, version): any; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/utils.ts:109](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/utils.ts#L109) - -Utility method returning the default multi owner light account factory address given a Chain object - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - a Chain object -
- `version` - - `LightAccountVersion`\<`"MultiOwnerLightAccount"`> - - the version of the light account to get the factory address for -
- -## Returns - -`any` - -an Address for the given chain diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerModularAccountFactoryAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerModularAccountFactoryAddress.mdx deleted file mode 100644 index cb51994412..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultiOwnerModularAccountFactoryAddress.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: getDefaultMultiOwnerModularAccountFactoryAddress -description: Overview of the getDefaultMultiOwnerModularAccountFactoryAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultMultiOwnerModularAccountFactoryAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultMultiOwnerModularAccountFactoryAddress(chain): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/msca/utils.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/utils.ts#L74) - -Utility method returning the default multi owner msca factory address given a chain - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - the chain object for which to get the address -
- -## Returns - -`` `0x${string}` `` - -the address for the given chain - -## Throws - -if the chain doesn't have an address currently deployed diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultisigModularAccountFactoryAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultisigModularAccountFactoryAddress.mdx deleted file mode 100644 index f429ee02fd..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultMultisigModularAccountFactoryAddress.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: getDefaultMultisigModularAccountFactoryAddress -description: Overview of the getDefaultMultisigModularAccountFactoryAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultMultisigModularAccountFactoryAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultMultisigModularAccountFactoryAddress(chain): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/msca/utils.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/utils.ts#L48) - -Utility method returning the default multi sig msca factory address given a chain - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `chain` - - [`Chain`](https://viem.sh) - - the chain object for which to get the address -
- -## Returns - -`` `0x${string}` `` - -the address for the given chain - -## Throws - -if the chain doesn't have an address currently deployed diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV27702Address.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV27702Address.mdx deleted file mode 100644 index 22846fd3be..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV27702Address.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getDefaultSMAV27702Address -description: Overview of the getDefaultSMAV27702Address function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultSMAV27702Address -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultSMAV27702Address(chain): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:151](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L151) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - [`Chain`](https://viem.sh) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2BytecodeAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2BytecodeAddress.mdx deleted file mode 100644 index 66e7577439..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2BytecodeAddress.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getDefaultSMAV2BytecodeAddress -description: Overview of the getDefaultSMAV2BytecodeAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultSMAV2BytecodeAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultSMAV2BytecodeAddress(chain): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:115](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L115) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - [`Chain`](https://viem.sh) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2StorageAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2StorageAddress.mdx deleted file mode 100644 index 35afdf9a7d..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultSMAV2StorageAddress.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: getDefaultSMAV2StorageAddress -description: Overview of the getDefaultSMAV2StorageAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultSMAV2StorageAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultSMAV2StorageAddress(chain): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:133](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L133) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `chain` - - [`Chain`](https://viem.sh) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultWebAuthnMAV2FactoryAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultWebAuthnMAV2FactoryAddress.mdx deleted file mode 100644 index 23bb596c3a..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getDefaultWebAuthnMAV2FactoryAddress.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: getDefaultWebAuthnMAV2FactoryAddress -description: Overview of the getDefaultWebAuthnMAV2FactoryAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/getDefaultWebAuthnMAV2FactoryAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getDefaultWebAuthnMAV2FactoryAddress(): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:93](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L93) - -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getLightAccountVersionForAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getLightAccountVersionForAccount.mdx deleted file mode 100644 index 068954b664..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getLightAccountVersionForAccount.mdx +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: getLightAccountVersionForAccount -description: Overview of the getLightAccountVersionForAccount function -slug: wallets/reference/account-kit/smart-contracts/functions/getLightAccountVersionForAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getLightAccountVersionForAccount( - account, - chain, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/utils.ts:153](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/utils.ts#L153) - -Get the light account version definition for the given light account and chain - -## Type Parameters - - - - - - - - - - - - - - - - -
Type ParameterDescription
- `TAccount` *extends* `LightAccountBase` - -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `account` - - `TAccount` - - the light account to get the version for -
- `chain` - - [`Chain`](https://viem.sh) - - the chain to get the version for -
- -## Returns - -`Promise`\<`LightAccountVersionConfig`> - -the light account version definition for the given light account and chain diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getMAInitializationData.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getMAInitializationData.mdx deleted file mode 100644 index fcea20ec00..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getMAInitializationData.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: getMAInitializationData -description: Overview of the getMAInitializationData function -slug: wallets/reference/account-kit/smart-contracts/functions/getMAInitializationData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getMAInitializationData( - params, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/utils.ts:185](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/utils.ts#L185) - -Retrieves the initialization data for a multi-owner modular account. Throws an error if the client's chain is not found or if the multi-owner plugin address is not retrievable. - -## Example - -```ts -import { getMAInitializationData } from "@account-kit/smart-contracts"; -import { createSmartAccountClient } from "@aa-sdk/core"; - -const client = createSmartAccountClient(...); -const initializationData = await getMAInitializationData({ - client, - signerAddress: "0x...", // or array of signers -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `undefined` | `SmartContractAccount` - - `undefined` | `SmartContractAccount` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `GetMAInitializationDataParams`\<`TTransport`, `TChain`, `TAccount`> - - the parameters for getting initialization data -
- -## Returns - -`Promise`\<`UpgradeToData`> - -a promise that resolves to the initialization data required for upgrading to a multi-owner modular account diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getMAV2UpgradeToData.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getMAV2UpgradeToData.mdx deleted file mode 100644 index dcbec189d5..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getMAV2UpgradeToData.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: getMAV2UpgradeToData -description: Overview of the getMAV2UpgradeToData function -slug: wallets/reference/account-kit/smart-contracts/functions/getMAV2UpgradeToData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getMAV2UpgradeToData( - client, - args, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:210](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L210) - -Retrieves the data necessary to upgrade to a Modular Account V2 (MA v2). -Note that the upgrade will be to the Semi Modular Account Storage variant - -## Example - -```ts -import { - createLightAccountClient, - getMAV2UpgradeToData, -} from "@account-kit/smart-contracts"; - -const client = createLightAccountClient({}); -const upgradeData = await getMAV2UpgradeToData(client, {}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- `TAccount` *extends* `undefined` | `SmartContractAccountWithSigner`\<`string`, `TSigner`> - - `undefined` | `SmartContractAccountWithSigner`\<`string`, `TSigner`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `SmartAccountClient`\<`TTransport`, `TChain`, `TAccount`> - - The smart account client -
- `args` - - `GetAccountParameter`\<`TAccount`, `SmartContractAccount`\<`string`, keyof `EntryPointRegistryBase`\<`unknown`>>> - - The arguments required for the upgrade -
- -## Returns - -`Promise`\<`UpgradeToData` & `object`> - -A promise that resolves to upgrade data augmented with a function to create a Modular Account V2 diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getMSCAUpgradeToData.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getMSCAUpgradeToData.mdx deleted file mode 100644 index 30df639691..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getMSCAUpgradeToData.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: getMSCAUpgradeToData -description: Overview of the getMSCAUpgradeToData function -slug: wallets/reference/account-kit/smart-contracts/functions/getMSCAUpgradeToData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getMSCAUpgradeToData( - client, - args, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/utils.ts:107](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/utils.ts#L107) - -Retrieves the data necessary to upgrade to a Multi-Signature Contract Account (MSCA) and provides a method to create a Multi-Owner Modular Account. - -## Example - -```ts -import { createLightAccountClient, getMSCAUpgradeToData } from "@account-kit/smart-contracts"; - -const client = createLightAccountClient(...); -const upgradeData = await getMSCAUpgradeToData(client, {}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- `TAccount` *extends* `undefined` | `SmartContractAccountWithSigner`\<`string`, `TSigner`> - - `undefined` | `SmartContractAccountWithSigner`\<`string`, `TSigner`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `SmartAccountClient`\<`TTransport`, `TChain`, `TAccount`> - - The smart account client -
- `args` - - `GetMSCAUpgradeToData`\<`TSigner`, `TAccount`> - - The arguments required for the upgrade -
- -## Returns - -`Promise`\<`UpgradeToData` & `object`> - -A promise that resolves to upgrade data augmented with a function to create a Multi-Owner Modular Account diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/getSignerType.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/getSignerType.mdx deleted file mode 100644 index 811511d86e..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/getSignerType.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: getSignerType -description: Overview of the getSignerType function -slug: wallets/reference/account-kit/smart-contracts/functions/getSignerType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getSignerType(params): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/utils/getSignerType.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/utils/getSignerType.ts#L51) - -Determines the type of signer (Externally Owned Account (EOA) or CONTRACT) based on the provided client, signature, and signer. - -## Example - -```ts -import { getSignerType } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { createPublicClient, generatePrivateKey } from "viem"; - -const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); -const client = createPublicClient(...); -const signature = signer.signMessage("Hello World"); - -const signerType = await getSignerType({ client, signature, signer }); // EOA -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `GetSignerTypeParams`\<`TTransport`, `TChain`> - - the parameters including the client, signature, and signer -
- -## Returns - -`Promise`\<`SignerType`> - -A promise that resolves to the signer type, which is either "EOA" or "CONTRACT" diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/installPlugin.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/installPlugin.mdx deleted file mode 100644 index eb923d5517..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/installPlugin.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -title: installPlugin -description: Overview of the installPlugin function -slug: wallets/reference/account-kit/smart-contracts/functions/installPlugin -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function installPlugin( - client, - params, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts#L65) - -Installs a plugin on a smart account via the client, sending the user operation with the appropriate parameters. -NOTE: it's recommended to just use the installPlugin action returned from generated plugins - -## Example - -```ts -import { installPlugin, createModularAccountAlchemyClient } from "@account-kit/smart-contracts"; - -const client = createModularAccountAlchemyClient(...); - -const hash = await installPlugin(client, { - pluginAddress: "0x...", - manifestHash: "0x...", - dependencies: [], // this is defined by the plugin you're installing -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `undefined` | `SmartContractAccount` - - `undefined` | `SmartContractAccount` -
- `TContext` *extends* `undefined` | `Record`\<`string`, `unknown`> - - `undefined` | `Record`\<`string`, `unknown`> -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client configured to the smart account on which the plugin will be installed -
- `params` - - [`InstallPluginParams`](../type-aliases/InstallPluginParams)\<`TAccount`, `TContext`> - - The parameters required to install the plugin, including overrides, context, and account information -
- -## Returns - -`Promise`\<`any`> - -A promise that resolves once the plugin installation operation is sent diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/isDeferredAction.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/isDeferredAction.mdx deleted file mode 100644 index 7f4f709e06..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/isDeferredAction.mdx +++ /dev/null @@ -1,314 +0,0 @@ ---- -title: isDeferredAction -description: Overview of the isDeferredAction function -slug: wallets/reference/account-kit/smart-contracts/functions/isDeferredAction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isDeferredAction( - typedDataDefinition, - accountAddress, -): boolean; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:356](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L356) - -Type guard to check if a TypedDataDefinition is a deferred action. - -A deferred action has: - -- primaryType: "DeferredAction" -- domain.verifyingContract matching the account address - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `typedData` *extends* - | \{ - \[`key`: `string`]: readonly [`TypedDataParameter`](https://abitype.dev)\[]; - \[`key`: `` `string[${string}]` ``]: `undefined`; - \[`key`: `` `function[${string}]` ``]: `undefined`; - \[`key`: `` `address[${string}]` ``]: `undefined`; - \[`key`: `` `bool[${string}]` ``]: `undefined`; - \[`key`: `` `bytes[${string}]` ``]: `undefined`; - \[`key`: `` `bytes1[${string}]` ``]: `undefined`; - \[`key`: `` `bytes2[${string}]` ``]: `undefined`; - \[`key`: `` `bytes3[${string}]` ``]: `undefined`; - \[`key`: `` `bytes4[${string}]` ``]: `undefined`; - \[`key`: `` `bytes5[${string}]` ``]: `undefined`; - \[`key`: `` `bytes6[${string}]` ``]: `undefined`; - \[`key`: `` `bytes7[${string}]` ``]: `undefined`; - \[`key`: `` `bytes8[${string}]` ``]: `undefined`; - \[`key`: `` `bytes9[${string}]` ``]: `undefined`; - \[`key`: `` `bytes10[${string}]` ``]: `undefined`; - \[`key`: `` `bytes11[${string}]` ``]: `undefined`; - \[`key`: `` `bytes12[${string}]` ``]: `undefined`; - \[`key`: `` `bytes13[${string}]` ``]: `undefined`; - \[`key`: `` `bytes14[${string}]` ``]: `undefined`; - \[`key`: `` `bytes15[${string}]` ``]: `undefined`; - \[`key`: `` `bytes16[${string}]` ``]: `undefined`; - \[`key`: `` `bytes17[${string}]` ``]: `undefined`; - \[`key`: `` `bytes18[${string}]` ``]: `undefined`; - \[`key`: `` `bytes19[${string}]` ``]: `undefined`; - \[`key`: `` `bytes20[${string}]` ``]: `undefined`; - \[`key`: `` `bytes21[${string}]` ``]: `undefined`; - \[`key`: `` `bytes22[${string}]` ``]: `undefined`; - \[`key`: `` `bytes23[${string}]` ``]: `undefined`; - \[`key`: `` `bytes24[${string}]` ``]: `undefined`; - \[`key`: `` `bytes25[${string}]` ``]: `undefined`; - \[`key`: `` `bytes26[${string}]` ``]: `undefined`; - \[`key`: `` `bytes27[${string}]` ``]: `undefined`; - \[`key`: `` `bytes28[${string}]` ``]: `undefined`; - \[`key`: `` `bytes29[${string}]` ``]: `undefined`; - \[`key`: `` `bytes30[${string}]` ``]: `undefined`; - \[`key`: `` `bytes31[${string}]` ``]: `undefined`; - \[`key`: `` `bytes32[${string}]` ``]: `undefined`; - \[`key`: `` `int[${string}]` ``]: `undefined`; - \[`key`: `` `int8[${string}]` ``]: `undefined`; - \[`key`: `` `int16[${string}]` ``]: `undefined`; - \[`key`: `` `int24[${string}]` ``]: `undefined`; - \[`key`: `` `int32[${string}]` ``]: `undefined`; - \[`key`: `` `int40[${string}]` ``]: `undefined`; - \[`key`: `` `int48[${string}]` ``]: `undefined`; - \[`key`: `` `int56[${string}]` ``]: `undefined`; - \[`key`: `` `int64[${string}]` ``]: `undefined`; - \[`key`: `` `int72[${string}]` ``]: `undefined`; - \[`key`: `` `int80[${string}]` ``]: `undefined`; - \[`key`: `` `int88[${string}]` ``]: `undefined`; - \[`key`: `` `int96[${string}]` ``]: `undefined`; - \[`key`: `` `int104[${string}]` ``]: `undefined`; - \[`key`: `` `int112[${string}]` ``]: `undefined`; - \[`key`: `` `int120[${string}]` ``]: `undefined`; - \[`key`: `` `int128[${string}]` ``]: `undefined`; - \[`key`: `` `int136[${string}]` ``]: `undefined`; - \[`key`: `` `int144[${string}]` ``]: `undefined`; - \[`key`: `` `int152[${string}]` ``]: `undefined`; - \[`key`: `` `int160[${string}]` ``]: `undefined`; - \[`key`: `` `int168[${string}]` ``]: `undefined`; - \[`key`: `` `int176[${string}]` ``]: `undefined`; - \[`key`: `` `int184[${string}]` ``]: `undefined`; - \[`key`: `` `int192[${string}]` ``]: `undefined`; - \[`key`: `` `int200[${string}]` ``]: `undefined`; - \[`key`: `` `int208[${string}]` ``]: `undefined`; - \[`key`: `` `int216[${string}]` ``]: `undefined`; - \[`key`: `` `int224[${string}]` ``]: `undefined`; - \[`key`: `` `int232[${string}]` ``]: `undefined`; - \[`key`: `` `int240[${string}]` ``]: `undefined`; - \[`key`: `` `int248[${string}]` ``]: `undefined`; - \[`key`: `` `int256[${string}]` ``]: `undefined`; - \[`key`: `` `uint[${string}]` ``]: `undefined`; - \[`key`: `` `uint8[${string}]` ``]: `undefined`; - \[`key`: `` `uint16[${string}]` ``]: `undefined`; - \[`key`: `` `uint24[${string}]` ``]: `undefined`; - \[`key`: `` `uint32[${string}]` ``]: `undefined`; - \[`key`: `` `uint40[${string}]` ``]: `undefined`; - \[`key`: `` `uint48[${string}]` ``]: `undefined`; - \[`key`: `` `uint56[${string}]` ``]: `undefined`; - \[`key`: `` `uint64[${string}]` ``]: `undefined`; - \[`key`: `` `uint72[${string}]` ``]: `undefined`; - \[`key`: `` `uint80[${string}]` ``]: `undefined`; - \[`key`: `` `uint88[${string}]` ``]: `undefined`; - \[`key`: `` `uint96[${string}]` ``]: `undefined`; - \[`key`: `` `uint104[${string}]` ``]: `undefined`; - \[`key`: `` `uint112[${string}]` ``]: `undefined`; - \[`key`: `` `uint120[${string}]` ``]: `undefined`; - \[`key`: `` `uint128[${string}]` ``]: `undefined`; - \[`key`: `` `uint136[${string}]` ``]: `undefined`; - \[`key`: `` `uint144[${string}]` ``]: `undefined`; - \[`key`: `` `uint152[${string}]` ``]: `undefined`; - \[`key`: `` `uint160[${string}]` ``]: `undefined`; - \[`key`: `` `uint168[${string}]` ``]: `undefined`; - \[`key`: `` `uint176[${string}]` ``]: `undefined`; - \[`key`: `` `uint184[${string}]` ``]: `undefined`; - \[`key`: `` `uint192[${string}]` ``]: `undefined`; - \[`key`: `` `uint200[${string}]` ``]: `undefined`; - \[`key`: `` `uint208[${string}]` ``]: `undefined`; - \[`key`: `` `uint216[${string}]` ``]: `undefined`; - \[`key`: `` `uint224[${string}]` ``]: `undefined`; - \[`key`: `` `uint232[${string}]` ``]: `undefined`; - \[`key`: `` `uint240[${string}]` ``]: `undefined`; - \[`key`: `` `uint248[${string}]` ``]: `undefined`; - \[`key`: `` `uint256[${string}]` ``]: `undefined`; - `string?`: `undefined`; - `address?`: `undefined`; - `bool?`: `undefined`; - `bytes?`: `undefined`; - `bytes1?`: `undefined`; - `bytes2?`: `undefined`; - `bytes3?`: `undefined`; - `bytes4?`: `undefined`; - `bytes5?`: `undefined`; - `bytes6?`: `undefined`; - `bytes7?`: `undefined`; - `bytes8?`: `undefined`; - `bytes9?`: `undefined`; - `bytes10?`: `undefined`; - `bytes11?`: `undefined`; - `bytes12?`: `undefined`; - `bytes13?`: `undefined`; - `bytes14?`: `undefined`; - `bytes15?`: `undefined`; - `bytes16?`: `undefined`; - `bytes17?`: `undefined`; - `bytes18?`: `undefined`; - `bytes19?`: `undefined`; - `bytes20?`: `undefined`; - `bytes21?`: `undefined`; - `bytes22?`: `undefined`; - `bytes23?`: `undefined`; - `bytes24?`: `undefined`; - `bytes25?`: `undefined`; - `bytes26?`: `undefined`; - `bytes27?`: `undefined`; - `bytes28?`: `undefined`; - `bytes29?`: `undefined`; - `bytes30?`: `undefined`; - `bytes31?`: `undefined`; - `bytes32?`: `undefined`; - `int8?`: `undefined`; - `int16?`: `undefined`; - `int24?`: `undefined`; - `int32?`: `undefined`; - `int40?`: `undefined`; - `int48?`: `undefined`; - `int56?`: `undefined`; - `int64?`: `undefined`; - `int72?`: `undefined`; - `int80?`: `undefined`; - `int88?`: `undefined`; - `int96?`: `undefined`; - `int104?`: `undefined`; - `int112?`: `undefined`; - `int120?`: `undefined`; - `int128?`: `undefined`; - `int136?`: `undefined`; - `int144?`: `undefined`; - `int152?`: `undefined`; - `int160?`: `undefined`; - `int168?`: `undefined`; - `int176?`: `undefined`; - `int184?`: `undefined`; - `int192?`: `undefined`; - `int200?`: `undefined`; - `int208?`: `undefined`; - `int216?`: `undefined`; - `int224?`: `undefined`; - `int232?`: `undefined`; - `int240?`: `undefined`; - `int248?`: `undefined`; - `int256?`: `undefined`; - `uint8?`: `undefined`; - `uint16?`: `undefined`; - `uint24?`: `undefined`; - `uint32?`: `undefined`; - `uint40?`: `undefined`; - `uint48?`: `undefined`; - `uint56?`: `undefined`; - `uint64?`: `undefined`; - `uint72?`: `undefined`; - `uint80?`: `undefined`; - `uint88?`: `undefined`; - `uint96?`: `undefined`; - `uint104?`: `undefined`; - `uint112?`: `undefined`; - `uint120?`: `undefined`; - `uint128?`: `undefined`; - `uint136?`: `undefined`; - `uint144?`: `undefined`; - `uint152?`: `undefined`; - `uint160?`: `undefined`; - `uint168?`: `undefined`; - `uint176?`: `undefined`; - `uint184?`: `undefined`; - `uint192?`: `undefined`; - `uint200?`: `undefined`; - `uint208?`: `undefined`; - `uint216?`: `undefined`; - `uint224?`: `undefined`; - `uint232?`: `undefined`; - `uint240?`: `undefined`; - `uint248?`: `undefined`; - `uint256?`: `undefined`; - } - | `Record`\<`string`, `unknown`> - - ‐ -
- `primaryType` *extends* `string` | `number` | `symbol` - - keyof `typedData` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `typedDataDefinition` - - [`TypedDataDefinition`](https://viem.sh)\<`typedData`, `primaryType`> - - The typed data to check -
- `accountAddress` - - `` `0x${string}` `` - - Account address to verify against domain.verifyingContract -
- -## Returns - -`boolean` - -- True if the typedDataDefinition is a deferred action for this account diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/isModularAccountV2.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/isModularAccountV2.mdx deleted file mode 100644 index a20c62be5d..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/isModularAccountV2.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: isModularAccountV2 -description: Overview of the isModularAccountV2 function -slug: wallets/reference/account-kit/smart-contracts/functions/isModularAccountV2 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isModularAccountV2( - account, -): account is - | WebauthnModularAccountV2 - | ModularAccountV2>; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:430](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L430) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `account` - - `SmartContractAccount` -
- -## Returns - -account is WebauthnModularAccountV2 | ModularAccountV2\> diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/isMultisigModularAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/isMultisigModularAccount.mdx deleted file mode 100644 index ec26b7f66c..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/isMultisigModularAccount.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: isMultisigModularAccount -description: Overview of the isMultisigModularAccount function -slug: wallets/reference/account-kit/smart-contracts/functions/isMultisigModularAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function isMultisigModularAccount( - acct, -): acct is MultisigModularAccount>; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multisigAccount.ts:168](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multisigAccount.ts#L168) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `acct` - - `SmartContractAccount` -
- -## Returns - -`acct is MultisigModularAccount>` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/pack1271EOASignature.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/pack1271EOASignature.mdx deleted file mode 100644 index 63dff6f73b..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/pack1271EOASignature.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: pack1271EOASignature -description: Overview of the pack1271EOASignature function -slug: wallets/reference/account-kit/smart-contracts/functions/pack1271EOASignature -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function pack1271EOASignature(__namedParameters): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L65) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `__namedParameters` - - [`Pack1271SignatureParams`](../type-aliases/Pack1271SignatureParams) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/pack1271WebAuthnSignature.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/pack1271WebAuthnSignature.mdx deleted file mode 100644 index e17e4fc649..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/pack1271WebAuthnSignature.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: pack1271WebAuthnSignature -description: Overview of the pack1271WebAuthnSignature function -slug: wallets/reference/account-kit/smart-contracts/functions/pack1271WebAuthnSignature -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function pack1271WebAuthnSignature(__namedParameters): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:81](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L81) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `__namedParameters` - - [`Pack1271SignatureParams`](../type-aliases/Pack1271SignatureParams) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/packUOSignature.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/packUOSignature.mdx deleted file mode 100644 index b2b5aed039..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/packUOSignature.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: packUOSignature -description: Overview of the packUOSignature function -slug: wallets/reference/account-kit/smart-contracts/functions/packUOSignature -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function packUOSignature(__namedParameters): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:57](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L57) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `__namedParameters` - - [`PackUOSignatureParams`](../type-aliases/PackUOSignatureParams) -
- -## Returns - -`` `0x${string}` `` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/parseDeferredAction.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/parseDeferredAction.mdx deleted file mode 100644 index 7bb7c4d3dc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/parseDeferredAction.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: parseDeferredAction -description: Overview of the parseDeferredAction function -slug: wallets/reference/account-kit/smart-contracts/functions/parseDeferredAction -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function parseDeferredAction(deferredAction): object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:293](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L293) - -## Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `deferredAction` - - `` `0x${string}` `` -
- -## Returns - -`object` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `deferredActionData` - - `` `0x${string}` `` -
- `entityId` - - `number` -
- `hasAssociatedExecHooks` - - `boolean` -
- `isGlobalValidation` - - `boolean` -
- `nonce` - - `bigint` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/pluginManagerActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/pluginManagerActions.mdx deleted file mode 100644 index 2295959111..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/pluginManagerActions.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: pluginManagerActions -description: Overview of the pluginManagerActions function -slug: wallets/reference/account-kit/smart-contracts/functions/pluginManagerActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function pluginManagerActions( - client, -): PluginManagerActions; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugin-manager/decorator.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugin-manager/decorator.ts#L46) - -Provides actions for managing plugins on a given client, including installing and uninstalling plugins. -NOTE: this is provided by default when using a modular account client - -## Example - -```ts -import { pluginManagerActions } from "@account-kit/smart-contracts"; -import { createSmartAccountClient } from "@aa-sdk/core"; - -const client = createSmartAccountClient(...).extend(pluginManagerActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TAccount` *extends* `undefined` | `SmartContractAccount` - - `undefined` | `SmartContractAccount` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client instance on which to manage plugins -
- -## Returns - -[`PluginManagerActions`](../type-aliases/PluginManagerActions)\<`TAccount`> - -An object containing functions to install and uninstall plugins diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/predictLightAccountAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/predictLightAccountAddress.mdx deleted file mode 100644 index f515a700b7..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/predictLightAccountAddress.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: predictLightAccountAddress -description: Overview of the predictLightAccountAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/predictLightAccountAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function predictLightAccountAddress(params): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/predictAddress.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/predictAddress.ts#L29) - -Predicts the address of a light account based on provided parameters such as factory address, salt, owner address, and version. - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `PredictLightAccountAddressParams` - - The parameters required to predict the light account address, including factory address, salt, owner address, and version -
- -## Returns - -`` `0x${string}` `` - -The predicted address of the light account calculated based on the provided parameters diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/predictModularAccountV2Address.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/predictModularAccountV2Address.mdx deleted file mode 100644 index 86a1e50f02..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/predictModularAccountV2Address.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: predictModularAccountV2Address -description: Overview of the predictModularAccountV2Address function -slug: wallets/reference/account-kit/smart-contracts/functions/predictModularAccountV2Address -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function predictModularAccountV2Address(params): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/predictAddress.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/predictAddress.ts#L51) - -Predicts the address of a modular account V2 based on the provided parameters, which include factory address, salt, and implementation address. This function supports different types of accounts including "SMA", "MA", and "WebAuthn". - -## Example - -```ts -import { predictModularAccountV2Address } from "@account-kit/smart-contracts"; - -const accountAddress = predictModularAccountV2Address({ - factoryAddress: "0xFactoryAddress" as Address, - implementationAddress: "0xImplementation" as Address, - salt: 0n, - type: "SMA", - ownerAddress: "0xOwner" as Address, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `PredictModularAccountV2AddressParams` - - The parameters for predicting the modular account address, including `factoryAddress`, `salt`, `implementationAddress`, and additional properties based on the account type. -
- -## Returns - -`` `0x${string}` `` - -The predicted address for the modular account V2. diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/predictMultiOwnerLightAccountAddress.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/predictMultiOwnerLightAccountAddress.mdx deleted file mode 100644 index 4f960faeb4..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/predictMultiOwnerLightAccountAddress.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: predictMultiOwnerLightAccountAddress -description: Overview of the predictMultiOwnerLightAccountAddress function -slug: wallets/reference/account-kit/smart-contracts/functions/predictMultiOwnerLightAccountAddress -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function predictMultiOwnerLightAccountAddress(params): `0x${string}`; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/predictAddress.ts:117](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/predictAddress.ts#L117) - -Predicts the address of a **Multi-Owner Light Account** given the factory, salt -and the set of owner addresses. - -Internally replicates the CREATE2 calculation performed by the factory so -you can obtain the counter-factual account address before deployment (useful -for funding or displaying to users). - -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - `PredictMultiOwnerLightAccountAddressParams` - - Object containing: - – `factoryAddress` Factory contract that will deploy the account. - – `salt` Arbitrary salt used when calling the factory. - – `ownerAddresses` Array of owner EOAs (must be deduped & sorted). -
- -## Returns - -`` `0x${string}` `` - -Predicted account address for the multi-owner light account. diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/splitAggregatedSignature.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/splitAggregatedSignature.mdx deleted file mode 100644 index b56e570531..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/splitAggregatedSignature.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: splitAggregatedSignature -description: Overview of the splitAggregatedSignature function -slug: wallets/reference/account-kit/smart-contracts/functions/splitAggregatedSignature -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function splitAggregatedSignature( - args, -): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/utils/splitAggregatedSignature.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/utils/splitAggregatedSignature.ts#L41) - -Takes an aggregated signature and threshold and splits it into its components - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `SmartContractAccount` - - `undefined` | `SmartContractAccount` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `args` - - `SplitAggregateSignatureParams`\<`TAccount`> - - the arguments for the split -
- -## Returns - -`Promise`\<`SplitAggregateSignatureResult`> - -the signature split into its upper limits and current signatures diff --git a/docs/pages/reference/account-kit/smart-contracts/src/functions/transferLightAccountOwnership.mdx b/docs/pages/reference/account-kit/smart-contracts/src/functions/transferLightAccountOwnership.mdx deleted file mode 100644 index e92bb426d3..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/functions/transferLightAccountOwnership.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: transferLightAccountOwnership -description: Overview of the transferLightAccountOwnership function -slug: wallets/reference/account-kit/smart-contracts/functions/transferLightAccountOwnership -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function transferLightAccountOwnership( - client, - args, -): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/actions/transferOwnership.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/actions/transferOwnership.ts#L51) - -Transfers the ownership of a light account to a new owner. -This function ensures that the client is a compatible smart acccount client and that a Light Account is provided. -If the waitForTxn parameter is true, it will wait for the transaction to be completed before returning. - -## Example - -```ts -import { - transferOwnership, - createLightAccountClient, -} from "@account-kit/smart-contracts"; - -const lightAccountClient = createLightAccountClient({ - signer, - transport, - chain, -}); - -const txHash = await transferOwnership(lightAccountClient, { - newOwner: newOwnerSigner, - waitForTxn: true, // set to false to return a uoHash instead -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* `undefined` | [`Chain`](https://viem.sh) - - `undefined` | [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner`\<`any`> - - `SmartAccountSigner`\<`any`> -
- `TAccount` *extends* `any` - - `any` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The smart account client instance used to execute the transfer -
- `args` - - `TransferLightAccountOwnershipParams`\<`TSigner`, `TAccount`> - - The parameters for transferring ownership -
- -## Returns - -`Promise`\<`` `0x${string}` ``> - -The transaction or UO hash as a Hex string diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AccountLoupeActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AccountLoupeActions.mdx deleted file mode 100644 index 4d13c68098..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AccountLoupeActions.mdx +++ /dev/null @@ -1,190 +0,0 @@ ---- -title: AccountLoupeActions -description: Overview of AccountLoupeActions -slug: wallets/reference/account-kit/smart-contracts/type-aliases/AccountLoupeActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AccountLoupeActions = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/decorator.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts#L17) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- -## Methods - -### getExecutionFunctionConfig() - -```ts -getExecutionFunctionConfig(args): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/decorator.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts#L26) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `object` & `GetAccountParameter`\<`TAccount`> -
- -#### Returns - -`Promise`\<[`ExecutionFunctionConfig`](ExecutionFunctionConfig)> - ---- - -### getExecutionHooks() - -```ts -getExecutionHooks(args): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/decorator.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts#L33) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `object` & `GetAccountParameter`\<`TAccount`> -
- -#### Returns - -`Promise`\ - ---- - -### getInstalledPlugins() - -```ts -getInstalledPlugins(args): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/decorator.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts#L49) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `GetAccountParameter`\<`TAccount`> -
- -#### Returns - -`Promise`\ - ---- - -### getPreValidationHooks() - -```ts -getPreValidationHooks(args): Promise; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/decorator.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts#L43) - -#### Parameters - - - - - - - - - - - - - - - - - -
ParameterType
- `args` - - `object` & `GetAccountParameter`\<`TAccount`> -
- -#### Returns - -`Promise`\ diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyLightAccountClientConfig.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyLightAccountClientConfig.mdx deleted file mode 100644 index 16e2d3d5ea..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyLightAccountClientConfig.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: AlchemyLightAccountClientConfig -description: Overview of AlchemyLightAccountClientConfig -slug: wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyLightAccountClientConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyLightAccountClientConfig = Omit< - CreateLightAccountParams, - "transport" -> & - Omit< - AlchemySmartAccountClientConfig>, - "account" - >; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/alchemyClient.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/alchemyClient.ts#L14) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyModularAccountClientConfig.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyModularAccountClientConfig.mdx deleted file mode 100644 index 654a7d0ff1..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyModularAccountClientConfig.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: AlchemyModularAccountClientConfig -description: Overview of AlchemyModularAccountClientConfig -slug: wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyModularAccountClientConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyModularAccountClientConfig = Omit< - CreateMultiOwnerModularAccountParams, - "transport" -> & - Omit< - AlchemySmartAccountClientConfig>, - "account" - >; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/alchemyClient.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/alchemyClient.ts#L17) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultiOwnerLightAccountClientConfig.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultiOwnerLightAccountClientConfig.mdx deleted file mode 100644 index 7cc7fe13ac..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultiOwnerLightAccountClientConfig.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: AlchemyMultiOwnerLightAccountClientConfig -description: Overview of AlchemyMultiOwnerLightAccountClientConfig -slug: wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyMultiOwnerLightAccountClientConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyMultiOwnerLightAccountClientConfig = Omit< - CreateMultiOwnerLightAccountParams, - "transport" | "type" -> & - Omit< - AlchemySmartAccountClientConfig>, - "account" - >; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/clients/multiOwnerAlchemyClient.ts#L14) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultisigAccountClientConfig.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultisigAccountClientConfig.mdx deleted file mode 100644 index 344cacbf19..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/AlchemyMultisigAccountClientConfig.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: AlchemyMultisigAccountClientConfig -description: Overview of AlchemyMultisigAccountClientConfig -slug: wallets/reference/account-kit/smart-contracts/type-aliases/AlchemyMultisigAccountClientConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type AlchemyMultisigAccountClientConfig = Omit< - CreateMultisigModularAccountParams, - "transport" -> & - Omit< - AlchemySmartAccountClientConfig< - Chain, - LightAccount, - MultisigUserOperationContext - >, - "account" - > & - object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/client/multiSigAlchemyClient.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/client/multiSigAlchemyClient.ts#L21) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `transport` - - `AlchemyTransport` -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildDeferredActionDigestParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildDeferredActionDigestParams.mdx deleted file mode 100644 index 232c7762ed..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildDeferredActionDigestParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: BuildDeferredActionDigestParams -description: Overview of BuildDeferredActionDigestParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/BuildDeferredActionDigestParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type BuildDeferredActionDigestParams = object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:312](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L312) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `fullPreSignatureDeferredActionDigest` - - [`Hex`](https://viem.sh) -
- `sig` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractAccessEntry.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractAccessEntry.mdx deleted file mode 100644 index 18f26dec0d..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractAccessEntry.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: ContractAccessEntry -description: Overview of ContractAccessEntry -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ContractAccessEntry -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ContractAccessEntry = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L10) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `checkSelectors` - - `boolean` -
- `contractAddress` - - [`Address`](https://abitype.dev) -
- `isOnList` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractMethodEntry.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractMethodEntry.mdx deleted file mode 100644 index aab45fd53e..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ContractMethodEntry.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: ContractMethodEntry -description: Overview of ContractMethodEntry -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ContractMethodEntry -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ContractMethodEntry = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L19) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `contractAddress` - - [`Address`](https://abitype.dev) -
- `isOnList` - - `boolean` -
- `methodSelector` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateLightAccountParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateLightAccountParams.mdx deleted file mode 100644 index 2c2f33e16f..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateLightAccountParams.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: CreateLightAccountParams -description: Overview of CreateLightAccountParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateLightAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateLightAccountParams = Omit< - CreateLightAccountBaseParams< - "LightAccount", - TLightAccountVersion, - TTransport, - TSigner - >, - | "getAccountInitCode" - | "entryPoint" - | "version" - | "abi" - | "accountAddress" - | "type" -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/account.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/account.ts#L45) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accountAddress?` - - [`Address`](https://abitype.dev) -
- `entryPoint?` - - `EntryPointDef`\<[`LightAccountEntryPointVersion`](LightAccountEntryPointVersion)\<`"LightAccount"`, `TLightAccountVersion`>, [`Chain`](https://viem.sh)> -
- `factoryAddress?` - - [`Address`](https://abitype.dev) -
- `initCode?` - - [`Hex`](https://viem.sh) -
- `salt?` - - `bigint` -
- `version?` - - `TLightAccountVersion` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> - - [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseParams.mdx deleted file mode 100644 index 1831793ec9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseParams.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: CreateMAV2BaseParams -description: Overview of CreateMAV2BaseParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateMAV2BaseParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateMAV2BaseParams = Omit< - ToSmartContractAccountParams<"ModularAccountV2", TTransport, Chain, "0.7.0">, - | "encodeExecute" - | "encodeBatchExecute" - | "getNonce" - | "signMessage" - | "signTypedData" - | "getDummySignature" - | "prepareSign" - | "formatSign" -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:93](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L93) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accountAddress` - - [`Address`](https://abitype.dev) -
- `deferredAction?` - - [`Hex`](https://viem.sh) -
- `signer` - - `TSigner` -
- `signerEntity?` - - [`SignerEntity`](SignerEntity) -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` | `undefined` - - `SmartAccountSigner` | `undefined` -
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseReturnType.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseReturnType.mdx deleted file mode 100644 index 4e1a94eabc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMAV2BaseReturnType.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: CreateMAV2BaseReturnType -description: Overview of CreateMAV2BaseReturnType -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateMAV2BaseReturnType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateMAV2BaseReturnType = Promise>; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:125](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L125) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2AlchemyClientParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2AlchemyClientParams.mdx deleted file mode 100644 index 23a1d129cf..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2AlchemyClientParams.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: CreateModularAccountV2AlchemyClientParams -description: Overview of CreateModularAccountV2AlchemyClientParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateModularAccountV2AlchemyClientParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateModularAccountV2AlchemyClientParams = - Omit< - CreateModularAccountV2ClientParams, - "transport" - > & - Omit< - AlchemySmartAccountClientConfig>, - "account" - > & - object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L73) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `dummyPaymasterAndData?` - - `never` -
- `paymasterAndData?` - - `never` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2ClientParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2ClientParams.mdx deleted file mode 100644 index 30c4e6b920..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2ClientParams.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: CreateModularAccountV2ClientParams -description: Overview of CreateModularAccountV2ClientParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateModularAccountV2ClientParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateModularAccountV2ClientParams = - CreateModularAccountV2Params & - Omit< - TTransport extends AlchemyTransport - ? AlchemySmartAccountClientConfig - : SmartAccountClientConfig, - "transport" | "account" | "chain" - >; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L46) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) | `AlchemyTransport` - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2Params.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2Params.mdx deleted file mode 100644 index 8a87c697c1..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateModularAccountV2Params.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: CreateModularAccountV2Params -description: Overview of CreateModularAccountV2Params -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateModularAccountV2Params -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateModularAccountV2Params = Pick, "transport" | "chain" | "accountAddress"> & object & - | { - factoryAddress?: Address; - implementationAddress?: Address; - initCode?: Hex; - mode?: "default"; - salt?: bigint; -} - | { - mode: "7702"; -}; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts#L44) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerLightAccountParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerLightAccountParams.mdx deleted file mode 100644 index 3c5575f8fc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerLightAccountParams.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: CreateMultiOwnerLightAccountParams -description: Overview of CreateMultiOwnerLightAccountParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateMultiOwnerLightAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateMultiOwnerLightAccountParams< - TTransport, - TSigner, - TLightAccountVersion, -> = Omit< - CreateLightAccountBaseParams< - "MultiOwnerLightAccount", - TLightAccountVersion, - TTransport, - TSigner - >, - | "getAccountInitCode" - | "entryPoint" - | "version" - | "abi" - | "accountAddress" - | "type" -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts#L49) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accountAddress?` - - [`Address`](https://abitype.dev) -
- `entryPoint?` - - `EntryPointDef`\<[`LightAccountEntryPointVersion`](LightAccountEntryPointVersion)\<`"MultiOwnerLightAccount"`, `TLightAccountVersion`>, [`Chain`](https://viem.sh)> -
- `factoryAddress?` - - [`Address`](https://abitype.dev) -
- `initCode?` - - [`Hex`](https://viem.sh) -
- `owners?` - - [`Address`](https://abitype.dev)\[] -
- `salt?` - - `bigint` -
- `version?` - - `TLightAccountVersion` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`"MultiOwnerLightAccount"`> - - [`LightAccountVersion`](LightAccountVersion)\<`"MultiOwnerLightAccount"`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerModularAccountParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerModularAccountParams.mdx deleted file mode 100644 index b72b69a9d1..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultiOwnerModularAccountParams.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: CreateMultiOwnerModularAccountParams -description: Overview of CreateMultiOwnerModularAccountParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateMultiOwnerModularAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateMultiOwnerModularAccountParams< - TTransport, - TSigner, - TEntryPointVersion, -> = Pick< - ToSmartContractAccountParams< - "MultiOwnerModularAccount", - TTransport, - Chain, - TEntryPointVersion - >, - "transport" | "chain" -> & - object & - EntryPointParameter; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts:35](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts#L35) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accountAddress?` - - [`Address`](https://abitype.dev) -
- `factoryAddress?` - - [`Address`](https://abitype.dev) -
- `initCode?` - - [`Hex`](https://viem.sh) -
- `owners?` - - [`Address`](https://abitype.dev)\[] -
- `salt?` - - `bigint` -
- `signer` - - `TSigner` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TEntryPointVersion` *extends* `"0.6.0"` - - `"0.6.0"` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultisigModularAccountParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultisigModularAccountParams.mdx deleted file mode 100644 index c1da6a580d..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateMultisigModularAccountParams.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: CreateMultisigModularAccountParams -description: Overview of CreateMultisigModularAccountParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateMultisigModularAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateMultisigModularAccountParams< - TTransport, - TSigner, - TEntryPointVersion, -> = Pick< - ToSmartContractAccountParams< - "MultisigModularAccount", - TTransport, - Chain, - TEntryPointVersion - >, - "transport" | "chain" -> & - object & - EntryPointParameter; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multisigAccount.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multisigAccount.ts#L38) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `accountAddress?` - - [`Address`](https://abitype.dev) -
- `factoryAddress?` - - [`Address`](https://abitype.dev) -
- `initCode?` - - [`Hex`](https://viem.sh) -
- `owners?` - - [`Address`](https://abitype.dev)\[] -
- `salt?` - - `bigint` -
- `signer` - - `TSigner` -
- `threshold` - - `bigint` -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TEntryPointVersion` *extends* `"0.6.0"` - - `"0.6.0"` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnMAV2BaseParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnMAV2BaseParams.mdx deleted file mode 100644 index b96311751e..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnMAV2BaseParams.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: CreateWebauthnMAV2BaseParams -description: Overview of CreateWebauthnMAV2BaseParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateWebauthnMAV2BaseParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateWebauthnMAV2BaseParams = Omit & - object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:116](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L116) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `credential` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"credential"`] -
- `getFn?` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"getFn"`] -
- `rpId?` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"rpId"`] -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2ClientParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2ClientParams.mdx deleted file mode 100644 index 9a781a0e0a..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2ClientParams.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: CreateWebauthnModularAccountV2ClientParams -description: Overview of CreateWebauthnModularAccountV2ClientParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateWebauthnModularAccountV2ClientParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateWebauthnModularAccountV2ClientParams = - CreateWebauthnModularAccountV2Params & - Omit< - TTransport extends AlchemyTransport - ? AlchemySmartAccountClientConfig - : SmartAccountClientConfig, - "transport" | "account" | "chain" - > & - object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:58](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L58) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `credential` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"credential"`] -
- `getFn?` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"getFn"`] -
- `rpId?` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"rpId"`] -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) | `AlchemyTransport` - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2Params.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2Params.mdx deleted file mode 100644 index debd1783dc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/CreateWebauthnModularAccountV2Params.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: CreateWebauthnModularAccountV2Params -description: Overview of CreateWebauthnModularAccountV2Params -slug: wallets/reference/account-kit/smart-contracts/type-aliases/CreateWebauthnModularAccountV2Params -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type CreateWebauthnModularAccountV2Params = Pick< - ToSmartContractAccountParams<"ModularAccountV2", TTransport, Chain, "0.7.0">, - "transport" | "chain" | "accountAddress" -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts:69](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/modularAccountV2.ts#L69) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `credential` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"credential"`] -
- `deferredAction?` - - [`Hex`](https://viem.sh) -
- `entryPoint?` - - `EntryPointDef`\<`"0.7.0"`, [`Chain`](https://viem.sh)> -
- `factoryAddress?` - - [`Address`](https://abitype.dev) -
- `getFn?` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"getFn"`] -
- `initCode?` - - [`Hex`](https://viem.sh) -
- `mode` - - `"webauthn"` -
- `rpId?` - - [`ToWebAuthnAccountParameters`](https://viem.sh)\[`"rpId"`] -
- `salt?` - - `bigint` -
- `signerEntity?` - - [`SignerEntity`](SignerEntity) -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Erc20TokenLimit.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Erc20TokenLimit.mdx deleted file mode 100644 index 579c0a0cd9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Erc20TokenLimit.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Erc20TokenLimit -description: Overview of Erc20TokenLimit -slug: wallets/reference/account-kit/smart-contracts/type-aliases/Erc20TokenLimit -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Erc20TokenLimit = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L40) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `refreshInterval?` - - `number` -
- `spendLimit` - - `bigint` -
- `tokenAddress` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionDataView.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionDataView.mdx deleted file mode 100644 index e9739696a9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionDataView.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: ExecutionDataView -description: Overview of ExecutionDataView -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ExecutionDataView -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExecutionDataView = object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L45) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `allowGlobalValidation` - - `boolean` -
- `executionHooks` - - readonly [`Hex`](https://viem.sh)\[] -
- `module` - - [`Address`](https://abitype.dev) -
- `skipRuntimeValidation` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionFunctionConfig.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionFunctionConfig.mdx deleted file mode 100644 index aa295109c1..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionFunctionConfig.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: ExecutionFunctionConfig -description: Overview of ExecutionFunctionConfig -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ExecutionFunctionConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExecutionFunctionConfig = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/types.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/types.ts#L8) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `plugin` - - [`Address`](https://abitype.dev) -
- `runtimeValidationFunction` - - [`FunctionReference`](FunctionReference) -
- `userOpValidationFunction` - - [`FunctionReference`](FunctionReference) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionHooks.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionHooks.mdx deleted file mode 100644 index e3111374f0..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ExecutionHooks.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: ExecutionHooks -description: Overview of ExecutionHooks -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ExecutionHooks -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ExecutionHooks = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/types.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/types.ts#L14) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `postExecHook` - - [`FunctionReference`](FunctionReference) -
- `preExecHook` - - [`FunctionReference`](FunctionReference) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionId.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionId.mdx deleted file mode 100644 index a14bc3e3c9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionId.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: FunctionId -description: Overview of FunctionId -slug: wallets/reference/account-kit/smart-contracts/type-aliases/FunctionId -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type FunctionId = Hex; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/types.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/types.ts#L3) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionReference.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionReference.mdx deleted file mode 100644 index 3a3dfcda7f..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/FunctionReference.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: FunctionReference -description: Overview of FunctionReference -slug: wallets/reference/account-kit/smart-contracts/type-aliases/FunctionReference -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type FunctionReference = Hex; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/types.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/types.ts#L6) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GasSpendLimit.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GasSpendLimit.mdx deleted file mode 100644 index 5620e45dbd..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GasSpendLimit.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: GasSpendLimit -description: Overview of GasSpendLimit -slug: wallets/reference/account-kit/smart-contracts/type-aliases/GasSpendLimit -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GasSpendLimit = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L49) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `refreshInterval?` - - `number` -
- `spendLimit` - - `bigint` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetLightAccountType.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetLightAccountType.mdx deleted file mode 100644 index 2f76db37f2..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetLightAccountType.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: GetLightAccountType -description: Overview of GetLightAccountType -slug: wallets/reference/account-kit/smart-contracts/type-aliases/GetLightAccountType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetLightAccountType = TAccount["source"] extends LightAccountType - ? TAccount["source"] - : never; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/types.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/types.ts#L45) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` *extends* `LightAccountBase` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetMAV2UpgradeToData.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetMAV2UpgradeToData.mdx deleted file mode 100644 index d201514128..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetMAV2UpgradeToData.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: GetMAV2UpgradeToData -description: Overview of GetMAV2UpgradeToData -slug: wallets/reference/account-kit/smart-contracts/type-aliases/GetMAV2UpgradeToData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetMAV2UpgradeToData = GetAccountParameter; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:187](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L187) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TAccount` *extends* `SmartContractAccountWithSigner`\<`string`, `TSigner`> | `undefined` - - `SmartContractAccountWithSigner`\<`string`, `TSigner`> | `undefined` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetPluginAddressParameter.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetPluginAddressParameter.mdx deleted file mode 100644 index 2540ab61cb..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/GetPluginAddressParameter.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: GetPluginAddressParameter -description: Overview of GetPluginAddressParameter -slug: wallets/reference/account-kit/smart-contracts/type-aliases/GetPluginAddressParameter -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetPluginAddressParameter = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/types.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/types.ts#L9) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `pluginAddress?` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultiOwnerPluginParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultiOwnerPluginParams.mdx deleted file mode 100644 index acfa7a3d7f..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultiOwnerPluginParams.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: InstallMultiOwnerPluginParams -description: Overview of InstallMultiOwnerPluginParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/InstallMultiOwnerPluginParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type InstallMultiOwnerPluginParams = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts:60](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts#L60) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `args` - - `Parameters`\<*typeof* [`encodeAbiParameters`](https://viem.sh)>\[`1`] -
- `dependencyOverrides?` - - `FunctionReference`\[] -
- `pluginAddress?` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultisigPluginParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultisigPluginParams.mdx deleted file mode 100644 index 7dcb47be01..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallMultisigPluginParams.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: InstallMultisigPluginParams -description: Overview of InstallMultisigPluginParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/InstallMultisigPluginParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type InstallMultisigPluginParams = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts:60](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts#L60) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `args` - - `Parameters`\<*typeof* [`encodeAbiParameters`](https://viem.sh)>\[`1`] -
- `dependencyOverrides?` - - `FunctionReference`\[] -
- `pluginAddress?` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallPluginParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallPluginParams.mdx deleted file mode 100644 index 1ef40a6d73..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallPluginParams.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: InstallPluginParams -description: Overview of InstallPluginParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/InstallPluginParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type InstallPluginParams = object & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugin-manager/installPlugin.ts#L26) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `dependencies?` - - [`FunctionReference`](FunctionReference)\[] -
- `manifestHash?` - - [`Hash`](https://viem.sh) -
- `pluginAddress` - - [`Address`](https://abitype.dev) -
- `pluginInitData?` - - [`Hash`](https://viem.sh) -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TContext` *extends* `Record`\<`string`, `unknown`> | `undefined` - - `Record`\<`string`, `unknown`> | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallSessionKeyPluginParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallSessionKeyPluginParams.mdx deleted file mode 100644 index 794e37e6aa..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/InstallSessionKeyPluginParams.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: InstallSessionKeyPluginParams -description: Overview of InstallSessionKeyPluginParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/InstallSessionKeyPluginParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type InstallSessionKeyPluginParams = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts:117](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts#L117) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `args` - - `Parameters`\<*typeof* [`encodeAbiParameters`](https://viem.sh)>\[`1`] -
- `dependencyOverrides?` - - `FunctionReference`\[] -
- `pluginAddress?` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccount.mdx deleted file mode 100644 index ba19e543d2..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccount.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: LightAccount -description: Overview of LightAccount -slug: wallets/reference/account-kit/smart-contracts/type-aliases/LightAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type LightAccount = LightAccountBase< - TSigner, - "LightAccount", - TLightAccountVersion -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/account.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/account.ts#L36) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `encodeTransferOwnership()` - - (`newOwner`) => [`Hex`](https://viem.sh) -
- `getOwnerAddress()` - - () => `Promise`\<[`Address`](https://abitype.dev)> -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> - - [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountClientActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountClientActions.mdx deleted file mode 100644 index 9e039fb4d3..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountClientActions.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: LightAccountClientActions -description: Overview of LightAccountClientActions -slug: wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type LightAccountClientActions = object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/decorators/lightAccount.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/decorators/lightAccount.ts#L9) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TAccount` *extends* `LightAccount`\<`TSigner`> | `undefined` - - `LightAccount`\<`TSigner`> | `undefined` -
- -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `transferOwnership` - - (`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountEntryPointVersion.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountEntryPointVersion.mdx deleted file mode 100644 index a4783cb3a3..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountEntryPointVersion.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: LightAccountEntryPointVersion -description: Overview of LightAccountEntryPointVersion -slug: wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountEntryPointVersion -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type LightAccountEntryPointVersion = - LightAccountVersionConfigs[TLightAccountType][TLightAccountVersion] extends LightAccountVersionConfig - ? LightAccountVersionConfigs[TLightAccountType][TLightAccountVersion]["entryPointVersion"] - : never; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/types.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/types.ts#L48) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TLightAccountType` *extends* [`LightAccountType`](LightAccountType) - - ‐ -
- `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`TLightAccountType`> - - [`LightAccountVersion`](LightAccountVersion)\<`TLightAccountType`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountType.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountType.mdx deleted file mode 100644 index 33bba4a4c9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountType.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: LightAccountType -description: "Light account types supported: LightAccount, MultiOwnerLightAccount" -slug: wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type LightAccountType = "LightAccount" | "MultiOwnerLightAccount"; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/types.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/types.ts#L9) - -Light account types supported: LightAccount, MultiOwnerLightAccount diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersion.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersion.mdx deleted file mode 100644 index 68dc9fb05b..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersion.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: LightAccountVersion -description: Overview of LightAccountVersion -slug: wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountVersion -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type LightAccountVersion = - keyof LightAccountVersionConfigs[TAccountType]; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/types.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/types.ts#L42) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccountType` *extends* [`LightAccountType`](LightAccountType) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfig.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfig.mdx deleted file mode 100644 index 489b1115db..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfig.mdx +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: LightAccountVersionConfig -description: Overview of LightAccountVersionConfig -slug: wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountVersionConfig -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type LightAccountVersionConfig = object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/types.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/types.ts#L11) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TEntryPointVersion` *extends* `EntryPointVersion` - - `EntryPointVersion` -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `addresses` - - `object` -
- `addresses.default` - - `object` -
- `addresses.default.factory` - - [`Address`](https://abitype.dev) -
- `addresses.default.impl` - - [`Address`](https://abitype.dev) -
- `addresses.overrides?` - - `Record`\<[`Chain`](https://viem.sh)\[`"id"`], \{ `factory`: [`Address`](https://abitype.dev); `impl`: [`Address`](https://abitype.dev); }> -
- `entryPointVersion` - - `TEntryPointVersion` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfigs.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfigs.mdx deleted file mode 100644 index 4dd3ae11f9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/LightAccountVersionConfigs.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: LightAccountVersionConfigs -description: Overview of LightAccountVersionConfigs -slug: wallets/reference/account-kit/smart-contracts/type-aliases/LightAccountVersionConfigs -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type LightAccountVersionConfigs = object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/types.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/types.ts#L30) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `LightAccount` - - `object` -
- `LightAccount.v1.0.1` - - [`LightAccountVersionConfig`](LightAccountVersionConfig)\<`"0.6.0"`> -
- `LightAccount.v1.0.2` - - [`LightAccountVersionConfig`](LightAccountVersionConfig)\<`"0.6.0"`> -
- `LightAccount.v1.1.0` - - [`LightAccountVersionConfig`](LightAccountVersionConfig)\<`"0.6.0"`> -
- `LightAccount.v2.0.0` - - [`LightAccountVersionConfig`](LightAccountVersionConfig)\<`"0.7.0"`> -
- `MultiOwnerLightAccount` - - `object` -
- `MultiOwnerLightAccount.v2.0.0` - - [`LightAccountVersionConfig`](LightAccountVersionConfig)\<`"0.7.0"`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2.mdx deleted file mode 100644 index 7e433a1195..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: ModularAccountV2 -description: Overview of ModularAccountV2 -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ModularAccountV2 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ModularAccountV2 = SmartContractAccountWithSigner< - "ModularAccountV2", - TSigner, - "0.7.0" -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:69](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L69) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `encodeCallData()` - - (`callData`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `getExecutionData()` - - (`selector`) => `Promise`\<[`ExecutionDataView`](ExecutionDataView)> -
- `getValidationData()` - - (`args`) => `Promise`\<[`ValidationDataView`](ValidationDataView)> -
- `signerEntity` - - [`SignerEntity`](SignerEntity) -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2Client.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2Client.mdx deleted file mode 100644 index 906ec26c3d..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountV2Client.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: ModularAccountV2Client -description: Overview of ModularAccountV2Client -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ModularAccountV2Client -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ModularAccountV2Client = - TTransport extends AlchemyTransport - ? AlchemySmartAccountClient> - : SmartAccountClient>; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L31) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TTransport` *extends* [`Transport`](https://viem.sh) | `AlchemyTransport` - - [`Transport`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountsV2.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountsV2.mdx deleted file mode 100644 index 137fc71693..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ModularAccountsV2.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ModularAccountsV2 -description: Overview of ModularAccountsV2 -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ModularAccountsV2 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ModularAccountsV2 = ModularAccountV2 | WebauthnModularAccountV2; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L38) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccount.mdx deleted file mode 100644 index c5b25286f4..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccount.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: MultiOwnerLightAccount -description: Overview of MultiOwnerLightAccount -slug: wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerLightAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MultiOwnerLightAccount = LightAccountBase< - TSigner, - "MultiOwnerLightAccount", - TLightAccountVersion -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/accounts/multiOwner.ts#L33) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `encodeUpdateOwners()` - - (`ownersToAdd`, `ownersToRemove`) => [`Hex`](https://viem.sh) -
- `getOwnerAddresses()` - - () => `Promise`\ -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`"MultiOwnerLightAccount"`> - - [`LightAccountVersion`](LightAccountVersion)\<`"MultiOwnerLightAccount"`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccountClientActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccountClientActions.mdx deleted file mode 100644 index 9b0b2e4cfd..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerLightAccountClientActions.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: MultiOwnerLightAccountClientActions -description: Overview of MultiOwnerLightAccountClientActions -slug: wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerLightAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MultiOwnerLightAccountClientActions = object; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/decorators/multiOwnerLightAccount.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/decorators/multiOwnerLightAccount.ts#L9) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TAccount` *extends* `MultiOwnerLightAccount`\<`TSigner`> | `undefined` - - `MultiOwnerLightAccount`\<`TSigner`> | `undefined` -
- -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `updateOwners` - - (`args`) => `Promise`\<[`Hex`](https://viem.sh)> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerModularAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerModularAccount.mdx deleted file mode 100644 index ccdd342912..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerModularAccount.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: MultiOwnerModularAccount -description: Overview of MultiOwnerModularAccount -slug: wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerModularAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MultiOwnerModularAccount = SmartContractAccountWithSigner< - "MultiOwnerModularAccount", - TSigner, - "0.6.0" ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multiOwnerAccount.ts#L27) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerPluginActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerPluginActions.mdx deleted file mode 100644 index bf65a06b82..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultiOwnerPluginActions.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: MultiOwnerPluginActions -description: Overview of MultiOwnerPluginActions -slug: wallets/reference/account-kit/smart-contracts/type-aliases/MultiOwnerPluginActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MultiOwnerPluginActions = MultiOwnerPluginActions_< - TAccount, - undefined -> & - object & - IsUndefined extends false - ? object - : object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multi-owner/extension.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multi-owner/extension.ts#L15) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `isOwnerOf()` - - (`params`) => `Promise`\<`boolean`> -
- `readOwners()` - - (`params`) => `Promise`\<`ReadonlyArray`\<[`Address`](https://abitype.dev)>> -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigModularAccount.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigModularAccount.mdx deleted file mode 100644 index 3e2303c291..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigModularAccount.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: MultisigModularAccount -description: Overview of MultisigModularAccount -slug: wallets/reference/account-kit/smart-contracts/type-aliases/MultisigModularAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MultisigModularAccount = SmartContractAccountWithSigner< - typeof MULTISIG_ACCOUNT_SOURCE, - TSigner, - "0.6.0" -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multisigAccount.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multisigAccount.ts#L28) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `getLocalThreshold()` - - () => `bigint` -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigPluginActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigPluginActions.mdx deleted file mode 100644 index 7fb1a4f6fa..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigPluginActions.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: MultisigPluginActions -description: Overview of MultisigPluginActions -slug: wallets/reference/account-kit/smart-contracts/type-aliases/MultisigPluginActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MultisigPluginActions = MultisigPluginActions_< - TAccount, - MultisigUserOperationContext -> & - object & - IsUndefined extends false - ? object - : object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/extension.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/extension.ts#L26) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `getThreshold()` - - (`params`) => `Promise`\<`bigint`> -
- `isOwnerOf()` - - (`params`) => `Promise`\<`boolean`> -
- `proposeUserOperation()` - - (`params`) => `Promise`\<[`ProposeUserOperationResult`](ProposeUserOperationResult)\<`TAccount`, `GetEntryPointFromAccount`\<`TAccount`>>> -
- `readOwners()` - - (`params`) => `Promise`\<`ReadonlyArray`\<[`Address`](https://abitype.dev)>> -
- `signMultisigUserOperation()` - - (`params`) => `Promise`\<[`SignMultisigUserOperationResult`](SignMultisigUserOperationResult)> -
- -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigUserOperationContext.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigUserOperationContext.mdx deleted file mode 100644 index 9b922d6f59..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/MultisigUserOperationContext.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: MultisigUserOperationContext -description: Overview of MultisigUserOperationContext -slug: wallets/reference/account-kit/smart-contracts/type-aliases/MultisigUserOperationContext -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type MultisigUserOperationContext = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/types.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts#L51) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `aggregatedSignature?` - - [`Hex`](https://viem.sh) -
- `signatures?` - - [`Signature`](Signature)\[] -
- `userOpSignatureType` - - | `Extract`\<[`UserOpSignatureType`](UserOpSignatureType), `"UPPERLIMIT"`> | `Extract`\<[`UserOpSignatureType`](UserOpSignatureType), `"ACTUAL"`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/NativeTokenLimit.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/NativeTokenLimit.mdx deleted file mode 100644 index 2eee9e56a8..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/NativeTokenLimit.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: NativeTokenLimit -description: Overview of NativeTokenLimit -slug: wallets/reference/account-kit/smart-contracts/type-aliases/NativeTokenLimit -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type NativeTokenLimit = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L33) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `refreshInterval?` - - `number` -
- `spendLimit` - - `bigint` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Pack1271SignatureParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Pack1271SignatureParams.mdx deleted file mode 100644 index dc720c8468..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Pack1271SignatureParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Pack1271SignatureParams -description: Overview of Pack1271SignatureParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/Pack1271SignatureParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Pack1271SignatureParams = object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L51) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `entityId` - - `number` -
- `validationSignature` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PackUOSignatureParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PackUOSignatureParams.mdx deleted file mode 100644 index f9fe540684..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PackUOSignatureParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: PackUOSignatureParams -description: Overview of PackUOSignatureParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/PackUOSignatureParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PackUOSignatureParams = object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L45) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `validationSignature` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Plugin.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Plugin.mdx deleted file mode 100644 index 661f58aa67..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Plugin.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Plugin -description: Overview of Plugin -slug: wallets/reference/account-kit/smart-contracts/type-aliases/Plugin -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Plugin = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/types.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/types.ts#L11) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAbi` *extends* [`Abi`](https://abitype.dev) - - [`Abi`](https://abitype.dev) -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `getContract` - - \<`C`>(`client`, `address?`) => [`GetContractReturnType`](https://viem.sh)\<`TAbi`, [`PublicClient`](https://viem.sh), [`Address`](https://abitype.dev)> -
- `meta` - - `object` -
- `meta.addresses` - - `Record`\<`number`, [`Address`](https://abitype.dev)> -
- `meta.name` - - `string` -
- `meta.version` - - `string` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PluginManagerActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PluginManagerActions.mdx deleted file mode 100644 index dbb48d0203..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PluginManagerActions.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: PluginManagerActions -description: Overview of PluginManagerActions -slug: wallets/reference/account-kit/smart-contracts/type-aliases/PluginManagerActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PluginManagerActions = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugin-manager/decorator.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugin-manager/decorator.ts#L16) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `installPlugin` - - (`params`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- `uninstallPlugin` - - (`params`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PreValidationHooks.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PreValidationHooks.mdx deleted file mode 100644 index e1495b89ae..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/PreValidationHooks.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: PreValidationHooks -description: Overview of PreValidationHooks -slug: wallets/reference/account-kit/smart-contracts/type-aliases/PreValidationHooks -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PreValidationHooks = [ - readonly FunctionReference[], - readonly FunctionReference[], -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/types.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/types.ts#L19) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ProposeUserOperationResult.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ProposeUserOperationResult.mdx deleted file mode 100644 index 31312425a9..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ProposeUserOperationResult.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: ProposeUserOperationResult -description: Overview of ProposeUserOperationResult -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ProposeUserOperationResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ProposeUserOperationResult = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/types.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts#L39) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
- -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `aggregatedSignature` - - [`Hex`](https://viem.sh) -
- `request` - - `UserOperationRequest`\<`TEntryPointVersion`> -
- `signatureObj` - - [`Signature`](Signature) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SessionKeyPluginActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SessionKeyPluginActions.mdx deleted file mode 100644 index 2ecb706c43..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SessionKeyPluginActions.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: SessionKeyPluginActions -description: Overview of SessionKeyPluginActions -slug: wallets/reference/account-kit/smart-contracts/type-aliases/SessionKeyPluginActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SessionKeyPluginActions = Omit< - SessionKeyPluginActions_, - | "removeSessionKey" - | "addSessionKey" - | "rotateSessionKey" - | "updateKeyPermissions" -> & - object & - IsUndefined extends false - ? object - : object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/extension.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/extension.ts#L23) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `addSessionKey()` - - (`args`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- `getAccountSessionKeys()` - - (`args`) => `Promise`\<`ReadonlyArray`\<[`Address`](https://abitype.dev)>> -
- `isAccountSessionKey()` - - (`args`) => `Promise`\<`boolean`> -
- `removeSessionKey()` - - (`args`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- `rotateSessionKey()` - - (`args`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- `updateSessionKeyPermissions()` - - (`args`) => `Promise`\<`SendUserOperationResult`\<`TEntryPointVersion`>> -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignMultisigUserOperationResult.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignMultisigUserOperationResult.mdx deleted file mode 100644 index bf23e9cd41..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignMultisigUserOperationResult.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: SignMultisigUserOperationResult -description: Overview of SignMultisigUserOperationResult -slug: wallets/reference/account-kit/smart-contracts/type-aliases/SignMultisigUserOperationResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignMultisigUserOperationResult = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/types.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts#L21) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `aggregatedSignature` - - [`Hex`](https://viem.sh) -
- `signature` - - [`Hex`](https://viem.sh) -
- `signatureObj` - - [`Signature`](Signature) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Signature.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Signature.mdx deleted file mode 100644 index dc685f7699..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/Signature.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: Signature -description: Overview of Signature -slug: wallets/reference/account-kit/smart-contracts/type-aliases/Signature -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type Signature = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/types.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts#L14) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `signature` - - `` `0x${string}` `` -
- `signer` - - `` `0x${string}` `` -
- `signerType` - - [`SignerType`](SignerType) -
- `userOpSigType` - - [`UserOpSignatureType`](UserOpSignatureType) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerEntity.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerEntity.mdx deleted file mode 100644 index d58f334750..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerEntity.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: SignerEntity -description: Overview of SignerEntity -slug: wallets/reference/account-kit/smart-contracts/type-aliases/SignerEntity -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerEntity = object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L40) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `entityId` - - `number` -
- `isGlobalValidation` - - `boolean` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerType.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerType.mdx deleted file mode 100644 index 4bd5324df3..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/SignerType.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignerType -description: Overview of SignerType -slug: wallets/reference/account-kit/smart-contracts/type-aliases/SignerType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignerType = "EOA" | "CONTRACT"; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/types.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts#L10) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/TimeRange.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/TimeRange.mdx deleted file mode 100644 index 3652e9cbcb..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/TimeRange.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: TimeRange -description: Overview of TimeRange -slug: wallets/reference/account-kit/smart-contracts/type-aliases/TimeRange -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type TimeRange = object; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/permissions.ts#L28) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `validFrom` - - `number` -
- `validUntil` - - `number` -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/UninstallPluginParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/UninstallPluginParams.mdx deleted file mode 100644 index 133608d4d8..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/UninstallPluginParams.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: UninstallPluginParams -description: Overview of UninstallPluginParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/UninstallPluginParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UninstallPluginParams = object & - UserOperationOverridesParameter & - GetAccountParameter & - GetContextParameter; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugin-manager/uninstallPlugin.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugin-manager/uninstallPlugin.ts#L22) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `config?` - - [`Hash`](https://viem.sh) -
- `pluginAddress` - - [`Address`](https://abitype.dev) -
- `pluginUninstallData?` - - [`Hash`](https://viem.sh) -
- -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- `TContext` *extends* `UserOperationContext` | `undefined` - - `UserOperationContext` | `undefined` -
- `TEntryPointVersion` *extends* `GetEntryPointFromAccount`\<`TAccount`> - - `GetEntryPointFromAccount`\<`TAccount`> -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/UserOpSignatureType.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/UserOpSignatureType.mdx deleted file mode 100644 index 0e74f92a94..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/UserOpSignatureType.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: UserOpSignatureType -description: Overview of UserOpSignatureType -slug: wallets/reference/account-kit/smart-contracts/type-aliases/UserOpSignatureType -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type UserOpSignatureType = "ACTUAL" | "UPPERLIMIT"; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/types.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/types.ts#L12) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataParams.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataParams.mdx deleted file mode 100644 index 9ad51e9c48..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataParams.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: ValidationDataParams -description: Overview of ValidationDataParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ValidationDataParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ValidationDataParams = - | { - entityId?: never; - validationModuleAddress: Address; - } - | { - entityId: number; - validationModuleAddress?: never; - }; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L59) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataView.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataView.mdx deleted file mode 100644 index af6afd265a..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/ValidationDataView.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: ValidationDataView -description: Overview of ValidationDataView -slug: wallets/reference/account-kit/smart-contracts/type-aliases/ValidationDataView -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ValidationDataView = object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:52](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L52) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `executionHooks` - - readonly [`Hex`](https://viem.sh)\[] -
- `selectors` - - readonly [`Hex`](https://viem.sh)\[] -
- `validationFlags` - - `number` -
- `validationHooks` - - readonly [`Hex`](https://viem.sh)\[] -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2.mdx deleted file mode 100644 index 2694ebbbfc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: WebauthnModularAccountV2 -description: Overview of WebauthnModularAccountV2 -slug: wallets/reference/account-kit/smart-contracts/type-aliases/WebauthnModularAccountV2 -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type WebauthnModularAccountV2 = SmartContractAccount< - "ModularAccountV2", - "0.7.0" -> & - object; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:80](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L80) - -## Type Declaration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameType
- `encodeCallData()` - - (`callData`) => `Promise`\<[`Hex`](https://viem.sh)> -
- `getExecutionData()` - - (`selector`) => `Promise`\<[`ExecutionDataView`](ExecutionDataView)> -
- `getValidationData()` - - (`args`) => `Promise`\<[`ValidationDataView`](ValidationDataView)> -
- `params` - - [`ToWebAuthnAccountParameters`](https://viem.sh) -
- `signerEntity` - - [`SignerEntity`](SignerEntity) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2Client.mdx b/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2Client.mdx deleted file mode 100644 index 6c9445295f..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/WebauthnModularAccountV2Client.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: WebauthnModularAccountV2Client -description: Overview of WebauthnModularAccountV2Client -slug: wallets/reference/account-kit/smart-contracts/type-aliases/WebauthnModularAccountV2Client -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type WebauthnModularAccountV2Client = - TTransport extends AlchemyTransport - ? AlchemySmartAccountClient - : SmartAccountClient; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/client/client.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/client/client.ts#L39) - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TChain` *extends* [`Chain`](https://viem.sh) - - [`Chain`](https://viem.sh) -
- `TTransport` *extends* [`Transport`](https://viem.sh) | `AlchemyTransport` - - [`Transport`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/AccountVersionRegistry.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/AccountVersionRegistry.mdx deleted file mode 100644 index 3e6b530578..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/AccountVersionRegistry.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: AccountVersionRegistry -description: Account version registry interface that defines the light account versions and the version definition for each light account type -slug: wallets/reference/account-kit/smart-contracts/variables/AccountVersionRegistry -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const AccountVersionRegistry: LightAccountVersionConfigs; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/utils.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/utils.ts#L16) - -Account version registry interface that defines the light account versions -and the version definition for each light account type diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/DEFAULT_OWNER_ENTITY_ID.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/DEFAULT_OWNER_ENTITY_ID.mdx deleted file mode 100644 index 56cdc26df4..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/DEFAULT_OWNER_ENTITY_ID.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: DEFAULT_OWNER_ENTITY_ID -description: Overview of DEFAULT_OWNER_ENTITY_ID -slug: wallets/reference/account-kit/smart-contracts/variables/DEFAULT_OWNER_ENTITY_ID -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const DEFAULT_OWNER_ENTITY_ID: 0 = 0; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L43) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/IAccountLoupeAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/IAccountLoupeAbi.mdx deleted file mode 100644 index ad16cabec4..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/IAccountLoupeAbi.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: IAccountLoupeAbi -description: Overview of IAccountLoupeAbi -slug: wallets/reference/account-kit/smart-contracts/variables/IAccountLoupeAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const IAccountLoupeAbi: readonly [ - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "getExecutionFunctionConfig"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "FunctionReference"; - name: "userOpValidationFunction"; - type: "bytes21"; - }, - { - internalType: "FunctionReference"; - name: "runtimeValidationFunction"; - type: "bytes21"; - }, - ]; - internalType: "struct IAccountLoupe.ExecutionFunctionConfig"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "getExecutionHooks"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "FunctionReference"; - name: "preExecHook"; - type: "bytes21"; - }, - { - internalType: "FunctionReference"; - name: "postExecHook"; - type: "bytes21"; - }, - ]; - internalType: "struct IAccountLoupe.ExecutionHooks[]"; - name: ""; - type: "tuple[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "getInstalledPlugins"; - outputs: readonly [ - { - internalType: "address[]"; - name: ""; - type: "address[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "getPreValidationHooks"; - outputs: readonly [ - { - internalType: "FunctionReference[]"; - name: "preUserOpValidationHooks"; - type: "bytes21[]"; - }, - { - internalType: "FunctionReference[]"; - name: "preRuntimeValidationHooks"; - type: "bytes21[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/abis/IAccountLoupe.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/abis/IAccountLoupe.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/IPluginAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/IPluginAbi.mdx deleted file mode 100644 index 8c128cb627..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/IPluginAbi.mdx +++ /dev/null @@ -1,627 +0,0 @@ ---- -title: IPluginAbi -description: Overview of IPluginAbi -slug: wallets/reference/account-kit/smart-contracts/variables/IPluginAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const IPluginAbi: readonly [ - { - inputs: readonly [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onInstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onUninstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginManifest"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "dependencyInterfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "executionFunctions"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "permittedExecutionSelectors"; - type: "bytes4[]"; - }, - { - internalType: "bool"; - name: "permitAnyExternalAddress"; - type: "bool"; - }, - { - internalType: "bool"; - name: "canSpendNativeToken"; - type: "bool"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "externalAddress"; - type: "address"; - }, - { - internalType: "bool"; - name: "permitAnySelector"; - type: "bool"; - }, - { - internalType: "bytes4[]"; - name: "selectors"; - type: "bytes4[]"; - }, - ]; - internalType: "struct ManifestExternalCallPermission[]"; - name: "permittedExternalCalls"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "userOpValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "runtimeValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preUserOpValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preRuntimeValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "preExecHook"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "postExecHook"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginManifest"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginMetadata"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "string"; - name: "author"; - type: "string"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - }, - { - internalType: "string"; - name: "permissionDescription"; - type: "string"; - }, - ]; - internalType: "struct SelectorPermission[]"; - name: "permissionDescriptors"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginMetadata"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "preExecHookData"; - type: "bytes"; - }, - ]; - name: "postExecutionHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preExecutionHook"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preRuntimeValidationHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "preUserOpValidationHook"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "runtimeValidationFunction"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "userOpValidationFunction"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/abis/IPlugin.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/abis/IPlugin.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/IPluginManagerAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/IPluginManagerAbi.mdx deleted file mode 100644 index 37075fc0fc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/IPluginManagerAbi.mdx +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: IPluginManagerAbi -description: Overview of IPluginManagerAbi -slug: wallets/reference/account-kit/smart-contracts/variables/IPluginManagerAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const IPluginManagerAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "manifestHash"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "pluginInitData"; - type: "bytes"; - }, - { - internalType: "FunctionReference[]"; - name: "dependencies"; - type: "bytes21[]"; - }, - ]; - name: "installPlugin"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "bytes"; - name: "config"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "pluginUninstallData"; - type: "bytes"; - }, - ]; - name: "uninstallPlugin"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "providingPlugin"; - type: "address"; - }, - ]; - name: "PluginIgnoredHookUnapplyCallbackFailure"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "plugin"; - type: "address"; - }, - ]; - name: "PluginIgnoredUninstallCallbackFailure"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - indexed: false; - internalType: "bytes32"; - name: "manifestHash"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "FunctionReference[]"; - name: "dependencies"; - type: "bytes21[]"; - }, - ]; - name: "PluginInstalled"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - indexed: true; - internalType: "bool"; - name: "callbacksSucceeded"; - type: "bool"; - }, - ]; - name: "PluginUninstalled"; - type: "event"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/abis/IPluginManager.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/abis/IPluginManager.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/IStandardExecutorAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/IStandardExecutorAbi.mdx deleted file mode 100644 index 2cab6ddad6..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/IStandardExecutorAbi.mdx +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: IStandardExecutorAbi -description: Overview of IStandardExecutorAbi -slug: wallets/reference/account-kit/smart-contracts/variables/IStandardExecutorAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const IStandardExecutorAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "execute"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - internalType: "struct Call[]"; - name: "calls"; - type: "tuple[]"; - }, - ]; - name: "executeBatch"; - outputs: readonly [ - { - internalType: "bytes[]"; - name: ""; - type: "bytes[]"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/abis/IStandardExecutor.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/abis/IStandardExecutor.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Factories.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Factories.mdx deleted file mode 100644 index cd12177098..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Factories.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: LightAccountUnsupported1271Factories -description: Can be used to check if the account with one of the following factory addresses to not support 1271 signing. Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. -slug: wallets/reference/account-kit/smart-contracts/variables/LightAccountUnsupported1271Factories -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const LightAccountUnsupported1271Factories: Set; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/utils.ts:138](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/utils.ts#L138) - -Can be used to check if the account with one of the following factory addresses -to not support 1271 signing. - -Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Impls.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Impls.mdx deleted file mode 100644 index ee51e318c5..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/LightAccountUnsupported1271Impls.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: LightAccountUnsupported1271Impls -description: Can be used to check if the account with one of the following implementation addresses to not support 1271 signing. Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. -slug: wallets/reference/account-kit/smart-contracts/variables/LightAccountUnsupported1271Impls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const LightAccountUnsupported1271Impls: any[]; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/utils.ts:127](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/utils.ts#L127) - -Can be used to check if the account with one of the following implementation addresses -to not support 1271 signing. - -Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MULTISIG_ACCOUNT_SOURCE.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MULTISIG_ACCOUNT_SOURCE.mdx deleted file mode 100644 index 0145d5f097..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MULTISIG_ACCOUNT_SOURCE.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: MULTISIG_ACCOUNT_SOURCE -description: Overview of MULTISIG_ACCOUNT_SOURCE -slug: wallets/reference/account-kit/smart-contracts/variables/MULTISIG_ACCOUNT_SOURCE -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MULTISIG_ACCOUNT_SOURCE: "MultisigModularAccount" = - "MultisigModularAccount"; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/multisigAccount.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/multisigAccount.ts#L26) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerModularAccountFactoryAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerModularAccountFactoryAbi.mdx deleted file mode 100644 index 786724f492..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerModularAccountFactoryAbi.mdx +++ /dev/null @@ -1,314 +0,0 @@ ---- -title: MultiOwnerModularAccountFactoryAbi -description: Overview of MultiOwnerModularAccountFactoryAbi -slug: wallets/reference/account-kit/smart-contracts/variables/MultiOwnerModularAccountFactoryAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultiOwnerModularAccountFactoryAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - { - internalType: "address"; - name: "multiOwnerPlugin"; - type: "address"; - }, - { - internalType: "address"; - name: "implementation"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "multiOwnerPluginManifestHash"; - type: "bytes32"; - }, - { - internalType: "contract IEntryPoint"; - name: "entryPoint"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, - { - inputs: readonly []; - name: "ENTRYPOINT"; - outputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "IMPL"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "MULTI_OWNER_PLUGIN"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "acceptOwnership"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint32"; - name: "unstakeDelay"; - type: "uint32"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "addStake"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "salt"; - type: "uint256"; - }, - { - internalType: "address[]"; - name: "owners"; - type: "address[]"; - }, - ]; - name: "createAccount"; - outputs: readonly [ - { - internalType: "address"; - name: "addr"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "salt"; - type: "uint256"; - }, - { - internalType: "address[]"; - name: "owners"; - type: "address[]"; - }, - ]; - name: "getAddress"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "owner"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "pendingOwner"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "renounceOwnership"; - outputs: readonly []; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "newOwner"; - type: "address"; - }, - ]; - name: "transferOwnership"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "unlockStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "to"; - type: "address"; - }, - { - internalType: "address"; - name: "token"; - type: "address"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "withdraw"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "to"; - type: "address"; - }, - ]; - name: "withdrawStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "previousOwner"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "newOwner"; - type: "address"; - }, - ]; - name: "OwnershipTransferStarted"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "previousOwner"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "newOwner"; - type: "address"; - }, - ]; - name: "OwnershipTransferred"; - type: "event"; - }, - { - inputs: readonly []; - name: "InvalidAction"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidOwner"; - type: "error"; - }, - { - inputs: readonly []; - name: "OwnersArrayEmpty"; - type: "error"; - }, - { - inputs: readonly []; - name: "OwnersLimitExceeded"; - type: "error"; - }, - { - inputs: readonly []; - name: "TransferFailed"; - type: "error"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/abis/MultiOwnerModularAccountFactory.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/abis/MultiOwnerModularAccountFactory.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPlugin.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPlugin.mdx deleted file mode 100644 index 363e6a0fbc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPlugin.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: MultiOwnerPlugin -description: Overview of MultiOwnerPlugin -slug: wallets/reference/account-kit/smart-contracts/variables/MultiOwnerPlugin -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultiOwnerPlugin: Plugin; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts:174](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts#L174) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginAbi.mdx deleted file mode 100644 index 52bbe1b8c0..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginAbi.mdx +++ /dev/null @@ -1,921 +0,0 @@ ---- -title: MultiOwnerPluginAbi -description: Overview of MultiOwnerPluginAbi -slug: wallets/reference/account-kit/smart-contracts/variables/MultiOwnerPluginAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultiOwnerPluginAbi: readonly [ - { - inputs: readonly []; - name: "eip712Domain"; - outputs: readonly [ - { - internalType: "bytes1"; - name: "fields"; - type: "bytes1"; - }, - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "uint256"; - name: "chainId"; - type: "uint256"; - }, - { - internalType: "address"; - name: "verifyingContract"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "salt"; - type: "bytes32"; - }, - { - internalType: "uint256[]"; - name: "extensions"; - type: "uint256[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "bytes"; - name: "message"; - type: "bytes"; - }, - ]; - name: "encodeMessageData"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "bytes"; - name: "message"; - type: "bytes"; - }, - ]; - name: "getMessageHash"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "ownerToCheck"; - type: "address"; - }, - ]; - name: "isOwnerOf"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "digest"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - name: "isValidSignature"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onInstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onUninstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "ownersOf"; - outputs: readonly [ - { - internalType: "address[]"; - name: ""; - type: "address[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginManifest"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "dependencyInterfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "executionFunctions"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "permittedExecutionSelectors"; - type: "bytes4[]"; - }, - { - internalType: "bool"; - name: "permitAnyExternalAddress"; - type: "bool"; - }, - { - internalType: "bool"; - name: "canSpendNativeToken"; - type: "bool"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "externalAddress"; - type: "address"; - }, - { - internalType: "bool"; - name: "permitAnySelector"; - type: "bool"; - }, - { - internalType: "bytes4[]"; - name: "selectors"; - type: "bytes4[]"; - }, - ]; - internalType: "struct ManifestExternalCallPermission[]"; - name: "permittedExternalCalls"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "userOpValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "runtimeValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preUserOpValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preRuntimeValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "preExecHook"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "postExecHook"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginManifest"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginMetadata"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "string"; - name: "author"; - type: "string"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - }, - { - internalType: "string"; - name: "permissionDescription"; - type: "string"; - }, - ]; - internalType: "struct SelectorPermission[]"; - name: "permissionDescriptors"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginMetadata"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "preExecHookData"; - type: "bytes"; - }, - ]; - name: "postExecutionHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preExecutionHook"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preRuntimeValidationHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "preUserOpValidationHook"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "runtimeValidationFunction"; - outputs: readonly []; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address[]"; - name: "ownersToAdd"; - type: "address[]"; - }, - { - internalType: "address[]"; - name: "ownersToRemove"; - type: "address[]"; - }, - ]; - name: "updateOwners"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "userOpValidationFunction"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "address[]"; - name: "addedOwners"; - type: "address[]"; - }, - { - indexed: false; - internalType: "address[]"; - name: "removedOwners"; - type: "address[]"; - }, - ]; - name: "OwnerUpdated"; - type: "event"; - }, - { - inputs: readonly []; - name: "AlreadyInitialized"; - type: "error"; - }, - { - inputs: readonly []; - name: "EmptyOwnersNotAllowed"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidAction"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - ]; - name: "InvalidOwner"; - type: "error"; - }, - { - inputs: readonly []; - name: "NotAuthorized"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "caller"; - type: "address"; - }, - ]; - name: "NotContractCaller"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - ]; - name: "NotImplemented"; - type: "error"; - }, - { - inputs: readonly []; - name: "NotInitialized"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - ]; - name: "OwnerDoesNotExist"; - type: "error"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts:378](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts#L378) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginExecutionFunctionAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginExecutionFunctionAbi.mdx deleted file mode 100644 index 8a1bec1e43..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultiOwnerPluginExecutionFunctionAbi.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: MultiOwnerPluginExecutionFunctionAbi -description: Overview of MultiOwnerPluginExecutionFunctionAbi -slug: wallets/reference/account-kit/smart-contracts/variables/MultiOwnerPluginExecutionFunctionAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultiOwnerPluginExecutionFunctionAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address[]"; - name: "ownersToAdd"; - type: "address[]"; - }, - { - internalType: "address[]"; - name: "ownersToRemove"; - type: "address[]"; - }, - ]; - name: "updateOwners"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "eip712Domain"; - outputs: readonly [ - { - internalType: "bytes1"; - name: "fields"; - type: "bytes1"; - }, - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "uint256"; - name: "chainId"; - type: "uint256"; - }, - { - internalType: "address"; - name: "verifyingContract"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "salt"; - type: "bytes32"; - }, - { - internalType: "uint256[]"; - name: "extensions"; - type: "uint256[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "digest"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - name: "isValidSignature"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts:340](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multi-owner/plugin.ts#L340) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigModularAccountFactoryAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigModularAccountFactoryAbi.mdx deleted file mode 100644 index 20a9f119ad..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigModularAccountFactoryAbi.mdx +++ /dev/null @@ -1,329 +0,0 @@ ---- -title: MultisigModularAccountFactoryAbi -description: Overview of MultisigModularAccountFactoryAbi -slug: wallets/reference/account-kit/smart-contracts/variables/MultisigModularAccountFactoryAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultisigModularAccountFactoryAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - { - internalType: "address"; - name: "multisigPlugin"; - type: "address"; - }, - { - internalType: "address"; - name: "implementation"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "multisigPluginManifestHash"; - type: "bytes32"; - }, - { - internalType: "contract IEntryPoint"; - name: "entryPoint"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, - { - inputs: readonly []; - name: "ENTRYPOINT"; - outputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "IMPL"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "MULTISIG_PLUGIN"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "acceptOwnership"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint32"; - name: "unstakeDelay"; - type: "uint32"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "addStake"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "salt"; - type: "uint256"; - }, - { - internalType: "address[]"; - name: "owners"; - type: "address[]"; - }, - { - internalType: "uint128"; - name: "threshold"; - type: "uint128"; - }, - ]; - name: "createAccount"; - outputs: readonly [ - { - internalType: "address"; - name: "addr"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "salt"; - type: "uint256"; - }, - { - internalType: "address[]"; - name: "owners"; - type: "address[]"; - }, - { - internalType: "uint256"; - name: "threshold"; - type: "uint256"; - }, - ]; - name: "getAddress"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "owner"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "pendingOwner"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "renounceOwnership"; - outputs: readonly []; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "newOwner"; - type: "address"; - }, - ]; - name: "transferOwnership"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "unlockStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "to"; - type: "address"; - }, - { - internalType: "address"; - name: "token"; - type: "address"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - ]; - name: "withdraw"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address payable"; - name: "to"; - type: "address"; - }, - ]; - name: "withdrawStake"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "previousOwner"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "newOwner"; - type: "address"; - }, - ]; - name: "OwnershipTransferStarted"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "previousOwner"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "newOwner"; - type: "address"; - }, - ]; - name: "OwnershipTransferred"; - type: "event"; - }, - { - inputs: readonly []; - name: "InvalidAction"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidOwner"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidThreshold"; - type: "error"; - }, - { - inputs: readonly []; - name: "OwnersArrayEmpty"; - type: "error"; - }, - { - inputs: readonly []; - name: "OwnersLimitExceeded"; - type: "error"; - }, - { - inputs: readonly []; - name: "TransferFailed"; - type: "error"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/abis/MultisigModularAccountFactory.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/abis/MultisigModularAccountFactory.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPlugin.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPlugin.mdx deleted file mode 100644 index 247ef53eaa..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPlugin.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: MultisigPlugin -description: Overview of MultisigPlugin -slug: wallets/reference/account-kit/smart-contracts/variables/MultisigPlugin -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultisigPlugin: Plugin; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts:174](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts#L174) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginAbi.mdx deleted file mode 100644 index 5c5718e74c..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginAbi.mdx +++ /dev/null @@ -1,1040 +0,0 @@ ---- -title: MultisigPluginAbi -description: Overview of MultisigPluginAbi -slug: wallets/reference/account-kit/smart-contracts/variables/MultisigPluginAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultisigPluginAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address"; - name: "entryPoint"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - inputs: readonly []; - name: "ENTRYPOINT"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "actualDigest"; - type: "bytes32"; - }, - { - internalType: "bytes32"; - name: "upperLimitGasDigest"; - type: "bytes32"; - }, - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "bytes"; - name: "signatures"; - type: "bytes"; - }, - ]; - name: "checkNSignatures"; - outputs: readonly [ - { - internalType: "bool"; - name: "success"; - type: "bool"; - }, - { - internalType: "uint256"; - name: "firstFailure"; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "eip712Domain"; - outputs: readonly [ - { - internalType: "bytes1"; - name: "fields"; - type: "bytes1"; - }, - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "uint256"; - name: "chainId"; - type: "uint256"; - }, - { - internalType: "address"; - name: "verifyingContract"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "salt"; - type: "bytes32"; - }, - { - internalType: "uint256[]"; - name: "extensions"; - type: "uint256[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "bytes"; - name: "message"; - type: "bytes"; - }, - ]; - name: "encodeMessageData"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "bytes"; - name: "message"; - type: "bytes"; - }, - ]; - name: "getMessageHash"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "ownerToCheck"; - type: "address"; - }, - ]; - name: "isOwnerOf"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "digest"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - name: "isValidSignature"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onInstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onUninstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "ownershipInfoOf"; - outputs: readonly [ - { - internalType: "address[]"; - name: ""; - type: "address[]"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginManifest"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "dependencyInterfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "executionFunctions"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "permittedExecutionSelectors"; - type: "bytes4[]"; - }, - { - internalType: "bool"; - name: "permitAnyExternalAddress"; - type: "bool"; - }, - { - internalType: "bool"; - name: "canSpendNativeToken"; - type: "bool"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "externalAddress"; - type: "address"; - }, - { - internalType: "bool"; - name: "permitAnySelector"; - type: "bool"; - }, - { - internalType: "bytes4[]"; - name: "selectors"; - type: "bytes4[]"; - }, - ]; - internalType: "struct ManifestExternalCallPermission[]"; - name: "permittedExternalCalls"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "userOpValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "runtimeValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preUserOpValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preRuntimeValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "preExecHook"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "postExecHook"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginManifest"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginMetadata"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "string"; - name: "author"; - type: "string"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - }, - { - internalType: "string"; - name: "permissionDescription"; - type: "string"; - }, - ]; - internalType: "struct SelectorPermission[]"; - name: "permissionDescriptors"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginMetadata"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "preExecHookData"; - type: "bytes"; - }, - ]; - name: "postExecutionHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preExecutionHook"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preRuntimeValidationHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "preUserOpValidationHook"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "runtimeValidationFunction"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address[]"; - name: "ownersToAdd"; - type: "address[]"; - }, - { - internalType: "address[]"; - name: "ownersToRemove"; - type: "address[]"; - }, - { - internalType: "uint128"; - name: "newThreshold"; - type: "uint128"; - }, - ]; - name: "updateOwnership"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "userOpValidationFunction"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: false; - internalType: "address[]"; - name: "addedOwners"; - type: "address[]"; - }, - { - indexed: false; - internalType: "address[]"; - name: "removedOwners"; - type: "address[]"; - }, - { - indexed: false; - internalType: "uint256"; - name: "threshold"; - type: "uint256"; - }, - ]; - name: "OwnerUpdated"; - type: "event"; - }, - { - inputs: readonly []; - name: "AlreadyInitialized"; - type: "error"; - }, - { - inputs: readonly []; - name: "ECDSARecoverFailure"; - type: "error"; - }, - { - inputs: readonly []; - name: "EmptyOwnersNotAllowed"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidAction"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidAddress"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidMaxFeePerGas"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidMaxPriorityFeePerGas"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidNumSigsOnActualGas"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - ]; - name: "InvalidOwner"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidPreVerificationGas"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidSigLength"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidSigOffset"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidThreshold"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "caller"; - type: "address"; - }, - ]; - name: "NotContractCaller"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - ]; - name: "NotImplemented"; - type: "error"; - }, - { - inputs: readonly []; - name: "NotInitialized"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "owner"; - type: "address"; - }, - ]; - name: "OwnerDoesNotExist"; - type: "error"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts:376](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts#L376) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginExecutionFunctionAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginExecutionFunctionAbi.mdx deleted file mode 100644 index beac4cf4f4..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/MultisigPluginExecutionFunctionAbi.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: MultisigPluginExecutionFunctionAbi -description: Overview of MultisigPluginExecutionFunctionAbi -slug: wallets/reference/account-kit/smart-contracts/variables/MultisigPluginExecutionFunctionAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const MultisigPluginExecutionFunctionAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address[]"; - name: "ownersToAdd"; - type: "address[]"; - }, - { - internalType: "address[]"; - name: "ownersToRemove"; - type: "address[]"; - }, - { - internalType: "uint128"; - name: "newThreshold"; - type: "uint128"; - }, - ]; - name: "updateOwnership"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "eip712Domain"; - outputs: readonly [ - { - internalType: "bytes1"; - name: "fields"; - type: "bytes1"; - }, - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "uint256"; - name: "chainId"; - type: "uint256"; - }, - { - internalType: "address"; - name: "verifyingContract"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "salt"; - type: "bytes32"; - }, - { - internalType: "uint256[]"; - name: "extensions"; - type: "uint256[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "digest"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - name: "isValidSignature"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts:337](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/plugin.ts#L337) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPlugin.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPlugin.mdx deleted file mode 100644 index 449ed8ddec..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPlugin.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SessionKeyPlugin -description: Overview of SessionKeyPlugin -slug: wallets/reference/account-kit/smart-contracts/variables/SessionKeyPlugin -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SessionKeyPlugin: Plugin; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts:222](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts#L222) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginAbi.mdx deleted file mode 100644 index a873750853..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginAbi.mdx +++ /dev/null @@ -1,1395 +0,0 @@ ---- -title: SessionKeyPluginAbi -description: Overview of SessionKeyPluginAbi -slug: wallets/reference/account-kit/smart-contracts/variables/SessionKeyPluginAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SessionKeyPluginAbi: readonly [ - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "tag"; - type: "bytes32"; - }, - { - internalType: "bytes[]"; - name: "permissionUpdates"; - type: "bytes[]"; - }, - ]; - name: "addSessionKey"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - internalType: "struct Call[]"; - name: "calls"; - type: "tuple[]"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "executeWithSessionKey"; - outputs: readonly [ - { - internalType: "bytes[]"; - name: ""; - type: "bytes[]"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "findPredecessor"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "address"; - name: "contractAddress"; - type: "address"; - }, - ]; - name: "getAccessControlEntry"; - outputs: readonly [ - { - internalType: "bool"; - name: "isOnList"; - type: "bool"; - }, - { - internalType: "bool"; - name: "checkSelectors"; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "getAccessControlType"; - outputs: readonly [ - { - internalType: "enum ISessionKeyPlugin.ContractAccessControlType"; - name: ""; - type: "uint8"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "address"; - name: "token"; - type: "address"; - }, - ]; - name: "getERC20SpendLimitInfo"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "bool"; - name: "hasLimit"; - type: "bool"; - }, - { - internalType: "uint256"; - name: "limit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "limitUsed"; - type: "uint256"; - }, - { - internalType: "uint48"; - name: "refreshInterval"; - type: "uint48"; - }, - { - internalType: "uint48"; - name: "lastUsedTime"; - type: "uint48"; - }, - ]; - internalType: "struct ISessionKeyPlugin.SpendLimitInfo"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "getGasSpendLimit"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "bool"; - name: "hasLimit"; - type: "bool"; - }, - { - internalType: "uint256"; - name: "limit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "limitUsed"; - type: "uint256"; - }, - { - internalType: "uint48"; - name: "refreshInterval"; - type: "uint48"; - }, - { - internalType: "uint48"; - name: "lastUsedTime"; - type: "uint48"; - }, - ]; - internalType: "struct ISessionKeyPlugin.SpendLimitInfo"; - name: "info"; - type: "tuple"; - }, - { - internalType: "bool"; - name: "shouldReset"; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "getKeyTimeRange"; - outputs: readonly [ - { - internalType: "uint48"; - name: "validAfter"; - type: "uint48"; - }, - { - internalType: "uint48"; - name: "validUntil"; - type: "uint48"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "getNativeTokenSpendLimitInfo"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "bool"; - name: "hasLimit"; - type: "bool"; - }, - { - internalType: "uint256"; - name: "limit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "limitUsed"; - type: "uint256"; - }, - { - internalType: "uint48"; - name: "refreshInterval"; - type: "uint48"; - }, - { - internalType: "uint48"; - name: "lastUsedTime"; - type: "uint48"; - }, - ]; - internalType: "struct ISessionKeyPlugin.SpendLimitInfo"; - name: "info"; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "getRequiredPaymaster"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "address"; - name: "contractAddress"; - type: "address"; - }, - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "isSelectorOnAccessControlList"; - outputs: readonly [ - { - internalType: "bool"; - name: "isOnList"; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "isSessionKeyOf"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onInstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onUninstall"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginManifest"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "dependencyInterfaceIds"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "executionFunctions"; - type: "bytes4[]"; - }, - { - internalType: "bytes4[]"; - name: "permittedExecutionSelectors"; - type: "bytes4[]"; - }, - { - internalType: "bool"; - name: "permitAnyExternalAddress"; - type: "bool"; - }, - { - internalType: "bool"; - name: "canSpendNativeToken"; - type: "bool"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "externalAddress"; - type: "address"; - }, - { - internalType: "bool"; - name: "permitAnySelector"; - type: "bool"; - }, - { - internalType: "bytes4[]"; - name: "selectors"; - type: "bytes4[]"; - }, - ]; - internalType: "struct ManifestExternalCallPermission[]"; - name: "permittedExternalCalls"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "userOpValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "runtimeValidationFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preUserOpValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "associatedFunction"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestAssociatedFunction[]"; - name: "preRuntimeValidationHooks"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "preExecHook"; - type: "tuple"; - }, - { - components: readonly [ - { - internalType: "enum ManifestAssociatedFunctionType"; - name: "functionType"; - type: "uint8"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "uint256"; - name: "dependencyIndex"; - type: "uint256"; - }, - ]; - internalType: "struct ManifestFunction"; - name: "postExecHook"; - type: "tuple"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginManifest"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly []; - name: "pluginMetadata"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "string"; - name: "name"; - type: "string"; - }, - { - internalType: "string"; - name: "version"; - type: "string"; - }, - { - internalType: "string"; - name: "author"; - type: "string"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "functionSelector"; - type: "bytes4"; - }, - { - internalType: "string"; - name: "permissionDescription"; - type: "string"; - }, - ]; - internalType: "struct SelectorPermission[]"; - name: "permissionDescriptors"; - type: "tuple[]"; - }, - ]; - internalType: "struct PluginMetadata"; - name: ""; - type: "tuple"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "preExecHookData"; - type: "bytes"; - }, - ]; - name: "postExecutionHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preExecutionHook"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "preRuntimeValidationHook"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "preUserOpValidationHook"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "predecessor"; - type: "bytes32"; - }, - ]; - name: "removeSessionKey"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "resetSessionKeyGasLimitTimestamp"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "oldSessionKey"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "predecessor"; - type: "bytes32"; - }, - { - internalType: "address"; - name: "newSessionKey"; - type: "address"; - }, - ]; - name: "rotateSessionKey"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "runtimeValidationFunction"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - ]; - name: "sessionKeysOf"; - outputs: readonly [ - { - internalType: "address[]"; - name: ""; - type: "address[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "bytes[]"; - name: "updates"; - type: "bytes[]"; - }, - ]; - name: "updateKeyPermissions"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - ]; - name: "userOpValidationFunction"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - indexed: false; - internalType: "bytes[]"; - name: "updates"; - type: "bytes[]"; - }, - ]; - name: "PermissionsUpdated"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - indexed: true; - internalType: "bytes32"; - name: "tag"; - type: "bytes32"; - }, - ]; - name: "SessionKeyAdded"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "SessionKeyRemoved"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "account"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "oldSessionKey"; - type: "address"; - }, - { - indexed: true; - internalType: "address"; - name: "newSessionKey"; - type: "address"; - }, - ]; - name: "SessionKeyRotated"; - type: "event"; - }, - { - inputs: readonly []; - name: "AlreadyInitialized"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "address"; - name: "token"; - type: "address"; - }, - ]; - name: "ERC20SpendLimitExceeded"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidAction"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "updateSelector"; - type: "bytes4"; - }, - ]; - name: "InvalidPermissionsUpdate"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "InvalidSessionKey"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "InvalidSignature"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "token"; - type: "address"; - }, - ]; - name: "InvalidToken"; - type: "error"; - }, - { - inputs: readonly []; - name: "LengthMismatch"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "account"; - type: "address"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "NativeTokenSpendLimitExceeded"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "caller"; - type: "address"; - }, - ]; - name: "NotContractCaller"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - ]; - name: "NotImplemented"; - type: "error"; - }, - { - inputs: readonly []; - name: "NotInitialized"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "SessionKeyNotFound"; - type: "error"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts:540](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts#L540) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginExecutionFunctionAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginExecutionFunctionAbi.mdx deleted file mode 100644 index b75537f8a1..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/SessionKeyPluginExecutionFunctionAbi.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: SessionKeyPluginExecutionFunctionAbi -description: Overview of SessionKeyPluginExecutionFunctionAbi -slug: wallets/reference/account-kit/smart-contracts/variables/SessionKeyPluginExecutionFunctionAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const SessionKeyPluginExecutionFunctionAbi: readonly [ - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - internalType: "struct Call[]"; - name: "calls"; - type: "tuple[]"; - }, - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - ]; - name: "executeWithSessionKey"; - outputs: readonly [ - { - internalType: "bytes[]"; - name: ""; - type: "bytes[]"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "tag"; - type: "bytes32"; - }, - { - internalType: "bytes[]"; - name: "permissionUpdates"; - type: "bytes[]"; - }, - ]; - name: "addSessionKey"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "predecessor"; - type: "bytes32"; - }, - ]; - name: "removeSessionKey"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "oldSessionKey"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "predecessor"; - type: "bytes32"; - }, - { - internalType: "address"; - name: "newSessionKey"; - type: "address"; - }, - ]; - name: "rotateSessionKey"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "sessionKey"; - type: "address"; - }, - { - internalType: "bytes[]"; - name: "updates"; - type: "bytes[]"; - }, - ]; - name: "updateKeyPermissions"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts:476](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/plugin.ts#L476) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/UpgradeableModularAccountAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/UpgradeableModularAccountAbi.mdx deleted file mode 100644 index 22be4b00aa..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/UpgradeableModularAccountAbi.mdx +++ /dev/null @@ -1,1170 +0,0 @@ ---- -title: UpgradeableModularAccountAbi -description: Overview of UpgradeableModularAccountAbi -slug: wallets/reference/account-kit/smart-contracts/variables/UpgradeableModularAccountAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const UpgradeableModularAccountAbi: readonly [ - { - inputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: "anEntryPoint"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - stateMutability: "payable"; - type: "fallback"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, - { - inputs: readonly []; - name: "entryPoint"; - outputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "execute"; - outputs: readonly [ - { - internalType: "bytes"; - name: "result"; - type: "bytes"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - internalType: "struct Call[]"; - name: "calls"; - type: "tuple[]"; - }, - ]; - name: "executeBatch"; - outputs: readonly [ - { - internalType: "bytes[]"; - name: "results"; - type: "bytes[]"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "executeFromPlugin"; - outputs: readonly [ - { - internalType: "bytes"; - name: "returnData"; - type: "bytes"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "executeFromPluginExternal"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "getExecutionFunctionConfig"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "FunctionReference"; - name: "userOpValidationFunction"; - type: "bytes21"; - }, - { - internalType: "FunctionReference"; - name: "runtimeValidationFunction"; - type: "bytes21"; - }, - ]; - internalType: "struct IAccountLoupe.ExecutionFunctionConfig"; - name: "config"; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "getExecutionHooks"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "FunctionReference"; - name: "preExecHook"; - type: "bytes21"; - }, - { - internalType: "FunctionReference"; - name: "postExecHook"; - type: "bytes21"; - }, - ]; - internalType: "struct IAccountLoupe.ExecutionHooks[]"; - name: "execHooks"; - type: "tuple[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "getInstalledPlugins"; - outputs: readonly [ - { - internalType: "address[]"; - name: "pluginAddresses"; - type: "address[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "getNonce"; - outputs: readonly [ - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "getPreValidationHooks"; - outputs: readonly [ - { - internalType: "FunctionReference[]"; - name: "preUserOpValidationHooks"; - type: "bytes21[]"; - }, - { - internalType: "FunctionReference[]"; - name: "preRuntimeValidationHooks"; - type: "bytes21[]"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address[]"; - name: "plugins"; - type: "address[]"; - }, - { - internalType: "bytes"; - name: "pluginInitData"; - type: "bytes"; - }, - ]; - name: "initialize"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "bytes32"; - name: "manifestHash"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "pluginInstallData"; - type: "bytes"; - }, - { - internalType: "FunctionReference[]"; - name: "dependencies"; - type: "bytes21[]"; - }, - ]; - name: "installPlugin"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "operator"; - type: "address"; - }, - { - internalType: "address"; - name: "from"; - type: "address"; - }, - { - internalType: "uint256[]"; - name: "ids"; - type: "uint256[]"; - }, - { - internalType: "uint256[]"; - name: "values"; - type: "uint256[]"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onERC1155BatchReceived"; - outputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "operator"; - type: "address"; - }, - { - internalType: "address"; - name: "from"; - type: "address"; - }, - { - internalType: "uint256"; - name: "id"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onERC1155Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "operator"; - type: "address"; - }, - { - internalType: "address"; - name: "from"; - type: "address"; - }, - { - internalType: "uint256"; - name: "tokenId"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "onERC721Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly []; - name: "proxiableUUID"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "operator"; - type: "address"; - }, - { - internalType: "address"; - name: "from"; - type: "address"; - }, - { - internalType: "address"; - name: "to"; - type: "address"; - }, - { - internalType: "uint256"; - name: "amount"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "userData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "operatorData"; - type: "bytes"; - }, - ]; - name: "tokensReceived"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "bytes"; - name: "config"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "pluginUninstallData"; - type: "bytes"; - }, - ]; - name: "uninstallPlugin"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "newImplementation"; - type: "address"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "upgradeToAndCall"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "uint256"; - name: "callGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "verificationGasLimit"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxFeePerGas"; - type: "uint256"; - }, - { - internalType: "uint256"; - name: "maxPriorityFeePerGas"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct UserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "missingAccountFunds"; - type: "uint256"; - }, - ]; - name: "validateUserOp"; - outputs: readonly [ - { - internalType: "uint256"; - name: "validationData"; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "contract IEntryPoint"; - name: "entryPoint"; - type: "address"; - }, - ]; - name: "ModularAccountInitialized"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - indexed: false; - internalType: "bytes32"; - name: "manifestHash"; - type: "bytes32"; - }, - { - indexed: false; - internalType: "FunctionReference[]"; - name: "dependencies"; - type: "bytes21[]"; - }, - ]; - name: "PluginInstalled"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - indexed: true; - internalType: "bool"; - name: "onUninstallSucceeded"; - type: "bool"; - }, - ]; - name: "PluginUninstalled"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "implementation"; - type: "address"; - }, - ]; - name: "Upgraded"; - type: "event"; - }, - { - inputs: readonly []; - name: "AlreadyInitialized"; - type: "error"; - }, - { - inputs: readonly []; - name: "AlreadyInitializing"; - type: "error"; - }, - { - inputs: readonly []; - name: "AlwaysDenyRule"; - type: "error"; - }, - { - inputs: readonly []; - name: "ArrayLengthMismatch"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "FunctionReference"; - name: "hook"; - type: "bytes21"; - }, - ]; - name: "DuplicateHookLimitExceeded"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "FunctionReference"; - name: "hook"; - type: "bytes21"; - }, - ]; - name: "DuplicatePreRuntimeValidationHookLimitExceeded"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "FunctionReference"; - name: "hook"; - type: "bytes21"; - }, - ]; - name: "DuplicatePreUserOpValidationHookLimitExceeded"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "Erc4337FunctionNotAllowed"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "ExecFromPluginExternalNotPermitted"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "ExecFromPluginNotPermitted"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "ExecutionFunctionAlreadySet"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "IPluginFunctionNotAllowed"; - type: "error"; - }, - { - inputs: readonly []; - name: "InterfaceNotAllowed"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidDependenciesProvided"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidPluginManifest"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "dependency"; - type: "address"; - }, - ]; - name: "MissingPluginDependency"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "NativeFunctionNotAllowed"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - ]; - name: "NativeTokenSpendingNotPermitted"; - type: "error"; - }, - { - inputs: readonly []; - name: "NullFunctionReference"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - ]; - name: "PluginAlreadyInstalled"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - ]; - name: "PluginCallDenied"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - ]; - name: "PluginDependencyViolation"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "PluginInstallCallbackFailed"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - ]; - name: "PluginInterfaceNotSupported"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - ]; - name: "PluginNotInstalled"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "PluginUninstallCallbackFailed"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "PostExecHookReverted"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "PreExecHookReverted"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "PreRuntimeValidationHookFailed"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "FunctionReference"; - name: "validationFunction"; - type: "bytes21"; - }, - ]; - name: "RuntimeValidationFunctionAlreadySet"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "RuntimeValidationFunctionMissing"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "RuntimeValidationFunctionReverted"; - type: "error"; - }, - { - inputs: readonly []; - name: "UnauthorizedCallContext"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "plugin"; - type: "address"; - }, - { - internalType: "uint8"; - name: "functionId"; - type: "uint8"; - }, - { - internalType: "address"; - name: "aggregator"; - type: "address"; - }, - ]; - name: "UnexpectedAggregator"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "UnrecognizedFunction"; - type: "error"; - }, - { - inputs: readonly []; - name: "UpgradeFailed"; - type: "error"; - }, - { - inputs: readonly []; - name: "UserOpNotFromEntryPoint"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "FunctionReference"; - name: "validationFunction"; - type: "bytes21"; - }, - ]; - name: "UserOpValidationFunctionAlreadySet"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "UserOpValidationFunctionMissing"; - type: "error"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/msca/abis/UpgradeableModularAccount.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/abis/UpgradeableModularAccount.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/accountLoupeActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/accountLoupeActions.mdx deleted file mode 100644 index d7702001f5..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/accountLoupeActions.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: accountLoupeActions -description: "Provides a set of actions for account loupe operations using the specified client. NOTE: this is already added to the client when using any of the Modular Account Clients." -slug: wallets/reference/account-kit/smart-contracts/variables/accountLoupeActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const accountLoupeActions: ( - client, -) => AccountLoupeActions; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account-loupe/decorator.ts:69](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account-loupe/decorator.ts#L69) - -Provides a set of actions for account loupe operations using the specified client. -NOTE: this is already added to the client when using any of the Modular Account Clients. - -## Example - -```ts -import { accountLoupeActions } from "@account-kit/smart-contracts"; -import { createSmartAccountClient } from "@aa-sdk/core"; - -const client = createSmartAccountClient(...).extend(accountLoupeActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - the client to be used for executing the account loupe actions -
- -## Returns - -[`AccountLoupeActions`](../type-aliases/AccountLoupeActions)\<`TAccount`> - -an object containing account loupe actions like `getExecutionFunctionConfig`, `getExecutionHooks`, `getPreValidationHooks`, and `getInstalledPlugins` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/entityIdAndNonceReaderBytecode.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/entityIdAndNonceReaderBytecode.mdx deleted file mode 100644 index 3fc2277366..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/entityIdAndNonceReaderBytecode.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: entityIdAndNonceReaderBytecode -description: Overview of entityIdAndNonceReaderBytecode -slug: wallets/reference/account-kit/smart-contracts/variables/entityIdAndNonceReaderBytecode -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const entityIdAndNonceReaderBytecode: "0x608060405234801561001057600080fd5b506040516104f13803806104f183398101604081905261002f916101e5565b60006008826001600160c01b0316901c90506000808263ffffffff1611610057576001610059565b815b90506001600160a01b0385163b15610133575b60006001600160a01b03861663d31b575b6bffffffff0000000000000000604085901b166040516001600160e01b031960e084901b1681526001600160401b03199091166004820152602401600060405180830381865afa1580156100d5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526100fd91908101906103c6565b805190915060ff161580156101155750606081015151155b156101205750610133565b8161012a816104a4565b9250505061006c565b604051631aab3f0d60e11b81526001600160a01b03868116600483015264ffffffff01600160c01b038516600884901b64ffffffff0016176024830152600091908616906335567e1a90604401602060405180830381865afa15801561019d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c191906104d7565b90508060005260206000f35b6001600160a01b03811681146101e257600080fd5b50565b6000806000606084860312156101fa57600080fd5b8351610205816101cd565b6020850151909350610216816101cd565b60408501519092506001600160c01b038116811461023357600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156102765761027661023e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156102a4576102a461023e565b604052919050565b60006001600160401b038211156102c5576102c561023e565b5060051b60200190565b600082601f8301126102e057600080fd5b81516102f36102ee826102ac565b61027c565b8082825260208201915060208360051b86010192508583111561031557600080fd5b602085015b8381101561034857805166ffffffffffffff198116811461033a57600080fd5b83526020928301920161031a565b5095945050505050565b600082601f83011261036357600080fd5b81516103716102ee826102ac565b8082825260208201915060208360051b86010192508583111561039357600080fd5b602085015b838110156103485780516001600160e01b0319811681146103b857600080fd5b835260209283019201610398565b6000602082840312156103d857600080fd5b81516001600160401b038111156103ee57600080fd5b82016080818503121561040057600080fd5b610408610254565b815160ff8116811461041957600080fd5b815260208201516001600160401b0381111561043457600080fd5b610440868285016102cf565b60208301525060408201516001600160401b0381111561045f57600080fd5b61046b868285016102cf565b60408301525060608201516001600160401b0381111561048a57600080fd5b61049686828501610352565b606083015250949350505050565b600063ffffffff821663ffffffff81036104ce57634e487b7160e01b600052601160045260246000fd5b60010192915050565b6000602082840312156104e957600080fd5b505191905056fe" = - "0x608060405234801561001057600080fd5b506040516104f13803806104f183398101604081905261002f916101e5565b60006008826001600160c01b0316901c90506000808263ffffffff1611610057576001610059565b815b90506001600160a01b0385163b15610133575b60006001600160a01b03861663d31b575b6bffffffff0000000000000000604085901b166040516001600160e01b031960e084901b1681526001600160401b03199091166004820152602401600060405180830381865afa1580156100d5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526100fd91908101906103c6565b805190915060ff161580156101155750606081015151155b156101205750610133565b8161012a816104a4565b9250505061006c565b604051631aab3f0d60e11b81526001600160a01b03868116600483015264ffffffff01600160c01b038516600884901b64ffffffff0016176024830152600091908616906335567e1a90604401602060405180830381865afa15801561019d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c191906104d7565b90508060005260206000f35b6001600160a01b03811681146101e257600080fd5b50565b6000806000606084860312156101fa57600080fd5b8351610205816101cd565b6020850151909350610216816101cd565b60408501519092506001600160c01b038116811461023357600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156102765761027661023e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156102a4576102a461023e565b604052919050565b60006001600160401b038211156102c5576102c561023e565b5060051b60200190565b600082601f8301126102e057600080fd5b81516102f36102ee826102ac565b61027c565b8082825260208201915060208360051b86010192508583111561031557600080fd5b602085015b8381101561034857805166ffffffffffffff198116811461033a57600080fd5b83526020928301920161031a565b5095945050505050565b600082601f83011261036357600080fd5b81516103716102ee826102ac565b8082825260208201915060208360051b86010192508583111561039357600080fd5b602085015b838110156103485780516001600160e01b0319811681146103b857600080fd5b835260209283019201610398565b6000602082840312156103d857600080fd5b81516001600160401b038111156103ee57600080fd5b82016080818503121561040057600080fd5b610408610254565b815160ff8116811461041957600080fd5b815260208201516001600160401b0381111561043457600080fd5b610440868285016102cf565b60208301525060408201516001600160401b0381111561045f57600080fd5b61046b868285016102cf565b60408301525060608201516001600160401b0381111561048a57600080fd5b61049686828501610352565b606083015250949350505050565b600063ffffffff821663ffffffff81036104ce57634e487b7160e01b600052601160045260246000fd5b60010192915050565b6000602082840312156104e957600080fd5b505191905056fe"; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:258](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L258) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/executeUserOpSelector.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/executeUserOpSelector.mdx deleted file mode 100644 index 82996ad4e8..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/executeUserOpSelector.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: executeUserOpSelector -description: Overview of executeUserOpSelector -slug: wallets/reference/account-kit/smart-contracts/variables/executeUserOpSelector -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const executeUserOpSelector: Hex = "0x8DD7712F"; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts#L36) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/lightAccountClientActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/lightAccountClientActions.mdx deleted file mode 100644 index fd6dcf374d..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/lightAccountClientActions.mdx +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: lightAccountClientActions -description: Provides a set of actions for managing a light account client, including transferring ownership. -slug: wallets/reference/account-kit/smart-contracts/variables/lightAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const lightAccountClientActions: ( - client, -) => LightAccountClientActions; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/decorators/lightAccount.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/decorators/lightAccount.ts#L39) - -Provides a set of actions for managing a light account client, including transferring ownership. - -## Example - -```ts -import { lightAccountClientActions, createLightAccount } from "@account-kit/smart-contracts"; -import { createAlchemySmartAccountClient } from "@account-kit/infra"; -import { sepolia } from "@account-kit/infra"; - -const smartAccountClient = createAlchemySmartAccountClient({ - account: await createLightAccount(...), - apiKey: "your-api-key", - chain: sepolia, -}).extend(lightAccountClientActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TAccount` *extends* `LightAccount`\<`TSigner`> | `undefined` - - `LightAccount`\<`TSigner`> | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client instance for which to provide the light account actions -
- -## Returns - -[`LightAccountClientActions`](../type-aliases/LightAccountClientActions)\<`TSigner`, `TAccount`> - -An object containing the available light account client actions diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Abi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Abi.mdx deleted file mode 100644 index 8b5583a872..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Abi.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: mintableERC20Abi -description: Overview of mintableERC20Abi -slug: wallets/reference/account-kit/smart-contracts/variables/mintableERC20Abi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const mintableERC20Abi: readonly [{}, {}, {}]; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:264](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L264) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Bytecode.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Bytecode.mdx deleted file mode 100644 index 6bea9d6222..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/mintableERC20Bytecode.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: mintableERC20Bytecode -description: Overview of mintableERC20Bytecode -slug: wallets/reference/account-kit/smart-contracts/variables/mintableERC20Bytecode -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const mintableERC20Bytecode: "0x608060405234801561000f575f80fd5b506040518060400160405280600d81526020016c26b4b73a30b13632aa37b5b2b760991b81525060405180604001604052806002815260200161135560f21b8152508160039081610060919061010d565b50600461006d828261010d565b5050506101c7565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061009d57607f821691505b6020821081036100bb57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561010857805f5260205f20601f840160051c810160208510156100e65750805b601f840160051c820191505b81811015610105575f81556001016100f2565b50505b505050565b81516001600160401b0381111561012657610126610075565b61013a816101348454610089565b846100c1565b6020601f82116001811461016c575f83156101555750848201515b5f19600385901b1c1916600184901b178455610105565b5f84815260208120601f198516915b8281101561019b578785015182556020948501946001909201910161017b565b50848210156101b857868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b610737806101d45f395ff3fe608060405234801561000f575f80fd5b506004361061008c575f3560e01c806306fdde0314610090578063095ea7b3146100ae57806318160ddd146100d157806323b872dd146100e3578063313ce567146100f657806340c10f191461010557806370a082311461011a57806395d89b4114610142578063a9059cbb1461014a578063dd62ed3e1461015d575b5f80fd5b610098610170565b6040516100a59190610572565b60405180910390f35b6100c16100bc3660046105c2565b610200565b60405190151581526020016100a5565b6002545b6040519081526020016100a5565b6100c16100f13660046105ea565b610219565b604051601281526020016100a5565b6101186101133660046105c2565b61023c565b005b6100d5610128366004610624565b6001600160a01b03165f9081526020819052604090205490565b61009861024a565b6100c16101583660046105c2565b610259565b6100d561016b366004610644565b610266565b60606003805461017f90610675565b80601f01602080910402602001604051908101604052809291908181526020018280546101ab90610675565b80156101f65780601f106101cd576101008083540402835291602001916101f6565b820191905f5260205f20905b8154815290600101906020018083116101d957829003601f168201915b5050505050905090565b5f3361020d818585610290565b60019150505b92915050565b5f336102268582856102a2565b6102318585856102fc565b506001949350505050565b6102468282610359565b5050565b60606004805461017f90610675565b5f3361020d8185856102fc565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b61029d838383600161038d565b505050565b5f6102ad8484610266565b90505f198110156102f657818110156102e857828183604051637dc7a0d960e11b81526004016102df939291906106ad565b60405180910390fd5b6102f684848484035f61038d565b50505050565b6001600160a01b038316610325575f604051634b637e8f60e11b81526004016102df91906106ce565b6001600160a01b03821661034e575f60405163ec442f0560e01b81526004016102df91906106ce565b61029d83838361045f565b6001600160a01b038216610382575f60405163ec442f0560e01b81526004016102df91906106ce565b6102465f838361045f565b6001600160a01b0384166103b6575f60405163e602df0560e01b81526004016102df91906106ce565b6001600160a01b0383166103df575f604051634a1406b160e11b81526004016102df91906106ce565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156102f657826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161045191815260200190565b60405180910390a350505050565b6001600160a01b038316610489578060025f82825461047e91906106e2565b909155506104e69050565b6001600160a01b0383165f90815260208190526040902054818110156104c85783818360405163391434e360e21b81526004016102df939291906106ad565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661050257600280548290039055610520565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161056591815260200190565b60405180910390a3505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146105bd575f80fd5b919050565b5f80604083850312156105d3575f80fd5b6105dc836105a7565b946020939093013593505050565b5f805f606084860312156105fc575f80fd5b610605846105a7565b9250610613602085016105a7565b929592945050506040919091013590565b5f60208284031215610634575f80fd5b61063d826105a7565b9392505050565b5f8060408385031215610655575f80fd5b61065e836105a7565b915061066c602084016105a7565b90509250929050565b600181811c9082168061068957607f821691505b6020821081036106a757634e487b7160e01b5f52602260045260245ffd5b50919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0391909116815260200190565b8082018082111561021357634e487b7160e01b5f52601160045260245ffdfea2646970667358221220f9ae46a2e15270bfb77fe3d4d0ee0e45b749e3dde93805ee2cf795cb800244e664736f6c634300081a0033" = - "0x608060405234801561000f575f80fd5b506040518060400160405280600d81526020016c26b4b73a30b13632aa37b5b2b760991b81525060405180604001604052806002815260200161135560f21b8152508160039081610060919061010d565b50600461006d828261010d565b5050506101c7565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061009d57607f821691505b6020821081036100bb57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561010857805f5260205f20601f840160051c810160208510156100e65750805b601f840160051c820191505b81811015610105575f81556001016100f2565b50505b505050565b81516001600160401b0381111561012657610126610075565b61013a816101348454610089565b846100c1565b6020601f82116001811461016c575f83156101555750848201515b5f19600385901b1c1916600184901b178455610105565b5f84815260208120601f198516915b8281101561019b578785015182556020948501946001909201910161017b565b50848210156101b857868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b610737806101d45f395ff3fe608060405234801561000f575f80fd5b506004361061008c575f3560e01c806306fdde0314610090578063095ea7b3146100ae57806318160ddd146100d157806323b872dd146100e3578063313ce567146100f657806340c10f191461010557806370a082311461011a57806395d89b4114610142578063a9059cbb1461014a578063dd62ed3e1461015d575b5f80fd5b610098610170565b6040516100a59190610572565b60405180910390f35b6100c16100bc3660046105c2565b610200565b60405190151581526020016100a5565b6002545b6040519081526020016100a5565b6100c16100f13660046105ea565b610219565b604051601281526020016100a5565b6101186101133660046105c2565b61023c565b005b6100d5610128366004610624565b6001600160a01b03165f9081526020819052604090205490565b61009861024a565b6100c16101583660046105c2565b610259565b6100d561016b366004610644565b610266565b60606003805461017f90610675565b80601f01602080910402602001604051908101604052809291908181526020018280546101ab90610675565b80156101f65780601f106101cd576101008083540402835291602001916101f6565b820191905f5260205f20905b8154815290600101906020018083116101d957829003601f168201915b5050505050905090565b5f3361020d818585610290565b60019150505b92915050565b5f336102268582856102a2565b6102318585856102fc565b506001949350505050565b6102468282610359565b5050565b60606004805461017f90610675565b5f3361020d8185856102fc565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b61029d838383600161038d565b505050565b5f6102ad8484610266565b90505f198110156102f657818110156102e857828183604051637dc7a0d960e11b81526004016102df939291906106ad565b60405180910390fd5b6102f684848484035f61038d565b50505050565b6001600160a01b038316610325575f604051634b637e8f60e11b81526004016102df91906106ce565b6001600160a01b03821661034e575f60405163ec442f0560e01b81526004016102df91906106ce565b61029d83838361045f565b6001600160a01b038216610382575f60405163ec442f0560e01b81526004016102df91906106ce565b6102465f838361045f565b6001600160a01b0384166103b6575f60405163e602df0560e01b81526004016102df91906106ce565b6001600160a01b0383166103df575f604051634a1406b160e11b81526004016102df91906106ce565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156102f657826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161045191815260200190565b60405180910390a350505050565b6001600160a01b038316610489578060025f82825461047e91906106e2565b909155506104e69050565b6001600160a01b0383165f90815260208190526040902054818110156104c85783818360405163391434e360e21b81526004016102df939291906106ad565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661050257600280548290039055610520565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161056591815260200190565b60405180910390a3505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146105bd575f80fd5b919050565b5f80604083850312156105d3575f80fd5b6105dc836105a7565b946020939093013593505050565b5f805f606084860312156105fc575f80fd5b610605846105a7565b9250610613602085016105a7565b929592945050506040919091013590565b5f60208284031215610634575f80fd5b61063d826105a7565b9392505050565b5f8060408385031215610655575f80fd5b61065e836105a7565b915061066c602084016105a7565b90509250929050565b600181811c9082168061068957607f821691505b6020821081036106a757634e487b7160e01b5f52602260045260245ffd5b50919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0391909116815260200190565b8082018082111561021357634e487b7160e01b5f52601160045260245ffdfea2646970667358221220f9ae46a2e15270bfb77fe3d4d0ee0e45b749e3dde93805ee2cf795cb800244e664736f6c634300081a0033"; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:261](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L261) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerLightAccountClientActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerLightAccountClientActions.mdx deleted file mode 100644 index 2642041faf..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerLightAccountClientActions.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: multiOwnerLightAccountClientActions -description: Generates client actions for a multi-owner light account, including the ability to update owners. -slug: wallets/reference/account-kit/smart-contracts/variables/multiOwnerLightAccountClientActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const multiOwnerLightAccountClientActions: < - TTransport, - TChain, - TSigner, - TAccount, ->( - client, -) => MultiOwnerLightAccountClientActions; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/decorators/multiOwnerLightAccount.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/decorators/multiOwnerLightAccount.ts#L39) - -Generates client actions for a multi-owner light account, including the ability to update owners. - -## Example - -```ts -import { multiOwnerLightAccountClientActions, createMultiOwnerLightAccount } from "@account-kit/smart-contracts"; -import { createAlchemySmartAccountClient } from "@account-kit/infra"; -import { sepolia } from "@account-kit/infra"; - -const smartAccountClient = createAlchemySmartAccountClient({ - account: await createMultiOwnerLightAccount(...), - apiKey: "your-api-key", - chain: sepolia, -}).extend(multiOwnerLightAccountClientActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TAccount` *extends* `MultiOwnerLightAccount`\<`TSigner`> | `undefined` - - `MultiOwnerLightAccount`\<`TSigner`> | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - the client for interacting with the multi-owner light account -
- -## Returns - -[`MultiOwnerLightAccountClientActions`](../type-aliases/MultiOwnerLightAccountClientActions)\<`TSigner`, `TAccount`> - -an object containing the client actions specifically for a multi-owner light account diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerPluginActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerPluginActions.mdx deleted file mode 100644 index c3271ad01a..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/multiOwnerPluginActions.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: multiOwnerPluginActions -description: "Creates actions for the MultiOwner plugin, including reading owners and checking ownership. NOTE: this is already added to the client returned from createMultiOwnerModularAccountClient" -slug: wallets/reference/account-kit/smart-contracts/variables/multiOwnerPluginActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const multiOwnerPluginActions: ( - client, -) => MultiOwnerPluginActions; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multi-owner/extension.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multi-owner/extension.ts#L51) - -Creates actions for the MultiOwner plugin, including reading owners and checking ownership. -NOTE: this is already added to the client returned from createMultiOwnerModularAccountClient - -## Example - -```ts -import { multiOwnerPluginActions } from "@account-kit/smart-contracts"; -import { createSmartAccountClient } from "@aa-sdk/core"; - -const client = createSmartAccountClient(...).extend(multiOwnerPluginActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - the client instance containing the transport, chain, and account information -
- -## Returns - -[`MultiOwnerPluginActions`](../type-aliases/MultiOwnerPluginActions)\<`TAccount`> - -an object containing the actions for the MultiOwner plugin, such as `readOwners` and `isOwnerOf` diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/multisigPluginActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/multisigPluginActions.mdx deleted file mode 100644 index 288c4431dc..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/multisigPluginActions.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: multisigPluginActions -description: Provides actions for managing a multisig plugin within the specified client, including reading owners, checking ownership, getting the threshold, proposing user operations, and signing multisig user operations. -slug: wallets/reference/account-kit/smart-contracts/variables/multisigPluginActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const multisigPluginActions: ( - client, -) => MultisigPluginActions; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/extension.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/extension.ts#L74) - -Provides actions for managing a multisig plugin within the specified client, including reading owners, checking ownership, getting the threshold, proposing user operations, and signing multisig user operations. - -## Example - -```ts -import { createModularAccountAlchemyClient, multisigPluginActions } from "@account-kit/smart-contracts"; - -const client = createModularAccountAlchemyClient(...).extend(multisigPluginActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client instance configured with transport, chain, and account information -
- -## Returns - -[`MultisigPluginActions`](../type-aliases/MultisigPluginActions)\<`TAccount`> - -An object containing methods to perform actions related to the multisig plugin diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/multisigSignatureMiddleware.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/multisigSignatureMiddleware.mdx deleted file mode 100644 index 9e4fad99c6..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/multisigSignatureMiddleware.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: multisigSignatureMiddleware -description: A signer middleware to be used with Multisig Account Clients. This middleware handles correctly aggregating signatures passed through as context when sending UserOperations, proposing UserOperations, or adding signatures to a UserOperation. -slug: wallets/reference/account-kit/smart-contracts/variables/multisigSignatureMiddleware -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const multisigSignatureMiddleware: ClientMiddlewareFn; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/multisig/middleware.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/multisig/middleware.ts#L37) - -A signer middleware to be used with Multisig Account Clients. -This middleware handles correctly aggregating signatures passed through -as context when sending UserOperations, proposing UserOperations, or adding signatures to a UserOperation. - -## Param - -the user operation struct to be signed - -## Param - -the parameters to be passed to the middleware - -## Param - -the account to be used for signing - -## Param - -the smart account client that will be used for RPC requests - -## Param - -the context object containing the signatures to be aggregated MultisigUserOperationContext - -## Returns - -a Promise containing a UserOperation with an aggregated signature in the `signature` field diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/semiModularAccountBytecodeAbi.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/semiModularAccountBytecodeAbi.mdx deleted file mode 100644 index 1c6940dcb0..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/semiModularAccountBytecodeAbi.mdx +++ /dev/null @@ -1,1301 +0,0 @@ ---- -title: semiModularAccountBytecodeAbi -description: Overview of semiModularAccountBytecodeAbi -slug: wallets/reference/account-kit/smart-contracts/variables/semiModularAccountBytecodeAbi -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const semiModularAccountBytecodeAbi: readonly [ - { - inputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: "entryPoint"; - type: "address"; - }, - { - internalType: "contract ExecutionInstallDelegate"; - name: "executionInstallDelegate"; - type: "address"; - }, - ]; - stateMutability: "nonpayable"; - type: "constructor"; - }, - { - stateMutability: "payable"; - type: "fallback"; - }, - { - stateMutability: "payable"; - type: "receive"; - }, - { - inputs: readonly []; - name: "accountId"; - outputs: readonly [ - { - internalType: "string"; - name: ""; - type: "string"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly []; - name: "entryPoint"; - outputs: readonly [ - { - internalType: "contract IEntryPoint"; - name: ""; - type: "address"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "execute"; - outputs: readonly [ - { - internalType: "bytes"; - name: "result"; - type: "bytes"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "target"; - type: "address"; - }, - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - internalType: "struct Call[]"; - name: "calls"; - type: "tuple[]"; - }, - ]; - name: "executeBatch"; - outputs: readonly [ - { - internalType: "bytes[]"; - name: "results"; - type: "bytes[]"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "bytes32"; - name: "accountGasLimits"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "bytes32"; - name: "gasFees"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct PackedUserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - name: "executeUserOp"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "authorization"; - type: "bytes"; - }, - ]; - name: "executeWithRuntimeValidation"; - outputs: readonly [ - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "getExecutionData"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "module"; - type: "address"; - }, - { - internalType: "bool"; - name: "skipRuntimeValidation"; - type: "bool"; - }, - { - internalType: "bool"; - name: "allowGlobalValidation"; - type: "bool"; - }, - { - internalType: "HookConfig[]"; - name: "executionHooks"; - type: "bytes25[]"; - }, - ]; - internalType: "struct ExecutionDataView"; - name: "data"; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly []; - name: "getFallbackSignerData"; - outputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "ModuleEntity"; - name: "validationFunction"; - type: "bytes24"; - }, - ]; - name: "getValidationData"; - outputs: readonly [ - { - components: readonly [ - { - internalType: "ValidationFlags"; - name: "validationFlags"; - type: "uint8"; - }, - { - internalType: "HookConfig[]"; - name: "validationHooks"; - type: "bytes25[]"; - }, - { - internalType: "HookConfig[]"; - name: "executionHooks"; - type: "bytes25[]"; - }, - { - internalType: "bytes4[]"; - name: "selectors"; - type: "bytes4[]"; - }, - ]; - internalType: "struct ValidationDataView"; - name: "data"; - type: "tuple"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "module"; - type: "address"; - }, - { - components: readonly [ - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "bool"; - name: "skipRuntimeValidation"; - type: "bool"; - }, - { - internalType: "bool"; - name: "allowGlobalValidation"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionFunction[]"; - name: "executionFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "uint32"; - name: "entityId"; - type: "uint32"; - }, - { - internalType: "bool"; - name: "isPreHook"; - type: "bool"; - }, - { - internalType: "bool"; - name: "isPostHook"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - ]; - internalType: "struct ExecutionManifest"; - name: "manifest"; - type: "tuple"; - }, - { - internalType: "bytes"; - name: "moduleInstallData"; - type: "bytes"; - }, - ]; - name: "installExecution"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "ValidationConfig"; - name: "validationConfig"; - type: "bytes25"; - }, - { - internalType: "bytes4[]"; - name: "selectors"; - type: "bytes4[]"; - }, - { - internalType: "bytes"; - name: "installData"; - type: "bytes"; - }, - { - internalType: "bytes[]"; - name: "hooks"; - type: "bytes[]"; - }, - ]; - name: "installValidation"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes32"; - name: "hash"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - name: "isValidSignature"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256[]"; - name: ""; - type: "uint256[]"; - }, - { - internalType: "uint256[]"; - name: ""; - type: "uint256[]"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC1155BatchReceived"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC1155Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "address"; - name: ""; - type: "address"; - }, - { - internalType: "uint256"; - name: ""; - type: "uint256"; - }, - { - internalType: "bytes"; - name: ""; - type: "bytes"; - }, - ]; - name: "onERC721Received"; - outputs: readonly [ - { - internalType: "bytes4"; - name: ""; - type: "bytes4"; - }, - ]; - stateMutability: "pure"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "uint256"; - name: "value"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bool"; - name: "isCreate2"; - type: "bool"; - }, - { - internalType: "bytes32"; - name: "salt"; - type: "bytes32"; - }, - ]; - name: "performCreate"; - outputs: readonly [ - { - internalType: "address"; - name: "createdAddr"; - type: "address"; - }, - ]; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly []; - name: "proxiableUUID"; - outputs: readonly [ - { - internalType: "bytes32"; - name: ""; - type: "bytes32"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "interfaceId"; - type: "bytes4"; - }, - ]; - name: "supportsInterface"; - outputs: readonly [ - { - internalType: "bool"; - name: ""; - type: "bool"; - }, - ]; - stateMutability: "view"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "module"; - type: "address"; - }, - { - components: readonly [ - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "bool"; - name: "skipRuntimeValidation"; - type: "bool"; - }, - { - internalType: "bool"; - name: "allowGlobalValidation"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionFunction[]"; - name: "executionFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "uint32"; - name: "entityId"; - type: "uint32"; - }, - { - internalType: "bool"; - name: "isPreHook"; - type: "bool"; - }, - { - internalType: "bool"; - name: "isPostHook"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - ]; - internalType: "struct ExecutionManifest"; - name: "manifest"; - type: "tuple"; - }, - { - internalType: "bytes"; - name: "moduleUninstallData"; - type: "bytes"; - }, - ]; - name: "uninstallExecution"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "ModuleEntity"; - name: "validationFunction"; - type: "bytes24"; - }, - { - internalType: "bytes"; - name: "uninstallData"; - type: "bytes"; - }, - { - internalType: "bytes[]"; - name: "hookUninstallData"; - type: "bytes[]"; - }, - ]; - name: "uninstallValidation"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "fallbackSigner"; - type: "address"; - }, - { - internalType: "bool"; - name: "isDisabled"; - type: "bool"; - }, - ]; - name: "updateFallbackSignerData"; - outputs: readonly []; - stateMutability: "nonpayable"; - type: "function"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "newImplementation"; - type: "address"; - }, - { - internalType: "bytes"; - name: "data"; - type: "bytes"; - }, - ]; - name: "upgradeToAndCall"; - outputs: readonly []; - stateMutability: "payable"; - type: "function"; - }, - { - inputs: readonly [ - { - components: readonly [ - { - internalType: "address"; - name: "sender"; - type: "address"; - }, - { - internalType: "uint256"; - name: "nonce"; - type: "uint256"; - }, - { - internalType: "bytes"; - name: "initCode"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "callData"; - type: "bytes"; - }, - { - internalType: "bytes32"; - name: "accountGasLimits"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "preVerificationGas"; - type: "uint256"; - }, - { - internalType: "bytes32"; - name: "gasFees"; - type: "bytes32"; - }, - { - internalType: "bytes"; - name: "paymasterAndData"; - type: "bytes"; - }, - { - internalType: "bytes"; - name: "signature"; - type: "bytes"; - }, - ]; - internalType: "struct PackedUserOperation"; - name: "userOp"; - type: "tuple"; - }, - { - internalType: "bytes32"; - name: "userOpHash"; - type: "bytes32"; - }, - { - internalType: "uint256"; - name: "missingAccountFunds"; - type: "uint256"; - }, - ]; - name: "validateUserOp"; - outputs: readonly [ - { - internalType: "uint256"; - name: "validationData"; - type: "uint256"; - }, - ]; - stateMutability: "nonpayable"; - type: "function"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "module"; - type: "address"; - }, - { - components: readonly [ - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "bool"; - name: "skipRuntimeValidation"; - type: "bool"; - }, - { - internalType: "bool"; - name: "allowGlobalValidation"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionFunction[]"; - name: "executionFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "uint32"; - name: "entityId"; - type: "uint32"; - }, - { - internalType: "bool"; - name: "isPreHook"; - type: "bool"; - }, - { - internalType: "bool"; - name: "isPostHook"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - ]; - indexed: false; - internalType: "struct ExecutionManifest"; - name: "manifest"; - type: "tuple"; - }, - ]; - name: "ExecutionInstalled"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "module"; - type: "address"; - }, - { - indexed: false; - internalType: "bool"; - name: "onUninstallSucceeded"; - type: "bool"; - }, - { - components: readonly [ - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "bool"; - name: "skipRuntimeValidation"; - type: "bool"; - }, - { - internalType: "bool"; - name: "allowGlobalValidation"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionFunction[]"; - name: "executionFunctions"; - type: "tuple[]"; - }, - { - components: readonly [ - { - internalType: "bytes4"; - name: "executionSelector"; - type: "bytes4"; - }, - { - internalType: "uint32"; - name: "entityId"; - type: "uint32"; - }, - { - internalType: "bool"; - name: "isPreHook"; - type: "bool"; - }, - { - internalType: "bool"; - name: "isPostHook"; - type: "bool"; - }, - ]; - internalType: "struct ManifestExecutionHook[]"; - name: "executionHooks"; - type: "tuple[]"; - }, - { - internalType: "bytes4[]"; - name: "interfaceIds"; - type: "bytes4[]"; - }, - ]; - indexed: false; - internalType: "struct ExecutionManifest"; - name: "manifest"; - type: "tuple"; - }, - ]; - name: "ExecutionUninstalled"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "newFallbackSigner"; - type: "address"; - }, - { - indexed: false; - internalType: "bool"; - name: "isDisabled"; - type: "bool"; - }, - ]; - name: "FallbackSignerUpdated"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: false; - internalType: "uint64"; - name: "version"; - type: "uint64"; - }, - ]; - name: "Initialized"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "implementation"; - type: "address"; - }, - ]; - name: "Upgraded"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "module"; - type: "address"; - }, - { - indexed: true; - internalType: "uint32"; - name: "entityId"; - type: "uint32"; - }, - ]; - name: "ValidationInstalled"; - type: "event"; - }, - { - anonymous: false; - inputs: readonly [ - { - indexed: true; - internalType: "address"; - name: "module"; - type: "address"; - }, - { - indexed: true; - internalType: "uint32"; - name: "entityId"; - type: "uint32"; - }, - { - indexed: false; - internalType: "bool"; - name: "onUninstallSucceeded"; - type: "bool"; - }, - ]; - name: "ValidationUninstalled"; - type: "event"; - }, - { - inputs: readonly []; - name: "ArrayLengthMismatch"; - type: "error"; - }, - { - inputs: readonly []; - name: "CreateFailed"; - type: "error"; - }, - { - inputs: readonly []; - name: "DeferredActionSignatureInvalid"; - type: "error"; - }, - { - inputs: readonly []; - name: "DeferredValidationHasValidationHooks"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "HookConfig"; - name: "hookConfig"; - type: "bytes25"; - }, - ]; - name: "ExecutionHookAlreadySet"; - type: "error"; - }, - { - inputs: readonly []; - name: "FallbackSignerDisabled"; - type: "error"; - }, - { - inputs: readonly []; - name: "FallbackSignerMismatch"; - type: "error"; - }, - { - inputs: readonly []; - name: "FallbackValidationInstallationNotAllowed"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "module"; - type: "address"; - }, - ]; - name: "InterfaceNotSupported"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidInitialization"; - type: "error"; - }, - { - inputs: readonly []; - name: "InvalidSignatureType"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "address"; - name: "module"; - type: "address"; - }, - { - internalType: "bytes"; - name: "revertReason"; - type: "bytes"; - }, - ]; - name: "ModuleInstallCallbackFailed"; - type: "error"; - }, - { - inputs: readonly []; - name: "NonCanonicalEncoding"; - type: "error"; - }, - { - inputs: readonly []; - name: "NotEntryPoint"; - type: "error"; - }, - { - inputs: readonly []; - name: "PreValidationHookDuplicate"; - type: "error"; - }, - { - inputs: readonly []; - name: "RequireUserOperationContext"; - type: "error"; - }, - { - inputs: readonly []; - name: "SegmentOutOfOrder"; - type: "error"; - }, - { - inputs: readonly []; - name: "SelfCallRecursionDepthExceeded"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "ModuleEntity"; - name: "validationFunction"; - type: "bytes24"; - }, - ]; - name: "SignatureValidationInvalid"; - type: "error"; - }, - { - inputs: readonly []; - name: "UnauthorizedCallContext"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "ModuleEntity"; - name: "validationFunction"; - type: "bytes24"; - }, - { - internalType: "address"; - name: "aggregator"; - type: "address"; - }, - ]; - name: "UnexpectedAggregator"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "UnrecognizedFunction"; - type: "error"; - }, - { - inputs: readonly []; - name: "UpgradeFailed"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "ModuleEntity"; - name: "validationFunction"; - type: "bytes24"; - }, - ]; - name: "UserOpValidationInvalid"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - { - internalType: "ModuleEntity"; - name: "validationFunction"; - type: "bytes24"; - }, - ]; - name: "ValidationAlreadySet"; - type: "error"; - }, - { - inputs: readonly []; - name: "ValidationAssocHookLimitExceeded"; - type: "error"; - }, - { - inputs: readonly []; - name: "ValidationEntityIdInUse"; - type: "error"; - }, - { - inputs: readonly [ - { - internalType: "bytes4"; - name: "selector"; - type: "bytes4"; - }, - ]; - name: "ValidationFunctionMissing"; - type: "error"; - }, - { - inputs: readonly []; - name: "ValidationSignatureSegmentMissing"; - type: "error"; - }, -]; -``` - -Defined in: [account-kit/smart-contracts/src/ma-v2/abis/semiModularAccountBytecodeAbi.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/abis/semiModularAccountBytecodeAbi.ts#L1) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/sessionKeyPluginActions.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/sessionKeyPluginActions.mdx deleted file mode 100644 index fcd681ef85..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/sessionKeyPluginActions.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: sessionKeyPluginActions -description: Creates actions for managing session keys in a smart contract associated with a client, including adding, removing, rotating, and updating session key permissions. -slug: wallets/reference/account-kit/smart-contracts/variables/sessionKeyPluginActions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const sessionKeyPluginActions: ( - client, -) => SessionKeyPluginActions; -``` - -Defined in: [account-kit/smart-contracts/src/msca/plugins/session-key/extension.ts:99](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/plugins/session-key/extension.ts#L99) - -Creates actions for managing session keys in a smart contract associated with a client, including adding, removing, rotating, and updating session key permissions. - -## Example - -```ts -import { createModularAccountAlchemyClient, sessionKeyPluginActions } from "@account-kit/smart-contracts"; - -const client = createModularAccountAlchemyClient(...).extend(sessionKeyPluginActions); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TAccount` *extends* `SmartContractAccount` | `undefined` - - `SmartContractAccount` | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client instance to use for managing session keys -
- -## Returns - -[`SessionKeyPluginActions`](../type-aliases/SessionKeyPluginActions)\<`TAccount`> - -An object containing methods for session key management and interaction with the smart contract diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/standardExecutor.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/standardExecutor.mdx deleted file mode 100644 index b958c69b11..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/standardExecutor.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: standardExecutor -description: Overview of standardExecutor -slug: wallets/reference/account-kit/smart-contracts/variables/standardExecutor -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const standardExecutor: Pick< - SmartContractAccount, - "encodeExecute" | "encodeBatchExecute" ->; -``` - -Defined in: [account-kit/smart-contracts/src/msca/account/standardExecutor.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/msca/account/standardExecutor.ts#L5) diff --git a/docs/pages/reference/account-kit/smart-contracts/src/variables/updateMultiOwnerLightAccountOwners.mdx b/docs/pages/reference/account-kit/smart-contracts/src/variables/updateMultiOwnerLightAccountOwners.mdx deleted file mode 100644 index 82cb39e87b..0000000000 --- a/docs/pages/reference/account-kit/smart-contracts/src/variables/updateMultiOwnerLightAccountOwners.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: updateMultiOwnerLightAccountOwners -description: Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones. -slug: wallets/reference/account-kit/smart-contracts/variables/updateMultiOwnerLightAccountOwners -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -const updateMultiOwnerLightAccountOwners: < - TTransport, - TChain, - TSigner, - TAccount, ->( - client, - args, -) => Promise; -``` - -Defined in: [account-kit/smart-contracts/src/light-account/actions/updateOwners.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/light-account/actions/updateOwners.ts#L51) - -Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones. - -## Example - -```ts -import { - updateOwners, - createLightAccountClient, -} from "@account-kit/smart-contracts"; - -const lightAccountClient = createLightAccountClient({ - signer, - transport, - chain, -}); - -const txHash = await updateOwners(lightAccountClient, { - ownerstoAdd: [newOwnerAddress], // or empty if you just want to remove owners - ownersToRemove: [oldOwnerAddress], // or empty if you just want to add owners - waitForTxn: true, // set to false to return a uoHash instead -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TTransport` *extends* [`Transport`](https://viem.sh) - - [`Transport`](https://viem.sh) -
- `TChain` *extends* [`Chain`](https://viem.sh) | `undefined` - - [`Chain`](https://viem.sh) | `undefined` -
- `TSigner` *extends* `SmartAccountSigner` - - `SmartAccountSigner` -
- `TAccount` *extends* `MultiOwnerLightAccount`\<`TSigner`> | `undefined` - - `MultiOwnerLightAccount`\<`TSigner`> | `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - [`Client`](https://viem.sh)\<`TTransport`, `TChain`, `TAccount`> - - The client instance used to interact with the account -
- `args` - - `UpdateMultiOwnerLightAccountOwnersParams`\<`TSigner`, `TAccount`> - - The parameters for updating the account owners -
- -## Returns - -`Promise`\<[`Hex`](https://viem.sh)> - -A promise that resolves to the transaction hash or the full transaction result if `waitForTxn` is `true` diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/README.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/README.mdx deleted file mode 100644 index 4409ee4524..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/README.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: account-kit/wallet-client -description: Overview of account-kit/wallet-client -slug: wallets/reference/account-kit/wallet-client -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -## Type Aliases - -| Type Alias | Description | -| :----------------------------------------------------------------------------------------------------------------- | :---------- | -| [FormatSignParams](/wallets/reference/account-kit/wallet-client/type-aliases/FormatSignParams) | - | -| [FormatSignResult](/wallets/reference/account-kit/wallet-client/type-aliases/FormatSignResult) | - | -| [GetAccountParam](/wallets/reference/account-kit/wallet-client/type-aliases/GetAccountParam) | - | -| [GetCallsStatusParams](/wallets/reference/account-kit/wallet-client/type-aliases/GetCallsStatusParams) | - | -| [GetCallsStatusResult](/wallets/reference/account-kit/wallet-client/type-aliases/GetCallsStatusResult) | - | -| [GrantPermissionsParams](/wallets/reference/account-kit/wallet-client/type-aliases/GrantPermissionsParams) | - | -| [GrantPermissionsResult](/wallets/reference/account-kit/wallet-client/type-aliases/GrantPermissionsResult) | - | -| [ListAccountsParams](/wallets/reference/account-kit/wallet-client/type-aliases/ListAccountsParams) | - | -| [ListAccountsResult](/wallets/reference/account-kit/wallet-client/type-aliases/ListAccountsResult) | - | -| [PrepareCallsParams](/wallets/reference/account-kit/wallet-client/type-aliases/PrepareCallsParams) | - | -| [PrepareCallsResult](/wallets/reference/account-kit/wallet-client/type-aliases/PrepareCallsResult) | - | -| [PrepareSignParams](/wallets/reference/account-kit/wallet-client/type-aliases/PrepareSignParams) | - | -| [PrepareSignResult](/wallets/reference/account-kit/wallet-client/type-aliases/PrepareSignResult) | - | -| [RequestAccountParams](/wallets/reference/account-kit/wallet-client/type-aliases/RequestAccountParams) | - | -| [RequestAccountResult](/wallets/reference/account-kit/wallet-client/type-aliases/RequestAccountResult) | - | -| [SendCallsParams](/wallets/reference/account-kit/wallet-client/type-aliases/SendCallsParams) | - | -| [SendCallsResult](/wallets/reference/account-kit/wallet-client/type-aliases/SendCallsResult) | - | -| [SendPreparedCallsParams](/wallets/reference/account-kit/wallet-client/type-aliases/SendPreparedCallsParams) | - | -| [SendPreparedCallsResult](/wallets/reference/account-kit/wallet-client/type-aliases/SendPreparedCallsResult) | - | -| [SignMessageParams](/wallets/reference/account-kit/wallet-client/type-aliases/SignMessageParams) | - | -| [SignMessageResult](/wallets/reference/account-kit/wallet-client/type-aliases/SignMessageResult) | - | -| [SignPreparedCallsParams](/wallets/reference/account-kit/wallet-client/type-aliases/SignPreparedCallsParams) | - | -| [SignPreparedCallsResult](/wallets/reference/account-kit/wallet-client/type-aliases/SignPreparedCallsResult) | - | -| [SignSignatureRequestParams](/wallets/reference/account-kit/wallet-client/type-aliases/SignSignatureRequestParams) | - | -| [SignSignatureRequestResult](/wallets/reference/account-kit/wallet-client/type-aliases/SignSignatureRequestResult) | - | -| [SignTypedDataParams](/wallets/reference/account-kit/wallet-client/type-aliases/SignTypedDataParams) | - | -| [SignTypedDataResult](/wallets/reference/account-kit/wallet-client/type-aliases/SignTypedDataResult) | - | -| [SmartWalletClient](/wallets/reference/account-kit/wallet-client/type-aliases/SmartWalletClient) | - | -| [SmartWalletClientParams](/wallets/reference/account-kit/wallet-client/type-aliases/SmartWalletClientParams) | - | - -## Functions - -| Function | Description | -| :-------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [createSmartWalletClient](/wallets/reference/account-kit/wallet-client/functions/createSmartWalletClient) | Creates a smart wallet client that can be used to interact with a smart account. | -| [formatSign](/wallets/reference/account-kit/wallet-client/functions/formatSign) | Formats a signature request for signing messages or transactions. | -| [getCallsStatus](/wallets/reference/account-kit/wallet-client/functions/getCallsStatus) | Gets the status of a prepared call by its ID. This method is used to check the execution status of calls sent via sendPreparedCalls. | -| [grantPermissions](/wallets/reference/account-kit/wallet-client/functions/grantPermissions) | Grants permissions to a smart account by creating a session. This allows another key to perform operations on behalf of the account. | -| [listAccounts](/wallets/reference/account-kit/wallet-client/functions/listAccounts) | Lists all smart accounts for a given signer using the wallet API client. | -| [prepareCalls](/wallets/reference/account-kit/wallet-client/functions/prepareCalls) | Prepares a set of contract calls for execution by building a user operation. Returns the built user operation and a signature request that needs to be signed before submitting to sendPreparedCalls. | -| [prepareSign](/wallets/reference/account-kit/wallet-client/functions/prepareSign) | Prepares a signature request for signing messages or transactions. | -| [requestAccount](/wallets/reference/account-kit/wallet-client/functions/requestAccount) | Requests an account for the provided signer using the wallet API client. If an account already exists for the signer, it will always return that account unless a new ID is specified. If an account already exists, the creationHint will be ignored. | -| [sendCalls](/wallets/reference/account-kit/wallet-client/functions/sendCalls) | Prepares, signs, and submits calls. This function internally calls `prepareCalls`, `signPreparedCalls`, and `sendPreparedCalls`. | -| [sendPreparedCalls](/wallets/reference/account-kit/wallet-client/functions/sendPreparedCalls) | Sends prepared calls by submitting a signed user operation. This method is used after signing the signature request returned from prepareCalls. | -| [signMessage](/wallets/reference/account-kit/wallet-client/functions/signMessage) | Signs a message using the smart account. This method requests the account associated with the signer and uses it to sign the message. | -| [signPreparedCalls](/wallets/reference/account-kit/wallet-client/functions/signPreparedCalls) | Signs prepared calls using the provided signer. | -| [signSignatureRequest](/wallets/reference/account-kit/wallet-client/functions/signSignatureRequest) | Signs a signature request using the provided signer. This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization. | -| [signTypedData](/wallets/reference/account-kit/wallet-client/functions/signTypedData) | Signs typed data (EIP-712) using the smart account. This method requests the account associated with the signer and uses it to sign the typed data. | -| [waitForCallsStatus](/wallets/reference/account-kit/wallet-client/functions/waitForCallsStatus) | Waits for the status of a prepared call to be updated, returning after the calls are no longer pending. | diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/createSmartWalletClient.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/createSmartWalletClient.mdx deleted file mode 100644 index 1b973b77f1..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/createSmartWalletClient.mdx +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: createSmartWalletClient -description: Overview of the createSmartWalletClient function -slug: wallets/reference/account-kit/wallet-client/functions/createSmartWalletClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function createSmartWalletClient(params): SmartWalletClient; -``` - -Defined in: [account-kit/wallet-client/src/client/index.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/index.ts#L74) - -Creates a smart wallet client that can be used to interact with a smart account. - -## Example - -```ts -import { LocalAccountSigner } from "@aa-sdk/core"; -import { alchemy, arbitrumSepolia } from "@account-kit/infra"; -import { generatePrivateKey } from "viem/accounts"; -import { createSmartWalletClient } from "@account-kit/wallet-client"; - -const signer = - LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()); -const transport = alchemy({ - apiKey: "your-alchemy-api-key", -}); -const client = createSmartWalletClient({ - transport, - chain: arbitrumSepolia, - signer, -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `params` - - [`SmartWalletClientParams`](../type-aliases/SmartWalletClientParams)\<`TAccount`> - - The parameters for creating the smart wallet client -
- -## Returns - -[`SmartWalletClient`](../type-aliases/SmartWalletClient)\<`TAccount`> - -- A viem-compatible client diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/formatSign.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/formatSign.mdx deleted file mode 100644 index 3af793c900..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/formatSign.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: formatSign -description: Overview of the formatSign function -slug: wallets/reference/account-kit/wallet-client/functions/formatSign -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function formatSign(client, params): Promise<{}>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/formatSign.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/formatSign.ts#L42) - -Formats a signature request for signing messages or transactions. - -## Example - -```ts -// Formats a signature -const result = await client.formatSign({ - from: "0x1234...", - signature: { - type: "ecdsa", - data: "0xabcd...", - }, -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` | `` `0x${string}` `` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `params` - - [`FormatSignParams`](../type-aliases/FormatSignParams)\<`TAccount`> - - Parameters for formatting the signature -
- -## Returns - -`Promise`\<\{ -}> - -A Promise that resolves to the formatSign result containing the formatted signature. diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/getCallsStatus.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/getCallsStatus.mdx deleted file mode 100644 index 2644e32a11..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/getCallsStatus.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: getCallsStatus -description: Overview of the getCallsStatus function -slug: wallets/reference/account-kit/wallet-client/functions/getCallsStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function getCallsStatus(client, params): Promise<{}>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/getCallsStatus.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/getCallsStatus.ts#L39) - -Gets the status of a prepared call by its ID. -This method is used to check the execution status of calls sent via sendPreparedCalls. - -## Example - -```ts -// After sending prepared calls -const sendResult = await client.sendPreparedCalls({...}); - -// Check the status of the call ID -const status = await client.getCallsStatus(sendResult.id); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `params` - - `` `0x${string}` `` - - The ID of the prepared call to check -
- -## Returns - -`Promise`\<\{ -}> - -A Promise that resolves to the status information including: - -- id: The hex ID of the call -- chainId: The chain ID in hex format -- status: The current status of the batch execution -- receipts: Optional array of transaction receipts if the batch has been executed diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/grantPermissions.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/grantPermissions.mdx deleted file mode 100644 index d271f93e7d..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/grantPermissions.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: grantPermissions -description: Overview of the grantPermissions function -slug: wallets/reference/account-kit/wallet-client/functions/grantPermissions -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function grantPermissions( - client, - signer, - params, -): Promise; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/grantPermissions.ts:94](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/grantPermissions.ts#L94) - -Grants permissions to a smart account by creating a session. -This allows another key to perform operations on behalf of the account. - -## Example - -```ts -// Create a session key and grant root permissions -const sessionKey = LocalAccountSigner.generatePrivateKeySigner(); -const account = await client.requestAccount(); - -const permissions = await client.grantPermissions({ - account: account.address, - expirySec: Math.floor(Date.now() / 1000) + 60 * 60, // 1 hour from now - key: { - publicKey: await sessionKey.getAddress(), - type: "secp256k1", - }, - permissions: [{ type: "root" }], -}); - -// Use the permissions to prepare a call -const preparedCalls = await client.prepareCalls({ - calls: [{ to: zeroAddress, value: "0x0" }], - from: account.address, - capabilities: { - paymasterService: { - policyId: "your-paymaster-policy-id", - }, - permissions, - }, -}); - -// Sign with the session key -const signedCalls = await signPreparedCalls(sessionKey, preparedCalls); - -// Send the prepared call using the session key -const result = await client.sendPreparedCalls({ - ...signedCalls, - capabilities: { - permissions, - }, -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` | `` `0x${string}` `` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `signer` - - `SmartWalletSigner` - - The signer of the smart account -
- `params` - - \{ \[K in string | number | symbol]: (Omit\<\{} & \{}, "account" | "chainId"> & (IsUndefined\ extends true ? \{ account: \`0x$\{string}\` } : \{ account?: undefined }))\[K] } - - The parameters for granting permissions -
- -## Returns - -`Promise`\<[`GrantPermissionsResult`](../type-aliases/GrantPermissionsResult)> - -A Promise that resolves to the result containing a context identifier diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/listAccounts.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/listAccounts.mdx deleted file mode 100644 index 432886c7e9..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/listAccounts.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: listAccounts -description: Overview of the listAccounts function -slug: wallets/reference/account-kit/wallet-client/functions/listAccounts -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function listAccounts(client, signer, params): Promise<{}>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/listAccounts.ts:50](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/listAccounts.ts#L50) - -Lists all smart accounts for a given signer using the wallet API client. - -## Example - -```ts -// Fetch the first page of accounts -const firstPage = await client.listAccounts({ - signerAddress: "0x123...", - limit: 10, -}); - -// If an 'after' cursor exists, use it to fetch the next page -const nextPage = await client.listAccounts({ - signerAddress: "0x123...", - limit: 10, - after: firstPage.meta.after, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `signer` - - `SmartWalletSigner` - - The signer for which to list accounts -
- `params` - - [`ListAccountsParams`](../type-aliases/ListAccountsParams) - - Parameters for listing accounts -
- -## Returns - -`Promise`\<\{ -}> - -A Promise that resolves to the list of accounts and pagination metadata diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/prepareCalls.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/prepareCalls.mdx deleted file mode 100644 index 7055771f87..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/prepareCalls.mdx +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: prepareCalls -description: Overview of the prepareCalls function -slug: wallets/reference/account-kit/wallet-client/functions/prepareCalls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function prepareCalls( - client, - params, -): Promise<{} | {} | {} | ({} & object)>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/prepareCalls.ts:57](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/prepareCalls.ts#L57) - -Prepares a set of contract calls for execution by building a user operation. -Returns the built user operation and a signature request that needs to be signed -before submitting to sendPreparedCalls. - -## Example - -```ts -// Prepare a sponsored user operation call -const result = await client.prepareCalls({ - calls: [ - { - to: "0x1234...", - data: "0xabcdef...", - value: "0x0", - }, - ], - capabilities: { - paymasterService: { policyId: "your-policy-id" }, - }, -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` | `` `0x${string}` `` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `params` - - [`PrepareCallsParams`](../type-aliases/PrepareCallsParams)\<`TAccount`> - - Parameters for preparing calls -
- -## Returns - -`Promise`\< -| \{ -} -| \{ -} -| \{ -} -| \{ -} & `object`> - -A Promise that resolves to the prepared calls result containing -the user operation data and signature request diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/prepareSign.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/prepareSign.mdx deleted file mode 100644 index 749695b45c..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/prepareSign.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: prepareSign -description: Overview of the prepareSign function -slug: wallets/reference/account-kit/wallet-client/functions/prepareSign -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function prepareSign(client, params): Promise<{}>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/prepareSign.ts:40](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/prepareSign.ts#L40) - -Prepares a signature request for signing messages or transactions. - -## Example - -```ts -// Prepare a message to be signed -const result = await client.prepareSign({ - from: "0x1234...", - type: "personal_sign", - data: "Hello, world!", -}); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` | `` `0x${string}` `` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `params` - - [`PrepareSignParams`](../type-aliases/PrepareSignParams)\<`TAccount`> - - Parameters for preparing the signature request -
- -## Returns - -`Promise`\<\{ -}> - -A Promise that resolves to the prepare sign result containing a signature request diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/requestAccount.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/requestAccount.mdx deleted file mode 100644 index 195d69132e..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/requestAccount.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: requestAccount -description: Overview of the requestAccount function -slug: wallets/reference/account-kit/wallet-client/functions/requestAccount -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function requestAccount(client, signer, params?): Promise; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/requestAccount.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/requestAccount.ts#L45) - -Requests an account for the provided signer using the wallet API client. -If an account already exists for the signer, it will always return that account unless a new ID is specified. -If an account already exists, the creationHint will be ignored. - -## Example - -```ts -// Request an account with default parameters using a local signer -const signer = LocalAccountSigner.privateKeyToAccountSigner("0x..."); -const account = await client.requestAccount(signer); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `signer` - - `SmartWalletSigner` - - The signer that will be associated with the account -
- `params?` - - [`RequestAccountParams`](../type-aliases/RequestAccountParams) - - Optional parameters for requesting a specific account -
- -## Returns - -`Promise`\<[`RequestAccountResult`](../type-aliases/RequestAccountResult)> - -A Promise that resolves to a SmartContractAccount instance diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/sendCalls.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/sendCalls.mdx deleted file mode 100644 index 9bb7e51c4d..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/sendCalls.mdx +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: sendCalls -description: Overview of the sendCalls function -slug: wallets/reference/account-kit/wallet-client/functions/sendCalls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function sendCalls(client, signer, params): Promise<{}>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/sendCalls.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/sendCalls.ts#L53) - -Prepares, signs, and submits calls. This function internally calls `prepareCalls`, `signPreparedCalls`, and `sendPreparedCalls`. - -\ -If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden -from the user. It is recommended to use the `prepareCalls` action instead to manually handle the permit signature. -\ - -## Example - -```ts -const result = await client.sendCalls({ - calls: [ - { - to: "0x1234...", - data: "0xabcdef...", - value: "0x0", - }, - ], - capabilities: { - paymasterService: { policyId: "your-policy-id" }, - }, -}); - -// The result contains the call ID -console.log(result.id); -``` - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* `undefined` | `` `0x${string}` `` - - `undefined` | `` `0x${string}` `` -
- -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `signer` - - `SmartWalletSigner` - - The signer to use -
- `params` - - [`SendCallsParams`](../type-aliases/SendCallsParams)\<`TAccount`> - - Parameters for sending calls -
- -## Returns - -`Promise`\<\{ -}> - -A Promise that resolves to the result containing the call ID. diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signMessage.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signMessage.mdx deleted file mode 100644 index 1693e72e01..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signMessage.mdx +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: signMessage -description: Overview of the signMessage function -slug: wallets/reference/account-kit/wallet-client/functions/signMessage -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function signMessage(client, signer, params): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signMessage.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signMessage.ts#L31) - -Signs a message using the smart account. -This method requests the account associated with the signer and uses it to sign the message. - -## Example - -```ts -// Sign a simple text message -const signature = await client.signMessage("Hello, world!"); - -// Sign a raw hex message -const signature = await client.signMessage({ - raw: "0x48656c6c6f2c20776f726c6421", -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `signer` - - `SmartWalletSigner` - - The signer of the smart account -
- `params` - - [`SignMessageParams`](../type-aliases/SignMessageParams) - - Parameters for signing the message -
- -## Returns - -`Promise`\<`` `0x${string}` ``> - -A Promise that resolves to the signed message as a hex string diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signPreparedCalls.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signPreparedCalls.mdx deleted file mode 100644 index f05fb302c0..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signPreparedCalls.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: signPreparedCalls -description: Overview of the signPreparedCalls function -slug: wallets/reference/account-kit/wallet-client/functions/signPreparedCalls -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function signPreparedCalls( - signer, - params, -): Promise<(object & object) | (object & object) | ({} & object)>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signPreparedCalls.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signPreparedCalls.ts#L34) - -Signs prepared calls using the provided signer. - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `signer` - - `SmartWalletSigner` - - The signer to use -
- `params` - - | \{ } | \{ } | \{ } | \{ } & `object` - - The prepared calls with signature requests -
- -## Returns - -`Promise`\< -| `object` & `object` -| `object` & `object` -| \{ -} & `object`> - -A Promise that resolves to the signed calls diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signSignatureRequest.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signSignatureRequest.mdx deleted file mode 100644 index 76c9e4b353..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signSignatureRequest.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: signSignatureRequest -description: Overview of the signSignatureRequest function -slug: wallets/reference/account-kit/wallet-client/functions/signSignatureRequest -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function signSignatureRequest(signer, params): Promise<{} | {}>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signSignatureRequest.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signSignatureRequest.ts#L55) - -Signs a signature request using the provided signer. -This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization. - -## Example - -```ts -// Sign a personal message -const result = await client.signSignatureRequest({ - type: 'personal_sign', - data: 'Hello, world!' -}); - -// Sign typed data (EIP-712) -const result = await client.signSignatureRequest({ - type: 'eth_signTypedData_v4', - data: { - domain: { ... }, - types: { ... }, - primaryType: '...', - message: { ... } - } -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `signer` - - `SmartWalletSigner` - - The signer to use for signing the request -
- `params` - - [`SignSignatureRequestParams`](../type-aliases/SignSignatureRequestParams) - - The signature request parameters -
- -## Returns - -`Promise`\< -| \{ -} -| \{ -}> - -A Promise that resolves to the signature result diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signTypedData.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signTypedData.mdx deleted file mode 100644 index 014915c001..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/signTypedData.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: signTypedData -description: Overview of the signTypedData function -slug: wallets/reference/account-kit/wallet-client/functions/signTypedData -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function signTypedData(client, signer, params): Promise<`0x${string}`>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signTypedData.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signTypedData.ts#L46) - -Signs typed data (EIP-712) using the smart account. -This method requests the account associated with the signer and uses it to sign the typed data. - -## Example - -```ts -// Sign typed data -const signature = await client.signTypedData({ - domain: { - name: "Example DApp", - version: "1", - chainId: 1, - verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", - }, - types: { - Person: [ - { name: "name", type: "string" }, - { name: "wallet", type: "address" }, - ], - }, - primaryType: "Person", - message: { - name: "John Doe", - wallet: "0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa", - }, -}); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `signer` - - `SmartWalletSigner` - - The signer of the smart account -
- `params` - - [`SignTypedDataParams`](../type-aliases/SignTypedDataParams) - - The typed data to sign, following EIP-712 format -
- -## Returns - -`Promise`\<`` `0x${string}` ``> - -A Promise that resolves to the signature as a hex string diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/waitForCallsStatus.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/functions/waitForCallsStatus.mdx deleted file mode 100644 index ed5a0fdecc..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/waitForCallsStatus.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: waitForCallsStatus -description: Overview of the waitForCallsStatus function -slug: wallets/reference/account-kit/wallet-client/functions/waitForCallsStatus -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -function waitForCallsStatus(client, params): Promise<{}>; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/waitForCallsStatus.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/waitForCallsStatus.ts#L19) - -Waits for the status of a prepared call to be updated, returning after the calls are no longer pending. - -## Example - -```ts -const result = await client.waitForCallsStatus({ id: "0x1234..." }); -console.log(result); -``` - -## Parameters - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterTypeDescription
- `client` - - `InnerWalletApiClient` - - The wallet API client to use for the request -
- `params` - - [`WaitForCallsStatusParameters`](https://viem.sh) - - Parameters for waiting for calls status, including the call ID and options for polling. -
- -## Returns - -`Promise`\<\{ -}> - -A Promise that resolves to the result containing the prepared call status, which includes a transaction receipt after the call is executed. diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignParams.mdx deleted file mode 100644 index 80bcf25483..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: FormatSignParams -description: Overview of FormatSignParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/FormatSignParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type FormatSignParams = Omit< - WithoutChainId, - "from" -> & - IsUndefined extends true - ? object - : object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/formatSign.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/formatSign.ts#L16) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignResult.mdx deleted file mode 100644 index 8c066eee58..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/FormatSignResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: FormatSignResult -description: Overview of FormatSignResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/FormatSignResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type FormatSignResult = RpcSchema["ReturnType"]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/formatSign.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/formatSign.ts#L21) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetAccountParam.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetAccountParam.mdx deleted file mode 100644 index dec93c402b..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetAccountParam.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: GetAccountParam -description: Overview of GetAccountParam -slug: wallets/reference/account-kit/wallet-client/type-aliases/GetAccountParam -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetAccountParam = - IsUndefined extends true ? object : object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/prepareCalls.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/prepareCalls.ts#L17) - -## Type Parameters - - - - - - - - - - - - - -
Type Parameter
- `TAccount` -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusParams.mdx deleted file mode 100644 index 7da62b96a2..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusParams.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: GetCallsStatusParams -description: Overview of GetCallsStatusParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/GetCallsStatusParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetCallsStatusParams = RpcSchema["Request"]["params"][0]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/getCallsStatus.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/getCallsStatus.ts#L14) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusResult.mdx deleted file mode 100644 index 5a6db440b7..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GetCallsStatusResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: GetCallsStatusResult -description: Overview of GetCallsStatusResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/GetCallsStatusResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GetCallsStatusResult = RpcSchema["ReturnType"]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/getCallsStatus.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/getCallsStatus.ts#L16) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsParams.mdx deleted file mode 100644 index b53551b2eb..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsParams.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: GrantPermissionsParams -description: Overview of GrantPermissionsParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/GrantPermissionsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GrantPermissionsParams = Prettify< - Omit & - IsUndefined extends true - ? object - : object ->; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/grantPermissions.ts:26](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/grantPermissions.ts#L26) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsResult.mdx deleted file mode 100644 index ff544bc059..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/GrantPermissionsResult.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: GrantPermissionsResult -description: Overview of GrantPermissionsResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/GrantPermissionsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type GrantPermissionsResult = object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/grantPermissions.ts:35](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/grantPermissions.ts#L35) - -## Properties - - - - - - - - - - - - - - - - - -
PropertyType
- `context` - - [`Hex`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsParams.mdx deleted file mode 100644 index 76d5489d12..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsParams.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: ListAccountsParams -description: Overview of ListAccountsParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/ListAccountsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ListAccountsParams = Omit< - RpcSchema["Request"]["params"][0], - "signerAddress" | "signerPublicKey" -> & - object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/listAccounts.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/listAccounts.ts#L16) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `signerAddress?` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsResult.mdx deleted file mode 100644 index 088f29481d..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/ListAccountsResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: ListAccountsResult -description: Overview of ListAccountsResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/ListAccountsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type ListAccountsResult = RpcSchema["ReturnType"]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/listAccounts.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/listAccounts.ts#L21) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsParams.mdx deleted file mode 100644 index 774a8d06df..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: PrepareCallsParams -description: Overview of PrepareCallsParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/PrepareCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PrepareCallsParams = Omit< - RpcSchema["Request"]["params"][0], - "from" | "chainId" -> & - IsUndefined extends true - ? object - : object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/prepareCalls.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/prepareCalls.ts#L22) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsResult.mdx deleted file mode 100644 index 4477406f26..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareCallsResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: PrepareCallsResult -description: Overview of PrepareCallsResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/PrepareCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PrepareCallsResult = RpcSchema["ReturnType"]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/prepareCalls.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/prepareCalls.ts#L27) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignParams.mdx deleted file mode 100644 index 84fe601456..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignParams.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: PrepareSignParams -description: Overview of PrepareSignParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/PrepareSignParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PrepareSignParams = Omit< - RpcSchema["Request"]["params"][0], - "from" | "chainId" -> & - IsUndefined extends true - ? object - : object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/prepareSign.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/prepareSign.ts#L16) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignResult.mdx deleted file mode 100644 index 81b13b15f8..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/PrepareSignResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: PrepareSignResult -description: Overview of PrepareSignResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/PrepareSignResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type PrepareSignResult = RpcSchema["ReturnType"]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/prepareSign.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/prepareSign.ts#L21) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountParams.mdx deleted file mode 100644 index 52785189f8..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountParams.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: RequestAccountParams -description: Overview of RequestAccountParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/RequestAccountParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RequestAccountParams = Omit< - Extract< - RpcSchema["Request"]["params"][0], - { - signerAddress: Address; - } - >, - "signerAddress" | "includeCounterfactualInfo" -> & - object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/requestAccount.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/requestAccount.ts#L19) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `accountAddress?` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountResult.mdx deleted file mode 100644 index cf7d7cffae..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/RequestAccountResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: RequestAccountResult -description: Overview of RequestAccountResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/RequestAccountResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type RequestAccountResult = SmartContractAccount; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/requestAccount.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/requestAccount.ts#L24) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsParams.mdx deleted file mode 100644 index 00933258e8..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: SendCallsParams -description: Overview of SendCallsParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/SendCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendCallsParams = PrepareCallsParams; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/sendCalls.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/sendCalls.ts#L14) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsResult.mdx deleted file mode 100644 index 2e5159257a..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendCallsResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SendCallsResult -description: Overview of SendCallsResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/SendCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendCallsResult = SendPreparedCallsResult; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/sendCalls.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/sendCalls.ts#L18) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsParams.mdx deleted file mode 100644 index 9b5dc352c5..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsParams.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: SendPreparedCallsParams -description: Overview of SendPreparedCallsParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/SendPreparedCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendPreparedCallsParams = WithoutChainId< - RpcSchema["Request"]["params"][0] ->; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts#L16) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsResult.mdx deleted file mode 100644 index c98640f188..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SendPreparedCallsResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SendPreparedCallsResult -description: Overview of SendPreparedCallsResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/SendPreparedCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SendPreparedCallsResult = RpcSchema["ReturnType"]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts#L20) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageParams.mdx deleted file mode 100644 index bbd9cbcaa8..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageParams.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: SignMessageParams -description: Overview of SignMessageParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignMessageParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignMessageParams = object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signMessage.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signMessage.ts#L7) - -## Properties - - - - - - - - - - - - - - - - - - - - - - - -
PropertyType
- `account?` - - [`Address`](https://abitype.dev) -
- `message` - - [`SignableMessage`](https://viem.sh) -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageResult.mdx deleted file mode 100644 index 46c2a5a761..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignMessageResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignMessageResult -description: Overview of SignMessageResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignMessageResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignMessageResult = Hex; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signMessage.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signMessage.ts#L9) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsParams.mdx deleted file mode 100644 index 259b4194d0..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsParams.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignPreparedCallsParams -description: Overview of SignPreparedCallsParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignPreparedCallsParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignPreparedCallsParams = PrepareCallsResult; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signPreparedCalls.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signPreparedCalls.ts#L23) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsResult.mdx deleted file mode 100644 index 6aa97c891d..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignPreparedCallsResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignPreparedCallsResult -description: Overview of SignPreparedCallsResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignPreparedCallsResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignPreparedCallsResult = RpcSchema["Request"]["params"][0]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signPreparedCalls.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signPreparedCalls.ts#L25) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestParams.mdx deleted file mode 100644 index aa8013ca8e..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestParams.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: SignSignatureRequestParams -description: Overview of SignSignatureRequestParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignSignatureRequestParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignSignatureRequestParams = WithoutRawPayload< - | PersonalSignSignatureRequest - | TypedDataSignatureRequest - | (AuthorizationSignatureRequest & object) ->; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signSignatureRequest.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signSignatureRequest.ts#L15) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestResult.mdx deleted file mode 100644 index 0507b7b80d..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignSignatureRequestResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignSignatureRequestResult -description: Overview of SignSignatureRequestResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignSignatureRequestResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignSignatureRequestResult = EcdsaSig["signature"]; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signSignatureRequest.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signSignatureRequest.ts#L23) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataParams.mdx deleted file mode 100644 index 3e85d6de77..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataParams.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: SignTypedDataParams -description: Overview of SignTypedDataParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignTypedDataParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignTypedDataParams = TypedDataDefinition & object; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signTypedData.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signTypedData.ts#L7) - -## Type Declaration - - - - - - - - - - - - - - - - - -
NameType
- `account?` - - [`Address`](https://abitype.dev) -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataResult.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataResult.mdx deleted file mode 100644 index 82fbbf57ac..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SignTypedDataResult.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: SignTypedDataResult -description: Overview of SignTypedDataResult -slug: wallets/reference/account-kit/wallet-client/type-aliases/SignTypedDataResult -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SignTypedDataResult = Hex; -``` - -Defined in: [account-kit/wallet-client/src/client/actions/signTypedData.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/signTypedData.ts#L11) diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClient.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClient.mdx deleted file mode 100644 index 1e6e3ad974..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClient.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: SmartWalletClient -description: Overview of SmartWalletClient -slug: wallets/reference/account-kit/wallet-client/type-aliases/SmartWalletClient -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartWalletClient = InnerWalletApiClientBase< - SmartWalletActions ->; -``` - -Defined in: [account-kit/wallet-client/src/client/index.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/index.ts#L41) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClientParams.mdx b/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClientParams.mdx deleted file mode 100644 index f5918fc202..0000000000 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/type-aliases/SmartWalletClientParams.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: SmartWalletClientParams -description: Overview of SmartWalletClientParams -slug: wallets/reference/account-kit/wallet-client/type-aliases/SmartWalletClientParams -layout: reference ---- - -{/* This file is auto-generated by TypeDoc. Do not edit manually. */} - -```ts -type SmartWalletClientParams = Prettify; -``` - -Defined in: [account-kit/wallet-client/src/client/index.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/index.ts#L27) - -## Type Parameters - - - - - - - - - - - - - - - - - -
Type ParameterDefault type
- `TAccount` *extends* [`Address`](https://abitype.dev) | `undefined` - - [`Address`](https://abitype.dev) | `undefined` -
diff --git a/docs/pages/reference/common/src/README.mdx b/docs/pages/reference/common/src/README.mdx new file mode 100644 index 0000000000..ebcc7eefea --- /dev/null +++ b/docs/pages/reference/common/src/README.mdx @@ -0,0 +1,81 @@ +--- +title: common +description: Overview of common +slug: wallets/reference/common +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +## Classes + +| Class | Description | +| :--------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [AccountNotFoundError](/wallets/reference/common/classes/AccountNotFoundError) | This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. | +| [AlchemyRestClient](/wallets/reference/common/classes/AlchemyRestClient) | A client for making requests to Alchemy's non-JSON-RPC endpoints. | +| [BaseError](/wallets/reference/common/classes/BaseError) | A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters. This is based on on viem's BaseError type (obviously from the import and extend) we want the errors here to point to our docs if we supply a docsPath though | +| [ChainNotFoundError](/wallets/reference/common/classes/ChainNotFoundError) | Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client. | +| [ConnectionConfigError](/wallets/reference/common/classes/ConnectionConfigError) | Error class for connection configuration validation failures. | +| [FetchError](/wallets/reference/common/classes/FetchError) | Error class representing a "Fetch Error" error, typically thrown when a fetch request fails. | +| [InMemorySink](/wallets/reference/common/classes/InMemorySink) | In-memory sink for testing purposes. Captures all log entries in an array that can be inspected in tests. | +| [InvalidRequestError](/wallets/reference/common/classes/InvalidRequestError) | This error is thrown when an invalid request is made. It extends the `BaseError` class. | +| [MethodUnsupportedError](/wallets/reference/common/classes/MethodUnsupportedError) | This error is thrown when an unknown method is called. It extends the `BaseError` class. | +| [ServerError](/wallets/reference/common/classes/ServerError) | Error class representing a "Server Error" error, typically thrown when a server request fails. | + +## Interfaces + +| Interface | Description | +| :------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [AlchemyTransportConfig](/wallets/reference/common/interfaces/AlchemyTransportConfig) | Configuration options for the Alchemy transport. Extends viem's HttpTransportConfig with Alchemy-specific options while omitting options that are not relevant or supported by Alchemy. | + +## Type Aliases + +| Type Alias | Description | +| :---------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [AlchemyConnectionConfig](/wallets/reference/common/type-aliases/AlchemyConnectionConfig) | TypeScript type derived from the schema for external consumption. This provides clean type inference without exposing Zod implementation details. | +| [AlchemyRestClientParams](/wallets/reference/common/type-aliases/AlchemyRestClientParams) | Parameters for creating an AlchemyRestClient instance. | +| [AlchemyTransport](/wallets/reference/common/type-aliases/AlchemyTransport) | - | +| [DiagnosticsLogger](/wallets/reference/common/type-aliases/DiagnosticsLogger) | Diagnostics logger instance for developer-facing debugging output. Provides level-based logging (error, warn, info, debug, verbose) with structured data. | +| [ExtractRpcMethod](/wallets/reference/common/type-aliases/ExtractRpcMethod) | - | +| [LogLevel](/wallets/reference/common/type-aliases/LogLevel) | - | +| [Never](/wallets/reference/common/type-aliases/Never) | - | +| [RestRequestFn](/wallets/reference/common/type-aliases/RestRequestFn) | - | +| [RestRequestParams](/wallets/reference/common/type-aliases/RestRequestParams) | - | +| [RestRequestSchema](/wallets/reference/common/type-aliases/RestRequestSchema) | - | + +## Variables + +| Variable | Description | +| :------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- | +| [AlchemyConnectionConfigSchema](/wallets/reference/common/variables/AlchemyConnectionConfigSchema) | Main connection configuration allowing flexible combinations. Can specify URL, auth method, or both together. | +| [fraxtalSepolia](/wallets/reference/common/variables/fraxtalSepolia) | - | +| [gensynTestnet](/wallets/reference/common/variables/gensynTestnet) | - | +| [LogLevel](/wallets/reference/common/variables/LogLevel) | Log level constants for controlling diagnostics output. Lower numeric values indicate higher priority (more restrictive filtering). | +| [openlootSepolia](/wallets/reference/common/variables/openlootSepolia) | - | +| [riseTestnet](/wallets/reference/common/variables/riseTestnet) | - | +| [storyMainnet](/wallets/reference/common/variables/storyMainnet) | - | +| [teaSepolia](/wallets/reference/common/variables/teaSepolia) | - | + +## Functions + +| Function | Description | +| :----------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [addBreadCrumb](/wallets/reference/common/functions/addBreadCrumb) | TODO: need to figure out if there's a better way than this... This adds a tracing breadcrumb to the client during requests. It returns a basic client without the previously extended actions. That means you MUST use viem's `getAction` method within actions in case the action is being called from an action that attached a breadcrumb. That method works by taking a fallback, looking up the action on the client, if it finds it calls it, otherwise it calls the fallback. | +| [alchemyTransport](/wallets/reference/common/functions/alchemyTransport) | Creates an Alchemy HTTP transport for connecting to Alchemy's services. | +| [assertNever](/wallets/reference/common/functions/assertNever) | Asserts that a value is never. | +| [bigIntMax](/wallets/reference/common/functions/bigIntMax) | Returns the max bigint in a list of bigints | +| [bigIntMultiply](/wallets/reference/common/functions/bigIntMultiply) | Given a bigint and a number (which can be a float), returns the bigint value. Note: this function has loss and will round down to the nearest integer. | +| [createEip1193HandlerFactory](/wallets/reference/common/functions/createEip1193HandlerFactory) | Creates a typed handler factory for EIP1193 request methods. This helps with Viem's typing within custom EIP1193 request functions by automatically casting input params and ensuring the result matches what is required. | +| [createLogger](/wallets/reference/common/functions/createLogger) | Creates a diagnostics logger instance for a package. Loggers emit structured log entries to configured sinks (default: console). | +| [getAlchemyRpcUrl](/wallets/reference/common/functions/getAlchemyRpcUrl) | Gets the Alchemy RPC base URL for a given chain ID. | +| [getGlobalLoggerConfig](/wallets/reference/common/functions/getGlobalLoggerConfig) | Gets the current global logger configuration. If not yet initialized, returns default configuration based on environment. | +| [getSupportedChainIds](/wallets/reference/common/functions/getSupportedChainIds) | Gets all supported chain IDs from the registry. | +| [isAlchemyConnectionConfig](/wallets/reference/common/functions/isAlchemyConnectionConfig) | Type guard to check if a value is a valid Alchemy connection config. | +| [isAlchemyTransport](/wallets/reference/common/functions/isAlchemyTransport) | A type guard for the transport to determine if it is an Alchemy transport. Used in cases where we would like to do switching depending on the transport. | +| [isChainSupported](/wallets/reference/common/functions/isChainSupported) | Checks if a chain ID is supported by the Alchemy RPC registry. | +| [isLevelEnabled](/wallets/reference/common/functions/isLevelEnabled) | Checks if a given log level is enabled based on current global configuration. Used internally by logger to short-circuit disabled log statements. | +| [isNamespaceEnabled](/wallets/reference/common/functions/isNamespaceEnabled) | Checks if a given namespace is enabled based on current global configuration. Used internally by logger to short-circuit logs from disabled namespaces. | +| [lowerAddress](/wallets/reference/common/functions/lowerAddress) | Lowercase an address | +| [raise](/wallets/reference/common/functions/raise) | Raises an error. | +| [setGlobalLoggerConfig](/wallets/reference/common/functions/setGlobalLoggerConfig) | Sets the global logger configuration. Partial configuration is supported - unspecified fields retain their current values. | +| [validateAlchemyConnectionConfig](/wallets/reference/common/functions/validateAlchemyConnectionConfig) | Validates an Alchemy connection configuration object. | diff --git a/docs/pages/reference/common/src/classes/AccountNotFoundError.mdx b/docs/pages/reference/common/src/classes/AccountNotFoundError.mdx new file mode 100644 index 0000000000..cef7c6da04 --- /dev/null +++ b/docs/pages/reference/common/src/classes/AccountNotFoundError.mdx @@ -0,0 +1,79 @@ +--- +title: AccountNotFoundError +description: This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. +slug: wallets/reference/common/classes/AccountNotFoundError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/AccountNotFoundError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/AccountNotFoundError.ts#L6) + +This error is thrown when an account could not be found to execute a specific action. It extends the `BaseError` class. + +## Extends + +- [`BaseError`](BaseError) + +## Constructors + +### Constructor + +```ts +new AccountNotFoundError(): AccountNotFoundError; +``` + +Defined in: [packages/common/src/errors/AccountNotFoundError.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/AccountNotFoundError.ts#L13) + +Constructor for initializing an error message indicating that an account could not be found to execute the specified action. + +#### Returns + +`AccountNotFoundError` + +#### Overrides + +[`BaseError`](BaseError).[`constructor`](BaseError#constructor) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"AccountNotFoundError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/classes/AlchemyRestClient.mdx b/docs/pages/reference/common/src/classes/AlchemyRestClient.mdx new file mode 100644 index 0000000000..c1eaa97789 --- /dev/null +++ b/docs/pages/reference/common/src/classes/AlchemyRestClient.mdx @@ -0,0 +1,108 @@ +--- +title: AlchemyRestClient +description: A client for making requests to Alchemy's non-JSON-RPC endpoints. +slug: wallets/reference/common/classes/AlchemyRestClient +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/rest/restClient.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/rest/restClient.ts#L25) + +A client for making requests to Alchemy's non-JSON-RPC endpoints. + +## Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `Schema` *extends* [`RestRequestSchema`](../type-aliases/RestRequestSchema) +
+ +## Constructors + +### Constructor + +```ts +new AlchemyRestClient(params): AlchemyRestClient; +``` + +Defined in: [packages/common/src/rest/restClient.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/rest/restClient.ts#L34) + +Creates a new instance of AlchemyRestClient. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`AlchemyRestClientParams`](../type-aliases/AlchemyRestClientParams) + + The parameters for configuring the client, including API key, JWT, custom URL, and headers. +
+ +#### Returns + +`AlchemyRestClient`\<`Schema`> + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
+ `request` + + [`RestRequestFn`](../type-aliases/RestRequestFn)\<`Schema`> + + Makes an HTTP request to an Alchemy non-JSON-RPC endpoint. + + **Param** + + The parameters for the request +
diff --git a/docs/pages/reference/common/src/classes/BaseError.mdx b/docs/pages/reference/common/src/classes/BaseError.mdx new file mode 100644 index 0000000000..10a97aa5ee --- /dev/null +++ b/docs/pages/reference/common/src/classes/BaseError.mdx @@ -0,0 +1,125 @@ +--- +title: BaseError +description: A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters. This is based on on viem's BaseError type (obviously from the import and extend) we want the errors here to point to our docs if we supply a docsPath though +slug: wallets/reference/common/classes/BaseError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/BaseError.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/BaseError.ts#L24) + +A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters. +This is based on on viem's BaseError type (obviously from the import and extend) +we want the errors here to point to our docs if we supply a docsPath though + +## Extends + +- `BaseError` + +## Extended by + +- [`ChainNotFoundError`](ChainNotFoundError) +- [`AccountNotFoundError`](AccountNotFoundError) +- [`ConnectionConfigError`](ConnectionConfigError) +- [`FetchError`](FetchError) +- [`ServerError`](ServerError) +- [`InvalidRequestError`](InvalidRequestError) +- [`MethodUnsupportedError`](MethodUnsupportedError) + +## Constructors + +### Constructor + +```ts +new BaseError(shortMessage, args): BaseError; +``` + +Defined in: [packages/common/src/errors/BaseError.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/BaseError.ts#L28) + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + +
ParameterType
+ `shortMessage` + + `string` +
+ `args` + + `BaseErrorParameters` +
+ +#### Returns + +`BaseError` + +#### Overrides + +```ts +ViemBaseError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"AlchemySDKError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/classes/ChainNotFoundError.mdx b/docs/pages/reference/common/src/classes/ChainNotFoundError.mdx new file mode 100644 index 0000000000..9488b1b6cd --- /dev/null +++ b/docs/pages/reference/common/src/classes/ChainNotFoundError.mdx @@ -0,0 +1,79 @@ +--- +title: ChainNotFoundError +description: Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client. +slug: wallets/reference/common/classes/ChainNotFoundError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/ChainNotFoundError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/ChainNotFoundError.ts#L6) + +Error class representing a "Chain Not Found" error, typically thrown when no chain is supplied to the client. + +## Extends + +- [`BaseError`](BaseError) + +## Constructors + +### Constructor + +```ts +new ChainNotFoundError(): ChainNotFoundError; +``` + +Defined in: [packages/common/src/errors/ChainNotFoundError.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/ChainNotFoundError.ts#L12) + +Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client. + +#### Returns + +`ChainNotFoundError` + +#### Overrides + +[`BaseError`](BaseError).[`constructor`](BaseError#constructor) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"ChainNotFoundError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/classes/ConnectionConfigError.mdx b/docs/pages/reference/common/src/classes/ConnectionConfigError.mdx new file mode 100644 index 0000000000..403164d3f2 --- /dev/null +++ b/docs/pages/reference/common/src/classes/ConnectionConfigError.mdx @@ -0,0 +1,108 @@ +--- +title: ConnectionConfigError +description: Error class for connection configuration validation failures. +slug: wallets/reference/common/classes/ConnectionConfigError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/ConnectionConfigError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/ConnectionConfigError.ts#L6) + +Error class for connection configuration validation failures. + +## Extends + +- [`BaseError`](BaseError) + +## Constructors + +### Constructor + +```ts +new ConnectionConfigError(details?): ConnectionConfigError; +``` + +Defined in: [packages/common/src/errors/ConnectionConfigError.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/ConnectionConfigError.ts#L16) + +Creates a new ConnectionConfigError with details about the validation failure. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `details?` + + `string` + + Optional details about the specific validation failure +
+ +#### Returns + +`ConnectionConfigError` + +#### Overrides + +[`BaseError`](BaseError).[`constructor`](BaseError#constructor) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"ConnectionConfigError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/classes/FetchError.mdx b/docs/pages/reference/common/src/classes/FetchError.mdx new file mode 100644 index 0000000000..b677fae0a1 --- /dev/null +++ b/docs/pages/reference/common/src/classes/FetchError.mdx @@ -0,0 +1,139 @@ +--- +title: FetchError +description: Error class representing a "Fetch Error" error, typically thrown when a fetch request fails. +slug: wallets/reference/common/classes/FetchError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/FetchError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/FetchError.ts#L6) + +Error class representing a "Fetch Error" error, typically thrown when a fetch request fails. + +## Extends + +- [`BaseError`](BaseError) + +## Constructors + +### Constructor + +```ts +new FetchError( + route, + method, + cause?): FetchError; +``` + +Defined in: [packages/common/src/errors/FetchError.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/FetchError.ts#L16) + +Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `route` + + `string` + + The route that failed to fetch. +
+ `method` + + `string` + + The HTTP method that was used. +
+ `cause?` + + `Error` + + The cause of the error. +
+ +#### Returns + +`FetchError` + +#### Overrides + +[`BaseError`](BaseError).[`constructor`](BaseError#constructor) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"FetchError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/classes/InMemorySink.mdx b/docs/pages/reference/common/src/classes/InMemorySink.mdx new file mode 100644 index 0000000000..293183088e --- /dev/null +++ b/docs/pages/reference/common/src/classes/InMemorySink.mdx @@ -0,0 +1,337 @@ +--- +title: InMemorySink +description: In-memory sink for testing purposes. Captures all log entries in an array that can be inspected in tests. **Note:** This is primarily intended for testing SDK integrations. Most applications should use the default console sink. +slug: wallets/reference/common/classes/InMemorySink +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/logging/sinks.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L34) + +In-memory sink for testing purposes. +Captures all log entries in an array that can be inspected in tests. + +**Note:** This is primarily intended for testing SDK integrations. +Most applications should use the default console sink. + +## Example + +```ts +import { + InMemorySink, + setGlobalLoggerConfig, + createLogger, +} from "@alchemy/common"; + +// In tests +const sink = new InMemorySink(); + +setGlobalLoggerConfig({ + sinks: [sink.sink], +}); + +const logger = createLogger({ + package: "@alchemy/aa-infra", + version: "1.0.0", + namespace: "aa-infra", +}); + +logger.info("test message"); + +// Inspect captured logs +expect(sink.count).toBe(1); +expect(sink.latest()?.message).toBe("test message"); +``` + +## Constructors + +### Constructor + +```ts +new InMemorySink(): InMemorySink; +``` + +Defined in: [packages/common/src/logging/sinks.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L44) + +Creates a new InMemorySink instance. +Binds the sink method to the instance for use as a callback. + +#### Returns + +`InMemorySink` + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault valueDescription
+ `entries` + + `LogEntry`\[] + + `[]` + + Array of captured log entries +
+ +## Accessors + +### count + +#### Get Signature + +```ts +get count(): number; +``` + +Defined in: [packages/common/src/logging/sinks.ts:112](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L112) + +Get the number of captured entries + +##### Returns + +`number` + +The total count of captured log entries + +## Methods + +### clear() + +```ts +clear(): void; +``` + +Defined in: [packages/common/src/logging/sinks.ts:64](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L64) + +Clear all captured entries + +#### Returns + +`void` + +--- + +### getByLevel() + +```ts +getByLevel(level): LogEntry[]; +``` + +Defined in: [packages/common/src/logging/sinks.ts:74](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L74) + +Get entries filtered by log level + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `level` + + `number` + + The log level to filter by (LogLevel.ERROR, LogLevel.INFO, etc.) +
+ +#### Returns + +`LogEntry`\[] + +Array of log entries matching the specified level + +--- + +### getByMessage() + +```ts +getByMessage(substring): LogEntry[]; +``` + +Defined in: [packages/common/src/logging/sinks.ts:94](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L94) + +Get entries filtered by message substring + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `substring` + + `string` + + The substring to search for in log messages +
+ +#### Returns + +`LogEntry`\[] + +Array of log entries containing the substring in their message + +--- + +### getByNamespace() + +```ts +getByNamespace(namespace): LogEntry[]; +``` + +Defined in: [packages/common/src/logging/sinks.ts:84](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L84) + +Get entries filtered by namespace + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `namespace` + + `string` + + The namespace to filter by (e.g., "aa-infra", "wallet-apis") +
+ +#### Returns + +`LogEntry`\[] + +Array of log entries matching the specified namespace + +--- + +### latest() + +```ts +latest(): LogEntry | undefined; +``` + +Defined in: [packages/common/src/logging/sinks.ts:103](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L103) + +Get the most recent log entry + +#### Returns + +`LogEntry` | `undefined` + +The latest log entry, or undefined if no entries have been captured + +--- + +### sink() + +```ts +sink(entry): void; +``` + +Defined in: [packages/common/src/logging/sinks.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/sinks.ts#L55) + +The sink function to pass to setGlobalLoggerConfig. +Captures log entries into the internal array. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `entry` + + `LogEntry` + + The log entry to capture +
+ +#### Returns + +`void` diff --git a/docs/pages/reference/common/src/classes/InvalidRequestError.mdx b/docs/pages/reference/common/src/classes/InvalidRequestError.mdx new file mode 100644 index 0000000000..23a5484002 --- /dev/null +++ b/docs/pages/reference/common/src/classes/InvalidRequestError.mdx @@ -0,0 +1,108 @@ +--- +title: InvalidRequestError +description: This error is thrown when an invalid request is made. It extends the `BaseError` class. +slug: wallets/reference/common/classes/InvalidRequestError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/InvalidRequestError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/InvalidRequestError.ts#L6) + +This error is thrown when an invalid request is made. It extends the `BaseError` class. + +## Extends + +- [`BaseError`](BaseError) + +## Constructors + +### Constructor + +```ts +new InvalidRequestError(message?): InvalidRequestError; +``` + +Defined in: [packages/common/src/errors/InvalidRequestError.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/InvalidRequestError.ts#L16) + +Constructor for initializing an InvalidRequestError. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `message?` + + `string` + + Optional error message. Defaults to "Invalid request" if not provided. +
+ +#### Returns + +`InvalidRequestError` + +#### Overrides + +[`BaseError`](BaseError).[`constructor`](BaseError#constructor) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"InvalidRequestError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/classes/MethodUnsupportedError.mdx b/docs/pages/reference/common/src/classes/MethodUnsupportedError.mdx new file mode 100644 index 0000000000..539991901b --- /dev/null +++ b/docs/pages/reference/common/src/classes/MethodUnsupportedError.mdx @@ -0,0 +1,108 @@ +--- +title: MethodUnsupportedError +description: This error is thrown when an unknown method is called. It extends the `BaseError` class. +slug: wallets/reference/common/classes/MethodUnsupportedError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/MethodUnsupportedError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/MethodUnsupportedError.ts#L6) + +This error is thrown when an unknown method is called. It extends the `BaseError` class. + +## Extends + +- [`BaseError`](BaseError) + +## Constructors + +### Constructor + +```ts +new MethodUnsupportedError(method): MethodUnsupportedError; +``` + +Defined in: [packages/common/src/errors/MethodUnsupportedError.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/MethodUnsupportedError.ts#L14) + +Constructor for initializing an error message indicating the method name that is unsupported. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `method` + + `string` + + The name of the unsupported method +
+ +#### Returns + +`MethodUnsupportedError` + +#### Overrides + +[`BaseError`](BaseError).[`constructor`](BaseError#constructor) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"MethodUnsupportedError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/classes/ServerError.mdx b/docs/pages/reference/common/src/classes/ServerError.mdx new file mode 100644 index 0000000000..ccc1a1a4fa --- /dev/null +++ b/docs/pages/reference/common/src/classes/ServerError.mdx @@ -0,0 +1,139 @@ +--- +title: ServerError +description: Error class representing a "Server Error" error, typically thrown when a server request fails. +slug: wallets/reference/common/classes/ServerError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/errors/ServerError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/ServerError.ts#L6) + +Error class representing a "Server Error" error, typically thrown when a server request fails. + +## Extends + +- [`BaseError`](BaseError) + +## Constructors + +### Constructor + +```ts +new ServerError( + message, + status, + cause?): ServerError; +``` + +Defined in: [packages/common/src/errors/ServerError.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/errors/ServerError.ts#L16) + +Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `message` + + `string` + + The error message. +
+ `status` + + `number` + + The HTTP status code of the error. +
+ `cause?` + + `Error` + + The cause of the error. +
+ +#### Returns + +`ServerError` + +#### Overrides + +[`BaseError`](BaseError).[`constructor`](BaseError#constructor) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"ServerError"` +
+ `version` + + `string` + + `VERSION` +
diff --git a/docs/pages/reference/common/src/functions/addBreadCrumb.mdx b/docs/pages/reference/common/src/functions/addBreadCrumb.mdx new file mode 100644 index 0000000000..0a4a7a08b1 --- /dev/null +++ b/docs/pages/reference/common/src/functions/addBreadCrumb.mdx @@ -0,0 +1,69 @@ +--- +title: addBreadCrumb +description: Overview of the addBreadCrumb function +slug: wallets/reference/common/functions/addBreadCrumb +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function addBreadCrumb(client, breadcrumb): Client; +``` + +Defined in: [packages/common/src/actions/addBreadCrumb.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/actions/addBreadCrumb.ts#L20) + +TODO: need to figure out if there's a better way than this... +This adds a tracing breadcrumb to the client during requests. +It returns a basic client without the previously extended actions. +That means you MUST use viem's `getAction` method within actions in case the action is being called from an action that attached a breadcrumb. +That method works by taking a fallback, looking up the action on the client, if it finds it calls it, otherwise it calls the fallback. + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `Client`\<[`AlchemyTransport`](../type-aliases/AlchemyTransport)> + + a client using the alchemy transport +
+ `breadcrumb` + + `string` + + the breadcrumb to add to the tracing headers +
+ +## Returns + +`Client`\<[`AlchemyTransport`](../type-aliases/AlchemyTransport)> + +a client with the transport updated to include the breadcrumb diff --git a/docs/pages/reference/common/src/functions/alchemyTransport.mdx b/docs/pages/reference/common/src/functions/alchemyTransport.mdx new file mode 100644 index 0000000000..80cc923b22 --- /dev/null +++ b/docs/pages/reference/common/src/functions/alchemyTransport.mdx @@ -0,0 +1,140 @@ +--- +title: alchemyTransport +description: Overview of the alchemyTransport function +slug: wallets/reference/common/functions/alchemyTransport +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function alchemyTransport(config): AlchemyTransport; +``` + +Defined in: [packages/common/src/transport/alchemy.ts:146](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/alchemy.ts#L146) + +Creates an Alchemy HTTP transport for connecting to Alchemy's services. + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `rpcSchema` *extends* `RpcSchema` | `undefined` + + `undefined` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `config` + + [`AlchemyTransportConfig`](../interfaces/AlchemyTransportConfig) + + The configuration object for the Alchemy transport (extends viem's HttpTransportConfig) +
+ +## Returns + +[`AlchemyTransport`](../type-aliases/AlchemyTransport)\<`rpcSchema`> + +The configured Alchemy transport function + +## Examples + +Using API Key: + +```ts +import { alchemyTransport } from "@alchemy/common"; + +const transport = alchemyTransport({ apiKey: "your-api-key" }); +``` + +Using JWT: + +```ts +import { alchemyTransport } from "@alchemy/common"; + +const transport = alchemyTransport({ jwt: "your-jwt-token" }); +``` + +Using URL directly: + +```ts +import { alchemyTransport } from "@alchemy/common"; + +const transport = alchemyTransport({ + url: "https://eth-mainnet.g.alchemy.com/v2/your-key", +}); +``` + +Using custom URL with API key: + +```ts +import { alchemyTransport } from "@alchemy/common"; + +const transport = alchemyTransport({ + url: "https://custom-alchemy.com/v2", + apiKey: "your-api-key", +}); +``` + +Using custom URL with JWT: + +```ts +import { alchemyTransport } from "@alchemy/common"; + +const transport = alchemyTransport({ + url: "https://custom-alchemy.com/v2", + jwt: "your-jwt-token", +}); +``` + +Using HTTP debugging options: + +```ts +import { alchemyTransport } from "@alchemy/common"; + +const transport = alchemyTransport({ + apiKey: "your-api-key", + onFetchRequest: (request) => console.log("Request:", request), + onFetchResponse: (response) => console.log("Response:", response), + timeout: 30000, + retryCount: 3, + retryDelay: 1000, +}); +``` diff --git a/docs/pages/reference/common/src/functions/assertNever.mdx b/docs/pages/reference/common/src/functions/assertNever.mdx new file mode 100644 index 0000000000..15c5e4408d --- /dev/null +++ b/docs/pages/reference/common/src/functions/assertNever.mdx @@ -0,0 +1,65 @@ +--- +title: assertNever +description: Overview of the assertNever function +slug: wallets/reference/common/functions/assertNever +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function assertNever(_x, msg): never; +``` + +Defined in: [packages/common/src/utils/assertNever.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/assertNever.ts#L10) + +Asserts that a value is never. + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `_x` + + `never` + + The value to assert. +
+ `msg` + + `string` + + The message to throw if the value is not never. +
+ +## Returns + +`never` + +Always throws an error. diff --git a/docs/pages/reference/common/src/functions/bigIntMax.mdx b/docs/pages/reference/common/src/functions/bigIntMax.mdx new file mode 100644 index 0000000000..f5d30f8f93 --- /dev/null +++ b/docs/pages/reference/common/src/functions/bigIntMax.mdx @@ -0,0 +1,51 @@ +--- +title: bigIntMax +description: Overview of the bigIntMax function +slug: wallets/reference/common/functions/bigIntMax +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function bigIntMax(...args): bigint; +``` + +Defined in: [packages/common/src/utils/bigint.ts:66](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/bigint.ts#L66) + +Returns the max bigint in a list of bigints + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ ...`args` + + `bigint`\[] + + a list of bigints to get the max of +
+ +## Returns + +`bigint` + +the max bigint in the list diff --git a/docs/pages/reference/aa-sdk/core/src/functions/bigIntMultiply.mdx b/docs/pages/reference/common/src/functions/bigIntMultiply.mdx similarity index 81% rename from docs/pages/reference/aa-sdk/core/src/functions/bigIntMultiply.mdx rename to docs/pages/reference/common/src/functions/bigIntMultiply.mdx index 27ec5a8f28..11d2404daf 100644 --- a/docs/pages/reference/aa-sdk/core/src/functions/bigIntMultiply.mdx +++ b/docs/pages/reference/common/src/functions/bigIntMultiply.mdx @@ -1,7 +1,7 @@ --- title: bigIntMultiply description: Overview of the bigIntMultiply function -slug: wallets/reference/aa-sdk/core/functions/bigIntMultiply +slug: wallets/reference/common/functions/bigIntMultiply layout: reference --- @@ -11,7 +11,7 @@ layout: reference function bigIntMultiply(base, multiplier, roundingMode): bigint; ``` -Defined in: [aa-sdk/core/src/utils/bigint.ts:79](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/aa-sdk/core/src/utils/bigint.ts#L79) +Defined in: [packages/common/src/utils/bigint.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/bigint.ts#L39) Given a bigint and a number (which can be a float), returns the bigint value. Note: this function has loss and will round down to the nearest integer. @@ -53,7 +53,7 @@ Note: this function has loss and will round down to the nearest integer. - `Multiplier` + `number` @@ -71,7 +71,7 @@ Note: this function has loss and will round down to the nearest integer. - [`RoundingMode`](../enumerations/RoundingMode) + `RoundingMode` diff --git a/docs/pages/reference/common/src/functions/createEip1193HandlerFactory.mdx b/docs/pages/reference/common/src/functions/createEip1193HandlerFactory.mdx new file mode 100644 index 0000000000..7d9892edb0 --- /dev/null +++ b/docs/pages/reference/common/src/functions/createEip1193HandlerFactory.mdx @@ -0,0 +1,135 @@ +--- +title: createEip1193HandlerFactory +description: Overview of the createEip1193HandlerFactory function +slug: wallets/reference/common/functions/createEip1193HandlerFactory +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function createEip1193HandlerFactory(): (handle) => ( + params, +) => Promise< + Extract< + TMethods[number], + { + Method: TMethod; + } + >["ReturnType"] +>; +``` + +Defined in: [packages/common/src/utils/createEip1193HandlerFactory.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/createEip1193HandlerFactory.ts#L9) + +Creates a typed handler factory for EIP1193 request methods. +This helps with Viem's typing within custom EIP1193 request functions by +automatically casting input params and ensuring the result matches what is required. + +## Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `TMethods` *extends* readonly `object`\[] +
+ +## Returns + +A function that creates a handler factory for specific methods + +```ts +(handle): (params) => Promise["ReturnType"]>; +``` + +### Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `TMethod` *extends* `string` +
+ +### Parameters + + + + + + + + + + + + + + + + + +
ParameterType
+ `handle` + + (`params`) => `Promise`\<`Extract`\<`TMethods`\[`number`], \{ `Method`: `TMethod`; }>\[`"ReturnType"`]> +
+ +### Returns + +```ts +(params): Promise["ReturnType"]>; +``` + +#### Parameters + + + + + + + + + + + + + + + + + +
ParameterType
+ `params` + + `unknown` +
+ +#### Returns + +`Promise`\<`Extract`\<`TMethods`\[`number`], \{ +`Method`: `TMethod`; +}>\[`"ReturnType"`]> diff --git a/docs/pages/reference/common/src/functions/createLogger.mdx b/docs/pages/reference/common/src/functions/createLogger.mdx new file mode 100644 index 0000000000..cc528e5d2b --- /dev/null +++ b/docs/pages/reference/common/src/functions/createLogger.mdx @@ -0,0 +1,80 @@ +--- +title: createLogger +description: Overview of the createLogger function +slug: wallets/reference/common/functions/createLogger +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function createLogger(params): DiagnosticsLogger; +``` + +Defined in: [packages/common/src/logging/logger.ts:104](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/logger.ts#L104) + +Creates a diagnostics logger instance for a package. +Loggers emit structured log entries to configured sinks (default: console). + +All log methods support: + +- String messages: `logger.info("message", { data })` +- Lazy suppliers: `logger.debug(() => ["expensive", computeData()])` (only evaluated when level enabled) + +## Example + +```ts +import { createLogger } from "@alchemy/common"; + +const logger = createLogger({ + package: "@alchemy/aa-infra", + version: "1.0.0", + namespace: "aa-infra", +}); + +logger.info("processing request", { chainId: 1 }); +logger.debug("detailed state", { userOp: op }); + +// Child logger with additional context +const childLogger = logger.withContext({ requestId: "123" }); +childLogger.info("step complete"); // includes requestId in all logs + +// Profile a function +const sendWithProfiling = logger.profiled("sendUserOp", sendUserOp); +await sendWithProfiling(op); // logs execution time at DEBUG level +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + `CreateLoggerParams` + + Logger configuration +
+ +## Returns + +[`DiagnosticsLogger`](../type-aliases/DiagnosticsLogger) + +A logger instance diff --git a/docs/pages/reference/common/src/functions/getAlchemyRpcUrl.mdx b/docs/pages/reference/common/src/functions/getAlchemyRpcUrl.mdx new file mode 100644 index 0000000000..39e53c074f --- /dev/null +++ b/docs/pages/reference/common/src/functions/getAlchemyRpcUrl.mdx @@ -0,0 +1,58 @@ +--- +title: getAlchemyRpcUrl +description: Overview of the getAlchemyRpcUrl function +slug: wallets/reference/common/functions/getAlchemyRpcUrl +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getAlchemyRpcUrl(chainId): string | undefined; +``` + +Defined in: [packages/common/src/transport/chainRegistry.ts:94](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/chainRegistry.ts#L94) + +Gets the Alchemy RPC base URL for a given chain ID. + +## Example + +```ts +const rpcUrl = getAlchemyRpcUrl(1); // "https://eth-mainnet.g.alchemy.com/v2" +const customUrl = getAlchemyRpcUrl(999); // undefined +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `chainId` + + `number` + + The chain ID to lookup +
+ +## Returns + +`string` | `undefined` + +The Alchemy RPC base URL or undefined if not supported diff --git a/docs/pages/reference/common/src/functions/getGlobalLoggerConfig.mdx b/docs/pages/reference/common/src/functions/getGlobalLoggerConfig.mdx new file mode 100644 index 0000000000..78a106b6c7 --- /dev/null +++ b/docs/pages/reference/common/src/functions/getGlobalLoggerConfig.mdx @@ -0,0 +1,32 @@ +--- +title: getGlobalLoggerConfig +description: Overview of the getGlobalLoggerConfig function +slug: wallets/reference/common/functions/getGlobalLoggerConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getGlobalLoggerConfig(): Required; +``` + +Defined in: [packages/common/src/logging/config.ts:131](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/config.ts#L131) + +Gets the current global logger configuration. +If not yet initialized, returns default configuration based on environment. + +## Example + +```ts +import { getGlobalLoggerConfig } from "@alchemy/common"; + +const config = getGlobalLoggerConfig(); +console.log("Current log level:", config.level); +``` + +## Returns + +`Required`\<`DiagnosticsConfig`> + +The current global configuration with all fields populated diff --git a/docs/pages/reference/common/src/functions/getSupportedChainIds.mdx b/docs/pages/reference/common/src/functions/getSupportedChainIds.mdx new file mode 100644 index 0000000000..7c2f76bdbb --- /dev/null +++ b/docs/pages/reference/common/src/functions/getSupportedChainIds.mdx @@ -0,0 +1,22 @@ +--- +title: getSupportedChainIds +description: Overview of the getSupportedChainIds function +slug: wallets/reference/common/functions/getSupportedChainIds +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getSupportedChainIds(): number[]; +``` + +Defined in: [packages/common/src/transport/chainRegistry.ts:113](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/chainRegistry.ts#L113) + +Gets all supported chain IDs from the registry. + +## Returns + +`number`\[] + +Array of supported chain IDs diff --git a/docs/pages/reference/common/src/functions/isAlchemyConnectionConfig.mdx b/docs/pages/reference/common/src/functions/isAlchemyConnectionConfig.mdx new file mode 100644 index 0000000000..4c650e83aa --- /dev/null +++ b/docs/pages/reference/common/src/functions/isAlchemyConnectionConfig.mdx @@ -0,0 +1,68 @@ +--- +title: isAlchemyConnectionConfig +description: Overview of the isAlchemyConnectionConfig function +slug: wallets/reference/common/functions/isAlchemyConnectionConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isAlchemyConnectionConfig( + value, +): value is { apiKey?: string; jwt?: string; url?: string }; +``` + +Defined in: [packages/common/src/transport/connectionSchema.ts:141](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/connectionSchema.ts#L141) + +Type guard to check if a value is a valid Alchemy connection config. + +## Example + +```ts +const maybeConfig: unknown = { apiKey: "test" }; +if (isAlchemyConnectionConfig(maybeConfig)) { + // TypeScript knows maybeConfig is AlchemyConnectionConfig here + if (maybeConfig.apiKey) { + console.log("Using API key:", maybeConfig.apiKey); + } + if (maybeConfig.url) { + console.log("Using custom URL:", maybeConfig.url); + } +} +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `value` + + `unknown` + + The value to check for validity +
+ +## Returns + +`value is { apiKey?: string; jwt?: string; url?: string }` + +True if the value is a valid Alchemy connection config diff --git a/docs/pages/reference/common/src/functions/isAlchemyTransport.mdx b/docs/pages/reference/common/src/functions/isAlchemyTransport.mdx new file mode 100644 index 0000000000..43bbedaa2e --- /dev/null +++ b/docs/pages/reference/common/src/functions/isAlchemyTransport.mdx @@ -0,0 +1,69 @@ +--- +title: isAlchemyTransport +description: Overview of the isAlchemyTransport function +slug: wallets/reference/common/functions/isAlchemyTransport +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isAlchemyTransport( + transport, + chain, +): transport is AlchemyTransport; +``` + +Defined in: [packages/common/src/transport/alchemy.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/alchemy.ts#L62) + +A type guard for the transport to determine if it is an Alchemy transport. +Used in cases where we would like to do switching depending on the transport. + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `transport` + + `Transport` + + The transport to check +
+ `chain` + + `Chain` + + Chain for the transport to run its function to return the transport config +
+ +## Returns + +`transport is AlchemyTransport` + +`true` if the transport is an Alchemy transport, otherwise `false` diff --git a/docs/pages/reference/common/src/functions/isChainSupported.mdx b/docs/pages/reference/common/src/functions/isChainSupported.mdx new file mode 100644 index 0000000000..99172d052c --- /dev/null +++ b/docs/pages/reference/common/src/functions/isChainSupported.mdx @@ -0,0 +1,51 @@ +--- +title: isChainSupported +description: Overview of the isChainSupported function +slug: wallets/reference/common/functions/isChainSupported +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isChainSupported(chainId): boolean; +``` + +Defined in: [packages/common/src/transport/chainRegistry.ts:104](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/chainRegistry.ts#L104) + +Checks if a chain ID is supported by the Alchemy RPC registry. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `chainId` + + `number` + + The chain ID to check +
+ +## Returns + +`boolean` + +True if the chain is supported, false otherwise diff --git a/docs/pages/reference/common/src/functions/isLevelEnabled.mdx b/docs/pages/reference/common/src/functions/isLevelEnabled.mdx new file mode 100644 index 0000000000..088b742511 --- /dev/null +++ b/docs/pages/reference/common/src/functions/isLevelEnabled.mdx @@ -0,0 +1,62 @@ +--- +title: isLevelEnabled +description: Overview of the isLevelEnabled function +slug: wallets/reference/common/functions/isLevelEnabled +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isLevelEnabled(level): boolean; +``` + +Defined in: [packages/common/src/logging/config.ts:194](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/config.ts#L194) + +Checks if a given log level is enabled based on current global configuration. +Used internally by logger to short-circuit disabled log statements. + +## Example + +```ts +import { isLevelEnabled, LogLevel } from "@alchemy/common"; + +if (isLevelEnabled(LogLevel.DEBUG)) { + // Perform expensive debug computation +} +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `level` + + [`LogLevel`](../type-aliases/LogLevel) + + The log level to check +
+ +## Returns + +`boolean` + +True if the level is enabled (will be logged), false otherwise diff --git a/docs/pages/reference/common/src/functions/isNamespaceEnabled.mdx b/docs/pages/reference/common/src/functions/isNamespaceEnabled.mdx new file mode 100644 index 0000000000..65456687da --- /dev/null +++ b/docs/pages/reference/common/src/functions/isNamespaceEnabled.mdx @@ -0,0 +1,62 @@ +--- +title: isNamespaceEnabled +description: Overview of the isNamespaceEnabled function +slug: wallets/reference/common/functions/isNamespaceEnabled +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isNamespaceEnabled(namespace): boolean; +``` + +Defined in: [packages/common/src/logging/config.ts:213](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/config.ts#L213) + +Checks if a given namespace is enabled based on current global configuration. +Used internally by logger to short-circuit logs from disabled namespaces. + +## Example + +```ts +import { isNamespaceEnabled } from "@alchemy/common"; + +if (isNamespaceEnabled("aa-infra")) { + // This namespace is enabled +} +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `namespace` + + `string` | `undefined` + + The namespace to check +
+ +## Returns + +`boolean` + +True if the namespace is enabled (will be logged), false otherwise diff --git a/docs/pages/reference/common/src/functions/lowerAddress.mdx b/docs/pages/reference/common/src/functions/lowerAddress.mdx new file mode 100644 index 0000000000..303f5362c8 --- /dev/null +++ b/docs/pages/reference/common/src/functions/lowerAddress.mdx @@ -0,0 +1,51 @@ +--- +title: lowerAddress +description: Overview of the lowerAddress function +slug: wallets/reference/common/functions/lowerAddress +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function lowerAddress(addr): `0x${string}`; +``` + +Defined in: [packages/common/src/utils/lowerAddress.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/lowerAddress.ts#L9) + +Lowercase an address + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `addr` + + `` `0x${string}` `` + + The address to lowercase +
+ +## Returns + +`` `0x${string}` `` + +The lowercase address diff --git a/docs/pages/reference/common/src/functions/raise.mdx b/docs/pages/reference/common/src/functions/raise.mdx new file mode 100644 index 0000000000..b9ff871d5c --- /dev/null +++ b/docs/pages/reference/common/src/functions/raise.mdx @@ -0,0 +1,51 @@ +--- +title: raise +description: Overview of the raise function +slug: wallets/reference/common/functions/raise +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function raise(err): never; +``` + +Defined in: [packages/common/src/utils/raise.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/raise.ts#L9) + +Raises an error. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `err` + + `string` | `BaseError` + + The error to raise. +
+ +## Returns + +`never` + +Always throws an error. diff --git a/docs/pages/reference/common/src/functions/setGlobalLoggerConfig.mdx b/docs/pages/reference/common/src/functions/setGlobalLoggerConfig.mdx new file mode 100644 index 0000000000..c07bf10de4 --- /dev/null +++ b/docs/pages/reference/common/src/functions/setGlobalLoggerConfig.mdx @@ -0,0 +1,75 @@ +--- +title: setGlobalLoggerConfig +description: Overview of the setGlobalLoggerConfig function +slug: wallets/reference/common/functions/setGlobalLoggerConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function setGlobalLoggerConfig(cfg): void; +``` + +Defined in: [packages/common/src/logging/config.ts:164](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/config.ts#L164) + +Sets the global logger configuration. +Partial configuration is supported - unspecified fields retain their current values. + +Configuration precedence (highest to lowest): + +1. Explicit setGlobalLoggerConfig calls +2. ALCHEMY_LOG_LEVEL environment variable +3. Defaults (INFO in dev, ERROR in prod) + +## Example + +```ts +import { setGlobalLoggerConfig, LogLevel } from "@alchemy/common"; + +// Set log level only +setGlobalLoggerConfig({ level: LogLevel.DEBUG }); + +// Add custom sink +setGlobalLoggerConfig({ + sinks: [(entry) => console.log(JSON.stringify(entry))], +}); + +// Filter to specific namespaces +setGlobalLoggerConfig({ + enabledNamespaces: ["aa-infra", "wallet-apis"], +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `cfg` + + `DiagnosticsConfig` + + Partial configuration to apply +
+ +## Returns + +`void` diff --git a/docs/pages/reference/common/src/functions/validateAlchemyConnectionConfig.mdx b/docs/pages/reference/common/src/functions/validateAlchemyConnectionConfig.mdx new file mode 100644 index 0000000000..c5b88abb7f --- /dev/null +++ b/docs/pages/reference/common/src/functions/validateAlchemyConnectionConfig.mdx @@ -0,0 +1,70 @@ +--- +title: validateAlchemyConnectionConfig +description: Overview of the validateAlchemyConnectionConfig function +slug: wallets/reference/common/functions/validateAlchemyConnectionConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function validateAlchemyConnectionConfig(config): Object; +``` + +Defined in: [packages/common/src/transport/connectionSchema.ts:107](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/connectionSchema.ts#L107) + +Validates an Alchemy connection configuration object. + +## Example + +```ts +try { + const config = validateAlchemyConnectionConfig({ + apiKey: "your-api-key", + }); + // config is now typed as AlchemyConnectionConfig +} catch (error) { + if (error instanceof ConnectionConfigError) { + console.error("Invalid config:", error.message); + } +} +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `config` + + `unknown` + + The configuration object to validate +
+ +## Returns + +`Object` + +The validated configuration object + +## Throws + +If the configuration is invalid diff --git a/docs/pages/reference/common/src/interfaces/AlchemyTransportConfig.mdx b/docs/pages/reference/common/src/interfaces/AlchemyTransportConfig.mdx new file mode 100644 index 0000000000..a59cc32e9b --- /dev/null +++ b/docs/pages/reference/common/src/interfaces/AlchemyTransportConfig.mdx @@ -0,0 +1,75 @@ +--- +title: AlchemyTransportConfig +description: Configuration options for the Alchemy transport. Extends viem's HttpTransportConfig with Alchemy-specific options while omitting options that are not relevant or supported by Alchemy. +slug: wallets/reference/common/interfaces/AlchemyTransportConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/common/src/transport/alchemy.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/alchemy.ts#L24) + +Configuration options for the Alchemy transport. +Extends viem's HttpTransportConfig with Alchemy-specific options while omitting +options that are not relevant or supported by Alchemy. + +## Extends + +- `Omit`\<`HttpTransportConfig`, `"batch"` | `"key"` | `"methods"` | `"name"` | `"raw"`> + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
+ `apiKey?` + + `string` + + API key for Alchemy authentication +
+ `jwt?` + + `string` + + JWT token for authentication +
+ `url?` + + `string` + + Custom RPC URL (optional - defaults to chain's Alchemy URL, but can be used to override the chain's Alchemy URL) +
diff --git a/docs/pages/reference/common/src/type-aliases/AlchemyConnectionConfig.mdx b/docs/pages/reference/common/src/type-aliases/AlchemyConnectionConfig.mdx new file mode 100644 index 0000000000..6fa9fbe908 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/AlchemyConnectionConfig.mdx @@ -0,0 +1,17 @@ +--- +title: AlchemyConnectionConfig +description: TypeScript type derived from the schema for external consumption. This provides clean type inference without exposing Zod implementation details. +slug: wallets/reference/common/type-aliases/AlchemyConnectionConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type AlchemyConnectionConfig = z.infer; +``` + +Defined in: [packages/common/src/transport/connectionSchema.ts:82](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/connectionSchema.ts#L82) + +TypeScript type derived from the schema for external consumption. +This provides clean type inference without exposing Zod implementation details. diff --git a/docs/pages/reference/common/src/type-aliases/AlchemyRestClientParams.mdx b/docs/pages/reference/common/src/type-aliases/AlchemyRestClientParams.mdx new file mode 100644 index 0000000000..9281997cc1 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/AlchemyRestClientParams.mdx @@ -0,0 +1,87 @@ +--- +title: AlchemyRestClientParams +description: Parameters for creating an AlchemyRestClient instance. +slug: wallets/reference/common/type-aliases/AlchemyRestClientParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type AlchemyRestClientParams = object; +``` + +Defined in: [packages/common/src/rest/restClient.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/rest/restClient.ts#L11) + +Parameters for creating an AlchemyRestClient instance. + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
+ `apiKey?` + + `string` + + API key for Alchemy authentication +
+ `headers?` + + `HeadersInit` + + Custom headers to be sent with requests +
+ `jwt?` + + `string` + + JWT token for Alchemy authentication +
+ `url?` + + `string` + + Custom URL (optional - defaults to Alchemy's chain-agnostic URL, but can be used to override it) +
diff --git a/docs/pages/reference/common/src/type-aliases/AlchemyTransport.mdx b/docs/pages/reference/common/src/type-aliases/AlchemyTransport.mdx new file mode 100644 index 0000000000..6a0b0db13c --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/AlchemyTransport.mdx @@ -0,0 +1,62 @@ +--- +title: AlchemyTransport +description: Overview of AlchemyTransport +slug: wallets/reference/common/type-aliases/AlchemyTransport +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type AlchemyTransport = AlchemyTransportBase & object; +``` + +Defined in: [packages/common/src/transport/alchemy.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/alchemy.ts#L48) + +## Type Declaration + + + + + + + + + + + + + + + + + +
NameType
+ `updateHeaders()` + + (`newHeaders`) => `void` +
+ +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `rpcSchema` *extends* `RpcSchema` | `undefined` + + `undefined` +
diff --git a/docs/pages/reference/common/src/type-aliases/DiagnosticsLogger.mdx b/docs/pages/reference/common/src/type-aliases/DiagnosticsLogger.mdx new file mode 100644 index 0000000000..e43d125cc2 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/DiagnosticsLogger.mdx @@ -0,0 +1,242 @@ +--- +title: DiagnosticsLogger +description: Diagnostics logger instance for developer-facing debugging output. Provides level-based logging (error, warn, info, debug, verbose) with structured data. +slug: wallets/reference/common/type-aliases/DiagnosticsLogger +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type DiagnosticsLogger = object; +``` + +Defined in: [packages/common/src/logging/logger.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/logger.ts#L24) + +Diagnostics logger instance for developer-facing debugging output. +Provides level-based logging (error, warn, info, debug, verbose) with structured data. + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
+ `debug` + + (`msg`, `data?`) => `void` + + Log debug messages for development and troubleshooting +
+ `error` + + (`msg`, `data?`) => `void` + + Log errors for failures +
+ `info` + + (`msg`, `data?`) => `void` + + Log informational messages for key operations +
+ `verbose` + + (`msg`, `data?`) => `void` + + Log verbose details for very detailed tracing +
+ `warn` + + (`msg`, `data?`) => `void` + + Log warnings for recoverable issues +
+ `withContext` + + (`extra`) => `DiagnosticsLogger` + + Create a child logger with additional context merged into all log entries +
+ +## Methods + +### profiled() + +```ts +profiled(name, func): (...args) => TRet; +``` + +Defined in: [packages/common/src/logging/logger.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/logger.ts#L56) + +Wrap a function to measure and log its execution time at DEBUG level. +Supports both synchronous and asynchronous functions. + +#### Type Parameters + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDescription
+ `TArgs` *extends* `any`\[] + + Function argument types +
+ `TRet` + + Function return type +
+ +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `name` + + `string` + + Name for profiling logs +
+ `func` + + (...`args`) => `TRet` + + Function to profile +
+ +#### Returns + +Wrapped function that logs execution time + +```ts +(...args): TRet; +``` + +##### Parameters + + + + + + + + + + + + + + + + + +
ParameterType
+ ...`args` + + `TArgs` +
+ +##### Returns + +`TRet` diff --git a/docs/pages/reference/common/src/type-aliases/ExtractRpcMethod.mdx b/docs/pages/reference/common/src/type-aliases/ExtractRpcMethod.mdx new file mode 100644 index 0000000000..d8e602783a --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/ExtractRpcMethod.mdx @@ -0,0 +1,44 @@ +--- +title: ExtractRpcMethod +description: Overview of ExtractRpcMethod +slug: wallets/reference/common/type-aliases/ExtractRpcMethod +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ExtractRpcMethod = Extract< + T[number], + { + Method: M; + } +>; +``` + +Defined in: [packages/common/src/utils/types.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/types.ts#L7) + +## Type Parameters + + + + + + + + + + + + + + + + + + +
Type Parameter
+ `T` *extends* readonly `object`\[] +
+ `M` *extends* `T`\[`number`]\[`"Method"`] +
diff --git a/docs/pages/reference/common/src/type-aliases/LogLevel.mdx b/docs/pages/reference/common/src/type-aliases/LogLevel.mdx new file mode 100644 index 0000000000..60ab42bad0 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/LogLevel.mdx @@ -0,0 +1,14 @@ +--- +title: LogLevel +description: Overview of LogLevel +slug: wallets/reference/common/type-aliases/LogLevel +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type LogLevel = (typeof LogLevel)[keyof typeof LogLevel]; +``` + +Defined in: [packages/common/src/logging/config.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/config.ts#L12) diff --git a/docs/pages/reference/common/src/type-aliases/Never.mdx b/docs/pages/reference/common/src/type-aliases/Never.mdx new file mode 100644 index 0000000000..eb02860ad4 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/Never.mdx @@ -0,0 +1,32 @@ +--- +title: Never +description: Overview of Never +slug: wallets/reference/common/type-aliases/Never +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type Never = T extends object ? { [K in keyof T]?: never } : never; +``` + +Defined in: [packages/common/src/utils/types.ts:1](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/utils/types.ts#L1) + +## Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `T` +
diff --git a/docs/pages/reference/common/src/type-aliases/RestRequestFn.mdx b/docs/pages/reference/common/src/type-aliases/RestRequestFn.mdx new file mode 100644 index 0000000000..1ac02f4535 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/RestRequestFn.mdx @@ -0,0 +1,104 @@ +--- +title: RestRequestFn +description: Overview of RestRequestFn +slug: wallets/reference/common/type-aliases/RestRequestFn +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type RestRequestFn = <_parameters, _returnType>( + params, +) => Promise<_returnType>; +``` + +Defined in: [packages/common/src/rest/types.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/rest/types.ts#L33) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `Schema` *extends* [`RestRequestSchema`](RestRequestSchema) | `undefined` + + `undefined` +
+ +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `_parameters` *extends* [`RestRequestParams`](RestRequestParams)\<`Schema`> + + [`RestRequestParams`](RestRequestParams)\<`Schema`> +
+ `_returnType` + + `Schema` *extends* [`RestRequestSchema`](RestRequestSchema) ? `Extract`\<`Schema`\[`number`], \{ + `Route`: `_parameters`\[`"route"`]; + }>\[`"Response"`] : `unknown` +
+ +## Parameters + + + + + + + + + + + + + + + + + +
ParameterType
+ `params` + + `_parameters` +
+ +## Returns + +`Promise`\<`_returnType`> diff --git a/docs/pages/reference/common/src/type-aliases/RestRequestParams.mdx b/docs/pages/reference/common/src/type-aliases/RestRequestParams.mdx new file mode 100644 index 0000000000..5e992aa760 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/RestRequestParams.mdx @@ -0,0 +1,38 @@ +--- +title: RestRequestParams +description: Overview of RestRequestParams +slug: wallets/reference/common/type-aliases/RestRequestParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type RestRequestParams = Schema extends RestRequestSchema ? { [K in keyof Schema]: Prettify<{ method: Schema[K] extends Schema[number] ? Schema[K]["Method"] : never; route: Schema[K] extends Schema[number] ? Schema[K]["Route"] : never } & (Schema[K] extends Schema[number] ? Schema[K]["Body"] extends undefined ? { body?: undefined } : { body: (...)[(...)]["Body"] } : never)> }[number] : object; +``` + +Defined in: [packages/common/src/rest/types.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/rest/types.ts#L10) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `Schema` *extends* [`RestRequestSchema`](RestRequestSchema) | `undefined` + + `undefined` +
diff --git a/docs/pages/reference/common/src/type-aliases/RestRequestSchema.mdx b/docs/pages/reference/common/src/type-aliases/RestRequestSchema.mdx new file mode 100644 index 0000000000..f623f82a90 --- /dev/null +++ b/docs/pages/reference/common/src/type-aliases/RestRequestSchema.mdx @@ -0,0 +1,14 @@ +--- +title: RestRequestSchema +description: Overview of RestRequestSchema +slug: wallets/reference/common/type-aliases/RestRequestSchema +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type RestRequestSchema = readonly object[]; +``` + +Defined in: [packages/common/src/rest/types.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/rest/types.ts#L3) diff --git a/docs/pages/reference/common/src/variables/AlchemyConnectionConfigSchema.mdx b/docs/pages/reference/common/src/variables/AlchemyConnectionConfigSchema.mdx new file mode 100644 index 0000000000..9c6a383f10 --- /dev/null +++ b/docs/pages/reference/common/src/variables/AlchemyConnectionConfigSchema.mdx @@ -0,0 +1,59 @@ +--- +title: AlchemyConnectionConfigSchema +description: Main connection configuration allowing flexible combinations. Can specify URL, auth method, or both together. +slug: wallets/reference/common/variables/AlchemyConnectionConfigSchema +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const AlchemyConnectionConfigSchema: ZodEffects< + ZodEffects< + ZodObject< + { + apiKey: ZodOptional; + jwt: ZodOptional; + url: ZodOptional; + }, + "strict", + ZodTypeAny, + { + apiKey?: string; + jwt?: string; + url?: string; + }, + { + apiKey?: string; + jwt?: string; + url?: string; + } + >, + { + apiKey?: string; + jwt?: string; + url?: string; + }, + { + apiKey?: string; + jwt?: string; + url?: string; + } + >, + { + apiKey?: string; + jwt?: string; + url?: string; + }, + { + apiKey?: string; + jwt?: string; + url?: string; + } +>; +``` + +Defined in: [packages/common/src/transport/connectionSchema.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/transport/connectionSchema.ts#L48) + +Main connection configuration allowing flexible combinations. +Can specify URL, auth method, or both together. diff --git a/docs/pages/reference/common/src/variables/LogLevel.mdx b/docs/pages/reference/common/src/variables/LogLevel.mdx new file mode 100644 index 0000000000..07565acb67 --- /dev/null +++ b/docs/pages/reference/common/src/variables/LogLevel.mdx @@ -0,0 +1,131 @@ +--- +title: LogLevel +description: Log level constants for controlling diagnostics output. Lower numeric values indicate higher priority (more restrictive filtering). +slug: wallets/reference/common/variables/LogLevel +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const LogLevel: object; +``` + +Defined in: [packages/common/src/logging/config.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/logging/config.ts#L12) + +Log level constants for controlling diagnostics output. +Lower numeric values indicate higher priority (more restrictive filtering). + +## Example + +```ts +import { LogLevel, setGlobalLoggerConfig } from "@alchemy/common"; + +setGlobalLoggerConfig({ level: LogLevel.DEBUG }); +``` + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault valueDescription
+ `DEBUG` + + `3` + + `3` + + Debug messages and all above +
+ `ERROR` + + `0` + + `0` + + Critical errors only +
+ `INFO` + + `2` + + `2` + + Informational messages, warnings, and errors +
+ `VERBOSE` + + `4` + + `4` + + All messages including verbose details +
+ `WARN` + + `1` + + `1` + + Warnings and errors +
diff --git a/docs/pages/reference/common/src/variables/fraxtalSepolia.mdx b/docs/pages/reference/common/src/variables/fraxtalSepolia.mdx new file mode 100644 index 0000000000..ac16ad110c --- /dev/null +++ b/docs/pages/reference/common/src/variables/fraxtalSepolia.mdx @@ -0,0 +1,14 @@ +--- +title: fraxtalSepolia +description: Overview of fraxtalSepolia +slug: wallets/reference/common/variables/fraxtalSepolia +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const fraxtalSepolia: Object; +``` + +Defined in: [packages/common/src/chains.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/chains.ts#L19) diff --git a/docs/pages/reference/common/src/variables/gensynTestnet.mdx b/docs/pages/reference/common/src/variables/gensynTestnet.mdx new file mode 100644 index 0000000000..ba4af23009 --- /dev/null +++ b/docs/pages/reference/common/src/variables/gensynTestnet.mdx @@ -0,0 +1,14 @@ +--- +title: gensynTestnet +description: Overview of gensynTestnet +slug: wallets/reference/common/variables/gensynTestnet +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const gensynTestnet: Object; +``` + +Defined in: [packages/common/src/chains.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/chains.ts#L49) diff --git a/docs/pages/reference/common/src/variables/openlootSepolia.mdx b/docs/pages/reference/common/src/variables/openlootSepolia.mdx new file mode 100644 index 0000000000..c62bcd2056 --- /dev/null +++ b/docs/pages/reference/common/src/variables/openlootSepolia.mdx @@ -0,0 +1,14 @@ +--- +title: openlootSepolia +description: Overview of openlootSepolia +slug: wallets/reference/common/variables/openlootSepolia +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const openlootSepolia: Object; +``` + +Defined in: [packages/common/src/chains.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/chains.ts#L31) diff --git a/docs/pages/reference/common/src/variables/riseTestnet.mdx b/docs/pages/reference/common/src/variables/riseTestnet.mdx new file mode 100644 index 0000000000..fb64a22d3e --- /dev/null +++ b/docs/pages/reference/common/src/variables/riseTestnet.mdx @@ -0,0 +1,14 @@ +--- +title: riseTestnet +description: Overview of riseTestnet +slug: wallets/reference/common/variables/riseTestnet +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const riseTestnet: Object; +``` + +Defined in: [packages/common/src/chains.ts:67](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/chains.ts#L67) diff --git a/docs/pages/reference/common/src/variables/storyMainnet.mdx b/docs/pages/reference/common/src/variables/storyMainnet.mdx new file mode 100644 index 0000000000..d9989de283 --- /dev/null +++ b/docs/pages/reference/common/src/variables/storyMainnet.mdx @@ -0,0 +1,14 @@ +--- +title: storyMainnet +description: Overview of storyMainnet +slug: wallets/reference/common/variables/storyMainnet +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const storyMainnet: Object; +``` + +Defined in: [packages/common/src/chains.ts:85](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/chains.ts#L85) diff --git a/docs/pages/reference/common/src/variables/teaSepolia.mdx b/docs/pages/reference/common/src/variables/teaSepolia.mdx new file mode 100644 index 0000000000..6f1be7cf6c --- /dev/null +++ b/docs/pages/reference/common/src/variables/teaSepolia.mdx @@ -0,0 +1,14 @@ +--- +title: teaSepolia +description: Overview of teaSepolia +slug: wallets/reference/common/variables/teaSepolia +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const teaSepolia: Object; +``` + +Defined in: [packages/common/src/chains.ts:102](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/common/src/chains.ts#L102) diff --git a/docs/pages/reference/modules.mdx b/docs/pages/reference/modules.mdx index 8fa241e73f..2e6057653b 100644 --- a/docs/pages/reference/modules.mdx +++ b/docs/pages/reference/modules.mdx @@ -9,15 +9,9 @@ layout: reference ## Modules -| Module | Description | -| :------------------------------------------------------------------------------------ | :---------- | -| [aa-sdk/core/src](aa-sdk/core/src/README) | - | -| [aa-sdk/ethers/src](aa-sdk/ethers/src/README) | - | -| [account-kit/core/src](account-kit/core/src/README) | - | -| [account-kit/infra/src/exports](account-kit/infra/src/exports/README) | - | -| [account-kit/react-native/src](account-kit/react-native/src/README) | - | -| [account-kit/react/src](account-kit/react/src/README) | - | -| [account-kit/rn-signer/src](account-kit/rn-signer/src/README) | - | -| [account-kit/signer/src](account-kit/signer/src/README) | - | -| [account-kit/smart-contracts/src](account-kit/smart-contracts/src/README) | - | -| [account-kit/wallet-client/src/exports](account-kit/wallet-client/src/exports/README) | - | +| Module | Description | +| :-------------------------------------------------------- | :---------- | +| [aa-infra/src](aa-infra/src/README) | - | +| [common/src](common/src/README) | - | +| [smart-accounts/src](smart-accounts/src/README) | - | +| [wallet-apis/src/exports](wallet-apis/src/exports/README) | - | diff --git a/docs/pages/reference/smart-accounts/src/README.mdx b/docs/pages/reference/smart-accounts/src/README.mdx new file mode 100644 index 0000000000..f55f8e66cf --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/README.mdx @@ -0,0 +1,176 @@ +--- +title: smart-accounts +description: Overview of smart-accounts +slug: wallets/reference/smart-accounts +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +## Classes + +| Class | Description | +| :------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------- | +| [AccountAddressAsTargetError](/wallets/reference/smart-accounts/classes/AccountAddressAsTargetError) | Error class for when an account address is used as target. | +| [DeadlineOverLimitError](/wallets/reference/smart-accounts/classes/DeadlineOverLimitError) | Error class for when a deadline is over the limit. | +| [DuplicateTargetAddressError](/wallets/reference/smart-accounts/classes/DuplicateTargetAddressError) | Error class for when a duplicate target address is added to a permission builder. | +| [EntityIdOverrideError](/wallets/reference/smart-accounts/classes/EntityIdOverrideError) | Error class denoting that the provided entity id is invalid because it's overriding the native entity id. | +| [ExpiredDeadlineError](/wallets/reference/smart-accounts/classes/ExpiredDeadlineError) | Error class for when a deadline is expired. | +| [InvalidDeferredActionNonceError](/wallets/reference/smart-accounts/classes/InvalidDeferredActionNonceError) | Error class denoting that the deferred action nonce used is invalid. | +| [InvalidEntityIdError](/wallets/reference/smart-accounts/classes/InvalidEntityIdError) | Error class denoting that the provided entity id is invalid because it's too large. | +| [InvalidNonceKeyError](/wallets/reference/smart-accounts/classes/InvalidNonceKeyError) | Error class denoting that the nonce key is invalid because its too large. | +| [InvalidOwnerError](/wallets/reference/smart-accounts/classes/InvalidOwnerError) | Error class denoting that the owner for an account is invalid | +| [MultipleGasLimitError](/wallets/reference/smart-accounts/classes/MultipleGasLimitError) | Error class for when a multiple gas limit permission is added to a permission builder. | +| [MultipleNativeTokenTransferError](/wallets/reference/smart-accounts/classes/MultipleNativeTokenTransferError) | Error class for when a multiple native token transfer permission is added to a permission builder. | +| [NoFunctionsProvidedError](/wallets/reference/smart-accounts/classes/NoFunctionsProvidedError) | Error class for when no functions are provided to a permission builder. | +| [PermissionBuilder](/wallets/reference/smart-accounts/classes/PermissionBuilder) | A builder for constructing a Permission object. | +| [PermissionBuilderError](/wallets/reference/smart-accounts/classes/PermissionBuilderError) | Abstract class representing a Permission Builder Error, subclassed by all permission builder errors. | +| [RootPermissionOnlyError](/wallets/reference/smart-accounts/classes/RootPermissionOnlyError) | Error class for when a root permission is added to a permission builder. | +| [SelectorNotAllowed](/wallets/reference/smart-accounts/classes/SelectorNotAllowed) | Error class for when a selector is not allowed. | +| [UnsupportedPermissionTypeError](/wallets/reference/smart-accounts/classes/UnsupportedPermissionTypeError) | Error class for when an unsupported permission type is added to a permission builder. | +| [ValidationConfigUnsetError](/wallets/reference/smart-accounts/classes/ValidationConfigUnsetError) | Error class for when a validation config is unset. | +| [ZeroAddressError](/wallets/reference/smart-accounts/classes/ZeroAddressError) | Error class for when a zero address is provided to a permission builder. | + +## Type Aliases + +| Type Alias | Description | +| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [BaseMaV1AccountImplementation](/wallets/reference/smart-accounts/type-aliases/BaseMaV1AccountImplementation) | - | +| [BaseModularAccountV2Implementation](/wallets/reference/smart-accounts/type-aliases/BaseModularAccountV2Implementation) | - | +| [BuildDeferredActionDigestParams](/wallets/reference/smart-accounts/type-aliases/BuildDeferredActionDigestParams) | - | +| [BuildNonceParams](/wallets/reference/smart-accounts/type-aliases/BuildNonceParams) | - | +| [BuildPreSignatureDeferredActionDigestParams](/wallets/reference/smart-accounts/type-aliases/BuildPreSignatureDeferredActionDigestParams) | - | +| [CreateDeferredActionTypedDataParams](/wallets/reference/smart-accounts/type-aliases/CreateDeferredActionTypedDataParams) | - | +| [DeferralActions](/wallets/reference/smart-accounts/type-aliases/DeferralActions) | - | +| [DeferredActionReturnData](/wallets/reference/smart-accounts/type-aliases/DeferredActionReturnData) | - | +| [DeferredActionTypedData](/wallets/reference/smart-accounts/type-aliases/DeferredActionTypedData) | - | +| [EntityIdAndNonceParams](/wallets/reference/smart-accounts/type-aliases/EntityIdAndNonceParams) | - | +| [EntryPointFromAccountRegistry](/wallets/reference/smart-accounts/type-aliases/EntryPointFromAccountRegistry) | Infers the EntryPoint details as a type, given the account type and version. | +| [ExecutionDataView](/wallets/reference/smart-accounts/type-aliases/ExecutionDataView) | - | +| [GetAccountParameter](/wallets/reference/smart-accounts/type-aliases/GetAccountParameter) | - | +| [GetLightAccountAddressFromFactoryDataParams](/wallets/reference/smart-accounts/type-aliases/GetLightAccountAddressFromFactoryDataParams) | - | +| [GetLightAccountType](/wallets/reference/smart-accounts/type-aliases/GetLightAccountType) | - | +| [GetMAV2UpgradeToData](/wallets/reference/smart-accounts/type-aliases/GetMAV2UpgradeToData) | - | +| [GetModularAccountV2AddressFromFactoryDataParams](/wallets/reference/smart-accounts/type-aliases/GetModularAccountV2AddressFromFactoryDataParams) | - | +| [GetMultiOwnerLightAccountAddressFromFactoryDataParams](/wallets/reference/smart-accounts/type-aliases/GetMultiOwnerLightAccountAddressFromFactoryDataParams) | - | +| [GetMultiOwnerModularAccountV1AddressFromFactoryDataParams](/wallets/reference/smart-accounts/type-aliases/GetMultiOwnerModularAccountV1AddressFromFactoryDataParams) | - | +| [HookConfig](/wallets/reference/smart-accounts/type-aliases/HookConfig) | - | +| [HookIdentifier](/wallets/reference/smart-accounts/type-aliases/HookIdentifier) | - | +| [HookType](/wallets/reference/smart-accounts/type-aliases/HookType) | - | +| [InstallValidationActions](/wallets/reference/smart-accounts/type-aliases/InstallValidationActions) | - | +| [InstallValidationParams](/wallets/reference/smart-accounts/type-aliases/InstallValidationParams) | - | +| [LightAccount](/wallets/reference/smart-accounts/type-aliases/LightAccount) | - | +| [LightAccountAbi](/wallets/reference/smart-accounts/type-aliases/LightAccountAbi) | - | +| [LightAccountActions](/wallets/reference/smart-accounts/type-aliases/LightAccountActions) | - | +| [LightAccountType](/wallets/reference/smart-accounts/type-aliases/LightAccountType) | - | +| [LightAccountVersion](/wallets/reference/smart-accounts/type-aliases/LightAccountVersion) | - | +| [ModularAccountV1Base](/wallets/reference/smart-accounts/type-aliases/ModularAccountV1Base) | - | +| [ModularAccountV2](/wallets/reference/smart-accounts/type-aliases/ModularAccountV2) | - | +| [ModularAccountV2Base](/wallets/reference/smart-accounts/type-aliases/ModularAccountV2Base) | - | +| [ModuleEntity](/wallets/reference/smart-accounts/type-aliases/ModuleEntity) | - | +| [MultiOwnerLightAccount](/wallets/reference/smart-accounts/type-aliases/MultiOwnerLightAccount) | - | +| [MultiOwnerLightAccountActions](/wallets/reference/smart-accounts/type-aliases/MultiOwnerLightAccountActions) | - | +| [MultiOwnerModularAccountV1](/wallets/reference/smart-accounts/type-aliases/MultiOwnerModularAccountV1) | - | +| [MultiOwnerModularAccountV1Actions](/wallets/reference/smart-accounts/type-aliases/MultiOwnerModularAccountV1Actions) | - | +| [Pack1271SignatureParams](/wallets/reference/smart-accounts/type-aliases/Pack1271SignatureParams) | - | +| [PackUOSignatureParams](/wallets/reference/smart-accounts/type-aliases/PackUOSignatureParams) | - | +| [Permission](/wallets/reference/smart-accounts/type-aliases/Permission) | - | +| [PermissionType](/wallets/reference/smart-accounts/type-aliases/PermissionType) | - | +| [PredictLightAccountAddressParams](/wallets/reference/smart-accounts/type-aliases/PredictLightAccountAddressParams) | - | +| [PredictModularAccountV2AddressParams](/wallets/reference/smart-accounts/type-aliases/PredictModularAccountV2AddressParams) | - | +| [PredictMultiOwnerLightAccountAddressParams](/wallets/reference/smart-accounts/type-aliases/PredictMultiOwnerLightAccountAddressParams) | - | +| [PredictMultiOwnerModularAccountV1AddressParams](/wallets/reference/smart-accounts/type-aliases/PredictMultiOwnerModularAccountV1AddressParams) | - | +| [SemiModularAccount7702StaticImpl](/wallets/reference/smart-accounts/type-aliases/SemiModularAccount7702StaticImpl) | - | +| [SemiModularAccountV2FactoryArgs](/wallets/reference/smart-accounts/type-aliases/SemiModularAccountV2FactoryArgs) | - | +| [SemiModularAccountV2StaticImpl](/wallets/reference/smart-accounts/type-aliases/SemiModularAccountV2StaticImpl) | - | +| [SignaturePrefix](/wallets/reference/smart-accounts/type-aliases/SignaturePrefix) | - | +| [SignatureRequest](/wallets/reference/smart-accounts/type-aliases/SignatureRequest) | - | +| [SignerEntity](/wallets/reference/smart-accounts/type-aliases/SignerEntity) | - | +| [SmartAccountWithDecodeCalls](/wallets/reference/smart-accounts/type-aliases/SmartAccountWithDecodeCalls) | Helper type that converts a SmartAccount type to have a required `decodeCalls` function. This is useful for account implementations that always provide the `decodeCalls` functionality. | +| [StaticSmartAccountImplementation](/wallets/reference/smart-accounts/type-aliases/StaticSmartAccountImplementation) | - | +| [ToLightAccountParams](/wallets/reference/smart-accounts/type-aliases/ToLightAccountParams) | - | +| [ToModularAccountV1BaseParams](/wallets/reference/smart-accounts/type-aliases/ToModularAccountV1BaseParams) | - | +| [ToModularAccountV2BaseParams](/wallets/reference/smart-accounts/type-aliases/ToModularAccountV2BaseParams) | - | +| [ToModularAccountV2Params](/wallets/reference/smart-accounts/type-aliases/ToModularAccountV2Params) | - | +| [ToMultiOwnerLightAccountParams](/wallets/reference/smart-accounts/type-aliases/ToMultiOwnerLightAccountParams) | - | +| [ToMultiOwnerModularAccountV1Params](/wallets/reference/smart-accounts/type-aliases/ToMultiOwnerModularAccountV1Params) | - | +| [UninstallValidationParams](/wallets/reference/smart-accounts/type-aliases/UninstallValidationParams) | - | +| [UpgradeToData](/wallets/reference/smart-accounts/type-aliases/UpgradeToData) | - | +| [ValidationConfig](/wallets/reference/smart-accounts/type-aliases/ValidationConfig) | - | +| [ValidationData](/wallets/reference/smart-accounts/type-aliases/ValidationData) | - | +| [ValidationDataParams](/wallets/reference/smart-accounts/type-aliases/ValidationDataParams) | - | +| [ValidationDataView](/wallets/reference/smart-accounts/type-aliases/ValidationDataView) | - | + +## Variables + +| Variable | Description | +| :--------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- | +| [AccountVersionRegistry](/wallets/reference/smart-accounts/variables/AccountVersionRegistry) | Account version registry interface that defines the light account versions and the version definition for each light account type | +| [AllowlistModule](/wallets/reference/smart-accounts/variables/AllowlistModule) | - | +| [DEFAULT_OWNER_ENTITY_ID](/wallets/reference/smart-accounts/variables/DEFAULT_OWNER_ENTITY_ID) | The default owner entity ID. | +| [DefaultAddress](/wallets/reference/smart-accounts/variables/DefaultAddress) | A mapping of default addresses for the ModularAccountV2. | +| [DefaultMaV1Address](/wallets/reference/smart-accounts/variables/DefaultMaV1Address) | A mapping of default addresses for the ModularAccountV1. | +| [DefaultMaV1PluginAddress](/wallets/reference/smart-accounts/variables/DefaultMaV1PluginAddress) | A mapping of default addresses for the ModularAccountV1 plugins. | +| [DefaultModuleAddress](/wallets/reference/smart-accounts/variables/DefaultModuleAddress) | A mapping of default addresses for the ModularAccountV2 modules. | +| [ENTITY_ID_AND_NONCE_READER_BYTECODE](/wallets/reference/smart-accounts/variables/ENTITY_ID_AND_NONCE_READER_BYTECODE) | - | +| [EXECUTE_USER_OP_SELECTOR](/wallets/reference/smart-accounts/variables/EXECUTE_USER_OP_SELECTOR) | The selector for the execute user operation function. | +| [HookIdentifier](/wallets/reference/smart-accounts/variables/HookIdentifier) | A pseudo-enum for hook identifiers. | +| [HookType](/wallets/reference/smart-accounts/variables/HookType) | - | +| [lightAccountStaticImplV1_0_1](/wallets/reference/smart-accounts/variables/lightAccountStaticImplV1_0_1) | - | +| [lightAccountStaticImplV1_0_2](/wallets/reference/smart-accounts/variables/lightAccountStaticImplV1_0_2) | - | +| [lightAccountStaticImplV1_1_0](/wallets/reference/smart-accounts/variables/lightAccountStaticImplV1_1_0) | - | +| [lightAccountStaticImplV2_0_0](/wallets/reference/smart-accounts/variables/lightAccountStaticImplV2_0_0) | - | +| [LightAccountUnsupported1271Factories](/wallets/reference/smart-accounts/variables/LightAccountUnsupported1271Factories) | Can be used to check if the account with one of the following factory addresses to not support 1271 signing. | +| [LightAccountUnsupported1271Impls](/wallets/reference/smart-accounts/variables/LightAccountUnsupported1271Impls) | Can be used to check if the account with one of the following implementation addresses to not support 1271 signing. | +| [LightAccountV1Versions](/wallets/reference/smart-accounts/variables/LightAccountV1Versions) | Light Account v1 versions | +| [LightAccountV2Versions](/wallets/reference/smart-accounts/variables/LightAccountV2Versions) | Light Account v2 versions | +| [multiOwnerLightAccountStaticImplV2_0_0](/wallets/reference/smart-accounts/variables/multiOwnerLightAccountStaticImplV2_0_0) | - | +| [multiOwnerModularAccountStaticImpl](/wallets/reference/smart-accounts/variables/multiOwnerModularAccountStaticImpl) | Static implementation logic for ModularAccountV1. | +| [NativeTokenLimitModule](/wallets/reference/smart-accounts/variables/NativeTokenLimitModule) | - | +| [PaymasterGuardModule](/wallets/reference/smart-accounts/variables/PaymasterGuardModule) | - | +| [PermissionType](/wallets/reference/smart-accounts/variables/PermissionType) | A pseudo-enum for permission types. | +| [semiModularAccount7702StaticImpl](/wallets/reference/smart-accounts/variables/semiModularAccount7702StaticImpl) | Static implementation logic for SemiModularAccount7702. | +| [semiModularAccountV2StaticImpl](/wallets/reference/smart-accounts/variables/semiModularAccountV2StaticImpl) | Static implementation logic for SemiModularAccountV2. | +| [SignaturePrefix](/wallets/reference/smart-accounts/variables/SignaturePrefix) | - | +| [SingleSignerValidationModule](/wallets/reference/smart-accounts/variables/SingleSignerValidationModule) | - | +| [TimeRangeModule](/wallets/reference/smart-accounts/variables/TimeRangeModule) | - | + +## Functions + +| Function | Description | +| :----------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [buildDeferredActionDigest](/wallets/reference/smart-accounts/functions/buildDeferredActionDigest) | Creates the digest which must be prepended to the userOp signature. | +| [buildFullNonceKey](/wallets/reference/smart-accounts/functions/buildFullNonceKey) | Builds a full nonce key. | +| [chainHas7212](/wallets/reference/smart-accounts/functions/chainHas7212) | Checks if the current chain supports RIP-7212 (precompiled contract for secp256r1 curve operations). This is used to determine if the chain has native support for P256 signature verification, which is commonly used in WebAuthn/passkey implementations. | +| [defaultLightAccountVersion](/wallets/reference/smart-accounts/functions/defaultLightAccountVersion) | Get the default light account version for the given light account type | +| [deferralActions](/wallets/reference/smart-accounts/functions/deferralActions) | Provides deferred action functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`. | +| [getLightAccountAddressFromFactoryData](/wallets/reference/smart-accounts/functions/getLightAccountAddressFromFactoryData) | Gets the light account address from factory data. If the factory is a known default, decodes the args and predicts without RPC. Otherwise falls back to calling the entry point's getSenderAddress. | +| [getLightAccountImplAddress](/wallets/reference/smart-accounts/functions/getLightAccountImplAddress) | Get the light account implementation address for the given light account | +| [getMAV2UpgradeToData](/wallets/reference/smart-accounts/functions/getMAV2UpgradeToData) | Gets the upgrade to data for the ModularAccountV2. | +| [getModularAccountV2AddressFromFactoryData](/wallets/reference/smart-accounts/functions/getModularAccountV2AddressFromFactoryData) | Gets the modular account v2 address from factory data. If the factory is a known default (SMA), decodes the args and predicts without RPC. Otherwise falls back to calling the entry point's getSenderAddress. | +| [getMultiOwnerLightAccountAddressFromFactoryData](/wallets/reference/smart-accounts/functions/getMultiOwnerLightAccountAddressFromFactoryData) | Gets the multi-owner light account address from factory data. If the factory is a known default, decodes the args and predicts without RPC. Otherwise falls back to calling the entry point's getSenderAddress. | +| [getMultiOwnerModularAccountV1AddressFromFactoryData](/wallets/reference/smart-accounts/functions/getMultiOwnerModularAccountV1AddressFromFactoryData) | Gets the multi-owner modular account v1 address from factory data. If the factory is a known default, decodes the args and predicts without RPC. Otherwise falls back to calling the entry point's getSenderAddress. | +| [installValidationActions](/wallets/reference/smart-accounts/functions/installValidationActions) | Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`. | +| [isLightAccountVersion1](/wallets/reference/smart-accounts/functions/isLightAccountVersion1) | Type guard to check if a version is a Light Account v1 version | +| [isLightAccountVersion2](/wallets/reference/smart-accounts/functions/isLightAccountVersion2) | Type guard to check if a version is a Light Account v2 version | +| [isModularAccountV2](/wallets/reference/smart-accounts/functions/isModularAccountV2) | Checks if an account is a ModularAccountV2. | +| [multiOwnerLightAccountActions](/wallets/reference/smart-accounts/functions/multiOwnerLightAccountActions) | Generates client actions for a multi-owner light account, including the ability to update owners. | +| [multiOwnerModularAccountV1Actions](/wallets/reference/smart-accounts/functions/multiOwnerModularAccountV1Actions) | Generates client actions for a multi-owner MAv1 account, including the ability to update owners. | +| [pack1271Signature](/wallets/reference/smart-accounts/functions/pack1271Signature) | Signature packing utility for 1271 signatures. | +| [packUOSignature](/wallets/reference/smart-accounts/functions/packUOSignature) | Signature packing utility for user operations. | +| [parseDeferredAction](/wallets/reference/smart-accounts/functions/parseDeferredAction) | Parses out the 3 components from a deferred action. | +| [predictLightAccountAddress](/wallets/reference/smart-accounts/functions/predictLightAccountAddress) | Predicts the address of a light account based on provided parameters such as factory address, salt, owner address, and version. | +| [predictModularAccountV2Address](/wallets/reference/smart-accounts/functions/predictModularAccountV2Address) | Predicts the address of a modular account V2 based on the provided parameters, which include factory address, salt, and implementation address. This function supports different types of accounts including "SMA" and "MA". | +| [predictMultiOwnerLightAccountAddress](/wallets/reference/smart-accounts/functions/predictMultiOwnerLightAccountAddress) | Predicts the address of a **Multi-Owner Light Account** given the factory, salt and the set of owner addresses. | +| [predictMultiOwnerModularAccountV1Address](/wallets/reference/smart-accounts/functions/predictMultiOwnerModularAccountV1Address) | Predicts the address of a MultiOwnerModularAccountV1 smart account before deployment. | +| [serializeHookConfig](/wallets/reference/smart-accounts/functions/serializeHookConfig) | Serializes a `HookConfig` object into a `Hex` format by encoding the hook type, presence of post/pre hooks, address, and entity ID. | +| [serializeModuleEntity](/wallets/reference/smart-accounts/functions/serializeModuleEntity) | Serializes a module entity into a hexadecimal format by concatenating the module address and entity ID. | +| [serializeValidationConfig](/wallets/reference/smart-accounts/functions/serializeValidationConfig) | Serializes a validation configuration into a hexadecimal string representation. This involves converting boolean flags into bitwise representation and combining them with serialized module entity data. | +| [singleOwnerLightAccountActions](/wallets/reference/smart-accounts/functions/singleOwnerLightAccountActions) | A decorator that can be used with viem's bundler client to add light account actions to the client | +| [toLightAccount](/wallets/reference/smart-accounts/functions/toLightAccount) | Creates a light account. | +| [toModularAccountV1Base](/wallets/reference/smart-accounts/functions/toModularAccountV1Base) | Creates a ModularAccountV1Base instance. | +| [toModularAccountV2](/wallets/reference/smart-accounts/functions/toModularAccountV2) | Creates a MAv2 account. | +| [toModularAccountV2Base](/wallets/reference/smart-accounts/functions/toModularAccountV2Base) | Creates a ModularAccountV2Base instance. | +| [toMultiOwnerLightAccount](/wallets/reference/smart-accounts/functions/toMultiOwnerLightAccount) | Creates a multi-owner light account. | +| [toMultiOwnerModularAccountV1](/wallets/reference/smart-accounts/functions/toMultiOwnerModularAccountV1) | Creates a multi-owner MAv1 account. | +| [toReplaySafeTypedData](/wallets/reference/smart-accounts/functions/toReplaySafeTypedData) | Converts a hash to a replay safe typed data. | diff --git a/docs/pages/reference/smart-accounts/src/classes/AccountAddressAsTargetError.mdx b/docs/pages/reference/smart-accounts/src/classes/AccountAddressAsTargetError.mdx new file mode 100644 index 0000000000..581648ddc3 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/AccountAddressAsTargetError.mdx @@ -0,0 +1,96 @@ +--- +title: AccountAddressAsTargetError +description: Error class for when an account address is used as target. +slug: wallets/reference/smart-accounts/classes/AccountAddressAsTargetError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L31) + +Error class for when an account address is used as target. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new AccountAddressAsTargetError(permission): AccountAddressAsTargetError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:39](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L39) + +Constructor for initializing an error message indicating that account address is used as target. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + [`Permission`](../type-aliases/Permission) + + The permission with account address as target +
+ +#### Returns + +`AccountAddressAsTargetError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: AccountAddressAsTargetError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/DeadlineOverLimitError.mdx b/docs/pages/reference/smart-accounts/src/classes/DeadlineOverLimitError.mdx new file mode 100644 index 0000000000..48c2790600 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/DeadlineOverLimitError.mdx @@ -0,0 +1,96 @@ +--- +title: DeadlineOverLimitError +description: Error class for when a deadline is over the limit. +slug: wallets/reference/smart-accounts/classes/DeadlineOverLimitError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:103](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L103) + +Error class for when a deadline is over the limit. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new DeadlineOverLimitError(deadline): DeadlineOverLimitError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:111](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L111) + +Constructor for initializing an error message indicating the deadline has expired. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `deadline` + + `number` + + The expired deadline timestamp +
+ +#### Returns + +`DeadlineOverLimitError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: DeadlineOverLimitError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/DuplicateTargetAddressError.mdx b/docs/pages/reference/smart-accounts/src/classes/DuplicateTargetAddressError.mdx new file mode 100644 index 0000000000..84e5f68ba5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/DuplicateTargetAddressError.mdx @@ -0,0 +1,110 @@ +--- +title: DuplicateTargetAddressError +description: Error class for when a duplicate target address is added to a permission builder. +slug: wallets/reference/smart-accounts/classes/DuplicateTargetAddressError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:49](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L49) + +Error class for when a duplicate target address is added to a permission builder. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new DuplicateTargetAddressError(permission, targetAddress): DuplicateTargetAddressError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:58](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L58) + +Constructor for initializing an error message indicating duplicate target address in permissions. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + [`Permission`](../type-aliases/Permission) + + The permission with duplicate target address +
+ `targetAddress` + + `` `0x${string}` `` + + The duplicate target address +
+ +#### Returns + +`DuplicateTargetAddressError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: DuplicateTargetAddressError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/EntityIdOverrideError.mdx b/docs/pages/reference/smart-accounts/src/classes/EntityIdOverrideError.mdx new file mode 100644 index 0000000000..633178d0b3 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/EntityIdOverrideError.mdx @@ -0,0 +1,67 @@ +--- +title: EntityIdOverrideError +description: Error class denoting that the provided entity id is invalid because it's overriding the native entity id. +slug: wallets/reference/smart-accounts/classes/EntityIdOverrideError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/EntityIdOverrideError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/EntityIdOverrideError.ts#L6) + +Error class denoting that the provided entity id is invalid because it's overriding the native entity id. + +## Extends + +- `BaseError` + +## Constructors + +### Constructor + +```ts +new EntityIdOverrideError(): EntityIdOverrideError; +``` + +Defined in: [packages/smart-accounts/src/errors/EntityIdOverrideError.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/EntityIdOverrideError.ts#L12) + +Initializes a new instance of the error message with a default message indicating that the nonce key is invalid. + +#### Returns + +`EntityIdOverrideError` + +#### Overrides + +```ts +BaseError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"EntityIdOverrideError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/ExpiredDeadlineError.mdx b/docs/pages/reference/smart-accounts/src/classes/ExpiredDeadlineError.mdx new file mode 100644 index 0000000000..2e409c60d2 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/ExpiredDeadlineError.mdx @@ -0,0 +1,110 @@ +--- +title: ExpiredDeadlineError +description: Error class for when a deadline is expired. +slug: wallets/reference/smart-accounts/classes/ExpiredDeadlineError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:84](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L84) + +Error class for when a deadline is expired. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new ExpiredDeadlineError(deadline, currentTime): ExpiredDeadlineError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:93](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L93) + +Constructor for initializing an error message indicating the deadline has expired. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `deadline` + + `number` + + The expired deadline timestamp +
+ `currentTime` + + `number` + + The current timestamp +
+ +#### Returns + +`ExpiredDeadlineError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: ExpiredDeadlineError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/InvalidDeferredActionNonceError.mdx b/docs/pages/reference/smart-accounts/src/classes/InvalidDeferredActionNonceError.mdx new file mode 100644 index 0000000000..54477f5ecd --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/InvalidDeferredActionNonceError.mdx @@ -0,0 +1,67 @@ +--- +title: InvalidDeferredActionNonceError +description: Error class denoting that the deferred action nonce used is invalid. +slug: wallets/reference/smart-accounts/classes/InvalidDeferredActionNonceError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/InvalidDeferredActionNonceError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidDeferredActionNonceError.ts#L6) + +Error class denoting that the deferred action nonce used is invalid. + +## Extends + +- `BaseError` + +## Constructors + +### Constructor + +```ts +new InvalidDeferredActionNonceError(): InvalidDeferredActionNonceError; +``` + +Defined in: [packages/smart-accounts/src/errors/InvalidDeferredActionNonceError.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidDeferredActionNonceError.ts#L12) + +Initializes a new instance of the error message with a default message indicating that the provided deferred action nonce is invalid. + +#### Returns + +`InvalidDeferredActionNonceError` + +#### Overrides + +```ts +BaseError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"InvalidDeferredActionNonce"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/InvalidEntityIdError.mdx b/docs/pages/reference/smart-accounts/src/classes/InvalidEntityIdError.mdx new file mode 100644 index 0000000000..bc8d88c5b3 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/InvalidEntityIdError.mdx @@ -0,0 +1,96 @@ +--- +title: InvalidEntityIdError +description: Error class denoting that the provided entity id is invalid because it's too large. +slug: wallets/reference/smart-accounts/classes/InvalidEntityIdError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/InvalidEntityIdError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidEntityIdError.ts#L6) + +Error class denoting that the provided entity id is invalid because it's too large. + +## Extends + +- `BaseError` + +## Constructors + +### Constructor + +```ts +new InvalidEntityIdError(entityId): InvalidEntityIdError; +``` + +Defined in: [packages/smart-accounts/src/errors/InvalidEntityIdError.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidEntityIdError.ts#L14) + +Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `entityId` + + `number` + + the invalid entityId used +
+ +#### Returns + +`InvalidEntityIdError` + +#### Overrides + +```ts +BaseError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"InvalidEntityIdError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/InvalidNonceKeyError.mdx b/docs/pages/reference/smart-accounts/src/classes/InvalidNonceKeyError.mdx new file mode 100644 index 0000000000..788cffcc01 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/InvalidNonceKeyError.mdx @@ -0,0 +1,96 @@ +--- +title: InvalidNonceKeyError +description: Error class denoting that the nonce key is invalid because its too large. +slug: wallets/reference/smart-accounts/classes/InvalidNonceKeyError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/InvalidNonceKeyError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidNonceKeyError.ts#L6) + +Error class denoting that the nonce key is invalid because its too large. + +## Extends + +- `BaseError` + +## Constructors + +### Constructor + +```ts +new InvalidNonceKeyError(nonceKey): InvalidNonceKeyError; +``` + +Defined in: [packages/smart-accounts/src/errors/InvalidNonceKeyError.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidNonceKeyError.ts#L14) + +Initializes a new instance of the error message with a default message indicating that the nonce key is invalid. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `nonceKey` + + `bigint` + + the invalid nonceKey used +
+ +#### Returns + +`InvalidNonceKeyError` + +#### Overrides + +```ts +BaseError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"InvalidNonceKeyError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/InvalidOwnerError.mdx b/docs/pages/reference/smart-accounts/src/classes/InvalidOwnerError.mdx new file mode 100644 index 0000000000..07bae6291f --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/InvalidOwnerError.mdx @@ -0,0 +1,96 @@ +--- +title: InvalidOwnerError +description: Error class denoting that the owner for an account is invalid +slug: wallets/reference/smart-accounts/classes/InvalidOwnerError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/InvalidOwnerError.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidOwnerError.ts#L6) + +Error class denoting that the owner for an account is invalid + +## Extends + +- `BaseError` + +## Constructors + +### Constructor + +```ts +new InvalidOwnerError(reason): InvalidOwnerError; +``` + +Defined in: [packages/smart-accounts/src/errors/InvalidOwnerError.ts:14](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/InvalidOwnerError.ts#L14) + +Initializes a new instance of the error message with a default message indicating that the owner is invalid + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `reason` + + `string` + + the reason the owner is invalid +
+ +#### Returns + +`InvalidOwnerError` + +#### Overrides + +```ts +BaseError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"InvalidOwnerError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/MultipleGasLimitError.mdx b/docs/pages/reference/smart-accounts/src/classes/MultipleGasLimitError.mdx new file mode 100644 index 0000000000..9e995927fa --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/MultipleGasLimitError.mdx @@ -0,0 +1,96 @@ +--- +title: MultipleGasLimitError +description: Error class for when a multiple gas limit permission is added to a permission builder. +slug: wallets/reference/smart-accounts/classes/MultipleGasLimitError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:171](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L171) + +Error class for when a multiple gas limit permission is added to a permission builder. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new MultipleGasLimitError(permission): MultipleGasLimitError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:179](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L179) + +Constructor for initializing an error message indicating multiple gas limit permissions. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + [`Permission`](../type-aliases/Permission) + + The duplicate gas limit permission +
+ +#### Returns + +`MultipleGasLimitError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: MultipleGasLimitError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/MultipleNativeTokenTransferError.mdx b/docs/pages/reference/smart-accounts/src/classes/MultipleNativeTokenTransferError.mdx new file mode 100644 index 0000000000..e66d836ce3 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/MultipleNativeTokenTransferError.mdx @@ -0,0 +1,96 @@ +--- +title: MultipleNativeTokenTransferError +description: Error class for when a multiple native token transfer permission is added to a permission builder. +slug: wallets/reference/smart-accounts/classes/MultipleNativeTokenTransferError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:137](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L137) + +Error class for when a multiple native token transfer permission is added to a permission builder. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new MultipleNativeTokenTransferError(permission): MultipleNativeTokenTransferError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:145](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L145) + +Constructor for initializing an error message indicating multiple native token transfer permissions. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + [`Permission`](../type-aliases/Permission) + + The duplicate native token transfer permission +
+ +#### Returns + +`MultipleNativeTokenTransferError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: MultipleNativeTokenTransferError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/NoFunctionsProvidedError.mdx b/docs/pages/reference/smart-accounts/src/classes/NoFunctionsProvidedError.mdx new file mode 100644 index 0000000000..1b34738e80 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/NoFunctionsProvidedError.mdx @@ -0,0 +1,96 @@ +--- +title: NoFunctionsProvidedError +description: Error class for when no functions are provided to a permission builder. +slug: wallets/reference/smart-accounts/classes/NoFunctionsProvidedError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L68) + +Error class for when no functions are provided to a permission builder. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new NoFunctionsProvidedError(permission): NoFunctionsProvidedError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:76](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L76) + +Constructor for initializing an error message indicating no functions were provided. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + [`Permission`](../type-aliases/Permission) + + The permission missing functions +
+ +#### Returns + +`NoFunctionsProvidedError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: NoFunctionsProvidedError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/PermissionBuilder.mdx b/docs/pages/reference/smart-accounts/src/classes/PermissionBuilder.mdx new file mode 100644 index 0000000000..af73523d4f --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/PermissionBuilder.mdx @@ -0,0 +1,398 @@ +--- +title: PermissionBuilder +description: A builder for constructing a Permission object. +slug: wallets/reference/smart-accounts/classes/PermissionBuilder +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:223](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L223) + +A builder for constructing a Permission object. + +## Constructors + +### Constructor + +```ts +new PermissionBuilder(params): PermissionBuilder; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:245](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L245) + +Creates a PermissionBuilder instance. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + \{ `client`: `Client`\<`Transport`, `Chain`, `SmartAccount`>; `deadline?`: `number`; `entityId`: `number`; `hooks?`: `Hook`\[]; `key`: `Key`; `nonce`: `bigint`; `selectors?`: `` `0x${string}` ``\[]; } + + The parameters for creating a PermissionBuilder instance. +
+ `params.client` + + `Client`\<`Transport`, `Chain`, `SmartAccount`> + + ‐ +
+ `params.deadline?` + + `number` + + ‐ +
+ `params.entityId` + + `number` + + ‐ +
+ `params.hooks?` + + `Hook`\[] + + ‐ +
+ `params.key` + + `Key` + + ‐ +
+ `params.nonce` + + `bigint` + + ‐ +
+ `params.selectors?` + + `` `0x${string}` ``\[] + + ‐ +
+ +#### Returns + +`PermissionBuilder` + +## Methods + +### addPermission() + +```ts +addPermission(permission): this; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:302](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L302) + +Adds a permission to the permission builder. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + \{ `permission`: [`Permission`](../type-aliases/Permission); } + + The permission to add. +
+ `permission.permission` + + [`Permission`](../type-aliases/Permission) + + ‐ +
+ +#### Returns + +`this` + +The permission builder instance. + +--- + +### addPermissions() + +```ts +addPermissions(permissions): this; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:375](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L375) + +Adds multiple permissions to the permission builder. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permissions` + + \{ `permissions`: [`Permission`](../type-aliases/Permission)\[]; } + + The permissions to add. +
+ `permissions.permissions` + + [`Permission`](../type-aliases/Permission)\[] + + ‐ +
+ +#### Returns + +`this` + +The permission builder instance. + +--- + +### addSelector() + +```ts +addSelector(selector): this; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:291](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L291) + +Adds a selector to the permission builder. + +#### Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `selector` + + \{ `selector`: `` `0x${string}` ``; } + + The selector to add. +
+ `selector.selector` + + `` `0x${string}` `` + + ‐ +
+ +#### Returns + +`this` + +The permission builder instance. + +--- + +### compileDeferred() + +```ts +compileDeferred(): Promise<{ + fullPreSignatureDeferredActionDigest: `0x${string}`; + typedData: MessageDefinition; +}>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:389](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L389) + +Compiles the deferred action typed data to sign. + +#### Returns + +`Promise`\<\{ +`fullPreSignatureDeferredActionDigest`: `` `0x${string}` ``; +`typedData`: `MessageDefinition`; +}> + +The deferred action typed data and the full pre-signature deferred action digest. + +--- + +### compileInstallArgs() + +```ts +compileInstallArgs(): Promise; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:476](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L476) + +Compiles the install arguments for the installValidation function. + +#### Returns + +`Promise`\<[`InstallValidationParams`](../type-aliases/InstallValidationParams)> + +The install arguments. + +--- + +### compileRaw() + +```ts +compileRaw(): Promise<`0x${string}`>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:446](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L446) + +Compiles the raw install arguments for the installValidation function. + +#### Returns + +`Promise`\<`` `0x${string}` ``> + +The raw install arguments. diff --git a/docs/pages/reference/smart-accounts/src/classes/PermissionBuilderError.mdx b/docs/pages/reference/smart-accounts/src/classes/PermissionBuilderError.mdx new file mode 100644 index 0000000000..0afcf0991a --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/PermissionBuilderError.mdx @@ -0,0 +1,31 @@ +--- +title: PermissionBuilderError +description: Abstract class representing a Permission Builder Error, subclassed by all permission builder errors. +slug: wallets/reference/smart-accounts/classes/PermissionBuilderError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L8) + +Abstract class representing a Permission Builder Error, subclassed by all permission builder errors. + +## Extends + +- `BaseError` + +## Extended by + +- [`RootPermissionOnlyError`](RootPermissionOnlyError) +- [`AccountAddressAsTargetError`](AccountAddressAsTargetError) +- [`DuplicateTargetAddressError`](DuplicateTargetAddressError) +- [`NoFunctionsProvidedError`](NoFunctionsProvidedError) +- [`ExpiredDeadlineError`](ExpiredDeadlineError) +- [`DeadlineOverLimitError`](DeadlineOverLimitError) +- [`ValidationConfigUnsetError`](ValidationConfigUnsetError) +- [`MultipleNativeTokenTransferError`](MultipleNativeTokenTransferError) +- [`ZeroAddressError`](ZeroAddressError) +- [`MultipleGasLimitError`](MultipleGasLimitError) +- [`UnsupportedPermissionTypeError`](UnsupportedPermissionTypeError) +- [`SelectorNotAllowed`](SelectorNotAllowed) diff --git a/docs/pages/reference/smart-accounts/src/classes/RootPermissionOnlyError.mdx b/docs/pages/reference/smart-accounts/src/classes/RootPermissionOnlyError.mdx new file mode 100644 index 0000000000..07d89f985e --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/RootPermissionOnlyError.mdx @@ -0,0 +1,96 @@ +--- +title: RootPermissionOnlyError +description: Error class for when a root permission is added to a permission builder. +slug: wallets/reference/smart-accounts/classes/RootPermissionOnlyError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L13) + +Error class for when a root permission is added to a permission builder. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new RootPermissionOnlyError(permission): RootPermissionOnlyError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L21) + +Constructor for initializing an error message indicating that the root permission cannot be combined with other permissions. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + [`Permission`](../type-aliases/Permission) + + The permission trying to be added atop the root permission +
+ +#### Returns + +`RootPermissionOnlyError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: RootPermissionOnlyError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/SelectorNotAllowed.mdx b/docs/pages/reference/smart-accounts/src/classes/SelectorNotAllowed.mdx new file mode 100644 index 0000000000..e31f9cb932 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/SelectorNotAllowed.mdx @@ -0,0 +1,96 @@ +--- +title: SelectorNotAllowed +description: Error class for when a selector is not allowed. +slug: wallets/reference/smart-accounts/classes/SelectorNotAllowed +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:201](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L201) + +Error class for when a selector is not allowed. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new SelectorNotAllowed(functionName): SelectorNotAllowed; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:209](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L209) + +Constructor for initializing an error message indicating that the selector being added is not allowed. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `functionName` + + `string` + + The function name of the selector that is being added. +
+ +#### Returns + +`SelectorNotAllowed` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"SelectorNotAllowed"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/UnsupportedPermissionTypeError.mdx b/docs/pages/reference/smart-accounts/src/classes/UnsupportedPermissionTypeError.mdx new file mode 100644 index 0000000000..f8b413e71a --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/UnsupportedPermissionTypeError.mdx @@ -0,0 +1,67 @@ +--- +title: UnsupportedPermissionTypeError +description: Error class for when an unsupported permission type is added to a permission builder. +slug: wallets/reference/smart-accounts/classes/UnsupportedPermissionTypeError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:187](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L187) + +Error class for when an unsupported permission type is added to a permission builder. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new UnsupportedPermissionTypeError(): UnsupportedPermissionTypeError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:193](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L193) + +Constructor for initializing an error message indicating an unsupported permission type. + +#### Returns + +`UnsupportedPermissionTypeError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: UnsupportedPermissionTypeError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/ValidationConfigUnsetError.mdx b/docs/pages/reference/smart-accounts/src/classes/ValidationConfigUnsetError.mdx new file mode 100644 index 0000000000..30f411b987 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/ValidationConfigUnsetError.mdx @@ -0,0 +1,67 @@ +--- +title: ValidationConfigUnsetError +description: Error class for when a validation config is unset. +slug: wallets/reference/smart-accounts/classes/ValidationConfigUnsetError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:121](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L121) + +Error class for when a validation config is unset. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new ValidationConfigUnsetError(): ValidationConfigUnsetError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:127](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L127) + +Constructor for initializing an error message indicating the validation config is unset. + +#### Returns + +`ValidationConfigUnsetError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: ValidationConfigUnsetError"` +
diff --git a/docs/pages/reference/smart-accounts/src/classes/ZeroAddressError.mdx b/docs/pages/reference/smart-accounts/src/classes/ZeroAddressError.mdx new file mode 100644 index 0000000000..8f255762ab --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/classes/ZeroAddressError.mdx @@ -0,0 +1,96 @@ +--- +title: ZeroAddressError +description: Error class for when a zero address is provided to a permission builder. +slug: wallets/reference/smart-accounts/classes/ZeroAddressError +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:155](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L155) + +Error class for when a zero address is provided to a permission builder. + +## Extends + +- [`PermissionBuilderError`](PermissionBuilderError) + +## Constructors + +### Constructor + +```ts +new ZeroAddressError(permission): ZeroAddressError; +``` + +Defined in: [packages/smart-accounts/src/errors/permissionBuilderErrors.ts:163](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/errors/permissionBuilderErrors.ts#L163) + +Constructor for initializing an error message indicating zero address was provided. + +#### Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `permission` + + [`Permission`](../type-aliases/Permission) + + The permission with zero address +
+ +#### Returns + +`ZeroAddressError` + +#### Overrides + +```ts +PermissionBuilderError.constructor; +``` + +## Properties + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDefault value
+ `name` + + `string` + + `"PermissionBuilder: ZeroAddressError"` +
diff --git a/docs/pages/reference/smart-accounts/src/functions/buildDeferredActionDigest.mdx b/docs/pages/reference/smart-accounts/src/functions/buildDeferredActionDigest.mdx new file mode 100644 index 0000000000..7e22361fa2 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/buildDeferredActionDigest.mdx @@ -0,0 +1,53 @@ +--- +title: buildDeferredActionDigest +description: Overview of the buildDeferredActionDigest function +slug: wallets/reference/smart-accounts/functions/buildDeferredActionDigest +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function buildDeferredActionDigest(params): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/deferredActions.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/deferredActions.ts#L51) + +Creates the digest which must be prepended to the userOp signature. + +Assumption: The client this extends is used to sign the typed data. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`BuildDeferredActionDigestParams`](../type-aliases/BuildDeferredActionDigestParams) + + The parameters for building the deferred action digest. +
+ +## Returns + +`` `0x${string}` `` + +The encoded digest to be prepended to the userOp signature. diff --git a/docs/pages/reference/smart-accounts/src/functions/buildFullNonceKey.mdx b/docs/pages/reference/smart-accounts/src/functions/buildFullNonceKey.mdx new file mode 100644 index 0000000000..6a7cdd72ee --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/buildFullNonceKey.mdx @@ -0,0 +1,51 @@ +--- +title: buildFullNonceKey +description: Overview of the buildFullNonceKey function +slug: wallets/reference/smart-accounts/functions/buildFullNonceKey +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function buildFullNonceKey(params): bigint; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L86) + +Builds a full nonce key. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`BuildNonceParams`](../type-aliases/BuildNonceParams) + + The parameters for building a full nonce key. +
+ +## Returns + +`bigint` + +The full nonce key. diff --git a/docs/pages/reference/smart-accounts/src/functions/chainHas7212.mdx b/docs/pages/reference/smart-accounts/src/functions/chainHas7212.mdx new file mode 100644 index 0000000000..67bda781d7 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/chainHas7212.mdx @@ -0,0 +1,53 @@ +--- +title: chainHas7212 +description: Overview of the chainHas7212 function +slug: wallets/reference/smart-accounts/functions/chainHas7212 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function chainHas7212(client): Promise; +``` + +Defined in: [packages/smart-accounts/src/utils.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/utils.ts#L36) + +Checks if the current chain supports RIP-7212 (precompiled contract for secp256r1 curve operations). +This is used to determine if the chain has native support for P256 signature verification, +which is commonly used in WebAuthn/passkey implementations. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `Client` + + The viem client to use for the check +
+ +## Returns + +`Promise`\<`boolean`> + +True if the chain supports RIP-7212, false otherwise diff --git a/docs/pages/reference/smart-accounts/src/functions/defaultLightAccountVersion.mdx b/docs/pages/reference/smart-accounts/src/functions/defaultLightAccountVersion.mdx new file mode 100644 index 0000000000..b484ebef0f --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/defaultLightAccountVersion.mdx @@ -0,0 +1,46 @@ +--- +title: defaultLightAccountVersion +description: Overview of the defaultLightAccountVersion function +slug: wallets/reference/smart-accounts/functions/defaultLightAccountVersion +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function defaultLightAccountVersion< + TLightAccountType, +>(): keyof object[TLightAccountType]; +``` + +Defined in: [packages/smart-accounts/src/light-account/utils.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/utils.ts#L21) + +Get the default light account version for the given light account type + +## Type Parameters + + + + + + + + + + + + + + + + +
Type ParameterDescription
+ `TLightAccountType` *extends* [`LightAccountType`](../type-aliases/LightAccountType) + +
+ +## Returns + +keyof `object`\[`TLightAccountType`] + +the default version for the given light account type diff --git a/docs/pages/reference/smart-accounts/src/functions/deferralActions.mdx b/docs/pages/reference/smart-accounts/src/functions/deferralActions.mdx new file mode 100644 index 0000000000..e892b1a547 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/deferralActions.mdx @@ -0,0 +1,95 @@ +--- +title: deferralActions +description: Overview of the deferralActions function +slug: wallets/reference/smart-accounts/functions/deferralActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function deferralActions(client): DeferralActions; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:77](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L77) + +Provides deferred action functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`. + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ `TChain` *extends* `Chain` + + `Chain` +
+ `TAccount` *extends* `SmartAccount` + + `SmartAccount` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `Client`\<`TTransport`, `TChain`, `TAccount`> + + The client instance which provides account and sendUserOperation functionality. +
+ +## Returns + +[`DeferralActions`](../type-aliases/DeferralActions) + +- An object containing three methods: `createDeferredActionTypedDataObject`, `buildDeferredActionDigest`, and `buildUserOperationWithDeferredAction`. diff --git a/docs/pages/reference/smart-accounts/src/functions/getLightAccountAddressFromFactoryData.mdx b/docs/pages/reference/smart-accounts/src/functions/getLightAccountAddressFromFactoryData.mdx new file mode 100644 index 0000000000..1749c4a5bc --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/getLightAccountAddressFromFactoryData.mdx @@ -0,0 +1,53 @@ +--- +title: getLightAccountAddressFromFactoryData +description: Overview of the getLightAccountAddressFromFactoryData function +slug: wallets/reference/smart-accounts/functions/getLightAccountAddressFromFactoryData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getLightAccountAddressFromFactoryData(params): Promise<`0x${string}`>; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:207](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L207) + +Gets the light account address from factory data. +If the factory is a known default, decodes the args and predicts without RPC. +Otherwise falls back to calling the entry point's getSenderAddress. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`GetLightAccountAddressFromFactoryDataParams`](../type-aliases/GetLightAccountAddressFromFactoryDataParams) + + The parameters +
+ +## Returns + +`Promise`\<`` `0x${string}` ``> + +The account address diff --git a/docs/pages/reference/smart-accounts/src/functions/getLightAccountImplAddress.mdx b/docs/pages/reference/smart-accounts/src/functions/getLightAccountImplAddress.mdx new file mode 100644 index 0000000000..01d9061cdd --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/getLightAccountImplAddress.mdx @@ -0,0 +1,69 @@ +--- +title: getLightAccountImplAddress +description: Overview of the getLightAccountImplAddress function +slug: wallets/reference/smart-accounts/functions/getLightAccountImplAddress +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getLightAccountImplAddress(account): Promise<`0x${string}`>; +``` + +Defined in: [packages/smart-accounts/src/light-account/utils.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/utils.ts#L55) + +Get the light account implementation address for the given light account + +## Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `TAccount` *extends* `LightAccountBase` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `account` + + `TAccount` + + the light account to get the implementation address for +
+ +## Returns + +`Promise`\<`` `0x${string}` ``> + +the light account implementation address for the given light account diff --git a/docs/pages/reference/smart-accounts/src/functions/getMAV2UpgradeToData.mdx b/docs/pages/reference/smart-accounts/src/functions/getMAV2UpgradeToData.mdx new file mode 100644 index 0000000000..07e1a6da10 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/getMAV2UpgradeToData.mdx @@ -0,0 +1,51 @@ +--- +title: getMAV2UpgradeToData +description: Overview of the getMAV2UpgradeToData function +slug: wallets/reference/smart-accounts/functions/getMAV2UpgradeToData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getMAV2UpgradeToData(ownerAddress): Promise; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L55) + +Gets the upgrade to data for the ModularAccountV2. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `ownerAddress` + + `` `0x${string}` `` + + The address of the owner. +
+ +## Returns + +`Promise`\<[`UpgradeToData`](../type-aliases/UpgradeToData)> + +The upgrade to data. diff --git a/docs/pages/reference/smart-accounts/src/functions/getModularAccountV2AddressFromFactoryData.mdx b/docs/pages/reference/smart-accounts/src/functions/getModularAccountV2AddressFromFactoryData.mdx new file mode 100644 index 0000000000..617bbe5164 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/getModularAccountV2AddressFromFactoryData.mdx @@ -0,0 +1,55 @@ +--- +title: getModularAccountV2AddressFromFactoryData +description: Overview of the getModularAccountV2AddressFromFactoryData function +slug: wallets/reference/smart-accounts/functions/getModularAccountV2AddressFromFactoryData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getModularAccountV2AddressFromFactoryData( + params, +): Promise<`0x${string}`>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/predictAddress.ts:151](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/predictAddress.ts#L151) + +Gets the modular account v2 address from factory data. +If the factory is a known default (SMA), decodes the args and predicts without RPC. +Otherwise falls back to calling the entry point's getSenderAddress. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`GetModularAccountV2AddressFromFactoryDataParams`](../type-aliases/GetModularAccountV2AddressFromFactoryDataParams) + + The parameters +
+ +## Returns + +`Promise`\<`` `0x${string}` ``> + +The account address diff --git a/docs/pages/reference/smart-accounts/src/functions/getMultiOwnerLightAccountAddressFromFactoryData.mdx b/docs/pages/reference/smart-accounts/src/functions/getMultiOwnerLightAccountAddressFromFactoryData.mdx new file mode 100644 index 0000000000..dffc4789e1 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/getMultiOwnerLightAccountAddressFromFactoryData.mdx @@ -0,0 +1,55 @@ +--- +title: getMultiOwnerLightAccountAddressFromFactoryData +description: Overview of the getMultiOwnerLightAccountAddressFromFactoryData function +slug: wallets/reference/smart-accounts/functions/getMultiOwnerLightAccountAddressFromFactoryData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getMultiOwnerLightAccountAddressFromFactoryData( + params, +): Promise<`0x${string}`>; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:264](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L264) + +Gets the multi-owner light account address from factory data. +If the factory is a known default, decodes the args and predicts without RPC. +Otherwise falls back to calling the entry point's getSenderAddress. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`GetMultiOwnerLightAccountAddressFromFactoryDataParams`](../type-aliases/GetMultiOwnerLightAccountAddressFromFactoryDataParams) + + The parameters +
+ +## Returns + +`Promise`\<`` `0x${string}` ``> + +The account address diff --git a/docs/pages/reference/smart-accounts/src/functions/getMultiOwnerModularAccountV1AddressFromFactoryData.mdx b/docs/pages/reference/smart-accounts/src/functions/getMultiOwnerModularAccountV1AddressFromFactoryData.mdx new file mode 100644 index 0000000000..c1a5055d79 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/getMultiOwnerModularAccountV1AddressFromFactoryData.mdx @@ -0,0 +1,55 @@ +--- +title: getMultiOwnerModularAccountV1AddressFromFactoryData +description: Overview of the getMultiOwnerModularAccountV1AddressFromFactoryData function +slug: wallets/reference/smart-accounts/functions/getMultiOwnerModularAccountV1AddressFromFactoryData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getMultiOwnerModularAccountV1AddressFromFactoryData( + params, +): Promise<`0x${string}`>; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/predictAddress.ts:111](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/predictAddress.ts#L111) + +Gets the multi-owner modular account v1 address from factory data. +If the factory is a known default, decodes the args and predicts without RPC. +Otherwise falls back to calling the entry point's getSenderAddress. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`GetMultiOwnerModularAccountV1AddressFromFactoryDataParams`](../type-aliases/GetMultiOwnerModularAccountV1AddressFromFactoryDataParams) + + The parameters +
+ +## Returns + +`Promise`\<`` `0x${string}` ``> + +The account address diff --git a/docs/pages/reference/smart-accounts/src/functions/installValidationActions.mdx b/docs/pages/reference/smart-accounts/src/functions/installValidationActions.mdx new file mode 100644 index 0000000000..8cc478fdbf --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/installValidationActions.mdx @@ -0,0 +1,138 @@ +--- +title: installValidationActions +description: Overview of the installValidationActions function +slug: wallets/reference/smart-accounts/functions/installValidationActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function installValidationActions( + client, +): InstallValidationActions< + IsUndefined extends true ? undefined : ModularAccountV2 +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/installValidation.ts:111](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/installValidation.ts#L111) + +Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`. + +## Example + +```ts +import { createModularAccountV2Client, installValidationActions, getDefaultSingleSignerValidationModuleAddress, SingleSignerValidationModule } from "@alchemy/smart-accounts"; +import { Address } from "viem"; + +const client = (await createModularAccountV2Client({ ... })).extend(installValidationActions); +const sessionKeyAddress: Address = "0x1234"; +const sessionKeyEntityId: number = 1; + +await client.installValidation({ + validationConfig: { + moduleAddress: getDefaultSingleSignerValidationModuleAddress( + client.chain + ), + entityId: sessionKeyEntityId, + isGlobal: true, + isSignatureValidation: false, + isUserOpValidation: true, + }, + selectors: [], + installData: SingleSignerValidationModule.encodeOnInstallData({ + entityId: sessionKeyEntityId, + signer: sessionKeyAddress, + }), + hooks: [], +}); + +await client.uninstallValidation({ + moduleAddress: sessionKeyAddress, + entityId: sessionKeyEntityId, + uninstallData: SingleSignerValidationModule.encodeOnUninstallData({ + entityId: sessionKeyEntityId, + }), + hookUninstallDatas: [], +}); + +``` + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ `TChain` *extends* `Chain` | `undefined` + + `Chain` | `undefined` +
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `Client`\<`TTransport`, `TChain`, `TAccount`> + + The client instance which provides account and sendUserOperation functionality. +
+ +## Returns + +[`InstallValidationActions`](../type-aliases/InstallValidationActions)\<`IsUndefined`\<`TAccount`> _extends_ `true` ? `undefined` : [`ModularAccountV2`](../type-aliases/ModularAccountV2)> + +- An object containing two methods, `installValidation` and `uninstallValidation`. diff --git a/docs/pages/reference/smart-accounts/src/functions/isLightAccountVersion1.mdx b/docs/pages/reference/smart-accounts/src/functions/isLightAccountVersion1.mdx new file mode 100644 index 0000000000..a4c1c74515 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/isLightAccountVersion1.mdx @@ -0,0 +1,53 @@ +--- +title: isLightAccountVersion1 +description: Overview of the isLightAccountVersion1 function +slug: wallets/reference/smart-accounts/functions/isLightAccountVersion1 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isLightAccountVersion1( + version, +): version is "v1.0.1" | "v1.0.2" | "v1.1.0"; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L65) + +Type guard to check if a version is a Light Account v1 version + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `version` + + `"v1.0.1"` | `"v1.0.2"` | `"v1.1.0"` | `"v2.0.0"` | `"v2.1.0"` | `"v2.2.0"` + + The version to check. +
+ +## Returns + +version is "v1.0.1" | "v1.0.2" | "v1.1.0" + +True if the version is a v1 version. diff --git a/docs/pages/reference/smart-accounts/src/functions/isLightAccountVersion2.mdx b/docs/pages/reference/smart-accounts/src/functions/isLightAccountVersion2.mdx new file mode 100644 index 0000000000..26cb2254f9 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/isLightAccountVersion2.mdx @@ -0,0 +1,53 @@ +--- +title: isLightAccountVersion2 +description: Overview of the isLightAccountVersion2 function +slug: wallets/reference/smart-accounts/functions/isLightAccountVersion2 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isLightAccountVersion2( + version, +): version is "v2.0.0" | "v2.1.0" | "v2.2.0"; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:76](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L76) + +Type guard to check if a version is a Light Account v2 version + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `version` + + `"v1.0.1"` | `"v1.0.2"` | `"v1.1.0"` | `"v2.0.0"` | `"v2.1.0"` | `"v2.2.0"` + + The version to check. +
+ +## Returns + +version is "v2.0.0" | "v2.1.0" | "v2.2.0" + +True if the version is a v2 version. diff --git a/docs/pages/reference/smart-accounts/src/functions/isModularAccountV2.mdx b/docs/pages/reference/smart-accounts/src/functions/isModularAccountV2.mdx new file mode 100644 index 0000000000..4966481cc9 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/isModularAccountV2.mdx @@ -0,0 +1,51 @@ +--- +title: isModularAccountV2 +description: Overview of the isModularAccountV2 function +slug: wallets/reference/smart-accounts/functions/isModularAccountV2 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function isModularAccountV2(account): account is ModularAccountV2Base; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:130](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L130) + +Checks if an account is a ModularAccountV2. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `account` + + `SmartAccount` + + The account to check. +
+ +## Returns + +`account is ModularAccountV2Base` + +True if the account is a ModularAccountV2, false otherwise. diff --git a/docs/pages/reference/smart-accounts/src/functions/multiOwnerLightAccountActions.mdx b/docs/pages/reference/smart-accounts/src/functions/multiOwnerLightAccountActions.mdx new file mode 100644 index 0000000000..3c82492869 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/multiOwnerLightAccountActions.mdx @@ -0,0 +1,99 @@ +--- +title: multiOwnerLightAccountActions +description: Overview of the multiOwnerLightAccountActions function +slug: wallets/reference/smart-accounts/functions/multiOwnerLightAccountActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function multiOwnerLightAccountActions( + client, +): MultiOwnerLightAccountActions< + IsUndefined extends true ? undefined : MultiOwnerLightAccount +>; +``` + +Defined in: [packages/smart-accounts/src/light-account/decorators/multiOwner.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/decorators/multiOwner.ts#L36) + +Generates client actions for a multi-owner light account, including the ability to update owners. + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ `TChain` *extends* `Chain` | `undefined` + + `Chain` | `undefined` +
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `Client`\<`TTransport`, `TChain`, `TAccount`> + + The client instance used to interact with the account +
+ +## Returns + +[`MultiOwnerLightAccountActions`](../type-aliases/MultiOwnerLightAccountActions)\<`IsUndefined`\<`TAccount`> _extends_ `true` ? `undefined` : [`MultiOwnerLightAccount`](../type-aliases/MultiOwnerLightAccount)> + +An object containing the client actions specifically for a multi-owner light account diff --git a/docs/pages/reference/smart-accounts/src/functions/multiOwnerModularAccountV1Actions.mdx b/docs/pages/reference/smart-accounts/src/functions/multiOwnerModularAccountV1Actions.mdx new file mode 100644 index 0000000000..1213708fce --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/multiOwnerModularAccountV1Actions.mdx @@ -0,0 +1,99 @@ +--- +title: multiOwnerModularAccountV1Actions +description: Overview of the multiOwnerModularAccountV1Actions function +slug: wallets/reference/smart-accounts/functions/multiOwnerModularAccountV1Actions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function multiOwnerModularAccountV1Actions( + client, +): MultiOwnerModularAccountV1Actions< + IsUndefined extends true ? undefined : MultiOwnerModularAccountV1 +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/decorators/multiOwner.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/decorators/multiOwner.ts#L36) + +Generates client actions for a multi-owner MAv1 account, including the ability to update owners. + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ `TChain` *extends* `Chain` | `undefined` + + `Chain` | `undefined` +
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `Client`\<`TTransport`, `TChain`, `TAccount`> + + The client instance used to interact with the account +
+ +## Returns + +[`MultiOwnerModularAccountV1Actions`](../type-aliases/MultiOwnerModularAccountV1Actions)\<`IsUndefined`\<`TAccount`> _extends_ `true` ? `undefined` : [`MultiOwnerModularAccountV1`](../type-aliases/MultiOwnerModularAccountV1)> + +An object containing the client actions specifically for a multi-owner modular account diff --git a/docs/pages/reference/smart-accounts/src/functions/pack1271Signature.mdx b/docs/pages/reference/smart-accounts/src/functions/pack1271Signature.mdx new file mode 100644 index 0000000000..902167a585 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/pack1271Signature.mdx @@ -0,0 +1,51 @@ +--- +title: pack1271Signature +description: Overview of the pack1271Signature function +slug: wallets/reference/smart-accounts/functions/pack1271Signature +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function pack1271Signature(params): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/signature.ts:35](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/signature.ts#L35) + +Signature packing utility for 1271 signatures. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`Pack1271SignatureParams`](../type-aliases/Pack1271SignatureParams) + + The parameters for packing a 1271 signature. +
+ +## Returns + +`` `0x${string}` `` + +The packed 1271 signature. diff --git a/docs/pages/reference/smart-accounts/src/functions/packUOSignature.mdx b/docs/pages/reference/smart-accounts/src/functions/packUOSignature.mdx new file mode 100644 index 0000000000..a095459956 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/packUOSignature.mdx @@ -0,0 +1,51 @@ +--- +title: packUOSignature +description: Overview of the packUOSignature function +slug: wallets/reference/smart-accounts/functions/packUOSignature +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function packUOSignature(params): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/signature.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/signature.ts#L15) + +Signature packing utility for user operations. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`PackUOSignatureParams`](../type-aliases/PackUOSignatureParams) + + The parameters for packing a user operation signature. +
+ +## Returns + +`` `0x${string}` `` + +The packed user operation signature. diff --git a/docs/pages/reference/smart-accounts/src/functions/parseDeferredAction.mdx b/docs/pages/reference/smart-accounts/src/functions/parseDeferredAction.mdx new file mode 100644 index 0000000000..fd49acd5de --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/parseDeferredAction.mdx @@ -0,0 +1,113 @@ +--- +title: parseDeferredAction +description: Overview of the parseDeferredAction function +slug: wallets/reference/smart-accounts/functions/parseDeferredAction +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function parseDeferredAction(deferredAction): object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/deferredActions.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/deferredActions.ts#L17) + +Parses out the 3 components from a deferred action. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `deferredAction` + + `` `0x${string}` `` + + The deferred action to parse. +
+ +## Returns + +`object` + +The parsed deferred action. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `deferredActionData` + + `` `0x${string}` `` +
+ `entityId` + + `number` +
+ `hasAssociatedExecHooks` + + `boolean` +
+ `isGlobalValidation` + + `boolean` +
+ `nonce` + + `bigint` +
diff --git a/docs/pages/reference/smart-accounts/src/functions/predictLightAccountAddress.mdx b/docs/pages/reference/smart-accounts/src/functions/predictLightAccountAddress.mdx new file mode 100644 index 0000000000..8a650e8802 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/predictLightAccountAddress.mdx @@ -0,0 +1,51 @@ +--- +title: predictLightAccountAddress +description: Overview of the predictLightAccountAddress function +slug: wallets/reference/smart-accounts/functions/predictLightAccountAddress +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function predictLightAccountAddress(params): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:41](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L41) + +Predicts the address of a light account based on provided parameters such as factory address, salt, owner address, and version. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`PredictLightAccountAddressParams`](../type-aliases/PredictLightAccountAddressParams) + + The parameters required to predict the light account address, including factory address, salt, owner address, and version +
+ +## Returns + +`` `0x${string}` `` + +The predicted address of the light account calculated based on the provided parameters diff --git a/docs/pages/reference/smart-accounts/src/functions/predictModularAccountV2Address.mdx b/docs/pages/reference/smart-accounts/src/functions/predictModularAccountV2Address.mdx new file mode 100644 index 0000000000..e0a775c688 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/predictModularAccountV2Address.mdx @@ -0,0 +1,65 @@ +--- +title: predictModularAccountV2Address +description: Overview of the predictModularAccountV2Address function +slug: wallets/reference/smart-accounts/functions/predictModularAccountV2Address +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function predictModularAccountV2Address(params): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/predictAddress.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/predictAddress.ts#L56) + +Predicts the address of a modular account V2 based on the provided parameters, which include factory address, salt, and implementation address. This function supports different types of accounts including "SMA" and "MA". + +## Example + +```ts +import { predictModularAccountV2Address } from "@alchemy/smart-accounts"; + +const accountAddress = predictModularAccountV2Address({ + factoryAddress: "0xFactoryAddress" as Address, + implementationAddress: "0xImplementation" as Address, + salt: 0n, + type: "SMA", + ownerAddress: "0xOwner" as Address, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`PredictModularAccountV2AddressParams`](../type-aliases/PredictModularAccountV2AddressParams) + + The parameters for predicting the modular account address, including `factoryAddress`, `salt`, `implementationAddress`, and additional properties based on the account type. +
+ +## Returns + +`` `0x${string}` `` + +The predicted address for the modular account V2. diff --git a/docs/pages/reference/smart-accounts/src/functions/predictMultiOwnerLightAccountAddress.mdx b/docs/pages/reference/smart-accounts/src/functions/predictMultiOwnerLightAccountAddress.mdx new file mode 100644 index 0000000000..911314a4fa --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/predictMultiOwnerLightAccountAddress.mdx @@ -0,0 +1,59 @@ +--- +title: predictMultiOwnerLightAccountAddress +description: Overview of the predictMultiOwnerLightAccountAddress function +slug: wallets/reference/smart-accounts/functions/predictMultiOwnerLightAccountAddress +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function predictMultiOwnerLightAccountAddress(params): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:132](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L132) + +Predicts the address of a **Multi-Owner Light Account** given the factory, salt +and the set of owner addresses. + +Internally replicates the CREATE2 calculation performed by the factory so +you can obtain the counter-factual account address before deployment (useful +for funding or displaying to users). + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`PredictMultiOwnerLightAccountAddressParams`](../type-aliases/PredictMultiOwnerLightAccountAddressParams) + + Object containing: + – `factoryAddress` Factory contract that will deploy the account. + – `salt` Arbitrary salt used when calling the factory. + – `ownerAddresses` Array of owner EOAs (must be deduped & sorted). +
+ +## Returns + +`` `0x${string}` `` + +Predicted account address for the multi-owner light account. diff --git a/docs/pages/reference/smart-accounts/src/functions/predictMultiOwnerModularAccountV1Address.mdx b/docs/pages/reference/smart-accounts/src/functions/predictMultiOwnerModularAccountV1Address.mdx new file mode 100644 index 0000000000..66eb8c2596 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/predictMultiOwnerModularAccountV1Address.mdx @@ -0,0 +1,64 @@ +--- +title: predictMultiOwnerModularAccountV1Address +description: Overview of the predictMultiOwnerModularAccountV1Address function +slug: wallets/reference/smart-accounts/functions/predictMultiOwnerModularAccountV1Address +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function predictMultiOwnerModularAccountV1Address(params): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/predictAddress.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/predictAddress.ts#L46) + +Predicts the address of a MultiOwnerModularAccountV1 smart account before deployment. + +This function uses CREATE2 to deterministically compute the account address based on the factory address, +salt, and owner addresses. The predicted address will match the actual deployed address if the same +parameters are used during deployment. + +## Example + +```ts +const predictedAddress = predictMultiOwnerModularAccountV1Address({ + salt: 0n, + ownerAddresses: ["0x1234...", "0x5678..."], +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`PredictMultiOwnerModularAccountV1AddressParams`](../type-aliases/PredictMultiOwnerModularAccountV1AddressParams) + + The parameters for predicting the account address +
+ +## Returns + +`` `0x${string}` `` + +The predicted address where the account will be deployed diff --git a/docs/pages/reference/smart-accounts/src/functions/serializeHookConfig.mdx b/docs/pages/reference/smart-accounts/src/functions/serializeHookConfig.mdx new file mode 100644 index 0000000000..3dd3a4d78e --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/serializeHookConfig.mdx @@ -0,0 +1,72 @@ +--- +title: serializeHookConfig +description: Overview of the serializeHookConfig function +slug: wallets/reference/smart-accounts/functions/serializeHookConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function serializeHookConfig(config): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/hooks.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/hooks.ts#L68) + +Serializes a `HookConfig` object into a `Hex` format by encoding the hook type, presence of post/pre hooks, address, and entity ID. + +## Example + +```ts +import { type HookType, serializeHookConfig } from "@alchemy/smart-accounts"; +import { Address } from "viem"; + +const moduleAddress: Address = "0x1234"; +const entityId: number = 1234; +const hookType: HookType = HookType.Validation; +const hasPostHooks: boolean = false; +const hasPreHooks: boolean = true; + +const hookConfigHex = serializeHookConfig({ + moduleAddress, + entityId, + hookType, + hasPostHooks, + hasPreHooks, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `config` + + [`HookConfig`](../type-aliases/HookConfig) + + The hook configuration containing address, entity ID, hook type, and post/pre hook indicators +
+ +## Returns + +`` `0x${string}` `` + +The serialized hook configuration in hexadecimal format diff --git a/docs/pages/reference/smart-accounts/src/functions/serializeModuleEntity.mdx b/docs/pages/reference/smart-accounts/src/functions/serializeModuleEntity.mdx new file mode 100644 index 0000000000..efcc58fba3 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/serializeModuleEntity.mdx @@ -0,0 +1,66 @@ +--- +title: serializeModuleEntity +description: Overview of the serializeModuleEntity function +slug: wallets/reference/smart-accounts/functions/serializeModuleEntity +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function serializeModuleEntity(config): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:120](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L120) + +Serializes a module entity into a hexadecimal format by concatenating the module address and entity ID. + +## Example + +```ts +import { serializeModuleEntity } from "@alchemy/smart-accounts"; +import { Address } from "viem"; + +const moduleAddress: Address = "0x1234"; +const entityId: number = 1234; + +const moduleEntityHex = serializeModuleEntity({ + moduleAddress, + entityId, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `config` + + [`ModuleEntity`](../type-aliases/ModuleEntity) + + The module entity configuration containing the module address and entity ID +
+ +## Returns + +`` `0x${string}` `` + +A hexadecimal string representation of the serialized module entity diff --git a/docs/pages/reference/smart-accounts/src/functions/serializeValidationConfig.mdx b/docs/pages/reference/smart-accounts/src/functions/serializeValidationConfig.mdx new file mode 100644 index 0000000000..dd1aa32703 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/serializeValidationConfig.mdx @@ -0,0 +1,72 @@ +--- +title: serializeValidationConfig +description: Overview of the serializeValidationConfig function +slug: wallets/reference/smart-accounts/functions/serializeValidationConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function serializeValidationConfig(config): `0x${string}`; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/hooks.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/hooks.ts#L30) + +Serializes a validation configuration into a hexadecimal string representation. This involves converting boolean flags into bitwise representation and combining them with serialized module entity data. + +## Example + +```ts +import { serializeValidationConfig } from "@alchemy/smart-accounts"; +import { Address } from "viem"; + +const moduleAddress: Address = "0x1234"; +const entityId: number = 1234; +const isGlobal: boolean = true; +const isSignatureValidation: boolean = false; +const isUserOpValidation: boolean = true; + +const validationConfigHex = serializeValidationConfig({ + moduleAddress, + entityId, + isGlobal, + isSignatureValidation, + isUserOpValidation, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `config` + + [`ValidationConfig`](../type-aliases/ValidationConfig) + + The validation configuration object containing details to serialize +
+ +## Returns + +`` `0x${string}` `` + +A hexadecimal string representing the serialized configuration diff --git a/docs/pages/reference/smart-accounts/src/functions/singleOwnerLightAccountActions.mdx b/docs/pages/reference/smart-accounts/src/functions/singleOwnerLightAccountActions.mdx new file mode 100644 index 0000000000..9782d7f972 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/singleOwnerLightAccountActions.mdx @@ -0,0 +1,99 @@ +--- +title: singleOwnerLightAccountActions +description: Overview of the singleOwnerLightAccountActions function +slug: wallets/reference/smart-accounts/functions/singleOwnerLightAccountActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function singleOwnerLightAccountActions( + client, +): LightAccountActions< + IsUndefined extends true ? undefined : LightAccount +>; +``` + +Defined in: [packages/smart-accounts/src/light-account/decorators/singleOwner.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/decorators/singleOwner.ts#L30) + +A decorator that can be used with viem's bundler client to add light account actions to the client + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ `TChain` *extends* `Chain` | `undefined` + + `Chain` | `undefined` +
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `Client`\<`TTransport`, `TChain`, `TAccount`> + + The client instance for which to provide the light account actions +
+ +## Returns + +[`LightAccountActions`](../type-aliases/LightAccountActions)\<`IsUndefined`\<`TAccount`> _extends_ `true` ? `undefined` : [`LightAccount`](../type-aliases/LightAccount)> + +An object containing the available light account actions diff --git a/docs/pages/reference/smart-accounts/src/functions/toLightAccount.mdx b/docs/pages/reference/smart-accounts/src/functions/toLightAccount.mdx new file mode 100644 index 0000000000..91ab3c10e7 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/toLightAccount.mdx @@ -0,0 +1,77 @@ +--- +title: toLightAccount +description: Overview of the toLightAccount function +slug: wallets/reference/smart-accounts/functions/toLightAccount +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function toLightAccount( + param0, +): Promise>; +``` + +Defined in: [packages/smart-accounts/src/light-account/accounts/account.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/accounts/account.ts#L62) + +Creates a light account. + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TLightAccountVersion` *extends* `"v1.0.1"` | `"v1.0.2"` | `"v1.1.0"` | `"v2.0.0"` | `"v2.1.0"` | `"v2.2.0"` + + `"v1.0.1"` | `"v1.0.2"` | `"v1.1.0"` | `"v2.0.0"` | `"v2.1.0"` | `"v2.2.0"` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `param0` + + [`ToLightAccountParams`](../type-aliases/ToLightAccountParams)\<`TLightAccountVersion`> + + The parameters for creating a light account. +
+ +## Returns + +`Promise`\<[`LightAccount`](../type-aliases/LightAccount)\<`TLightAccountVersion`>> + +A light account. diff --git a/docs/pages/reference/smart-accounts/src/functions/toModularAccountV1Base.mdx b/docs/pages/reference/smart-accounts/src/functions/toModularAccountV1Base.mdx new file mode 100644 index 0000000000..627e2fc82f --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/toModularAccountV1Base.mdx @@ -0,0 +1,77 @@ +--- +title: toModularAccountV1Base +description: Overview of the toModularAccountV1Base function +slug: wallets/reference/smart-accounts/functions/toModularAccountV1Base +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function toModularAccountV1Base( + params, +): Promise; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/accounts/base.ts:71](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/accounts/base.ts#L71) + +Creates a ModularAccountV1Base instance. + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`ToModularAccountV1BaseParams`](../type-aliases/ToModularAccountV1BaseParams)\<`TTransport`> + + The parameters for creating a ModularAccountV1Base instance +
+ +## Returns + +`Promise`\<[`ModularAccountV1Base`](../type-aliases/ModularAccountV1Base)> + +A promise that resolves to a ModularAccountV1Base instance diff --git a/docs/pages/reference/smart-accounts/src/functions/toModularAccountV2.mdx b/docs/pages/reference/smart-accounts/src/functions/toModularAccountV2.mdx new file mode 100644 index 0000000000..b071a50047 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/toModularAccountV2.mdx @@ -0,0 +1,75 @@ +--- +title: toModularAccountV2 +description: Overview of the toModularAccountV2 function +slug: wallets/reference/smart-accounts/functions/toModularAccountV2 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function toModularAccountV2(param0): Promise; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/account.ts:69](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/account.ts#L69) + +Creates a MAv2 account. + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TMode` *extends* `Mode` + + `Mode` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `param0` + + [`ToModularAccountV2Params`](../type-aliases/ToModularAccountV2Params)\<`TMode`> + + The parameters for creating a MAv2 account. +
+ +## Returns + +`Promise`\<[`ModularAccountV2`](../type-aliases/ModularAccountV2)> + +A MAv2 account. diff --git a/docs/pages/reference/smart-accounts/src/functions/toModularAccountV2Base.mdx b/docs/pages/reference/smart-accounts/src/functions/toModularAccountV2Base.mdx new file mode 100644 index 0000000000..5722cbff7b --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/toModularAccountV2Base.mdx @@ -0,0 +1,77 @@ +--- +title: toModularAccountV2Base +description: Overview of the toModularAccountV2Base function +slug: wallets/reference/smart-accounts/functions/toModularAccountV2Base +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function toModularAccountV2Base( + params, +): Promise; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/base.ts:119](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/base.ts#L119) + +Creates a ModularAccountV2Base instance. + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`ToModularAccountV2BaseParams`](../type-aliases/ToModularAccountV2BaseParams)\<`TTransport`> + + The parameters for creating a ModularAccountV2Base instance. +
+ +## Returns + +`Promise`\<[`ModularAccountV2Base`](../type-aliases/ModularAccountV2Base)> + +A promise that resolves to a ModularAccountV2Base instance. diff --git a/docs/pages/reference/smart-accounts/src/functions/toMultiOwnerLightAccount.mdx b/docs/pages/reference/smart-accounts/src/functions/toMultiOwnerLightAccount.mdx new file mode 100644 index 0000000000..a4ddbcf316 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/toMultiOwnerLightAccount.mdx @@ -0,0 +1,51 @@ +--- +title: toMultiOwnerLightAccount +description: Overview of the toMultiOwnerLightAccount function +slug: wallets/reference/smart-accounts/functions/toMultiOwnerLightAccount +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function toMultiOwnerLightAccount(param0): Promise; +``` + +Defined in: [packages/smart-accounts/src/light-account/accounts/multi-owner-account.ts:52](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/accounts/multi-owner-account.ts#L52) + +Creates a multi-owner light account. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `param0` + + [`ToMultiOwnerLightAccountParams`](../type-aliases/ToMultiOwnerLightAccountParams) + + The parameters for creating a multi-owner light account. +
+ +## Returns + +`Promise`\<[`MultiOwnerLightAccount`](../type-aliases/MultiOwnerLightAccount)> + +A multi-owner light account. diff --git a/docs/pages/reference/smart-accounts/src/functions/toMultiOwnerModularAccountV1.mdx b/docs/pages/reference/smart-accounts/src/functions/toMultiOwnerModularAccountV1.mdx new file mode 100644 index 0000000000..f66168a35f --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/toMultiOwnerModularAccountV1.mdx @@ -0,0 +1,53 @@ +--- +title: toMultiOwnerModularAccountV1 +description: Overview of the toMultiOwnerModularAccountV1 function +slug: wallets/reference/smart-accounts/functions/toMultiOwnerModularAccountV1 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function toMultiOwnerModularAccountV1( + param0, +): Promise; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/accounts/multi-owner-account.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/accounts/multi-owner-account.ts#L53) + +Creates a multi-owner MAv1 account. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `param0` + + [`ToMultiOwnerModularAccountV1Params`](../type-aliases/ToMultiOwnerModularAccountV1Params) + + The parameters for creating a multi-owner MAv1 account. +
+ +## Returns + +`Promise`\<[`MultiOwnerModularAccountV1`](../type-aliases/MultiOwnerModularAccountV1)> + +A multi-owner MAv1 account. diff --git a/docs/pages/reference/smart-accounts/src/functions/toReplaySafeTypedData.mdx b/docs/pages/reference/smart-accounts/src/functions/toReplaySafeTypedData.mdx new file mode 100644 index 0000000000..ad7674f805 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/functions/toReplaySafeTypedData.mdx @@ -0,0 +1,246 @@ +--- +title: toReplaySafeTypedData +description: Overview of the toReplaySafeTypedData function +slug: wallets/reference/smart-accounts/functions/toReplaySafeTypedData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function toReplaySafeTypedData(params): object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/signature.ts:55](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/signature.ts#L55) + +Converts a hash to a replay safe typed data. + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + \{ `address`: `` `0x${string}` ``; `chainId`: `number`; `hash`: `` `0x${string}` ``; `salt?`: `` `0x${string}` ``; } + + The parameters for converting a hash to a replay safe typed data. +
+ `params.address` + + `` `0x${string}` `` + + ‐ +
+ `params.chainId` + + `number` + + ‐ +
+ `params.hash` + + `` `0x${string}` `` + + ‐ +
+ `params.salt?` + + `` `0x${string}` `` + + ‐ +
+ +## Returns + +`object` + +The replay safe typed data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `domain` + + `object` + + ‐ +
+ `domain.chainId` + + `number` + + ‐ +
+ `domain.salt?` + + `` `0x${string}` `` + + ‐ +
+ `domain.verifyingContract` + + `` `0x${string}` `` + + `address` +
+ `message` + + `object` + + ‐ +
+ `message.hash` + + `` `0x${string}` `` + + ‐ +
+ `primaryType` + + `"ReplaySafeHash"` + + ‐ +
+ `types` + + `object` + + ‐ +
+ `types.ReplaySafeHash` + + `object`\[] + + ‐ +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/BaseMaV1AccountImplementation.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/BaseMaV1AccountImplementation.mdx new file mode 100644 index 0000000000..400cd643be --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/BaseMaV1AccountImplementation.mdx @@ -0,0 +1,23 @@ +--- +title: BaseMaV1AccountImplementation +description: Overview of BaseMaV1AccountImplementation +slug: wallets/reference/smart-accounts/type-aliases/BaseMaV1AccountImplementation +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type BaseMaV1AccountImplementation = SmartAccountImplementation< + typeof entryPoint06Abi, + "0.6", + { + formatSignature: (signature) => Promise; + prepareSignature: (request) => Promise; + smartAccountType: MaV1AccountType; + }, + false +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/accounts/base.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/accounts/base.ts#L37) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/BaseModularAccountV2Implementation.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/BaseModularAccountV2Implementation.mdx new file mode 100644 index 0000000000..caba604e4b --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/BaseModularAccountV2Implementation.mdx @@ -0,0 +1,27 @@ +--- +title: BaseModularAccountV2Implementation +description: Overview of BaseModularAccountV2Implementation +slug: wallets/reference/smart-accounts/type-aliases/BaseModularAccountV2Implementation +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type BaseModularAccountV2Implementation = SmartAccountImplementation< + typeof entryPoint07Abi, + "0.7", + { + encodeCallData: (callData) => Promise; + formatSignature: (signature) => Promise; + getExecutionData: (selector) => Promise; + getValidationData: (args) => Promise; + prepareSignature: (request) => Promise; + signerEntity: SignerEntity; + smartAccountType: "ModularAccountV2"; + }, + boolean +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/base.ts:78](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/base.ts#L78) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/BuildDeferredActionDigestParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/BuildDeferredActionDigestParams.mdx new file mode 100644 index 0000000000..20a889b0a2 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/BuildDeferredActionDigestParams.mdx @@ -0,0 +1,58 @@ +--- +title: BuildDeferredActionDigestParams +description: Overview of BuildDeferredActionDigestParams +slug: wallets/reference/smart-accounts/type-aliases/BuildDeferredActionDigestParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type BuildDeferredActionDigestParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/deferredActions.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/deferredActions.ts#L37) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `fullPreSignatureDeferredActionDigest` + + `Hex` +
+ `sig` + + `Hex` +
+ `signaturePrefix?` + + [`SignaturePrefix`](SignaturePrefix) +
diff --git a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildNonceParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/BuildNonceParams.mdx similarity index 78% rename from docs/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildNonceParams.mdx rename to docs/pages/reference/smart-accounts/src/type-aliases/BuildNonceParams.mdx index 1f29fadcea..4d593e2ce9 100644 --- a/docs/pages/reference/account-kit/smart-contracts/src/type-aliases/BuildNonceParams.mdx +++ b/docs/pages/reference/smart-accounts/src/type-aliases/BuildNonceParams.mdx @@ -1,7 +1,7 @@ --- title: BuildNonceParams description: Overview of BuildNonceParams -slug: wallets/reference/account-kit/smart-contracts/type-aliases/BuildNonceParams +slug: wallets/reference/smart-accounts/type-aliases/BuildNonceParams layout: reference --- @@ -11,7 +11,7 @@ layout: reference type BuildNonceParams = object; ``` -Defined in: [account-kit/smart-contracts/src/ma-v2/utils.ts:270](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/smart-contracts/src/ma-v2/utils.ts#L270) +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:72](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L72) ## Properties diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/BuildPreSignatureDeferredActionDigestParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/BuildPreSignatureDeferredActionDigestParams.mdx new file mode 100644 index 0000000000..cddd919d29 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/BuildPreSignatureDeferredActionDigestParams.mdx @@ -0,0 +1,38 @@ +--- +title: BuildPreSignatureDeferredActionDigestParams +description: Overview of BuildPreSignatureDeferredActionDigestParams +slug: wallets/reference/smart-accounts/type-aliases/BuildPreSignatureDeferredActionDigestParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type BuildPreSignatureDeferredActionDigestParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L48) + +## Properties + + + + + + + + + + + + + + + + + +
PropertyType
+ `typedData` + + [`DeferredActionTypedData`](DeferredActionTypedData) +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/CreateDeferredActionTypedDataParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/CreateDeferredActionTypedDataParams.mdx new file mode 100644 index 0000000000..d5de4dccfc --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/CreateDeferredActionTypedDataParams.mdx @@ -0,0 +1,58 @@ +--- +title: CreateDeferredActionTypedDataParams +description: Overview of CreateDeferredActionTypedDataParams +slug: wallets/reference/smart-accounts/type-aliases/CreateDeferredActionTypedDataParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type CreateDeferredActionTypedDataParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L42) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `callData` + + `Hex` +
+ `deadline` + + `number` +
+ `nonce` + + `bigint` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/DeferralActions.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/DeferralActions.mdx new file mode 100644 index 0000000000..ebd03af2b7 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/DeferralActions.mdx @@ -0,0 +1,58 @@ +--- +title: DeferralActions +description: Overview of DeferralActions +slug: wallets/reference/smart-accounts/type-aliases/DeferralActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type DeferralActions = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:59](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L59) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `buildPreSignatureDeferredActionDigest` + + (`args`) => `Hex` +
+ `createDeferredActionTypedDataObject` + + (`args`) => `Promise`\<[`DeferredActionReturnData`](DeferredActionReturnData)> +
+ `getEntityIdAndNonce` + + (`args`) => `Promise`\<\{ `entityId`: `number`; `nonce`: `bigint`; }> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/DeferredActionReturnData.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/DeferredActionReturnData.mdx new file mode 100644 index 0000000000..0593bdade8 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/DeferredActionReturnData.mdx @@ -0,0 +1,38 @@ +--- +title: DeferredActionReturnData +description: Overview of DeferredActionReturnData +slug: wallets/reference/smart-accounts/type-aliases/DeferredActionReturnData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type DeferredActionReturnData = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L38) + +## Properties + + + + + + + + + + + + + + + + + +
PropertyType
+ `typedData` + + [`DeferredActionTypedData`](DeferredActionTypedData) +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/DeferredActionTypedData.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/DeferredActionTypedData.mdx new file mode 100644 index 0000000000..ffc32a9d3b --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/DeferredActionTypedData.mdx @@ -0,0 +1,32 @@ +--- +title: DeferredActionTypedData +description: Overview of DeferredActionTypedData +slug: wallets/reference/smart-accounts/type-aliases/DeferredActionTypedData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type DeferredActionTypedData = TypedDataDefinition< + { + DeferredAction: [ + { + name: "nonce"; + type: "uint256"; + }, + { + name: "deadline"; + type: "uint48"; + }, + { + name: "call"; + type: "bytes"; + }, + ]; + }, + "DeferredAction" +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L27) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/EntityIdAndNonceParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/EntityIdAndNonceParams.mdx new file mode 100644 index 0000000000..8b55d0f85e --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/EntityIdAndNonceParams.mdx @@ -0,0 +1,68 @@ +--- +title: EntityIdAndNonceParams +description: Overview of EntityIdAndNonceParams +slug: wallets/reference/smart-accounts/type-aliases/EntityIdAndNonceParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type EntityIdAndNonceParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:52](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L52) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `entityId?` + + `number` +
+ `isDeferredAction?` + + `boolean` +
+ `isGlobalValidation` + + `boolean` +
+ `nonceKey?` + + `bigint` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/EntryPointFromAccountRegistry.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/EntryPointFromAccountRegistry.mdx new file mode 100644 index 0000000000..39fd3ed911 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/EntryPointFromAccountRegistry.mdx @@ -0,0 +1,60 @@ +--- +title: EntryPointFromAccountRegistry +description: Infers the EntryPoint details as a type, given the account type and version. +slug: wallets/reference/smart-accounts/type-aliases/EntryPointFromAccountRegistry +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type EntryPointFromAccountRegistry = + (typeof AccountVersionRegistry)[TLightAccountType][TLightAccountVersion] extends StaticSmartAccountImplementation< + infer _7702, + infer entryPointVersion, + infer _factoryArgs, + infer entryPointAbi + > + ? (typeof AccountVersionRegistry)[TLightAccountType][TLightAccountVersion]["entryPoint"] extends object + ? (typeof AccountVersionRegistry)[TLightAccountType][TLightAccountVersion]["entryPoint"] + : never + : never; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:98](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L98) + +Infers the EntryPoint details as a type, given the account type and version. + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TLightAccountType` *extends* [`LightAccountType`](LightAccountType) + + ‐ +
+ `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`TLightAccountType`> + + [`LightAccountVersion`](LightAccountVersion)\<`TLightAccountType`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ExecutionDataView.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ExecutionDataView.mdx new file mode 100644 index 0000000000..75945765ec --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ExecutionDataView.mdx @@ -0,0 +1,68 @@ +--- +title: ExecutionDataView +description: Overview of ExecutionDataView +slug: wallets/reference/smart-accounts/type-aliases/ExecutionDataView +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ExecutionDataView = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L17) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `allowGlobalValidation` + + `boolean` +
+ `executionHooks` + + readonly `Hex`\[] +
+ `module` + + `Address` +
+ `skipRuntimeValidation` + + `boolean` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/GetAccountParameter.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/GetAccountParameter.mdx new file mode 100644 index 0000000000..962d0f5513 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/GetAccountParameter.mdx @@ -0,0 +1,49 @@ +--- +title: GetAccountParameter +description: Overview of GetAccountParameter +slug: wallets/reference/smart-accounts/type-aliases/GetAccountParameter +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetAccountParameter = + IsUndefined extends true ? object : object; +``` + +Defined in: [packages/smart-accounts/src/types.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/types.ts#L15) + +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
+ `TAccountOverride` *extends* `SmartAccount` + + `SmartAccount` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/GetLightAccountAddressFromFactoryDataParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/GetLightAccountAddressFromFactoryDataParams.mdx new file mode 100644 index 0000000000..30beb728e0 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/GetLightAccountAddressFromFactoryDataParams.mdx @@ -0,0 +1,98 @@ +--- +title: GetLightAccountAddressFromFactoryDataParams +description: Overview of GetLightAccountAddressFromFactoryDataParams +slug: wallets/reference/smart-accounts/type-aliases/GetLightAccountAddressFromFactoryDataParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetLightAccountAddressFromFactoryDataParams = object; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:188](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L188) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `client` + + `Client` +
+ `entryPoint` + + `object` +
+ `entryPoint.address` + + `Address` +
+ `entryPoint.version` + + `EntryPointVersion` +
+ `factoryAddress` + + `Address` +
+ `factoryData` + + `Hex` +
+ `version` + + [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/GetLightAccountType.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/GetLightAccountType.mdx new file mode 100644 index 0000000000..b10f1a5ea4 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/GetLightAccountType.mdx @@ -0,0 +1,35 @@ +--- +title: GetLightAccountType +description: Overview of GetLightAccountType +slug: wallets/reference/smart-accounts/type-aliases/GetLightAccountType +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetLightAccountType = + TAccount["smartAccountType"] extends LightAccountType + ? TAccount["smartAccountType"] + : never; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:81](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L81) + +## Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `TAccount` *extends* `LightAccountBase` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/GetMAV2UpgradeToData.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/GetMAV2UpgradeToData.mdx new file mode 100644 index 0000000000..00eaccd137 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/GetMAV2UpgradeToData.mdx @@ -0,0 +1,38 @@ +--- +title: GetMAV2UpgradeToData +description: Overview of GetMAV2UpgradeToData +slug: wallets/reference/smart-accounts/type-aliases/GetMAV2UpgradeToData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetMAV2UpgradeToData = GetAccountParameter; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:45](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L45) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/GetModularAccountV2AddressFromFactoryDataParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/GetModularAccountV2AddressFromFactoryDataParams.mdx new file mode 100644 index 0000000000..c9f8e1c2cd --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/GetModularAccountV2AddressFromFactoryDataParams.mdx @@ -0,0 +1,98 @@ +--- +title: GetModularAccountV2AddressFromFactoryDataParams +description: Overview of GetModularAccountV2AddressFromFactoryDataParams +slug: wallets/reference/smart-accounts/type-aliases/GetModularAccountV2AddressFromFactoryDataParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetModularAccountV2AddressFromFactoryDataParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/predictAddress.ts:132](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/predictAddress.ts#L132) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `client` + + `Client` +
+ `entryPoint?` + + `object` +
+ `entryPoint.address` + + `Address` +
+ `entryPoint.version` + + `EntryPointVersion` +
+ `factoryAddress` + + `Address` +
+ `factoryData` + + `Hex` +
+ `implementationAddress` + + `Address` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/GetMultiOwnerLightAccountAddressFromFactoryDataParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/GetMultiOwnerLightAccountAddressFromFactoryDataParams.mdx new file mode 100644 index 0000000000..97f51a0677 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/GetMultiOwnerLightAccountAddressFromFactoryDataParams.mdx @@ -0,0 +1,88 @@ +--- +title: GetMultiOwnerLightAccountAddressFromFactoryDataParams +description: Overview of GetMultiOwnerLightAccountAddressFromFactoryDataParams +slug: wallets/reference/smart-accounts/type-aliases/GetMultiOwnerLightAccountAddressFromFactoryDataParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetMultiOwnerLightAccountAddressFromFactoryDataParams = object; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:246](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L246) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `client` + + `Client` +
+ `entryPoint` + + `object` +
+ `entryPoint.address` + + `Address` +
+ `entryPoint.version` + + `EntryPointVersion` +
+ `factoryAddress` + + `Address` +
+ `factoryData` + + `Hex` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/GetMultiOwnerModularAccountV1AddressFromFactoryDataParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/GetMultiOwnerModularAccountV1AddressFromFactoryDataParams.mdx new file mode 100644 index 0000000000..ea55b49c74 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/GetMultiOwnerModularAccountV1AddressFromFactoryDataParams.mdx @@ -0,0 +1,88 @@ +--- +title: GetMultiOwnerModularAccountV1AddressFromFactoryDataParams +description: Overview of GetMultiOwnerModularAccountV1AddressFromFactoryDataParams +slug: wallets/reference/smart-accounts/type-aliases/GetMultiOwnerModularAccountV1AddressFromFactoryDataParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetMultiOwnerModularAccountV1AddressFromFactoryDataParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/predictAddress.ts:93](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/predictAddress.ts#L93) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `client` + + `Client` +
+ `entryPoint` + + `object` +
+ `entryPoint.address` + + `Address` +
+ `entryPoint.version` + + `EntryPointVersion` +
+ `factoryAddress` + + `Address` +
+ `factoryData` + + `Hex` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/HookConfig.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/HookConfig.mdx new file mode 100644 index 0000000000..c8746c15b5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/HookConfig.mdx @@ -0,0 +1,78 @@ +--- +title: HookConfig +description: Overview of HookConfig +slug: wallets/reference/smart-accounts/type-aliases/HookConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type HookConfig = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:52](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L52) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `address` + + `Address` +
+ `entityId` + + `number` +
+ `hasPostHooks` + + `boolean` +
+ `hasPreHooks` + + `boolean` +
+ `hookType` + + [`HookType`](HookType) +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/HookIdentifier.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/HookIdentifier.mdx new file mode 100644 index 0000000000..1148e87d8b --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/HookIdentifier.mdx @@ -0,0 +1,14 @@ +--- +title: HookIdentifier +description: Overview of HookIdentifier +slug: wallets/reference/smart-accounts/type-aliases/HookIdentifier +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type HookIdentifier = (typeof HookIdentifier)[keyof typeof HookIdentifier]; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L73) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/HookType.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/HookType.mdx new file mode 100644 index 0000000000..897e3883f7 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/HookType.mdx @@ -0,0 +1,14 @@ +--- +title: HookType +description: Overview of HookType +slug: wallets/reference/smart-accounts/type-aliases/HookType +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type HookType = (typeof HookType)[keyof typeof HookType]; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L44) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/InstallValidationActions.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/InstallValidationActions.mdx new file mode 100644 index 0000000000..1e979a87cf --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/InstallValidationActions.mdx @@ -0,0 +1,92 @@ +--- +title: InstallValidationActions +description: Overview of InstallValidationActions +slug: wallets/reference/smart-accounts/type-aliases/InstallValidationActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type InstallValidationActions = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/installValidation.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/installValidation.ts#L51) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
+ +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `encodeInstallValidation` + + (`args`) => `Promise`\<`Hex`> +
+ `encodeUninstallValidation` + + (`args`) => `Promise`\<`Hex`> +
+ `installValidation` + + (`args`) => `Promise`\<`Hex`> +
+ `uninstallValidation` + + (`args`) => `Promise`\<`Hex`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/InstallValidationParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/InstallValidationParams.mdx new file mode 100644 index 0000000000..6a700f71c5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/InstallValidationParams.mdx @@ -0,0 +1,93 @@ +--- +title: InstallValidationParams +description: Overview of InstallValidationParams +slug: wallets/reference/smart-accounts/type-aliases/InstallValidationParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type InstallValidationParams = object & + GetAccountParameter; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/installValidation.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/installValidation.ts#L30) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `hooks` + + `object`\[] +
+ `installData` + + `Hex` +
+ `selectors` + + `Hex`\[] +
+ `validationConfig` + + [`ValidationConfig`](ValidationConfig) +
+ +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/LightAccount.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccount.mdx new file mode 100644 index 0000000000..d36ca1c66d --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccount.mdx @@ -0,0 +1,76 @@ +--- +title: LightAccount +description: Overview of LightAccount +slug: wallets/reference/smart-accounts/type-aliases/LightAccount +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type LightAccount = LightAccountBase< + "LightAccount", + TLightAccountVersion +> & + object; +``` + +Defined in: [packages/smart-accounts/src/light-account/accounts/account.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/accounts/account.ts#L34) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `encodeTransferOwnership()` + + (`newOwner`) => `Hex` +
+ `getOwnerAddress()` + + () => `Promise`\<`Address`> +
+ +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> + + [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountAbi.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountAbi.mdx new file mode 100644 index 0000000000..2d7bdde7ed --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountAbi.mdx @@ -0,0 +1,44 @@ +--- +title: LightAccountAbi +description: Overview of LightAccountAbi +slug: wallets/reference/smart-accounts/type-aliases/LightAccountAbi +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type LightAccountAbi = + TAccountVersion extends keyof (typeof AccountVersionRegistry)[TAccountType] + ? (typeof AccountVersionRegistry)[TAccountType][TAccountVersion] extends StaticSmartAccountImplementation + ? (typeof AccountVersionRegistry)[TAccountType][TAccountVersion]["accountAbi"] + : never + : never; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:86](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L86) + +## Type Parameters + + + + + + + + + + + + + + + + + + +
Type Parameter
+ `TAccountType` *extends* [`LightAccountType`](LightAccountType) +
+ `TAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`TAccountType`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountActions.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountActions.mdx new file mode 100644 index 0000000000..105c3a1dda --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountActions.mdx @@ -0,0 +1,62 @@ +--- +title: LightAccountActions +description: Overview of LightAccountActions +slug: wallets/reference/smart-accounts/type-aliases/LightAccountActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type LightAccountActions = object; +``` + +Defined in: [packages/smart-accounts/src/light-account/decorators/singleOwner.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/decorators/singleOwner.ts#L8) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* [`LightAccount`](LightAccount) | `undefined` + + [`LightAccount`](LightAccount) | `undefined` +
+ +## Properties + + + + + + + + + + + + + + + + + +
PropertyType
+ `transferOwnership` + + (`args`) => `Promise`\<`Hex`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountType.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountType.mdx new file mode 100644 index 0000000000..4a5348db0d --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountType.mdx @@ -0,0 +1,17 @@ +--- +title: LightAccountType +description: Overview of LightAccountType +slug: wallets/reference/smart-accounts/type-aliases/LightAccountType +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type LightAccountType = Extract< + keyof typeof AccountVersionRegistry, + "LightAccount" | "MultiOwnerLightAccount" +>; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L33) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountVersion.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountVersion.mdx new file mode 100644 index 0000000000..17f222ede5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/LightAccountVersion.mdx @@ -0,0 +1,33 @@ +--- +title: LightAccountVersion +description: Overview of LightAccountVersion +slug: wallets/reference/smart-accounts/type-aliases/LightAccountVersion +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type LightAccountVersion = + keyof (typeof AccountVersionRegistry)[TAccountType]; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L38) + +## Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `TAccountType` *extends* [`LightAccountType`](LightAccountType) +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV1Base.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV1Base.mdx new file mode 100644 index 0000000000..410677e7df --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV1Base.mdx @@ -0,0 +1,15 @@ +--- +title: ModularAccountV1Base +description: Overview of ModularAccountV1Base +slug: wallets/reference/smart-accounts/type-aliases/ModularAccountV1Base +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ModularAccountV1Base = + SmartAccountWithDecodeCalls; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/accounts/base.ts:48](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/accounts/base.ts#L48) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV2.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV2.mdx new file mode 100644 index 0000000000..676a9ed92c --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV2.mdx @@ -0,0 +1,14 @@ +--- +title: ModularAccountV2 +description: Overview of ModularAccountV2 +slug: wallets/reference/smart-accounts/type-aliases/ModularAccountV2 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ModularAccountV2 = ModularAccountV2Base & object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/account.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/account.ts#L31) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV2Base.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV2Base.mdx new file mode 100644 index 0000000000..221b4f2bc8 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ModularAccountV2Base.mdx @@ -0,0 +1,15 @@ +--- +title: ModularAccountV2Base +description: Overview of ModularAccountV2Base +slug: wallets/reference/smart-accounts/type-aliases/ModularAccountV2Base +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ModularAccountV2Base = + SmartAccountWithDecodeCalls; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/base.ts:95](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/base.ts#L95) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ModuleEntity.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ModuleEntity.mdx new file mode 100644 index 0000000000..0aaae0e44d --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ModuleEntity.mdx @@ -0,0 +1,48 @@ +--- +title: ModuleEntity +description: Overview of ModuleEntity +slug: wallets/reference/smart-accounts/type-aliases/ModuleEntity +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ModuleEntity = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L31) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `entityId` + + `number` +
+ `moduleAddress` + + `Address` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerLightAccount.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerLightAccount.mdx new file mode 100644 index 0000000000..32e9db2ad0 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerLightAccount.mdx @@ -0,0 +1,52 @@ +--- +title: MultiOwnerLightAccount +description: Overview of MultiOwnerLightAccount +slug: wallets/reference/smart-accounts/type-aliases/MultiOwnerLightAccount +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type MultiOwnerLightAccount = LightAccountBase< + "MultiOwnerLightAccount", + "v2.0.0" +> & + object; +``` + +Defined in: [packages/smart-accounts/src/light-account/accounts/multi-owner-account.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/accounts/multi-owner-account.ts#L25) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `encodeUpdateOwners()` + + (`ownersToAdd`, `ownersToRemove`) => `Hex` +
+ `getOwnerAddresses()` + + () => `Promise`\ +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerLightAccountActions.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerLightAccountActions.mdx new file mode 100644 index 0000000000..40cf95b056 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerLightAccountActions.mdx @@ -0,0 +1,62 @@ +--- +title: MultiOwnerLightAccountActions +description: Overview of MultiOwnerLightAccountActions +slug: wallets/reference/smart-accounts/type-aliases/MultiOwnerLightAccountActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type MultiOwnerLightAccountActions = object; +``` + +Defined in: [packages/smart-accounts/src/light-account/decorators/multiOwner.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/decorators/multiOwner.ts#L8) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* [`MultiOwnerLightAccount`](MultiOwnerLightAccount) | `undefined` + + [`MultiOwnerLightAccount`](MultiOwnerLightAccount) | `undefined` +
+ +## Properties + + + + + + + + + + + + + + + + + +
PropertyType
+ `updateOwners` + + (`args`) => `Promise`\<`Hex`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerModularAccountV1.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerModularAccountV1.mdx new file mode 100644 index 0000000000..edfa4934b5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerModularAccountV1.mdx @@ -0,0 +1,48 @@ +--- +title: MultiOwnerModularAccountV1 +description: Overview of MultiOwnerModularAccountV1 +slug: wallets/reference/smart-accounts/type-aliases/MultiOwnerModularAccountV1 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type MultiOwnerModularAccountV1 = ModularAccountV1Base & object; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/accounts/multi-owner-account.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/accounts/multi-owner-account.ts#L29) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `encodeUpdateOwners()` + + (`ownersToAdd`, `ownersToRemove`) => `Hex` +
+ `getOwnerAddresses()` + + () => `Promise`\ +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerModularAccountV1Actions.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerModularAccountV1Actions.mdx new file mode 100644 index 0000000000..7065732546 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/MultiOwnerModularAccountV1Actions.mdx @@ -0,0 +1,65 @@ +--- +title: MultiOwnerModularAccountV1Actions +description: Overview of MultiOwnerModularAccountV1Actions +slug: wallets/reference/smart-accounts/type-aliases/MultiOwnerModularAccountV1Actions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type MultiOwnerModularAccountV1Actions = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/decorators/multiOwner.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/decorators/multiOwner.ts#L8) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* + | [`MultiOwnerModularAccountV1`](MultiOwnerModularAccountV1) + | `undefined` + + | [`MultiOwnerModularAccountV1`](MultiOwnerModularAccountV1) + | `undefined` +
+ +## Properties + + + + + + + + + + + + + + + + + +
PropertyType
+ `updateOwners` + + (`args`) => `Promise`\<`Hex`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/Pack1271SignatureParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/Pack1271SignatureParams.mdx new file mode 100644 index 0000000000..2c59ff48be --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/Pack1271SignatureParams.mdx @@ -0,0 +1,58 @@ +--- +title: Pack1271SignatureParams +description: Overview of Pack1271SignatureParams +slug: wallets/reference/smart-accounts/type-aliases/Pack1271SignatureParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type Pack1271SignatureParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/signature.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/signature.ts#L23) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `entityId` + + `number` +
+ `validationSignature` + + `Hex` +
+ `validationSignaturePrefix` + + [`SignaturePrefix`](SignaturePrefix) +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/PackUOSignatureParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/PackUOSignatureParams.mdx new file mode 100644 index 0000000000..8cc580b048 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/PackUOSignatureParams.mdx @@ -0,0 +1,38 @@ +--- +title: PackUOSignatureParams +description: Overview of PackUOSignatureParams +slug: wallets/reference/smart-accounts/type-aliases/PackUOSignatureParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PackUOSignatureParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/signature.ts:4](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/signature.ts#L4) + +## Properties + + + + + + + + + + + + + + + + + +
PropertyType
+ `validationSignature` + + `Hex` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/Permission.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/Permission.mdx new file mode 100644 index 0000000000..601991fc91 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/Permission.mdx @@ -0,0 +1,62 @@ +--- +title: Permission +description: Overview of Permission +slug: wallets/reference/smart-accounts/type-aliases/Permission +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type Permission = + | { + data: { + allowance: Hex; + }; + type: typeof NATIVE_TOKEN_TRANSFER; + } + | { + data: { + address: Address; + allowance: Hex; + }; + type: typeof ERC20_TOKEN_TRANSFER; + } + | { + data: { + limit: Hex; + }; + type: typeof GAS_LIMIT; + } + | { + data: { + address: Address; + }; + type: typeof CONTRACT_ACCESS; + } + | { + data: { + functions: Hex[]; + }; + type: typeof ACCOUNT_FUNCTIONS; + } + | { + data: { + functions: Hex[]; + }; + type: typeof FUNCTIONS_ON_ALL_CONTRACTS; + } + | { + data: { + address: Address; + functions: Hex[]; + }; + type: typeof FUNCTIONS_ON_CONTRACT; + } + | { + data?: never; + type: typeof ROOT; + }; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:157](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L157) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/PermissionType.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/PermissionType.mdx new file mode 100644 index 0000000000..91b7bed9e0 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/PermissionType.mdx @@ -0,0 +1,14 @@ +--- +title: PermissionType +description: Overview of PermissionType +slug: wallets/reference/smart-accounts/type-aliases/PermissionType +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PermissionType = (typeof PermissionType)[keyof typeof PermissionType]; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L51) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/PredictLightAccountAddressParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/PredictLightAccountAddressParams.mdx new file mode 100644 index 0000000000..d53f25c583 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/PredictLightAccountAddressParams.mdx @@ -0,0 +1,68 @@ +--- +title: PredictLightAccountAddressParams +description: Overview of PredictLightAccountAddressParams +slug: wallets/reference/smart-accounts/type-aliases/PredictLightAccountAddressParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PredictLightAccountAddressParams = object; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L28) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `factoryAddress?` + + `Address` +
+ `ownerAddress` + + `Address` +
+ `salt` + + `bigint` +
+ `version` + + keyof *typeof* [`LightAccount`](../variables/AccountVersionRegistry#lightaccount) +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/PredictModularAccountV2AddressParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/PredictModularAccountV2AddressParams.mdx new file mode 100644 index 0000000000..315cd05eb4 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/PredictModularAccountV2AddressParams.mdx @@ -0,0 +1,67 @@ +--- +title: PredictModularAccountV2AddressParams +description: Overview of PredictModularAccountV2AddressParams +slug: wallets/reference/smart-accounts/type-aliases/PredictModularAccountV2AddressParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PredictModularAccountV2AddressParams = object & + | { + entityId: number; + ownerAddress: Address; + type: "MA"; +} + | { + ownerAddress: Address; + type: "SMA"; +}; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/predictAddress.ts:21](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/predictAddress.ts#L21) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `factoryAddress` + + `Address` +
+ `implementationAddress` + + `Address` +
+ `salt` + + `bigint` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/PredictMultiOwnerLightAccountAddressParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/PredictMultiOwnerLightAccountAddressParams.mdx new file mode 100644 index 0000000000..8a645b8a31 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/PredictMultiOwnerLightAccountAddressParams.mdx @@ -0,0 +1,58 @@ +--- +title: PredictMultiOwnerLightAccountAddressParams +description: Overview of PredictMultiOwnerLightAccountAddressParams +slug: wallets/reference/smart-accounts/type-aliases/PredictMultiOwnerLightAccountAddressParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PredictMultiOwnerLightAccountAddressParams = object; +``` + +Defined in: [packages/smart-accounts/src/light-account/predictAddress.ts:110](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/predictAddress.ts#L110) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `factoryAddress?` + + `Address` +
+ `ownerAddresses` + + `Address`\[] +
+ `salt` + + `bigint` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/PredictMultiOwnerModularAccountV1AddressParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/PredictMultiOwnerModularAccountV1AddressParams.mdx new file mode 100644 index 0000000000..40adf3e149 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/PredictMultiOwnerModularAccountV1AddressParams.mdx @@ -0,0 +1,58 @@ +--- +title: PredictMultiOwnerModularAccountV1AddressParams +description: Overview of PredictMultiOwnerModularAccountV1AddressParams +slug: wallets/reference/smart-accounts/type-aliases/PredictMultiOwnerModularAccountV1AddressParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PredictMultiOwnerModularAccountV1AddressParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/predictAddress.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/predictAddress.ts#L18) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `factoryAddress?` + + `Address` +
+ `ownerAddresses` + + `Address`\[] +
+ `salt` + + `bigint` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccount7702StaticImpl.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccount7702StaticImpl.mdx new file mode 100644 index 0000000000..0545452887 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccount7702StaticImpl.mdx @@ -0,0 +1,21 @@ +--- +title: SemiModularAccount7702StaticImpl +description: Overview of SemiModularAccount7702StaticImpl +slug: wallets/reference/smart-accounts/type-aliases/SemiModularAccount7702StaticImpl +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SemiModularAccount7702StaticImpl = StaticSmartAccountImplementation< + true, + "0.7", + SemiModularAccountV2FactoryArgs, + typeof entryPoint07Abi, + typeof semiModularAccountBytecodeAbi, + typeof accountFactoryAbi +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts#L65) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccountV2FactoryArgs.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccountV2FactoryArgs.mdx new file mode 100644 index 0000000000..ea3644cce5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccountV2FactoryArgs.mdx @@ -0,0 +1,48 @@ +--- +title: SemiModularAccountV2FactoryArgs +description: Overview of SemiModularAccountV2FactoryArgs +slug: wallets/reference/smart-accounts/type-aliases/SemiModularAccountV2FactoryArgs +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SemiModularAccountV2FactoryArgs = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts#L10) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `owner` + + `Address` +
+ `salt` + + `bigint` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccountV2StaticImpl.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccountV2StaticImpl.mdx new file mode 100644 index 0000000000..a8083fdfa7 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/SemiModularAccountV2StaticImpl.mdx @@ -0,0 +1,21 @@ +--- +title: SemiModularAccountV2StaticImpl +description: Overview of SemiModularAccountV2StaticImpl +slug: wallets/reference/smart-accounts/type-aliases/SemiModularAccountV2StaticImpl +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SemiModularAccountV2StaticImpl = StaticSmartAccountImplementation< + false, + "0.7", + SemiModularAccountV2FactoryArgs, + typeof entryPoint07Abi, + typeof semiModularAccountBytecodeAbi, + typeof accountFactoryAbi +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts#L15) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/SignaturePrefix.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/SignaturePrefix.mdx new file mode 100644 index 0000000000..24494b9f1d --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/SignaturePrefix.mdx @@ -0,0 +1,14 @@ +--- +title: SignaturePrefix +description: Overview of SignaturePrefix +slug: wallets/reference/smart-accounts/type-aliases/SignaturePrefix +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignaturePrefix = (typeof SignaturePrefix)[keyof typeof SignaturePrefix]; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L3) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/SignatureRequest.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/SignatureRequest.mdx new file mode 100644 index 0000000000..50168b5913 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/SignatureRequest.mdx @@ -0,0 +1,22 @@ +--- +title: SignatureRequest +description: Overview of SignatureRequest +slug: wallets/reference/smart-accounts/type-aliases/SignatureRequest +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignatureRequest = + | { + data: SignableMessage; + type: "personal_sign"; + } + | { + data: TypedDataDefinition; + type: "eth_signTypedData_v4"; + }; +``` + +Defined in: [packages/smart-accounts/src/types.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/types.ts#L33) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/SignerEntity.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/SignerEntity.mdx new file mode 100644 index 0000000000..c879269404 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/SignerEntity.mdx @@ -0,0 +1,48 @@ +--- +title: SignerEntity +description: Overview of SignerEntity +slug: wallets/reference/smart-accounts/type-aliases/SignerEntity +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignerEntity = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:12](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L12) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `entityId` + + `number` +
+ `isGlobalValidation` + + `boolean` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/SmartAccountWithDecodeCalls.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/SmartAccountWithDecodeCalls.mdx new file mode 100644 index 0000000000..d3ff848c0a --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/SmartAccountWithDecodeCalls.mdx @@ -0,0 +1,60 @@ +--- +title: SmartAccountWithDecodeCalls +description: Helper type that converts a SmartAccount type to have a required `decodeCalls` function. This is useful for account implementations that always provide the `decodeCalls` functionality. +slug: wallets/reference/smart-accounts/type-aliases/SmartAccountWithDecodeCalls +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SmartAccountWithDecodeCalls = + SmartAccount & object; +``` + +Defined in: [packages/smart-accounts/src/types.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/types.ts#L27) + +Helper type that converts a SmartAccount type to have a required `decodeCalls` function. +This is useful for account implementations that always provide the `decodeCalls` functionality. + +## Type Declaration + + + + + + + + + + + + + + + + + +
NameType
+ `decodeCalls` + + `NonNullable`\<`SmartAccount`\<`TImplementation`>\[`"decodeCalls"`]> +
+ +## Type Parameters + + + + + + + + + + + + + +
Type Parameter
+ `TImplementation` *extends* `SmartAccountImplementation` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/StaticSmartAccountImplementation.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/StaticSmartAccountImplementation.mdx new file mode 100644 index 0000000000..e9146c020f --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/StaticSmartAccountImplementation.mdx @@ -0,0 +1,163 @@ +--- +title: StaticSmartAccountImplementation +description: Overview of StaticSmartAccountImplementation +slug: wallets/reference/smart-accounts/type-aliases/StaticSmartAccountImplementation +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type StaticSmartAccountImplementation< + eip7702, + entryPointVersion, + factoryArgs, + entryPointAbi, + accountAbi, + factoryAbi, +> = object & eip7702 extends false + ? object + : object & eip7702 extends true + ? object + : object; +``` + +Defined in: [packages/smart-accounts/src/types.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/types.ts#L43) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `accountAbi` + + `accountAbi` +
+ `entryPoint` + + `object` +
+ `entryPoint.abi` + + `entryPointAbi` +
+ `entryPoint.address` + + `Address` +
+ `entryPoint.version` + + `entryPointVersion` +
+ +## Type Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `eip7702` *extends* `boolean` + + `boolean` +
+ `entryPointVersion` *extends* `EntryPointVersion` + + `EntryPointVersion` +
+ `factoryArgs` *extends* `object` + + `object` +
+ `entryPointAbi` *extends* `Abi` | readonly `unknown`\[] + + `Abi` +
+ `accountAbi` *extends* `Abi` | readonly `unknown`\[] + + `Abi` +
+ `factoryAbi` *extends* `Abi` | readonly `unknown`\[] + + `Abi` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ToLightAccountParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ToLightAccountParams.mdx new file mode 100644 index 0000000000..d6e94e132c --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ToLightAccountParams.mdx @@ -0,0 +1,110 @@ +--- +title: ToLightAccountParams +description: Overview of ToLightAccountParams +slug: wallets/reference/smart-accounts/type-aliases/ToLightAccountParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ToLightAccountParams = object & + | { + factoryData?: never; + salt?: bigint; +} + | { + factoryData?: Hex; + salt?: never; +}; +``` + +Defined in: [packages/smart-accounts/src/light-account/accounts/account.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/accounts/account.ts#L42) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `accountAddress?` + + `Address` +
+ `client` + + `Client`\<`Transport`, `Chain`, `JsonRpcAccount` | `LocalAccount` | `undefined`> +
+ `factory?` + + `Address` +
+ `owner` + + `JsonRpcAccount` | `LocalAccount` +
+ `version?` + + `TLightAccountVersion` +
+ +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TLightAccountVersion` *extends* [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> + + [`LightAccountVersion`](LightAccountVersion)\<`"LightAccount"`> +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV1BaseParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV1BaseParams.mdx new file mode 100644 index 0000000000..4f44a94e01 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV1BaseParams.mdx @@ -0,0 +1,112 @@ +--- +title: ToModularAccountV1BaseParams +description: Overview of ToModularAccountV1BaseParams +slug: wallets/reference/smart-accounts/type-aliases/ToModularAccountV1BaseParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ToModularAccountV1BaseParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/accounts/base.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/accounts/base.ts#L51) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `accountAddress` + + `Address` +
+ `client` + + `Client`\<`TTransport`, `Chain`, `JsonRpcAccount` | `LocalAccount` | `undefined`> +
+ `get712Wrapper` + + (`msg`) => `Promise`\<`TypedDataDefinition`> +
+ `getFactoryArgs` + + () => `Promise`\<\{ `factory?`: `Address`; `factoryData?`: `Hex`; }> +
+ `owner` + + `JsonRpcAccount` | `LocalAccount` +
+ `type` + + `MaV1AccountType` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV2BaseParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV2BaseParams.mdx new file mode 100644 index 0000000000..2eb3d827d1 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV2BaseParams.mdx @@ -0,0 +1,122 @@ +--- +title: ToModularAccountV2BaseParams +description: Overview of ToModularAccountV2BaseParams +slug: wallets/reference/smart-accounts/type-aliases/ToModularAccountV2BaseParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ToModularAccountV2BaseParams = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/base.ts:98](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/base.ts#L98) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TTransport` *extends* `Transport` + + `Transport` +
+ +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `accountAddress` + + `Address` +
+ `authorization?` + + `ToSmartAccountParameters`\[`"authorization"`] +
+ `client` + + `Client`\<`TTransport`, `Chain`, `JsonRpcAccount` | `LocalAccount` | `undefined`> +
+ `deferredAction?` + + `Hex` +
+ `getFactoryArgs` + + () => `Promise`\<\{ `factory?`: `Address`; `factoryData?`: `Hex`; }> +
+ `owner` + + `JsonRpcAccount` | `LocalAccount` +
+ `signerEntity?` + + [`SignerEntity`](SignerEntity) +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV2Params.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV2Params.mdx new file mode 100644 index 0000000000..bb4726766e --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ToModularAccountV2Params.mdx @@ -0,0 +1,120 @@ +--- +title: ToModularAccountV2Params +description: Overview of ToModularAccountV2Params +slug: wallets/reference/smart-accounts/type-aliases/ToModularAccountV2Params +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ToModularAccountV2Params = object & TMode extends "7702" ? object : object & + | { + factoryData?: never; + salt?: bigint; +} + | { + factoryData?: Hex; + salt?: never; +}; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/account.ts:33](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/account.ts#L33) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `accountAddress?` + + `Address` +
+ `client` + + `Client`\<`Transport`, `Chain`, `JsonRpcAccount` | `LocalAccount` | `undefined`> +
+ `deferredAction?` + + `Hex` +
+ `mode?` + + `TMode` +
+ `owner` + + `JsonRpcAccount` | `LocalAccount` +
+ `signerEntity?` + + [`SignerEntity`](SignerEntity) +
+ +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TMode` *extends* `Mode` | `undefined` + + `Mode` | `undefined` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ToMultiOwnerLightAccountParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ToMultiOwnerLightAccountParams.mdx new file mode 100644 index 0000000000..08594bc67f --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ToMultiOwnerLightAccountParams.mdx @@ -0,0 +1,76 @@ +--- +title: ToMultiOwnerLightAccountParams +description: Overview of ToMultiOwnerLightAccountParams +slug: wallets/reference/smart-accounts/type-aliases/ToMultiOwnerLightAccountParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ToMultiOwnerLightAccountParams = object & + | { + factoryData?: never; + salt?: bigint; +} + | { + factoryData?: Hex; + salt?: never; +}; +``` + +Defined in: [packages/smart-accounts/src/light-account/accounts/multi-owner-account.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/accounts/multi-owner-account.ts#L36) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `accountAddress?` + + `Address` +
+ `client` + + `Client`\<`Transport`, `Chain`, `JsonRpcAccount` | `LocalAccount` | `undefined`> +
+ `factory?` + + `Address` +
+ `owners` + + \[`OneOf`\<`JsonRpcAccount` | `LocalAccount`>, `...{ address: Address }[]`] +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ToMultiOwnerModularAccountV1Params.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ToMultiOwnerModularAccountV1Params.mdx new file mode 100644 index 0000000000..6d320121ea --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ToMultiOwnerModularAccountV1Params.mdx @@ -0,0 +1,76 @@ +--- +title: ToMultiOwnerModularAccountV1Params +description: Overview of ToMultiOwnerModularAccountV1Params +slug: wallets/reference/smart-accounts/type-aliases/ToMultiOwnerModularAccountV1Params +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ToMultiOwnerModularAccountV1Params = object & + | { + factoryData?: never; + salt?: bigint; +} + | { + factoryData?: Hex; + salt?: never; +}; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/accounts/multi-owner-account.ts:37](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/accounts/multi-owner-account.ts#L37) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `accountAddress?` + + `Address` +
+ `client` + + `Client`\<`Transport`, `Chain`, `JsonRpcAccount` | `LocalAccount` | `undefined`> +
+ `factory?` + + `Address` +
+ `owners` + + \[`OneOf`\<`JsonRpcAccount` | `LocalAccount`>, `...{ address: Address }[]`] +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/UninstallValidationParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/UninstallValidationParams.mdx new file mode 100644 index 0000000000..c5e5344cc9 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/UninstallValidationParams.mdx @@ -0,0 +1,93 @@ +--- +title: UninstallValidationParams +description: Overview of UninstallValidationParams +slug: wallets/reference/smart-accounts/type-aliases/UninstallValidationParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type UninstallValidationParams = object & + GetAccountParameter; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/installValidation.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/installValidation.ts#L42) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `entityId` + + `number` +
+ `hookUninstallDatas` + + `Hex`\[] +
+ `moduleAddress` + + `Address` +
+ `uninstallData` + + `Hex` +
+ +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TAccount` *extends* `SmartAccount` | `undefined` + + `SmartAccount` | `undefined` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/UpgradeToData.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/UpgradeToData.mdx new file mode 100644 index 0000000000..d6d484b50c --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/UpgradeToData.mdx @@ -0,0 +1,48 @@ +--- +title: UpgradeToData +description: Overview of UpgradeToData +slug: wallets/reference/smart-accounts/type-aliases/UpgradeToData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type UpgradeToData = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:70](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L70) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `implAddress` + + `Address` +
+ `initializationData` + + `Hex` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ValidationConfig.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationConfig.mdx new file mode 100644 index 0000000000..21e4b63162 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationConfig.mdx @@ -0,0 +1,78 @@ +--- +title: ValidationConfig +description: Overview of ValidationConfig +slug: wallets/reference/smart-accounts/type-aliases/ValidationConfig +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ValidationConfig = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L36) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `entityId` + + `number` +
+ `isGlobal` + + `boolean` +
+ `isSignatureValidation` + + `boolean` +
+ `isUserOpValidation` + + `boolean` +
+ `moduleAddress` + + `Address` +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ValidationData.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationData.mdx new file mode 100644 index 0000000000..ce81c07278 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationData.mdx @@ -0,0 +1,88 @@ +--- +title: ValidationData +description: Overview of ValidationData +slug: wallets/reference/smart-accounts/type-aliases/ValidationData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ValidationData = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:61](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L61) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `executionHooks` + + `Hex`\[] +
+ `isGlobal` + + `boolean` +
+ `isSignatureValidation` + + `boolean` +
+ `isUserOpValidation` + + `boolean` +
+ `selectors` + + `Hex`\[] +
+ `validationHooks` + + [`HookConfig`](HookConfig)\[] +
diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ValidationDataParams.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationDataParams.mdx new file mode 100644 index 0000000000..cfdc9f9ec0 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationDataParams.mdx @@ -0,0 +1,22 @@ +--- +title: ValidationDataParams +description: Overview of ValidationDataParams +slug: wallets/reference/smart-accounts/type-aliases/ValidationDataParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ValidationDataParams = + | { + entityId?: never; + validationModuleAddress: Address; + } + | { + entityId: number; + validationModuleAddress?: never; + }; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/accounts/base.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/accounts/base.ts#L68) diff --git a/docs/pages/reference/smart-accounts/src/type-aliases/ValidationDataView.mdx b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationDataView.mdx new file mode 100644 index 0000000000..29a8ec9f9b --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/type-aliases/ValidationDataView.mdx @@ -0,0 +1,68 @@ +--- +title: ValidationDataView +description: Overview of ValidationDataView +slug: wallets/reference/smart-accounts/type-aliases/ValidationDataView +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ValidationDataView = object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L24) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `executionHooks` + + readonly `Hex`\[] +
+ `selectors` + + readonly `Hex`\[] +
+ `validationFlags` + + `number` +
+ `validationHooks` + + readonly `Hex`\[] +
diff --git a/docs/pages/reference/smart-accounts/src/variables/AccountVersionRegistry.mdx b/docs/pages/reference/smart-accounts/src/variables/AccountVersionRegistry.mdx new file mode 100644 index 0000000000..6c120a7a1c --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/AccountVersionRegistry.mdx @@ -0,0 +1,3369 @@ +--- +title: AccountVersionRegistry +description: Account version registry interface that defines the light account versions and the version definition for each light account type +slug: wallets/reference/smart-accounts/variables/AccountVersionRegistry +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const AccountVersionRegistry: object; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L19) + +Account version registry interface that defines the light account versions +and the version definition for each light account type + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `LightAccount` + + `object` + + ‐ +
+ `LightAccount.v1.0.1` + + `LightAccountV1StaticImpl` + + `lightAccountStaticImplV1_0_1` +
+ `LightAccount.v1.0.2` + + `LightAccountV1StaticImpl` + + `lightAccountStaticImplV1_0_2` +
+ `LightAccount.v1.1.0` + + `LightAccountV1StaticImpl` + + `lightAccountStaticImplV1_1_0` +
+ `LightAccount.v2.0.0` + + [`StaticSmartAccountImplementation`](../type-aliases/StaticSmartAccountImplementation)\<`false`, `"0.7"`, `LightAccountFactoryArgs`, readonly \[\{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint_"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"addDeposit"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"eip712Domain"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes1"`; + `name`: `"fields"`; + `type`: `"bytes1"`; + }, \{ + `internalType`: `"string"`; + `name`: `"name"`; + `type`: `"string"`; + }, \{ + `internalType`: `"string"`; + `name`: `"version"`; + `type`: `"string"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"chainId"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"address"`; + `name`: `"verifyingContract"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"salt"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"extensions"`; + `type`: `"uint256[]"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"entryPoint"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"dest"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"value"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"func"`; + `type`: `"bytes"`; + }]; + `name`: `"execute"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"value"`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getDeposit"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getNonce"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner_"`; + `type`: `"address"`; + }]; + `name`: `"initialize"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"hash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `name`: `"isValidSignature"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"result"`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155BatchReceived"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC721Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"proxiableUUID"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"transferOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newImplementation"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"upgradeToAndCall"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"userOpHash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"missingAccountFunds"`; + `type`: `"uint256"`; + }]; + `name`: `"validateUserOp"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"validationData"`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"withdrawAddress"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdrawDepositTo"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `false`; + `internalType`: `"uint64"`; + `name`: `"version"`; + `type`: `"uint64"`; + }]; + `name`: `"Initialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"LightAccountInitialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferred"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"implementation"`; + `type`: `"address"`; + }]; + `name`: `"Upgraded"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ArrayLengthMismatch"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ECDSAInvalidSignature"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"length"`; + `type`: `"uint256"`; + }]; + `name`: `"ECDSAInvalidSignatureLength"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"s"`; + `type`: `"bytes32"`; + }]; + `name`: `"ECDSAInvalidSignatureS"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidInitialization"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"InvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidSignatureType"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"caller"`; + `type`: `"address"`; + }]; + `name`: `"NotAuthorized"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotInitializing"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnauthorizedCallContext"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UpgradeFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ACCOUNT_IMPLEMENTATION"`; + `outputs`: readonly \[\{ + `internalType`: `"contract LightAccount"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ENTRY_POINT"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"acceptOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"unstakeDelay"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"addStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"createAccount"`; + `outputs`: readonly \[\{ + `internalType`: `"contract LightAccount"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"getAddress"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"pendingOwner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"renounceOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"transferOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"unlockStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdraw"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }]; + `name`: `"withdrawStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferStarted"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferred"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }]; + `name`: `"AddressEmptyCode"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"AddressInsufficientBalance"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"FailedInnerCall"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidAction"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `name`: `"InvalidEntryPoint"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"OwnableInvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"OwnableUnauthorizedAccount"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }]; + `name`: `"SafeERC20FailedOperation"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"TransferFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }]> + + `lightAccountStaticImplV2_0_0` +
+ `LightAccount.v2.1.0` + + [`StaticSmartAccountImplementation`](../type-aliases/StaticSmartAccountImplementation)\<`false`, `"0.8"`, `LightAccountFactoryArgs`, readonly \[\{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint_"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"addDeposit"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"eip712Domain"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes1"`; + `name`: `"fields"`; + `type`: `"bytes1"`; + }, \{ + `internalType`: `"string"`; + `name`: `"name"`; + `type`: `"string"`; + }, \{ + `internalType`: `"string"`; + `name`: `"version"`; + `type`: `"string"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"chainId"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"address"`; + `name`: `"verifyingContract"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"salt"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"extensions"`; + `type`: `"uint256[]"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"entryPoint"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"dest"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"value"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"func"`; + `type`: `"bytes"`; + }]; + `name`: `"execute"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"value"`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getDeposit"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getNonce"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner_"`; + `type`: `"address"`; + }]; + `name`: `"initialize"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"hash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `name`: `"isValidSignature"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"result"`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155BatchReceived"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC721Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"proxiableUUID"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"transferOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newImplementation"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"upgradeToAndCall"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"userOpHash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"missingAccountFunds"`; + `type`: `"uint256"`; + }]; + `name`: `"validateUserOp"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"validationData"`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"withdrawAddress"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdrawDepositTo"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `false`; + `internalType`: `"uint64"`; + `name`: `"version"`; + `type`: `"uint64"`; + }]; + `name`: `"Initialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"LightAccountInitialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferred"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"implementation"`; + `type`: `"address"`; + }]; + `name`: `"Upgraded"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ArrayLengthMismatch"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ECDSAInvalidSignature"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"length"`; + `type`: `"uint256"`; + }]; + `name`: `"ECDSAInvalidSignatureLength"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"s"`; + `type`: `"bytes32"`; + }]; + `name`: `"ECDSAInvalidSignatureS"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidInitialization"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"InvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidSignatureType"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"caller"`; + `type`: `"address"`; + }]; + `name`: `"NotAuthorized"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotInitializing"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnauthorizedCallContext"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UpgradeFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ACCOUNT_IMPLEMENTATION"`; + `outputs`: readonly \[\{ + `internalType`: `"contract LightAccount"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ENTRY_POINT"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"acceptOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"unstakeDelay"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"addStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"createAccount"`; + `outputs`: readonly \[\{ + `internalType`: `"contract LightAccount"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"getAddress"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"pendingOwner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"renounceOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"transferOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"unlockStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdraw"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }]; + `name`: `"withdrawStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferStarted"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferred"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }]; + `name`: `"AddressEmptyCode"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"AddressInsufficientBalance"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"FailedInnerCall"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidAction"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `name`: `"InvalidEntryPoint"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"OwnableInvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"OwnableUnauthorizedAccount"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }]; + `name`: `"SafeERC20FailedOperation"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"TransferFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }]> + + `lightAccountStaticImplV2_1_0` +
+ `LightAccount.v2.2.0` + + [`StaticSmartAccountImplementation`](../type-aliases/StaticSmartAccountImplementation)\<`false`, `"0.9"`, `LightAccountFactoryArgs`, readonly \[\{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint_"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"addDeposit"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"eip712Domain"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes1"`; + `name`: `"fields"`; + `type`: `"bytes1"`; + }, \{ + `internalType`: `"string"`; + `name`: `"name"`; + `type`: `"string"`; + }, \{ + `internalType`: `"string"`; + `name`: `"version"`; + `type`: `"string"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"chainId"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"address"`; + `name`: `"verifyingContract"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"salt"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"extensions"`; + `type`: `"uint256[]"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"entryPoint"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"dest"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"value"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"func"`; + `type`: `"bytes"`; + }]; + `name`: `"execute"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"value"`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getDeposit"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getNonce"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner_"`; + `type`: `"address"`; + }]; + `name`: `"initialize"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"hash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `name`: `"isValidSignature"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"result"`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155BatchReceived"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC721Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"proxiableUUID"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"transferOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newImplementation"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"upgradeToAndCall"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"userOpHash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"missingAccountFunds"`; + `type`: `"uint256"`; + }]; + `name`: `"validateUserOp"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"validationData"`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"withdrawAddress"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdrawDepositTo"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `false`; + `internalType`: `"uint64"`; + `name`: `"version"`; + `type`: `"uint64"`; + }]; + `name`: `"Initialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"LightAccountInitialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferred"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"implementation"`; + `type`: `"address"`; + }]; + `name`: `"Upgraded"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ArrayLengthMismatch"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ECDSAInvalidSignature"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"length"`; + `type`: `"uint256"`; + }]; + `name`: `"ECDSAInvalidSignatureLength"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"s"`; + `type`: `"bytes32"`; + }]; + `name`: `"ECDSAInvalidSignatureS"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidInitialization"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"InvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidSignatureType"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"caller"`; + `type`: `"address"`; + }]; + `name`: `"NotAuthorized"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotInitializing"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnauthorizedCallContext"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UpgradeFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ACCOUNT_IMPLEMENTATION"`; + `outputs`: readonly \[\{ + `internalType`: `"contract LightAccount"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ENTRY_POINT"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"acceptOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"unstakeDelay"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"addStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"createAccount"`; + `outputs`: readonly \[\{ + `internalType`: `"contract LightAccount"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"getAddress"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"pendingOwner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"renounceOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"transferOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"unlockStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdraw"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }]; + `name`: `"withdrawStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferStarted"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferred"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }]; + `name`: `"AddressEmptyCode"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"AddressInsufficientBalance"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"FailedInnerCall"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidAction"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `name`: `"InvalidEntryPoint"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"OwnableInvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"OwnableUnauthorizedAccount"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }]; + `name`: `"SafeERC20FailedOperation"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"TransferFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }]> + + `lightAccountStaticImplV2_2_0` +
+ `MultiOwnerLightAccount` + + `object` + + ‐ +
+ `MultiOwnerLightAccount.v2.0.0` + + [`StaticSmartAccountImplementation`](../type-aliases/StaticSmartAccountImplementation)\<`false`, `"0.7"`, `MultiOwnerLightAccountFactoryArgs`, readonly \[\{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }, \{ + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint_"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"addDeposit"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"eip712Domain"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes1"`; + `name`: `"fields"`; + `type`: `"bytes1"`; + }, \{ + `internalType`: `"string"`; + `name`: `"name"`; + `type`: `"string"`; + }, \{ + `internalType`: `"string"`; + `name`: `"version"`; + `type`: `"string"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"chainId"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"address"`; + `name`: `"verifyingContract"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"salt"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"extensions"`; + `type`: `"uint256[]"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"entryPoint"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"dest"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"value"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"func"`; + `type`: `"bytes"`; + }]; + `name`: `"execute"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"dest"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `"value"`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes[]"`; + `name`: `"func"`; + `type`: `"bytes[]"`; + }]; + `name`: `"executeBatch"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getDeposit"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"getNonce"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"owners_"`; + `type`: `"address[]"`; + }]; + `name`: `"initialize"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"hash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `name`: `"isValidSignature"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"result"`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"uint256[]"`; + `name`: `""`; + `type`: `"uint256[]"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155BatchReceived"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC1155Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"onERC721Received"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owners"`; + `outputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `""`; + `type`: `"address[]"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"proxiableUUID"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"ownersToAdd"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"address[]"`; + `name`: `"ownersToRemove"`; + `type`: `"address[]"`; + }]; + `name`: `"updateOwners"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newImplementation"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"upgradeToAndCall"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"userOpHash"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"missingAccountFunds"`; + `type`: `"uint256"`; + }]; + `name`: `"validateUserOp"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"validationData"`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"withdrawAddress"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdrawDepositTo"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `false`; + `internalType`: `"uint64"`; + `name`: `"version"`; + `type`: `"uint64"`; + }]; + `name`: `"Initialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }, \{ + `indexed`: `false`; + `internalType`: `"address[]"`; + `name`: `"owners"`; + `type`: `"address[]"`; + }]; + `name`: `"LightAccountInitialized"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `false`; + `internalType`: `"address[]"`; + `name`: `"addedOwners"`; + `type`: `"address[]"`; + }, \{ + `indexed`: `false`; + `internalType`: `"address[]"`; + `name`: `"removedOwners"`; + `type`: `"address[]"`; + }]; + `name`: `"OwnersUpdated"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"implementation"`; + `type`: `"address"`; + }]; + `name`: `"Upgraded"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ArrayLengthMismatch"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ECDSAInvalidSignature"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"length"`; + `type`: `"uint256"`; + }]; + `name`: `"ECDSAInvalidSignatureLength"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes32"`; + `name`: `"s"`; + `type`: `"bytes32"`; + }]; + `name`: `"ECDSAInvalidSignatureS"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"EmptyOwnersNotAllowed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidInitialization"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"InvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidSignatureType"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"caller"`; + `type`: `"address"`; + }]; + `name`: `"NotAuthorized"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotInitializing"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"OwnerDoesNotExist"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnauthorizedCallContext"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UpgradeFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }], readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"contract IEntryPoint"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"constructor"`; + }, \{ + `stateMutability`: `"payable"`; + `type`: `"receive"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ACCOUNT_IMPLEMENTATION"`; + `outputs`: readonly \[\{ + `internalType`: `"contract MultiOwnerLightAccount"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ENTRY_POINT"`; + `outputs`: readonly \[\{ + `internalType`: `"contract IEntryPoint"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"acceptOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"unstakeDelay"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"addStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"payable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"owners"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"createAccount"`; + `outputs`: readonly \[\{ + `internalType`: `"contract MultiOwnerLightAccount"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"createAccountSingle"`; + `outputs`: readonly \[\{ + `internalType`: `"contract MultiOwnerLightAccount"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address[]"`; + `name`: `"owners"`; + `type`: `"address[]"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"salt"`; + `type`: `"uint256"`; + }]; + `name`: `"getAddress"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"owner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"pendingOwner"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"renounceOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"transferOwnership"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"unlockStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"amount"`; + `type`: `"uint256"`; + }]; + `name`: `"withdraw"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address payable"`; + `name`: `"to"`; + `type`: `"address"`; + }]; + `name`: `"withdrawStake"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferStarted"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"previousOwner"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"newOwner"`; + `type`: `"address"`; + }]; + `name`: `"OwnershipTransferred"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }]; + `name`: `"AddressEmptyCode"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"AddressInsufficientBalance"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"FailedInnerCall"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidAction"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"entryPoint"`; + `type`: `"address"`; + }]; + `name`: `"InvalidEntryPoint"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidOwners"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"owner"`; + `type`: `"address"`; + }]; + `name`: `"OwnableInvalidOwner"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"OwnableUnauthorizedAccount"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"OwnersArrayEmpty"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"OwnersLimitExceeded"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }]; + `name`: `"SafeERC20FailedOperation"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"TransferFailed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ZeroAddressNotAllowed"`; + `type`: `"error"`; + }]> + + `multiOwnerLightAccountStaticImplV2_0_0` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/AllowlistModule.mdx b/docs/pages/reference/smart-accounts/src/variables/AllowlistModule.mdx new file mode 100644 index 0000000000..d5b75f8862 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/AllowlistModule.mdx @@ -0,0 +1,640 @@ +--- +title: AllowlistModule +description: Overview of AllowlistModule +slug: wallets/reference/smart-accounts/variables/AllowlistModule +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const AllowlistModule: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/modules/allowlist-module/module.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/modules/allowlist-module/module.ts#L5) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `abi` + + readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"addressAllowlist"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasSelectorAllowlist"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasERC20SpendLimit"`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }]; + `name`: `"checkAllowlistCalldata"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasSelectorAllowlist"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasERC20SpendLimit"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"erc20SpendLimit"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes4[]"`; + `name`: `"selectors"`; + `type`: `"bytes4[]"`; + }]; + `internalType`: `"struct AllowlistModule.AllowlistInput[]"`; + `name`: `"inputs"`; + `type`: `"tuple[]"`; + }]; + `name`: `"deleteAllowlist"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"erc20SpendLimits"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"moduleId"`; + `outputs`: readonly \[\{ + `internalType`: `"string"`; + `name`: `""`; + `type`: `"string"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onInstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onUninstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"postExecutionHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"preExecutionHook"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preRuntimeValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preSignatureValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `name`: `"preUserOpValidationHook"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"bytes4"`; + `name`: `"selector"`; + `type`: `"bytes4"`; + }, \{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"selectorAllowlist"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasSelectorAllowlist"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasERC20SpendLimit"`; + `type`: `"bool"`; + }]; + `name`: `"setAddressAllowlist"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes4"`; + `name`: `"selector"`; + `type`: `"bytes4"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }]; + `name`: `"setSelectorAllowlist"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasSelectorAllowlist"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasERC20SpendLimit"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"erc20SpendLimit"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes4[]"`; + `name`: `"selectors"`; + `type`: `"bytes4[]"`; + }]; + `internalType`: `"struct AllowlistModule.AllowlistInput[]"`; + `name`: `"inputs"`; + `type`: `"tuple[]"`; + }]; + `name`: `"updateAllowlist"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasERC20SpendLimit"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"newLimit"`; + `type`: `"uint256"`; + }]; + `name`: `"updateLimits"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"target"`; + `type`: `"address"`; + }, \{ + `components`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasSelectorAllowlist"`; + `type`: `"bool"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"hasERC20SpendLimit"`; + `type`: `"bool"`; + }]; + `indexed`: `false`; + `internalType`: `"struct AllowlistModule.AddressAllowlistEntry"`; + `name`: `"entry"`; + `type`: `"tuple"`; + }]; + `name`: `"AddressAllowlistUpdated"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"token"`; + `type`: `"address"`; + }, \{ + `indexed`: `false`; + `internalType`: `"uint256"`; + `name`: `"newLimit"`; + `type`: `"uint256"`; + }]; + `name`: `"ERC20SpendLimitUpdated"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"bytes24"`; + `name`: `"targetAndSelector"`; + `type`: `"bytes24"`; + }, \{ + `indexed`: `false`; + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }]; + `name`: `"SelectorAllowlistUpdated"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"AddressNotAllowed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }]; + `name`: `"ERC20NotAllowed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ExceededTokenLimit"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidCalldataLength"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NoSelectorSpecified"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotImplemented"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"SelectorNotAllowed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `""`; + `type`: `"bytes4"`; + }]; + `name`: `"SpendingRequestNotAllowed"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnexpectedDataPassed"`; + `type`: `"error"`; + }] + + `allowlistModuleAbi` +
+ `buildHook()` + + (`installArgs`, `address`) => `object` + + ‐ +
+ `encodeOnInstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
+ `encodeOnUninstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
diff --git a/docs/pages/reference/smart-accounts/src/variables/DEFAULT_OWNER_ENTITY_ID.mdx b/docs/pages/reference/smart-accounts/src/variables/DEFAULT_OWNER_ENTITY_ID.mdx new file mode 100644 index 0000000000..734cd606b5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/DEFAULT_OWNER_ENTITY_ID.mdx @@ -0,0 +1,16 @@ +--- +title: DEFAULT_OWNER_ENTITY_ID +description: The default owner entity ID. +slug: wallets/reference/smart-accounts/variables/DEFAULT_OWNER_ENTITY_ID +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const DEFAULT_OWNER_ENTITY_ID: 0 = 0; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L38) + +The default owner entity ID. diff --git a/docs/pages/reference/smart-accounts/src/variables/DefaultAddress.mdx b/docs/pages/reference/smart-accounts/src/variables/DefaultAddress.mdx new file mode 100644 index 0000000000..3e4c4c4dc7 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/DefaultAddress.mdx @@ -0,0 +1,87 @@ +--- +title: DefaultAddress +description: A mapping of default addresses for the ModularAccountV2. +slug: wallets/reference/smart-accounts/variables/DefaultAddress +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const DefaultAddress: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L17) + +A mapping of default addresses for the ModularAccountV2. + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `MAV2_FACTORY` + + `"0x00000000000017c61b5bEe81050EC8eFc9c6fecd"` + + `"0x00000000000017c61b5bEe81050EC8eFc9c6fecd"` +
+ `SMAV2_7702` + + `"0x69007702764179f14F51cdce752f4f775d74E139"` + + `"0x69007702764179f14F51cdce752f4f775d74E139"` +
+ `SMAV2_BYTECODE` + + `"0x000000000000c5A9089039570Dd36455b5C07383"` + + `"0x000000000000c5A9089039570Dd36455b5C07383"` +
+ `SMAV2_STORAGE` + + `"0x0000000000006E2f9d80CaEc0Da6500f005EB25A"` + + `"0x0000000000006E2f9d80CaEc0Da6500f005EB25A"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/DefaultMaV1Address.mdx b/docs/pages/reference/smart-accounts/src/variables/DefaultMaV1Address.mdx new file mode 100644 index 0000000000..ecc81d6f5c --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/DefaultMaV1Address.mdx @@ -0,0 +1,73 @@ +--- +title: DefaultMaV1Address +description: A mapping of default addresses for the ModularAccountV1. +slug: wallets/reference/smart-accounts/variables/DefaultMaV1Address +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const DefaultMaV1Address: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/account.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/account.ts#L6) + +A mapping of default addresses for the ModularAccountV1. + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `IMPLEMENTATION_ADDRESS` + + `"0x0046000000000151008789797b54fdb500e2a61e"` + + `"0x0046000000000151008789797b54fdb500e2a61e"` +
+ `MULTI_OWNER_MAV1_FACTORY` + + `"0x000000e92D78D90000007F0082006FDA09BD5f11"` + + `"0x000000e92D78D90000007F0082006FDA09BD5f11"` +
+ `MULTI_SIG_MAV1_FACTORY` + + `"0x000000000000204327E6669f00901a57CE15aE15"` + + `"0x000000000000204327E6669f00901a57CE15aE15"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/DefaultMaV1PluginAddress.mdx b/docs/pages/reference/smart-accounts/src/variables/DefaultMaV1PluginAddress.mdx new file mode 100644 index 0000000000..e876c8a74d --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/DefaultMaV1PluginAddress.mdx @@ -0,0 +1,73 @@ +--- +title: DefaultMaV1PluginAddress +description: A mapping of default addresses for the ModularAccountV1 plugins. +slug: wallets/reference/smart-accounts/variables/DefaultMaV1PluginAddress +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const DefaultMaV1PluginAddress: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/account.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/account.ts#L15) + +A mapping of default addresses for the ModularAccountV1 plugins. + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `MULTI_OWNER` + + `"0xcE0000007B008F50d762D155002600004cD6c647"` + + `"0xcE0000007B008F50d762D155002600004cD6c647"` +
+ `MULTI_SIG` + + `"0x000000000000A53f64b7bcf4Cd59624943C43Fc7"` + + `"0x000000000000A53f64b7bcf4Cd59624943C43Fc7"` +
+ `SESSION_KEY` + + `"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d"` + + `"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/DefaultModuleAddress.mdx b/docs/pages/reference/smart-accounts/src/variables/DefaultModuleAddress.mdx new file mode 100644 index 0000000000..6ff43aa2d7 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/DefaultModuleAddress.mdx @@ -0,0 +1,101 @@ +--- +title: DefaultModuleAddress +description: A mapping of default addresses for the ModularAccountV2 modules. +slug: wallets/reference/smart-accounts/variables/DefaultModuleAddress +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const DefaultModuleAddress: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:27](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L27) + +A mapping of default addresses for the ModularAccountV2 modules. + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `ALLOWLIST` + + `"0x00000000003e826473a313e600b5b9b791f5a59a"` + + `"0x00000000003e826473a313e600b5b9b791f5a59a"` +
+ `NATIVE_TOKEN_LIMIT` + + `"0x00000000000001e541f0D090868FBe24b59Fbe06"` + + `"0x00000000000001e541f0D090868FBe24b59Fbe06"` +
+ `PAYMASTER_GUARD` + + `"0x0000000000001aA7A7F7E29abe0be06c72FD42A1"` + + `"0x0000000000001aA7A7F7E29abe0be06c72FD42A1"` +
+ `SINGLE_SIGNER_VALIDATION` + + `"0x00000000000099DE0BF6fA90dEB851E2A2df7d83"` + + `"0x00000000000099DE0BF6fA90dEB851E2A2df7d83"` +
+ `TIME_RANGE` + + `"0x00000000000082B8e2012be914dFA4f62A0573eA"` + + `"0x00000000000082B8e2012be914dFA4f62A0573eA"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/ENTITY_ID_AND_NONCE_READER_BYTECODE.mdx b/docs/pages/reference/smart-accounts/src/variables/ENTITY_ID_AND_NONCE_READER_BYTECODE.mdx new file mode 100644 index 0000000000..b8aa77f9ab --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/ENTITY_ID_AND_NONCE_READER_BYTECODE.mdx @@ -0,0 +1,15 @@ +--- +title: ENTITY_ID_AND_NONCE_READER_BYTECODE +description: Overview of ENTITY_ID_AND_NONCE_READER_BYTECODE +slug: wallets/reference/smart-accounts/variables/ENTITY_ID_AND_NONCE_READER_BYTECODE +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const ENTITY_ID_AND_NONCE_READER_BYTECODE: "0x608060405234801561001057600080fd5b506040516104f13803806104f183398101604081905261002f916101e5565b60006008826001600160c01b0316901c90506000808263ffffffff1611610057576001610059565b815b90506001600160a01b0385163b15610133575b60006001600160a01b03861663d31b575b6bffffffff0000000000000000604085901b166040516001600160e01b031960e084901b1681526001600160401b03199091166004820152602401600060405180830381865afa1580156100d5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526100fd91908101906103c6565b805190915060ff161580156101155750606081015151155b156101205750610133565b8161012a816104a4565b9250505061006c565b604051631aab3f0d60e11b81526001600160a01b03868116600483015264ffffffff01600160c01b038516600884901b64ffffffff0016176024830152600091908616906335567e1a90604401602060405180830381865afa15801561019d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c191906104d7565b90508060005260206000f35b6001600160a01b03811681146101e257600080fd5b50565b6000806000606084860312156101fa57600080fd5b8351610205816101cd565b6020850151909350610216816101cd565b60408501519092506001600160c01b038116811461023357600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156102765761027661023e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156102a4576102a461023e565b604052919050565b60006001600160401b038211156102c5576102c561023e565b5060051b60200190565b600082601f8301126102e057600080fd5b81516102f36102ee826102ac565b61027c565b8082825260208201915060208360051b86010192508583111561031557600080fd5b602085015b8381101561034857805166ffffffffffffff198116811461033a57600080fd5b83526020928301920161031a565b5095945050505050565b600082601f83011261036357600080fd5b81516103716102ee826102ac565b8082825260208201915060208360051b86010192508583111561039357600080fd5b602085015b838110156103485780516001600160e01b0319811681146103b857600080fd5b835260209283019201610398565b6000602082840312156103d857600080fd5b81516001600160401b038111156103ee57600080fd5b82016080818503121561040057600080fd5b610408610254565b815160ff8116811461041957600080fd5b815260208201516001600160401b0381111561043457600080fd5b610440868285016102cf565b60208301525060408201516001600160401b0381111561045f57600080fd5b61046b868285016102cf565b60408301525060608201516001600160401b0381111561048a57600080fd5b61049686828501610352565b606083015250949350505050565b600063ffffffff821663ffffffff81036104ce57634e487b7160e01b600052601160045260246000fd5b60010192915050565b6000602082840312156104e957600080fd5b505191905056fe" = + "0x608060405234801561001057600080fd5b506040516104f13803806104f183398101604081905261002f916101e5565b60006008826001600160c01b0316901c90506000808263ffffffff1611610057576001610059565b815b90506001600160a01b0385163b15610133575b60006001600160a01b03861663d31b575b6bffffffff0000000000000000604085901b166040516001600160e01b031960e084901b1681526001600160401b03199091166004820152602401600060405180830381865afa1580156100d5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526100fd91908101906103c6565b805190915060ff161580156101155750606081015151155b156101205750610133565b8161012a816104a4565b9250505061006c565b604051631aab3f0d60e11b81526001600160a01b03868116600483015264ffffffff01600160c01b038516600884901b64ffffffff0016176024830152600091908616906335567e1a90604401602060405180830381865afa15801561019d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c191906104d7565b90508060005260206000f35b6001600160a01b03811681146101e257600080fd5b50565b6000806000606084860312156101fa57600080fd5b8351610205816101cd565b6020850151909350610216816101cd565b60408501519092506001600160c01b038116811461023357600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156102765761027661023e565b60405290565b604051601f8201601f191681016001600160401b03811182821017156102a4576102a461023e565b604052919050565b60006001600160401b038211156102c5576102c561023e565b5060051b60200190565b600082601f8301126102e057600080fd5b81516102f36102ee826102ac565b61027c565b8082825260208201915060208360051b86010192508583111561031557600080fd5b602085015b8381101561034857805166ffffffffffffff198116811461033a57600080fd5b83526020928301920161031a565b5095945050505050565b600082601f83011261036357600080fd5b81516103716102ee826102ac565b8082825260208201915060208360051b86010192508583111561039357600080fd5b602085015b838110156103485780516001600160e01b0319811681146103b857600080fd5b835260209283019201610398565b6000602082840312156103d857600080fd5b81516001600160401b038111156103ee57600080fd5b82016080818503121561040057600080fd5b610408610254565b815160ff8116811461041957600080fd5b815260208201516001600160401b0381111561043457600080fd5b610440868285016102cf565b60208301525060408201516001600160401b0381111561045f57600080fd5b61046b868285016102cf565b60408301525060608201516001600160401b0381111561048a57600080fd5b61049686828501610352565b606083015250949350505050565b600063ffffffff821663ffffffff81036104ce57634e487b7160e01b600052601160045260246000fd5b60010192915050565b6000602082840312156104e957600080fd5b505191905056fe"; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/decorators/deferralActions.ts#L24) diff --git a/docs/pages/reference/smart-accounts/src/variables/EXECUTE_USER_OP_SELECTOR.mdx b/docs/pages/reference/smart-accounts/src/variables/EXECUTE_USER_OP_SELECTOR.mdx new file mode 100644 index 0000000000..d7009e4d85 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/EXECUTE_USER_OP_SELECTOR.mdx @@ -0,0 +1,16 @@ +--- +title: EXECUTE_USER_OP_SELECTOR +description: The selector for the execute user operation function. +slug: wallets/reference/smart-accounts/variables/EXECUTE_USER_OP_SELECTOR +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const EXECUTE_USER_OP_SELECTOR: Hex = "0x8DD7712F"; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/utils/account.ts:43](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/utils/account.ts#L43) + +The selector for the execute user operation function. diff --git a/docs/pages/reference/smart-accounts/src/variables/HookIdentifier.mdx b/docs/pages/reference/smart-accounts/src/variables/HookIdentifier.mdx new file mode 100644 index 0000000000..244d102d52 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/HookIdentifier.mdx @@ -0,0 +1,87 @@ +--- +title: HookIdentifier +description: A pseudo-enum for hook identifiers. +slug: wallets/reference/smart-accounts/variables/HookIdentifier +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const HookIdentifier: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L73) + +A pseudo-enum for hook identifiers. + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `ERC20_TOKEN_TRANSFER` + + `"erc20-token-transfer"` + + `"erc20-token-transfer"` +
+ `GAS_LIMIT` + + `"gas-limit"` + + `"gas-limit"` +
+ `NATIVE_TOKEN_TRANSFER` + + `"native-token-transfer"` + + `"native-token-transfer"` +
+ `PREVAL_ALLOWLIST` + + `"preval-allowlist"` + + `"preval-allowlist"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/HookType.mdx b/docs/pages/reference/smart-accounts/src/variables/HookType.mdx new file mode 100644 index 0000000000..b02c777a0b --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/HookType.mdx @@ -0,0 +1,57 @@ +--- +title: HookType +description: Overview of HookType +slug: wallets/reference/smart-accounts/variables/HookType +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const HookType: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L44) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `EXECUTION` + + `"0x00"` + + `"0x00"` +
+ `VALIDATION` + + `"0x01"` + + `"0x01"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/LightAccountUnsupported1271Factories.mdx b/docs/pages/reference/smart-accounts/src/variables/LightAccountUnsupported1271Factories.mdx new file mode 100644 index 0000000000..f129ef52c6 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/LightAccountUnsupported1271Factories.mdx @@ -0,0 +1,19 @@ +--- +title: LightAccountUnsupported1271Factories +description: Can be used to check if the account with one of the following factory addresses to not support 1271 signing. Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. +slug: wallets/reference/smart-accounts/variables/LightAccountUnsupported1271Factories +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const LightAccountUnsupported1271Factories: Set<`0x${string}`>; +``` + +Defined in: [packages/smart-accounts/src/light-account/utils.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/utils.ts#L42) + +Can be used to check if the account with one of the following factory addresses +to not support 1271 signing. + +Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. diff --git a/docs/pages/reference/smart-accounts/src/variables/LightAccountUnsupported1271Impls.mdx b/docs/pages/reference/smart-accounts/src/variables/LightAccountUnsupported1271Impls.mdx new file mode 100644 index 0000000000..5e2dbb5cf2 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/LightAccountUnsupported1271Impls.mdx @@ -0,0 +1,19 @@ +--- +title: LightAccountUnsupported1271Impls +description: Can be used to check if the account with one of the following implementation addresses to not support 1271 signing. Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. +slug: wallets/reference/smart-accounts/variables/LightAccountUnsupported1271Impls +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const LightAccountUnsupported1271Impls: LightAccountV1StaticImpl[]; +``` + +Defined in: [packages/smart-accounts/src/light-account/utils.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/utils.ts#L31) + +Can be used to check if the account with one of the following implementation addresses +to not support 1271 signing. + +Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing. diff --git a/docs/pages/reference/smart-accounts/src/variables/LightAccountV1Versions.mdx b/docs/pages/reference/smart-accounts/src/variables/LightAccountV1Versions.mdx new file mode 100644 index 0000000000..de914e297e --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/LightAccountV1Versions.mdx @@ -0,0 +1,16 @@ +--- +title: LightAccountV1Versions +description: Light Account v1 versions +slug: wallets/reference/smart-accounts/variables/LightAccountV1Versions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const LightAccountV1Versions: ["v1.0.1", "v1.0.2", "v1.1.0"]; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L44) + +Light Account v1 versions diff --git a/docs/pages/reference/smart-accounts/src/variables/LightAccountV2Versions.mdx b/docs/pages/reference/smart-accounts/src/variables/LightAccountV2Versions.mdx new file mode 100644 index 0000000000..cee48a4683 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/LightAccountV2Versions.mdx @@ -0,0 +1,16 @@ +--- +title: LightAccountV2Versions +description: Light Account v2 versions +slug: wallets/reference/smart-accounts/variables/LightAccountV2Versions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const LightAccountV2Versions: ["v2.0.0", "v2.1.0", "v2.2.0"]; +``` + +Defined in: [packages/smart-accounts/src/light-account/registry.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/registry.ts#L53) + +Light Account v2 versions diff --git a/docs/pages/reference/smart-accounts/src/variables/NativeTokenLimitModule.mdx b/docs/pages/reference/smart-accounts/src/variables/NativeTokenLimitModule.mdx new file mode 100644 index 0000000000..1866a4a813 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/NativeTokenLimitModule.mdx @@ -0,0 +1,382 @@ +--- +title: NativeTokenLimitModule +description: Overview of NativeTokenLimitModule +slug: wallets/reference/smart-accounts/variables/NativeTokenLimitModule +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const NativeTokenLimitModule: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/modules/native-token-limit-module/module.ts:4](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/modules/native-token-limit-module/module.ts#L4) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `abi` + + readonly \[\{ + `inputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"entityId"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"limits"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `"limit"`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"moduleId"`; + `outputs`: readonly \[\{ + `internalType`: `"string"`; + `name`: `""`; + `type`: `"string"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onInstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onUninstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"postExecutionHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"preExecutionHook"`; + `outputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preRuntimeValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preSignatureValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `name`: `"preUserOpValidationHook"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"paymaster"`; + `type`: `"address"`; + }, \{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"specialPaymasters"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"newLimit"`; + `type`: `"uint256"`; + }]; + `name`: `"updateLimits"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"paymaster"`; + `type`: `"address"`; + }, \{ + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }]; + `name`: `"updateSpecialPaymaster"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }, \{ + `indexed`: `false`; + `internalType`: `"uint256"`; + `name`: `"newLimit"`; + `type`: `"uint256"`; + }]; + `name`: `"NativeTokenSpendLimitUpdated"`; + `type`: `"event"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"paymaster"`; + `type`: `"address"`; + }, \{ + `indexed`: `false`; + `internalType`: `"bool"`; + `name`: `"allowed"`; + `type`: `"bool"`; + }]; + `name`: `"SpecialPaymasterUpdated"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"ExceededNativeTokenLimit"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidPaymaster"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotImplemented"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnexpectedDataPassed"`; + `type`: `"error"`; + }] + + `nativeTokenLimitModuleAbi` +
+ `encodeOnInstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
+ `encodeOnUninstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
diff --git a/docs/pages/reference/smart-accounts/src/variables/PaymasterGuardModule.mdx b/docs/pages/reference/smart-accounts/src/variables/PaymasterGuardModule.mdx new file mode 100644 index 0000000000..d144beeb38 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/PaymasterGuardModule.mdx @@ -0,0 +1,256 @@ +--- +title: PaymasterGuardModule +description: Overview of PaymasterGuardModule +slug: wallets/reference/smart-accounts/variables/PaymasterGuardModule +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const PaymasterGuardModule: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/modules/paymaster-guard-module/module.ts:4](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/modules/paymaster-guard-module/module.ts#L4) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `abi` + + readonly \[\{ + `inputs`: readonly \[]; + `name`: `"moduleId"`; + `outputs`: readonly \[\{ + `internalType`: `"string"`; + `name`: `""`; + `type`: `"string"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onInstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onUninstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"paymasters"`; + `outputs`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"paymaster"`; + `type`: `"address"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preRuntimeValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preSignatureValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `name`: `"preUserOpValidationHook"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"BadPaymasterSpecified"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"InvalidPaymaster"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotImplemented"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnexpectedDataPassed"`; + `type`: `"error"`; + }] + + `paymasterGuardModuleAbi` +
+ `encodeOnInstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
+ `encodeOnUninstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
diff --git a/docs/pages/reference/smart-accounts/src/variables/PermissionType.mdx b/docs/pages/reference/smart-accounts/src/variables/PermissionType.mdx new file mode 100644 index 0000000000..d4d45e48d0 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/PermissionType.mdx @@ -0,0 +1,143 @@ +--- +title: PermissionType +description: A pseudo-enum for permission types. +slug: wallets/reference/smart-accounts/variables/PermissionType +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const PermissionType: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/permissionBuilder.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/permissionBuilder.ts#L51) + +A pseudo-enum for permission types. + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `ACCOUNT_FUNCTIONS` + + `"account-functions"` + + `"account-functions"` +
+ `CONTRACT_ACCESS` + + `"contract-access"` + + `"contract-access"` +
+ `ERC20_TOKEN_TRANSFER` + + `"erc20-token-transfer"` + + `"erc20-token-transfer"` +
+ `FUNCTIONS_ON_ALL_CONTRACTS` + + `"functions-on-all-contracts"` + + `"functions-on-all-contracts"` +
+ `FUNCTIONS_ON_CONTRACT` + + `"functions-on-contract"` + + `"functions-on-contract"` +
+ `GAS_LIMIT` + + `"gas-limit"` + + `"gas-limit"` +
+ `NATIVE_TOKEN_TRANSFER` + + `"native-token-transfer"` + + `"native-token-transfer"` +
+ `ROOT` + + `"root"` + + `"root"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/SignaturePrefix.mdx b/docs/pages/reference/smart-accounts/src/variables/SignaturePrefix.mdx new file mode 100644 index 0000000000..ecd9993f9e --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/SignaturePrefix.mdx @@ -0,0 +1,57 @@ +--- +title: SignaturePrefix +description: Overview of SignaturePrefix +slug: wallets/reference/smart-accounts/variables/SignaturePrefix +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const SignaturePrefix: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/types.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/types.ts#L3) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `CONTRACT` + + `"0x01"` + + `"0x01"` +
+ `EOA` + + `"0x00"` + + `"0x00"` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/SingleSignerValidationModule.mdx b/docs/pages/reference/smart-accounts/src/variables/SingleSignerValidationModule.mdx new file mode 100644 index 0000000000..2d2cf740f6 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/SingleSignerValidationModule.mdx @@ -0,0 +1,48 @@ +--- +title: SingleSignerValidationModule +description: Overview of SingleSignerValidationModule +slug: wallets/reference/smart-accounts/variables/SingleSignerValidationModule +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const SingleSignerValidationModule: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/modules/single-signer-validation/module.ts:3](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/modules/single-signer-validation/module.ts#L3) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `encodeOnInstallData()` + + (`args`) => `` `0x${string}` `` +
+ `encodeOnUninstallData()` + + (`args`) => `` `0x${string}` `` +
diff --git a/docs/pages/reference/smart-accounts/src/variables/TimeRangeModule.mdx b/docs/pages/reference/smart-accounts/src/variables/TimeRangeModule.mdx new file mode 100644 index 0000000000..5a4d1e63c5 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/TimeRangeModule.mdx @@ -0,0 +1,327 @@ +--- +title: TimeRangeModule +description: Overview of TimeRangeModule +slug: wallets/reference/smart-accounts/variables/TimeRangeModule +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const TimeRangeModule: object; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/modules/time-range-module/module.ts:6](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/modules/time-range-module/module.ts#L6) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefault value
+ `abi` + + readonly \[\{ + `inputs`: readonly \[]; + `name`: `"moduleId"`; + `outputs`: readonly \[\{ + `internalType`: `"string"`; + `name`: `""`; + `type`: `"string"`; + }]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onInstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes"`; + `name`: `"data"`; + `type`: `"bytes"`; + }]; + `name`: `"onUninstall"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preRuntimeValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `""`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `""`; + `type`: `"address"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `""`; + `type`: `"bytes"`; + }]; + `name`: `"preSignatureValidationHook"`; + `outputs`: readonly \[]; + `stateMutability`: `"pure"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `components`: readonly \[\{ + `internalType`: `"address"`; + `name`: `"sender"`; + `type`: `"address"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"nonce"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"initCode"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"callData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"accountGasLimits"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"uint256"`; + `name`: `"preVerificationGas"`; + `type`: `"uint256"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `"gasFees"`; + `type`: `"bytes32"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"paymasterAndData"`; + `type`: `"bytes"`; + }, \{ + `internalType`: `"bytes"`; + `name`: `"signature"`; + `type`: `"bytes"`; + }]; + `internalType`: `"struct PackedUserOperation"`; + `name`: `"userOp"`; + `type`: `"tuple"`; + }, \{ + `internalType`: `"bytes32"`; + `name`: `""`; + `type`: `"bytes32"`; + }]; + `name`: `"preUserOpValidationHook"`; + `outputs`: readonly \[\{ + `internalType`: `"uint256"`; + `name`: `""`; + `type`: `"uint256"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"uint48"`; + `name`: `"validUntil"`; + `type`: `"uint48"`; + }, \{ + `internalType`: `"uint48"`; + `name`: `"validAfter"`; + `type`: `"uint48"`; + }]; + `name`: `"setTimeRange"`; + `outputs`: readonly \[]; + `stateMutability`: `"nonpayable"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"bytes4"`; + `name`: `"interfaceId"`; + `type`: `"bytes4"`; + }]; + `name`: `"supportsInterface"`; + `outputs`: readonly \[\{ + `internalType`: `"bool"`; + `name`: `""`; + `type`: `"bool"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `inputs`: readonly \[\{ + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }]; + `name`: `"timeRanges"`; + `outputs`: readonly \[\{ + `internalType`: `"uint48"`; + `name`: `"validUntil"`; + `type`: `"uint48"`; + }, \{ + `internalType`: `"uint48"`; + `name`: `"validAfter"`; + `type`: `"uint48"`; + }]; + `stateMutability`: `"view"`; + `type`: `"function"`; + }, \{ + `anonymous`: `false`; + `inputs`: readonly \[\{ + `indexed`: `true`; + `internalType`: `"uint32"`; + `name`: `"entityId"`; + `type`: `"uint32"`; + }, \{ + `indexed`: `true`; + `internalType`: `"address"`; + `name`: `"account"`; + `type`: `"address"`; + }, \{ + `indexed`: `false`; + `internalType`: `"uint48"`; + `name`: `"validUntil"`; + `type`: `"uint48"`; + }, \{ + `indexed`: `false`; + `internalType`: `"uint48"`; + `name`: `"validAfter"`; + `type`: `"uint48"`; + }]; + `name`: `"TimeRangeSet"`; + `type`: `"event"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"NotImplemented"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"TimeRangeNotValid"`; + `type`: `"error"`; + }, \{ + `inputs`: readonly \[]; + `name`: `"UnexpectedDataPassed"`; + `type`: `"error"`; + }] + + `timeRangeModuleAbi` +
+ `buildHook()` + + (`installArgs`, `address`) => `object` + + ‐ +
+ `encodeOnInstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
+ `encodeOnUninstallData()` + + (`args`) => `` `0x${string}` `` + + ‐ +
+ `encodeSetTimeRange()` + + (`args`) => `` `0x${string}` `` + + ‐ +
diff --git a/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_0_1.mdx b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_0_1.mdx new file mode 100644 index 0000000000..58043e20ad --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_0_1.mdx @@ -0,0 +1,14 @@ +--- +title: lightAccountStaticImplV1_0_1 +description: Overview of lightAccountStaticImplV1_0_1 +slug: wallets/reference/smart-accounts/variables/lightAccountStaticImplV1_0_1 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const lightAccountStaticImplV1_0_1: LightAccountV1StaticImpl; +``` + +Defined in: [packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts:58](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts#L58) diff --git a/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_0_2.mdx b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_0_2.mdx new file mode 100644 index 0000000000..d82e6537c3 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_0_2.mdx @@ -0,0 +1,14 @@ +--- +title: lightAccountStaticImplV1_0_2 +description: Overview of lightAccountStaticImplV1_0_2 +slug: wallets/reference/smart-accounts/variables/lightAccountStaticImplV1_0_2 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const lightAccountStaticImplV1_0_2: LightAccountV1StaticImpl; +``` + +Defined in: [packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts:73](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts#L73) diff --git a/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_1_0.mdx b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_1_0.mdx new file mode 100644 index 0000000000..bdeff5e1ab --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV1_1_0.mdx @@ -0,0 +1,14 @@ +--- +title: lightAccountStaticImplV1_1_0 +description: Overview of lightAccountStaticImplV1_1_0 +slug: wallets/reference/smart-accounts/variables/lightAccountStaticImplV1_1_0 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const lightAccountStaticImplV1_1_0: LightAccountV1StaticImpl; +``` + +Defined in: [packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts:88](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts#L88) diff --git a/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV2_0_0.mdx b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV2_0_0.mdx new file mode 100644 index 0000000000..72dfcf8616 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/lightAccountStaticImplV2_0_0.mdx @@ -0,0 +1,21 @@ +--- +title: lightAccountStaticImplV2_0_0 +description: Overview of lightAccountStaticImplV2_0_0 +slug: wallets/reference/smart-accounts/variables/lightAccountStaticImplV2_0_0 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const lightAccountStaticImplV2_0_0: StaticSmartAccountImplementation< + false, + "0.7", + LightAccountFactoryArgs, + typeof entryPoint07Abi, + typeof LightAccountAbi_v2, + typeof LightAccountFactoryAbi_v2 +>; +``` + +Defined in: [packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts:103](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts#L103) diff --git a/docs/pages/reference/smart-accounts/src/variables/multiOwnerLightAccountStaticImplV2_0_0.mdx b/docs/pages/reference/smart-accounts/src/variables/multiOwnerLightAccountStaticImplV2_0_0.mdx new file mode 100644 index 0000000000..a9bf3b374d --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/multiOwnerLightAccountStaticImplV2_0_0.mdx @@ -0,0 +1,21 @@ +--- +title: multiOwnerLightAccountStaticImplV2_0_0 +description: Overview of multiOwnerLightAccountStaticImplV2_0_0 +slug: wallets/reference/smart-accounts/variables/multiOwnerLightAccountStaticImplV2_0_0 +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const multiOwnerLightAccountStaticImplV2_0_0: StaticSmartAccountImplementation< + false, + "0.7", + MultiOwnerLightAccountFactoryArgs, + typeof entryPoint07Abi, + typeof MultiOwnerLightAccountAbi, + typeof MultiOwnerLightAccountFactoryAbi +>; +``` + +Defined in: [packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts:143](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/light-account/lightAccountStaticImpl.ts#L143) diff --git a/docs/pages/reference/smart-accounts/src/variables/multiOwnerModularAccountStaticImpl.mdx b/docs/pages/reference/smart-accounts/src/variables/multiOwnerModularAccountStaticImpl.mdx new file mode 100644 index 0000000000..7af508746e --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/multiOwnerModularAccountStaticImpl.mdx @@ -0,0 +1,25 @@ +--- +title: multiOwnerModularAccountStaticImpl +description: "Static implementation logic for ModularAccountV1. TODO(v5): update JSDoc format when doc-gen supports structs or records." +slug: wallets/reference/smart-accounts/variables/multiOwnerModularAccountStaticImpl +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const multiOwnerModularAccountStaticImpl: StaticSmartAccountImplementation< + false, + "0.6", + MultiOwnerModularAccountV1FactoryArgs, + typeof entryPoint06Abi, + typeof UpgradeableModularAccountAbi, + typeof MultiOwnerModularAccountFactoryAbi +>; +``` + +Defined in: [packages/smart-accounts/src/ma-v1/mav1StaticImpl.ts:20](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v1/mav1StaticImpl.ts#L20) + +Static implementation logic for ModularAccountV1. + +TODO(v5): update JSDoc format when doc-gen supports structs or records. diff --git a/docs/pages/reference/smart-accounts/src/variables/semiModularAccount7702StaticImpl.mdx b/docs/pages/reference/smart-accounts/src/variables/semiModularAccount7702StaticImpl.mdx new file mode 100644 index 0000000000..382549fd17 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/semiModularAccount7702StaticImpl.mdx @@ -0,0 +1,18 @@ +--- +title: semiModularAccount7702StaticImpl +description: "Static implementation logic for SemiModularAccount7702. TODO(v5): update JSDoc format when doc-gen supports structs or records." +slug: wallets/reference/smart-accounts/variables/semiModularAccount7702StaticImpl +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const semiModularAccount7702StaticImpl: SemiModularAccount7702StaticImpl; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts:79](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts#L79) + +Static implementation logic for SemiModularAccount7702. + +TODO(v5): update JSDoc format when doc-gen supports structs or records. diff --git a/docs/pages/reference/smart-accounts/src/variables/semiModularAccountV2StaticImpl.mdx b/docs/pages/reference/smart-accounts/src/variables/semiModularAccountV2StaticImpl.mdx new file mode 100644 index 0000000000..5d34c230c6 --- /dev/null +++ b/docs/pages/reference/smart-accounts/src/variables/semiModularAccountV2StaticImpl.mdx @@ -0,0 +1,18 @@ +--- +title: semiModularAccountV2StaticImpl +description: "Static implementation logic for SemiModularAccountV2. TODO(v5): update JSDoc format when doc-gen supports structs or records." +slug: wallets/reference/smart-accounts/variables/semiModularAccountV2StaticImpl +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +const semiModularAccountV2StaticImpl: SemiModularAccountV2StaticImpl; +``` + +Defined in: [packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/smart-accounts/src/ma-v2/mav2StaticImpl.ts#L42) + +Static implementation logic for SemiModularAccountV2. + +TODO(v5): update JSDoc format when doc-gen supports structs or records. diff --git a/docs/pages/reference/wallet-apis/src/exports/README.mdx b/docs/pages/reference/wallet-apis/src/exports/README.mdx new file mode 100644 index 0000000000..723a05072b --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/README.mdx @@ -0,0 +1,66 @@ +--- +title: wallet-apis +description: Overview of wallet-apis +slug: wallets/reference/wallet-apis +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +## Type Aliases + +| Type Alias | Description | +| :--------------------------------------------------------------------------------------------------------- | :---------- | +| [AlchemyWalletTransport](/wallets/reference/wallet-apis/type-aliases/AlchemyWalletTransport) | - | +| [BaseWalletClient](/wallets/reference/wallet-apis/type-aliases/BaseWalletClient) | - | +| [CreateSmartWalletClientParams](/wallets/reference/wallet-apis/type-aliases/CreateSmartWalletClientParams) | - | +| [FormatSignParams](/wallets/reference/wallet-apis/type-aliases/FormatSignParams) | - | +| [FormatSignResult](/wallets/reference/wallet-apis/type-aliases/FormatSignResult) | - | +| [GetCapabilitiesParams](/wallets/reference/wallet-apis/type-aliases/GetCapabilitiesParams) | - | +| [GetCapabilitiesResult](/wallets/reference/wallet-apis/type-aliases/GetCapabilitiesResult) | - | +| [GrantPermissionsParams](/wallets/reference/wallet-apis/type-aliases/GrantPermissionsParams) | - | +| [GrantPermissionsResult](/wallets/reference/wallet-apis/type-aliases/GrantPermissionsResult) | - | +| [ListAccountsParams](/wallets/reference/wallet-apis/type-aliases/ListAccountsParams) | - | +| [ListAccountsResult](/wallets/reference/wallet-apis/type-aliases/ListAccountsResult) | - | +| [PrepareCallsParams](/wallets/reference/wallet-apis/type-aliases/PrepareCallsParams) | - | +| [PrepareCallsResult](/wallets/reference/wallet-apis/type-aliases/PrepareCallsResult) | - | +| [PrepareSignParams](/wallets/reference/wallet-apis/type-aliases/PrepareSignParams) | - | +| [PrepareSignResult](/wallets/reference/wallet-apis/type-aliases/PrepareSignResult) | - | +| [RequestAccountParams](/wallets/reference/wallet-apis/type-aliases/RequestAccountParams) | - | +| [RequestAccountResult](/wallets/reference/wallet-apis/type-aliases/RequestAccountResult) | - | +| [SendCallsParams](/wallets/reference/wallet-apis/type-aliases/SendCallsParams) | - | +| [SendCallsResult](/wallets/reference/wallet-apis/type-aliases/SendCallsResult) | - | +| [SendPreparedCallsParams](/wallets/reference/wallet-apis/type-aliases/SendPreparedCallsParams) | - | +| [SendPreparedCallsResult](/wallets/reference/wallet-apis/type-aliases/SendPreparedCallsResult) | - | +| [SignerClient](/wallets/reference/wallet-apis/type-aliases/SignerClient) | - | +| [SignMessageParams](/wallets/reference/wallet-apis/type-aliases/SignMessageParams) | - | +| [SignMessageResult](/wallets/reference/wallet-apis/type-aliases/SignMessageResult) | - | +| [SignPreparedCallsParams](/wallets/reference/wallet-apis/type-aliases/SignPreparedCallsParams) | - | +| [SignPreparedCallsResult](/wallets/reference/wallet-apis/type-aliases/SignPreparedCallsResult) | - | +| [SignSignatureRequestParams](/wallets/reference/wallet-apis/type-aliases/SignSignatureRequestParams) | - | +| [SignSignatureRequestResult](/wallets/reference/wallet-apis/type-aliases/SignSignatureRequestResult) | - | +| [SignTypedDataParams](/wallets/reference/wallet-apis/type-aliases/SignTypedDataParams) | - | +| [SignTypedDataResult](/wallets/reference/wallet-apis/type-aliases/SignTypedDataResult) | - | +| [SmartWalletActions](/wallets/reference/wallet-apis/type-aliases/SmartWalletActions) | - | +| [SmartWalletClient](/wallets/reference/wallet-apis/type-aliases/SmartWalletClient) | - | + +## Functions + +| Function | Description | +| :------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [alchemyWalletTransport](/wallets/reference/wallet-apis/functions/alchemyWalletTransport) | - | +| [createSmartWalletClient](/wallets/reference/wallet-apis/functions/createSmartWalletClient) | Creates a smart wallet client with wallet API actions. | +| [formatSign](/wallets/reference/wallet-apis/functions/formatSign) | Formats a signature request for signing messages or transactions. | +| [getCapabilities](/wallets/reference/wallet-apis/functions/getCapabilities) | Gets the capabilities supported by the wallet for the given account. Delegates to viem's `getCapabilities` and renames `paymasterService` to `paymaster` for consistency with the SDK's public API. | +| [grantPermissions](/wallets/reference/wallet-apis/functions/grantPermissions) | Grants permissions to a smart account by creating a session. This allows another key to perform operations on behalf of the account. | +| [listAccounts](/wallets/reference/wallet-apis/functions/listAccounts) | Lists all smart accounts for a given signer using the wallet API client. | +| [prepareCalls](/wallets/reference/wallet-apis/functions/prepareCalls) | Prepares a set of contract calls for execution by building a user operation. Returns the built user operation and a signature request that needs to be signed before submitting to sendPreparedCalls. | +| [prepareSign](/wallets/reference/wallet-apis/functions/prepareSign) | Prepares a signature request for signing messages or transactions. | +| [requestAccount](/wallets/reference/wallet-apis/functions/requestAccount) | Requests a smart account address for the provided signer using the wallet API client. | +| [sendCalls](/wallets/reference/wallet-apis/functions/sendCalls) | Prepares, signs, and submits calls. This function internally calls `prepareCalls`, `signPreparedCalls`, and `sendPreparedCalls`. | +| [sendPreparedCalls](/wallets/reference/wallet-apis/functions/sendPreparedCalls) | Sends prepared calls by submitting a signed user operation. This method is used after signing the signature request returned from prepareCalls. | +| [signMessage](/wallets/reference/wallet-apis/functions/signMessage) | Signs a message using the smart account. This method requests the account associated with the signer and uses it to sign the message. | +| [signPreparedCalls](/wallets/reference/wallet-apis/functions/signPreparedCalls) | Signs prepared calls using the provided signer. | +| [signSignatureRequest](/wallets/reference/wallet-apis/functions/signSignatureRequest) | Signs a signature request using the provided signer. This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization. | +| [signTypedData](/wallets/reference/wallet-apis/functions/signTypedData) | Signs typed data (EIP-712) using the smart account. This method requests the account associated with the signer and uses it to sign the typed data. | +| [smartWalletActions](/wallets/reference/wallet-apis/functions/smartWalletActions) | Decorator that adds smart wallet actions to a wallet API client. Provides both Alchemy-specific methods and standard viem wallet actions. | diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/alchemyWalletTransport.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/alchemyWalletTransport.mdx new file mode 100644 index 0000000000..57c2ef5bca --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/alchemyWalletTransport.mdx @@ -0,0 +1,42 @@ +--- +title: alchemyWalletTransport +description: Overview of the alchemyWalletTransport function +slug: wallets/reference/wallet-apis/functions/alchemyWalletTransport +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function alchemyWalletTransport(config): AlchemyWalletTransport; +``` + +Defined in: [packages/wallet-apis/src/transport.ts:9](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/transport.ts#L9) + +## Parameters + + + + + + + + + + + + + + + + + +
ParameterType
+ `config` + + `AlchemyTransportConfig` +
+ +## Returns + +[`AlchemyWalletTransport`](../type-aliases/AlchemyWalletTransport) diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/createSmartWalletClient.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/createSmartWalletClient.mdx new file mode 100644 index 0000000000..0393a8bd43 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/createSmartWalletClient.mdx @@ -0,0 +1,55 @@ +--- +title: createSmartWalletClient +description: Overview of the createSmartWalletClient function +slug: wallets/reference/wallet-apis/functions/createSmartWalletClient +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function createSmartWalletClient(params): any; +``` + +Defined in: [packages/wallet-apis/src/client.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/client.ts#L34) + +Creates a smart wallet client with wallet API actions. + +By default, the client uses EIP-7702 with the signer's address, allowing you to call +`prepareCalls` or `sendCalls` directly without first calling `requestAccount`. +Use `requestAccount` only if you need a non-7702 smart account. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `params` + + [`CreateSmartWalletClientParams`](../type-aliases/CreateSmartWalletClientParams) + + Parameters for creating the smart wallet client. +
+ +## Returns + +`any` + +A wallet client extended with smart wallet actions. diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/formatSign.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/formatSign.mdx new file mode 100644 index 0000000000..c2b73ed97d --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/formatSign.mdx @@ -0,0 +1,79 @@ +--- +title: formatSign +description: Overview of the formatSign function +slug: wallets/reference/wallet-apis/functions/formatSign +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function formatSign(client, params): Promise<{}>; +``` + +Defined in: [packages/wallet-apis/src/actions/formatSign.ts:46](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/formatSign.ts#L46) + +Formats a signature request for signing messages or transactions. + +## Example + +```ts +// Formats a signature +const result = await client.formatSign({ + account: "0x1234...", + signature: { + type: "ecdsa", + data: "0xabcd...", + }, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + `Object` + + Parameters for formatting the signature +
+ +## Returns + +`Promise`\<\{ +}> + +A Promise that resolves to the formatSign result containing the formatted signature. diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/getCapabilities.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/getCapabilities.mdx new file mode 100644 index 0000000000..49b9d04a20 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/getCapabilities.mdx @@ -0,0 +1,76 @@ +--- +title: getCapabilities +description: Overview of the getCapabilities function +slug: wallets/reference/wallet-apis/functions/getCapabilities +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function getCapabilities(client, params?): Promise; +``` + +Defined in: [packages/wallet-apis/src/actions/getCapabilities.ts:31](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/getCapabilities.ts#L31) + +Gets the capabilities supported by the wallet for the given account. +Delegates to viem's `getCapabilities` and renames `paymasterService` +to `paymaster` for consistency with the SDK's public API. + +## Example + +```ts +const capabilities = await client.getCapabilities({ + account: "0x1234...", +}); +// { paymaster: { supported: true }, atomic: { status: "supported" } } +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params?` + + [`GetCapabilitiesParams`](../type-aliases/GetCapabilitiesParams) + + Optional parameters +
+ +## Returns + +`Promise`\<[`GetCapabilitiesResult`](../type-aliases/GetCapabilitiesResult)> + +The capabilities for the given chain diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/grantPermissions.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/grantPermissions.mdx new file mode 100644 index 0000000000..79c3d49498 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/grantPermissions.mdx @@ -0,0 +1,114 @@ +--- +title: grantPermissions +description: Overview of the grantPermissions function +slug: wallets/reference/wallet-apis/functions/grantPermissions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function grantPermissions( + client, + params, +): Promise<{ + context: `0x${string}`; +}>; +``` + +Defined in: [packages/wallet-apis/src/actions/grantPermissions.ts:82](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/grantPermissions.ts#L82) + +Grants permissions to a smart account by creating a session. +This allows another key to perform operations on behalf of the account. + +## Example + +```ts +// Create a session key and grant root permissions +const sessionKey = LocalAccountSigner.generatePrivateKeySigner(); +const account = await client.requestAccount(); + +const permissions = await client.grantPermissions({ + account: account.address, + expirySec: Math.floor(Date.now() / 1000) + 60 * 60, // 1 hour from now + key: { + publicKey: await sessionKey.getAddress(), + type: "secp256k1", + }, + permissions: [{ type: "root" }], +}); + +// Use the permissions to prepare a call +const preparedCalls = await client.prepareCalls({ + calls: [{ to: zeroAddress, value: 0n }], + from: account.address, + capabilities: { + paymaster: { + policyId: "your-paymaster-policy-id", + }, + permissions, + }, +}); + +// Sign with the session key +const signedCalls = await signPreparedCalls(sessionKey, preparedCalls); + +// Send the prepared call using the session key +const result = await client.sendPreparedCalls({ + ...signedCalls, + capabilities: { + permissions, + }, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + `Object` + + The parameters for granting permissions +
+ +## Returns + +`Promise`\<\{ +`context`: `` `0x${string}` ``; +}> + +A Promise that resolves to the result containing a context identifier diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/listAccounts.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/listAccounts.mdx new file mode 100644 index 0000000000..d2a5ebc2ad --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/listAccounts.mdx @@ -0,0 +1,83 @@ +--- +title: listAccounts +description: Overview of the listAccounts function +slug: wallets/reference/wallet-apis/functions/listAccounts +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function listAccounts(client, params): Promise<{}>; +``` + +Defined in: [packages/wallet-apis/src/actions/listAccounts.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/listAccounts.ts#L56) + +Lists all smart accounts for a given signer using the wallet API client. + +## Example + +```ts +// Fetch the first page of accounts +const firstPage = await client.listAccounts({ + signerAddress: "0x123...", + limit: 10, +}); + +// If an 'after' cursor exists, use it to fetch the next page +const nextPage = await client.listAccounts({ + signerAddress: "0x123...", + limit: 10, + after: firstPage.meta.after, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + `Object` + + Parameters for listing accounts +
+ +## Returns + +`Promise`\<\{ +}> + +A Promise that resolves to the list of accounts and pagination metadata diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/prepareCalls.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/prepareCalls.mdx new file mode 100644 index 0000000000..c5417e16e6 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/prepareCalls.mdx @@ -0,0 +1,89 @@ +--- +title: prepareCalls +description: Overview of the prepareCalls function +slug: wallets/reference/wallet-apis/functions/prepareCalls +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function prepareCalls(client, params): Promise; +``` + +Defined in: [packages/wallet-apis/src/actions/prepareCalls.ts:82](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/prepareCalls.ts#L82) + +Prepares a set of contract calls for execution by building a user operation. +Returns the built user operation and a signature request that needs to be signed +before submitting to sendPreparedCalls. + +The client defaults to using EIP-7702 with the signer's address, so you can call +this directly without first calling `requestAccount`. + +## Example + +```ts +// Prepare a sponsored user operation call (uses signer address via EIP-7702 by default) +const result = await client.prepareCalls({ + calls: [ + { + to: "0x1234...", + data: "0xabcdef...", + value: 0n, + }, + ], + capabilities: { + paymaster: { policyId: "your-policy-id" }, + }, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + `Object` + + Parameters for preparing calls +
+ +## Returns + +`Promise`\<[`PrepareCallsResult`](../type-aliases/PrepareCallsResult)> + +A Promise that resolves to the prepared calls result containing +the user operation data and signature request diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/prepareSign.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/prepareSign.mdx new file mode 100644 index 0000000000..c61c91364d --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/prepareSign.mdx @@ -0,0 +1,77 @@ +--- +title: prepareSign +description: Overview of the prepareSign function +slug: wallets/reference/wallet-apis/functions/prepareSign +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function prepareSign(client, params): Promise<{}>; +``` + +Defined in: [packages/wallet-apis/src/actions/prepareSign.ts:44](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/prepareSign.ts#L44) + +Prepares a signature request for signing messages or transactions. + +## Example + +```ts +// Prepare a message to be signed +const result = await client.prepareSign({ + account: "0x1234...", + type: "personal_sign", + data: "Hello, world!", +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + [`PrepareSignParams`](../type-aliases/PrepareSignParams) + + Parameters for preparing the signature request +
+ +## Returns + +`Promise`\<\{ +}> + +A Promise that resolves to the prepare sign result containing a signature request diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/requestAccount.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/requestAccount.mdx new file mode 100644 index 0000000000..a033611b3e --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/requestAccount.mdx @@ -0,0 +1,79 @@ +--- +title: requestAccount +description: Overview of the requestAccount function +slug: wallets/reference/wallet-apis/functions/requestAccount +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function requestAccount(client, params?): Promise; +``` + +Defined in: [packages/wallet-apis/src/actions/requestAccount.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/requestAccount.ts#L53) + +Requests a smart account address for the provided signer using the wallet API client. + +Note: This is only needed for non-EIP-7702 accounts. The client defaults to using +EIP-7702 with the signer's address, so you can call `prepareCalls` or `sendCalls` +directly without first calling `requestAccount`. + +If an account already exists for the signer, it will always return that account unless a new ID is specified. +If an account already exists, the creationHint will be ignored. + +## Example + +```ts +// Request a non-7702 smart account +const account = await client.requestAccount(); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params?` + + `any` + + Optional parameters for requesting a specific account +
+ +## Returns + +`Promise`\<[`RequestAccountResult`](../type-aliases/RequestAccountResult)> + +A Promise that resolves to an object containing a smart account address diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/sendCalls.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/sendCalls.mdx new file mode 100644 index 0000000000..08571a0457 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/sendCalls.mdx @@ -0,0 +1,95 @@ +--- +title: sendCalls +description: Overview of the sendCalls function +slug: wallets/reference/wallet-apis/functions/sendCalls +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function sendCalls(client, params): Promise<{}>; +``` + +Defined in: [packages/wallet-apis/src/actions/sendCalls.ts:56](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/sendCalls.ts#L56) + +Prepares, signs, and submits calls. This function internally calls `prepareCalls`, `signPreparedCalls`, and `sendPreparedCalls`. + +The client defaults to using EIP-7702 with the signer's address, so you can call +this directly without first calling `requestAccount`. + +## Example + +```ts +// Send calls (uses signer address via EIP-7702 by default) +const result = await client.sendCalls({ + calls: [ + { + to: "0x1234...", + data: "0xabcdef...", + value: 0n, + }, + ], + capabilities: { + paymaster: { policyId: "your-policy-id" }, + }, +}); + +// The result contains the call ID +console.log(result.id); +``` + +\ +If using this action with an ERC-20 paymaster in pre-operation mode with `autoPermit`, the contents of the permit will be hidden +from the user. It is recommended to use the `prepareCalls` action instead to manually handle the permit signature. +\ + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + `Object` + + Parameters for sending calls +
+ +## Returns + +`Promise`\<\{ +}> + +A Promise that resolves to the result containing the call ID. diff --git a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/sendPreparedCalls.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/sendPreparedCalls.mdx similarity index 79% rename from docs/pages/reference/account-kit/wallet-client/src/exports/functions/sendPreparedCalls.mdx rename to docs/pages/reference/wallet-apis/src/exports/functions/sendPreparedCalls.mdx index c6c631d871..7253b716de 100644 --- a/docs/pages/reference/account-kit/wallet-client/src/exports/functions/sendPreparedCalls.mdx +++ b/docs/pages/reference/wallet-apis/src/exports/functions/sendPreparedCalls.mdx @@ -1,7 +1,7 @@ --- title: sendPreparedCalls description: Overview of the sendPreparedCalls function -slug: wallets/reference/account-kit/wallet-client/functions/sendPreparedCalls +slug: wallets/reference/wallet-apis/functions/sendPreparedCalls layout: reference --- @@ -11,7 +11,7 @@ layout: reference function sendPreparedCalls(client, params): Promise<{}>; ``` -Defined in: [account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts:53](https://github.com/alchemyplatform/aa-sdk/blob/64e8cbabbf2fde59a17e85374123e899334dc927/account-kit/wallet-client/src/client/actions/sendPreparedCalls.ts#L53) +Defined in: [packages/wallet-apis/src/actions/sendPreparedCalls.ts:63](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/sendPreparedCalls.ts#L63) Sends prepared calls by submitting a signed user operation. This method is used after signing the signature request returned from prepareCalls. @@ -25,11 +25,11 @@ const preparedCalls = await client.prepareCalls({ { to: "0x1234...", data: "0xabcdef...", - value: "0x0", + value: 0n, }, ], capabilities: { - paymasterService: { policyId: "your-policy-id" }, + paymaster: { policyId: "your-policy-id" }, }, }); diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/signMessage.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/signMessage.mdx new file mode 100644 index 0000000000..4ad28d53da --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/signMessage.mdx @@ -0,0 +1,78 @@ +--- +title: signMessage +description: Overview of the signMessage function +slug: wallets/reference/wallet-apis/functions/signMessage +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function signMessage(client, params): Promise<`0x${string}`>; +``` + +Defined in: [packages/wallet-apis/src/actions/signMessage.ts:36](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signMessage.ts#L36) + +Signs a message using the smart account. +This method requests the account associated with the signer and uses it to sign the message. + +## Example + +```ts +// Sign a simple text message +const signature = await client.signMessage("Hello, world!"); + +// Sign a raw hex message +const signature = await client.signMessage({ + raw: "0x48656c6c6f2c20776f726c6421", +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + `Object` + + Parameters for signing the message +
+ +## Returns + +`Promise`\<`` `0x${string}` ``> + +A Promise that resolves to the signed message as a hex string diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/signPreparedCalls.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/signPreparedCalls.mdx new file mode 100644 index 0000000000..e85e7811bf --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/signPreparedCalls.mdx @@ -0,0 +1,86 @@ +--- +title: signPreparedCalls +description: Overview of the signPreparedCalls function +slug: wallets/reference/wallet-apis/functions/signPreparedCalls +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function signPreparedCalls(client, params): Promise; +``` + +Defined in: [packages/wallet-apis/src/actions/signPreparedCalls.ts:65](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signPreparedCalls.ts#L65) + +Signs prepared calls using the provided signer. + +## Example + +```ts +// Prepare a user operation call. +const preparedCalls = await client.prepareCalls({ + calls: [ + { + to: "0x1234...", + data: "0xabcdef...", + value: "0x0", + }, + ], +}); + +// Sign the prepared calls. +const signedCalls = await client.signPreparedCalls(preparedCalls); + +// Send the signed calls. +const result = await client.sendPreparedCalls(signedCalls); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet client to use for signing +
+ `params` + + [`SignPreparedCallsParams`](../type-aliases/SignPreparedCallsParams) + + The prepared calls with signature requests +
+ +## Returns + +`Promise`\<[`SignPreparedCallsResult`](../type-aliases/SignPreparedCallsResult)> + +A Promise that resolves to the signed calls diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/signSignatureRequest.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/signSignatureRequest.mdx new file mode 100644 index 0000000000..470e8038a8 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/signSignatureRequest.mdx @@ -0,0 +1,90 @@ +--- +title: signSignatureRequest +description: Overview of the signSignatureRequest function +slug: wallets/reference/wallet-apis/functions/signSignatureRequest +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function signSignatureRequest( + client, + params, +): Promise; +``` + +Defined in: [packages/wallet-apis/src/actions/signSignatureRequest.ts:68](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signSignatureRequest.ts#L68) + +Signs a signature request using the provided signer. +This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization. + +## Example + +```ts +// Sign a personal message +const result = await client.signSignatureRequest({ + type: 'personal_sign', + data: 'Hello, world!' +}); + +// Sign typed data (EIP-712) +const result = await client.signSignatureRequest({ + type: 'eth_signTypedData_v4', + data: { + domain: { ... }, + types: { ... }, + primaryType: '...', + message: { ... } + } +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet client to use for signing +
+ `params` + + `WithoutRawPayload` + + The signature request parameters +
+ +## Returns + +`Promise`\<[`SignSignatureRequestResult`](../type-aliases/SignSignatureRequestResult)> + +A Promise that resolves to the signature result diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/signTypedData.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/signTypedData.mdx new file mode 100644 index 0000000000..54f1251044 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/signTypedData.mdx @@ -0,0 +1,91 @@ +--- +title: signTypedData +description: Overview of the signTypedData function +slug: wallets/reference/wallet-apis/functions/signTypedData +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function signTypedData(client, params): Promise<`0x${string}`>; +``` + +Defined in: [packages/wallet-apis/src/actions/signTypedData.ts:51](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signTypedData.ts#L51) + +Signs typed data (EIP-712) using the smart account. +This method requests the account associated with the signer and uses it to sign the typed data. + +## Example + +```ts +// Sign typed data +const signature = await client.signTypedData({ + domain: { + name: "Example DApp", + version: "1", + chainId: 1, + verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", + }, + types: { + Person: [ + { name: "name", type: "string" }, + { name: "wallet", type: "address" }, + ], + }, + primaryType: "Person", + message: { + name: "John Doe", + wallet: "0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa", + }, +}); +``` + +## Parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client to use for the request +
+ `params` + + `Object` + + The typed data to sign, following EIP-712 format +
+ +## Returns + +`Promise`\<`` `0x${string}` ``> + +A Promise that resolves to the signature as a hex string diff --git a/docs/pages/reference/wallet-apis/src/exports/functions/smartWalletActions.mdx b/docs/pages/reference/wallet-apis/src/exports/functions/smartWalletActions.mdx new file mode 100644 index 0000000000..d4ccf50ad5 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/functions/smartWalletActions.mdx @@ -0,0 +1,52 @@ +--- +title: smartWalletActions +description: Overview of the smartWalletActions function +slug: wallets/reference/wallet-apis/functions/smartWalletActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +function smartWalletActions(client): SmartWalletActions; +``` + +Defined in: [packages/wallet-apis/src/decorators/smartWalletActions.ts:101](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/decorators/smartWalletActions.ts#L101) + +Decorator that adds smart wallet actions to a wallet API client. +Provides both Alchemy-specific methods and standard viem wallet actions. + +## Parameters + + + + + + + + + + + + + + + + + + + + +
ParameterTypeDescription
+ `client` + + `InnerWalletApiClient` + + The wallet API client instance +
+ +## Returns + +[`SmartWalletActions`](../type-aliases/SmartWalletActions) + +An object containing smart wallet action methods diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/AlchemyWalletTransport.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/AlchemyWalletTransport.mdx new file mode 100644 index 0000000000..ec2e72b5cc --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/AlchemyWalletTransport.mdx @@ -0,0 +1,14 @@ +--- +title: AlchemyWalletTransport +description: Overview of AlchemyWalletTransport +slug: wallets/reference/wallet-apis/type-aliases/AlchemyWalletTransport +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type AlchemyWalletTransport = AlchemyTransport; +``` + +Defined in: [packages/wallet-apis/src/transport.ts:7](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/transport.ts#L7) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/BaseWalletClient.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/BaseWalletClient.mdx new file mode 100644 index 0000000000..ebb42f541a --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/BaseWalletClient.mdx @@ -0,0 +1,51 @@ +--- +title: BaseWalletClient +description: Overview of BaseWalletClient +slug: wallets/reference/wallet-apis/type-aliases/BaseWalletClient +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type BaseWalletClient = Client< + Transport<"alchemyHttp">, + Chain, + JsonRpcAccount
, + WalletServerViemRpcSchema, + TExtend +>; +``` + +Defined in: [packages/wallet-apis/src/types.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/types.ts#L16) + +## Type Parameters + + + + + + + + + + + + + + + + + +
Type ParameterDefault type
+ `TExtend` *extends* + | \{ + \[`key`: `string`]: `unknown`; + } + | `undefined` + + | \{ + \[`key`: `string`]: `unknown`; + } + | `undefined` +
diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/CreateSmartWalletClientParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/CreateSmartWalletClientParams.mdx new file mode 100644 index 0000000000..6a582db5c9 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/CreateSmartWalletClientParams.mdx @@ -0,0 +1,98 @@ +--- +title: CreateSmartWalletClientParams +description: Overview of CreateSmartWalletClientParams +slug: wallets/reference/wallet-apis/type-aliases/CreateSmartWalletClientParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type CreateSmartWalletClientParams = object; +``` + +Defined in: [packages/wallet-apis/src/client.ts:8](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/client.ts#L8) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `account?` + + `Address` +
+ `chain` + + `Chain` +
+ `paymaster?` + + `object` +
+ `paymaster.policyId?` + + `string` +
+ `paymaster.policyIds?` + + `string`\[] +
+ `signer` + + `SmartWalletSigner` +
+ `transport` + + [`AlchemyWalletTransport`](AlchemyWalletTransport) +
diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignParams.mdx new file mode 100644 index 0000000000..101f8b4e7b --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignParams.mdx @@ -0,0 +1,16 @@ +--- +title: FormatSignParams +description: Overview of FormatSignParams +slug: wallets/reference/wallet-apis/type-aliases/FormatSignParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type FormatSignParams = Prettify< + DistributiveOmit & object +>; +``` + +Defined in: [packages/wallet-apis/src/actions/formatSign.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/formatSign.ts#L18) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignResult.mdx new file mode 100644 index 0000000000..3241b1786b --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/FormatSignResult.mdx @@ -0,0 +1,14 @@ +--- +title: FormatSignResult +description: Overview of FormatSignResult +slug: wallets/reference/wallet-apis/type-aliases/FormatSignResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type FormatSignResult = FormatSignResponse; +``` + +Defined in: [packages/wallet-apis/src/actions/formatSign.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/formatSign.ts#L25) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesParams.mdx new file mode 100644 index 0000000000..67b90ad444 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesParams.mdx @@ -0,0 +1,48 @@ +--- +title: GetCapabilitiesParams +description: Overview of GetCapabilitiesParams +slug: wallets/reference/wallet-apis/type-aliases/GetCapabilitiesParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetCapabilitiesParams = object; +``` + +Defined in: [packages/wallet-apis/src/actions/getCapabilities.ts:5](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/getCapabilities.ts#L5) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `account?` + + `AccountParam` +
+ `chainId?` + + `number` +
diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesResult.mdx new file mode 100644 index 0000000000..8fe90f5ee3 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GetCapabilitiesResult.mdx @@ -0,0 +1,14 @@ +--- +title: GetCapabilitiesResult +description: Overview of GetCapabilitiesResult +slug: wallets/reference/wallet-apis/type-aliases/GetCapabilitiesResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GetCapabilitiesResult = Record; +``` + +Defined in: [packages/wallet-apis/src/actions/getCapabilities.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/getCapabilities.ts#L10) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsParams.mdx new file mode 100644 index 0000000000..8a688cdeea --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsParams.mdx @@ -0,0 +1,16 @@ +--- +title: GrantPermissionsParams +description: Overview of GrantPermissionsParams +slug: wallets/reference/wallet-apis/type-aliases/GrantPermissionsParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GrantPermissionsParams = Prettify< + DistributiveOmit & object +>; +``` + +Defined in: [packages/wallet-apis/src/actions/grantPermissions.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/grantPermissions.ts#L17) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsResult.mdx new file mode 100644 index 0000000000..67ebcc9870 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/GrantPermissionsResult.mdx @@ -0,0 +1,16 @@ +--- +title: GrantPermissionsResult +description: Overview of GrantPermissionsResult +slug: wallets/reference/wallet-apis/type-aliases/GrantPermissionsResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type GrantPermissionsResult = Prettify<{ + context: Hex; +}>; +``` + +Defined in: [packages/wallet-apis/src/actions/grantPermissions.ts:24](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/grantPermissions.ts#L24) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsParams.mdx new file mode 100644 index 0000000000..6c831b8bae --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsParams.mdx @@ -0,0 +1,20 @@ +--- +title: ListAccountsParams +description: Overview of ListAccountsParams +slug: wallets/reference/wallet-apis/type-aliases/ListAccountsParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ListAccountsParams = Prettify< + DistributiveOmit< + BaseListAccountsParams, + "signerAddress" | "signerPublicKey" + > & + object +>; +``` + +Defined in: [packages/wallet-apis/src/actions/listAccounts.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/listAccounts.ts#L18) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsResult.mdx new file mode 100644 index 0000000000..d8691a072e --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/ListAccountsResult.mdx @@ -0,0 +1,14 @@ +--- +title: ListAccountsResult +description: Overview of ListAccountsResult +slug: wallets/reference/wallet-apis/type-aliases/ListAccountsResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type ListAccountsResult = ListAccountsResponse; +``` + +Defined in: [packages/wallet-apis/src/actions/listAccounts.ts:28](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/listAccounts.ts#L28) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsParams.mdx new file mode 100644 index 0000000000..77d1b0dcc0 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsParams.mdx @@ -0,0 +1,18 @@ +--- +title: PrepareCallsParams +description: Overview of PrepareCallsParams +slug: wallets/reference/wallet-apis/type-aliases/PrepareCallsParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PrepareCallsParams = Prettify< + WithCapabilities< + DistributiveOmit & object + > +>; +``` + +Defined in: [packages/wallet-apis/src/actions/prepareCalls.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/prepareCalls.ts#L25) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsResult.mdx new file mode 100644 index 0000000000..f95b28d2a5 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsResult.mdx @@ -0,0 +1,30 @@ +--- +title: PrepareCallsResult +description: Overview of PrepareCallsResult +slug: wallets/reference/wallet-apis/type-aliases/PrepareCallsResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PrepareCallsResult = + | Exclude< + PrepareCallsResponse, + { + type: "paymaster-permit"; + } + > + | (Omit< + Extract< + PrepareCallsResponse, + { + type: "paymaster-permit"; + } + >, + "modifiedRequest" + > & + object); +``` + +Defined in: [packages/wallet-apis/src/actions/prepareCalls.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/prepareCalls.ts#L42) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignParams.mdx new file mode 100644 index 0000000000..1fd8714488 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignParams.mdx @@ -0,0 +1,52 @@ +--- +title: PrepareSignParams +description: Overview of PrepareSignParams +slug: wallets/reference/wallet-apis/type-aliases/PrepareSignParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PrepareSignParams = DistributiveOmit< + BasePrepareSignParams, + "from" | "chainId" +> & + object; +``` + +Defined in: [packages/wallet-apis/src/actions/prepareSign.ts:17](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/prepareSign.ts#L17) + +## Type Declaration + + + + + + + + + + + + + + + + + + + + + + + +
NameType
+ `account?` + + `AccountParam` +
+ `chainId?` + + `number` +
diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignResult.mdx new file mode 100644 index 0000000000..456fc67452 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareSignResult.mdx @@ -0,0 +1,14 @@ +--- +title: PrepareSignResult +description: Overview of PrepareSignResult +slug: wallets/reference/wallet-apis/type-aliases/PrepareSignResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type PrepareSignResult = PrepareSignResponse; +``` + +Defined in: [packages/wallet-apis/src/actions/prepareSign.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/prepareSign.ts#L25) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountParams.mdx new file mode 100644 index 0000000000..f9af1654a8 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountParams.mdx @@ -0,0 +1,24 @@ +--- +title: RequestAccountParams +description: Overview of RequestAccountParams +slug: wallets/reference/wallet-apis/type-aliases/RequestAccountParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type RequestAccountParams = Prettify, "signerAddress" | "includeCounterfactualInfo"> & + | { + accountAddress?: never; + signerAddress?: Address; +} + | { + accountAddress: Address; + signerAddress?: never; +}>; +``` + +Defined in: [packages/wallet-apis/src/actions/requestAccount.ts:18](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/requestAccount.ts#L18) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountResult.mdx new file mode 100644 index 0000000000..73de962665 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/RequestAccountResult.mdx @@ -0,0 +1,14 @@ +--- +title: RequestAccountResult +description: Overview of RequestAccountResult +slug: wallets/reference/wallet-apis/type-aliases/RequestAccountResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type RequestAccountResult = JsonRpcAccount
; +``` + +Defined in: [packages/wallet-apis/src/actions/requestAccount.ts:29](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/requestAccount.ts#L29) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsParams.mdx new file mode 100644 index 0000000000..dcbaf6a4bc --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsParams.mdx @@ -0,0 +1,16 @@ +--- +title: SendCallsParams +description: Overview of SendCallsParams +slug: wallets/reference/wallet-apis/type-aliases/SendCallsParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SendCallsParams = Prettify< + DistributiveOmit & object +>; +``` + +Defined in: [packages/wallet-apis/src/actions/sendCalls.ts:13](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/sendCalls.ts#L13) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsResult.mdx new file mode 100644 index 0000000000..f0b74016ab --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendCallsResult.mdx @@ -0,0 +1,14 @@ +--- +title: SendCallsResult +description: Overview of SendCallsResult +slug: wallets/reference/wallet-apis/type-aliases/SendCallsResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SendCallsResult = Prettify; +``` + +Defined in: [packages/wallet-apis/src/actions/sendCalls.ts:19](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/sendCalls.ts#L19) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsParams.mdx new file mode 100644 index 0000000000..dc060fb9ad --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsParams.mdx @@ -0,0 +1,18 @@ +--- +title: SendPreparedCallsParams +description: Overview of SendPreparedCallsParams +slug: wallets/reference/wallet-apis/type-aliases/SendPreparedCallsParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SendPreparedCallsParams = Prettify< + WithCapabilities< + DistributiveOmit & object + > +>; +``` + +Defined in: [packages/wallet-apis/src/actions/sendPreparedCalls.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/sendPreparedCalls.ts#L22) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsResult.mdx new file mode 100644 index 0000000000..809e266dc4 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SendPreparedCallsResult.mdx @@ -0,0 +1,14 @@ +--- +title: SendPreparedCallsResult +description: Overview of SendPreparedCallsResult +slug: wallets/reference/wallet-apis/type-aliases/SendPreparedCallsResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SendPreparedCallsResult = SendPreparedCallsResponse; +``` + +Defined in: [packages/wallet-apis/src/actions/sendPreparedCalls.ts:30](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/sendPreparedCalls.ts#L30) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageParams.mdx new file mode 100644 index 0000000000..463a44220e --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageParams.mdx @@ -0,0 +1,17 @@ +--- +title: SignMessageParams +description: Overview of SignMessageParams +slug: wallets/reference/wallet-apis/type-aliases/SignMessageParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignMessageParams = Prettify<{ + account?: AccountParam; + message: SignableMessage; +}>; +``` + +Defined in: [packages/wallet-apis/src/actions/signMessage.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signMessage.ts#L10) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageResult.mdx new file mode 100644 index 0000000000..28416bd19e --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignMessageResult.mdx @@ -0,0 +1,14 @@ +--- +title: SignMessageResult +description: Overview of SignMessageResult +slug: wallets/reference/wallet-apis/type-aliases/SignMessageResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignMessageResult = Prettify; +``` + +Defined in: [packages/wallet-apis/src/actions/signMessage.ts:15](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signMessage.ts#L15) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsParams.mdx new file mode 100644 index 0000000000..111adcd840 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsParams.mdx @@ -0,0 +1,14 @@ +--- +title: SignPreparedCallsParams +description: Overview of SignPreparedCallsParams +slug: wallets/reference/wallet-apis/type-aliases/SignPreparedCallsParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignPreparedCallsParams = Prettify; +``` + +Defined in: [packages/wallet-apis/src/actions/signPreparedCalls.ts:11](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signPreparedCalls.ts#L11) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsResult.mdx new file mode 100644 index 0000000000..25a64eca1b --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsResult.mdx @@ -0,0 +1,41 @@ +--- +title: SignPreparedCallsResult +description: Overview of SignPreparedCallsResult +slug: wallets/reference/wallet-apis/type-aliases/SignPreparedCallsResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignPreparedCallsResult = + | { + data: Signed< + Extract< + PrepareCallsResult, + { + type: "array"; + } + >["data"][number] + >[]; + type: "array"; + } + | Signed< + Extract< + PrepareCallsResult, + { + type: "user-operation-v060"; + } + > + > + | Signed< + Extract< + PrepareCallsResult, + { + type: "user-operation-v070"; + } + > + >; +``` + +Defined in: [packages/wallet-apis/src/actions/signPreparedCalls.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signPreparedCalls.ts#L22) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestParams.mdx new file mode 100644 index 0000000000..96c21d5869 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestParams.mdx @@ -0,0 +1,20 @@ +--- +title: SignSignatureRequestParams +description: Overview of SignSignatureRequestParams +slug: wallets/reference/wallet-apis/type-aliases/SignSignatureRequestParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignSignatureRequestParams = Prettify< + WithoutRawPayload< + | PersonalSignSignatureRequest + | TypedDataSignatureRequest + | (AuthorizationSignatureRequest & object) + > +>; +``` + +Defined in: [packages/wallet-apis/src/actions/signSignatureRequest.ts:22](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signSignatureRequest.ts#L22) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestResult.mdx new file mode 100644 index 0000000000..92700f7266 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignSignatureRequestResult.mdx @@ -0,0 +1,48 @@ +--- +title: SignSignatureRequestResult +description: Overview of SignSignatureRequestResult +slug: wallets/reference/wallet-apis/type-aliases/SignSignatureRequestResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignSignatureRequestResult = object; +``` + +Defined in: [packages/wallet-apis/src/actions/signSignatureRequest.ts:32](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signSignatureRequest.ts#L32) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `data` + + `Hex` +
+ `type` + + `"secp256k1"` +
diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataParams.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataParams.mdx new file mode 100644 index 0000000000..5fdbb017dc --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataParams.mdx @@ -0,0 +1,14 @@ +--- +title: SignTypedDataParams +description: Overview of SignTypedDataParams +slug: wallets/reference/wallet-apis/type-aliases/SignTypedDataParams +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignTypedDataParams = Prettify; +``` + +Defined in: [packages/wallet-apis/src/actions/signTypedData.ts:10](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signTypedData.ts#L10) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataResult.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataResult.mdx new file mode 100644 index 0000000000..0054118e08 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignTypedDataResult.mdx @@ -0,0 +1,14 @@ +--- +title: SignTypedDataResult +description: Overview of SignTypedDataResult +slug: wallets/reference/wallet-apis/type-aliases/SignTypedDataResult +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignTypedDataResult = Prettify; +``` + +Defined in: [packages/wallet-apis/src/actions/signTypedData.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/actions/signTypedData.ts#L16) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignerClient.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignerClient.mdx new file mode 100644 index 0000000000..4c1ee1d82a --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SignerClient.mdx @@ -0,0 +1,14 @@ +--- +title: SignerClient +description: Overview of SignerClient +slug: wallets/reference/wallet-apis/type-aliases/SignerClient +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SignerClient = WalletClient; +``` + +Defined in: [packages/wallet-apis/src/types.ts:34](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/types.ts#L34) diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletActions.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletActions.mdx new file mode 100644 index 0000000000..aec3acb088 --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletActions.mdx @@ -0,0 +1,158 @@ +--- +title: SmartWalletActions +description: Overview of SmartWalletActions +slug: wallets/reference/wallet-apis/type-aliases/SmartWalletActions +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SmartWalletActions = object; +``` + +Defined in: [packages/wallet-apis/src/decorators/smartWalletActions.ts:62](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/decorators/smartWalletActions.ts#L62) + +## Properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyType
+ `getCallsStatus` + + (`params`) => `Promise`\<`GetCallsStatusReturnType`> +
+ `getCapabilities` + + (`params?`) => `Promise`\<[`GetCapabilitiesResult`](GetCapabilitiesResult)> +
+ `grantPermissions` + + (`params`) => `Promise`\<[`GrantPermissionsResult`](GrantPermissionsResult)> +
+ `listAccounts` + + (`params`) => `Promise`\<[`ListAccountsResult`](ListAccountsResult)> +
+ `prepareCalls` + + (`params`) => `Promise`\<[`PrepareCallsResult`](PrepareCallsResult)> +
+ `requestAccount` + + (`params?`) => `Promise`\<[`RequestAccountResult`](RequestAccountResult)> +
+ `sendCalls` + + (`params`) => `Promise`\<[`SendCallsResult`](SendCallsResult)> +
+ `sendPreparedCalls` + + (`params`) => `Promise`\<[`SendPreparedCallsResult`](SendPreparedCallsResult)> +
+ `signMessage` + + (`params`) => `Promise`\<`Hex`> +
+ `signPreparedCalls` + + (`params`) => `Promise`\<[`SignPreparedCallsResult`](SignPreparedCallsResult)> +
+ `signSignatureRequest` + + (`params`) => `Promise`\<[`SignSignatureRequestResult`](SignSignatureRequestResult)> +
+ `signTypedData` + + (`params`) => `Promise`\<`Hex`> +
+ `waitForCallsStatus` + + (`params`) => `Promise`\<`WaitForCallsStatusReturnType`> +
diff --git a/docs/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletClient.mdx b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletClient.mdx new file mode 100644 index 0000000000..a83fca7bfe --- /dev/null +++ b/docs/pages/reference/wallet-apis/src/exports/type-aliases/SmartWalletClient.mdx @@ -0,0 +1,14 @@ +--- +title: SmartWalletClient +description: Overview of SmartWalletClient +slug: wallets/reference/wallet-apis/type-aliases/SmartWalletClient +layout: reference +--- + +{/* This file is auto-generated by TypeDoc. Do not edit manually. */} + +```ts +type SmartWalletClient = BaseWalletClient; +``` + +Defined in: [packages/wallet-apis/src/types.ts:38](https://github.com/alchemyplatform/aa-sdk/blob/67dcfd9e7fbe4dace8001af7087f2cbdfb7789a4/packages/wallet-apis/src/types.ts#L38) diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 8c010906bb..0000000000 --- a/examples/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# aa-sdk Examples - -## embedded-accounts-quickstart - -This dApp provides an example of how to use account kit to build a dApp that mints 100 tokens via a sponsored User Operation - -[View on Github!](https://github.com/alchemyplatform/embedded-accounts-quickstart) \ No newline at end of file diff --git a/examples/alchemy-privy-integration-example/.env.example b/examples/alchemy-privy-integration-example/.env.example deleted file mode 100644 index 72b2249c87..0000000000 --- a/examples/alchemy-privy-integration-example/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -NEXT_PUBLIC_ALCHEMY_API_KEY= -NEXT_PUBLIC_ALCHEMY_POLICY_ID= -NEXT_PUBLIC_ALCHEMY_SOLANA_POLICY_ID= -NEXT_PUBLIC_PRIVY_APP_ID= -NEXT_PUBLIC_PRIVY_CLIENT_ID= diff --git a/examples/alchemy-privy-integration-example/.eslintrc.json b/examples/alchemy-privy-integration-example/.eslintrc.json deleted file mode 100644 index ca475125e3..0000000000 --- a/examples/alchemy-privy-integration-example/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "next/core-web-vitals", - "rules": { - "import/extensions": "off", - "@next/next/no-html-link-for-pages": "off", - "jsdoc/require-param-type": "off", - "jsdoc/require-param-description": "off", - "jsdoc/require-returns-type": "off", - "jsdoc/require-returns-description": "off" - }, - "ignorePatterns": ["contracts"] -} diff --git a/examples/alchemy-privy-integration-example/.gitignore b/examples/alchemy-privy-integration-example/.gitignore deleted file mode 100644 index 8ac666ea0b..0000000000 --- a/examples/alchemy-privy-integration-example/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local -.env - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - diff --git a/examples/alchemy-privy-integration-example/ENV_SETUP.md b/examples/alchemy-privy-integration-example/ENV_SETUP.md deleted file mode 100644 index 8579b8fb85..0000000000 --- a/examples/alchemy-privy-integration-example/ENV_SETUP.md +++ /dev/null @@ -1,34 +0,0 @@ -# Environment Variables Setup - -Create a `.env.local` file in the root of this project with the following variables: - -```bash -# Privy Configuration -NEXT_PUBLIC_PRIVY_APP_ID=your-privy-app-id -NEXT_PUBLIC_PRIVY_CLIENT_ID=your-privy-client-id - -# Alchemy Configuration -NEXT_PUBLIC_ALCHEMY_API_KEY=your-alchemy-api-key -NEXT_PUBLIC_ALCHEMY_POLICY_ID=your-gas-policy-id -``` - -## Getting Your Keys - -### Privy App ID & Client ID - -1. Go to [Privy Dashboard](https://dashboard.privy.io/) -2. Create or select an app -3. Copy your **App ID** from the settings -4. Copy your **Client ID** from the API keys section - -### Alchemy API Key - -1. Go to [Alchemy Dashboard](https://dashboard.alchemy.com/) -2. Create or select an app -3. Copy your API key - -### Gas Manager Policy ID - -1. Go to [Gas Manager](https://dashboard.alchemy.com/gas-manager) -2. Create a new policy with your desired rules -3. Copy the policy ID diff --git a/examples/alchemy-privy-integration-example/README.md b/examples/alchemy-privy-integration-example/README.md deleted file mode 100644 index e49a34b16a..0000000000 --- a/examples/alchemy-privy-integration-example/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# Alchemy Privy Integration Example - -This example demonstrates how to integrate Alchemy's gas sponsorship and smart wallet features with Privy authentication using the `@account-kit/privy-integration` package. - -## Features - -- ✨ **Privy Authentication** - Email, social, and passkey login -- ⛽ **Gas Sponsorship** - Gasless transactions via Alchemy Gas Manager -- 🔄 **EIP-7702 Delegation** - Upgrade EOAs to smart accounts without migration -- 💱 **Token Swaps** - Swap tokens with sponsored gas -- 📦 **Simple Integration** - Drop-in React hooks from `@account-kit/privy-integration` - -## What This Example Shows - -This example demonstrates three key integrations: - -### 1. Send Transaction Component - -Shows how to use `useAlchemySendTransaction()` to send ETH with gas sponsorship: - -```tsx -const { sendTransaction, isLoading } = useAlchemySendTransaction(); - -await sendTransaction({ - to: recipientAddress, - value: parseEther(amount), - data: "0x", -}); -``` - -### 2. Token Swap Component - -Shows the two-step swap flow using `useAlchemyPrepareSwap()` and `useAlchemySubmitSwap()`: - -```tsx -// Step 1: Get quote -const { prepareSwap } = useAlchemyPrepareSwap(); -const preparedSwap = await prepareSwap({ fromToken, toToken, minimumToAmount }); - -// Step 2: Execute swap -const { submitSwap } = useAlchemySubmitSwap(); -await submitSwap(preparedSwap); -``` - -### 3. Account Info Component - -Shows how to fetch and display user wallet information using Privy hooks and viem. - -## Getting Started - -### 1. Install Dependencies - -```bash -npm install -# or -yarn install -# or -pnpm install -``` - -### 2. Configure Environment Variables - -Copy `.env.example` to `.env.local`: - -```bash -cp .env.example .env.local -``` - -Then fill in your credentials: - -``` -NEXT_PUBLIC_PRIVY_APP_ID=your-privy-app-id -NEXT_PUBLIC_PRIVY_CLIENT_ID=your-privy-client-id -NEXT_PUBLIC_ALCHEMY_API_KEY=your-alchemy-api-key -NEXT_PUBLIC_ALCHEMY_POLICY_ID=your-gas-policy-id -``` - -#### Getting Your Keys - -- **Privy App ID**: Get it from [Privy Dashboard](https://dashboard.privy.io/) -- **Alchemy API Key**: Get it from [Alchemy Dashboard](https://dashboard.alchemy.com/) -- **Gas Policy ID**: Create a policy in [Gas Manager](https://dashboard.alchemy.com/gas-manager) - -### 3. Run the Development Server - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -## Project Structure - -``` -src/ -├── app/ -│ ├── layout.tsx # Root layout with providers -│ ├── page.tsx # Main app page with authentication flow -│ ├── providers.tsx # Privy + Alchemy provider setup -│ └── styles.css # Simple global styles -└── components/ - ├── AccountInfo.tsx # Display wallet info and balance - ├── SendTransaction.tsx # Send ETH with gas sponsorship - └── TokenSwap.tsx # Two-step token swap flow -``` - -### Key Files to Study - -- **`src/app/providers.tsx`** - Shows how to wrap your app with `AlchemyProvider` and `PrivyProvider` -- **`src/components/SendTransaction.tsx`** - Complete example of `useAlchemySendTransaction()` -- **`src/components/TokenSwap.tsx`** - Complete example of swap prepare + submit flow diff --git a/examples/alchemy-privy-integration-example/next.config.js b/examples/alchemy-privy-integration-example/next.config.js deleted file mode 100644 index 488cd6f4ac..0000000000 --- a/examples/alchemy-privy-integration-example/next.config.js +++ /dev/null @@ -1,5 +0,0 @@ -const nextConfig = { - reactStrictMode: true, -}; - -module.exports = nextConfig; diff --git a/examples/alchemy-privy-integration-example/package.json b/examples/alchemy-privy-integration-example/package.json deleted file mode 100644 index 04f4a57ead..0000000000 --- a/examples/alchemy-privy-integration-example/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "alchemy-privy-integration-example", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint" - }, - "dependencies": { - "@account-kit/privy-integration": "*", - "@privy-io/react-auth": "^3.3.0", - "@solana-program/memo": "^0.9.0", - "next": "^14.0.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "viem": "^2.45.0" - }, - "devDependencies": { - "@types/node": "^20.0.0", - "@types/react": "^18.2.0", - "@types/react-dom": "^18.2.0", - "eslint": "^8.0.0", - "eslint-config-next": "^14.0.0", - "typescript": "^5.0.0" - } -} diff --git a/examples/alchemy-privy-integration-example/src/app/layout.tsx b/examples/alchemy-privy-integration-example/src/app/layout.tsx deleted file mode 100644 index 1510160be7..0000000000 --- a/examples/alchemy-privy-integration-example/src/app/layout.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { Metadata } from "next"; -import { Providers } from "./providers"; -import "./styles.css"; - -export const metadata: Metadata = { - title: "Alchemy Privy Integration Example", - description: - "Example app using Alchemy gas sponsorship with Privy authentication", -}; - -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - - - {children} - - - ); -} diff --git a/examples/alchemy-privy-integration-example/src/app/page.tsx b/examples/alchemy-privy-integration-example/src/app/page.tsx deleted file mode 100644 index b8a93a344f..0000000000 --- a/examples/alchemy-privy-integration-example/src/app/page.tsx +++ /dev/null @@ -1,73 +0,0 @@ -"use client"; - -import { useState } from "react"; -import { usePrivy } from "@privy-io/react-auth"; -import { AccountInfo } from "@/components/AccountInfo"; -import { SendTransaction } from "@/components/SendTransaction"; -import { TokenSwap } from "@/components/TokenSwap"; -import { NetworkSwitcher } from "@/components/NetworkSwitcher"; -import { SolanaTransactionCard } from "@/components/SolanaTransactionCard"; - -export default function Home() { - const { ready, authenticated, login } = usePrivy(); - const [balanceRefreshTrigger, setBalanceRefreshTrigger] = useState(0); - - const refreshBalances = () => { - setBalanceRefreshTrigger((prev) => prev + 1); - }; - - // Show loading state while Privy initializes - if (!ready) { - return ( -
-
-

Loading...

-
-
- ); - } - - // Show login screen if not authenticated - if (!authenticated) { - return ( -
-
-

Alchemy + Privy Integration

-

- Connect your wallet to get started with gas-sponsored transactions -

- -
-
- ); - } - - // Main app view when authenticated - return ( -
-
-

Alchemy + Privy Integration Example

-

- Demonstrating gas sponsorship and token swaps with owner auth mode -

-
- -
- {/* Left column - Account info */} -
- - -
- - {/* Right column - Transaction examples */} -
- - - -
-
-
- ); -} diff --git a/examples/alchemy-privy-integration-example/src/app/providers.tsx b/examples/alchemy-privy-integration-example/src/app/providers.tsx deleted file mode 100644 index 459759cce9..0000000000 --- a/examples/alchemy-privy-integration-example/src/app/providers.tsx +++ /dev/null @@ -1,67 +0,0 @@ -"use client"; - -import { PrivyProvider } from "@privy-io/react-auth"; -import { AlchemyProvider } from "@account-kit/privy-integration"; -import { baseSepolia } from "viem/chains"; -import { createSolanaRpc, createSolanaRpcSubscriptions } from "@solana/kit"; - -export function Providers({ children }: { children: React.ReactNode }) { - const privyAppId = process.env.NEXT_PUBLIC_PRIVY_APP_ID; - const alchemyApiKey = process.env.NEXT_PUBLIC_ALCHEMY_API_KEY; - const policyId = process.env.NEXT_PUBLIC_ALCHEMY_POLICY_ID; - const clientId = process.env.NEXT_PUBLIC_PRIVY_CLIENT_ID; - const solanaPolicyId = process.env.NEXT_PUBLIC_ALCHEMY_SOLANA_POLICY_ID; - - if (!clientId) { - throw new Error("NEXT_PUBLIC_PRIVY_CLIENT_ID is not set"); - } - - if (!privyAppId) { - throw new Error("NEXT_PUBLIC_PRIVY_APP_ID is not set"); - } - - if (!alchemyApiKey) { - throw new Error("NEXT_PUBLIC_ALCHEMY_API_KEY is not set"); - } - - return ( - - - {children as any} - - - ); -} diff --git a/examples/alchemy-privy-integration-example/src/app/styles.css b/examples/alchemy-privy-integration-example/src/app/styles.css deleted file mode 100644 index 41e67f8ac9..0000000000 --- a/examples/alchemy-privy-integration-example/src/app/styles.css +++ /dev/null @@ -1,215 +0,0 @@ -* { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - background-color: #f5f5f5; - color: #333; - line-height: 1.6; -} - -.container { - max-width: 1200px; - margin: 0 auto; - padding: 2rem; -} - -.header { - margin-bottom: 2rem; -} - -.header h1 { - font-size: 2rem; - font-weight: bold; - margin-bottom: 0.5rem; -} - -.card { - background: white; - border-radius: 8px; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - padding: 1.5rem; - margin-bottom: 1.5rem; -} - -.card h2 { - font-size: 1.25rem; - font-weight: 600; - margin-bottom: 0.5rem; -} - -.card p { - color: #666; - margin-bottom: 1rem; -} - -.form-group { - margin-bottom: 1rem; -} - -.form-group label { - display: block; - font-weight: 500; - margin-bottom: 0.5rem; - font-size: 0.875rem; -} - -.form-group input { - width: 100%; - padding: 0.5rem; - border: 1px solid #ddd; - border-radius: 4px; - font-size: 1rem; -} - -.form-group input:focus { - outline: none; - border-color: #0070f3; -} - -.button { - background-color: #0070f3; - color: white; - border: none; - border-radius: 4px; - padding: 0.625rem 1rem; - font-size: 1rem; - font-weight: 500; - cursor: pointer; - transition: background-color 0.2s; - width: 100%; -} - -.button:hover:not(:disabled) { - background-color: #0051cc; -} - -.button:disabled { - background-color: #ccc; - cursor: not-allowed; -} - -.button.button-secondary { - background-color: #666; -} - -.button.button-secondary:hover:not(:disabled) { - background-color: #555; -} - -.button.button-danger { - background-color: #dc2626; -} - -.button.button-danger:hover:not(:disabled) { - background-color: #b91c1c; -} - -.error { - color: #dc2626; - font-size: 0.875rem; - margin-top: 0.25rem; -} - -.success { - color: #16a34a; - font-size: 0.875rem; - margin-top: 0.25rem; -} - -.info-row { - display: flex; - justify-content: space-between; - padding: 0.75rem 0; - border-bottom: 1px solid #eee; -} - -.info-row:last-child { - border-bottom: none; -} - -.info-label { - font-weight: 500; - color: #666; -} - -.info-value { - font-family: "Monaco", "Menlo", monospace; - font-size: 0.875rem; - word-break: break-all; -} - -.quote-details { - background: #f9fafb; - border: 1px solid #e5e7eb; - border-radius: 4px; - padding: 1rem; - margin-bottom: 1rem; -} - -.button-group { - display: flex; - gap: 0.5rem; -} - -.button-group .button { - flex: 1; -} - -.loading { - display: inline-block; - width: 1rem; - height: 1rem; - border: 2px solid rgba(255, 255, 255, 0.3); - border-radius: 50%; - border-top-color: white; - animation: spin 0.6s linear infinite; - margin-right: 0.5rem; -} - -@keyframes spin { - to { - transform: rotate(360deg); - } -} - -.center-screen { - min-height: 100vh; - display: flex; - align-items: center; - justify-content: center; -} - -.login-card { - max-width: 400px; - text-align: center; -} - -.grid { - display: grid; - gap: 1.5rem; -} - -@media (min-width: 768px) { - .grid-cols-2 { - grid-template-columns: 1fr 2fr; - } -} - -.helper-text { - font-size: 0.75rem; - color: #666; - margin-top: 0.25rem; -} - -.mono { - font-family: "Monaco", "Menlo", monospace; - font-size: 0.875rem; -} diff --git a/examples/alchemy-privy-integration-example/src/components/AccountInfo.tsx b/examples/alchemy-privy-integration-example/src/components/AccountInfo.tsx deleted file mode 100644 index f0a0776eed..0000000000 --- a/examples/alchemy-privy-integration-example/src/components/AccountInfo.tsx +++ /dev/null @@ -1,190 +0,0 @@ -"use client"; - -import { usePrivy } from "@privy-io/react-auth"; -import { useEffect, useState, useCallback } from "react"; -import { - createPublicClient, - http, - formatEther, - formatUnits, - type Address, -} from "viem"; -import { base, baseSepolia } from "viem/chains"; -import { useWallets } from "@privy-io/react-auth"; -import { - useAlchemyClient, - useAlchemyConfig, -} from "@account-kit/privy-integration"; - -const USDC_ADDRESS_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; -const USDC_ADDRESS_BASE_SEPOLIA = "0x036CbD53842c5426634e7929541eC2318f3dCF7e"; - -const ERC20_ABI = [ - { - constant: true, - inputs: [{ name: "_owner", type: "address" }], - name: "balanceOf", - outputs: [{ name: "balance", type: "uint256" }], - type: "function", - }, -] as const; - -export function AccountInfo({ refreshTrigger }: { refreshTrigger?: number }) { - const { user, logout } = usePrivy(); - const { wallets } = useWallets(); - const { getClient } = useAlchemyClient(); - const config = useAlchemyConfig(); - const [ethBalance, setEthBalance] = useState(null); - const [usdcBalance, setUsdcBalance] = useState(null); - const [isLoading, setIsLoading] = useState(false); - const [currentChain, setCurrentChain] = useState(null); - const [smartAccountAddress, setSmartAccountAddress] = useState( - null, - ); - - // Detect current chain - useEffect(() => { - const wallet = wallets.find((w) => w.walletClientType === "privy"); - if (!wallet) return; - - const chainIdStr = wallet.chainId?.toString(); - const chainId = chainIdStr?.includes(":") - ? Number(chainIdStr.split(":")[1]) - : Number(chainIdStr); - - setCurrentChain(chainId); - }, [wallets]); - - const fetchBalances = useCallback(async () => { - if (!user?.wallet?.address || currentChain === null) { - setEthBalance(null); - setUsdcBalance(null); - setSmartAccountAddress(null); - return; - } - - setIsLoading(true); - try { - const chain = currentChain === base.id ? base : baseSepolia; - const usdcAddress = - currentChain === base.id - ? USDC_ADDRESS_BASE - : USDC_ADDRESS_BASE_SEPOLIA; - - const publicClient = createPublicClient({ - chain, - transport: http(), - }); - - const { account } = await getClient(); - setSmartAccountAddress(account.address); - - // Fetch ETH balance (from smart account in owner mode, from signer in eip7702 mode) - const balanceWei = await publicClient.getBalance({ - address: account.address, - }); - setEthBalance(formatEther(balanceWei)); - - // Fetch USDC balance (from smart account in owner mode, from signer in eip7702 mode) - try { - const usdcBalanceWei = await publicClient.readContract({ - address: usdcAddress as Address, - abi: ERC20_ABI, - functionName: "balanceOf", - args: [account.address], - }); - setUsdcBalance(formatUnits(usdcBalanceWei as bigint, 6)); - } catch (error) { - console.error("Failed to fetch USDC balance:", error); - setUsdcBalance("0"); - } - } catch (error) { - console.error("Failed to fetch balances:", error); - setEthBalance("Error"); - setUsdcBalance("Error"); - } finally { - setIsLoading(false); - } - }, [user?.wallet?.address, currentChain, getClient]); - - // Fetch balances when wallet, chain, or refreshTrigger changes - useEffect(() => { - fetchBalances(); - }, [fetchBalances, refreshTrigger]); - - const chainName = - currentChain === base.id - ? "Base" - : currentChain === baseSepolia.id - ? "Base Sepolia" - : "Unknown"; - - return ( -
-

Account Information

-
-
- Email: - {user?.email?.address || "N/A"} -
-
- Signer Address: - - {user?.wallet?.address || "—"} - -
- {config.accountAuthMode === "owner" && ( -
- Smart Account: - - {isLoading ? "Loading..." : smartAccountAddress || "—"} - -
- )} -
- Network: - {chainName} -
-
- - ETH Balance - {config.accountAuthMode === "owner" - ? " (Smart Account)" - : " (Signer)"} - : - - - {isLoading - ? "Loading..." - : ethBalance - ? `${parseFloat(ethBalance).toFixed(6)} ETH` - : "—"} - -
-
- - USDC Balance - {config.accountAuthMode === "owner" - ? " (Smart Account)" - : " (Signer)"} - : - - - {isLoading - ? "Loading..." - : usdcBalance - ? `${parseFloat(usdcBalance).toFixed(2)} USDC` - : "—"} - -
-
- -
- ); -} diff --git a/examples/alchemy-privy-integration-example/src/components/NetworkSwitcher.tsx b/examples/alchemy-privy-integration-example/src/components/NetworkSwitcher.tsx deleted file mode 100644 index d7162939a7..0000000000 --- a/examples/alchemy-privy-integration-example/src/components/NetworkSwitcher.tsx +++ /dev/null @@ -1,94 +0,0 @@ -"use client"; - -import { useWallets } from "@privy-io/react-auth"; -import { useEffect, useState } from "react"; -import { base, baseSepolia } from "viem/chains"; - -export function NetworkSwitcher({ - onNetworkChange, -}: { - onNetworkChange?: () => void; -}) { - const { wallets } = useWallets(); - const [currentChain, setCurrentChain] = useState(null); - const [isSwitching, setIsSwitching] = useState(false); - const [error, setError] = useState(""); - - // Sync with wallet's current chain - useEffect(() => { - const wallet = wallets.find((w) => w.walletClientType === "privy"); - if (!wallet) return; - - const chainIdStr = wallet.chainId?.toString(); - const chainId = chainIdStr?.includes(":") - ? Number(chainIdStr.split(":")[1]) - : Number(chainIdStr); - - if (currentChain !== chainId) { - setCurrentChain(chainId); - } - }, [wallets, currentChain]); - - const handleSwitch = async (chainId: number) => { - const wallet = wallets.find((w) => w.walletClientType === "privy"); - if (!wallet) { - setError("No wallet found"); - return; - } - - setIsSwitching(true); - setError(""); - - try { - await wallet.switchChain(chainId); - setCurrentChain(chainId); - - // Trigger balance refresh after chain switch - if (onNetworkChange) { - onNetworkChange(); - } - } catch (err) { - setError(err instanceof Error ? err.message : "Failed to switch chain"); - } finally { - setIsSwitching(false); - } - }; - - const getChainName = (chainId: number | null) => { - if (chainId === base.id) return "Base"; - if (chainId === baseSepolia.id) return "Base Sepolia"; - return "Unknown"; - }; - - return ( -
-

Network

-

Current: {getChainName(currentChain)}

- - {error && ( -
- {error} -
- )} - -
- - -
-
- ); -} diff --git a/examples/alchemy-privy-integration-example/src/components/SendTransaction.tsx b/examples/alchemy-privy-integration-example/src/components/SendTransaction.tsx deleted file mode 100644 index 2c2d80eafc..0000000000 --- a/examples/alchemy-privy-integration-example/src/components/SendTransaction.tsx +++ /dev/null @@ -1,150 +0,0 @@ -"use client"; - -import { useState, useEffect } from "react"; -import { useAlchemySendTransaction } from "@account-kit/privy-integration"; -import { parseEther, isAddress, type Address } from "viem"; -import { useWallets } from "@privy-io/react-auth"; -import { base, baseSepolia } from "viem/chains"; - -/** - * Get block explorer URL for a transaction hash based on chain ID - * - * @param chainId - * @param txHash - * @returns - */ -function getExplorerUrl(chainId: number, txHash: string): string { - const explorers: Record = { - [base.id]: { name: "BaseScan", url: "https://basescan.org" }, - [baseSepolia.id]: { - name: "Base Sepolia Explorer", - url: "https://sepolia.basescan.org", - }, - }; - - const explorer = explorers[chainId] || { - name: "Explorer", - url: `https://etherscan.io`, - }; - return `View on ${explorer.name}: ${explorer.url}/tx/${txHash}`; -} - -export function SendTransaction({ onSuccess }: { onSuccess?: () => void }) { - const { sendTransaction, isLoading, error } = useAlchemySendTransaction(); - const { wallets } = useWallets(); - - const [recipient, setRecipient] = useState(""); - const [amount, setAmount] = useState("0.001"); - const [validationError, setValidationError] = useState(""); - const [successMessage, setSuccessMessage] = useState(""); - const [currentChain, setCurrentChain] = useState(null); - - // Sync with wallet's current chain - useEffect(() => { - const wallet = wallets.find((w) => w.walletClientType === "privy"); - if (!wallet) return; - - const chainIdStr = wallet.chainId?.toString(); - const chainId = chainIdStr?.includes(":") - ? Number(chainIdStr.split(":")[1]) - : Number(chainIdStr); - - setCurrentChain(chainId); - }, [wallets]); - - const handleSubmit = async (e: React.FormEvent) => { - e.preventDefault(); - setValidationError(""); - setSuccessMessage(""); - - // Validation - if (!recipient) { - setValidationError("Recipient address is required"); - return; - } - - if (!isAddress(recipient)) { - setValidationError("Invalid Ethereum address"); - return; - } - - if (!amount || parseFloat(amount) <= 0) { - setValidationError("Amount must be greater than 0"); - return; - } - - try { - const result = await sendTransaction({ - to: recipient as Address, - value: parseEther(amount), - data: "0x", - }); - - const explorerMessage = currentChain - ? getExplorerUrl(currentChain, result.txnHash) - : `Transaction sent! Hash: ${result.txnHash}`; - setSuccessMessage(explorerMessage); - setRecipient(""); - setAmount("0.001"); - - // Trigger balance refresh - if (onSuccess) { - onSuccess(); - } - } catch (err) { - setValidationError( - err instanceof Error ? err.message : "Transaction failed", - ); - } - }; - - return ( -
-

Send Transaction

-

Transfer ETH to another address with gas sponsorship

- -
-
- - setRecipient(e.target.value)} - placeholder="0x..." - disabled={isLoading} - /> -
- -
- - setAmount(e.target.value)} - placeholder="0.001" - step="0.001" - min="0" - disabled={isLoading} - /> -
- - {validationError &&
{validationError}
} - {error &&
{error.message}
} - {successMessage &&
{successMessage}
} - - -
-
- ); -} diff --git a/examples/alchemy-privy-integration-example/src/components/SolanaTransactionCard.tsx b/examples/alchemy-privy-integration-example/src/components/SolanaTransactionCard.tsx deleted file mode 100644 index c926c2fece..0000000000 --- a/examples/alchemy-privy-integration-example/src/components/SolanaTransactionCard.tsx +++ /dev/null @@ -1,148 +0,0 @@ -import { useState } from "react"; -import { usePrivy } from "@privy-io/react-auth"; -import { useCreateWallet, useWallets } from "@privy-io/react-auth/solana"; -import { useAlchemySolanaTransaction } from "@account-kit/privy-integration/solana"; - -export function SolanaTransactionCard() { - const [toAddress, setToAddress] = useState( - "EsLn7Zs91QvaZxoiR8udACnc2SbMbG42wJKUnFhTJfyu", - ); - const [lamports, setLamports] = useState("0"); - const { ready: privyReady } = usePrivy(); - const { wallets, ready: walletsReady } = useWallets(); - const { createWallet } = useCreateWallet(); - - const { sendTransactionAsync, isPending, error, data, reset } = - useAlchemySolanaTransaction(); - - const solanaWallet = wallets[0]; - - const onSend = async () => { - try { - if (!toAddress.trim()) { - throw new Error("Please enter a recipient address"); - } - const amount = Number(lamports || "0"); - if (isNaN(amount) || amount < 0) { - throw new Error("Invalid lamports amount"); - } - await sendTransactionAsync({ - transfer: { - amount, - toAddress: toAddress.trim(), - }, - }); - } catch (e) { - // handled via error state - } - }; - - if (!privyReady || !walletsReady) { - return ( -
-

Send Solana Transaction

-

Loading wallets...

-
- ); - } - - return ( -
-

Send Solana Transaction

-

- Test the Privy + Alchemy Solana hook. For sponsorship, use an Alchemy - Solana RPC URL and a valid Policy ID. -

- - {!solanaWallet && ( -
-

- No Solana wallet found. Create one to send transactions. -

- -
- )} - - {solanaWallet && ( -

- ✓ Solana Wallet: {solanaWallet.address?.slice(0, 8)}... - {solanaWallet.address?.slice(-6)} -

- )} - -
-
- - setToAddress(e.target.value)} - className="input" - /> -
-
- - setLamports(e.target.value)} - className="input" - /> -
-
- -
- - -
- - {data?.hash && ( -

- Sent! Tx: {data.hash} -

- )} - {error && ( -

{error.message}

- )} -
- ); -} diff --git a/examples/alchemy-privy-integration-example/src/components/TokenSwap.tsx b/examples/alchemy-privy-integration-example/src/components/TokenSwap.tsx deleted file mode 100644 index c717bf28e4..0000000000 --- a/examples/alchemy-privy-integration-example/src/components/TokenSwap.tsx +++ /dev/null @@ -1,333 +0,0 @@ -"use client"; - -import { useState, useEffect } from "react"; -import { - useAlchemyPrepareSwap, - useAlchemySubmitSwap, - useAlchemyClient, - type PrepareSwapResult, -} from "@account-kit/privy-integration"; -import { formatEther, formatUnits, type Address, type Hex } from "viem"; -import { useWallets } from "@privy-io/react-auth"; -import { base, baseSepolia } from "viem/chains"; - -const ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; -const USDC_ADDRESS_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"; - -/** - * Get block explorer URL for a transaction hash based on chain ID - * - * @param chainId - * @param txHash - * @returns - */ -function getExplorerUrl(chainId: number, txHash: string): string { - const explorers = { - [base.id]: { - name: "BaseScan", - url: base.blockExplorers?.default?.url || "https://basescan.org", - }, - [baseSepolia.id]: { - name: "Base Sepolia Explorer", - url: - baseSepolia.blockExplorers?.default?.url || - "https://sepolia.basescan.org", - }, - }; - - const explorer = explorers[chainId as keyof typeof explorers] || { - name: "Explorer", - url: `https://etherscan.io`, - }; - return `View on ${explorer.name}: ${explorer.url}/tx/${txHash}`; -} - -export function TokenSwap({ onSuccess }: { onSuccess?: () => void }) { - const { wallets } = useWallets(); - const { getClient } = useAlchemyClient(); - const prepareSwap = useAlchemyPrepareSwap(); - const submitSwap = useAlchemySubmitSwap(); - - const [currentChain, setCurrentChain] = useState(null); - - // Sync with wallet's current chain - useEffect(() => { - const wallet = wallets.find((w) => w.walletClientType === "privy"); - if (!wallet) return; - - const chainIdStr = wallet.chainId?.toString(); - const chainId = chainIdStr?.includes(":") - ? Number(chainIdStr.split(":")[1]) - : Number(chainIdStr); - - setCurrentChain(chainId); - }, [wallets]); - - // Allow flipping between USDC → ETH and ETH → USDC - const [fromToken, setFromToken] = useState(USDC_ADDRESS_BASE); - const [toToken, setToToken] = useState(ETH_ADDRESS); - const [swapAmount, setSwapAmount] = useState("1"); - - const isSwappingFromUsdc = fromToken === USDC_ADDRESS_BASE; - const fromDecimals = isSwappingFromUsdc ? 6 : 18; - const fromSymbol = isSwappingFromUsdc ? "USDC" : "ETH"; - const toSymbol = isSwappingFromUsdc ? "ETH" : "USDC"; - const [validationError, setValidationError] = useState(""); - const [successMessage, setSuccessMessage] = useState(""); - const [preparedSwap, setPreparedSwap] = useState( - null, - ); - - const flipSwapDirection = () => { - // Swap the from and to tokens - const tempFrom = fromToken; - setFromToken(toToken); - setToToken(tempFrom); - // Reset swap amount to default - setSwapAmount(toToken === USDC_ADDRESS_BASE ? "1" : "0.001"); - // Clear any previous quote - setPreparedSwap(null); - setValidationError(""); - setSuccessMessage(""); - prepareSwap.reset(); - }; - - const handlePrepare = async (e: React.FormEvent) => { - e.preventDefault(); - setValidationError(""); - setSuccessMessage(""); - - // Validation - if (!swapAmount || parseFloat(swapAmount) <= 0) { - setValidationError("Swap amount must be greater than 0"); - return; - } - - try { - // Use correct decimals based on source token - const amountInSmallestUnit = BigInt( - parseFloat(swapAmount) * 10 ** fromDecimals, - ); - - // Get the account address to use for the swap - // This ensures we use the correct address for both eip7702 and owner modes - const { account } = await getClient(); - - const result = await prepareSwap.prepareSwap({ - from: account.address as Address, - fromToken: fromToken as Address, - toToken: toToken as Address, - fromAmount: `0x${amountInSmallestUnit.toString(16)}` as Hex, - }); - - setPreparedSwap(result); - } catch (err) { - setValidationError( - err instanceof Error ? err.message : "Failed to prepare swap", - ); - } - }; - - const handleExecute = async () => { - if (!preparedSwap) return; - - setValidationError(""); - setSuccessMessage(""); - - try { - const result = await submitSwap.submitSwap(preparedSwap); - const explorerMessage = currentChain - ? getExplorerUrl(currentChain, result.txnHash) - : `Swap successful! Transaction: ${result.txnHash}`; - setSuccessMessage(explorerMessage); - - // Reset form - setPreparedSwap(null); - setSwapAmount(isSwappingFromUsdc ? "1" : "0.001"); - prepareSwap.reset(); - submitSwap.reset(); - - // Trigger balance refresh - if (onSuccess) { - onSuccess(); - } - } catch (err) { - setValidationError(err instanceof Error ? err.message : "Swap failed"); - } - }; - - const handleCancel = () => { - setPreparedSwap(null); - setValidationError(""); - setSuccessMessage(""); - prepareSwap.reset(); - submitSwap.reset(); - }; - - const isOnBaseMainnet = currentChain === base.id; - const isDisabled = !isOnBaseMainnet; - - return ( -
-

Token Swap

-

Swap tokens with gas sponsorship

- - {!isOnBaseMainnet && ( -
- ⚠️ Swaps only work on Base mainnet. Please switch networks above. -
- )} - - {!preparedSwap ? ( -
-
-
- - -
-
- {fromSymbol}{toSymbol} -
- Swapping {fromSymbol} ({fromDecimals} decimals) for {toSymbol}{" "} - on Base -
-
-
- -
- - setSwapAmount(e.target.value)} - placeholder="1.0" - step="any" - min="0" - disabled={prepareSwap.isLoading || isDisabled} - /> -
- Enter {fromSymbol} amount (e.g.,{" "} - {isSwappingFromUsdc ? "1 = 1 USDC" : "0.001 = 0.001 ETH"}) -
-
- - {validationError &&
{validationError}
} - {prepareSwap.error && ( -
{prepareSwap.error.message}
- )} - - -
- ) : ( -
-
-
- Swapping: - - {isSwappingFromUsdc - ? `${formatUnits(BigInt(preparedSwap.quote.fromAmount), 6)} USDC` - : `${formatEther(BigInt(preparedSwap.quote.fromAmount))} ETH`} - -
-
- You'll Receive (min): - - {isSwappingFromUsdc - ? `${formatEther(BigInt(preparedSwap.quote.minimumToAmount))} ETH` - : `${formatUnits(BigInt(preparedSwap.quote.minimumToAmount), 6)} USDC`} - -
-
- Quote Expires: - - {new Date( - parseInt(preparedSwap.quote.expiry, 16) * 1000, - ).toLocaleString()} - -
-
- - {validationError &&
{validationError}
} - {submitSwap.error && ( -
{submitSwap.error.message}
- )} - {successMessage &&
{successMessage}
} - -
- - -
-
- )} -
- ); -} diff --git a/examples/alchemy-privy-integration-example/tsconfig.json b/examples/alchemy-privy-integration-example/tsconfig.json deleted file mode 100644 index d7e05e54df..0000000000 --- a/examples/alchemy-privy-integration-example/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/examples/contracts/AccountKitToken/foundry.toml b/examples/contracts/AccountKitToken/foundry.toml deleted file mode 100644 index c7b8cf9aa1..0000000000 --- a/examples/contracts/AccountKitToken/foundry.toml +++ /dev/null @@ -1,7 +0,0 @@ -[profile.default] -src = "src" -out = "out" -libs = ["lib"] -remappings = ['@openzeppelin/=lib/openzeppelin-contracts/'] - -# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options diff --git a/examples/contracts/AccountKitToken/migrations.md b/examples/contracts/AccountKitToken/migrations.md deleted file mode 100644 index 0063dba949..0000000000 --- a/examples/contracts/AccountKitToken/migrations.md +++ /dev/null @@ -1,7 +0,0 @@ -# Ethereum Sepolia - -## Version 1 - -Deployer: 0xD8Ea779b8FFC1096CA422D40588C4c0641709890 -Deployed to: 0x6F3c1baeF15F2Ac6eD52ef897f60cac0B10d90C3 -Transaction hash: 0xa3ada31aabd703b91d19552052ac488a387189ac6d460a84ffafc69b3a3d6a22 diff --git a/examples/contracts/AccountKitToken/src/Contract.sol b/examples/contracts/AccountKitToken/src/Contract.sol deleted file mode 100644 index f049b1eec6..0000000000 --- a/examples/contracts/AccountKitToken/src/Contract.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.13; - -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -contract Token is ERC20 { - constructor() ERC20 ("AccountKitToken", "ACKT") {} - - function mint(address recipient) public { - _mint(recipient, 1.0 * 10 ^ decimals()); - } -} diff --git a/examples/contracts/AccountKitToken/test/Contract.t.sol b/examples/contracts/AccountKitToken/test/Contract.t.sol deleted file mode 100644 index 6a7851aa89..0000000000 --- a/examples/contracts/AccountKitToken/test/Contract.t.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.13; - -import {Test, console2} from "forge-std/Test.sol"; -import {Token} from "../src/Contract.sol"; - -contract TokenTest is Test { - Token public token; - - function setUp() public { - token = new Token(); - } - - function test_mint(address addr) public { - token.mint(addr); - assertEq(token.balanceOf(addr), 1.0 * 10 ^ token.decimals()); - } - - function test_name() public { - assertEq(token.name(), "AccountKitToken"); - } - - function test_symbol() public { - assertEq(token.symbol(), "ACKT"); - } -} diff --git a/examples/contracts/DAAppNFT/foundry.toml b/examples/contracts/DAAppNFT/foundry.toml deleted file mode 100644 index 61ed5f8c22..0000000000 --- a/examples/contracts/DAAppNFT/foundry.toml +++ /dev/null @@ -1,8 +0,0 @@ -[profile.default] -src = 'src' -out = 'out' -libs = ['lib'] -remappings = ['ds-test/=lib/ds-test/src/'] -solc = "0.8.10" - -# See more config options https://github.com/gakonst/foundry/tree/master/config diff --git a/examples/contracts/DAAppNFT/lib/ds-test b/examples/contracts/DAAppNFT/lib/ds-test deleted file mode 160000 index e282159d51..0000000000 --- a/examples/contracts/DAAppNFT/lib/ds-test +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e282159d5170298eb2455a6c05280ab5a73a4ef0 diff --git a/examples/contracts/DAAppNFT/lib/forge-std b/examples/contracts/DAAppNFT/lib/forge-std deleted file mode 160000 index b490ef246c..0000000000 --- a/examples/contracts/DAAppNFT/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b490ef246c429fc068425830d533ffac808d165a diff --git a/examples/contracts/DAAppNFT/lib/openzeppelin-contracts b/examples/contracts/DAAppNFT/lib/openzeppelin-contracts deleted file mode 160000 index 09329f8a18..0000000000 --- a/examples/contracts/DAAppNFT/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 09329f8a18f08df65863a5060f6e776bf7fccacf diff --git a/examples/contracts/DAAppNFT/lib/solmate b/examples/contracts/DAAppNFT/lib/solmate deleted file mode 160000 index 2001af43ae..0000000000 --- a/examples/contracts/DAAppNFT/lib/solmate +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2001af43aedb46fdc2335d2a7714fb2dae7cfcd1 diff --git a/examples/contracts/DAAppNFT/migrations.md b/examples/contracts/DAAppNFT/migrations.md deleted file mode 100644 index c8a75db445..0000000000 --- a/examples/contracts/DAAppNFT/migrations.md +++ /dev/null @@ -1,45 +0,0 @@ -# Polygon Mumbai - -## Version 1 - -Deployer: 0x15a411507e901f26965f0ebcd3155834b058a6b2 -Deployed to: 0xb7b9424ef3d1b9086b7e53276c4aad68a1dd971c -Transaction hash: 0x46f95ea67e2b103f607884a87fd25d53d619eaa7d67437f1d7cb51f7c99b6de2 - -## Version 2 - -Deployer: 0x15a411507e901f26965f0ebcd3155834b058a6b2 -Deployed to: 0x5679b0de84bba361d31b2e7152ab20f0f8565245 -Transaction hash: 0x59b65a2bd7a730efbea86376c986efcc2cd65c076f39a47cea84a6d4246c8d03 - -# Polygon Mainnet - -## Version 1 - -Deployer: 0x15a411507e901f26965f0ebcd3155834b058a6b2 -Deployed to: 0xb7b9424ef3d1b9086b7e53276c4aad68a1dd971c -Transaction hash: 0xdc73899cf183cf852605c7a7473c0b110554155d5f4cc03452c11a4ce0d4ff33 - -# Arbitrum Mainnet - -Deployer: 0x15a411507e901f26965f0ebcd3155834b058a6b2 -Deployed to: 0xb7b9424ef3d1b9086b7e53276c4aad68a1dd971c -Transaction hash: 0x4ca9a016935f5634d009e4580ea0dc9c4b3edf0d8 - -# Opt Mainnet - -Deployer: 0xD8Ea779b8FFC1096CA422D40588C4c0641709890 -Deployed to: 0x835629117Abb8cfe20a2e8717C691905A4725b7c -Transaction hash: 0x9f33c06fb1016da9922927cbd9ff2eca2bf239d8779b17079c05f3f5fd3ae828 - -# Arbitrum Sepolia - -## Version 1 -Deployer: 0xD8Ea779b8FFC1096CA422D40588C4c0641709890 -Deployed to: 0xE3aE65fC1bBd58719cc1D2496406B8133578BfF3 -Transaction hash: 0xf1254c4e37078047c244b97f2ad5c5ce93b12f1b8eecef19a84516a72c3ae4e3 - -## Version 2 -Deployer: 0xD8Ea779b8FFC1096CA422D40588C4c0641709890 -Deployed to: 0x92ccF22A61f92d83463b04090A32dA9a6D958f64 -Transaction hash: 0x432417cf2e5cc50de33fe1213f196ddec9b702ea4b25ec1cffc1c7995a3f2578 \ No newline at end of file diff --git a/examples/contracts/DAAppNFT/remappings.txt b/examples/contracts/DAAppNFT/remappings.txt deleted file mode 100644 index 6f991130fa..0000000000 --- a/examples/contracts/DAAppNFT/remappings.txt +++ /dev/null @@ -1,2 +0,0 @@ -openzeppelin-contracts/=lib/openzeppelin-contracts/ -forge-std/=lib/forge-std/src/ \ No newline at end of file diff --git a/examples/contracts/DAAppNFT/src/Contract.sol b/examples/contracts/DAAppNFT/src/Contract.sol deleted file mode 100644 index b9b789e2c3..0000000000 --- a/examples/contracts/DAAppNFT/src/Contract.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.10; - -import "solmate/tokens/ERC721.sol"; -import "openzeppelin-contracts/contracts/utils/Strings.sol"; -import "openzeppelin-contracts/contracts/access/Ownable.sol"; - -error MintPriceNotPaid(); -error MaxSupply(); -error NonExistentTokenURI(); -error WithdrawTransfer(); - -contract NFT is ERC721, Ownable { - - using Strings for uint256; - string public baseURI; - uint256 public currentTokenId; - - constructor( - string memory _name, - string memory _symbol, - string memory _baseURI - ) ERC721(_name, _symbol) { - baseURI = _baseURI; - } - - function mintTo(address recipient) public payable returns (uint256) { - uint256 newTokenId = ++currentTokenId; - _safeMint(recipient, newTokenId); - return newTokenId; - } - - function tokenURI(uint256 tokenId) - public - view - virtual - override - returns (string memory) - { - if (ownerOf(tokenId) == address(0)) { - revert NonExistentTokenURI(); - } - return baseURI; - } -} \ No newline at end of file diff --git a/examples/contracts/DAAppNFT/src/test/Contract.t.sol b/examples/contracts/DAAppNFT/src/test/Contract.t.sol deleted file mode 100644 index d13865c52a..0000000000 --- a/examples/contracts/DAAppNFT/src/test/Contract.t.sol +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.10; - -import "forge-std/Test.sol"; -import "../Contract.sol"; - -contract NFTTest is Test { - using stdStorage for StdStorage; - - NFT private nft; - - function setUp() public { - // Deploy NFT contract - nft = new NFT("NFT_tutorial", "TUT", "baseUri"); - } - - function test_RevertMintToZeroAddress() public { - vm.expectRevert("INVALID_RECIPIENT"); - nft.mintTo(address(0)); - } - - function test_NewMintOwnerRegistered() public { - nft.mintTo(address(1)); - uint256 slotOfNewOwner = stdstore - .target(address(nft)) - .sig(nft.ownerOf.selector) - .with_key(1) - .find(); - - uint160 ownerOfTokenIdOne = uint160( - uint256( - (vm.load(address(nft), bytes32(abi.encode(slotOfNewOwner)))) - ) - ); - assertEq(address(ownerOfTokenIdOne), address(1)); - } - - function test_BalanceIncremented() public { - nft.mintTo(address(1)); - uint256 slotBalance = stdstore - .target(address(nft)) - .sig(nft.balanceOf.selector) - .with_key(address(1)) - .find(); - - uint256 balanceFirstMint = uint256( - vm.load(address(nft), bytes32(slotBalance)) - ); - assertEq(balanceFirstMint, 1); - - nft.mintTo(address(1)); - uint256 balanceSecondMint = uint256( - vm.load(address(nft), bytes32(slotBalance)) - ); - assertEq(balanceSecondMint, 2); - } - - function test_SafeContractReceiver() public { - Receiver receiver = new Receiver(); - nft.mintTo(address(receiver)); - uint256 slotBalance = stdstore - .target(address(nft)) - .sig(nft.balanceOf.selector) - .with_key(address(receiver)) - .find(); - - uint256 balance = uint256(vm.load(address(nft), bytes32(slotBalance))); - assertEq(balance, 1); - } - - function test_RevertUnSafeContractReceiver() public { - vm.etch(address(1), bytes("mock code")); - vm.expectRevert(bytes("")); - nft.mintTo(address(1)); - } -} - -contract Receiver is ERC721TokenReceiver { - function onERC721Received( - address operator, - address from, - uint256 id, - bytes calldata data - ) external override returns (bytes4) { - return this.onERC721Received.selector; - } -} diff --git a/examples/contracts/README.md b/examples/contracts/README.md deleted file mode 100644 index 0da3ef59b5..0000000000 --- a/examples/contracts/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Contracts - -Contracts Used for AA SDK - -Built using foundry + Alchemy - -- Foundry Getting started: https://book.getfoundry.sh/getting-started/installation -- Alchemy Getting started: https://alchemy.com/docs/reference/api-overview - -## Index - -1. `./DAAppNFT` - A simple NFT based off the tutorial: https://book.getfoundry.sh/tutorials/solmate-nft -2. `./ERC20Token` - A simple ERC20 based off the tutorial: https://www.youtube.com/watch?v=fNMfMxGxeag - -## Development - -In one of the Subfolder Projects. - -1. Set your environment variables by running: - -``` -export RPC_URL= -export PRIVATE_KEY= -``` - -2. Once set, you can deploy your with Forge by running the below command while and adding the relevant constructor arguments: - -``` -forge create --rpc-url=$RPC_URL --private-key=$PRIVATE_KEY --constructor-args -``` - -If successfully deployed, you will see the deploying wallet's address, the contract's address as well as the transaction hash printed to your terminal. - -3. Calling functions on your contract. For example to send an execution transaction - -``` -cast send --rpc-url=$RPC_URL "exampleMintFunction(address)"
--private-key=$PRIVATE_KEY -``` - -Given that you already set your RPC and private key env variables during deployment. - -4. Or if you want to execute a call on the contract - -``` -cast call --rpc-url=$RPC_URL --private-key=$PRIVATE_KEY "ownerOf(uint256)" -``` - -5. If you would like you can also run a node locally by using anvil. See more here: https://book.getfoundry.sh/reference/anvil/ diff --git a/examples/react-native-bare-example/.bundle/config b/examples/react-native-bare-example/.bundle/config deleted file mode 100644 index 848943bb52..0000000000 --- a/examples/react-native-bare-example/.bundle/config +++ /dev/null @@ -1,2 +0,0 @@ -BUNDLE_PATH: "vendor/bundle" -BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/examples/react-native-bare-example/.eslintrc.js b/examples/react-native-bare-example/.eslintrc.js deleted file mode 100644 index 187894b6af..0000000000 --- a/examples/react-native-bare-example/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: '@react-native', -}; diff --git a/examples/react-native-bare-example/.gitignore b/examples/react-native-bare-example/.gitignore deleted file mode 100644 index d5ae456695..0000000000 --- a/examples/react-native-bare-example/.gitignore +++ /dev/null @@ -1,74 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -**/.xcode.env.local - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml -*.hprof -.cxx/ -*.keystore -!debug.keystore - -# node.js -# -node_modules/ -npm-debug.log -yarn-error.log - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -**/fastlane/report.xml -**/fastlane/Preview.html -**/fastlane/screenshots -**/fastlane/test_output - -# Bundle artifact -*.jsbundle - -# Ruby / CocoaPods -**/Pods/ -/vendor/bundle/ - -# Temporary files created by Metro to check the health of the file watcher -.metro-health-check* - -# testing -/coverage - -# Yarn -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions diff --git a/examples/react-native-bare-example/.prettierrc.js b/examples/react-native-bare-example/.prettierrc.js deleted file mode 100644 index 2b540746a7..0000000000 --- a/examples/react-native-bare-example/.prettierrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - arrowParens: 'avoid', - bracketSameLine: true, - bracketSpacing: false, - singleQuote: true, - trailingComma: 'all', -}; diff --git a/examples/react-native-bare-example/.watchmanconfig b/examples/react-native-bare-example/.watchmanconfig deleted file mode 100644 index 0967ef424b..0000000000 --- a/examples/react-native-bare-example/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/examples/react-native-bare-example/Gemfile b/examples/react-native-bare-example/Gemfile deleted file mode 100644 index 85d7f68286..0000000000 --- a/examples/react-native-bare-example/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source 'https://rubygems.org' - -# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby ">= 2.6.10" - -# Exclude problematic versions of cocoapods and activesupport that causes build failures. -gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' -gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' -gem 'xcodeproj', '< 1.26.0' diff --git a/examples/react-native-bare-example/Gemfile.lock b/examples/react-native-bare-example/Gemfile.lock deleted file mode 100644 index 6b9ec9614d..0000000000 --- a/examples/react-native-bare-example/Gemfile.lock +++ /dev/null @@ -1,119 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - activesupport (7.2.2.1) - base64 - benchmark (>= 0.3) - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - atomos (0.1.3) - base64 (0.2.0) - benchmark (0.4.0) - bigdecimal (3.1.9) - claide (1.1.0) - cocoapods (1.15.2) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.15.2) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 2.1, < 3.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.6.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.15.2) - activesupport (>= 5.0, < 8) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (2.1) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) - colored2 (3.1.2) - concurrent-ruby (1.3.5) - connection_pool (2.5.0) - drb (2.2.1) - escape (0.0.4) - ethon (0.16.0) - ffi (>= 1.15.0) - ffi (1.17.1) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - httpclient (2.9.0) - mutex_m - i18n (1.14.7) - concurrent-ruby (~> 1.0) - json (2.10.2) - logger (1.6.6) - minitest (5.25.5) - molinillo (0.8.0) - mutex_m (0.3.0) - nanaimo (0.3.0) - nap (1.1.0) - netrc (0.11.0) - nkf (0.2.0) - public_suffix (4.0.7) - rexml (3.4.1) - ruby-macho (2.5.1) - securerandom (0.4.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - xcodeproj (1.25.1) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (>= 3.3.6, < 4.0) - -PLATFORMS - ruby - -DEPENDENCIES - activesupport (>= 6.1.7.5, != 7.1.0) - cocoapods (>= 1.13, != 1.15.1, != 1.15.0) - xcodeproj (< 1.26.0) - -RUBY VERSION - ruby 3.3.5p100 - -BUNDLED WITH - 2.5.16 diff --git a/examples/react-native-bare-example/README.md b/examples/react-native-bare-example/README.md deleted file mode 100644 index 9c76f141e4..0000000000 --- a/examples/react-native-bare-example/README.md +++ /dev/null @@ -1,110 +0,0 @@ -This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). - -# Getting Started - ->**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. - -## Step 0: Install Dependencies - -From the Root of the Monorepo, run the following commands - - -```bash -# Install Dependencies -yarn install -``` - -```bash -# Build packages -yarn build -``` - -## Step 1: Start the Metro Server - -First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. - -To start Metro, run the following command from the _root_ of your React Native project: - -```bash -# using npm -npm start - -# OR using Yarn -yarn start -``` - -## Step 2: Start your Application - -Before you start your application, update your `.env` file to add the following variables: - -``` -API_KEY="" -PAYMASTER_POLICY_ID="" -``` - -Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: - -### For Android - -```bash -# using npm -npm run android - -# OR using Yarn -yarn android -``` - -### For iOS - -```bash -# install pods (if necessary) -cd ios -pod install - -# Go back to the project root -cd ../ - -# Build & Run Project - -# using npm -npm run ios - -# OR using Yarn -yarn ios -``` - -If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. - -This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. - -## Step 3: Modifying your App - -Now that you have successfully run the app, let's modify it. - -1. Open `App.tsx` in your text editor of choice and edit some lines. -2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! - - For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! - -## Congratulations! :tada: - -You've successfully run and modified your React Native App. :partying_face: - -### Now what? - -- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). -- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). - -# Troubleshooting - -If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. - -# Learn More - -To learn more about React Native, take a look at the following resources: - -- [React Native Website](https://reactnative.dev) - learn more about React Native. -- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. -- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. -- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. -- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. diff --git a/examples/react-native-bare-example/__tests__/App.test.tsx b/examples/react-native-bare-example/__tests__/App.test.tsx deleted file mode 100644 index 9eac6fbc87..0000000000 --- a/examples/react-native-bare-example/__tests__/App.test.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @format - */ - -import 'react-native'; -import React from 'react'; -import App from '../App'; - -// Note: import explicitly to use the types shipped with jest. -import {it} from '@jest/globals'; - -// Note: test renderer must be required after react-native. -import renderer from 'react-test-renderer'; - -it('renders correctly', () => { - renderer.create(); -}); diff --git a/examples/react-native-bare-example/android/app/build.gradle b/examples/react-native-bare-example/android/app/build.gradle deleted file mode 100644 index 6eae8cafea..0000000000 --- a/examples/react-native-bare-example/android/app/build.gradle +++ /dev/null @@ -1,119 +0,0 @@ -apply plugin: "com.android.application" -apply plugin: "org.jetbrains.kotlin.android" -apply plugin: "com.facebook.react" - -/** - * This is the configuration block to customize your React Native Android app. - * By default you don't need to apply any configuration, just uncomment the lines you need. - */ -react { - /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '../..' - // root = file("../../") - // The folder where the react-native NPM package is. Default is ../../node_modules/react-native - reactNativeDir = file("../../../../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen - codegenDir = file("../../../../node_modules/@react-native/codegen") - // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js - // cliFile = file("../../node_modules/react-native/cli.js") - - /* Variants */ - // The list of variants to that are debuggable. For those we're going to - // skip the bundling of the JS bundle and the assets. By default is just 'debug'. - // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. - // debuggableVariants = ["liteDebug", "prodDebug"] - - /* Bundling */ - // A list containing the node command and its flags. Default is just 'node'. - // nodeExecutableAndArgs = ["node"] - // - // The command to run when bundling. By default is 'bundle' - // bundleCommand = "ram-bundle" - // - // The path to the CLI configuration file. Default is empty. - // bundleConfig = file(../rn-cli.config.js) - // - // The name of the generated asset file containing your JS bundle - // bundleAssetName = "MyApplication.android.bundle" - // - // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' - // entryFile = file("../js/MyApplication.android.js") - // - // A list of extra flags to pass to the 'bundle' commands. - // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle - // extraPackagerArgs = [] - - /* Hermes Commands */ - // The hermes compiler command to run. By default it is 'hermesc' - // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" - // - // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" - // hermesFlags = ["-O", "-output-source-map"] - - /* Autolinking */ - autolinkLibrariesWithApp() -} - -/** - * Set this to true to Run Proguard on Release builds to minify the Java bytecode. - */ -def enableProguardInReleaseBuilds = false - -/** - * The preferred build flavor of JavaScriptCore (JSC) - * - * For example, to use the international variant, you can use: - * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` - * - * The international variant includes ICU i18n library and necessary data - * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that - * this variant is about 6MiB larger per architecture than default. - */ -def jscFlavor = 'org.webkit:android-jsc:+' - -android { - ndkVersion rootProject.ext.ndkVersion - buildToolsVersion rootProject.ext.buildToolsVersion - compileSdk rootProject.ext.compileSdkVersion - - namespace "com.reactnativebareexample" - defaultConfig { - applicationId "com.reactnativebareexample" - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0" - } - signingConfigs { - debug { - storeFile file('debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - } - buildTypes { - debug { - signingConfig signingConfigs.debug - } - release { - // Caution! In production, you need to generate your own keystore file. - // see https://reactnative.dev/docs/signed-apk-android. - signingConfig signingConfigs.debug - minifyEnabled enableProguardInReleaseBuilds - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - } - } -} - -dependencies { - // The version of react-native is set by the React Native Gradle Plugin - implementation("com.facebook.react:react-android") - - if (hermesEnabled.toBoolean()) { - implementation("com.facebook.react:hermes-android") - } else { - implementation jscFlavor - } -} diff --git a/examples/react-native-bare-example/android/app/debug.keystore b/examples/react-native-bare-example/android/app/debug.keystore deleted file mode 100644 index 364e105ed3..0000000000 Binary files a/examples/react-native-bare-example/android/app/debug.keystore and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/proguard-rules.pro b/examples/react-native-bare-example/android/app/proguard-rules.pro deleted file mode 100644 index 11b025724a..0000000000 --- a/examples/react-native-bare-example/android/app/proguard-rules.pro +++ /dev/null @@ -1,10 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: diff --git a/examples/react-native-bare-example/android/app/src/debug/AndroidManifest.xml b/examples/react-native-bare-example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index eb98c01afd..0000000000 --- a/examples/react-native-bare-example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/examples/react-native-bare-example/android/app/src/main/AndroidManifest.xml b/examples/react-native-bare-example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 8a35a87243..0000000000 --- a/examples/react-native-bare-example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/react-native-bare-example/android/app/src/main/java/com/reactnativebareexample/MainActivity.kt b/examples/react-native-bare-example/android/app/src/main/java/com/reactnativebareexample/MainActivity.kt deleted file mode 100644 index bbdf61046b..0000000000 --- a/examples/react-native-bare-example/android/app/src/main/java/com/reactnativebareexample/MainActivity.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.reactnativebareexample - -import android.os.Bundle; -import com.facebook.react.ReactActivity -import com.facebook.react.ReactActivityDelegate -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled -import com.facebook.react.defaults.DefaultReactActivityDelegate - -class MainActivity : ReactActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(null) - } - - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - override fun getMainComponentName(): String = "ReactNativeBareExample" - - /** - * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] - * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] - */ - override fun createReactActivityDelegate(): ReactActivityDelegate = - DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) -} diff --git a/examples/react-native-bare-example/android/app/src/main/java/com/reactnativebareexample/MainApplication.kt b/examples/react-native-bare-example/android/app/src/main/java/com/reactnativebareexample/MainApplication.kt deleted file mode 100644 index e547647601..0000000000 --- a/examples/react-native-bare-example/android/app/src/main/java/com/reactnativebareexample/MainApplication.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.reactnativebareexample - -import android.app.Application -import com.facebook.react.PackageList -import com.facebook.react.ReactApplication -import com.facebook.react.ReactHost -import com.facebook.react.ReactNativeHost -import com.facebook.react.ReactPackage -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load -import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost -import com.facebook.react.defaults.DefaultReactNativeHost -import com.facebook.react.soloader.OpenSourceMergedSoMapping -import com.facebook.soloader.SoLoader - -class MainApplication : Application(), ReactApplication { - - override val reactNativeHost: ReactNativeHost = - object : DefaultReactNativeHost(this) { - override fun getPackages(): List = - PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for example: - // add(MyReactNativePackage()) - } - - override fun getJSMainModuleName(): String = "index" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - - override val reactHost: ReactHost - get() = getDefaultReactHost(applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, OpenSourceMergedSoMapping) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() - } - } -} diff --git a/examples/react-native-bare-example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/examples/react-native-bare-example/android/app/src/main/res/drawable/rn_edit_text_material.xml deleted file mode 100644 index 5c25e728ea..0000000000 --- a/examples/react-native-bare-example/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index a2f5908281..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 1b52399808..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index ff10afd6e1..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 115a4c768a..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index dcd3cd8083..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 459ca609d3..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 8ca12fe024..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 8e19b410a1..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index b824ebdd48..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 4c19a13c23..0000000000 Binary files a/examples/react-native-bare-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/examples/react-native-bare-example/android/app/src/main/res/values/strings.xml b/examples/react-native-bare-example/android/app/src/main/res/values/strings.xml deleted file mode 100644 index a1878fa4b4..0000000000 --- a/examples/react-native-bare-example/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - ReactNativeBareExample - diff --git a/examples/react-native-bare-example/android/app/src/main/res/values/styles.xml b/examples/react-native-bare-example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 7ba83a2ad5..0000000000 --- a/examples/react-native-bare-example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/examples/react-native-bare-example/android/build.gradle b/examples/react-native-bare-example/android/build.gradle deleted file mode 100644 index a9ea023695..0000000000 --- a/examples/react-native-bare-example/android/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -buildscript { - ext { - buildToolsVersion = "35.0.0" - minSdkVersion = 24 - compileSdkVersion = 35 - targetSdkVersion = 34 - ndkVersion = "26.1.10909125" - kotlinVersion = "1.9.24" - } - repositories { - google() - mavenCentral() - } - dependencies { - classpath("com.android.tools.build:gradle") - classpath("com.facebook.react:react-native-gradle-plugin") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") - } -} - -apply plugin: "com.facebook.react.rootproject" diff --git a/examples/react-native-bare-example/android/gradle.properties b/examples/react-native-bare-example/android/gradle.properties deleted file mode 100644 index 5e24e3aa8d..0000000000 --- a/examples/react-native-bare-example/android/gradle.properties +++ /dev/null @@ -1,39 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true - -# Use this property to specify which architecture you want to build. -# You can also override it from the CLI using -# ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 - -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. -newArchEnabled=true - -# Use this property to enable or disable the Hermes JS engine. -# If set to false, you will be using JSC instead. -hermesEnabled=true diff --git a/examples/react-native-bare-example/android/gradle/wrapper/gradle-wrapper.jar b/examples/react-native-bare-example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a4b76b9530..0000000000 Binary files a/examples/react-native-bare-example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/examples/react-native-bare-example/android/gradle/wrapper/gradle-wrapper.properties b/examples/react-native-bare-example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 79eb9d003f..0000000000 --- a/examples/react-native-bare-example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/examples/react-native-bare-example/android/gradlew b/examples/react-native-bare-example/android/gradlew deleted file mode 100755 index f5feea6d6b..0000000000 --- a/examples/react-native-bare-example/android/gradlew +++ /dev/null @@ -1,252 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/examples/react-native-bare-example/android/gradlew.bat b/examples/react-native-bare-example/android/gradlew.bat deleted file mode 100644 index 9d21a21834..0000000000 --- a/examples/react-native-bare-example/android/gradlew.bat +++ /dev/null @@ -1,94 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/examples/react-native-bare-example/android/settings.gradle b/examples/react-native-bare-example/android/settings.gradle deleted file mode 100644 index 8a8e20003e..0000000000 --- a/examples/react-native-bare-example/android/settings.gradle +++ /dev/null @@ -1,6 +0,0 @@ -pluginManagement { includeBuild("../../../node_modules/@react-native/gradle-plugin") } -plugins { id("com.facebook.react.settings") } -extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } -rootProject.name = 'ReactNativeBareExample' -include ':app' -includeBuild('../../../node_modules/@react-native/gradle-plugin') diff --git a/examples/react-native-bare-example/app.json b/examples/react-native-bare-example/app.json deleted file mode 100644 index f3c852c1af..0000000000 --- a/examples/react-native-bare-example/app.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "ReactNativeBareExample", - "displayName": "ReactNativeBareExample" -} diff --git a/examples/react-native-bare-example/babel.config.js b/examples/react-native-bare-example/babel.config.js deleted file mode 100644 index 4b955774aa..0000000000 --- a/examples/react-native-bare-example/babel.config.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - presets: ['module:@react-native/babel-preset'], - plugins: [ - [ - 'module:react-native-dotenv', - { - envName: 'APP_ENV', - moduleName: '@env', - }, - ], - ], -}; diff --git a/examples/react-native-bare-example/env.d.ts b/examples/react-native-bare-example/env.d.ts deleted file mode 100644 index 651e4c3867..0000000000 --- a/examples/react-native-bare-example/env.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module '@env' { - export const API_KEY: string; -} diff --git a/examples/react-native-bare-example/index.js b/examples/react-native-bare-example/index.js deleted file mode 100644 index 7af18ebd15..0000000000 --- a/examples/react-native-bare-example/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @format - */ - -import 'node-libs-react-native/globals.js'; -import 'react-native-get-random-values'; -import {AppRegistry} from 'react-native'; -import App from './src/App'; -import {name as appName} from './app.json'; - -AppRegistry.registerComponent(appName, () => App); diff --git a/examples/react-native-bare-example/ios/.xcode.env b/examples/react-native-bare-example/ios/.xcode.env deleted file mode 100644 index 3d5782c715..0000000000 --- a/examples/react-native-bare-example/ios/.xcode.env +++ /dev/null @@ -1,11 +0,0 @@ -# This `.xcode.env` file is versioned and is used to source the environment -# used when running script phases inside Xcode. -# To customize your local environment, you can create an `.xcode.env.local` -# file that is not versioned. - -# NODE_BINARY variable contains the PATH to the node executable. -# -# Customize the NODE_BINARY variable here. -# For example, to use nvm with brew, add the following line -# . "$(brew --prefix nvm)/nvm.sh" --no-use -export NODE_BINARY=$(command -v node) diff --git a/examples/react-native-bare-example/ios/Podfile b/examples/react-native-bare-example/ios/Podfile deleted file mode 100644 index fbf1f9c359..0000000000 --- a/examples/react-native-bare-example/ios/Podfile +++ /dev/null @@ -1,46 +0,0 @@ -# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command('node', ['-p', - 'require.resolve( - "react-native/scripts/react_native_pods.rb", - {paths: [process.argv[1]]}, - )', __dir__]).strip - -# Dynamically override the minimum iOS version to 17.0 if the override is greater than the minimum version supported from react-native -MIN_IOS_OVERRIDE = '17.0' -if Gem::Version.new(MIN_IOS_OVERRIDE) > Gem::Version.new(min_ios_version_supported) - min_ios_version_supported = MIN_IOS_OVERRIDE -end - -platform :ios, min_ios_version_supported -prepare_react_native_project! - -linkage = ENV['USE_FRAMEWORKS'] -if linkage != nil - Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green - use_frameworks! :linkage => linkage.to_sym -end - -target 'ReactNativeBareExample' do - config = use_native_modules! - - use_react_native!( - :path => config[:reactNativePath], - # An absolute path to your application root. - :app_path => "#{Pod::Config.instance.installation_root}/.." - ) - - target 'ReactNativeBareExampleTests' do - inherit! :complete - # Pods for testing - end - - post_install do |installer| - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false, - # :ccache_enabled => true - ) - end -end diff --git a/examples/react-native-bare-example/ios/Podfile.lock b/examples/react-native-bare-example/ios/Podfile.lock deleted file mode 100644 index d91b2fc813..0000000000 --- a/examples/react-native-bare-example/ios/Podfile.lock +++ /dev/null @@ -1,1997 +0,0 @@ -PODS: - - account-kit-react-native-signer (4.16.0): - - Base58Swift - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - Base58Swift (2.1.10): - - BigInt (~> 5.0.0) - - BigInt (5.0.0) - - boost (1.84.0) - - DoubleConversion (1.1.6) - - FBLazyVector (0.76.5) - - fmt (9.1.0) - - glog (0.3.5) - - hermes-engine (0.76.5): - - hermes-engine/Pre-built (= 0.76.5) - - hermes-engine/Pre-built (0.76.5) - - RCT-Folly (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Default (= 2024.01.01.00) - - RCT-Folly/Default (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCTDeprecation (0.76.5) - - RCTRequired (0.76.5) - - RCTTypeSafety (0.76.5): - - FBLazyVector (= 0.76.5) - - RCTRequired (= 0.76.5) - - React-Core (= 0.76.5) - - React (0.76.5): - - React-Core (= 0.76.5) - - React-Core/DevSupport (= 0.76.5) - - React-Core/RCTWebSocket (= 0.76.5) - - React-RCTActionSheet (= 0.76.5) - - React-RCTAnimation (= 0.76.5) - - React-RCTBlob (= 0.76.5) - - React-RCTImage (= 0.76.5) - - React-RCTLinking (= 0.76.5) - - React-RCTNetwork (= 0.76.5) - - React-RCTSettings (= 0.76.5) - - React-RCTText (= 0.76.5) - - React-RCTVibration (= 0.76.5) - - React-callinvoker (0.76.5) - - React-Core (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/CoreModulesHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/Default (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/DevSupport (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-Core/RCTWebSocket (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTActionSheetHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTAnimationHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTBlobHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTImageHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTLinkingHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTNetworkHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTSettingsHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTTextHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTVibrationHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTWebSocket (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-CoreModules (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety (= 0.76.5) - - React-Core/CoreModulesHeaders (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-NativeModulesApple - - React-RCTBlob - - React-RCTImage (= 0.76.5) - - ReactCodegen - - ReactCommon - - SocketRocket (= 0.7.1) - - React-cxxreact (0.76.5): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-debug (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - React-runtimeexecutor (= 0.76.5) - - React-timing (= 0.76.5) - - React-debug (0.76.5) - - React-defaultsnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-domnativemodule - - React-Fabric - - React-featureflags - - React-featureflagsnativemodule - - React-graphics - - React-idlecallbacksnativemodule - - React-ImageManager - - React-microtasksnativemodule - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-domnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/animations (= 0.76.5) - - React-Fabric/attributedstring (= 0.76.5) - - React-Fabric/componentregistry (= 0.76.5) - - React-Fabric/componentregistrynative (= 0.76.5) - - React-Fabric/components (= 0.76.5) - - React-Fabric/core (= 0.76.5) - - React-Fabric/dom (= 0.76.5) - - React-Fabric/imagemanager (= 0.76.5) - - React-Fabric/leakchecker (= 0.76.5) - - React-Fabric/mounting (= 0.76.5) - - React-Fabric/observers (= 0.76.5) - - React-Fabric/scheduler (= 0.76.5) - - React-Fabric/telemetry (= 0.76.5) - - React-Fabric/templateprocessor (= 0.76.5) - - React-Fabric/uimanager (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/animations (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/components/legacyviewmanagerinterop (= 0.76.5) - - React-Fabric/components/root (= 0.76.5) - - React-Fabric/components/view (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric/core (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/dom (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers/events (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-performancetimeline - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/uimanager/consistency (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager/consistency (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-FabricComponents (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components (= 0.76.5) - - React-FabricComponents/textlayoutmanager (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components/inputaccessory (= 0.76.5) - - React-FabricComponents/components/iostextinput (= 0.76.5) - - React-FabricComponents/components/modal (= 0.76.5) - - React-FabricComponents/components/rncore (= 0.76.5) - - React-FabricComponents/components/safeareaview (= 0.76.5) - - React-FabricComponents/components/scrollview (= 0.76.5) - - React-FabricComponents/components/text (= 0.76.5) - - React-FabricComponents/components/textinput (= 0.76.5) - - React-FabricComponents/components/unimplementedview (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/inputaccessory (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/iostextinput (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/modal (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/rncore (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/safeareaview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/scrollview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/text (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/textinput (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/unimplementedview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/textlayoutmanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricImage (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired (= 0.76.5) - - RCTTypeSafety (= 0.76.5) - - React-Fabric - - React-graphics - - React-ImageManager - - React-jsi - - React-jsiexecutor (= 0.76.5) - - React-logger - - React-rendererdebug - - React-utils - - ReactCommon - - Yoga - - React-featureflags (0.76.5) - - React-featureflagsnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-graphics (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-jsi - - React-jsiexecutor - - React-utils - - React-hermes (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.5) - - React-jsi - - React-jsiexecutor (= 0.76.5) - - React-jsinspector - - React-perflogger (= 0.76.5) - - React-runtimeexecutor - - React-idlecallbacksnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-ImageManager (0.76.5): - - glog - - RCT-Folly/Fabric - - React-Core/Default - - React-debug - - React-Fabric - - React-graphics - - React-rendererdebug - - React-utils - - React-jserrorhandler (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-debug - - React-jsi - - React-jsi (0.76.5): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-jsiexecutor (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-perflogger (= 0.76.5) - - React-jsinspector (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-featureflags - - React-jsi - - React-perflogger (= 0.76.5) - - React-runtimeexecutor (= 0.76.5) - - React-jsitracing (0.76.5): - - React-jsi - - React-logger (0.76.5): - - glog - - React-Mapbuffer (0.76.5): - - glog - - React-debug - - React-microtasksnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-get-random-values (1.11.0): - - React-Core - - react-native-mmkv (3.1.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context (5.0.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common (= 5.0.0) - - react-native-safe-area-context/fabric (= 5.0.0) - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/common (5.0.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/fabric (5.0.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-nativeconfig (0.76.5) - - React-NativeModulesApple (0.76.5): - - glog - - hermes-engine - - React-callinvoker - - React-Core - - React-cxxreact - - React-jsi - - React-jsinspector - - React-runtimeexecutor - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-perflogger (0.76.5): - - DoubleConversion - - RCT-Folly (= 2024.01.01.00) - - React-performancetimeline (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact - - React-timing - - React-RCTActionSheet (0.76.5): - - React-Core/RCTActionSheetHeaders (= 0.76.5) - - React-RCTAnimation (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTAnimationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTAppDelegate (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-CoreModules - - React-debug - - React-defaultsnativemodule - - React-Fabric - - React-featureflags - - React-graphics - - React-hermes - - React-nativeconfig - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-RCTNetwork - - React-rendererdebug - - React-RuntimeApple - - React-RuntimeCore - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon - - React-RCTBlob (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTBlobHeaders - - React-Core/RCTWebSocket - - React-jsi - - React-jsinspector - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTFabric (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-FabricImage - - React-featureflags - - React-graphics - - React-ImageManager - - React-jsi - - React-jsinspector - - React-nativeconfig - - React-performancetimeline - - React-RCTImage - - React-RCTText - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - Yoga - - React-RCTImage (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTImageHeaders - - React-jsi - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTLinking (0.76.5): - - React-Core/RCTLinkingHeaders (= 0.76.5) - - React-jsi (= 0.76.5) - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - ReactCommon/turbomodule/core (= 0.76.5) - - React-RCTNetwork (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTNetworkHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTSettings (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTSettingsHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTText (0.76.5): - - React-Core/RCTTextHeaders (= 0.76.5) - - Yoga - - React-RCTVibration (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTVibrationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-rendererconsistency (0.76.5) - - React-rendererdebug (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-rncore (0.76.5) - - React-RuntimeApple (0.76.5): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-callinvoker - - React-Core/Default - - React-CoreModules - - React-cxxreact - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-Mapbuffer - - React-NativeModulesApple - - React-RCTFabric - - React-RuntimeCore - - React-runtimeexecutor - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - React-RuntimeCore (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-featureflags - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-performancetimeline - - React-runtimeexecutor - - React-runtimescheduler - - React-utils - - React-runtimeexecutor (0.76.5): - - React-jsi (= 0.76.5) - - React-RuntimeHermes (0.76.5): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-featureflags - - React-hermes - - React-jsi - - React-jsinspector - - React-jsitracing - - React-nativeconfig - - React-RuntimeCore - - React-utils - - React-runtimescheduler (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker - - React-cxxreact - - React-debug - - React-featureflags - - React-jsi - - React-performancetimeline - - React-rendererconsistency - - React-rendererdebug - - React-runtimeexecutor - - React-timing - - React-utils - - React-timing (0.76.5) - - React-utils (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-jsi (= 0.76.5) - - ReactCodegen (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricImage - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-NativeModulesApple - - React-rendererdebug - - React-utils - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - ReactCommon (0.76.5): - - ReactCommon/turbomodule (= 0.76.5) - - ReactCommon/turbomodule (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - ReactCommon/turbomodule/bridging (= 0.76.5) - - ReactCommon/turbomodule/core (= 0.76.5) - - ReactCommon/turbomodule/bridging (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - ReactCommon/turbomodule/core (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-debug (= 0.76.5) - - React-featureflags (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - React-utils (= 0.76.5) - - RNGestureHandler (2.21.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - RNInAppBrowser (3.7.0): - - React-Core - - RNScreens (4.3.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - RNScreens/common (= 4.3.0) - - Yoga - - RNScreens/common (4.3.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - SocketRocket (0.7.1) - - Yoga (0.0.0) - -DEPENDENCIES: - - "account-kit-react-native-signer (from `../../../node_modules/@account-kit/react-native-signer`)" - - boost (from `../../../node_modules/react-native/third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - FBLazyVector (from `../../../node_modules/react-native/Libraries/FBLazyVector`) - - fmt (from `../../../node_modules/react-native/third-party-podspecs/fmt.podspec`) - - glog (from `../../../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - RCT-Folly (from `../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCT-Folly/Fabric (from `../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTDeprecation (from `../../../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) - - RCTRequired (from `../../../node_modules/react-native/Libraries/Required`) - - RCTTypeSafety (from `../../../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../../../node_modules/react-native/`) - - React-callinvoker (from `../../../node_modules/react-native/ReactCommon/callinvoker`) - - React-Core (from `../../../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../../../node_modules/react-native/`) - - React-CoreModules (from `../../../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../../../node_modules/react-native/ReactCommon/cxxreact`) - - React-debug (from `../../../node_modules/react-native/ReactCommon/react/debug`) - - React-defaultsnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) - - React-domnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/dom`) - - React-Fabric (from `../../../node_modules/react-native/ReactCommon`) - - React-FabricComponents (from `../../../node_modules/react-native/ReactCommon`) - - React-FabricImage (from `../../../node_modules/react-native/ReactCommon`) - - React-featureflags (from `../../../node_modules/react-native/ReactCommon/react/featureflags`) - - React-featureflagsnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) - - React-graphics (from `../../../node_modules/react-native/ReactCommon/react/renderer/graphics`) - - React-hermes (from `../../../node_modules/react-native/ReactCommon/hermes`) - - React-idlecallbacksnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) - - React-ImageManager (from `../../../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - - React-jserrorhandler (from `../../../node_modules/react-native/ReactCommon/jserrorhandler`) - - React-jsi (from `../../../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../../../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../../../node_modules/react-native/ReactCommon/jsinspector-modern`) - - React-jsitracing (from `../../../node_modules/react-native/ReactCommon/hermes/executor/`) - - React-logger (from `../../../node_modules/react-native/ReactCommon/logger`) - - React-Mapbuffer (from `../../../node_modules/react-native/ReactCommon`) - - React-microtasksnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) - - react-native-get-random-values (from `../../../node_modules/react-native-get-random-values`) - - react-native-mmkv (from `../../../node_modules/react-native-mmkv`) - - react-native-safe-area-context (from `../../../node_modules/react-native-safe-area-context`) - - React-nativeconfig (from `../../../node_modules/react-native/ReactCommon`) - - React-NativeModulesApple (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - - React-perflogger (from `../../../node_modules/react-native/ReactCommon/reactperflogger`) - - React-performancetimeline (from `../../../node_modules/react-native/ReactCommon/react/performance/timeline`) - - React-RCTActionSheet (from `../../../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../../../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../../../node_modules/react-native/Libraries/AppDelegate`) - - React-RCTBlob (from `../../../node_modules/react-native/Libraries/Blob`) - - React-RCTFabric (from `../../../node_modules/react-native/React`) - - React-RCTImage (from `../../../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../../../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../../../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../../../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../../../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../../../node_modules/react-native/Libraries/Vibration`) - - React-rendererconsistency (from `../../../node_modules/react-native/ReactCommon/react/renderer/consistency`) - - React-rendererdebug (from `../../../node_modules/react-native/ReactCommon/react/renderer/debug`) - - React-rncore (from `../../../node_modules/react-native/ReactCommon`) - - React-RuntimeApple (from `../../../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) - - React-RuntimeCore (from `../../../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimeexecutor (from `../../../node_modules/react-native/ReactCommon/runtimeexecutor`) - - React-RuntimeHermes (from `../../../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimescheduler (from `../../../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - - React-timing (from `../../../node_modules/react-native/ReactCommon/react/timing`) - - React-utils (from `../../../node_modules/react-native/ReactCommon/react/utils`) - - ReactCodegen (from `build/generated/ios`) - - ReactCommon/turbomodule/core (from `../../../node_modules/react-native/ReactCommon`) - - RNGestureHandler (from `../../../node_modules/react-native-gesture-handler`) - - RNInAppBrowser (from `../../../node_modules/react-native-inappbrowser-reborn`) - - RNScreens (from `../node_modules/react-native-screens`) - - Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`) - -SPEC REPOS: - trunk: - - Base58Swift - - BigInt - - SocketRocket - -EXTERNAL SOURCES: - account-kit-react-native-signer: - :path: "../../../node_modules/@account-kit/react-native-signer" - boost: - :podspec: "../../../node_modules/react-native/third-party-podspecs/boost.podspec" - DoubleConversion: - :podspec: "../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" - FBLazyVector: - :path: "../../../node_modules/react-native/Libraries/FBLazyVector" - fmt: - :podspec: "../../../node_modules/react-native/third-party-podspecs/fmt.podspec" - glog: - :podspec: "../../../node_modules/react-native/third-party-podspecs/glog.podspec" - hermes-engine: - :podspec: "../../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2024-11-12-RNv0.76.2-5b4aa20c719830dcf5684832b89a6edb95ac3d64 - RCT-Folly: - :podspec: "../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" - RCTDeprecation: - :path: "../../../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" - RCTRequired: - :path: "../../../node_modules/react-native/Libraries/Required" - RCTTypeSafety: - :path: "../../../node_modules/react-native/Libraries/TypeSafety" - React: - :path: "../../../node_modules/react-native/" - React-callinvoker: - :path: "../../../node_modules/react-native/ReactCommon/callinvoker" - React-Core: - :path: "../../../node_modules/react-native/" - React-CoreModules: - :path: "../../../node_modules/react-native/React/CoreModules" - React-cxxreact: - :path: "../../../node_modules/react-native/ReactCommon/cxxreact" - React-debug: - :path: "../../../node_modules/react-native/ReactCommon/react/debug" - React-defaultsnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/defaults" - React-domnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/dom" - React-Fabric: - :path: "../../../node_modules/react-native/ReactCommon" - React-FabricComponents: - :path: "../../../node_modules/react-native/ReactCommon" - React-FabricImage: - :path: "../../../node_modules/react-native/ReactCommon" - React-featureflags: - :path: "../../../node_modules/react-native/ReactCommon/react/featureflags" - React-featureflagsnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" - React-graphics: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/graphics" - React-hermes: - :path: "../../../node_modules/react-native/ReactCommon/hermes" - React-idlecallbacksnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" - React-ImageManager: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" - React-jserrorhandler: - :path: "../../../node_modules/react-native/ReactCommon/jserrorhandler" - React-jsi: - :path: "../../../node_modules/react-native/ReactCommon/jsi" - React-jsiexecutor: - :path: "../../../node_modules/react-native/ReactCommon/jsiexecutor" - React-jsinspector: - :path: "../../../node_modules/react-native/ReactCommon/jsinspector-modern" - React-jsitracing: - :path: "../../../node_modules/react-native/ReactCommon/hermes/executor/" - React-logger: - :path: "../../../node_modules/react-native/ReactCommon/logger" - React-Mapbuffer: - :path: "../../../node_modules/react-native/ReactCommon" - React-microtasksnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" - react-native-get-random-values: - :path: "../../../node_modules/react-native-get-random-values" - react-native-mmkv: - :path: "../../../node_modules/react-native-mmkv" - react-native-safe-area-context: - :path: "../../../node_modules/react-native-safe-area-context" - React-nativeconfig: - :path: "../../../node_modules/react-native/ReactCommon" - React-NativeModulesApple: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" - React-perflogger: - :path: "../../../node_modules/react-native/ReactCommon/reactperflogger" - React-performancetimeline: - :path: "../../../node_modules/react-native/ReactCommon/react/performance/timeline" - React-RCTActionSheet: - :path: "../../../node_modules/react-native/Libraries/ActionSheetIOS" - React-RCTAnimation: - :path: "../../../node_modules/react-native/Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../../../node_modules/react-native/Libraries/AppDelegate" - React-RCTBlob: - :path: "../../../node_modules/react-native/Libraries/Blob" - React-RCTFabric: - :path: "../../../node_modules/react-native/React" - React-RCTImage: - :path: "../../../node_modules/react-native/Libraries/Image" - React-RCTLinking: - :path: "../../../node_modules/react-native/Libraries/LinkingIOS" - React-RCTNetwork: - :path: "../../../node_modules/react-native/Libraries/Network" - React-RCTSettings: - :path: "../../../node_modules/react-native/Libraries/Settings" - React-RCTText: - :path: "../../../node_modules/react-native/Libraries/Text" - React-RCTVibration: - :path: "../../../node_modules/react-native/Libraries/Vibration" - React-rendererconsistency: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/consistency" - React-rendererdebug: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/debug" - React-rncore: - :path: "../../../node_modules/react-native/ReactCommon" - React-RuntimeApple: - :path: "../../../node_modules/react-native/ReactCommon/react/runtime/platform/ios" - React-RuntimeCore: - :path: "../../../node_modules/react-native/ReactCommon/react/runtime" - React-runtimeexecutor: - :path: "../../../node_modules/react-native/ReactCommon/runtimeexecutor" - React-RuntimeHermes: - :path: "../../../node_modules/react-native/ReactCommon/react/runtime" - React-runtimescheduler: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" - React-timing: - :path: "../../../node_modules/react-native/ReactCommon/react/timing" - React-utils: - :path: "../../../node_modules/react-native/ReactCommon/react/utils" - ReactCodegen: - :path: build/generated/ios - ReactCommon: - :path: "../../../node_modules/react-native/ReactCommon" - RNGestureHandler: - :path: "../../../node_modules/react-native-gesture-handler" - RNInAppBrowser: - :path: "../../../node_modules/react-native-inappbrowser-reborn" - RNScreens: - :path: "../node_modules/react-native-screens" - Yoga: - :path: "../../../node_modules/react-native/ReactCommon/yoga" - -SPEC CHECKSUMS: - account-kit-react-native-signer: 00afb4b034a63ec0353e7eb006e73f89f299dcef - Base58Swift: 53d551f0b33d9478fa63b3445e453a772d6b31a7 - BigInt: 74b4d88367b0e819d9f77393549226d36faeb0d8 - boost: 1dca942403ed9342f98334bf4c3621f011aa7946 - DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385 - FBLazyVector: 1bf99bb46c6af9a2712592e707347315f23947aa - fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be - glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a - hermes-engine: 06a9c6900587420b90accc394199527c64259db4 - RCT-Folly: 84578c8756030547307e4572ab1947de1685c599 - RCTDeprecation: fb7d408617e25d7f537940000d766d60149c5fea - RCTRequired: 9aaf0ffcc1f41f0c671af863970ef25c422a9920 - RCTTypeSafety: e9a6e7d48184646eb0610295b74c0dd02768cbb2 - React: fffb3cf1b0d7aee03c4eb4952b2d58783615e9fa - React-callinvoker: 3c6ecc0315d42924e01b3ddc25cf2e49d33da169 - React-Core: 1a5ddefb00dd72644171dd39bb4bbcd7849c70f0 - React-CoreModules: 8de64f712fe272ed08f37aaf64633ddf793e70d3 - React-cxxreact: e204185e1da1c843fec2bbb10bcc5b5800355dfa - React-debug: 297ed67868a76e8384669ea9b5c65c5d9d9d15d9 - React-defaultsnativemodule: e698063aa99c75546abc7f1c18072b4d753831d8 - React-domnativemodule: bd989e5b531401d419fc598e9cc09ee843d8c2bf - React-Fabric: 925fbb4d56a3c3ef9c12366f43357a913291fdc7 - React-FabricComponents: e598e6f635699237db45e017cbe230d9094915fa - React-FabricImage: ace285e38358f01aa89a5974f5f803db72a2bb9d - React-featureflags: cb3dca1c74ba813f2e578c8c635989d01d14739f - React-featureflagsnativemodule: 8fe6e6279a0ead0735749724e6ecd8e03f3893ca - React-graphics: f7d97c8bcc5f1568fb840b6d8940af0ae89b387c - React-hermes: a12bf33d9915dbe2dcde5b6b781faab6684883fb - React-idlecallbacksnativemodule: 4dfe6da504ae4f7792132ba164c00ae192aa4a57 - React-ImageManager: 28861af68262a45e585eca5491d05cd963ab0071 - React-jserrorhandler: 15bea720b272a2e78b7731df122dbfa6e27b65aa - React-jsi: 217274301608d7fa529bd275c73020b55cf39361 - React-jsiexecutor: 1bcbc63a8c1d698b35c9fb521ee87aa48a3702d2 - React-jsinspector: 1a3345f90762b3ba2d0ab3ff5f91022487b2ed38 - React-jsitracing: 46adf5fbb769aa673145b5c57ed7cd4b7cd08e1c - React-logger: ae95f0effa7e1791bd6f7283caddca323d4fbc1e - React-Mapbuffer: 7eb5d69e1154e7743487ef0c8d7261e5b59afb32 - React-microtasksnativemodule: 01dd998649ff5f8814846b7eee84c4d57f5d3671 - react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba - react-native-mmkv: eca12be5e3400be2d995a2edaa3c6c2e67b5e3ec - react-native-safe-area-context: f145b8906585d648f9f9c7dfa3885bac54f38fcc - React-nativeconfig: f7ab6c152e780b99a8c17448f2d99cf5f69a2311 - React-NativeModulesApple: 9aeb901b9bfcc9235e912445fb3cf4780a99baf4 - React-perflogger: 16e049953d21b37e9871ddf0b02f414e12ff14ba - React-performancetimeline: 00d156ec43d1110a2e7dacb168a7ac95a81eccc7 - React-RCTActionSheet: a4388035260b01ac38d3647da0433b0455da9bae - React-RCTAnimation: 9cc9e88ec5f94d573d3b5d5d9702f47774d8603c - React-RCTAppDelegate: b8ca6a50167b71d67c477985597429485f39f964 - React-RCTBlob: f879b05cf702dd4099054c3c3bf05bd4757de701 - React-RCTFabric: 69ac989ccf18904cd6ad79d364cbd50343f125f3 - React-RCTImage: 8fc2b137d17fb8756cdba38d74f4d40fb9499dee - React-RCTLinking: e691e89d8658aaa772c59084a45a96e8c9ef8df1 - React-RCTNetwork: 749cb659702c3faf3efecfcb982150be0f2c834a - React-RCTSettings: 60c431627d37e6d996e0f61a9e84df8e41d898cb - React-RCTText: 74cc248bf8d2f6d07beb6196aa4c7055b3eb1a51 - React-RCTVibration: 81ff3704c7ed66a99e2670167252fd0e9a10980b - React-rendererconsistency: 42f182fe910ad6c9b449cc62adae8d0eaba76f0a - React-rendererdebug: b11083c452ed6f2a03029a9105d0d9ab7d9af1c8 - React-rncore: 85ed76036ff56e2e9c369155027cbbd84db86006 - React-RuntimeApple: 3154e09ccb48d81dcbb13f986a5313686c1d6983 - React-RuntimeCore: 985985d121db1fde5387d4dfedae78e13a5e317d - React-runtimeexecutor: 10fae9492194097c99f6e34cedbb42a308922d32 - React-RuntimeHermes: 3984572bc295675360849b07ab2608bfbd8db35d - React-runtimescheduler: 215d21fbcb922aa469c6adcf5a729e2769d210e4 - React-timing: 1050c6fa44c327f2d7538e10c548fdf521fabdb8 - React-utils: f584a494ac233c7857bab176416b0c49cb4037ba - ReactCodegen: 1f59af46efc9351f27046d90d9ceb5e99385f623 - ReactCommon: 5809a8ee421b7219221a475b78180f8f34b5c5ec - RNGestureHandler: e1dcb274c17ca0680a04d7ff357e35e37c384185 - RNInAppBrowser: 6d3eb68d471b9834335c664704719b8be1bfdb20 - RNScreens: 06e1f09654d2da4ff95dee6621b2b13b033e9c5a - SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: fcc198acd4a55599b3468cfb6ebc526baff5f06e - -PODFILE CHECKSUM: e0d5f57899bd91f012b2fee564d7db11cb15990a - -COCOAPODS: 1.15.2 diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample.xcodeproj/project.pbxproj b/examples/react-native-bare-example/ios/ReactNativeBareExample.xcodeproj/project.pbxproj deleted file mode 100644 index 488533c683..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,703 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* ReactNativeBareExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactNativeBareExampleTests.m */; }; - 0C80B921A6F3F58F76C31292 /* libPods-ReactNativeBareExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-ReactNativeBareExample.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 7699B88040F8A987B510C191 /* libPods-ReactNativeBareExample-ReactNativeBareExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-ReactNativeBareExample-ReactNativeBareExampleTests.a */; }; - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - D3F3E3AB12EDED74D17D247B /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = ReactNativeBareExample; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00E356EE1AD99517003FC87E /* ReactNativeBareExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactNativeBareExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* ReactNativeBareExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactNativeBareExampleTests.m; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* ReactNativeBareExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativeBareExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ReactNativeBareExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = ReactNativeBareExample/AppDelegate.mm; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ReactNativeBareExample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeBareExample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativeBareExample/main.m; sourceTree = ""; }; - 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeBareExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-ReactNativeBareExample-ReactNativeBareExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeBareExample-ReactNativeBareExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B4392A12AC88292D35C810B /* Pods-ReactNativeBareExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeBareExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample.debug.xcconfig"; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-ReactNativeBareExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeBareExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeBareExample-ReactNativeBareExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeBareExample-ReactNativeBareExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests.debug.xcconfig"; sourceTree = ""; }; - 5DCACB8F33CDC322A6C60F78 /* libPods-ReactNativeBareExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeBareExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeBareExample/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeBareExample-ReactNativeBareExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeBareExample-ReactNativeBareExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests.release.xcconfig"; sourceTree = ""; }; - ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7699B88040F8A987B510C191 /* libPods-ReactNativeBareExample-ReactNativeBareExampleTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0C80B921A6F3F58F76C31292 /* libPods-ReactNativeBareExample.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* ReactNativeBareExampleTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* ReactNativeBareExampleTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = ReactNativeBareExampleTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* ReactNativeBareExample */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, - 13B07FB71A68108700A75B9A /* main.m */, - 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, - ); - name = ReactNativeBareExample; - sourceTree = ""; - }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5DCACB8F33CDC322A6C60F78 /* libPods-ReactNativeBareExample.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-ReactNativeBareExample-ReactNativeBareExampleTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - ); - name = Libraries; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* ReactNativeBareExample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* ReactNativeBareExampleTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - BBD78D7AC51CEA395F1C20DB /* Pods */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - usesTabs = 0; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* ReactNativeBareExample.app */, - 00E356EE1AD99517003FC87E /* ReactNativeBareExampleTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - BBD78D7AC51CEA395F1C20DB /* Pods */ = { - isa = PBXGroup; - children = ( - 3B4392A12AC88292D35C810B /* Pods-ReactNativeBareExample.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-ReactNativeBareExample.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeBareExample-ReactNativeBareExampleTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeBareExample-ReactNativeBareExampleTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* ReactNativeBareExampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeBareExampleTests" */; - buildPhases = ( - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = ReactNativeBareExampleTests; - productName = ReactNativeBareExampleTests; - productReference = 00E356EE1AD99517003FC87E /* ReactNativeBareExampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 13B07F861A680F5B00A75B9A /* ReactNativeBareExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeBareExample" */; - buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ReactNativeBareExample; - productName = ReactNativeBareExample; - productReference = 13B07F961A680F5B00A75B9A /* ReactNativeBareExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1210; - TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeBareExample" */; - compatibilityVersion = "Xcode 12.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* ReactNativeBareExample */, - 00E356ED1AD99517003FC87E /* ReactNativeBareExampleTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - D3F3E3AB12EDED74D17D247B /* PrivacyInfo.xcprivacy in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/.xcode.env.local", - "$(SRCROOT)/.xcode.env", - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; - }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ReactNativeBareExample-ReactNativeBareExampleTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ReactNativeBareExample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample/Pods-ReactNativeBareExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeBareExample-ReactNativeBareExampleTests/Pods-ReactNativeBareExample-ReactNativeBareExampleTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* ReactNativeBareExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* ReactNativeBareExample */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeBareExample-ReactNativeBareExampleTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 5LXND6RV9N; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ReactNativeBareExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeBareExample.app/ReactNativeBareExample"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeBareExample-ReactNativeBareExampleTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - DEVELOPMENT_TEAM = 5LXND6RV9N; - INFOPLIST_FILE = ReactNativeBareExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeBareExample.app/ReactNativeBareExample"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-ReactNativeBareExample.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 5LXND6RV9N; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = ReactNativeBareExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = ReactNativeBareExample; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-ReactNativeBareExample.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 5LXND6RV9N; - INFOPLIST_FILE = ReactNativeBareExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = ReactNativeBareExample; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - "-DFOLLY_HAVE_CLOCK_GETTIME=1", - ); - OTHER_LDFLAGS = "$(inherited) "; - REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; - USE_HERMES = true; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - "-DFOLLY_HAVE_CLOCK_GETTIME=1", - ); - OTHER_LDFLAGS = "$(inherited) "; - REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native"; - SDKROOT = iphoneos; - USE_HERMES = true; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeBareExampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeBareExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeBareExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample.xcodeproj/xcshareddata/xcschemes/ReactNativeBareExample.xcscheme b/examples/react-native-bare-example/ios/ReactNativeBareExample.xcodeproj/xcshareddata/xcschemes/ReactNativeBareExample.xcscheme deleted file mode 100644 index d0ded61fed..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample.xcodeproj/xcshareddata/xcschemes/ReactNativeBareExample.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample.xcworkspace/contents.xcworkspacedata b/examples/react-native-bare-example/ios/ReactNativeBareExample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 0da5684e07..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/AppDelegate.h b/examples/react-native-bare-example/ios/ReactNativeBareExample/AppDelegate.h deleted file mode 100644 index 5d2808256c..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : RCTAppDelegate - -@end diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/AppDelegate.mm b/examples/react-native-bare-example/ios/ReactNativeBareExample/AppDelegate.mm deleted file mode 100644 index fda66d1613..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/AppDelegate.mm +++ /dev/null @@ -1,31 +0,0 @@ -#import "AppDelegate.h" - -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.moduleName = @"ReactNativeBareExample"; - // You can add your custom initial props in the dictionary below. - // They will be passed down to the ViewController used by React Native. - self.initialProps = @{}; - - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ - return [self bundleURL]; -} - -- (NSURL *)bundleURL -{ -#if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; -#else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; -#endif -} - -@end diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/react-native-bare-example/ios/ReactNativeBareExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 81213230de..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/Images.xcassets/Contents.json b/examples/react-native-bare-example/ios/ReactNativeBareExample/Images.xcassets/Contents.json deleted file mode 100644 index 2d92bd53fd..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/Info.plist b/examples/react-native-bare-example/ios/ReactNativeBareExample/Info.plist deleted file mode 100644 index fc73288ded..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/Info.plist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ReactNativeBareExample - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CFBundleURLTypes - - - CFBundleURLSchemes - - aa-rn-bare-example - - - - - \ No newline at end of file diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/LaunchScreen.storyboard b/examples/react-native-bare-example/ios/ReactNativeBareExample/LaunchScreen.storyboard deleted file mode 100644 index b214acb741..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/LaunchScreen.storyboard +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/PrivacyInfo.xcprivacy b/examples/react-native-bare-example/ios/ReactNativeBareExample/PrivacyInfo.xcprivacy deleted file mode 100644 index 41b8317f06..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,37 +0,0 @@ - - - - - NSPrivacyAccessedAPITypes - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryFileTimestamp - NSPrivacyAccessedAPITypeReasons - - C617.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryUserDefaults - NSPrivacyAccessedAPITypeReasons - - CA92.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategorySystemBootTime - NSPrivacyAccessedAPITypeReasons - - 35F9.1 - - - - NSPrivacyCollectedDataTypes - - NSPrivacyTracking - - - diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExample/main.m b/examples/react-native-bare-example/ios/ReactNativeBareExample/main.m deleted file mode 100644 index d645c7246c..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExample/main.m +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExampleTests/Info.plist b/examples/react-native-bare-example/ios/ReactNativeBareExampleTests/Info.plist deleted file mode 100644 index ba72822e87..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/examples/react-native-bare-example/ios/ReactNativeBareExampleTests/ReactNativeBareExampleTests.m b/examples/react-native-bare-example/ios/ReactNativeBareExampleTests/ReactNativeBareExampleTests.m deleted file mode 100644 index 526c3c0b05..0000000000 --- a/examples/react-native-bare-example/ios/ReactNativeBareExampleTests/ReactNativeBareExampleTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface ReactNativeBareExampleTests : XCTestCase - -@end - -@implementation ReactNativeBareExampleTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction( - ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/examples/react-native-bare-example/jest.config.js b/examples/react-native-bare-example/jest.config.js deleted file mode 100644 index 8eb675e9bc..0000000000 --- a/examples/react-native-bare-example/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - preset: 'react-native', -}; diff --git a/examples/react-native-bare-example/metro.config.js b/examples/react-native-bare-example/metro.config.js deleted file mode 100644 index 4cd117d2ca..0000000000 --- a/examples/react-native-bare-example/metro.config.js +++ /dev/null @@ -1,62 +0,0 @@ -const {getDefaultConfig} = require('@react-native/metro-config'); - -const path = require('path'); - -// Find the project and workspace directories -const projectRoot = __dirname; -const workspaceRoot = path.resolve(projectRoot, '../..'); - -const config = getDefaultConfig(projectRoot); - -config.watchFolders = [workspaceRoot, projectRoot]; - -// Add aliases for file-system import based modules -const ALIASES = { - "@noble/hashes/crypto": path.resolve( - workspaceRoot, - "node_modules/@noble/hashes/crypto.js" - ), -}; - -// to the real shared packages name. - -// config.watchFolders = [projectRoot, ...Object.values(monorepoPackages)]; - -// Let Metro know where to resolve packages and in what order -config.resolver.nodeModulesPaths = [ - path.resolve(projectRoot, 'node_modules'), - path.resolve(workspaceRoot, 'node_modules'), - path.resolve(workspaceRoot, 'account-kit/rn-signer/node_modules'), -]; - -// Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths` -config.resolver.disableHierarchicalLookup = true; - -// Default to file-based module resolution for file-system import based modules -config.resolver.resolveRequest = (context, moduleName, platform) => { - if (ALIASES[moduleName]) { - return { - filePath: ALIASES[moduleName], - type: "sourceFile", - }; - } - return context.resolveRequest(context, moduleName, platform); -}; - -config.resolver.extraNodeModules = { - ...config.resolver.extraNodeModules, - ...require('node-libs-react-native'), - crypto: require.resolve('crypto-browserify'), - stream: require.resolve('stream-browserify'), -}; - -// Important to allow importing package exports -config.resolver.unstable_enablePackageExports = true; - -config.resolver.unstable_conditionNames = [ - "browser", - "require", - "react-native", -]; - -module.exports = config; diff --git a/examples/react-native-bare-example/package.json b/examples/react-native-bare-example/package.json deleted file mode 100644 index 330f1234b9..0000000000 --- a/examples/react-native-bare-example/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "react-native-bare-example", - "version": "0.0.1", - "private": true, - "scripts": { - "android": "react-native run-android", - "ios": "react-native run-ios -- --simulator=\"iPhone SE\"", - "lint": "eslint .", - "start": "react-native start", - "test": "jest" - - }, - "dependencies": { - "@account-kit/infra": "^4.16.0", - "@account-kit/react-native": "^4.16.0", - "@account-kit/react-native-signer": "^4.16.0", - "@account-kit/signer": "^4.16.0", - "@account-kit/smart-contracts": "^4.16.0", - "@react-navigation/bottom-tabs": "^7.2.0", - "@react-navigation/native": "7.0.3", - "@react-navigation/native-stack": "^7.1.14", - "crypto-browserify": "^3.12.1", - "dotenv": "^16.4.7", - "node-libs-react-native": "^1.2.1", - "react": "18.3.1", - "react-native": "0.76.5", - "react-native-gesture-handler": "^2.21.2", - "react-native-get-random-values": "^1.11.0", - "react-native-inappbrowser-reborn": "^3.7.0", - "react-native-mmkv": "^3.1.0", - "react-native-safe-area-context": "^5.0.0", - "react-native-screens": "^4.3.0", - "stream-browserify": "^3.0.0" - }, - "devDependencies": { - "@babel/core": "^7.25.2", - "@babel/preset-env": "^7.25.3", - "@babel/runtime": "^7.25.0", - "@react-native-community/cli": "15.0.1", - "@react-native-community/cli-platform-android": "15.0.1", - "@react-native-community/cli-platform-ios": "15.0.1", - "@react-native/babel-preset": "0.76.5", - "@react-native/eslint-config": "0.76.5", - "@react-native/metro-config": "0.76.5", - "@react-native/typescript-config": "0.76.5", - "@types/react": "^18.2.6", - "@types/react-test-renderer": "^18.0.0", - "babel-jest": "^29.6.3", - "eslint": "^8.19.0", - "jest": "^29.6.3", - "react-native-dotenv": "^3.4.11", - "react-test-renderer": "18.3.1" - }, - "engines": { - "node": ">=18" - } -} diff --git a/examples/react-native-bare-example/src/App.tsx b/examples/react-native-bare-example/src/App.tsx deleted file mode 100644 index f017dddd89..0000000000 --- a/examples/react-native-bare-example/src/App.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import React from 'react'; - -import {createStaticNavigation} from '@react-navigation/native'; - -import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; -import {SafeAreaProvider} from 'react-native-safe-area-context'; -import {Text} from 'react-native'; -import OTPAuthScreen from './screens/otp'; -import {API_KEY} from '@env'; -import {AlchemyAccountProvider, createConfig } from "@account-kit/react-native"; -import { QueryClient } from "@tanstack/react-query"; -import { sepolia } from '@account-kit/infra'; -import { alchemy } from '@account-kit/infra'; -import OAuthScreen from './screens/oauth'; - -const linking = { - enabled: 'auto' as const /* Automatically generate paths for all screens */, - prefixes: ['rn-signer-demo://'], -}; - -const RootStack = createBottomTabNavigator({ - initialRouteName: 'OTPAuthScreen', - screens: { - - OTPAuthScreen: { - screen: OTPAuthScreen, - linking: {path: 'otp'}, - options: { - title: 'OTP Auth', - tabBarIcon: () => 🔑, - }, - }, - OAuthScreen: { - screen: OAuthScreen, - linking: {path: 'oauth'}, - options: { - title: 'OAuth', - tabBarIcon: () => 🔐, - }, - }, - }, -}); - -const queryClient = new QueryClient() - -export default function App() { - const Navigation = createStaticNavigation(RootStack); - - const alchemyConfig = createConfig({ - chain: sepolia, - transport: alchemy({ - apiKey: API_KEY!, - }), - signerConnection: { - apiKey: API_KEY!, - }, - sessionConfig: { - expirationTimeMs: 1000 * 60 * 60 * 24 , // <-- Adjust the session expiration time as needed (currently 24 hours) - } - }); - - return ( - - - - - - ); -} diff --git a/examples/react-native-bare-example/src/screens/oauth.tsx b/examples/react-native-bare-example/src/screens/oauth.tsx deleted file mode 100644 index 17a216726f..0000000000 --- a/examples/react-native-bare-example/src/screens/oauth.tsx +++ /dev/null @@ -1,117 +0,0 @@ -/* eslint-disable import/extensions */ -import React, { useEffect, useState } from "react"; -import { - View, - Text, - StyleSheet, - TouchableOpacity, -} from "react-native"; -import { useAuthenticate, useUser, useSigner, useLogout, useSmartAccountClient } from "@account-kit/react-native"; - -export default function OAuthScreen() { - const user = useUser() - const { authenticate } = useAuthenticate() - const { address} = useSmartAccountClient({}) - const { logout } = useLogout(); - const signer = useSigner(); - const [signerAddress, setSignerAddress] = useState(null); - - useEffect(() => { - if (user) { - signer?.getAddress().then((address) => { - setSignerAddress(address); - }); - } - }, [user, signer]); - - return ( - - {!user ? ( - <> - { - try { - authenticate({ - type: "oauth", - authProviderId: "google", - mode: "redirect", - redirectUrl: "aa-rn-bare-example://oauth", - }) - } catch (error) { - console.log(error) - } - }} - > - Sign in - - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - Light Account Address: {address} - - - Signer Address: {signerAddress} - - - logout()} - > - Sign out - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/examples/react-native-bare-example/src/screens/otp.tsx b/examples/react-native-bare-example/src/screens/otp.tsx deleted file mode 100644 index 51d0b62e87..0000000000 --- a/examples/react-native-bare-example/src/screens/otp.tsx +++ /dev/null @@ -1,152 +0,0 @@ -/* eslint-disable import/extensions */ -import React, { useEffect, useState } from "react"; -import { - View, - Text, - TextInput, - StyleSheet, - TouchableOpacity, -} from "react-native"; -import {useAuthenticate, useUser, useSigner, useLogout, useSmartAccountClient} from "@account-kit/react-native" - -export default function OTPAuthScreen() { - const [email, setEmail] = useState(""); - const user = useUser() - const { authenticate } = useAuthenticate() - const [signerAddress, setSignerAddress] = useState(null); - const { logout } = useLogout(); - const { address } = useSmartAccountClient({}) - const [awaitingOtp, setAwaitingOtp] = useState(false); - const signer = useSigner(); - const [otpCode, setOtpCode] = useState(""); - - const handleUserAuth = ({ code }: { code: string }) => { - setAwaitingOtp(false); - authenticate({ - otpCode: code, - type: "otp", - }) - - setOtpCode("") - }; - - useEffect(() => { - if (user) { - signer?.getAddress().then((address) => { - setSignerAddress(address); - }); - } - }, [user, signer]); - - return ( - - {awaitingOtp ? ( - <> - - handleUserAuth({ code: otpCode })} - > - Sign in - - - ) : !user ? ( - <> - - { - authenticate({ - email, - type: "email", - }) - - setEmail("") - - setAwaitingOtp(true); - }} - > - Sign in - - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - Light Account Address: {address} - - - Signer Address: {signerAddress} - - - logout()} - > - Sign out - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/examples/react-native-bare-example/turbo.json b/examples/react-native-bare-example/turbo.json deleted file mode 100644 index 0ae2c2df7e..0000000000 --- a/examples/react-native-bare-example/turbo.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "dependsOn": ["build:android"], - "outputs": ["../android/build/**"] - }, - "build:android": { - "dependsOn": ["^build"], - "env": ["ANDROID_HOME", "ORG_GRADLE_PROJECT_newArchEnabled"], - "inputs": [ - "package.json", - "android", - "!android/build", - "src/*.ts", - "src/*.tsx", - "!android/.gradle", - "!android/build", - "!android/app/build" - ], - "outputs": ["../android/build/**"] - }, - "build:ios": { - "dependsOn": ["^build"], - "env": ["RCT_NEW_ARCH_ENABLED"], - "inputs": [ - "package.json", - "*.podspec", - "ios", - "src/*.ts", - "src/*.tsx", - "package.json", - "ios", - "!ios/build", - "!ios/Pods" - ], - "outputs": [] - } - } -} diff --git a/examples/react-native-expo-example/.gitignore b/examples/react-native-expo-example/.gitignore deleted file mode 100644 index d16e1efbb3..0000000000 --- a/examples/react-native-expo-example/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files - -# dependencies -node_modules/ - -# Expo -.expo/ -dist/ -web-build/ -expo-env.d.ts - -# Native -*.orig.* -*.jks -*.p8 -*.p12 -*.key -*.mobileprovision - -# Metro -.metro-health-check* - -# debug -npm-debug.* -yarn-debug.* -yarn-error.* - -# macOS -.DS_Store -*.pem - -# local env files -.env*.local - -# typescript -*.tsbuildinfo diff --git a/examples/react-native-expo-example/README.md b/examples/react-native-expo-example/README.md deleted file mode 100644 index 8bf51be91e..0000000000 --- a/examples/react-native-expo-example/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# Smart Wallets RN Example using Expo - -This is a sample repo that used expo to get started and integrates with Smart Wallets - -image - -## How it was made - -1. First create a new expo project (we used `yarn`): - -```bash -yarn create expo-app --template -``` - -This project used a `Blank (typescript)` template. - -2. Ensure you have the latest version of expo and that the new architecture is enabled - -```bash -yarn expo install expo@latest --fix -``` - -```json -// app.json -{ - "newArchEnabled": true -} -``` - -3. Install shims for crypto libraries - -```bash -yarn expo install node-libs-react-native crypto-browserify stream-browserify react-native-get-random-values -``` - -4. Add shims to `metro.config.js`: - -```javascript -// Learn more https://docs.expo.io/guides/customizing-metro -const { getDefaultConfig } = require("expo/metro-config"); - -/** @type {import('expo/metro-config').MetroConfig} */ -const config = getDefaultConfig(__dirname); -config.resolver.extraNodeModules = { - ...config.resolver.extraNodeModules, - ...require("node-libs-react-native"), - crypto: require.resolve("crypto-browserify"), - stream: require.resolve("stream-browserify"), -}; - -module.exports = config; -``` - -5. Setup Expo Router. - -Follow the [expo router docs](https://docs.expo.dev/router/installation/) to setup the router. - -```bash -yarn expo install expo-router -``` - -6. Import global shims in the root layout file: `_layout.tsx`: - -```typescript -import "node-libs-react-native/globals.js"; -import "react-native-get-random-values"; - -// rest of _layout.tsx -``` - -6. Install [Smart Wallets](https://www.alchemy.com/docs/wallets) Packages. At this point you're ready to use the aa-sdk in your project. - -```bash -yarn add @account-kit/react-native-signer @account-kit/signer @account-kit/smart-contracts @account-kit/infra -``` - -7. Create a `.env` file and update it to have the following value - -``` -EXPO_PUBLIC_API_KEY="" -PAYMASTER_POLICY_ID="" -``` - -```bash -yarn add express -``` - -8. Run the app - -Prebuild the app if you need to -```bash -npx expo prebuild --clean -``` - -Run the app for your desired platform: - -IOS -``` -yarn run ios -``` - -Android -``` -yarn run android -``` diff --git a/examples/react-native-expo-example/android/.gitignore b/examples/react-native-expo-example/android/.gitignore deleted file mode 100644 index 8a6be07718..0000000000 --- a/examples/react-native-expo-example/android/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# OSX -# -.DS_Store - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml -*.hprof -.cxx/ - -# Bundle artifacts -*.jsbundle diff --git a/examples/react-native-expo-example/android/app/build.gradle b/examples/react-native-expo-example/android/app/build.gradle deleted file mode 100644 index 65ed0e2380..0000000000 --- a/examples/react-native-expo-example/android/app/build.gradle +++ /dev/null @@ -1,176 +0,0 @@ -apply plugin: "com.android.application" -apply plugin: "org.jetbrains.kotlin.android" -apply plugin: "com.facebook.react" - -def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath() - -/** - * This is the configuration block to customize your React Native Android app. - * By default you don't need to apply any configuration, just uncomment the lines you need. - */ -react { - entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim()) - reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() - hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc" - codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() - - // Use Expo CLI to bundle the app, this ensures the Metro config - // works correctly with Expo projects. - cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim()) - bundleCommand = "export:embed" - - /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '../..' - // root = file("../../") - // The folder where the react-native NPM package is. Default is ../../node_modules/react-native - // reactNativeDir = file("../../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen - // codegenDir = file("../../node_modules/@react-native/codegen") - - /* Variants */ - // The list of variants to that are debuggable. For those we're going to - // skip the bundling of the JS bundle and the assets. By default is just 'debug'. - // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. - // debuggableVariants = ["liteDebug", "prodDebug"] - - /* Bundling */ - // A list containing the node command and its flags. Default is just 'node'. - // nodeExecutableAndArgs = ["node"] - - // - // The path to the CLI configuration file. Default is empty. - // bundleConfig = file(../rn-cli.config.js) - // - // The name of the generated asset file containing your JS bundle - // bundleAssetName = "MyApplication.android.bundle" - // - // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' - // entryFile = file("../js/MyApplication.android.js") - // - // A list of extra flags to pass to the 'bundle' commands. - // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle - // extraPackagerArgs = [] - - /* Hermes Commands */ - // The hermes compiler command to run. By default it is 'hermesc' - // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" - // - // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" - // hermesFlags = ["-O", "-output-source-map"] - - /* Autolinking */ - autolinkLibrariesWithApp() -} - -/** - * Set this to true to Run Proguard on Release builds to minify the Java bytecode. - */ -def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean() - -/** - * The preferred build flavor of JavaScriptCore (JSC) - * - * For example, to use the international variant, you can use: - * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` - * - * The international variant includes ICU i18n library and necessary data - * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that - * this variant is about 6MiB larger per architecture than default. - */ -def jscFlavor = 'org.webkit:android-jsc:+' - -android { - ndkVersion rootProject.ext.ndkVersion - - buildToolsVersion rootProject.ext.buildToolsVersion - compileSdk rootProject.ext.compileSdkVersion - - namespace 'com.accountkit.reactnativeexpoexample' - defaultConfig { - applicationId 'com.accountkit.reactnativeexpoexample' - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0.0" - } - signingConfigs { - debug { - storeFile file('debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - } - buildTypes { - debug { - signingConfig signingConfigs.debug - } - release { - // Caution! In production, you need to generate your own keystore file. - // see https://reactnative.dev/docs/signed-apk-android. - signingConfig signingConfigs.debug - shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false) - minifyEnabled enableProguardInReleaseBuilds - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?: true) - } - } - packagingOptions { - jniLibs { - useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false) - } - } - androidResources { - ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~' - } -} - -// Apply static values from `gradle.properties` to the `android.packagingOptions` -// Accepts values in comma delimited lists, example: -// android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini -["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop -> - // Split option: 'foo,bar' -> ['foo', 'bar'] - def options = (findProperty("android.packagingOptions.$prop") ?: "").split(","); - // Trim all elements in place. - for (i in 0.. 0) { - println "android.packagingOptions.$prop += $options ($options.length)" - // Ex: android.packagingOptions.pickFirsts += '**/SCCS/**' - options.each { - android.packagingOptions[prop] += it - } - } -} - -dependencies { - // The version of react-native is set by the React Native Gradle Plugin - implementation("com.facebook.react:react-android") - - def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true"; - def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true"; - def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true"; - - if (isGifEnabled) { - // For animated gif support - implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}") - } - - if (isWebpEnabled) { - // For webp support - implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}") - if (isWebpAnimatedEnabled) { - // Animated webp support - implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}") - } - } - - if (hermesEnabled.toBoolean()) { - implementation("com.facebook.react:hermes-android") - } else { - implementation jscFlavor - } -} diff --git a/examples/react-native-expo-example/android/app/debug.keystore b/examples/react-native-expo-example/android/app/debug.keystore deleted file mode 100644 index 364e105ed3..0000000000 Binary files a/examples/react-native-expo-example/android/app/debug.keystore and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/proguard-rules.pro b/examples/react-native-expo-example/android/app/proguard-rules.pro deleted file mode 100644 index 551eb41da2..0000000000 --- a/examples/react-native-expo-example/android/app/proguard-rules.pro +++ /dev/null @@ -1,14 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# react-native-reanimated --keep class com.swmansion.reanimated.** { *; } --keep class com.facebook.react.turbomodule.** { *; } - -# Add any project specific keep options here: diff --git a/examples/react-native-expo-example/android/app/src/debug/AndroidManifest.xml b/examples/react-native-expo-example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 3ec2507bab..0000000000 --- a/examples/react-native-expo-example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/examples/react-native-expo-example/android/app/src/main/AndroidManifest.xml b/examples/react-native-expo-example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 3dfa0c6643..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/app/src/main/java/com/accountkit/reactnativeexpoexample/MainActivity.kt b/examples/react-native-expo-example/android/app/src/main/java/com/accountkit/reactnativeexpoexample/MainActivity.kt deleted file mode 100644 index ca716d7eb8..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/java/com/accountkit/reactnativeexpoexample/MainActivity.kt +++ /dev/null @@ -1,61 +0,0 @@ -package com.accountkit.reactnativeexpoexample - -import android.os.Build -import android.os.Bundle - -import com.facebook.react.ReactActivity -import com.facebook.react.ReactActivityDelegate -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled -import com.facebook.react.defaults.DefaultReactActivityDelegate - -import expo.modules.ReactActivityDelegateWrapper - -class MainActivity : ReactActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - // Set the theme to AppTheme BEFORE onCreate to support - // coloring the background, status bar, and navigation bar. - // This is required for expo-splash-screen. - setTheme(R.style.AppTheme); - super.onCreate(null) - } - - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - override fun getMainComponentName(): String = "main" - - /** - * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] - * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] - */ - override fun createReactActivityDelegate(): ReactActivityDelegate { - return ReactActivityDelegateWrapper( - this, - BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, - object : DefaultReactActivityDelegate( - this, - mainComponentName, - fabricEnabled - ){}) - } - - /** - * Align the back button behavior with Android S - * where moving root activities to background instead of finishing activities. - * @see onBackPressed - */ - override fun invokeDefaultOnBackPressed() { - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) { - if (!moveTaskToBack(false)) { - // For non-root activities, use the default implementation to finish them. - super.invokeDefaultOnBackPressed() - } - return - } - - // Use the default back button implementation on Android S - // because it's doing more than [Activity.moveTaskToBack] in fact. - super.invokeDefaultOnBackPressed() - } -} diff --git a/examples/react-native-expo-example/android/app/src/main/java/com/accountkit/reactnativeexpoexample/MainApplication.kt b/examples/react-native-expo-example/android/app/src/main/java/com/accountkit/reactnativeexpoexample/MainApplication.kt deleted file mode 100644 index f2d1ce29dc..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/java/com/accountkit/reactnativeexpoexample/MainApplication.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.accountkit.reactnativeexpoexample - -import android.app.Application -import android.content.res.Configuration - -import com.facebook.react.PackageList -import com.facebook.react.ReactApplication -import com.facebook.react.ReactNativeHost -import com.facebook.react.ReactPackage -import com.facebook.react.ReactHost -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load -import com.facebook.react.defaults.DefaultReactNativeHost -import com.facebook.react.soloader.OpenSourceMergedSoMapping -import com.facebook.soloader.SoLoader - -import expo.modules.ApplicationLifecycleDispatcher -import expo.modules.ReactNativeHostWrapper - -class MainApplication : Application(), ReactApplication { - - override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper( - this, - object : DefaultReactNativeHost(this) { - override fun getPackages(): List { - val packages = PackageList(this).packages - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return packages - } - - override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - ) - - override val reactHost: ReactHost - get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, OpenSourceMergedSoMapping) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() - } - ApplicationLifecycleDispatcher.onApplicationCreate(this) - } - - override fun onConfigurationChanged(newConfig: Configuration) { - super.onConfigurationChanged(newConfig) - ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig) - } -} diff --git a/examples/react-native-expo-example/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png b/examples/react-native-expo-example/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png deleted file mode 100644 index 31df827b18..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png b/examples/react-native-expo-example/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png deleted file mode 100644 index ef243aab6c..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png b/examples/react-native-expo-example/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png deleted file mode 100644 index e9d5474519..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png b/examples/react-native-expo-example/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png deleted file mode 100644 index d61da15d24..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png b/examples/react-native-expo-example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png deleted file mode 100644 index 4aeed11d00..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/drawable/ic_launcher_background.xml b/examples/react-native-expo-example/android/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 883b2a080f..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/examples/react-native-expo-example/android/app/src/main/res/drawable/rn_edit_text_material.xml deleted file mode 100644 index 5c25e728ea..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/examples/react-native-expo-example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 3941bea9b9..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/examples/react-native-expo-example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index 3941bea9b9..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp deleted file mode 100644 index 7fae0ccbcf..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp deleted file mode 100644 index ac03dbf69f..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp deleted file mode 100644 index afa0a4ef4b..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp deleted file mode 100644 index 78aaf4541f..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp deleted file mode 100644 index e1173a94d6..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp deleted file mode 100644 index c4f6e101ec..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp deleted file mode 100644 index 7a0f085faa..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp deleted file mode 100644 index ff086fdc34..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp deleted file mode 100644 index 6c2d40bf55..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp deleted file mode 100644 index 730e3fa552..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp deleted file mode 100644 index f7f1d06908..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp deleted file mode 100644 index 345261586c..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp deleted file mode 100644 index b11a322ab4..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp deleted file mode 100644 index 49a464ee36..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp deleted file mode 100644 index b51fd15c26..0000000000 Binary files a/examples/react-native-expo-example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/examples/react-native-expo-example/android/app/src/main/res/values-night/colors.xml b/examples/react-native-expo-example/android/app/src/main/res/values-night/colors.xml deleted file mode 100644 index 3c05de5be8..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/values-night/colors.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/app/src/main/res/values/colors.xml b/examples/react-native-expo-example/android/app/src/main/res/values/colors.xml deleted file mode 100644 index f387b90114..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - #ffffff - #ffffff - #023c69 - #ffffff - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/app/src/main/res/values/strings.xml b/examples/react-native-expo-example/android/app/src/main/res/values/strings.xml deleted file mode 100644 index afb63251c1..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - react-native-expo-example - contain - false - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/app/src/main/res/values/styles.xml b/examples/react-native-expo-example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index da525212e4..0000000000 --- a/examples/react-native-expo-example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/android/build.gradle b/examples/react-native-expo-example/android/build.gradle deleted file mode 100644 index abbcb8ec8a..0000000000 --- a/examples/react-native-expo-example/android/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - ext { - buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0' - minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24') - compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35') - targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34') - kotlinVersion = findProperty('android.kotlinVersion') ?: '1.9.25' - - ndkVersion = "26.1.10909125" - } - repositories { - google() - mavenCentral() - } - dependencies { - classpath('com.android.tools.build:gradle') - classpath('com.facebook.react:react-native-gradle-plugin') - classpath('org.jetbrains.kotlin:kotlin-gradle-plugin') - } -} - -apply plugin: "com.facebook.react.rootproject" - -allprojects { - repositories { - maven { - // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android')) - } - maven { - // Android JSC is installed from npm - url(new File(['node', '--print', "require.resolve('jsc-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), '../dist')) - } - - google() - mavenCentral() - maven { url 'https://www.jitpack.io' } - } -} diff --git a/examples/react-native-expo-example/android/gradle.properties b/examples/react-native-expo-example/android/gradle.properties deleted file mode 100644 index 04490cd7eb..0000000000 --- a/examples/react-native-expo-example/android/gradle.properties +++ /dev/null @@ -1,58 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true - -# Enable AAPT2 PNG crunching -android.enablePngCrunchInReleaseBuilds=true - -# Use this property to specify which architecture you want to build. -# You can also override it from the CLI using -# ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 - -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. -newArchEnabled=true - -# Use this property to enable or disable the Hermes JS engine. -# If set to false, you will be using JSC instead. -hermesEnabled=true - -# Enable GIF support in React Native images (~200 B increase) -expo.gif.enabled=true -# Enable webp support in React Native images (~85 KB increase) -expo.webp.enabled=true -# Enable animated webp support (~3.4 MB increase) -# Disabled by default because iOS doesn't support animated webp -expo.webp.animated=false - -# Enable network inspector -EX_DEV_CLIENT_NETWORK_INSPECTOR=true - -# Use legacy packaging to compress native libraries in the resulting APK. -expo.useLegacyPackaging=false - -android.extraMavenRepos=[] \ No newline at end of file diff --git a/examples/react-native-expo-example/android/gradle/wrapper/gradle-wrapper.jar b/examples/react-native-expo-example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a4b76b9530..0000000000 Binary files a/examples/react-native-expo-example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/examples/react-native-expo-example/android/gradle/wrapper/gradle-wrapper.properties b/examples/react-native-expo-example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 79eb9d003f..0000000000 --- a/examples/react-native-expo-example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/examples/react-native-expo-example/android/gradlew b/examples/react-native-expo-example/android/gradlew deleted file mode 100755 index f5feea6d6b..0000000000 --- a/examples/react-native-expo-example/android/gradlew +++ /dev/null @@ -1,252 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/examples/react-native-expo-example/android/gradlew.bat b/examples/react-native-expo-example/android/gradlew.bat deleted file mode 100644 index 9d21a21834..0000000000 --- a/examples/react-native-expo-example/android/gradlew.bat +++ /dev/null @@ -1,94 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/examples/react-native-expo-example/android/settings.gradle b/examples/react-native-expo-example/android/settings.gradle deleted file mode 100644 index 0affa1392d..0000000000 --- a/examples/react-native-expo-example/android/settings.gradle +++ /dev/null @@ -1,38 +0,0 @@ -pluginManagement { - includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().toString()) -} -plugins { id("com.facebook.react.settings") } - -extensions.configure(com.facebook.react.ReactSettingsExtension) { ex -> - if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') { - ex.autolinkLibrariesFromCommand() - } else { - def command = [ - 'node', - '--no-warnings', - '--eval', - 'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))', - 'react-native-config', - '--json', - '--platform', - 'android' - ].toList() - ex.autolinkLibrariesFromCommand(command) - } -} - -rootProject.name = 'react-native-expo-example' - -dependencyResolutionManagement { - versionCatalogs { - reactAndroidLibs { - from(files(new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../gradle/libs.versions.toml"))) - } - } -} - -apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle"); -useExpoModules() - -include ':app' -includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile()) diff --git a/examples/react-native-expo-example/app.json b/examples/react-native-expo-example/app.json deleted file mode 100644 index 321968de00..0000000000 --- a/examples/react-native-expo-example/app.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "expo": { - "name": "react-native-expo-example", - "slug": "react-native-expo-example", - "scheme": "aa-rn-expo-example", - "version": "1.0.0", - "orientation": "portrait", - "icon": "./assets/icon.png", - "userInterfaceStyle": "light", - "newArchEnabled": true, - "splash": { - "image": "./assets/splash-icon.png", - "resizeMode": "contain", - "backgroundColor": "#ffffff" - }, - "ios": { - "supportsTablet": true, - "bundleIdentifier": "com.accountkit.reactnativeexpoexample" - }, - "android": { - "adaptiveIcon": { - "foregroundImage": "./assets/adaptive-icon.png", - "backgroundColor": "#ffffff" - }, - "package": "com.accountkit.reactnativeexpoexample" - }, - "web": { - "favicon": "./assets/favicon.png" - }, - "plugins": [ - "expo-router", - [ - "expo-build-properties", - { - "ios": { - "deploymentTarget": "17.0" - } - } - ] - ] - } -} diff --git a/examples/react-native-expo-example/app/(tabs)/_layout.tsx b/examples/react-native-expo-example/app/(tabs)/_layout.tsx deleted file mode 100644 index d37133cdfa..0000000000 --- a/examples/react-native-expo-example/app/(tabs)/_layout.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import FontAwesome6 from "@expo/vector-icons/FontAwesome"; -import { Tabs } from "expo-router"; - -export default function TabLayout() { - return ( - - ( - - ), - }} - /> - - ( - - ), - }} - /> - - ); -} diff --git a/examples/react-native-expo-example/app/(tabs)/index.tsx b/examples/react-native-expo-example/app/(tabs)/index.tsx deleted file mode 100644 index 6bb349df0d..0000000000 --- a/examples/react-native-expo-example/app/(tabs)/index.tsx +++ /dev/null @@ -1,152 +0,0 @@ -/* eslint-disable import/extensions */ -import { useEffect, useState } from "react"; -import { - View, - Text, - TextInput, - StyleSheet, - TouchableOpacity, -} from "react-native"; -import {useAuthenticate, useUser, useSigner, useLogout, useSmartAccountClient} from "@account-kit/react-native" - -export default function OTPAuthScreen() { - const [email, setEmail] = useState(""); - const user = useUser() - const { authenticate } = useAuthenticate() - const [signerAddress, setSignerAddress] = useState(null); - const { logout } = useLogout(); - const { address } = useSmartAccountClient({}) - const [awaitingOtp, setAwaitingOtp] = useState(false); - const signer = useSigner(); - const [otpCode, setOtpCode] = useState(""); - - const handleUserAuth = ({ code }: { code: string }) => { - setAwaitingOtp(false); - - authenticate({ - otpCode: code, - type: "otp", - }) - - // Clear the OTP code after authentication - setOtpCode(""); - }; - - useEffect(() => { - if (user) { - signer?.getAddress().then((address) => { - setSignerAddress(address); - }); - } - }, [user, signer]); - - return ( - - {awaitingOtp ? ( - <> - - handleUserAuth({ code: otpCode })} - > - Sign in - - - ) : !user ? ( - <> - - { - authenticate({ - email, - type: "email" - }) - - setAwaitingOtp(true); - }} - > - Sign in - - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - Light Account Address: {address} - - - Signer Address: {signerAddress} - - - logout()} - > - Sign out - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/examples/react-native-expo-example/app/(tabs)/oauth.tsx b/examples/react-native-expo-example/app/(tabs)/oauth.tsx deleted file mode 100644 index 9169165002..0000000000 --- a/examples/react-native-expo-example/app/(tabs)/oauth.tsx +++ /dev/null @@ -1,115 +0,0 @@ -/* eslint-disable import/extensions */ -import { useEffect, useState } from "react"; -import { - View, - Text, - StyleSheet, - TouchableOpacity, -} from "react-native"; -import { useAuthenticate, useUser, useSigner, useLogout, useSmartAccountClient } from "@account-kit/react-native"; - -export default function OAuthScreen() { - const user = useUser() - const { authenticate } = useAuthenticate() - const { address} = useSmartAccountClient({}) - const { logout } = useLogout(); - const signer = useSigner(); - const [signerAddress, setSignerAddress] = useState(null); - - useEffect(() => { - if (user) { - signer?.getAddress().then((address) => { - setSignerAddress(address); - }); - } - }, [user, signer]); - - return ( - - {!user ? ( - <> - { - authenticate({ - type: "oauth", - authProviderId: "google", - mode: "redirect", - redirectUrl: "aa-rn-expo-example://oauth", - }) - - - }} - > - Sign in - - - ) : ( - <> - - Currently logged in as: {user.email} - - OrgId: {user.orgId} - Address: {user.address} - - Light Account Address: {address} - - - Signer Address: {signerAddress} - - - logout()} - > - Sign out - - - )} - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - backgroundColor: "#FFFFF", - paddingHorizontal: 20, - }, - textInput: { - width: "100%", - height: 40, - borderColor: "gray", - borderWidth: 1, - paddingHorizontal: 10, - backgroundColor: "rgba(0,0,0,0.05)", - marginTop: 20, - marginBottom: 10, - }, - box: { - width: 60, - height: 60, - marginVertical: 20, - }, - button: { - width: 200, - padding: 10, - height: 50, - backgroundColor: "rgb(147, 197, 253)", - borderRadius: 5, - alignItems: "center", - justifyContent: "center", - marginTop: 20, - }, - buttonText: { - color: "white", - fontWeight: "bold", - textAlign: "center", - }, - userText: { - marginBottom: 10, - fontSize: 18, - }, -}); diff --git a/examples/react-native-expo-example/app/_layout.tsx b/examples/react-native-expo-example/app/_layout.tsx deleted file mode 100644 index 416c615e0c..0000000000 --- a/examples/react-native-expo-example/app/_layout.tsx +++ /dev/null @@ -1,42 +0,0 @@ -// Add global shims -import "node-libs-react-native/globals.js"; -import "react-native-get-random-values"; - -import {createConfig, AlchemyAccountProvider} from "@account-kit/react-native" - -import {alchemy, sepolia} from '@account-kit/infra' -import { QueryClient } from "@tanstack/react-query"; - - -import React from "react"; -import { Stack } from "expo-router"; - -const queryClient = new QueryClient() - -const API_KEY = process.env.EXPO_PUBLIC_API_KEY; - -export default function RootLayout() { - const configParams = ({ - chain: sepolia, - transport: alchemy({ - apiKey: API_KEY!, - }), - signerConnection: { - apiKey: API_KEY!, - }, - sessionConfig: { - expirationTimeMs: 1000 * 60 * 60 * 24 , // <-- Adjust the session expiration time as needed (currently 24 hours) - } - }) - - const config = createConfig(configParams) - - return ( - - - - - - - ); -} diff --git a/examples/react-native-expo-example/assets/adaptive-icon.png b/examples/react-native-expo-example/assets/adaptive-icon.png deleted file mode 100644 index 03d6f6b6c6..0000000000 Binary files a/examples/react-native-expo-example/assets/adaptive-icon.png and /dev/null differ diff --git a/examples/react-native-expo-example/assets/favicon.png b/examples/react-native-expo-example/assets/favicon.png deleted file mode 100644 index e75f697b18..0000000000 Binary files a/examples/react-native-expo-example/assets/favicon.png and /dev/null differ diff --git a/examples/react-native-expo-example/assets/icon.png b/examples/react-native-expo-example/assets/icon.png deleted file mode 100644 index a0b1526fc7..0000000000 Binary files a/examples/react-native-expo-example/assets/icon.png and /dev/null differ diff --git a/examples/react-native-expo-example/assets/splash-icon.png b/examples/react-native-expo-example/assets/splash-icon.png deleted file mode 100644 index 03d6f6b6c6..0000000000 Binary files a/examples/react-native-expo-example/assets/splash-icon.png and /dev/null differ diff --git a/examples/react-native-expo-example/babel.config.js b/examples/react-native-expo-example/babel.config.js deleted file mode 100644 index e5191d7e35..0000000000 --- a/examples/react-native-expo-example/babel.config.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = function (api) { - api.cache(true); - return { - presets: ["babel-preset-expo"], - plugins: [ - [ - "module:react-native-dotenv", - { - envName: "APP_ENV", - moduleName: "@env", - }, - ], - ], - }; -}; diff --git a/examples/react-native-expo-example/env.d.ts b/examples/react-native-expo-example/env.d.ts deleted file mode 100644 index de8d2a8495..0000000000 --- a/examples/react-native-expo-example/env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module "@env" { - export const API_KEY: string; - export const PORT: string; - export const APP_SCHEME: string; -} diff --git a/examples/react-native-expo-example/ios/.gitignore b/examples/react-native-expo-example/ios/.gitignore deleted file mode 100644 index 8beb344303..0000000000 --- a/examples/react-native-expo-example/ios/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace -.xcode.env.local - -# Bundle artifacts -*.jsbundle - -# CocoaPods -/Pods/ diff --git a/examples/react-native-expo-example/ios/.xcode.env b/examples/react-native-expo-example/ios/.xcode.env deleted file mode 100644 index 3d5782c715..0000000000 --- a/examples/react-native-expo-example/ios/.xcode.env +++ /dev/null @@ -1,11 +0,0 @@ -# This `.xcode.env` file is versioned and is used to source the environment -# used when running script phases inside Xcode. -# To customize your local environment, you can create an `.xcode.env.local` -# file that is not versioned. - -# NODE_BINARY variable contains the PATH to the node executable. -# -# Customize the NODE_BINARY variable here. -# For example, to use nvm with brew, add the following line -# . "$(brew --prefix nvm)/nvm.sh" --no-use -export NODE_BINARY=$(command -v node) diff --git a/examples/react-native-expo-example/ios/Podfile b/examples/react-native-expo-example/ios/Podfile deleted file mode 100644 index 57a7ee2ee3..0000000000 --- a/examples/react-native-expo-example/ios/Podfile +++ /dev/null @@ -1,66 +0,0 @@ -require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking") -require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods") - -require 'json' -podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {} - -ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0' -ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR'] - -platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1' -install! 'cocoapods', - :deterministic_uuids => false - -prepare_react_native_project! - -target 'reactnativeexpoexample' do - use_expo_modules! - - if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1' - config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"]; - else - config_command = [ - 'node', - '--no-warnings', - '--eval', - 'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))', - 'react-native-config', - '--json', - '--platform', - 'ios' - ] - end - - config = use_native_modules!(config_command) - - use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks'] - use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS'] - - use_react_native!( - :path => config[:reactNativePath], - :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes', - # An absolute path to your application root. - :app_path => "#{Pod::Config.instance.installation_root}/..", - :privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false', - ) - - post_install do |installer| - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false, - :ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true', - ) - - # This is necessary for Xcode 14, because it signs resource bundles by default - # when building for devices. - installer.target_installation_results.pod_target_installation_results - .each do |pod_name, target_installation_result| - target_installation_result.resource_bundle_targets.each do |resource_bundle_target| - resource_bundle_target.build_configurations.each do |config| - config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' - end - end - end - end -end diff --git a/examples/react-native-expo-example/ios/Podfile.lock b/examples/react-native-expo-example/ios/Podfile.lock deleted file mode 100644 index aea7b12016..0000000000 --- a/examples/react-native-expo-example/ios/Podfile.lock +++ /dev/null @@ -1,2041 +0,0 @@ -PODS: - - account-kit-react-native-signer (4.17.0): - - Base58Swift - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - Base58Swift (2.1.10): - - BigInt (~> 5.0.0) - - BigInt (5.0.0) - - boost (1.84.0) - - DoubleConversion (1.1.6) - - EXConstants (17.0.8): - - ExpoModulesCore - - Expo (52.0.47): - - ExpoModulesCore - - ExpoAsset (11.0.5): - - ExpoModulesCore - - ExpoFileSystem (18.0.12): - - ExpoModulesCore - - ExpoFont (13.0.4): - - ExpoModulesCore - - ExpoHead (4.0.21): - - ExpoModulesCore - - ExpoKeepAwake (14.0.3): - - ExpoModulesCore - - ExpoLinking (7.0.5): - - ExpoModulesCore - - ExpoModulesCore (2.2.3): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-jsinspector - - React-NativeModulesApple - - React-RCTAppDelegate - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - FBLazyVector (0.76.5) - - fmt (9.1.0) - - glog (0.3.5) - - hermes-engine (0.76.5): - - hermes-engine/Pre-built (= 0.76.5) - - hermes-engine/Pre-built (0.76.5) - - RCT-Folly (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Default (= 2024.01.01.00) - - RCT-Folly/Default (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCTDeprecation (0.76.5) - - RCTRequired (0.76.5) - - RCTTypeSafety (0.76.5): - - FBLazyVector (= 0.76.5) - - RCTRequired (= 0.76.5) - - React-Core (= 0.76.5) - - React (0.76.5): - - React-Core (= 0.76.5) - - React-Core/DevSupport (= 0.76.5) - - React-Core/RCTWebSocket (= 0.76.5) - - React-RCTActionSheet (= 0.76.5) - - React-RCTAnimation (= 0.76.5) - - React-RCTBlob (= 0.76.5) - - React-RCTImage (= 0.76.5) - - React-RCTLinking (= 0.76.5) - - React-RCTNetwork (= 0.76.5) - - React-RCTSettings (= 0.76.5) - - React-RCTText (= 0.76.5) - - React-RCTVibration (= 0.76.5) - - React-callinvoker (0.76.5) - - React-Core (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/CoreModulesHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/Default (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/DevSupport (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-Core/RCTWebSocket (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTActionSheetHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTAnimationHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTBlobHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTImageHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTLinkingHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTNetworkHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTSettingsHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTTextHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTVibrationHeaders (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTWebSocket (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.5) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-CoreModules (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety (= 0.76.5) - - React-Core/CoreModulesHeaders (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-NativeModulesApple - - React-RCTBlob - - React-RCTImage (= 0.76.5) - - ReactCodegen - - ReactCommon - - SocketRocket (= 0.7.1) - - React-cxxreact (0.76.5): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-debug (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - React-runtimeexecutor (= 0.76.5) - - React-timing (= 0.76.5) - - React-debug (0.76.5) - - React-defaultsnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-domnativemodule - - React-Fabric - - React-featureflags - - React-featureflagsnativemodule - - React-graphics - - React-idlecallbacksnativemodule - - React-ImageManager - - React-microtasksnativemodule - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-domnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/animations (= 0.76.5) - - React-Fabric/attributedstring (= 0.76.5) - - React-Fabric/componentregistry (= 0.76.5) - - React-Fabric/componentregistrynative (= 0.76.5) - - React-Fabric/components (= 0.76.5) - - React-Fabric/core (= 0.76.5) - - React-Fabric/dom (= 0.76.5) - - React-Fabric/imagemanager (= 0.76.5) - - React-Fabric/leakchecker (= 0.76.5) - - React-Fabric/mounting (= 0.76.5) - - React-Fabric/observers (= 0.76.5) - - React-Fabric/scheduler (= 0.76.5) - - React-Fabric/telemetry (= 0.76.5) - - React-Fabric/templateprocessor (= 0.76.5) - - React-Fabric/uimanager (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/animations (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/components/legacyviewmanagerinterop (= 0.76.5) - - React-Fabric/components/root (= 0.76.5) - - React-Fabric/components/view (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric/core (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/dom (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers/events (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-performancetimeline - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/uimanager/consistency (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager/consistency (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-FabricComponents (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components (= 0.76.5) - - React-FabricComponents/textlayoutmanager (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components/inputaccessory (= 0.76.5) - - React-FabricComponents/components/iostextinput (= 0.76.5) - - React-FabricComponents/components/modal (= 0.76.5) - - React-FabricComponents/components/rncore (= 0.76.5) - - React-FabricComponents/components/safeareaview (= 0.76.5) - - React-FabricComponents/components/scrollview (= 0.76.5) - - React-FabricComponents/components/text (= 0.76.5) - - React-FabricComponents/components/textinput (= 0.76.5) - - React-FabricComponents/components/unimplementedview (= 0.76.5) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/inputaccessory (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/iostextinput (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/modal (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/rncore (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/safeareaview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/scrollview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/text (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/textinput (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/unimplementedview (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/textlayoutmanager (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricImage (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired (= 0.76.5) - - RCTTypeSafety (= 0.76.5) - - React-Fabric - - React-graphics - - React-ImageManager - - React-jsi - - React-jsiexecutor (= 0.76.5) - - React-logger - - React-rendererdebug - - React-utils - - ReactCommon - - Yoga - - React-featureflags (0.76.5) - - React-featureflagsnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-graphics (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-jsi - - React-jsiexecutor - - React-utils - - React-hermes (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.5) - - React-jsi - - React-jsiexecutor (= 0.76.5) - - React-jsinspector - - React-perflogger (= 0.76.5) - - React-runtimeexecutor - - React-idlecallbacksnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-ImageManager (0.76.5): - - glog - - RCT-Folly/Fabric - - React-Core/Default - - React-debug - - React-Fabric - - React-graphics - - React-rendererdebug - - React-utils - - React-jserrorhandler (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-debug - - React-jsi - - React-jsi (0.76.5): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-jsiexecutor (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-jsinspector - - React-perflogger (= 0.76.5) - - React-jsinspector (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-featureflags - - React-jsi - - React-perflogger (= 0.76.5) - - React-runtimeexecutor (= 0.76.5) - - React-jsitracing (0.76.5): - - React-jsi - - React-logger (0.76.5): - - glog - - React-Mapbuffer (0.76.5): - - glog - - React-debug - - React-microtasksnativemodule (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-mmkv (3.2.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context (4.12.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common (= 4.12.0) - - react-native-safe-area-context/fabric (= 4.12.0) - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/common (4.12.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/fabric (4.12.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-nativeconfig (0.76.5) - - React-NativeModulesApple (0.76.5): - - glog - - hermes-engine - - React-callinvoker - - React-Core - - React-cxxreact - - React-jsi - - React-jsinspector - - React-runtimeexecutor - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-perflogger (0.76.5): - - DoubleConversion - - RCT-Folly (= 2024.01.01.00) - - React-performancetimeline (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact - - React-timing - - React-RCTActionSheet (0.76.5): - - React-Core/RCTActionSheetHeaders (= 0.76.5) - - React-RCTAnimation (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTAnimationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTAppDelegate (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-CoreModules - - React-debug - - React-defaultsnativemodule - - React-Fabric - - React-featureflags - - React-graphics - - React-hermes - - React-nativeconfig - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-RCTNetwork - - React-rendererdebug - - React-RuntimeApple - - React-RuntimeCore - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon - - React-RCTBlob (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTBlobHeaders - - React-Core/RCTWebSocket - - React-jsi - - React-jsinspector - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTFabric (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-FabricImage - - React-featureflags - - React-graphics - - React-ImageManager - - React-jsi - - React-jsinspector - - React-nativeconfig - - React-performancetimeline - - React-RCTImage - - React-RCTText - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - Yoga - - React-RCTImage (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTImageHeaders - - React-jsi - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTLinking (0.76.5): - - React-Core/RCTLinkingHeaders (= 0.76.5) - - React-jsi (= 0.76.5) - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - ReactCommon/turbomodule/core (= 0.76.5) - - React-RCTNetwork (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTNetworkHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTSettings (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTSettingsHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTText (0.76.5): - - React-Core/RCTTextHeaders (= 0.76.5) - - Yoga - - React-RCTVibration (0.76.5): - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTVibrationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-rendererconsistency (0.76.5) - - React-rendererdebug (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-rncore (0.76.5) - - React-RuntimeApple (0.76.5): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-callinvoker - - React-Core/Default - - React-CoreModules - - React-cxxreact - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-Mapbuffer - - React-NativeModulesApple - - React-RCTFabric - - React-RuntimeCore - - React-runtimeexecutor - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - React-RuntimeCore (0.76.5): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-featureflags - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-performancetimeline - - React-runtimeexecutor - - React-runtimescheduler - - React-utils - - React-runtimeexecutor (0.76.5): - - React-jsi (= 0.76.5) - - React-RuntimeHermes (0.76.5): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-featureflags - - React-hermes - - React-jsi - - React-jsinspector - - React-jsitracing - - React-nativeconfig - - React-RuntimeCore - - React-utils - - React-runtimescheduler (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker - - React-cxxreact - - React-debug - - React-featureflags - - React-jsi - - React-performancetimeline - - React-rendererconsistency - - React-rendererdebug - - React-runtimeexecutor - - React-timing - - React-utils - - React-timing (0.76.5) - - React-utils (0.76.5): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-jsi (= 0.76.5) - - ReactCodegen (0.76.5): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricImage - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-NativeModulesApple - - React-rendererdebug - - React-utils - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - ReactCommon (0.76.5): - - ReactCommon/turbomodule (= 0.76.5) - - ReactCommon/turbomodule (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - ReactCommon/turbomodule/bridging (= 0.76.5) - - ReactCommon/turbomodule/core (= 0.76.5) - - ReactCommon/turbomodule/bridging (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - ReactCommon/turbomodule/core (0.76.5): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.5) - - React-cxxreact (= 0.76.5) - - React-debug (= 0.76.5) - - React-featureflags (= 0.76.5) - - React-jsi (= 0.76.5) - - React-logger (= 0.76.5) - - React-perflogger (= 0.76.5) - - React-utils (= 0.76.5) - - RNInAppBrowser (3.7.0): - - React-Core - - RNScreens (4.4.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - RNScreens/common (= 4.4.0) - - Yoga - - RNScreens/common (4.4.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - SocketRocket (0.7.1) - - Yoga (0.0.0) - -DEPENDENCIES: - - "account-kit-react-native-signer (from `../node_modules/@account-kit/react-native-signer`)" - - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - EXConstants (from `../node_modules/expo-constants/ios`) - - Expo (from `../node_modules/expo`) - - ExpoAsset (from `../node_modules/expo-asset/ios`) - - ExpoFileSystem (from `../node_modules/expo-file-system/ios`) - - ExpoFont (from `../node_modules/expo-font/ios`) - - ExpoHead (from `../node_modules/expo-router/ios`) - - ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`) - - ExpoLinking (from `../node_modules/expo-linking/ios`) - - ExpoModulesCore (from `../node_modules/expo-modules-core`) - - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) - - RCTRequired (from `../node_modules/react-native/Libraries/Required`) - - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../node_modules/react-native/`) - - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - - React-Core (from `../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) - - React-defaultsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) - - React-domnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/dom`) - - React-Fabric (from `../node_modules/react-native/ReactCommon`) - - React-FabricComponents (from `../node_modules/react-native/ReactCommon`) - - React-FabricImage (from `../node_modules/react-native/ReactCommon`) - - React-featureflags (from `../node_modules/react-native/ReactCommon/react/featureflags`) - - React-featureflagsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) - - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) - - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - - React-idlecallbacksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) - - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) - - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`) - - React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`) - - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) - - react-native-mmkv (from `../../../node_modules/react-native-mmkv`) - - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - - React-performancetimeline (from `../node_modules/react-native/ReactCommon/react/performance/timeline`) - - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) - - React-RCTFabric (from `../node_modules/react-native/React`) - - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - React-rendererconsistency (from `../node_modules/react-native/ReactCommon/react/renderer/consistency`) - - React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`) - - React-rncore (from `../node_modules/react-native/ReactCommon`) - - React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) - - React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - - React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - - React-timing (from `../node_modules/react-native/ReactCommon/react/timing`) - - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - - ReactCodegen (from `build/generated/ios`) - - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - RNInAppBrowser (from `../../../node_modules/react-native-inappbrowser-reborn`) - - RNScreens (from `../node_modules/react-native-screens`) - - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) - -SPEC REPOS: - trunk: - - Base58Swift - - BigInt - - SocketRocket - -EXTERNAL SOURCES: - account-kit-react-native-signer: - :path: "../node_modules/@account-kit/react-native-signer" - boost: - :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" - DoubleConversion: - :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" - EXConstants: - :path: "../node_modules/expo-constants/ios" - Expo: - :path: "../node_modules/expo" - ExpoAsset: - :path: "../node_modules/expo-asset/ios" - ExpoFileSystem: - :path: "../node_modules/expo-file-system/ios" - ExpoFont: - :path: "../node_modules/expo-font/ios" - ExpoHead: - :path: "../node_modules/expo-router/ios" - ExpoKeepAwake: - :path: "../node_modules/expo-keep-awake/ios" - ExpoLinking: - :path: "../node_modules/expo-linking/ios" - ExpoModulesCore: - :path: "../node_modules/expo-modules-core" - FBLazyVector: - :path: "../node_modules/react-native/Libraries/FBLazyVector" - fmt: - :podspec: "../node_modules/react-native/third-party-podspecs/fmt.podspec" - glog: - :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" - hermes-engine: - :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2024-11-12-RNv0.76.2-5b4aa20c719830dcf5684832b89a6edb95ac3d64 - RCT-Folly: - :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" - RCTDeprecation: - :path: "../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" - RCTRequired: - :path: "../node_modules/react-native/Libraries/Required" - RCTTypeSafety: - :path: "../node_modules/react-native/Libraries/TypeSafety" - React: - :path: "../node_modules/react-native/" - React-callinvoker: - :path: "../node_modules/react-native/ReactCommon/callinvoker" - React-Core: - :path: "../node_modules/react-native/" - React-CoreModules: - :path: "../node_modules/react-native/React/CoreModules" - React-cxxreact: - :path: "../node_modules/react-native/ReactCommon/cxxreact" - React-debug: - :path: "../node_modules/react-native/ReactCommon/react/debug" - React-defaultsnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/defaults" - React-domnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/dom" - React-Fabric: - :path: "../node_modules/react-native/ReactCommon" - React-FabricComponents: - :path: "../node_modules/react-native/ReactCommon" - React-FabricImage: - :path: "../node_modules/react-native/ReactCommon" - React-featureflags: - :path: "../node_modules/react-native/ReactCommon/react/featureflags" - React-featureflagsnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" - React-graphics: - :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" - React-hermes: - :path: "../node_modules/react-native/ReactCommon/hermes" - React-idlecallbacksnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" - React-ImageManager: - :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" - React-jserrorhandler: - :path: "../node_modules/react-native/ReactCommon/jserrorhandler" - React-jsi: - :path: "../node_modules/react-native/ReactCommon/jsi" - React-jsiexecutor: - :path: "../node_modules/react-native/ReactCommon/jsiexecutor" - React-jsinspector: - :path: "../node_modules/react-native/ReactCommon/jsinspector-modern" - React-jsitracing: - :path: "../node_modules/react-native/ReactCommon/hermes/executor/" - React-logger: - :path: "../node_modules/react-native/ReactCommon/logger" - React-Mapbuffer: - :path: "../node_modules/react-native/ReactCommon" - React-microtasksnativemodule: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" - react-native-mmkv: - :path: "../../../node_modules/react-native-mmkv" - react-native-safe-area-context: - :path: "../node_modules/react-native-safe-area-context" - React-nativeconfig: - :path: "../node_modules/react-native/ReactCommon" - React-NativeModulesApple: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" - React-perflogger: - :path: "../node_modules/react-native/ReactCommon/reactperflogger" - React-performancetimeline: - :path: "../node_modules/react-native/ReactCommon/react/performance/timeline" - React-RCTActionSheet: - :path: "../node_modules/react-native/Libraries/ActionSheetIOS" - React-RCTAnimation: - :path: "../node_modules/react-native/Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../node_modules/react-native/Libraries/AppDelegate" - React-RCTBlob: - :path: "../node_modules/react-native/Libraries/Blob" - React-RCTFabric: - :path: "../node_modules/react-native/React" - React-RCTImage: - :path: "../node_modules/react-native/Libraries/Image" - React-RCTLinking: - :path: "../node_modules/react-native/Libraries/LinkingIOS" - React-RCTNetwork: - :path: "../node_modules/react-native/Libraries/Network" - React-RCTSettings: - :path: "../node_modules/react-native/Libraries/Settings" - React-RCTText: - :path: "../node_modules/react-native/Libraries/Text" - React-RCTVibration: - :path: "../node_modules/react-native/Libraries/Vibration" - React-rendererconsistency: - :path: "../node_modules/react-native/ReactCommon/react/renderer/consistency" - React-rendererdebug: - :path: "../node_modules/react-native/ReactCommon/react/renderer/debug" - React-rncore: - :path: "../node_modules/react-native/ReactCommon" - React-RuntimeApple: - :path: "../node_modules/react-native/ReactCommon/react/runtime/platform/ios" - React-RuntimeCore: - :path: "../node_modules/react-native/ReactCommon/react/runtime" - React-runtimeexecutor: - :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" - React-RuntimeHermes: - :path: "../node_modules/react-native/ReactCommon/react/runtime" - React-runtimescheduler: - :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" - React-timing: - :path: "../node_modules/react-native/ReactCommon/react/timing" - React-utils: - :path: "../node_modules/react-native/ReactCommon/react/utils" - ReactCodegen: - :path: build/generated/ios - ReactCommon: - :path: "../node_modules/react-native/ReactCommon" - RNInAppBrowser: - :path: "../../../node_modules/react-native-inappbrowser-reborn" - RNScreens: - :path: "../node_modules/react-native-screens" - Yoga: - :path: "../node_modules/react-native/ReactCommon/yoga" - -SPEC CHECKSUMS: - account-kit-react-native-signer: a48450e9d497ea26553f47d4a619031f399eee92 - Base58Swift: 53d551f0b33d9478fa63b3445e453a772d6b31a7 - BigInt: 74b4d88367b0e819d9f77393549226d36faeb0d8 - boost: 1dca942403ed9342f98334bf4c3621f011aa7946 - DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385 - EXConstants: fcfc75800824ac2d5c592b5bc74130bad17b146b - Expo: 1687edb10c76b0c0f135306d6ae245379f50ed54 - ExpoAsset: 48386d40d53a8c1738929b3ed509bcad595b5516 - ExpoFileSystem: 42d363d3b96f9afab980dcef60d5657a4443c655 - ExpoFont: f354e926f8feae5e831ec8087f36652b44a0b188 - ExpoHead: df924203fbf8e0913fc38b0f6aec71f9a9115482 - ExpoKeepAwake: b0171a73665bfcefcfcc311742a72a956e6aa680 - ExpoLinking: 8d12bee174ba0cdf31239706578e29e74a417402 - ExpoModulesCore: 98297c2cc7977c43740a2e52d850d94ac8dbf176 - FBLazyVector: 1bf99bb46c6af9a2712592e707347315f23947aa - fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be - glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a - hermes-engine: 06a9c6900587420b90accc394199527c64259db4 - RCT-Folly: 84578c8756030547307e4572ab1947de1685c599 - RCTDeprecation: fb7d408617e25d7f537940000d766d60149c5fea - RCTRequired: 9aaf0ffcc1f41f0c671af863970ef25c422a9920 - RCTTypeSafety: e9a6e7d48184646eb0610295b74c0dd02768cbb2 - React: fffb3cf1b0d7aee03c4eb4952b2d58783615e9fa - React-callinvoker: 3c6ecc0315d42924e01b3ddc25cf2e49d33da169 - React-Core: 1a5ddefb00dd72644171dd39bb4bbcd7849c70f0 - React-CoreModules: 8de64f712fe272ed08f37aaf64633ddf793e70d3 - React-cxxreact: e204185e1da1c843fec2bbb10bcc5b5800355dfa - React-debug: 297ed67868a76e8384669ea9b5c65c5d9d9d15d9 - React-defaultsnativemodule: e698063aa99c75546abc7f1c18072b4d753831d8 - React-domnativemodule: bd989e5b531401d419fc598e9cc09ee843d8c2bf - React-Fabric: 925fbb4d56a3c3ef9c12366f43357a913291fdc7 - React-FabricComponents: e598e6f635699237db45e017cbe230d9094915fa - React-FabricImage: ace285e38358f01aa89a5974f5f803db72a2bb9d - React-featureflags: cb3dca1c74ba813f2e578c8c635989d01d14739f - React-featureflagsnativemodule: 8fe6e6279a0ead0735749724e6ecd8e03f3893ca - React-graphics: f7d97c8bcc5f1568fb840b6d8940af0ae89b387c - React-hermes: a12bf33d9915dbe2dcde5b6b781faab6684883fb - React-idlecallbacksnativemodule: 4dfe6da504ae4f7792132ba164c00ae192aa4a57 - React-ImageManager: 28861af68262a45e585eca5491d05cd963ab0071 - React-jserrorhandler: 15bea720b272a2e78b7731df122dbfa6e27b65aa - React-jsi: 217274301608d7fa529bd275c73020b55cf39361 - React-jsiexecutor: 1bcbc63a8c1d698b35c9fb521ee87aa48a3702d2 - React-jsinspector: 1a3345f90762b3ba2d0ab3ff5f91022487b2ed38 - React-jsitracing: 46adf5fbb769aa673145b5c57ed7cd4b7cd08e1c - React-logger: ae95f0effa7e1791bd6f7283caddca323d4fbc1e - React-Mapbuffer: 7eb5d69e1154e7743487ef0c8d7261e5b59afb32 - React-microtasksnativemodule: 01dd998649ff5f8814846b7eee84c4d57f5d3671 - react-native-mmkv: b4af3744580f08e1ffc7761103b408d313b2f772 - react-native-safe-area-context: 0f16e24dc808e9f0ced17f2bdcec692b2376fb68 - React-nativeconfig: f7ab6c152e780b99a8c17448f2d99cf5f69a2311 - React-NativeModulesApple: 9aeb901b9bfcc9235e912445fb3cf4780a99baf4 - React-perflogger: 16e049953d21b37e9871ddf0b02f414e12ff14ba - React-performancetimeline: 00d156ec43d1110a2e7dacb168a7ac95a81eccc7 - React-RCTActionSheet: a4388035260b01ac38d3647da0433b0455da9bae - React-RCTAnimation: 9cc9e88ec5f94d573d3b5d5d9702f47774d8603c - React-RCTAppDelegate: b8ca6a50167b71d67c477985597429485f39f964 - React-RCTBlob: f879b05cf702dd4099054c3c3bf05bd4757de701 - React-RCTFabric: 69ac989ccf18904cd6ad79d364cbd50343f125f3 - React-RCTImage: 8fc2b137d17fb8756cdba38d74f4d40fb9499dee - React-RCTLinking: e691e89d8658aaa772c59084a45a96e8c9ef8df1 - React-RCTNetwork: 749cb659702c3faf3efecfcb982150be0f2c834a - React-RCTSettings: 60c431627d37e6d996e0f61a9e84df8e41d898cb - React-RCTText: 74cc248bf8d2f6d07beb6196aa4c7055b3eb1a51 - React-RCTVibration: 81ff3704c7ed66a99e2670167252fd0e9a10980b - React-rendererconsistency: 42f182fe910ad6c9b449cc62adae8d0eaba76f0a - React-rendererdebug: b11083c452ed6f2a03029a9105d0d9ab7d9af1c8 - React-rncore: 85ed76036ff56e2e9c369155027cbbd84db86006 - React-RuntimeApple: 3154e09ccb48d81dcbb13f986a5313686c1d6983 - React-RuntimeCore: 985985d121db1fde5387d4dfedae78e13a5e317d - React-runtimeexecutor: 10fae9492194097c99f6e34cedbb42a308922d32 - React-RuntimeHermes: 3984572bc295675360849b07ab2608bfbd8db35d - React-runtimescheduler: 215d21fbcb922aa469c6adcf5a729e2769d210e4 - React-timing: 1050c6fa44c327f2d7538e10c548fdf521fabdb8 - React-utils: f584a494ac233c7857bab176416b0c49cb4037ba - ReactCodegen: 3a68408bf68d0957abcd13d610f76420005c1d91 - ReactCommon: 5809a8ee421b7219221a475b78180f8f34b5c5ec - RNInAppBrowser: 6d3eb68d471b9834335c664704719b8be1bfdb20 - RNScreens: 351f431ef2a042a1887d4d90e1c1024b8ae9d123 - SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: fcc198acd4a55599b3468cfb6ebc526baff5f06e - -PODFILE CHECKSUM: c8af26f0bb938c79ca9fbb84720081f30fbeab72 - -COCOAPODS: 1.16.2 diff --git a/examples/react-native-expo-example/ios/Podfile.properties.json b/examples/react-native-expo-example/ios/Podfile.properties.json deleted file mode 100644 index 0891e44249..0000000000 --- a/examples/react-native-expo-example/ios/Podfile.properties.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "expo.jsEngine": "hermes", - "EX_DEV_CLIENT_NETWORK_INSPECTOR": "true", - "newArchEnabled": "true", - "ios.deploymentTarget": "17.0", - "apple.extraPods": "[]", - "apple.ccacheEnabled": "false", - "apple.privacyManifestAggregationEnabled": "true" -} diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample.xcodeproj/project.pbxproj b/examples/react-native-expo-example/ios/reactnativeexpoexample.xcodeproj/project.pbxproj deleted file mode 100644 index f247fb0ee2..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,538 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; - 86DABA34FBDAB8CC7FA9E179 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 32010B9E709282CAD341D57D /* PrivacyInfo.xcprivacy */; }; - 96905EF65AED1B983A6B3ABC /* libPods-reactnativeexpoexample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-reactnativeexpoexample.a */; }; - 9E934678EAE94C53BFA0033E /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F2F585E0D04421E9F2FF965 /* noop-file.swift */; }; - B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; }; - BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 0F2F585E0D04421E9F2FF965 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "reactnativeexpoexample/noop-file.swift"; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* reactnativeexpoexample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = reactnativeexpoexample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = reactnativeexpoexample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = reactnativeexpoexample/AppDelegate.mm; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = reactnativeexpoexample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = reactnativeexpoexample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = reactnativeexpoexample/main.m; sourceTree = ""; }; - 32010B9E709282CAD341D57D /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = reactnativeexpoexample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-reactnativeexpoexample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-reactnativeexpoexample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6C2E3173556A471DD304B334 /* Pods-reactnativeexpoexample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativeexpoexample.debug.xcconfig"; path = "Target Support Files/Pods-reactnativeexpoexample/Pods-reactnativeexpoexample.debug.xcconfig"; sourceTree = ""; }; - 78CB0A71A1574775893CE5D7 /* reactnativeexpoexample-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "reactnativeexpoexample-Bridging-Header.h"; path = "reactnativeexpoexample/reactnativeexpoexample-Bridging-Header.h"; sourceTree = ""; }; - 7A4D352CD337FB3A3BF06240 /* Pods-reactnativeexpoexample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-reactnativeexpoexample.release.xcconfig"; path = "Target Support Files/Pods-reactnativeexpoexample/Pods-reactnativeexpoexample.release.xcconfig"; sourceTree = ""; }; - AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = reactnativeexpoexample/SplashScreen.storyboard; sourceTree = ""; }; - BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = ""; }; - ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; - FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-reactnativeexpoexample/ExpoModulesProvider.swift"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 96905EF65AED1B983A6B3ABC /* libPods-reactnativeexpoexample.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 13B07FAE1A68108700A75B9A /* reactnativeexpoexample */ = { - isa = PBXGroup; - children = ( - BB2F792B24A3F905000567C9 /* Supporting */, - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB71A68108700A75B9A /* main.m */, - AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */, - 0F2F585E0D04421E9F2FF965 /* noop-file.swift */, - 78CB0A71A1574775893CE5D7 /* reactnativeexpoexample-Bridging-Header.h */, - 32010B9E709282CAD341D57D /* PrivacyInfo.xcprivacy */, - ); - name = reactnativeexpoexample; - sourceTree = ""; - }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-reactnativeexpoexample.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - ); - name = Libraries; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* reactnativeexpoexample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - D65327D7A22EEC0BE12398D9 /* Pods */, - D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - usesTabs = 0; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* reactnativeexpoexample.app */, - ); - name = Products; - sourceTree = ""; - }; - 92DBD88DE9BF7D494EA9DA96 /* reactnativeexpoexample */ = { - isa = PBXGroup; - children = ( - FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */, - ); - name = reactnativeexpoexample; - sourceTree = ""; - }; - BB2F792B24A3F905000567C9 /* Supporting */ = { - isa = PBXGroup; - children = ( - BB2F792C24A3F905000567C9 /* Expo.plist */, - ); - name = Supporting; - path = reactnativeexpoexample/Supporting; - sourceTree = ""; - }; - D65327D7A22EEC0BE12398D9 /* Pods */ = { - isa = PBXGroup; - children = ( - 6C2E3173556A471DD304B334 /* Pods-reactnativeexpoexample.debug.xcconfig */, - 7A4D352CD337FB3A3BF06240 /* Pods-reactnativeexpoexample.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */ = { - isa = PBXGroup; - children = ( - 92DBD88DE9BF7D494EA9DA96 /* reactnativeexpoexample */, - ); - name = ExpoModulesProviders; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13B07F861A680F5B00A75B9A /* reactnativeexpoexample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactnativeexpoexample" */; - buildPhases = ( - 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */, - D9D4D7A013DD07E8615D1BDF /* [Expo] Configure project */, - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, - 20699A741D33DA7EFE0C549C /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = reactnativeexpoexample; - productName = reactnativeexpoexample; - productReference = 13B07F961A680F5B00A75B9A /* reactnativeexpoexample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1130; - TargetAttributes = { - 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1250; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactnativeexpoexample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* reactnativeexpoexample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BB2F792D24A3F905000567C9 /* Expo.plist in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */, - 86DABA34FBDAB8CC7FA9E179 /* PrivacyInfo.xcprivacy in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" \"$PROJECT_ROOT\" ios absolute | tail -n 1)\"\nfi\n\nif [[ -z \"$CLI_PATH\" ]]; then\n # Use Expo CLI\n export CLI_PATH=\"$(\"$NODE_BINARY\" --print \"require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })\")\"\nfi\nif [[ -z \"$BUNDLE_COMMAND\" ]]; then\n # Default Expo CLI command for bundling\n export BUNDLE_COMMAND=\"export:embed\"\nfi\n\n# Source .xcode.env.updates if it exists to allow\n# SKIP_BUNDLING to be unset if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.updates\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.updates\"\nfi\n# Source local changes to allow overrides\n# if needed\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n`\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\n\n"; - }; - 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-reactnativeexpoexample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 20699A741D33DA7EFE0C549C /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-reactnativeexpoexample/Pods-reactnativeexpoexample-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactnativeexpoexample/Pods-reactnativeexpoexample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-reactnativeexpoexample/Pods-reactnativeexpoexample-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-reactnativeexpoexample/Pods-reactnativeexpoexample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - D9D4D7A013DD07E8615D1BDF /* [Expo] Configure project */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "[Expo] Configure project"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-reactnativeexpoexample/expo-configure-project.sh\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */, - 9E934678EAE94C53BFA0033E /* noop-file.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6C2E3173556A471DD304B334 /* Pods-reactnativeexpoexample.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = reactnativeexpoexample/reactnativeexpoexample.entitlements; - CURRENT_PROJECT_VERSION = 1; - ENABLE_BITCODE = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "FB_SONARKIT_ENABLED=1", - ); - INFOPLIST_FILE = reactnativeexpoexample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; - PRODUCT_BUNDLE_IDENTIFIER = com.accountkit.reactnativeexpoexample; - PRODUCT_NAME = reactnativeexpoexample; - SWIFT_OBJC_BRIDGING_HEADER = "reactnativeexpoexample/reactnativeexpoexample-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7A4D352CD337FB3A3BF06240 /* Pods-reactnativeexpoexample.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = reactnativeexpoexample/reactnativeexpoexample.entitlements; - CURRENT_PROJECT_VERSION = 1; - INFOPLIST_FILE = reactnativeexpoexample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; - PRODUCT_BUNDLE_IDENTIFIER = com.accountkit.reactnativeexpoexample; - PRODUCT_NAME = reactnativeexpoexample; - SWIFT_OBJC_BRIDGING_HEADER = "reactnativeexpoexample/reactnativeexpoexample-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; - LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; - USE_HERMES = true; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; - LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - USE_HERMES = true; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "reactnativeexpoexample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "reactnativeexpoexample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample.xcodeproj/xcshareddata/xcschemes/reactnativeexpoexample.xcscheme b/examples/react-native-expo-example/ios/reactnativeexpoexample.xcodeproj/xcshareddata/xcschemes/reactnativeexpoexample.xcscheme deleted file mode 100644 index d19c2b1a8d..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample.xcodeproj/xcshareddata/xcschemes/reactnativeexpoexample.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample.xcworkspace/contents.xcworkspacedata b/examples/react-native-expo-example/ios/reactnativeexpoexample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a71a6aa2f5..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/AppDelegate.h b/examples/react-native-expo-example/ios/reactnativeexpoexample/AppDelegate.h deleted file mode 100644 index 1658a437eb..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/AppDelegate.h +++ /dev/null @@ -1,7 +0,0 @@ -#import -#import -#import - -@interface AppDelegate : EXAppDelegateWrapper - -@end diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/AppDelegate.mm b/examples/react-native-expo-example/ios/reactnativeexpoexample/AppDelegate.mm deleted file mode 100644 index b27f83286d..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/AppDelegate.mm +++ /dev/null @@ -1,62 +0,0 @@ -#import "AppDelegate.h" - -#import -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.moduleName = @"main"; - - // You can add your custom initial props in the dictionary below. - // They will be passed down to the ViewController used by React Native. - self.initialProps = @{}; - - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ - return [self bundleURL]; -} - -- (NSURL *)bundleURL -{ -#if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"]; -#else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; -#endif -} - -// Linking API -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options { - return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options]; -} - -// Universal Links -- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler { - BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler]; - return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result; -} - -// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken -{ - return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; -} - -// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries -- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error -{ - return [super application:application didFailToRegisterForRemoteNotificationsWithError:error]; -} - -// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler -{ - return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; -} - -@end diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png deleted file mode 100644 index 2732229faf..0000000000 Binary files a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png and /dev/null differ diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 90d8d4c2a9..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "images": [ - { - "filename": "App-Icon-1024x1024@1x.png", - "idiom": "universal", - "platform": "ios", - "size": "1024x1024" - } - ], - "info": { - "version": 1, - "author": "expo" - } -} \ No newline at end of file diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/Contents.json b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/Contents.json deleted file mode 100644 index ed285c2e5f..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "expo" - } -} diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenBackground.colorset/Contents.json b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenBackground.colorset/Contents.json deleted file mode 100644 index 15f02abee4..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenBackground.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors": [ - { - "color": { - "components": { - "alpha": "1.000", - "blue": "1.00000000000000", - "green": "1.00000000000000", - "red": "1.00000000000000" - }, - "color-space": "srgb" - }, - "idiom": "universal" - } - ], - "info": { - "version": 1, - "author": "expo" - } -} \ No newline at end of file diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/Contents.json b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/Contents.json deleted file mode 100644 index f65c008be7..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "idiom": "universal", - "filename": "image.png", - "scale": "1x" - }, - { - "idiom": "universal", - "filename": "image@2x.png", - "scale": "2x" - }, - { - "idiom": "universal", - "filename": "image@3x.png", - "scale": "3x" - } - ], - "info": { - "version": 1, - "author": "expo" - } -} \ No newline at end of file diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image.png b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image.png deleted file mode 100644 index b9ff0fcbfe..0000000000 Binary files a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image.png and /dev/null differ diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image@2x.png b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image@2x.png deleted file mode 100644 index b9ff0fcbfe..0000000000 Binary files a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image@2x.png and /dev/null differ diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image@3x.png b/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image@3x.png deleted file mode 100644 index b9ff0fcbfe..0000000000 Binary files a/examples/react-native-expo-example/ios/reactnativeexpoexample/Images.xcassets/SplashScreenLogo.imageset/image@3x.png and /dev/null differ diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Info.plist b/examples/react-native-expo-example/ios/reactnativeexpoexample/Info.plist deleted file mode 100644 index bcd8f6498d..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/Info.plist +++ /dev/null @@ -1,79 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - react-native-expo-example - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleURLSchemes - - aa-rn-expo-example - com.accountkit.reactnativeexpoexample - - - - CFBundleVersion - 1 - LSMinimumSystemVersion - 12.0 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - NSUserActivityTypes - - $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route - - UILaunchStoryboardName - SplashScreen - UIRequiredDeviceCapabilities - - arm64 - - UIRequiresFullScreen - - UIStatusBarStyle - UIStatusBarStyleDefault - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIUserInterfaceStyle - Light - UIViewControllerBasedStatusBarAppearance - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/PrivacyInfo.xcprivacy b/examples/react-native-expo-example/ios/reactnativeexpoexample/PrivacyInfo.xcprivacy deleted file mode 100644 index 5bb83c5d43..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,48 +0,0 @@ - - - - - NSPrivacyAccessedAPITypes - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryUserDefaults - NSPrivacyAccessedAPITypeReasons - - CA92.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryFileTimestamp - NSPrivacyAccessedAPITypeReasons - - 0A2A.1 - 3B52.1 - C617.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategoryDiskSpace - NSPrivacyAccessedAPITypeReasons - - E174.1 - 85F4.1 - - - - NSPrivacyAccessedAPIType - NSPrivacyAccessedAPICategorySystemBootTime - NSPrivacyAccessedAPITypeReasons - - 35F9.1 - - - - NSPrivacyCollectedDataTypes - - NSPrivacyTracking - - - diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/SplashScreen.storyboard b/examples/react-native-expo-example/ios/reactnativeexpoexample/SplashScreen.storyboard deleted file mode 100644 index 8a6fcd47bc..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/SplashScreen.storyboard +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/Supporting/Expo.plist b/examples/react-native-expo-example/ios/reactnativeexpoexample/Supporting/Expo.plist deleted file mode 100644 index 750be020cf..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/Supporting/Expo.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - EXUpdatesCheckOnLaunch - ALWAYS - EXUpdatesEnabled - - EXUpdatesLaunchWaitMs - 0 - - \ No newline at end of file diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/main.m b/examples/react-native-expo-example/ios/reactnativeexpoexample/main.m deleted file mode 100644 index 25181b6ccb..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/main.m +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} - diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/noop-file.swift b/examples/react-native-expo-example/ios/reactnativeexpoexample/noop-file.swift deleted file mode 100644 index b2ffafbfc6..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/noop-file.swift +++ /dev/null @@ -1,4 +0,0 @@ -// -// @generated -// A blank Swift file must be created for native modules with Swift files to work correctly. -// diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/reactnativeexpoexample-Bridging-Header.h b/examples/react-native-expo-example/ios/reactnativeexpoexample/reactnativeexpoexample-Bridging-Header.h deleted file mode 100644 index e11d920b12..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/reactnativeexpoexample-Bridging-Header.h +++ /dev/null @@ -1,3 +0,0 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// diff --git a/examples/react-native-expo-example/ios/reactnativeexpoexample/reactnativeexpoexample.entitlements b/examples/react-native-expo-example/ios/reactnativeexpoexample/reactnativeexpoexample.entitlements deleted file mode 100644 index f683276c57..0000000000 --- a/examples/react-native-expo-example/ios/reactnativeexpoexample/reactnativeexpoexample.entitlements +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/react-native-expo-example/metro.config.js b/examples/react-native-expo-example/metro.config.js deleted file mode 100644 index 80cf4172f4..0000000000 --- a/examples/react-native-expo-example/metro.config.js +++ /dev/null @@ -1,85 +0,0 @@ -const { getDefaultConfig } = require("expo/metro-config"); -const path = require("path"); -const fs = require("fs"); - -// Find the project and workspace directories -const projectRoot = __dirname; -// This can be replaced with `find-yarn-workspace-root` -const monorepoRoot = path.resolve(projectRoot, "../.."); - -const config = getDefaultConfig(projectRoot); - -// Add aliases for file-system import based modules -const ALIASES = { - "@noble/hashes/crypto": path.resolve( - monorepoRoot, - "node_modules/@noble/hashes/crypto.js", - ), - "@sinclair/typebox": path.resolve( - monorepoRoot, - "node_modules/@sinclair/typebox/build/cjs/index.js", - ), -}; - -// 1. Watch all files within the monorepo -config.watchFolders = [projectRoot, monorepoRoot]; - -// 2. Let Metro know where to resolve packages and in what order -config.resolver.nodeModulesPaths = [ - path.resolve(projectRoot, "node_modules"), - path.resolve(monorepoRoot, "node_modules"), - path.resolve(monorepoRoot, "account-kit/rn-signer/node_modules"), -]; - -// Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths` -config.resolver.disableHierarchicalLookup = true; - -// Default to file-based module resolution for file-system import based modules -config.resolver.resolveRequest = (context, moduleName, platform) => { - if (ALIASES[moduleName]) { - return { - filePath: ALIASES[moduleName], - type: "sourceFile", - }; - } - - // Handle .js/.jsx extensions on TypeScript files - if ( - (moduleName.startsWith(".") || moduleName.startsWith("/")) && - (moduleName.endsWith(".js") || moduleName.endsWith(".jsx")) - ) { - const moduleFilePath = path.resolve( - context.originModulePath, - "..", - moduleName - ); - - // if the file exists, we won't remove extension, and we'll fall back to normal resolution. - if (!fs.existsSync(moduleFilePath)) { - return context.resolveRequest( - context, - moduleName.replace(/\.[^/.]+$/, ""), - platform - ); - } - } - - return context.resolveRequest(context, moduleName, platform); -}; - -config.resolver.extraNodeModules = { - ...config.resolver.extraNodeModules, - crypto: require.resolve("crypto-browserify"), - stream: require.resolve("stream-browserify"), -}; - -// Important to allow importing package exports -config.resolver.unstable_enablePackageExports = true; - -config.resolver.unstable_conditionNames = [ - "browser", - "require", - "react-native", -]; - -module.exports = config; diff --git a/examples/react-native-expo-example/package.json b/examples/react-native-expo-example/package.json deleted file mode 100644 index 921b87fc38..0000000000 --- a/examples/react-native-expo-example/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "react-native-expo-example", - "version": "1.0.0", - "main": "expo-router/entry", - "scripts": { - "start": "expo start", - "android": "expo run:android", - "ios": "expo run:ios", - "web": "expo start --web" - }, - "dependencies": { - "@account-kit/infra": "4.17.0", - "@account-kit/react": "4.17.0", - "@account-kit/react-native": "4.17.0", - "@account-kit/react-native-signer": "4.17.0", - "@account-kit/signer": "4.17.0", - "@noble/hashes": "1.7.1", - "expo": "~52.0.47", - "expo-build-properties": "~0.13.2", - "expo-constants": "~17.0.3", - "expo-linking": "~7.0.3", - "expo-router": "4.0.21", - "expo-status-bar": "~2.0.0", - "node-libs-react-native": "^1.2.1", - "react": "18.3.1", - "react-native": "0.76.9", - "react-native-inappbrowser-reborn": "^3.7.0", - "react-native-mmkv": "^3.1.0", - "react-native-safe-area-context": "4.12.0", - "react-native-screens": "~4.4.0", - "stream-browserify": "^3.0.0" - }, - "devDependencies": { - "@babel/core": "^7.25.2", - "@types/react": "~18.3.12" - }, - "resolutions": { - "react": "18.3.1", - "react-native": "0.76.9" - }, - "private": true, - "workspaces": { - "nohoist": [ - "**/expo", - "**/expo/**", - "**/expo-router", - "**/expo-router/**" - ] - } -} diff --git a/examples/react-native-expo-example/tsconfig.json b/examples/react-native-expo-example/tsconfig.json deleted file mode 100644 index 869436ace5..0000000000 --- a/examples/react-native-expo-example/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "expo/tsconfig.base", - "compilerOptions": { - "strict": true, - "module": "ESNext", - "moduleResolution": "Bundler" - } -} diff --git a/examples/server-wallets/.env.example b/examples/server-wallets/.env.example deleted file mode 100644 index 73fe57a70d..0000000000 --- a/examples/server-wallets/.env.example +++ /dev/null @@ -1,6 +0,0 @@ -ALCHEMY_API_KEY= -ALCHEMY_GAS_MANAGER_POLICY_ID= -# optional -ALCHEMY_API_URL= -# optional -ALCHEMY_RPC_API_KEY= \ No newline at end of file diff --git a/examples/server-wallets/package.json b/examples/server-wallets/package.json deleted file mode 100644 index 70cfd27b0b..0000000000 --- a/examples/server-wallets/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "server-wallets", - "version": "0.1.0", - "private": true, - "engines": { - "node": "22.x" - }, - "dependencies": { - "@account-kit/infra": "^4.62.2", - "@account-kit/signer": "^4.62.2", - "@account-kit/wallet-client": "^4.62.2", - "dotenv": "^17.2.2" - }, - "devDependencies": { - "tsx": "^4.20.5", - "typescript": "^5.9.2" - }, - "scripts": { - "start": "tsx src/app.ts" - } -} diff --git a/examples/server-wallets/src/app.ts b/examples/server-wallets/src/app.ts deleted file mode 100644 index e72874f9ad..0000000000 --- a/examples/server-wallets/src/app.ts +++ /dev/null @@ -1,53 +0,0 @@ -import 'dotenv/config' - -import { createServerSigner, generateAccessKey } from "@account-kit/signer"; -import { createSmartWalletClient } from "@account-kit/wallet-client"; -import { raise } from './util'; -import { alchemy, baseSepolia } from '@account-kit/infra'; - -const envConfig = { - ALCHEMY_API_KEY: process.env.ALCHEMY_API_KEY ?? raise("ALCHEMY_API_KEY is not set"), - ALCHEMY_RPC_API_KEY: process.env.ALCHEMY_RPC_API_KEY ?? process.env.ALCHEMY_API_KEY ?? raise("ALCHEMY_RPC_API_KEY is not set"), - ALCHEMY_GAS_MANAGER_POLICY_ID: process.env.ALCHEMY_GAS_MANAGER_POLICY_ID ?? raise("ALCHEMY_GAS_MANAGER_POLICY_ID is not set"), - ALCHEMY_API_URL: process.env.ALCHEMY_API_URL, -} - -const transport = alchemy({ - apiKey: envConfig.ALCHEMY_RPC_API_KEY -}) - -async function app() { - const accessKey = generateAccessKey() - console.log("🔑 Access key generated:", accessKey); - - const signer = await createServerSigner({ - auth: { - accessKey - }, - connection: { - jwt: envConfig.ALCHEMY_API_KEY, - rpcUrl: envConfig.ALCHEMY_API_URL, - }, - }) - - const client = createSmartWalletClient({ - transport, - chain: baseSepolia, - signer, - policyId: envConfig.ALCHEMY_GAS_MANAGER_POLICY_ID, - }); - - const account = await client.requestAccount(); - console.log("🧩 Using account:", account.address); - - const { id } = await client.sendCalls({ - calls: [{ to: "0x0000000000000000000000000000000000000000", value: "0x0" }], - from: account.address - }); - console.log("🚀 Call sent:", id); - - const { receipts } = await client.waitForCallsStatus({ id }); - console.log("✨ Landed in tx:", receipts?.[0].transactionHash); -} - -app() \ No newline at end of file diff --git a/examples/server-wallets/src/util.ts b/examples/server-wallets/src/util.ts deleted file mode 100644 index 9a7326611c..0000000000 --- a/examples/server-wallets/src/util.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function raise(message: string): never { - throw new Error(message); -} \ No newline at end of file diff --git a/examples/server-wallets/tsconfig.json b/examples/server-wallets/tsconfig.json deleted file mode 100644 index 7d360919a5..0000000000 --- a/examples/server-wallets/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "typescript-template/base.json" -} \ No newline at end of file diff --git a/examples/ui-demo/.env.example b/examples/ui-demo/.env.example deleted file mode 100644 index 14f1767586..0000000000 --- a/examples/ui-demo/.env.example +++ /dev/null @@ -1,8 +0,0 @@ -API_KEY="" -ALCHEMY_API_URL="https://api.g.alchemy.com" -ALCHEMY_RPC_URL="https://arb-sepolia.g.alchemy.com/v2/" -ALCHEMY_SOLANA_URL="https://solana-devnet.g.alchemy.com/v2/" -# For the gas sponsorship demo card -NEXT_PUBLIC_PAYMASTER_POLICY_ID="" -# For the ERC20 paymaster demo card -NEXT_PUBLIC_ERC20_SPONSORSHIP_POLICY_ID="" diff --git a/examples/ui-demo/.eslintrc.json b/examples/ui-demo/.eslintrc.json deleted file mode 100644 index 54f4a2c80f..0000000000 --- a/examples/ui-demo/.eslintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "next/core-web-vitals", - "rules": { - "import/extensions": "off", - "@next/next/no-html-link-for-pages": "off" - }, - "ignorePatterns": ["contracts"] -} diff --git a/examples/ui-demo/.gitignore b/examples/ui-demo/.gitignore deleted file mode 100644 index 3dd5613f59..0000000000 --- a/examples/ui-demo/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# Playwright -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ diff --git a/examples/ui-demo/README.md b/examples/ui-demo/README.md deleted file mode 100644 index bc3e7f6752..0000000000 --- a/examples/ui-demo/README.md +++ /dev/null @@ -1,54 +0,0 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -# Getting Started - -## Setup your Environment - -1. Ensure you have the right node version corresponding to the `/aa-sdk/.nvmrc` file. -2. Go to Alchemy's Dashboard, and enable [smart wallets](https://dashboard.alchemy.com/apps/latest/services/smart-wallets/overview) on your app. - 1. For local development set the configuration with a redirect url to http://localhost:3000. - -## Install Dependencies - -_In the root `/aa-sdk/` directory_ - -```bash -yarn install -``` - -## Build the aa-sdk Libraries - -_In the root `/aa-sdk/` directory_ - -```bash -yarn build -``` - -## Start the Server - -_In the ui-demo `/aa-sdk/examples/ui-demo` directory_ - -```bash -yarn dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/examples/ui-demo/components.json b/examples/ui-demo/components.json deleted file mode 100644 index 7559f63f10..0000000000 --- a/examples/ui-demo/components.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "default", - "rsc": true, - "tsx": true, - "tailwind": { - "config": "tailwind.config.ts", - "css": "src/app/globals.css", - "baseColor": "slate", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils" - } -} diff --git a/examples/ui-demo/contracts/.gitignore b/examples/ui-demo/contracts/.gitignore deleted file mode 100644 index 920b50ddf0..0000000000 --- a/examples/ui-demo/contracts/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Foundry build and cache directories -out/ -out-optimized/ -cache/ -node_modules/ - -# Coverage -report/ -lcov.info - -# env vars -.env - -# deployments -broadcast/**/run-latest.json -broadcast/**/dry-run/**/* - -# misc -.DS_Store -**/.DS_Store - -# Monorepo support: unhide lib/ -!lib/ \ No newline at end of file diff --git a/examples/ui-demo/contracts/Deployments.md b/examples/ui-demo/contracts/Deployments.md deleted file mode 100644 index c0d6b9a12c..0000000000 --- a/examples/ui-demo/contracts/Deployments.md +++ /dev/null @@ -1,11 +0,0 @@ -## Mock Swap Venue - -Salt: 0 - -Swap: 0xB0AEC4c25E8332256A91bBaf169E3C32dfC3C33C -DemoUSDC: 0xCFf7C6dA719408113DFcb5e36182c6d5aa491443 -DemoWETH: 0x0766798566D1f6e2f0b126f7783aaB2CBb81c66f - -## AccountKit Demo NFT - -0x7E06a337929B1Cb92363e15414e37959a36E5338 \ No newline at end of file diff --git a/examples/ui-demo/contracts/README.md b/examples/ui-demo/contracts/README.md deleted file mode 100644 index 01be8148a4..0000000000 --- a/examples/ui-demo/contracts/README.md +++ /dev/null @@ -1,79 +0,0 @@ -## Foundry - -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** - -Foundry consists of: - -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. - -## Documentation - -https://book.getfoundry.sh/ - -## Usage - -### Build - -```shell -$ forge build -``` - -### Test - -```shell -$ forge test -``` - -### Format - -```shell -$ forge fmt -``` - -### Gas Snapshots - -```shell -$ forge snapshot -``` - -### Anvil - -```shell -$ anvil -``` - -### Deploy - -```shell -$ FOUNDRY_PROFILE=optimized-build forge script script/DeploySwapVenue.s.sol -vv --verify --rpc-url -``` - -Make sure to have a verifier API key at the env var `ETHERSCAN_API_KEY` before using. - -Otherwise, verify manually with: - -```shell - -FOUNDRY_PROFILE=optimized-build forge verify-contract 0xB0AEC4c25E8332256A91bBaf169E3C32dfC3C33C Swap --rpc-url --watch - -FOUNDRY_PROFILE=optimized-build forge verify-contract 0xCFf7C6dA719408113DFcb5e36182c6d5aa491443 ERC20Mintable --rpc-url --watch --constructor-args $(cast abi-encode "constructor(string,string)" "DemoUSDC" "USDC") - -FOUNDRY_PROFILE=optimized-build forge verify-contract 0x0766798566D1f6e2f0b126f7783aaB2CBb81c66f ERC20Mintable --rpc-url --watch --constructor-args $(cast abi-encode "constructor(string,string)" "DemoWETH" "WETH") -``` - -### Cast - -```shell -$ cast -``` - -### Help - -```shell -$ forge --help -$ anvil --help -$ cast --help -``` diff --git a/examples/ui-demo/contracts/broadcast/DeployERC20Mintable6Decimals.s.sol/421614/run-1747861748.json b/examples/ui-demo/contracts/broadcast/DeployERC20Mintable6Decimals.s.sol/421614/run-1747861748.json deleted file mode 100644 index 1e700c1dbc..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeployERC20Mintable6Decimals.s.sol/421614/run-1747861748.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x9cd0a832b712ad1c347e278f4d026da1e0c858ed226caae46b4c518baef784b5", - "transactionType": "CREATE2", - "contractName": "ERC20Mintable6Decimals", - "contractAddress": "0xe9a174444d5fb88c563fda0efc3ad905a72b7c59", - "function": null, - "arguments": [ - "Smart Wallets Demo USD Coin", - "SWUSDC" - ], - "transaction": { - "from": "0x3be7c46807b4c749a381c9590a02ce788ea22e53", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0xc70aa", - "value": "0x0", - "input": "0x000000000000000000000000000000000000000000000000000000000000000060a06040523461031e57610cb08038038061001981610322565b92833981019060408183031261031e5780516001600160401b03811161031e5782610045918301610347565b60208201519092906001600160401b03811161031e576100659201610347565b81516001600160401b03811161023157600354600181811c91168015610314575b602082101461021357601f81116102b1575b50602092601f821160011461025057928192935f92610245575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161023157600454600181811c91168015610227575b602082101461021357601f81116101b0575b50602091601f8211600114610150579181925f92610145575b50508160011b915f199060031b1c1916176004555b600660805260405161091790816103998239608051816104870152f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061019857508360019510610180575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610172565b91926020600181928685015181550194019201610160565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c81019160208410610209575b601f0160051c01905b8181106101fe57506100fa565b5f81556001016101f1565b90915081906101e8565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b8681106102995750836001959610610281575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610273565b91926020600181928685015181550194019201610260565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c8101916020841061030a575b601f0160051c01905b8181106102ff5750610098565b5f81556001016102f2565b90915081906102e9565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761023157604052565b81601f8201121561031e578051906001600160401b03821161023157610376601f8301601f1916602001610322565b928284526020838301011161031e57815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106cd57508063095ea7b31461063e57806318160ddd1461062157806323b872dd146104ab578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ce565b73ffffffffffffffffffffffffffffffffffffffff6100c06107f1565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ce565b6024359033610814565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a2829182604052826107a4565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ce565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ce565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346100f85760606003193601126100f8576104c46107ce565b6104cc6107f1565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610548575b506101229350610814565b8381106105ed5784156105c157331561059557610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461053d565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106576107ce565b6024359033156105c15773ffffffffffffffffffffffffffffffffffffffff1690811561059557335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c6001831692831561079a575b60208210841461027157818552849390811561022f575060011461073e575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a2829182604052826107a4565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061077e5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610768565b90607f16906106f2565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108de5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f20548181106108ac57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001b536d6172742057616c6c6574732044656d6f2055534420436f696e000000000000000000000000000000000000000000000000000000000000000000000000065357555344430000000000000000000000000000000000000000000000000000", - "nonce": "0x6", - "chainId": "0x66eee" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x119f55", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x9cd0a832b712ad1c347e278f4d026da1e0c858ed226caae46b4c518baef784b5", - "transactionIndex": "0x8", - "blockHash": "0xd0aad16b5ccd594130d9db045c5384b789843910383413715e6c6159571785fa", - "blockNumber": "0x942f9c6", - "gasUsed": "0x9627c", - "effectiveGasPrice": "0x5f5e100", - "from": "0x3be7c46807b4c749a381c9590a02ce788ea22e53", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "gasUsedForL1": "0x0", - "l1BlockNumber": "0x7fd4b6", - "timeboosted": false - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1747861748, - "chain": 421614, - "commit": "c5838d89" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeployERC20Mintable6Decimals.s.sol/84532/run-1747861710.json b/examples/ui-demo/contracts/broadcast/DeployERC20Mintable6Decimals.s.sol/84532/run-1747861710.json deleted file mode 100644 index 999db16974..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeployERC20Mintable6Decimals.s.sol/84532/run-1747861710.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x013db3a0465f8388ea05c82e2f7b8df01ef564d9af6174d82c47cf49ef1d9e1c", - "transactionType": "CREATE2", - "contractName": "ERC20Mintable6Decimals", - "contractAddress": "0xe9a174444d5fb88c563fda0efc3ad905a72b7c59", - "function": null, - "arguments": [ - "Smart Wallets Demo USD Coin", - "SWUSDC" - ], - "transaction": { - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0xcf66d", - "value": "0x0", - "input": "0x000000000000000000000000000000000000000000000000000000000000000060a06040523461031e57610cb08038038061001981610322565b92833981019060408183031261031e5780516001600160401b03811161031e5782610045918301610347565b60208201519092906001600160401b03811161031e576100659201610347565b81516001600160401b03811161023157600354600181811c91168015610314575b602082101461021357601f81116102b1575b50602092601f821160011461025057928192935f92610245575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161023157600454600181811c91168015610227575b602082101461021357601f81116101b0575b50602091601f8211600114610150579181925f92610145575b50508160011b915f199060031b1c1916176004555b600660805260405161091790816103998239608051816104870152f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061019857508360019510610180575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610172565b91926020600181928685015181550194019201610160565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c81019160208410610209575b601f0160051c01905b8181106101fe57506100fa565b5f81556001016101f1565b90915081906101e8565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b8681106102995750836001959610610281575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610273565b91926020600181928685015181550194019201610260565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c8101916020841061030a575b601f0160051c01905b8181106102ff5750610098565b5f81556001016102f2565b90915081906102e9565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761023157604052565b81601f8201121561031e578051906001600160401b03821161023157610376601f8301601f1916602001610322565b928284526020838301011161031e57815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106cd57508063095ea7b31461063e57806318160ddd1461062157806323b872dd146104ab578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ce565b73ffffffffffffffffffffffffffffffffffffffff6100c06107f1565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ce565b6024359033610814565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a2829182604052826107a4565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ce565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ce565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346100f85760606003193601126100f8576104c46107ce565b6104cc6107f1565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610548575b506101229350610814565b8381106105ed5784156105c157331561059557610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461053d565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106576107ce565b6024359033156105c15773ffffffffffffffffffffffffffffffffffffffff1690811561059557335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c6001831692831561079a575b60208210841461027157818552849390811561022f575060011461073e575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a2829182604052826107a4565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061077e5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610768565b90607f16906106f2565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108de5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f20548181106108ac57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001b536d6172742057616c6c6574732044656d6f2055534420436f696e000000000000000000000000000000000000000000000000000000000000000000000000065357555344430000000000000000000000000000000000000000000000000000", - "nonce": "0x8", - "chainId": "0x14a34" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x1d54ba", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x013db3a0465f8388ea05c82e2f7b8df01ef564d9af6174d82c47cf49ef1d9e1c", - "transactionIndex": "0x18", - "blockHash": "0x01647d3a170b49a3a801508163fe5be1e0d60177b5d889858399601ae24add79", - "blockNumber": "0x18d70f6", - "gasUsed": "0x9627c", - "effectiveGasPrice": "0xf44d3", - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "l1BaseFeeScalar": "0x44d", - "l1BlobBaseFee": "0x1", - "l1BlobBaseFeeScalar": "0xa118b", - "l1Fee": "0xaaf", - "l1GasPrice": "0x36", - "l1GasUsed": "0x6a22" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1747861710, - "chain": 84532, - "commit": "c5838d89" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/421614/run-1746715855.json b/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/421614/run-1746715855.json deleted file mode 100644 index 52c8319da1..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/421614/run-1746715855.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "transactions": [ - { - "hash": "0xdc345ebade8067d8311fe9ec0ef2c1c049e3e724c0524da4c334c6fff7ffec3c", - "transactionType": "CREATE2", - "contractName": "NFT", - "contractAddress": "0xaef18c0fd8190fb780922f7d1cfed48dfab0a88c", - "function": null, - "arguments": [ - "Smart Wallets Demo NFT", - "SWD", - "https://static.alchemyapi.io/assets/accountkit/smartwallet.png" - ], - "transaction": { - "from": "0x3be7c46807b4c749a381c9590a02ce788ea22e53", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x226875", - "value": "0x0", - "input": "0x00000000000000000000000000000000000000000000000000000000000000006080604052346104685761184d803803806100198161046c565b92833981016060828203126104685781516001600160401b0381116104685781610044918401610491565b60208301519092906001600160401b0381116104685782610066918301610491565b60408201519092906001600160401b038111610468576100869201610491565b82516001600160401b0381116102a3575f54600181811c9116801561045e575b602082101461028557601f81116103fc575b506020601f821160011461039b57819293945f92610390575b50508160011b915f199060031b1c1916175f555b81516001600160401b0381116102a357600154600181811c91168015610386575b602082101461028557601f8111610323575b50602092601f82116001146102c257928192935f926102b7575b50508160011b915f199060031b1c1916176001555b80516001600160401b0381116102a357600654600181811c91168015610299575b602082101461028557601f8111610222575b50602091601f82116001146101c2579181925f926101b7575b50508160011b915f199060031b1c1916176006555b60405161136a90816104e38239f35b015190505f80610193565b601f1982169260065f52805f20915f5b85811061020a575083600195106101f2575b505050811b016006556101a8565b01515f1960f88460031b161c191690555f80806101e4565b919260206001819286850151815501940192016101d2565b60065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f601f830160051c8101916020841061027b575b601f0160051c01905b818110610270575061017a565b5f8155600101610263565b909150819061025a565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610168565b634e487b7160e01b5f52604160045260245ffd5b015190505f80610132565b601f1982169360015f52805f20915f5b86811061030b57508360019596106102f3575b505050811b01600155610147565b01515f1960f88460031b161c191690555f80806102e5565b919260206001819286850151815501940192016102d2565b60015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f830160051c8101916020841061037c575b601f0160051c01905b8181106103715750610118565b5f8155600101610364565b909150819061035b565b90607f1690610106565b015190505f806100d1565b601f198216905f8052805f20915f5b8181106103e4575095836001959697106103cc575b505050811b015f556100e5565b01515f1960f88460031b161c191690555f80806103bf565b9192602060018192868b0151815501940192016103aa565b5f80527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563601f830160051c81019160208410610454575b601f0160051c01905b81811061044957506100b8565b5f815560010161043c565b9091508190610433565b90607f16906100a6565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102a357604052565b81601f82011215610468578051906001600160401b0382116102a3576104c0601f8301601f191660200161046c565b928284526020838301011161046857815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c9081629a9b7b14610c635750806301ffc9a714610b9157806306fdde0314610ad9578063081812fc14610a8f578063095ea7b31461093157806323b872dd1461091a57806342842e0e146108eb5780636352211e146108af5780636c0360eb1461089457806370a082311461081d578063755edd171461046457806395d89b4114610339578063a22cb4651461025a578063b88d4fde146101c4578063c87b56dd146101425763e985e9c5146100cb575f80fd5b3461013e57604060031936011261013e576100e4610cc0565b73ffffffffffffffffffffffffffffffffffffffff610101610ce3565b91165f52600560205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b5f80fd5b3461013e57602060031936011261013e5773ffffffffffffffffffffffffffffffffffffffff610173600435611158565b161561019c57610198610184610dc8565b604051918291602083526020830190610c7d565b0390f35b7fd872946b000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461013e57608060031936011261013e576101dd610cc0565b6101e5610ce3565b906044356064359267ffffffffffffffff841161013e573660238501121561013e5783600401359261021684610eb4565b936102246040519586610d5a565b808552366024828801011161013e576020815f92602461025899018389013786010152610252838383610eee565b336111b1565b005b3461013e57604060031936011261013e57610273610cc0565b6024359081151580920361013e5773ffffffffffffffffffffffffffffffffffffffff1690811561030d57335f52600560205260405f20825f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b507f5b08ba18000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b3461013e575f60031936011261013e576040515f6001548060011c9060018116801561045a575b60208310811461042d578285529081156103eb575060011461038d575b6101988361018481850382610d5a565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b8082106103d15750909150810160200161018461037d565b9192600181602092548385880101520191019092916103b9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b84019091019150610184905061037d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610360565b602060031936011261013e57610478610cc0565b6007547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f057600101806007556020906040516104b98382610d5a565b5f815273ffffffffffffffffffffffffffffffffffffffff84169384156107c457825f526002845273ffffffffffffffffffffffffffffffffffffffff60405f2054168015159081610757575b865f526003865260405f2060018154019055845f526002865260405f20877fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790558487827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a45061072b573b610586575b50604051908152f35b826105d891604051809381927f150b7a020000000000000000000000000000000000000000000000000000000083523360048401525f6024840152866044840152608060648401526084830190610c7d565b03815f885af15f91816106d3575b506106525750503d1561064b573d6105fd81610eb4565b9061060b6040519283610d5a565b81523d5f8383013e5b8051918261064857837f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b01fd5b6060610614565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a0200000000000000000000000000000000000000000000000000000000919492939416036106a8575081908361057d565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091508381813d8311610724575b6106eb8183610d5a565b8101031261013e57517fffffffff000000000000000000000000000000000000000000000000000000008116810361013e5790856105e6565b503d6106e1565b7f73c6ac6e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b61078e855f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b805f526003865260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154019055610506565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b3461013e57602060031936011261013e5773ffffffffffffffffffffffffffffffffffffffff61084b610cc0565b168015610868575f526003602052602060405f2054604051908152f35b7f89c62b64000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b3461013e575f60031936011261013e57610198610184610dc8565b3461013e57602060031936011261013e5760206108cd600435611158565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b3461013e576102586108fc36610d06565b906040519261090c602085610d5a565b5f8452610252838383610eee565b3461013e5761025861092b36610d06565b91610eee565b3461013e57604060031936011261013e5761094a610cc0565b60243561095681611158565b33151580610a6f575b80610a22575b6109f657819073ffffffffffffffffffffffffffffffffffffffff80851691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f52600460205273ffffffffffffffffffffffffffffffffffffffff60405f2091167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555f80f35b7fa9fbf51f000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff81165f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615610965565b503373ffffffffffffffffffffffffffffffffffffffff8216141561095f565b3461013e57602060031936011261013e57600435610aac81611158565b505f526004602052602073ffffffffffffffffffffffffffffffffffffffff60405f205416604051908152f35b3461013e575f60031936011261013e576040515f80548060011c90600181168015610b87575b60208310811461042d578285529081156103eb5750600114610b2b576101988361018481850382610d5a565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210610b6d5750909150810160200161018461037d565b919260018160209254838588010152019101909291610b55565b91607f1691610aff565b3461013e57602060031936011261013e576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361013e57807f80ac58cd0000000000000000000000000000000000000000000000000000000060209214908115610c39575b8115610c0f575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501482610c04565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610bfd565b3461013e575f60031936011261013e576020906007548152f35b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b600319606091011261013e5760043573ffffffffffffffffffffffffffffffffffffffff8116810361013e579060243573ffffffffffffffffffffffffffffffffffffffff8116810361013e579060443590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610d9b57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051905f6006548060011c9160018216918215610eaa575b60208410831461042d578386528592908115610e6d5750600114610e0e575b610e0c92500383610d5a565b565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310610e51575050906020610e0c92820101610e00565b6020919350806001915483858901015201910190918492610e39565b60209250610e0c9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101610e00565b92607f1692610de1565b67ffffffffffffffff8111610d9b57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919073ffffffffffffffffffffffffffffffffffffffff1680156107c457815f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f20541692823315159283611070575b73ffffffffffffffffffffffffffffffffffffffff935085611002575b805f52600360205260405f2060018154019055815f52600260205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a416808303610fd157505050565b7f64283d7b000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b611039825f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b855f52600360205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154019055610f58565b91929050806110e7575b1561108757828291610f3b565b82846110b8577f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f177e802f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b503384148015611122575b8061107a5750825f5260046020523373ffffffffffffffffffffffffffffffffffffffff60405f2054161461107a565b50835f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f2054166110f2565b805f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f205416908115611186575090565b7f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b93909293823b6111c3575b5050505050565b61123073ffffffffffffffffffffffffffffffffffffffff928360209516968460405197889687967f150b7a020000000000000000000000000000000000000000000000000000000088521660048701521660248501526044840152608060648401526084830190610c7d565b03815f865af15f9181611300575b506112ac57503d156112a5573d61125481610eb4565b906112626040519283610d5a565b81523d5f602083013e5b805190816112a057827f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b602001fd5b606061126c565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a02000000000000000000000000000000000000000000000000000000009116036106a857505f808080806111bc565b9091506020813d602011611355575b8161131c60209383610d5a565b8101031261013e57517fffffffff000000000000000000000000000000000000000000000000000000008116810361013e57905f61123e565b3d915061130f56fea164736f6c634300081a000a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000016536d6172742057616c6c6574732044656d6f204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000035357440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e68747470733a2f2f7374617469632e616c6368656d796170692e696f2f6173736574732f6163636f756e746b69742f736d61727477616c6c65742e706e670000", - "nonce": "0x1", - "chainId": "0x66eee" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x23c376", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0xdc345ebade8067d8311fe9ec0ef2c1c049e3e724c0524da4c334c6fff7ffec3c", - "transactionIndex": "0x7", - "blockHash": "0xc7010edd7c9e017b395738dbb8084b0f6e00c59bb8c4d1db4b8fdf25a20bb28a", - "blockNumber": "0x8fd738e", - "gasUsed": "0x194ad2", - "effectiveGasPrice": "0x5f5e100", - "from": "0x3be7c46807b4c749a381c9590a02ce788ea22e53", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "gasUsedForL1": "0x62383", - "l1BlockNumber": "0x7e6385", - "timeboosted": false - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1746715855, - "chain": 421614, - "commit": "b8313411" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/84532/run-1746715891.json b/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/84532/run-1746715891.json deleted file mode 100644 index a2063b7cef..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/84532/run-1746715891.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "transactions": [ - { - "hash": "0xc7dc9f02d724ce3812e8cb4697b8fa42a2af3726068f07db3e6c685741eadac8", - "transactionType": "CREATE2", - "contractName": "NFT", - "contractAddress": "0xaef18c0fd8190fb780922f7d1cfed48dfab0a88c", - "function": null, - "arguments": [ - "Smart Wallets Demo NFT", - "SWD", - "https://static.alchemyapi.io/assets/accountkit/smartwallet.png" - ], - "transaction": { - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x1a74b0", - "value": "0x0", - "input": "0x00000000000000000000000000000000000000000000000000000000000000006080604052346104685761184d803803806100198161046c565b92833981016060828203126104685781516001600160401b0381116104685781610044918401610491565b60208301519092906001600160401b0381116104685782610066918301610491565b60408201519092906001600160401b038111610468576100869201610491565b82516001600160401b0381116102a3575f54600181811c9116801561045e575b602082101461028557601f81116103fc575b506020601f821160011461039b57819293945f92610390575b50508160011b915f199060031b1c1916175f555b81516001600160401b0381116102a357600154600181811c91168015610386575b602082101461028557601f8111610323575b50602092601f82116001146102c257928192935f926102b7575b50508160011b915f199060031b1c1916176001555b80516001600160401b0381116102a357600654600181811c91168015610299575b602082101461028557601f8111610222575b50602091601f82116001146101c2579181925f926101b7575b50508160011b915f199060031b1c1916176006555b60405161136a90816104e38239f35b015190505f80610193565b601f1982169260065f52805f20915f5b85811061020a575083600195106101f2575b505050811b016006556101a8565b01515f1960f88460031b161c191690555f80806101e4565b919260206001819286850151815501940192016101d2565b60065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f601f830160051c8101916020841061027b575b601f0160051c01905b818110610270575061017a565b5f8155600101610263565b909150819061025a565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610168565b634e487b7160e01b5f52604160045260245ffd5b015190505f80610132565b601f1982169360015f52805f20915f5b86811061030b57508360019596106102f3575b505050811b01600155610147565b01515f1960f88460031b161c191690555f80806102e5565b919260206001819286850151815501940192016102d2565b60015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f830160051c8101916020841061037c575b601f0160051c01905b8181106103715750610118565b5f8155600101610364565b909150819061035b565b90607f1690610106565b015190505f806100d1565b601f198216905f8052805f20915f5b8181106103e4575095836001959697106103cc575b505050811b015f556100e5565b01515f1960f88460031b161c191690555f80806103bf565b9192602060018192868b0151815501940192016103aa565b5f80527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563601f830160051c81019160208410610454575b601f0160051c01905b81811061044957506100b8565b5f815560010161043c565b9091508190610433565b90607f16906100a6565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102a357604052565b81601f82011215610468578051906001600160401b0382116102a3576104c0601f8301601f191660200161046c565b928284526020838301011161046857815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c9081629a9b7b14610c635750806301ffc9a714610b9157806306fdde0314610ad9578063081812fc14610a8f578063095ea7b31461093157806323b872dd1461091a57806342842e0e146108eb5780636352211e146108af5780636c0360eb1461089457806370a082311461081d578063755edd171461046457806395d89b4114610339578063a22cb4651461025a578063b88d4fde146101c4578063c87b56dd146101425763e985e9c5146100cb575f80fd5b3461013e57604060031936011261013e576100e4610cc0565b73ffffffffffffffffffffffffffffffffffffffff610101610ce3565b91165f52600560205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b5f80fd5b3461013e57602060031936011261013e5773ffffffffffffffffffffffffffffffffffffffff610173600435611158565b161561019c57610198610184610dc8565b604051918291602083526020830190610c7d565b0390f35b7fd872946b000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461013e57608060031936011261013e576101dd610cc0565b6101e5610ce3565b906044356064359267ffffffffffffffff841161013e573660238501121561013e5783600401359261021684610eb4565b936102246040519586610d5a565b808552366024828801011161013e576020815f92602461025899018389013786010152610252838383610eee565b336111b1565b005b3461013e57604060031936011261013e57610273610cc0565b6024359081151580920361013e5773ffffffffffffffffffffffffffffffffffffffff1690811561030d57335f52600560205260405f20825f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b507f5b08ba18000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b3461013e575f60031936011261013e576040515f6001548060011c9060018116801561045a575b60208310811461042d578285529081156103eb575060011461038d575b6101988361018481850382610d5a565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b8082106103d15750909150810160200161018461037d565b9192600181602092548385880101520191019092916103b9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b84019091019150610184905061037d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610360565b602060031936011261013e57610478610cc0565b6007547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f057600101806007556020906040516104b98382610d5a565b5f815273ffffffffffffffffffffffffffffffffffffffff84169384156107c457825f526002845273ffffffffffffffffffffffffffffffffffffffff60405f2054168015159081610757575b865f526003865260405f2060018154019055845f526002865260405f20877fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790558487827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a45061072b573b610586575b50604051908152f35b826105d891604051809381927f150b7a020000000000000000000000000000000000000000000000000000000083523360048401525f6024840152866044840152608060648401526084830190610c7d565b03815f885af15f91816106d3575b506106525750503d1561064b573d6105fd81610eb4565b9061060b6040519283610d5a565b81523d5f8383013e5b8051918261064857837f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b01fd5b6060610614565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a0200000000000000000000000000000000000000000000000000000000919492939416036106a8575081908361057d565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091508381813d8311610724575b6106eb8183610d5a565b8101031261013e57517fffffffff000000000000000000000000000000000000000000000000000000008116810361013e5790856105e6565b503d6106e1565b7f73c6ac6e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b61078e855f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b805f526003865260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154019055610506565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b3461013e57602060031936011261013e5773ffffffffffffffffffffffffffffffffffffffff61084b610cc0565b168015610868575f526003602052602060405f2054604051908152f35b7f89c62b64000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b3461013e575f60031936011261013e57610198610184610dc8565b3461013e57602060031936011261013e5760206108cd600435611158565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b3461013e576102586108fc36610d06565b906040519261090c602085610d5a565b5f8452610252838383610eee565b3461013e5761025861092b36610d06565b91610eee565b3461013e57604060031936011261013e5761094a610cc0565b60243561095681611158565b33151580610a6f575b80610a22575b6109f657819073ffffffffffffffffffffffffffffffffffffffff80851691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f52600460205273ffffffffffffffffffffffffffffffffffffffff60405f2091167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555f80f35b7fa9fbf51f000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff81165f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615610965565b503373ffffffffffffffffffffffffffffffffffffffff8216141561095f565b3461013e57602060031936011261013e57600435610aac81611158565b505f526004602052602073ffffffffffffffffffffffffffffffffffffffff60405f205416604051908152f35b3461013e575f60031936011261013e576040515f80548060011c90600181168015610b87575b60208310811461042d578285529081156103eb5750600114610b2b576101988361018481850382610d5a565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210610b6d5750909150810160200161018461037d565b919260018160209254838588010152019101909291610b55565b91607f1691610aff565b3461013e57602060031936011261013e576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361013e57807f80ac58cd0000000000000000000000000000000000000000000000000000000060209214908115610c39575b8115610c0f575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501482610c04565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610bfd565b3461013e575f60031936011261013e576020906007548152f35b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b600319606091011261013e5760043573ffffffffffffffffffffffffffffffffffffffff8116810361013e579060243573ffffffffffffffffffffffffffffffffffffffff8116810361013e579060443590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610d9b57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051905f6006548060011c9160018216918215610eaa575b60208410831461042d578386528592908115610e6d5750600114610e0e575b610e0c92500383610d5a565b565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310610e51575050906020610e0c92820101610e00565b6020919350806001915483858901015201910190918492610e39565b60209250610e0c9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101610e00565b92607f1692610de1565b67ffffffffffffffff8111610d9b57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919073ffffffffffffffffffffffffffffffffffffffff1680156107c457815f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f20541692823315159283611070575b73ffffffffffffffffffffffffffffffffffffffff935085611002575b805f52600360205260405f2060018154019055815f52600260205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a416808303610fd157505050565b7f64283d7b000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b611039825f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b855f52600360205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154019055610f58565b91929050806110e7575b1561108757828291610f3b565b82846110b8577f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f177e802f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b503384148015611122575b8061107a5750825f5260046020523373ffffffffffffffffffffffffffffffffffffffff60405f2054161461107a565b50835f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f2054166110f2565b805f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f205416908115611186575090565b7f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b93909293823b6111c3575b5050505050565b61123073ffffffffffffffffffffffffffffffffffffffff928360209516968460405197889687967f150b7a020000000000000000000000000000000000000000000000000000000088521660048701521660248501526044840152608060648401526084830190610c7d565b03815f865af15f9181611300575b506112ac57503d156112a5573d61125481610eb4565b906112626040519283610d5a565b81523d5f602083013e5b805190816112a057827f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b602001fd5b606061126c565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a02000000000000000000000000000000000000000000000000000000009116036106a857505f808080806111bc565b9091506020813d602011611355575b8161131c60209383610d5a565b8101031261013e57517fffffffff000000000000000000000000000000000000000000000000000000008116810361013e57905f61123e565b3d915061130f56fea164736f6c634300081a000a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000016536d6172742057616c6c6574732044656d6f204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000035357440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e68747470733a2f2f7374617469632e616c6368656d796170692e696f2f6173736574732f6163636f756e746b69742f736d61727477616c6c65742e706e670000", - "nonce": "0x2", - "chainId": "0x14a34" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x10df132", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0xc7dc9f02d724ce3812e8cb4697b8fa42a2af3726068f07db3e6c685741eadac8", - "transactionIndex": "0x12", - "blockHash": "0xff35063c6bf3e007621d523611040b6903cc92cf2ab7344cb852f4e7dc1ac1a2", - "blockNumber": "0x184b309", - "gasUsed": "0x13274f", - "effectiveGasPrice": "0xf7b9b", - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "l1BaseFeeScalar": "0x44d", - "l1BlobBaseFee": "0x1", - "l1BlobBaseFeeScalar": "0xa118b", - "l1Fee": "0x2f4dd934c30", - "l1GasPrice": "0xe404b0bfa", - "l1GasUsed": "0xbc6d" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1746715891, - "chain": 84532, - "commit": "b8313411" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/911867/run-1736807829.json b/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/911867/run-1736807829.json deleted file mode 100644 index d735559b99..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeployNFT.s.sol/911867/run-1736807829.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x02ae4a484c89989ca992c8024646256c2e37a21bb1d9aab9235fd9a4ae0b92d6", - "transactionType": "CREATE2", - "contractName": "NFT", - "contractAddress": "0x7e06a337929b1cb92363e15414e37959a36e5338", - "function": null, - "arguments": [ - "Smart Wallets Demo NFT", - "AKD", - "https://static.alchemyapi.io/assets/accountkit/accountkit.jpg" - ], - "transaction": { - "from": "0xddf32240b4ca3184de7ec8f0d5aba27dec8b7a5c", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x15dc14", - "value": "0x0", - "input": "0x0000000000000000000000000000000000000000000000000000000000000000608060405234801561000f575f80fd5b5060405161124b38038061124b83398101604081905261002e916100ff565b82825f61003b8382610212565b5060016100488282610212565b506006915061005990508282610212565b505050506102cc565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112610085575f80fd5b81516001600160401b0381111561009e5761009e610062565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100cc576100cc610062565b6040528181528382016020018510156100e3575f80fd5b8160208501602083015e5f918101602001919091529392505050565b5f805f60608486031215610111575f80fd5b83516001600160401b03811115610126575f80fd5b61013286828701610076565b602086015190945090506001600160401b0381111561014f575f80fd5b61015b86828701610076565b604086015190935090506001600160401b03811115610178575f80fd5b61018486828701610076565b9150509250925092565b600181811c908216806101a257607f821691505b6020821081036101c057634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561020d57805f5260205f20601f840160051c810160208510156101eb5750805b601f840160051c820191505b8181101561020a575f81556001016101f7565b50505b505050565b81516001600160401b0381111561022b5761022b610062565b61023f81610239845461018e565b846101c6565b6020601f821160018114610271575f831561025a5750848201515b5f19600385901b1c1916600184901b17845561020a565b5f84815260208120601f198516915b828110156102a05787850151825560209485019460019092019101610280565b50848210156102bd57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b610f72806102d95f395ff3fe6080604052600436106100ee575f3560e01c80636c0360eb11610087578063a22cb46511610057578063a22cb46514610279578063b88d4fde14610298578063c87b56dd146102b7578063e985e9c5146102d6575f80fd5b80636c0360eb1461021f57806370a0823114610233578063755edd171461025257806395d89b4114610265575f80fd5b8063095ea7b3116100c2578063095ea7b3146101a157806323b872dd146101c257806342842e0e146101e15780636352211e14610200575f80fd5b80629a9b7b146100f257806301ffc9a71461011a57806306fdde0314610149578063081812fc1461016a575b5f80fd5b3480156100fd575f80fd5b5061010760075481565b6040519081526020015b60405180910390f35b348015610125575f80fd5b50610139610134366004610c48565b6102f5565b6040519015158152602001610111565b348015610154575f80fd5b5061015d610346565b6040516101119190610c98565b348015610175575f80fd5b50610189610184366004610caa565b6103d5565b6040516001600160a01b039091168152602001610111565b3480156101ac575f80fd5b506101c06101bb366004610cdc565b6103fc565b005b3480156101cd575f80fd5b506101c06101dc366004610d04565b61040b565b3480156101ec575f80fd5b506101c06101fb366004610d04565b610499565b34801561020b575f80fd5b5061018961021a366004610caa565b6104b8565b34801561022a575f80fd5b5061015d6104c2565b34801561023e575f80fd5b5061010761024d366004610d3e565b61054e565b610107610260366004610d3e565b610593565b348015610270575f80fd5b5061015d6105b4565b348015610284575f80fd5b506101c0610293366004610d57565b6105c3565b3480156102a3575f80fd5b506101c06102b2366004610da4565b6105ce565b3480156102c2575f80fd5b5061015d6102d1366004610caa565b6105e6565b3480156102e1575f80fd5b506101396102f0366004610e81565b6106a9565b5f6001600160e01b031982166380ac58cd60e01b148061032557506001600160e01b03198216635b5e139f60e01b145b8061034057506301ffc9a760e01b6001600160e01b03198316145b92915050565b60605f805461035490610eb2565b80601f016020809104026020016040519081016040528092919081815260200182805461038090610eb2565b80156103cb5780601f106103a2576101008083540402835291602001916103cb565b820191905f5260205f20905b8154815290600101906020018083116103ae57829003601f168201915b5050505050905090565b5f6103df826106d6565b505f828152600460205260409020546001600160a01b0316610340565b61040782823361070e565b5050565b6001600160a01b03821661043957604051633250574960e11b81525f60048201526024015b60405180910390fd5b5f61044583833361071b565b9050836001600160a01b0316816001600160a01b031614610493576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401610430565b50505050565b6104b383838360405180602001604052805f8152506105ce565b505050565b5f610340826106d6565b600680546104cf90610eb2565b80601f01602080910402602001604051908101604052809291908181526020018280546104fb90610eb2565b80156105465780601f1061051d57610100808354040283529160200191610546565b820191905f5260205f20905b81548152906001019060200180831161052957829003601f168201915b505050505081565b5f6001600160a01b038216610578576040516322718ad960e21b81525f6004820152602401610430565b506001600160a01b03165f9081526003602052604090205490565b5f8060075f81546105a390610eea565b91829055509050610340838261080d565b60606001805461035490610eb2565b610407338383610826565b6105d984848461040b565b61049333858585856108c4565b60605f6105f2836104b8565b6001600160a01b0316036106195760405163d872946b60e01b815260040160405180910390fd5b6006805461062690610eb2565b80601f016020809104026020016040519081016040528092919081815260200182805461065290610eb2565b801561069d5780601f106106745761010080835404028352916020019161069d565b820191905f5260205f20905b81548152906001019060200180831161068057829003601f168201915b50505050509050919050565b6001600160a01b039182165f90815260056020908152604080832093909416825291909152205460ff1690565b5f818152600260205260408120546001600160a01b03168061034057604051637e27328960e01b815260048101849052602401610430565b6104b383838360016109ec565b5f828152600260205260408120546001600160a01b039081169083161561074757610747818486610af0565b6001600160a01b03811615610781576107625f855f806109ec565b6001600160a01b0381165f90815260036020526040902080545f190190555b6001600160a01b038516156107af576001600160a01b0385165f908152600360205260409020805460010190555b5f8481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b610407828260405180602001604052805f815250610b54565b6001600160a01b03821661085857604051630b61174360e31b81526001600160a01b0383166004820152602401610430565b6001600160a01b038381165f81815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b156109e557604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290610906908890889087908790600401610f0e565b6020604051808303815f875af1925050508015610940575060408051601f3d908101601f1916820190925261093d91810190610f4a565b60015b6109a7573d80801561096d576040519150601f19603f3d011682016040523d82523d5f602084013e610972565b606091505b5080515f0361099f57604051633250574960e11b81526001600160a01b0385166004820152602401610430565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146109e357604051633250574960e11b81526001600160a01b0385166004820152602401610430565b505b5050505050565b8080610a0057506001600160a01b03821615155b15610ac1575f610a0f846106d6565b90506001600160a01b03831615801590610a3b5750826001600160a01b0316816001600160a01b031614155b8015610a4e5750610a4c81846106a9565b155b15610a775760405163a9fbf51f60e01b81526001600160a01b0384166004820152602401610430565b8115610abf5783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b50505f90815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b610afb838383610b6b565b6104b3576001600160a01b038316610b2957604051637e27328960e01b815260048101829052602401610430565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401610430565b610b5e8383610bcf565b6104b3335f8585856108c4565b5f6001600160a01b03831615801590610bc75750826001600160a01b0316846001600160a01b03161480610ba45750610ba484846106a9565b80610bc757505f828152600460205260409020546001600160a01b038481169116145b949350505050565b6001600160a01b038216610bf857604051633250574960e11b81525f6004820152602401610430565b5f610c0483835f61071b565b90506001600160a01b038116156104b3576040516339e3563760e11b81525f6004820152602401610430565b6001600160e01b031981168114610c45575f80fd5b50565b5f60208284031215610c58575f80fd5b8135610c6381610c30565b9392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610c636020830184610c6a565b5f60208284031215610cba575f80fd5b5035919050565b80356001600160a01b0381168114610cd7575f80fd5b919050565b5f8060408385031215610ced575f80fd5b610cf683610cc1565b946020939093013593505050565b5f805f60608486031215610d16575f80fd5b610d1f84610cc1565b9250610d2d60208501610cc1565b929592945050506040919091013590565b5f60208284031215610d4e575f80fd5b610c6382610cc1565b5f8060408385031215610d68575f80fd5b610d7183610cc1565b915060208301358015158114610d85575f80fd5b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f805f8060808587031215610db7575f80fd5b610dc085610cc1565b9350610dce60208601610cc1565b925060408501359150606085013567ffffffffffffffff811115610df0575f80fd5b8501601f81018713610e00575f80fd5b803567ffffffffffffffff811115610e1a57610e1a610d90565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610e4957610e49610d90565b604052818152828201602001891015610e60575f80fd5b816020840160208301375f6020838301015280935050505092959194509250565b5f8060408385031215610e92575f80fd5b610e9b83610cc1565b9150610ea960208401610cc1565b90509250929050565b600181811c90821680610ec657607f821691505b602082108103610ee457634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60018201610f0757634e487b7160e01b5f52601160045260245ffd5b5060010190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90610f4090830184610c6a565b9695505050505050565b5f60208284031215610f5a575f80fd5b8151610c6381610c3056fea164736f6c634300081a000a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000144163636f756e74204b69742044656d6f204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000003414b440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003d68747470733a2f2f7374617469632e616c6368656d796170692e696f2f6173736574732f6163636f756e746b69742f6163636f756e746b69742e6a7067000000", - "nonce": "0x24", - "chainId": "0xde9fb" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x107eb8", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x02ae4a484c89989ca992c8024646256c2e37a21bb1d9aab9235fd9a4ae0b92d6", - "transactionIndex": "0x1", - "blockHash": "0x9e4144012ac3be4cda0949deacd9f4e7ec834e7aa7f1b6353e72ae36054aeff4", - "blockNumber": "0x7d5534", - "gasUsed": "0xfd376", - "effectiveGasPrice": "0xfd", - "from": "0xddf32240b4ca3184de7ec8f0d5aba27dec8b7a5c", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": "0x7e06a337929b1cb92363e15414e37959a36e5338", - "l1BaseFeeScalar": "0xa6fe0", - "l1BlobBaseFee": "0x337", - "l1BlobBaseFeeScalar": "0x0", - "l1Fee": "0x27ae655b4d4", - "l1GasPrice": "0x5366709", - "l1GasUsed": "0xb213" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1736807829, - "chain": 911867, - "commit": "42e6bae6" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeployNFTUSDCMintable.s.sol/421614/run-1747861796.json b/examples/ui-demo/contracts/broadcast/DeployNFTUSDCMintable.s.sol/421614/run-1747861796.json deleted file mode 100644 index e33e6806a4..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeployNFTUSDCMintable.s.sol/421614/run-1747861796.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "transactions": [ - { - "hash": "0xcf624bc6b32e6378481177f106b8aab6397d25e7a51b734595aceee0d07b6b50", - "transactionType": "CREATE2", - "contractName": "NFTUSDCMintable", - "contractAddress": "0x6413f6ac87222f68df9a2f74fe4c00a1d87d780f", - "function": null, - "arguments": [ - "Smart Wallets Demo NFT USDC Mintable", - "SWDNFT", - "https://static.alchemyapi.io/assets/accountkit/capy-beanie.png", - "0xE9a174444d5fb88c563fDa0EFc3aD905a72B7C59" - ], - "transaction": { - "from": "0x3be7c46807b4c749a381c9590a02ce788ea22e53", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x1c996e", - "value": "0x0", - "input": "0x00000000000000000000000000000000000000000000000000000000000000006080604052346104a2576119d380380380610019816104a6565b92833981016080828203126104a25781516001600160401b0381116104a257816100449184016104cb565b60208301519092906001600160401b0381116104a257826100669183016104cb565b60408201519092906001600160401b0381116104a25760609161008a9184016104cb565b9101516001600160a01b038116908190036104a25783516001600160401b0381116102db575f54600181811c91168015610498575b60208210146102bd57601f8111610436575b50602094601f82116001146103d5579481929394955f926103ca575b50508160011b915f199060031b1c1916175f555b82516001600160401b0381116102db57600154600181811c911680156103c0575b60208210146102bd57601f811161035d575b506020601f82116001146102fa57819293945f926102ef575b50508160011b915f199060031b1c1916176001555b620f424060095581516001600160401b0381116102db57600654600181811c911680156102d1575b60208210146102bd57601f811161025a575b50602092601f82116001146101f957928192935f926101ee575b50508160011b915f199060031b1c1916176006555b600880546001600160a01b0319169190911790556040516114b6908161051d8239f35b015190505f806101b6565b601f1982169360065f52805f20915f5b868110610242575083600195961061022a575b505050811b016006556101cb565b01515f1960f88460031b161c191690555f808061021c565b91926020600181928685015181550194019201610209565b60065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f601f830160051c810191602084106102b3575b601f0160051c01905b8181106102a8575061019c565b5f815560010161029b565b9091508190610292565b634e487b7160e01b5f52602260045260245ffd5b90607f169061018a565b634e487b7160e01b5f52604160045260245ffd5b015190505f8061014d565b601f1982169060015f52805f20915f5b8181106103455750958360019596971061032d575b505050811b01600155610162565b01515f1960f88460031b161c191690555f808061031f565b9192602060018192868b01518155019401920161030a565b60015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f830160051c810191602084106103b6575b601f0160051c01905b8181106103ab5750610134565b5f815560010161039e565b9091508190610395565b90607f1690610122565b015190505f806100ed565b601f198216955f8052805f20915f5b88811061041e57508360019596979810610406575b505050811b015f55610101565b01515f1960f88460031b161c191690555f80806103f9565b919260206001819286850151815501940192016103e4565b5f80527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563601f830160051c8101916020841061048e575b601f0160051c01905b81811061048357506100d1565b5f8155600101610476565b909150819061046d565b90607f16906100bf565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102db57604052565b81601f820112156104a2578051906001600160401b0382116102db576104fa601f8301601f19166020016104a6565b92828452602083830101116104a257815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c9081629a9b7b14610daf5750806301ffc9a714610cdd57806306fdde0314610c25578063081812fc14610bdb578063095ea7b314610a7d57806311eac85514610a4a57806323b872dd14610a3357806342842e0e14610a045780636352211e146109c85780636817c76c146109ab5780636c0360eb1461099057806370a0823114610919578063755edd171461047a57806395d89b411461034f578063a22cb46514610270578063b88d4fde146101da578063c87b56dd146101585763e985e9c5146100e1575f80fd5b34610154576040600319360112610154576100fa610e0c565b73ffffffffffffffffffffffffffffffffffffffff610117610e2f565b91165f52600560205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b5f80fd5b346101545760206003193601126101545773ffffffffffffffffffffffffffffffffffffffff6101896004356112a4565b16156101b2576101ae61019a610f14565b604051918291602083526020830190610dc9565b0390f35b7fd872946b000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610154576080600319360112610154576101f3610e0c565b6101fb610e2f565b906044356064359267ffffffffffffffff841161015457366023850112156101545783600401359261022c84611000565b9361023a6040519586610ea6565b8085523660248288010111610154576020815f92602461026e9901838901378601015261026883838361103a565b336112fd565b005b3461015457604060031936011261015457610289610e0c565b602435908115158092036101545773ffffffffffffffffffffffffffffffffffffffff1690811561032357335f52600560205260405f20825f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b507f5b08ba18000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b34610154575f600319360112610154576040515f6001548060011c90600181168015610470575b6020831081146104435782855290811561040157506001146103a3575b6101ae8361019a81850382610ea6565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b8082106103e75750909150810160200161019a610393565b9192600181602092548385880101520191019092916103cf565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b8401909101915061019a9050610393565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610376565b3461015457602060031936011261015457610493610e0c565b5f602073ffffffffffffffffffffffffffffffffffffffff60085416606460095460405194859384927f23b872dd00000000000000000000000000000000000000000000000000000000845233600485015230602485015260448401525af190811561090e575f916108d3575b50156108ab576007547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461087e57600101806007556020906040516105478382610ea6565b5f815273ffffffffffffffffffffffffffffffffffffffff841693841561085257825f526002845273ffffffffffffffffffffffffffffffffffffffff60405f20541680151590816107e5575b865f526003865260405f2060018154019055845f526002865260405f20877fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790558487827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4506107b9573b610614575b50604051908152f35b8261066691604051809381927f150b7a020000000000000000000000000000000000000000000000000000000083523360048401525f6024840152866044840152608060648401526084830190610dc9565b03815f885af15f9181610761575b506106e05750503d156106d9573d61068b81611000565b906106996040519283610ea6565b81523d5f8383013e5b805191826106d657837f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b01fd5b60606106a2565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a020000000000000000000000000000000000000000000000000000000091949293941603610736575081908361060b565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091508381813d83116107b2575b6107798183610ea6565b8101031261015457517fffffffff0000000000000000000000000000000000000000000000000000000081168103610154579085610674565b503d61076f565b7f73c6ac6e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b61081c855f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b805f526003865260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154019055610594565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fa55b2887000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506020813d602011610906575b816108ee60209383610ea6565b81010312610154575180151581036101545782610500565b3d91506108e1565b6040513d5f823e3d90fd5b346101545760206003193601126101545773ffffffffffffffffffffffffffffffffffffffff610947610e0c565b168015610964575f526003602052602060405f2054604051908152f35b7f89c62b64000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b34610154575f600319360112610154576101ae61019a610f14565b34610154575f600319360112610154576020600954604051908152f35b346101545760206003193601126101545760206109e66004356112a4565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b346101545761026e610a1536610e52565b9060405192610a25602085610ea6565b5f845261026883838361103a565b346101545761026e610a4436610e52565b9161103a565b34610154575f60031936011261015457602073ffffffffffffffffffffffffffffffffffffffff60085416604051908152f35b3461015457604060031936011261015457610a96610e0c565b602435610aa2816112a4565b33151580610bbb575b80610b6e575b610b4257819073ffffffffffffffffffffffffffffffffffffffff80851691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f52600460205273ffffffffffffffffffffffffffffffffffffffff60405f2091167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555f80f35b7fa9fbf51f000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff81165f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615610ab1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610aab565b3461015457602060031936011261015457600435610bf8816112a4565b505f526004602052602073ffffffffffffffffffffffffffffffffffffffff60405f205416604051908152f35b34610154575f600319360112610154576040515f80548060011c90600181168015610cd3575b602083108114610443578285529081156104015750600114610c77576101ae8361019a81850382610ea6565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210610cb95750909150810160200161019a610393565b919260018160209254838588010152019101909291610ca1565b91607f1691610c4b565b34610154576020600319360112610154576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361015457807f80ac58cd0000000000000000000000000000000000000000000000000000000060209214908115610d85575b8115610d5b575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501482610d50565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610d49565b34610154575f600319360112610154576020906007548152f35b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361015457565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361015457565b60031960609101126101545760043573ffffffffffffffffffffffffffffffffffffffff81168103610154579060243573ffffffffffffffffffffffffffffffffffffffff81168103610154579060443590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610ee757604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051905f6006548060011c9160018216918215610ff6575b602084108314610443578386528592908115610fb95750600114610f5a575b610f5892500383610ea6565b565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310610f9d575050906020610f5892820101610f4c565b6020919350806001915483858901015201910190918492610f85565b60209250610f589491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101610f4c565b92607f1692610f2d565b67ffffffffffffffff8111610ee757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919073ffffffffffffffffffffffffffffffffffffffff16801561085257815f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f205416928233151592836111bc575b73ffffffffffffffffffffffffffffffffffffffff93508561114e575b805f52600360205260405f2060018154019055815f52600260205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a41680830361111d57505050565b7f64283d7b000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b611185825f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b855f52600360205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81540190556110a4565b9192905080611233575b156111d357828291611087565b8284611204577f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f177e802f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b50338414801561126e575b806111c65750825f5260046020523373ffffffffffffffffffffffffffffffffffffffff60405f205416146111c6565b50835f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541661123e565b805f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f2054169081156112d2575090565b7f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b93909293823b61130f575b5050505050565b61137c73ffffffffffffffffffffffffffffffffffffffff928360209516968460405197889687967f150b7a020000000000000000000000000000000000000000000000000000000088521660048701521660248501526044840152608060648401526084830190610dc9565b03815f865af15f918161144c575b506113f857503d156113f1573d6113a081611000565b906113ae6040519283610ea6565b81523d5f602083013e5b805190816113ec57827f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b602001fd5b60606113b8565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a020000000000000000000000000000000000000000000000000000000091160361073657505f80808080611308565b9091506020813d6020116114a1575b8161146860209383610ea6565b8101031261015457517fffffffff000000000000000000000000000000000000000000000000000000008116810361015457905f61138a565b3d915061145b56fea164736f6c634300081a000a000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000e9a174444d5fb88c563fda0efc3ad905a72b7c590000000000000000000000000000000000000000000000000000000000000024536d6172742057616c6c6574732044656d6f204e46542055534443204d696e7461626c650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065357444e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e68747470733a2f2f7374617469632e616c6368656d796170692e696f2f6173736574732f6163636f756e746b69742f636170792d6265616e69652e706e670000", - "nonce": "0x7", - "chainId": "0x66eee" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x159ee4", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0xcf624bc6b32e6378481177f106b8aab6397d25e7a51b734595aceee0d07b6b50", - "transactionIndex": "0x1", - "blockHash": "0xa69d77f51d0f862ddba34d822f7d7264d923416796d0d5a679abd6d4db2aadff", - "blockNumber": "0x942fa85", - "gasUsed": "0x159ee4", - "effectiveGasPrice": "0x5f5e100", - "from": "0x3be7c46807b4c749a381c9590a02ce788ea22e53", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "gasUsedForL1": "0x0", - "l1BlockNumber": "0x7fd4ba", - "timeboosted": false - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1747861796, - "chain": 421614, - "commit": "c5838d89" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeployNFTUSDCMintable.s.sol/84532/run-1747861828.json b/examples/ui-demo/contracts/broadcast/DeployNFTUSDCMintable.s.sol/84532/run-1747861828.json deleted file mode 100644 index 771362b999..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeployNFTUSDCMintable.s.sol/84532/run-1747861828.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x2a34194bc69a901a72a3092da80d2d692e9c37ea1a63f4aad3463f7bbf3c7651", - "transactionType": "CREATE2", - "contractName": "NFTUSDCMintable", - "contractAddress": "0x6413f6ac87222f68df9a2f74fe4c00a1d87d780f", - "function": null, - "arguments": [ - "Smart Wallets Demo NFT USDC Mintable", - "SWDNFT", - "https://static.alchemyapi.io/assets/accountkit/capy-beanie.png", - "0xE9a174444d5fb88c563fDa0EFc3aD905a72B7C59" - ], - "transaction": { - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x1ddd11", - "value": "0x0", - "input": "0x00000000000000000000000000000000000000000000000000000000000000006080604052346104a2576119d380380380610019816104a6565b92833981016080828203126104a25781516001600160401b0381116104a257816100449184016104cb565b60208301519092906001600160401b0381116104a257826100669183016104cb565b60408201519092906001600160401b0381116104a25760609161008a9184016104cb565b9101516001600160a01b038116908190036104a25783516001600160401b0381116102db575f54600181811c91168015610498575b60208210146102bd57601f8111610436575b50602094601f82116001146103d5579481929394955f926103ca575b50508160011b915f199060031b1c1916175f555b82516001600160401b0381116102db57600154600181811c911680156103c0575b60208210146102bd57601f811161035d575b506020601f82116001146102fa57819293945f926102ef575b50508160011b915f199060031b1c1916176001555b620f424060095581516001600160401b0381116102db57600654600181811c911680156102d1575b60208210146102bd57601f811161025a575b50602092601f82116001146101f957928192935f926101ee575b50508160011b915f199060031b1c1916176006555b600880546001600160a01b0319169190911790556040516114b6908161051d8239f35b015190505f806101b6565b601f1982169360065f52805f20915f5b868110610242575083600195961061022a575b505050811b016006556101cb565b01515f1960f88460031b161c191690555f808061021c565b91926020600181928685015181550194019201610209565b60065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f601f830160051c810191602084106102b3575b601f0160051c01905b8181106102a8575061019c565b5f815560010161029b565b9091508190610292565b634e487b7160e01b5f52602260045260245ffd5b90607f169061018a565b634e487b7160e01b5f52604160045260245ffd5b015190505f8061014d565b601f1982169060015f52805f20915f5b8181106103455750958360019596971061032d575b505050811b01600155610162565b01515f1960f88460031b161c191690555f808061031f565b9192602060018192868b01518155019401920161030a565b60015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f830160051c810191602084106103b6575b601f0160051c01905b8181106103ab5750610134565b5f815560010161039e565b9091508190610395565b90607f1690610122565b015190505f806100ed565b601f198216955f8052805f20915f5b88811061041e57508360019596979810610406575b505050811b015f55610101565b01515f1960f88460031b161c191690555f80806103f9565b919260206001819286850151815501940192016103e4565b5f80527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563601f830160051c8101916020841061048e575b601f0160051c01905b81811061048357506100d1565b5f8155600101610476565b909150819061046d565b90607f16906100bf565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102db57604052565b81601f820112156104a2578051906001600160401b0382116102db576104fa601f8301601f19166020016104a6565b92828452602083830101116104a257815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c9081629a9b7b14610daf5750806301ffc9a714610cdd57806306fdde0314610c25578063081812fc14610bdb578063095ea7b314610a7d57806311eac85514610a4a57806323b872dd14610a3357806342842e0e14610a045780636352211e146109c85780636817c76c146109ab5780636c0360eb1461099057806370a0823114610919578063755edd171461047a57806395d89b411461034f578063a22cb46514610270578063b88d4fde146101da578063c87b56dd146101585763e985e9c5146100e1575f80fd5b34610154576040600319360112610154576100fa610e0c565b73ffffffffffffffffffffffffffffffffffffffff610117610e2f565b91165f52600560205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b5f80fd5b346101545760206003193601126101545773ffffffffffffffffffffffffffffffffffffffff6101896004356112a4565b16156101b2576101ae61019a610f14565b604051918291602083526020830190610dc9565b0390f35b7fd872946b000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610154576080600319360112610154576101f3610e0c565b6101fb610e2f565b906044356064359267ffffffffffffffff841161015457366023850112156101545783600401359261022c84611000565b9361023a6040519586610ea6565b8085523660248288010111610154576020815f92602461026e9901838901378601015261026883838361103a565b336112fd565b005b3461015457604060031936011261015457610289610e0c565b602435908115158092036101545773ffffffffffffffffffffffffffffffffffffffff1690811561032357335f52600560205260405f20825f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b507f5b08ba18000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b34610154575f600319360112610154576040515f6001548060011c90600181168015610470575b6020831081146104435782855290811561040157506001146103a3575b6101ae8361019a81850382610ea6565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b8082106103e75750909150810160200161019a610393565b9192600181602092548385880101520191019092916103cf565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b8401909101915061019a9050610393565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610376565b3461015457602060031936011261015457610493610e0c565b5f602073ffffffffffffffffffffffffffffffffffffffff60085416606460095460405194859384927f23b872dd00000000000000000000000000000000000000000000000000000000845233600485015230602485015260448401525af190811561090e575f916108d3575b50156108ab576007547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461087e57600101806007556020906040516105478382610ea6565b5f815273ffffffffffffffffffffffffffffffffffffffff841693841561085257825f526002845273ffffffffffffffffffffffffffffffffffffffff60405f20541680151590816107e5575b865f526003865260405f2060018154019055845f526002865260405f20877fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790558487827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4506107b9573b610614575b50604051908152f35b8261066691604051809381927f150b7a020000000000000000000000000000000000000000000000000000000083523360048401525f6024840152866044840152608060648401526084830190610dc9565b03815f885af15f9181610761575b506106e05750503d156106d9573d61068b81611000565b906106996040519283610ea6565b81523d5f8383013e5b805191826106d657837f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b01fd5b60606106a2565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a020000000000000000000000000000000000000000000000000000000091949293941603610736575081908361060b565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b9091508381813d83116107b2575b6107798183610ea6565b8101031261015457517fffffffff0000000000000000000000000000000000000000000000000000000081168103610154579085610674565b503d61076f565b7f73c6ac6e000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b61081c855f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b805f526003865260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154019055610594565b7f64a0ae92000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fa55b2887000000000000000000000000000000000000000000000000000000005f5260045ffd5b90506020813d602011610906575b816108ee60209383610ea6565b81010312610154575180151581036101545782610500565b3d91506108e1565b6040513d5f823e3d90fd5b346101545760206003193601126101545773ffffffffffffffffffffffffffffffffffffffff610947610e0c565b168015610964575f526003602052602060405f2054604051908152f35b7f89c62b64000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b34610154575f600319360112610154576101ae61019a610f14565b34610154575f600319360112610154576020600954604051908152f35b346101545760206003193601126101545760206109e66004356112a4565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b346101545761026e610a1536610e52565b9060405192610a25602085610ea6565b5f845261026883838361103a565b346101545761026e610a4436610e52565b9161103a565b34610154575f60031936011261015457602073ffffffffffffffffffffffffffffffffffffffff60085416604051908152f35b3461015457604060031936011261015457610a96610e0c565b602435610aa2816112a4565b33151580610bbb575b80610b6e575b610b4257819073ffffffffffffffffffffffffffffffffffffffff80851691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f52600460205273ffffffffffffffffffffffffffffffffffffffff60405f2091167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555f80f35b7fa9fbf51f000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b5073ffffffffffffffffffffffffffffffffffffffff81165f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615610ab1565b503373ffffffffffffffffffffffffffffffffffffffff82161415610aab565b3461015457602060031936011261015457600435610bf8816112a4565b505f526004602052602073ffffffffffffffffffffffffffffffffffffffff60405f205416604051908152f35b34610154575f600319360112610154576040515f80548060011c90600181168015610cd3575b602083108114610443578285529081156104015750600114610c77576101ae8361019a81850382610ea6565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b808210610cb95750909150810160200161019a610393565b919260018160209254838588010152019101909291610ca1565b91607f1691610c4b565b34610154576020600319360112610154576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361015457807f80ac58cd0000000000000000000000000000000000000000000000000000000060209214908115610d85575b8115610d5b575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501482610d50565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610d49565b34610154575f600319360112610154576020906007548152f35b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361015457565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361015457565b60031960609101126101545760043573ffffffffffffffffffffffffffffffffffffffff81168103610154579060243573ffffffffffffffffffffffffffffffffffffffff81168103610154579060443590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610ee757604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051905f6006548060011c9160018216918215610ff6575b602084108314610443578386528592908115610fb95750600114610f5a575b610f5892500383610ea6565b565b5060065f90815290917ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b818310610f9d575050906020610f5892820101610f4c565b6020919350806001915483858901015201910190918492610f85565b60209250610f589491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101610f4c565b92607f1692610f2d565b67ffffffffffffffff8111610ee757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919073ffffffffffffffffffffffffffffffffffffffff16801561085257815f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f205416928233151592836111bc575b73ffffffffffffffffffffffffffffffffffffffff93508561114e575b805f52600360205260405f2060018154019055815f52600260205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a41680830361111d57505050565b7f64283d7b000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b611185825f52600460205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b855f52600360205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81540190556110a4565b9192905080611233575b156111d357828291611087565b8284611204577f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f177e802f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b50338414801561126e575b806111c65750825f5260046020523373ffffffffffffffffffffffffffffffffffffffff60405f205416146111c6565b50835f52600560205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541661123e565b805f52600260205273ffffffffffffffffffffffffffffffffffffffff60405f2054169081156112d2575090565b7f7e273289000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b93909293823b61130f575b5050505050565b61137c73ffffffffffffffffffffffffffffffffffffffff928360209516968460405197889687967f150b7a020000000000000000000000000000000000000000000000000000000088521660048701521660248501526044840152608060648401526084830190610dc9565b03815f865af15f918161144c575b506113f857503d156113f1573d6113a081611000565b906113ae6040519283610ea6565b81523d5f602083013e5b805190816113ec57827f64a0ae92000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b602001fd5b60606113b8565b7fffffffff000000000000000000000000000000000000000000000000000000007f150b7a020000000000000000000000000000000000000000000000000000000091160361073657505f80808080611308565b9091506020813d6020116114a1575b8161146860209383610ea6565b8101031261015457517fffffffff000000000000000000000000000000000000000000000000000000008116810361015457905f61138a565b3d915061145b56fea164736f6c634300081a000a000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000e9a174444d5fb88c563fda0efc3ad905a72b7c590000000000000000000000000000000000000000000000000000000000000024536d6172742057616c6c6574732044656d6f204e46542055534443204d696e7461626c650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065357444e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e68747470733a2f2f7374617469632e616c6368656d796170692e696f2f6173736574732f6163636f756e746b69742f636170792d6265616e69652e706e670000", - "nonce": "0x9", - "chainId": "0x14a34" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x505931", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x2a34194bc69a901a72a3092da80d2d692e9c37ea1a63f4aad3463f7bbf3c7651", - "transactionIndex": "0x22", - "blockHash": "0xd4b6fcbd686202f34fbc075a96cb1d477cb43536ce7c9b12416663c0eaeaa550", - "blockNumber": "0x18d7131", - "gasUsed": "0x159ee4", - "effectiveGasPrice": "0xf44b8", - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "l1BaseFeeScalar": "0x44d", - "l1BlobBaseFee": "0x1", - "l1BlobBaseFeeScalar": "0xa118b", - "l1Fee": "0x1668", - "l1GasPrice": "0x3f", - "l1GasUsed": "0xca98" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1747861828, - "chain": 84532, - "commit": "c5838d89" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/421614/run-1739916739.json b/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/421614/run-1739916739.json deleted file mode 100644 index 0d80783261..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/421614/run-1739916739.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x36e200072b8dabd8ee93a5e8ce602bcf1732b64f1cc864d35d72b6e1a278c91b", - "transactionType": "CREATE2", - "contractName": "Swap", - "contractAddress": "0xb0aec4c25e8332256a91bbaf169e3c32dfc3c33c", - "function": null, - "arguments": null, - "transaction": { - "from": "0x7f89ed1f3f0d52d303904101305471bca3cde710", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x21a364", - "value": "0x0", - "input": "0x00000000000000000000000000000000000000000000000000000000000000006080806040523461020c57610c80818101906001600160401b0382118383101761021057610882928184823960c0815f9460408152600860408201526744656d6f5553444360c01b60608201526080602082015260046080820152635553444360e01b60a08201520301905ff08015610201575f80546001600160a01b0319166001600160a01b03929092169182179055803b1561020c576040516340c10f1960e01b81523060048201526001600160a01b036024820152905f908290604490829084905af18015610201576101ec575b50604051818101939091906001600160401b038511838610176101d857839460c09284928339604081526008604082015267088cadadeae8aa8960c31b60608201526080602082015260046080820152630ae8aa8960e31b60a082015203019082f080156101cb57600180546001600160a01b0319166001600160a01b03929092169182179055803b156101c8576040516340c10f1960e01b81523060048201526001600160a01b03602482015291908290604490829084905af180156101bd576101a5575b60405161063a90816102488239f35b6101b0828092610224565b6101ba5780610196565b80fd5b6040513d84823e3d90fd5b50fd5b50604051903d90823e3d90fd5b634e487b7160e01b84526041600452602484fd5b6101f99192505f90610224565b5f905f6100d0565b6040513d5f823e3d90fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176102105760405256fe6080806040526004361015610012575f80fd5b5f905f3560e01c9081631b2ef1ca14610454575080633e413bee146104035780633fc8cef3146103b1578063ccdc7d761461022d5763eebba33314610055575f80fd5b3461022a5761006336610573565b90678ac7230489e8000082116101cc5782546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019290925283929060209083906064908290879073ffffffffffffffffffffffffffffffffffffffff165af19081156101c15760209261015d926101a6575b5073ffffffffffffffffffffffffffffffffffffffff60015416906040519485809481937fa9059cbb00000000000000000000000000000000000000000000000000000000835233600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af1801561019b5761016f575080f35b6101909060203d602011610194575b61018881836105a7565b810190610615565b5080f35b503d61017e565b6040513d84823e3d90fd5b6101bc90843d86116101945761018881836105a7565b6100e9565b6040513d85823e3d90fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d617820313020657468207377617020617420612074696d65000000000000006044820152fd5b80fd5b503461022a5761023c36610573565b9069152d02c7e14af68000008211610353576001546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019290925283929060209083906064908290879073ffffffffffffffffffffffffffffffffffffffff165af19081156101c15760209261015d92610338575b5073ffffffffffffffffffffffffffffffffffffffff845416906040519485809481937fa9059cbb00000000000000000000000000000000000000000000000000000000835233600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b61034e90843d86116101945761018881836105a7565b6102c5565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4d6178203130306b2055534443207377617020617420612074696d65000000006044820152fd5b503461022a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261022a57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461022a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261022a5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b823461056f5761046336610573565b929073ffffffffffffffffffffffffffffffffffffffff5f541690813b1561056f577f40c10f1900000000000000000000000000000000000000000000000000000000835233600484015260248301525f908290604490829084905af1801561056457610551575b50809173ffffffffffffffffffffffffffffffffffffffff60015416803b1561054d576040517f40c10f19000000000000000000000000000000000000000000000000000000008152336004820152602481019290925282908290604490829084905af1801561019b5761053c5750f35b81610546916105a7565b61022a5780f35b5050fd5b61055d91505f906105a7565b5f826104cb565b6040513d5f823e3d90fd5b5f80fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc604091011261056f576004359060243590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176105e857604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b9081602091031261056f5751801515810361056f579056fea164736f6c634300081a000a60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a", - "nonce": "0x16", - "chainId": "0x66eee" - }, - "additionalContracts": [ - { - "transactionType": "CREATE", - "address": "0xcff7c6da719408113dfcb5e36182c6d5aa491443", - "initCode": "0x60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000844656d6f5553444300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" - }, - { - "transactionType": "CREATE", - "address": "0x0766798566d1f6e2f0b126f7783aab2cbb81c66f", - "initCode": "0x60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000844656d6f5745544800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000" - } - ], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x196faa", - "logs": [ - { - "address": "0xcff7c6da719408113dfcb5e36182c6d5aa491443", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000b0aec4c25e8332256a91bbaf169e3c32dfc3c33c" - ], - "data": "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", - "blockHash": "0xa771a0192daf910648eaa0b4c6565c1cee944b7fc354bc247df716b2bc958d8d", - "blockNumber": "0x7747c6d", - "transactionHash": "0x36e200072b8dabd8ee93a5e8ce602bcf1732b64f1cc864d35d72b6e1a278c91b", - "transactionIndex": "0x1", - "logIndex": "0x0", - "removed": false - }, - { - "address": "0x0766798566d1f6e2f0b126f7783aab2cbb81c66f", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000b0aec4c25e8332256a91bbaf169e3c32dfc3c33c" - ], - "data": "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", - "blockHash": "0xa771a0192daf910648eaa0b4c6565c1cee944b7fc354bc247df716b2bc958d8d", - "blockNumber": "0x7747c6d", - "transactionHash": "0x36e200072b8dabd8ee93a5e8ce602bcf1732b64f1cc864d35d72b6e1a278c91b", - "transactionIndex": "0x1", - "logIndex": "0x1", - "removed": false - } - ], - "logsBloom": "0x00000000000000000000000000000000000000000020000000000000000000200000000000000000000000000000000000000000000000001000000000000000000000000000000000000008000000000000000000008000000000000000000000000000020001000000000000000800000000000000000000000010000000000000001000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x36e200072b8dabd8ee93a5e8ce602bcf1732b64f1cc864d35d72b6e1a278c91b", - "transactionIndex": "0x1", - "blockHash": "0xa771a0192daf910648eaa0b4c6565c1cee944b7fc354bc247df716b2bc958d8d", - "blockNumber": "0x7747c6d", - "gasUsed": "0x196faa", - "effectiveGasPrice": "0x5f5e100", - "from": "0x7f89ed1f3f0d52d303904101305471bca3cde710", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "gasUsedForL1": "0x0", - "l1BlockNumber": "0x760d1e", - "timeboosted": false - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1739916739, - "chain": 421614, - "commit": "c16b0d56" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/84532/run-1747328549.json b/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/84532/run-1747328549.json deleted file mode 100644 index 022ca5f46a..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/84532/run-1747328549.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x9ab98ec3b1b655f6ef6d0715e599ad634f3e76f93a56acecfabb8b4c24eedd26", - "transactionType": "CREATE2", - "contractName": "Swap", - "contractAddress": "0xb0aec4c25e8332256a91bbaf169e3c32dfc3c33c", - "function": null, - "arguments": null, - "transaction": { - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x25334e", - "value": "0x0", - "input": "0x00000000000000000000000000000000000000000000000000000000000000006080806040523461020c57610c80818101906001600160401b0382118383101761021057610882928184823960c0815f9460408152600860408201526744656d6f5553444360c01b60608201526080602082015260046080820152635553444360e01b60a08201520301905ff08015610201575f80546001600160a01b0319166001600160a01b03929092169182179055803b1561020c576040516340c10f1960e01b81523060048201526001600160a01b036024820152905f908290604490829084905af18015610201576101ec575b50604051818101939091906001600160401b038511838610176101d857839460c09284928339604081526008604082015267088cadadeae8aa8960c31b60608201526080602082015260046080820152630ae8aa8960e31b60a082015203019082f080156101cb57600180546001600160a01b0319166001600160a01b03929092169182179055803b156101c8576040516340c10f1960e01b81523060048201526001600160a01b03602482015291908290604490829084905af180156101bd576101a5575b60405161063a90816102488239f35b6101b0828092610224565b6101ba5780610196565b80fd5b6040513d84823e3d90fd5b50fd5b50604051903d90823e3d90fd5b634e487b7160e01b84526041600452602484fd5b6101f99192505f90610224565b5f905f6100d0565b6040513d5f823e3d90fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176102105760405256fe6080806040526004361015610012575f80fd5b5f905f3560e01c9081631b2ef1ca14610454575080633e413bee146104035780633fc8cef3146103b1578063ccdc7d761461022d5763eebba33314610055575f80fd5b3461022a5761006336610573565b90678ac7230489e8000082116101cc5782546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019290925283929060209083906064908290879073ffffffffffffffffffffffffffffffffffffffff165af19081156101c15760209261015d926101a6575b5073ffffffffffffffffffffffffffffffffffffffff60015416906040519485809481937fa9059cbb00000000000000000000000000000000000000000000000000000000835233600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af1801561019b5761016f575080f35b6101909060203d602011610194575b61018881836105a7565b810190610615565b5080f35b503d61017e565b6040513d84823e3d90fd5b6101bc90843d86116101945761018881836105a7565b6100e9565b6040513d85823e3d90fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d617820313020657468207377617020617420612074696d65000000000000006044820152fd5b80fd5b503461022a5761023c36610573565b9069152d02c7e14af68000008211610353576001546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019290925283929060209083906064908290879073ffffffffffffffffffffffffffffffffffffffff165af19081156101c15760209261015d92610338575b5073ffffffffffffffffffffffffffffffffffffffff845416906040519485809481937fa9059cbb00000000000000000000000000000000000000000000000000000000835233600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b61034e90843d86116101945761018881836105a7565b6102c5565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4d6178203130306b2055534443207377617020617420612074696d65000000006044820152fd5b503461022a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261022a57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461022a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261022a5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b823461056f5761046336610573565b929073ffffffffffffffffffffffffffffffffffffffff5f541690813b1561056f577f40c10f1900000000000000000000000000000000000000000000000000000000835233600484015260248301525f908290604490829084905af1801561056457610551575b50809173ffffffffffffffffffffffffffffffffffffffff60015416803b1561054d576040517f40c10f19000000000000000000000000000000000000000000000000000000008152336004820152602481019290925282908290604490829084905af1801561019b5761053c5750f35b81610546916105a7565b61022a5780f35b5050fd5b61055d91505f906105a7565b5f826104cb565b6040513d5f823e3d90fd5b5f80fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc604091011261056f576004359060243590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176105e857604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b9081602091031261056f5751801515810361056f579056fea164736f6c634300081a000a60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a", - "nonce": "0x3", - "chainId": "0x14a34" - }, - "additionalContracts": [ - { - "transactionType": "CREATE", - "address": "0xcff7c6da719408113dfcb5e36182c6d5aa491443", - "initCode": "0x60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000844656d6f5553444300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" - }, - { - "transactionType": "CREATE", - "address": "0x0766798566d1f6e2f0b126f7783aab2cbb81c66f", - "initCode": "0x60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000844656d6f5745544800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000" - } - ], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x153430e", - "logs": [ - { - "address": "0xcff7c6da719408113dfcb5e36182c6d5aa491443", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000b0aec4c25e8332256a91bbaf169e3c32dfc3c33c" - ], - "data": "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", - "blockHash": "0x99fcb8f595289af05af888d5f8c89655edd11fc83b1d8c3b138bbc5028dff0ae", - "blockNumber": "0x1895fa2", - "transactionHash": "0x9ab98ec3b1b655f6ef6d0715e599ad634f3e76f93a56acecfabb8b4c24eedd26", - "transactionIndex": "0x2c", - "logIndex": "0x1fb", - "removed": false - }, - { - "address": "0x0766798566d1f6e2f0b126f7783aab2cbb81c66f", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000b0aec4c25e8332256a91bbaf169e3c32dfc3c33c" - ], - "data": "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", - "blockHash": "0x99fcb8f595289af05af888d5f8c89655edd11fc83b1d8c3b138bbc5028dff0ae", - "blockNumber": "0x1895fa2", - "transactionHash": "0x9ab98ec3b1b655f6ef6d0715e599ad634f3e76f93a56acecfabb8b4c24eedd26", - "transactionIndex": "0x2c", - "logIndex": "0x1fc", - "removed": false - } - ], - "logsBloom": "0x00000000000000000000000000000000000000000020000000000000000000200000000000000000000000000000000000000000000000001000000000000000000000000000000000000008000000000000000000008000000000000000000000000000020001000000000000000800000000000000000000000010000000000000001000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x9ab98ec3b1b655f6ef6d0715e599ad634f3e76f93a56acecfabb8b4c24eedd26", - "transactionIndex": "0x2c", - "blockHash": "0x99fcb8f595289af05af888d5f8c89655edd11fc83b1d8c3b138bbc5028dff0ae", - "blockNumber": "0x1895fa2", - "gasUsed": "0x196faa", - "effectiveGasPrice": "0xe5cfe", - "from": "0x12d9855987b00761d64579d3d9571bbe42066cf0", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": null, - "l1BaseFeeScalar": "0x44d", - "l1BlobBaseFee": "0x1", - "l1BlobBaseFeeScalar": "0xa118b", - "l1Fee": "0x44590202f4", - "l1GasPrice": "0x18bc837a8", - "l1GasUsed": "0x9cd9" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1747328549, - "chain": 84532, - "commit": "a072ab75" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/911867/run-1736537366.json b/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/911867/run-1736537366.json deleted file mode 100644 index 815725bde8..0000000000 --- a/examples/ui-demo/contracts/broadcast/DeploySwapVenue.s.sol/911867/run-1736537366.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "transactions": [ - { - "hash": "0xff3fd4a479bc16ce127103e5b292c041e10b7fbb9791b5a1420016d04c89ec23", - "transactionType": "CREATE2", - "contractName": "Swap", - "contractAddress": "0xb0aec4c25e8332256a91bbaf169e3c32dfc3c33c", - "function": null, - "arguments": null, - "transaction": { - "from": "0xddf32240b4ca3184de7ec8f0d5aba27dec8b7a5c", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "gas": "0x25334e", - "value": "0x0", - "input": "0x00000000000000000000000000000000000000000000000000000000000000006080806040523461020c57610c80818101906001600160401b0382118383101761021057610882928184823960c0815f9460408152600860408201526744656d6f5553444360c01b60608201526080602082015260046080820152635553444360e01b60a08201520301905ff08015610201575f80546001600160a01b0319166001600160a01b03929092169182179055803b1561020c576040516340c10f1960e01b81523060048201526001600160a01b036024820152905f908290604490829084905af18015610201576101ec575b50604051818101939091906001600160401b038511838610176101d857839460c09284928339604081526008604082015267088cadadeae8aa8960c31b60608201526080602082015260046080820152630ae8aa8960e31b60a082015203019082f080156101cb57600180546001600160a01b0319166001600160a01b03929092169182179055803b156101c8576040516340c10f1960e01b81523060048201526001600160a01b03602482015291908290604490829084905af180156101bd576101a5575b60405161063a90816102488239f35b6101b0828092610224565b6101ba5780610196565b80fd5b6040513d84823e3d90fd5b50fd5b50604051903d90823e3d90fd5b634e487b7160e01b84526041600452602484fd5b6101f99192505f90610224565b5f905f6100d0565b6040513d5f823e3d90fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176102105760405256fe6080806040526004361015610012575f80fd5b5f905f3560e01c9081631b2ef1ca14610454575080633e413bee146104035780633fc8cef3146103b1578063ccdc7d761461022d5763eebba33314610055575f80fd5b3461022a5761006336610573565b90678ac7230489e8000082116101cc5782546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019290925283929060209083906064908290879073ffffffffffffffffffffffffffffffffffffffff165af19081156101c15760209261015d926101a6575b5073ffffffffffffffffffffffffffffffffffffffff60015416906040519485809481937fa9059cbb00000000000000000000000000000000000000000000000000000000835233600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af1801561019b5761016f575080f35b6101909060203d602011610194575b61018881836105a7565b810190610615565b5080f35b503d61017e565b6040513d84823e3d90fd5b6101bc90843d86116101945761018881836105a7565b6100e9565b6040513d85823e3d90fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d617820313020657468207377617020617420612074696d65000000000000006044820152fd5b80fd5b503461022a5761023c36610573565b9069152d02c7e14af68000008211610353576001546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481019290925283929060209083906064908290879073ffffffffffffffffffffffffffffffffffffffff165af19081156101c15760209261015d92610338575b5073ffffffffffffffffffffffffffffffffffffffff845416906040519485809481937fa9059cbb00000000000000000000000000000000000000000000000000000000835233600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b61034e90843d86116101945761018881836105a7565b6102c5565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4d6178203130306b2055534443207377617020617420612074696d65000000006044820152fd5b503461022a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261022a57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461022a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261022a5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b823461056f5761046336610573565b929073ffffffffffffffffffffffffffffffffffffffff5f541690813b1561056f577f40c10f1900000000000000000000000000000000000000000000000000000000835233600484015260248301525f908290604490829084905af1801561056457610551575b50809173ffffffffffffffffffffffffffffffffffffffff60015416803b1561054d576040517f40c10f19000000000000000000000000000000000000000000000000000000008152336004820152602481019290925282908290604490829084905af1801561019b5761053c5750f35b81610546916105a7565b61022a5780f35b5050fd5b61055d91505f906105a7565b5f826104cb565b6040513d5f823e3d90fd5b5f80fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc604091011261056f576004359060243590565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176105e857604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b9081602091031261056f5751801515810361056f579056fea164736f6c634300081a000a60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a", - "nonce": "0x1f", - "chainId": "0xde9fb" - }, - "additionalContracts": [ - { - "transactionType": "CREATE", - "address": "0xcff7c6da719408113dfcb5e36182c6d5aa491443", - "initCode": "0x60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000844656d6f5553444300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" - }, - { - "transactionType": "CREATE", - "address": "0x0766798566d1f6e2f0b126f7783aab2cbb81c66f", - "initCode": "0x60806040523461031057610c808038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b6040516108f5908161038b8239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b928284526020838301011161031057815f9260208093018386015e830101529056fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146106ab57508063095ea7b31461061c57806318160ddd146105ff57806323b872dd14610489578063313ce5671461046e57806340c10f19146102ec57806370a08231146102a857806395d89b411461012d578063a9059cbb146100fc5763dd62ed3e1461008a575f80fd5b346100f85760406003193601126100f8576100a36107ac565b73ffffffffffffffffffffffffffffffffffffffff6100c06107cf565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346100f85760406003193601126100f8576101226101186107ac565b60243590336107f2565b602060405160018152f35b346100f8575f6003193601126100f8576040515f600454908160011c6001831692831561029e575b60208210841461027157818552849390811561022f57506001146101d3575b5003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102135750508101602001601f19610174565b60209193508060019154838588010152019101909183926101fd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150601f199050610174565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f1690610155565b346100f85760206003193601126100f85773ffffffffffffffffffffffffffffffffffffffff6102d66107ac565b165f525f602052602060405f2054604051908152f35b346100f85760406003193601126100f8576103056107ac565b6024359073ffffffffffffffffffffffffffffffffffffffff82116103ea5773ffffffffffffffffffffffffffffffffffffffff169081156103be57600254908082018092116103915760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4572726f723a206d6178206d696e7420616d6f756e742069732075696e74313660448201527f30206d61780000000000000000000000000000000000000000000000000000006064820152fd5b346100f8575f6003193601126100f857602060405160128152f35b346100f85760606003193601126100f8576104a26107ac565b6104aa6107cf565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110610526575b5061012293506107f2565b8381106105cb57841561059f57331561057357610122945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f20910390558461051b565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b346100f8575f6003193601126100f8576020600254604051908152f35b346100f85760406003193601126100f8576106356107ac565b60243590331561059f5773ffffffffffffffffffffffffffffffffffffffff1690811561057357335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100f8575f6003193601126100f8575f600354908160011c60018316928315610778575b60208210841461027157818552849390811561022f575060011461071c575003601f01601f191681019067ffffffffffffffff8211818310176101a6576101a282918260405282610782565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061075c5750508101602001601f19610174565b6020919350806001915483858801015201910190918392610746565b90607f16906106d0565b601f19601f602060409481855280519182918282880152018686015e5f8582860101520116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100f857565b73ffffffffffffffffffffffffffffffffffffffff169081156108bc5773ffffffffffffffffffffffffffffffffffffffff169182156103be57815f525f60205260405f205481811061088a57817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea164736f6c634300081a000a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000844656d6f5745544800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045745544800000000000000000000000000000000000000000000000000000000" - } - ], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x1a1af8", - "logs": [ - { - "address": "0xcff7c6da719408113dfcb5e36182c6d5aa491443", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000b0aec4c25e8332256a91bbaf169e3c32dfc3c33c" - ], - "data": "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", - "blockHash": "0xc33eaf631249438f553459832fb6d174cc5eaca0fceff7d63dc67019651dae57", - "blockNumber": "0x793495", - "blockTimestamp": "0x678174e5", - "transactionHash": "0xff3fd4a479bc16ce127103e5b292c041e10b7fbb9791b5a1420016d04c89ec23", - "transactionIndex": "0x1", - "logIndex": "0x0", - "removed": false - }, - { - "address": "0x0766798566d1f6e2f0b126f7783aab2cbb81c66f", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000b0aec4c25e8332256a91bbaf169e3c32dfc3c33c" - ], - "data": "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", - "blockHash": "0xc33eaf631249438f553459832fb6d174cc5eaca0fceff7d63dc67019651dae57", - "blockNumber": "0x793495", - "blockTimestamp": "0x678174e5", - "transactionHash": "0xff3fd4a479bc16ce127103e5b292c041e10b7fbb9791b5a1420016d04c89ec23", - "transactionIndex": "0x1", - "logIndex": "0x1", - "removed": false - } - ], - "logsBloom": "0x00000000000000000000000000000000000000000020000000000000000000200000000000000000000000000000000000000000000000001000000000000000000000000000000000000008000000000000000000008000000000000000000000000000020001000000000000000800000000000000000000000010000000000000001000000000000000000000000000400000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0xff3fd4a479bc16ce127103e5b292c041e10b7fbb9791b5a1420016d04c89ec23", - "transactionIndex": "0x1", - "blockHash": "0xc33eaf631249438f553459832fb6d174cc5eaca0fceff7d63dc67019651dae57", - "blockNumber": "0x793495", - "gasUsed": "0x196faa", - "effectiveGasPrice": "0xfd", - "from": "0xddf32240b4ca3184de7ec8f0d5aba27dec8b7a5c", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "contractAddress": "0xb0aec4c25e8332256a91bbaf169e3c32dfc3c33c", - "l1BaseFeeScalar": "0xa6fe0", - "l1BlobBaseFee": "0x63f363e9", - "l1BlobBaseFeeScalar": "0x0", - "l1Fee": "0x33cde391b2e5", - "l1GasPrice": "0x7bbcf3e6", - "l1GasUsed": "0x9cb1" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1736537366, - "chain": 911867, - "commit": "ae9c0028" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/config/slither.config.json b/examples/ui-demo/contracts/config/slither.config.json deleted file mode 100644 index 06744d9093..0000000000 --- a/examples/ui-demo/contracts/config/slither.config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "filter_paths": "(lib/|test/)" -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/config/solhint-script.json b/examples/ui-demo/contracts/config/solhint-script.json deleted file mode 100644 index fecaf705b3..0000000000 --- a/examples/ui-demo/contracts/config/solhint-script.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "solhint:recommended", - "rules": { - "func-name-mixedcase": "off", - "immutable-vars-naming": ["error"], - "no-unused-import": ["error"], - "compiler-version": ["error", ">=0.8.19"], - "custom-errors": "off", - "no-console": "off", - "func-visibility": ["error", { "ignoreConstructors": true }], - "max-line-length": ["error", 120], - "max-states-count": ["warn", 30], - "modifier-name-mixedcase": ["error"], - "private-vars-leading-underscore": ["error"], - "no-inline-assembly": "warn", - "avoid-low-level-calls": "off", - "one-contract-per-file": "off", - "no-empty-blocks": "off", - "reason-string": "off" - } - } \ No newline at end of file diff --git a/examples/ui-demo/contracts/config/solhint-src.json b/examples/ui-demo/contracts/config/solhint-src.json deleted file mode 100644 index b1ba809590..0000000000 --- a/examples/ui-demo/contracts/config/solhint-src.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "solhint:recommended", - "rules": { - "immutable-vars-naming": ["error"], - "no-unused-import": ["error"], - "compiler-version": ["error", ">=0.8.19"], - "func-visibility": ["error", { "ignoreConstructors": true }], - "max-line-length": ["error", 120], - "func-param-name-mixedcase": ["error"], - "modifier-name-mixedcase": ["error"], - "private-vars-leading-underscore": ["error"], - "ordering": ["warn"], - "no-inline-assembly": "off", - "avoid-low-level-calls": "off", - "no-complex-fallback": "off" - } - } \ No newline at end of file diff --git a/examples/ui-demo/contracts/config/solhint-test.json b/examples/ui-demo/contracts/config/solhint-test.json deleted file mode 100644 index 20ee72c88d..0000000000 --- a/examples/ui-demo/contracts/config/solhint-test.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "solhint:recommended", - "rules": { - "func-name-mixedcase": "off", - "immutable-vars-naming": ["error"], - "no-unused-import": ["error"], - "compiler-version": ["error", ">=0.8.19"], - "custom-errors": "off", - "func-visibility": ["error", { "ignoreConstructors": true }], - "max-line-length": ["error", 120], - "max-states-count": ["warn", 30], - "modifier-name-mixedcase": ["error"], - "private-vars-leading-underscore": ["error"], - "no-inline-assembly": "off", - "avoid-low-level-calls": "off", - "one-contract-per-file": "off", - "no-empty-blocks": "off", - "reason-string": ["warn", { "maxLength": 64 }] - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/foundry.toml b/examples/ui-demo/contracts/foundry.toml deleted file mode 100644 index de2246cc5d..0000000000 --- a/examples/ui-demo/contracts/foundry.toml +++ /dev/null @@ -1,58 +0,0 @@ -[profile.default] -solc = '0.8.26' -via_ir = false -src = 'src' -test = 'test' -libs = ['lib'] -out = 'out' -optimizer = true -optimizer_runs = 200 -auto_detect_solc = false -bytecode_hash = "none" -auto_detect_remappings = false -fs_permissions = [ - { access = "read", path = "./out-optimized" } -] - -[fuzz] -runs = 500 - -[invariant] -runs=500 -fail_on_revert = true -depth = 10 - -[profile.optimized-build] -via_ir = true -test = 'src' -optimizer_runs = 10000 -out = 'out-optimized' - -[profile.optimized-test] -src = 'test' - -[profile.optimized-test-deep] -src = 'test' - -[profile.optimized-test-deep.fuzz] -runs = 10000 - -[profile.optimized-test-deep.invariant] -runs = 5000 -depth = 32 - -[profile.deep.fuzz] -runs = 100000 - -[profile.deep.invariant] -runs = 5000 -depth = 32 - -[fmt] -line_length = 115 -wrap_comments = true -sort_imports = true -number_underscore = "thousands" -int_types = "long" - -# See more config options https://github.com/foundry-rs/foundry/tree/master/config \ No newline at end of file diff --git a/examples/ui-demo/contracts/lib/forge-std b/examples/ui-demo/contracts/lib/forge-std deleted file mode 160000 index b93cf4bc34..0000000000 --- a/examples/ui-demo/contracts/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b93cf4bc34ff214c099dc970b153f85ade8c9f66 diff --git a/examples/ui-demo/contracts/lib/openzeppelin-contracts b/examples/ui-demo/contracts/lib/openzeppelin-contracts deleted file mode 160000 index acd4ff74de..0000000000 --- a/examples/ui-demo/contracts/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit acd4ff74de833399287ed6b31b4debf6b2b35527 diff --git a/examples/ui-demo/contracts/package.json b/examples/ui-demo/contracts/package.json deleted file mode 100644 index eff455a523..0000000000 --- a/examples/ui-demo/contracts/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "devDependencies": { - "pnpm": "^8.7.5", - "solhint": "^3.6.2" - }, - "scripts": { - "lint": "pnpm lint:src && pnpm lint:test && pnpm lint:script", - "lint:src": "solhint --max-warnings 0 -c .solhint-src.json './src/**/*.sol'", - "lint:test": "solhint --max-warnings 0 -c .solhint-test.json './test/**/*.sol'", - "lint:script": "solhint --max-warnings 0 -c .solhint-script.json './script/**/*.sol'" - } - } \ No newline at end of file diff --git a/examples/ui-demo/contracts/pnpm-lock.yaml b/examples/ui-demo/contracts/pnpm-lock.yaml deleted file mode 100644 index c011cb5a17..0000000000 --- a/examples/ui-demo/contracts/pnpm-lock.yaml +++ /dev/null @@ -1,489 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - pnpm: - specifier: ^8.7.5 - version: 8.15.9 - solhint: - specifier: ^3.6.2 - version: 3.6.2 - -packages: - - '@babel/code-frame@7.26.2': - resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - - '@solidity-parser/parser@0.16.2': - resolution: {integrity: sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg==} - - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - - ajv@8.17.1: - resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - antlr4@4.13.2: - resolution: {integrity: sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg==} - engines: {node: '>=16'} - - antlr4ts@0.5.0-alpha.4: - resolution: {integrity: sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - ast-parents@0.0.1: - resolution: {integrity: sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==} - - astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} - - cosmiconfig@8.3.6: - resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} - engines: {node: '>=14'} - peerDependencies: - typescript: '>=4.9.5' - peerDependenciesMeta: - typescript: - optional: true - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - - fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - - fast-uri@3.0.5: - resolution: {integrity: sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==} - - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - - glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - - json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - - lodash.truncate@4.4.2: - resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} - - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - - minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - - parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - - pnpm@8.15.9: - resolution: {integrity: sha512-SZQ0ydj90aJ5Tr9FUrOyXApjOrzuW7Fee13pDzL0e1E6ypjNXP0AHDHw20VLw4BO3M1XhQHkyik6aBYWa72fgQ==} - engines: {node: '>=16.14'} - hasBin: true - - prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - - punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} - - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - - slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - - solhint@3.6.2: - resolution: {integrity: sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==} - hasBin: true - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - table@6.9.0: - resolution: {integrity: sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==} - engines: {node: '>=10.0.0'} - - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - -snapshots: - - '@babel/code-frame@7.26.2': - dependencies: - '@babel/helper-validator-identifier': 7.25.9 - js-tokens: 4.0.0 - picocolors: 1.1.1 - - '@babel/helper-validator-identifier@7.25.9': {} - - '@solidity-parser/parser@0.16.2': - dependencies: - antlr4ts: 0.5.0-alpha.4 - - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - - ajv@8.17.1: - dependencies: - fast-deep-equal: 3.1.3 - fast-uri: 3.0.5 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - - ansi-regex@5.0.1: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - antlr4@4.13.2: {} - - antlr4ts@0.5.0-alpha.4: {} - - argparse@2.0.1: {} - - ast-parents@0.0.1: {} - - astral-regex@2.0.0: {} - - balanced-match@1.0.2: {} - - brace-expansion@2.0.1: - dependencies: - balanced-match: 1.0.2 - - callsites@3.1.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - commander@10.0.1: {} - - cosmiconfig@8.3.6: - dependencies: - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - path-type: 4.0.0 - - emoji-regex@8.0.0: {} - - error-ex@1.3.2: - dependencies: - is-arrayish: 0.2.1 - - fast-deep-equal@3.1.3: {} - - fast-diff@1.3.0: {} - - fast-json-stable-stringify@2.1.0: {} - - fast-uri@3.0.5: {} - - fs.realpath@1.0.0: {} - - glob@8.1.0: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - - has-flag@4.0.0: {} - - ignore@5.3.2: {} - - import-fresh@3.3.0: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - - is-arrayish@0.2.1: {} - - is-fullwidth-code-point@3.0.0: {} - - js-tokens@4.0.0: {} - - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - - json-parse-even-better-errors@2.3.1: {} - - json-schema-traverse@0.4.1: {} - - json-schema-traverse@1.0.0: {} - - lines-and-columns@1.2.4: {} - - lodash.truncate@4.4.2: {} - - lodash@4.17.21: {} - - minimatch@5.1.6: - dependencies: - brace-expansion: 2.0.1 - - once@1.4.0: - dependencies: - wrappy: 1.0.2 - - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - - parse-json@5.2.0: - dependencies: - '@babel/code-frame': 7.26.2 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - - path-type@4.0.0: {} - - picocolors@1.1.1: {} - - pluralize@8.0.0: {} - - pnpm@8.15.9: {} - - prettier@2.8.8: - optional: true - - punycode@2.3.1: {} - - require-from-string@2.0.2: {} - - resolve-from@4.0.0: {} - - semver@7.6.3: {} - - slice-ansi@4.0.0: - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - - solhint@3.6.2: - dependencies: - '@solidity-parser/parser': 0.16.2 - ajv: 6.12.6 - antlr4: 4.13.2 - ast-parents: 0.0.1 - chalk: 4.1.2 - commander: 10.0.1 - cosmiconfig: 8.3.6 - fast-diff: 1.3.0 - glob: 8.1.0 - ignore: 5.3.2 - js-yaml: 4.1.0 - lodash: 4.17.21 - pluralize: 8.0.0 - semver: 7.6.3 - strip-ansi: 6.0.1 - table: 6.9.0 - text-table: 0.2.0 - optionalDependencies: - prettier: 2.8.8 - transitivePeerDependencies: - - typescript - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - table@6.9.0: - dependencies: - ajv: 8.17.1 - lodash.truncate: 4.4.2 - slice-ansi: 4.0.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - text-table@0.2.0: {} - - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - - wrappy@1.0.2: {} diff --git a/examples/ui-demo/contracts/remappings.txt b/examples/ui-demo/contracts/remappings.txt deleted file mode 100644 index eaaeb4f11d..0000000000 --- a/examples/ui-demo/contracts/remappings.txt +++ /dev/null @@ -1,3 +0,0 @@ -ds-test/=lib/forge-std/lib/ds-test/src/ -forge-std/=lib/forge-std/src/ -@openzeppelin/contracts=lib/openzeppelin-contracts/contracts/ \ No newline at end of file diff --git a/examples/ui-demo/contracts/script/Counter.s.sol b/examples/ui-demo/contracts/script/Counter.s.sol deleted file mode 100644 index cdc1fe9a1b..0000000000 --- a/examples/ui-demo/contracts/script/Counter.s.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Script, console} from "forge-std/Script.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterScript is Script { - Counter public counter; - - function setUp() public {} - - function run() public { - vm.startBroadcast(); - - counter = new Counter(); - - vm.stopBroadcast(); - } -} diff --git a/examples/ui-demo/contracts/script/DeployERC20Mintable6Decimals.s.sol b/examples/ui-demo/contracts/script/DeployERC20Mintable6Decimals.s.sol deleted file mode 100644 index 895ddf8350..0000000000 --- a/examples/ui-demo/contracts/script/DeployERC20Mintable6Decimals.s.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.26; - -import {Script, console} from "forge-std/Script.sol"; -import {ERC20Mintable6Decimals} from "../src/ERC20Mintable6Decimals.sol"; - -contract DeployERC20Mintable6DecimalsScript is Script { - function run() public { - // ---- Configuration ---- - string memory name = "Smart Wallets Demo USD Coin"; - string memory symbol = "SWUSDC"; - - vm.startBroadcast(); - - ERC20Mintable6Decimals token = new ERC20Mintable6Decimals{salt: 0}(name, symbol); - - console.log("ERC20Mintable6Decimals deployed at address: ", address(token)); - - vm.stopBroadcast(); - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/script/DeployNFT.s.sol b/examples/ui-demo/contracts/script/DeployNFT.s.sol deleted file mode 100644 index f2246e52b7..0000000000 --- a/examples/ui-demo/contracts/script/DeployNFT.s.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.26; - -import {Script, console} from "forge-std/Script.sol"; - -import {NFT} from "../src/NFT.sol"; - -contract DeployNFTScript is Script { - - function run() public { - - string memory name = "Smart Wallets Demo NFT"; - string memory symbol = "SWD"; - string memory baseURI = "https://static.alchemyapi.io/assets/accountkit/smartwallet.png"; - - vm.startBroadcast(); - - NFT nft = new NFT{ salt: 0 }(name, symbol, baseURI); - - console.log("NFT deployed at address: ", address(nft)); - - vm.stopBroadcast(); - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/script/DeployNFTUSDCMintable.s.sol b/examples/ui-demo/contracts/script/DeployNFTUSDCMintable.s.sol deleted file mode 100644 index 5913d8be4a..0000000000 --- a/examples/ui-demo/contracts/script/DeployNFTUSDCMintable.s.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.26; - -import {Script, console} from "forge-std/Script.sol"; - -import {NFTUSDCMintable} from "../src/NFTUSDCMintable.sol"; - -contract DeployNFTUSDCMintableScript is Script { - - function run() public { - - string memory name = "Smart Wallets Demo NFT USDC Mintable"; - string memory symbol = "SWDNFT"; - string memory baseURI = "https://static.alchemyapi.io/assets/accountkit/capy-beanie.png"; - address usdcTokenAddress = vm.parseAddress("0xE9a174444d5fb88c563fDa0EFc3aD905a72B7C59"); - - vm.startBroadcast(); - - // Deploying NFTUSDCMintable with the usdcTokenAddress - NFTUSDCMintable nftusdc = new NFTUSDCMintable{ salt: 0 }(name, symbol, baseURI, usdcTokenAddress); - - console.log("NFTUSDCMintable deployed at address: ", address(nftusdc)); - - vm.stopBroadcast(); - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/script/DeploySwapVenue.s.sol b/examples/ui-demo/contracts/script/DeploySwapVenue.s.sol deleted file mode 100644 index a821934f75..0000000000 --- a/examples/ui-demo/contracts/script/DeploySwapVenue.s.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Script, console} from "forge-std/Script.sol"; -import {Swap} from "../src/Swap.sol"; - -contract DeploySwapVenueScript is Script { - - function run() public { - vm.startBroadcast(); - - Swap swap = new Swap{ salt: 0 }(); - - console.log("Swap deployed at address: ", address(swap)); - - vm.stopBroadcast(); - } -} diff --git a/examples/ui-demo/contracts/src/Counter.sol b/examples/ui-demo/contracts/src/Counter.sol deleted file mode 100644 index aded7997b0..0000000000 --- a/examples/ui-demo/contracts/src/Counter.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -contract Counter { - uint256 public number; - - function setNumber(uint256 newNumber) public { - number = newNumber; - } - - function increment() public { - number++; - } -} diff --git a/examples/ui-demo/contracts/src/ERC20Mintable.sol b/examples/ui-demo/contracts/src/ERC20Mintable.sol deleted file mode 100644 index 92904e2503..0000000000 --- a/examples/ui-demo/contracts/src/ERC20Mintable.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.26; - -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; - -contract ERC20Mintable is ERC20 { - constructor(string memory name, string memory symbol) - ERC20(name, symbol) - {} - - function mint(address to, uint256 amount) public { - require(amount <= type(uint160).max, "Error: max mint amount is uint160 max"); - _mint(to, amount); - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/src/ERC20Mintable6Decimals.sol b/examples/ui-demo/contracts/src/ERC20Mintable6Decimals.sol deleted file mode 100644 index 50c5a7fe17..0000000000 --- a/examples/ui-demo/contracts/src/ERC20Mintable6Decimals.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.26; - -import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; - -contract ERC20Mintable6Decimals is ERC20 { - uint8 private immutable _decimals; - - constructor(string memory name, string memory symbol) - ERC20(name, symbol) - { - _decimals = 6; - } - - function decimals() public view override returns (uint8) { - return _decimals; - } - - function mint(address to, uint256 amount) public { - require(amount <= type(uint160).max, "Error: max mint amount is uint160 max"); - _mint(to, amount); - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/src/NFT.sol b/examples/ui-demo/contracts/src/NFT.sol deleted file mode 100644 index 8e8aed488f..0000000000 --- a/examples/ui-demo/contracts/src/NFT.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.26; - -import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; - -error NonExistentTokenURI(); - -contract NFT is ERC721 { - - using Strings for uint256; - string public baseURI; - uint256 public currentTokenId; - - constructor( - string memory _name, - string memory _symbol, - string memory _baseURI - ) ERC721(_name, _symbol) { - baseURI = _baseURI; - } - - function mintTo(address recipient) public payable returns (uint256) { - uint256 newTokenId = ++currentTokenId; - _safeMint(recipient, newTokenId); - return newTokenId; - } - - function tokenURI(uint256 tokenId) - public - view - virtual - override - returns (string memory) - { - if (ownerOf(tokenId) == address(0)) { - revert NonExistentTokenURI(); - } - return baseURI; - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/src/NFTUSDCMintable.sol b/examples/ui-demo/contracts/src/NFTUSDCMintable.sol deleted file mode 100644 index ce4dc5cf46..0000000000 --- a/examples/ui-demo/contracts/src/NFTUSDCMintable.sol +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.26; - -import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -error NonExistentTokenURI(); -error USDCTransferFailed(); - -contract NFTUSDCMintable is ERC721 { - - using Strings for uint256; - string public baseURI; - uint256 public currentTokenId; - IERC20 public usdcToken; - uint256 public mintPrice = 1 * 10**6; - - constructor( - string memory _name, - string memory _symbol, - string memory _baseURI, - address _usdcTokenAddress - ) ERC721(_name, _symbol) { - baseURI = _baseURI; - usdcToken = IERC20(_usdcTokenAddress); - } - - function mintTo(address recipient) public returns (uint256) { - if (!usdcToken.transferFrom(msg.sender, address(this), mintPrice)) { - revert USDCTransferFailed(); - } - - uint256 newTokenId = ++currentTokenId; - _safeMint(recipient, newTokenId); - return newTokenId; - } - - function tokenURI(uint256 tokenId) - public - view - virtual - override - returns (string memory) - { - if (ownerOf(tokenId) == address(0)) { - revert NonExistentTokenURI(); - } - return baseURI; - } -} diff --git a/examples/ui-demo/contracts/src/Swap.sol b/examples/ui-demo/contracts/src/Swap.sol deleted file mode 100644 index b7579e5aff..0000000000 --- a/examples/ui-demo/contracts/src/Swap.sol +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.26; - -import {ERC20Mintable} from "./ERC20Mintable.sol"; - -contract Swap { - ERC20Mintable public usdc; - ERC20Mintable public weth; - - constructor() { - usdc = new ERC20Mintable("DemoUSDC", "USDC"); - usdc.mint(address(this), type(uint160).max); - - weth = new ERC20Mintable("DemoWETH", "WETH"); - weth.mint(address(this), type(uint160).max); - } - - function mint(uint amount1, uint amount2) external { - usdc.mint(msg.sender, amount1); - weth.mint(msg.sender, amount2); - } - - function swapUSDCtoWETH(uint amountIn, uint amountOut) external { - require(amountOut <= 10 ether, "Max 10 eth swap at a time"); - usdc.transferFrom(msg.sender, address(this), amountIn); - weth.transfer(msg.sender, amountOut); - } - - function swapWETHtoUSDC(uint amountIn, uint amountOut) external { - require(amountOut <= 100000 ether, "Max 100k USDC swap at a time"); - weth.transferFrom(msg.sender, address(this), amountIn); - usdc.transfer(msg.sender, amountOut); - } -} \ No newline at end of file diff --git a/examples/ui-demo/contracts/test/Counter.t.sol b/examples/ui-demo/contracts/test/Counter.t.sol deleted file mode 100644 index 54b724f7ae..0000000000 --- a/examples/ui-demo/contracts/test/Counter.t.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Test, console} from "forge-std/Test.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterTest is Test { - Counter public counter; - - function setUp() public { - counter = new Counter(); - counter.setNumber(0); - } - - function test_Increment() public { - counter.increment(); - assertEq(counter.number(), 1); - } - - function testFuzz_SetNumber(uint256 x) public { - counter.setNumber(x); - assertEq(counter.number(), x); - } -} diff --git a/examples/ui-demo/e2e/7702.spec.ts b/examples/ui-demo/e2e/7702.spec.ts deleted file mode 100644 index a6c300df19..0000000000 --- a/examples/ui-demo/e2e/7702.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { test, expect } from "@playwright/test"; -import { mintWithGoogleAuthWorkflow } from "./helpers/mintWorkflow"; -const googleEmail = process.env.PLAYWRIGHT_GOOGLE_EMAIL; -const googlePassword = process.env.PLAYWRIGHT_GOOGLE_PASSWORD; - -test.beforeEach(async ({ page, baseURL }) => { - await page.goto(baseURL!); -}); -test("Google sign in", async ({ page }) => { - if (!googleEmail || !googlePassword) { - throw new Error( - "PLAYWRIGHT_GOOGLE_EMAIL and PLAYWRIGHT_GOOGLE_PASSWORD must be set", - ); - } - await expect(page).toHaveTitle(/Smart Wallets/); - // Fast way to initialize the page and ensure config is loaded - await page.getByRole("switch", { name: "Email" }).click(); - await page.getByRole("switch", { name: "Email" }).click(); - const walletSwitch = await page.locator("#wallet-switch"); - if ((await walletSwitch.getAttribute("aria-checked")) === "false") { - await walletSwitch.click(); - } - await mintWithGoogleAuthWorkflow(page, googleEmail, googlePassword); -}); diff --git a/examples/ui-demo/e2e/helpers/mintWorkflow.ts b/examples/ui-demo/e2e/helpers/mintWorkflow.ts deleted file mode 100644 index ce94a54a4d..0000000000 --- a/examples/ui-demo/e2e/helpers/mintWorkflow.ts +++ /dev/null @@ -1,55 +0,0 @@ -// sharedWorkflow.ts -import { Page, expect } from "@playwright/test"; - -export async function mintWithGoogleAuthWorkflow( - page: Page, - googleEmail: string, - googlePassword: string, -) { - // Google sign in - await page.locator("button[aria-label='Google sign in']").click(); - const popup = await page.waitForEvent("popup"); - await popup.waitForLoadState("networkidle"); - - const emailInput = popup.getByRole("textbox"); - await emailInput.fill(googleEmail); - await popup.getByRole("button", { name: /Next/i }).click(); - await expect(popup.getByText(/Enter your password/i)).toBeVisible(); - - const passwordInput = popup.locator("input[type='password']:visible"); - await passwordInput.fill(googlePassword); - await popup.getByRole("button", { name: /Next/i }).click(); - - // Wait for page to load after sign in - await expect(page.getByText(/Gasless transactions/i)).toBeVisible(); - const avatar = page.getByRole("button", { name: `Hello, ${googleEmail}` }); - await expect(avatar).toBeVisible(); - await page.locator("img[alt='An NFT']"); - - // Collect NFT - await page.getByRole("button", { name: "Collect NFT" }).click(); - await expect(page.getByText("Success", { exact: true })).toBeVisible({ - timeout: 30000, - }); - - // Create session key - await page.getByRole("button", { name: "Create session key" }).click(); - await expect(page.getByText("Bought 1 ETH")).toBeVisible({ - timeout: 30000, - }); - - // Check external links - await expect(page.locator("a[aria-label='View transaction']")).toBeVisible(); - await expect(page.getByRole("link", { name: "Quickstart" })).toHaveAttribute( - "href", - "https://www.alchemy.com/docs/wallets/react/quickstart", - ); - await expect(page.locator("a[aria-label='GitHub']")).toHaveAttribute( - "href", - "https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x", - ); - await expect(page.getByRole("link", { name: "CSS" })).toHaveAttribute( - "href", - "https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/tailwind/types.ts#L6", - ); -} diff --git a/examples/ui-demo/e2e/smart-contract.spec.ts b/examples/ui-demo/e2e/smart-contract.spec.ts deleted file mode 100644 index fecff0ba38..0000000000 --- a/examples/ui-demo/e2e/smart-contract.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test, expect } from "@playwright/test"; -import { mintWithGoogleAuthWorkflow } from "./helpers/mintWorkflow"; -const googleEmail = process.env.PLAYWRIGHT_GOOGLE_EMAIL; -const googlePassword = process.env.PLAYWRIGHT_GOOGLE_PASSWORD; - -test.beforeEach(async ({ page, baseURL }) => { - await page.goto(baseURL!); -}); -test("Google sign in", async ({ page }) => { - if (!googleEmail || !googlePassword) { - throw new Error( - "PLAYWRIGHT_GOOGLE_EMAIL and PLAYWRIGHT_GOOGLE_PASSWORD must be set", - ); - } - await expect(page).toHaveTitle(/Smart Wallets/); - // Fast way to initialize the page and ensure config is loaded - await page.getByRole("switch", { name: "Email" }).click(); - await page.getByRole("switch", { name: "Email" }).click(); - - const walletSwitch = await page.locator("#wallet-switch"); - if ((await walletSwitch.getAttribute("aria-checked")) === "true") { - await walletSwitch.click(); - } - - await mintWithGoogleAuthWorkflow(page, googleEmail, googlePassword); -}); diff --git a/examples/ui-demo/e2e/ui-demo-config.spec.ts b/examples/ui-demo/e2e/ui-demo-config.spec.ts deleted file mode 100644 index bc1a1051a4..0000000000 --- a/examples/ui-demo/e2e/ui-demo-config.spec.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { expect, test } from "@playwright/test"; -import path from "path"; -test.beforeEach(async ({ page, baseURL }) => { - await page.goto(baseURL!); -}); -test("Toggle auth methods", async ({ page }) => { - // EMAIL - const emailInput = page.getByPlaceholder("Email", { exact: true }); - const emailToggle = page.getByRole("switch", { name: /email/i }); - await expect(emailInput).toBeVisible(); - await expect(emailToggle).toBeChecked(); - await emailToggle.click(); - await expect(emailToggle).not.toBeChecked(); - await expect(emailInput).not.toBeVisible(); - - // PASSKEY - const passkeyToggle = page.getByRole("switch", { name: /passkeys/i }); - const passkeyButton = page.getByRole("button", { name: "I have a passkey" }); - await expect(passkeyToggle).toBeChecked(); - await expect(passkeyButton).toBeVisible(); - await passkeyToggle.click(); - await expect(passkeyToggle).not.toBeChecked(); - await expect(passkeyButton).not.toBeVisible(); - - // SOCIAL - const socialAuthToggle = page.getByRole("switch", { name: /social/i }); - - const googleButton = page.locator("button[aria-label='Google sign in']"); - const googleAuthToggle = page.locator( - "button[aria-label='Google social authentication toggle']", - ); - - const facebookButton = page.locator("button[aria-label='Facebook sign in']"); - const facebookAuthToggle = page.locator( - "button[aria-label='Facebook social authentication toggle']", - ); - - const discordButton = page.locator("button[aria-label='Discord sign in']"); - const discordAuthToggle = page.locator( - "button[aria-label='Discord social authentication toggle']", - ); - - const twitterButton = page.locator("button[aria-label='Twitter sign in']"); - const twitterAuthToggle = page.locator( - "button[aria-label='Twitter social authentication toggle']", - ); - - await expect(socialAuthToggle).toBeChecked(); - await expect(googleButton).toBeVisible(); - await expect(facebookButton).toBeVisible(); - await expect(discordButton).toBeVisible(); - await expect(twitterButton).toBeVisible(); - - await socialAuthToggle.click(); - await expect(socialAuthToggle).not.toBeChecked(); - await expect(googleButton).not.toBeVisible(); - await expect(facebookButton).not.toBeVisible(); - await expect(discordButton).not.toBeVisible(); - await expect(twitterButton).not.toBeVisible(); - - await socialAuthToggle.click(); - - await expect(googleButton).toBeVisible(); - await expect(facebookButton).toBeVisible(); - await expect(discordButton).toBeVisible(); - await expect(twitterButton).toBeVisible(); - - await googleAuthToggle.click(); - await expect(googleButton).not.toBeVisible(); - - await facebookAuthToggle.click(); - await expect(facebookButton).not.toBeVisible(); - - await discordAuthToggle.click(); - await expect(discordButton).not.toBeVisible(); - - await twitterAuthToggle.click(); - await expect(twitterButton).not.toBeVisible(); - - // EXTERNAL WALLET - const externalWalletToggle = page.getByRole("switch", { - name: /external wallets/i, - }); - const externalWalletButton = page.getByRole("button", { - name: "Continue with a wallet", - }); - await expect(externalWalletToggle).toBeChecked(); - await expect(externalWalletButton).toBeVisible(); - - await externalWalletToggle.click(); - await expect(externalWalletToggle).not.toBeChecked(); - await expect(externalWalletButton).not.toBeVisible(); - - await externalWalletToggle.click(); - await expect(externalWalletToggle).toBeChecked(); - await expect(externalWalletButton).toBeVisible(); -}); - -test("Branding config", async ({ page }) => { - // Dark mode - const darkModeToggle = page.locator("button[id='theme-switch']"); - await expect(darkModeToggle).not.toBeChecked(); - await expect(page.locator(".bg-bg-surface-default")).toHaveCSS( - "background-color", - "rgb(255, 255, 255)", - ); - darkModeToggle.click(); - await expect(darkModeToggle).toBeChecked(); - await expect(page.locator("html")).toHaveClass("dark"); - await expect(page.locator(".bg-bg-surface-default")).toHaveCSS( - "background-color", - "rgb(2, 6, 23)", - ); - // Brand color - await expect(page.locator(".akui-btn-primary").first()).toHaveCSS( - "background-color", - "rgb(255, 102, 204)", - ); - const brandColorButton = page.locator("button[id='color-picker']"); - await brandColorButton.click(); - const colorPicker = page - .locator("div") - .filter({ hasText: /^Hex$/ }) - .getByRole("textbox"); - await colorPicker.fill("#000000"); - await expect(page.locator(".akui-btn-primary").first()).toHaveCSS( - "background-color", - "rgb(0, 0, 0)", - ); - // Logo - const logoInput = page.locator('input[type="file"]'); - // TODO: validate this in CI/CD - const logoPath = path.join(__dirname, "../public/next.svg"); - await logoInput.setInputFiles(logoPath); - await expect(page.getByRole("img", { name: "next.svg" })).toBeVisible(); - await page.locator("button[id='logo-remove']").click(); - await expect(page.getByRole("img", { name: "next.svg" })).not.toBeVisible(); - // Border radius - await expect(page.locator(".radius-2").first()).toHaveCSS( - "border-radius", - "16px", - ); - await page.getByRole("button", { name: "Medium" }).click(); - await expect(page.locator(".radius-2").first()).toHaveCSS( - "border-radius", - "32px", - ); - await page.getByRole("button", { name: "Large" }).click(); - await expect(page.locator(".radius-2").first()).toHaveCSS( - "border-radius", - "48px", - ); - await page.getByRole("button", { name: "None" }).click(); - await expect(page.locator(".radius-2").first()).toHaveCSS( - "border-radius", - "0px", - ); -}); - -test("code preview", async ({ page }) => { - const codePreviewSwitch = page.getByRole("switch", { name: "Code preview" }); - await expect(codePreviewSwitch).not.toBeChecked(); - await codePreviewSwitch.click(); - await expect(codePreviewSwitch).toBeChecked(); - await expect(page.getByText("Export configuration")).toBeVisible(); - await expect( - page.getByRole("link", { name: "Fully customize styling here." }), - ).toHaveAttribute( - "href", - "https://www.alchemy.com/docs/wallets/react/customization/theme", - ); - await codePreviewSwitch.click(); - await expect(codePreviewSwitch).not.toBeChecked(); -}); diff --git a/examples/ui-demo/env.mjs b/examples/ui-demo/env.mjs deleted file mode 100644 index 818e9b8339..0000000000 --- a/examples/ui-demo/env.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import { createEnv } from "@t3-oss/env-nextjs"; -import { z } from "zod"; - -export const env = createEnv({ - /** - * Specify your server-side environment variables schema here. This way you can ensure the app - * isn't built with invalid env vars. - */ - server: { - NODE_ENV: z.enum(["development", "test", "production"]), - API_KEY: z.string(), - ALCHEMY_API_URL: z.string().url(), - ALCHEMY_RPC_URL: z.string().url(), - ALCHEMY_RPC_URL_BASE_SEPOLIA: z.string().url(), - ALCHEMY_SOLANA_URL: z.string().url(), - }, - - /** - * Specify your client-side environment variables schema here. This way you can ensure the app - * isn't built with invalid env vars. To expose them to the client, prefix them with - * `NEXT_PUBLIC_`. - */ - client: {}, - - /** - * You can't destruct `process.env` as a regular object in the Next.js edge runtimes (e.g. - * middlewares) or client-side so we need to destruct manually. - */ - runtimeEnv: { - NODE_ENV: process.env.NODE_ENV, - API_KEY: process.env.API_KEY, - ALCHEMY_API_URL: process.env.ALCHEMY_API_URL, - ALCHEMY_RPC_URL: process.env.ALCHEMY_RPC_URL, - ALCHEMY_RPC_URL_BASE_SEPOLIA: process.env.ALCHEMY_RPC_URL_BASE_SEPOLIA, - ALCHEMY_SOLANA_URL: - process.env.ALCHEMY_SOLANA_URL || - `https://solana-devnet.g.alchemy.com/v2/${process.env.API_KEY}`, - }, -}); diff --git a/examples/ui-demo/next.config.mjs b/examples/ui-demo/next.config.mjs deleted file mode 100644 index 82bcc683e0..0000000000 --- a/examples/ui-demo/next.config.mjs +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint-disable jsdoc/check-tag-names */ -await import("./env.mjs"); - -/** @type {import('next').NextConfig} */ -const nextConfig = { - images: { - remotePatterns: [ - { - protocol: "https", - hostname: "static.alchemyapi.io", - port: "", - pathname: "/assets/accountkit/**", - }, - ], - }, - eslint: { - ignoreDuringBuilds: true, - }, - webpack: (config) => { - config.externals.push("pino-pretty", "lokijs", "encoding"); - return config; - }, -}; - -export default nextConfig; diff --git a/examples/ui-demo/package.json b/examples/ui-demo/package.json deleted file mode 100644 index ffdae3fa7c..0000000000 --- a/examples/ui-demo/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "ui-demo", - "version": "0.1.0", - "private": true, - "engines": { - "node": "22.x" - }, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint", - "lint:write": "prettier --no-ignore --write ./src", - "test:e2e": "playwright test", - "playwright": "playwright test --ui" - }, - "dependencies": { - "@account-kit/core": "^4.47.0", - "@account-kit/infra": "^4.47.0", - "@account-kit/logging": "^4.47.0", - "@account-kit/react": "^4.47.0", - "@account-kit/smart-contracts": "^4.47.0", - "@headlessui/react": "^2.2.3", - "@metaplex-foundation/umi": "^1.2.0", - "@metaplex-foundation/umi-bundle-defaults": "^1.2.0", - "@metaplex-foundation/umi-rpc-web3js": "^1.2.0", - "@radix-ui/react-popover": "^1.0.7", - "@radix-ui/react-select": "^2.1.2", - "@radix-ui/react-switch": "^1.0.3", - "@radix-ui/react-toast": "^1.2.1", - "@radix-ui/react-tooltip": "^1.1.2", - "@solana/spl-token": "^0.4.13", - "@solana/spl-token-metadata": "^0.1.6", - "@solana/web3.js": "^1.98.0", - "@t3-oss/env-core": "^0.7.1", - "@t3-oss/env-nextjs": "^0.7.1", - "@tanstack/react-query": "^5.28.9", - "@uiw/react-color": "^2.3.0", - "boring-avatars": "^1.11.2", - "bs58": "^6.0.0", - "class-variance-authority": "^0.7.0", - "clsx": "^2.1.1", - "dedent": "^1.5.3", - "lucide-react": "^0.394.0", - "next": "14.2.29", - "prettier": "3.3.3", - "qrcode.react": "^4.2.0", - "react": "^18", - "react-dom": "^18", - "react-syntax-highlighter": "^15.5.0", - "tailwind-merge": "^2.3.0", - "viem": "^2.45.0", - "wagmi": "^2.15.5", - "zod": "^3.0.0", - "zustand": "^5.0.0-rc.2" - }, - "devDependencies": { - "@playwright/test": "^1.50.1", - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "@types/react-syntax-highlighter": "^15.5.13", - "eslint": "^8", - "eslint-config-next": "14.2.3", - "postcss": "^8", - "tailwind-scrollbar": "^3.1.0", - "tailwindcss": "^3.4.1", - "tailwindcss-animate": "^1.0.7", - "typescript": "^5" - } -} diff --git a/examples/ui-demo/playwright.config.ts b/examples/ui-demo/playwright.config.ts deleted file mode 100644 index 8077e6fc4e..0000000000 --- a/examples/ui-demo/playwright.config.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { defineConfig, devices } from "@playwright/test"; - -import dotenv from "dotenv"; -import path from "path"; -dotenv.config({ path: path.resolve(__dirname, ".env") }); - -/** - * See https://playwright.dev/docs/test-configuration. - */ - -export default defineConfig({ - testDir: "./e2e", - /* Run tests in files in parallel */ - fullyParallel: true, - /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, - /* Retry on CI only */ - retries: process.env.CI ? 2 : 0, - /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: "html", - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: process.env.PLAYWRIGHT_BASE_URL, - - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: "on-first-retry", - }, - - /* Configure projects for major browsers */ - projects: [ - // { name: "setup", testMatch: /.*\.setup\.ts/ }, - { - name: "chromium", - use: { ...devices["Desktop Chrome"] }, - // dependencies: ["setup"], - }, - - // { - // name: "firefox", - // use: { ...devices["Desktop Firefox"] }, - // }, - - // { - // name: "webkit", - // use: { ...devices["Desktop Safari"] }, - // }, - - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, - // }, - // { - // name: 'Mobile Safari', - // use: { ...devices['iPhone 12'] }, - // }, - - /* Test against branded browsers. */ - // { - // name: 'Microsoft Edge', - // use: { ...devices['Desktop Edge'], channel: 'msedge' }, - // }, - // { - // name: 'Google Chrome', - // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, - // }, - ], - - /* Run your local dev server before starting the tests */ - // webServer: { - // command: 'npm run start', - // url: 'http://127.0.0.1:3000', - // reuseExistingServer: !process.env.CI, - // }, -}); - -// alchemy.test.rc@gmail.com -// TestTest diff --git a/examples/ui-demo/postcss.config.mjs b/examples/ui-demo/postcss.config.mjs deleted file mode 100644 index 1a69fd2a45..0000000000 --- a/examples/ui-demo/postcss.config.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/examples/ui-demo/public/images/account-kit-logo.png b/examples/ui-demo/public/images/account-kit-logo.png deleted file mode 100644 index e83c74c4db..0000000000 Binary files a/examples/ui-demo/public/images/account-kit-logo.png and /dev/null differ diff --git a/examples/ui-demo/public/images/bg-main.webp b/examples/ui-demo/public/images/bg-main.webp deleted file mode 100644 index 3b68428c9f..0000000000 Binary files a/examples/ui-demo/public/images/bg-main.webp and /dev/null differ diff --git a/examples/ui-demo/public/images/dataSecurityIcon.png b/examples/ui-demo/public/images/dataSecurityIcon.png deleted file mode 100644 index 48ff34490b..0000000000 Binary files a/examples/ui-demo/public/images/dataSecurityIcon.png and /dev/null differ diff --git a/examples/ui-demo/public/images/deposits-swaps.svg b/examples/ui-demo/public/images/deposits-swaps.svg deleted file mode 100644 index d27d73d5c1..0000000000 --- a/examples/ui-demo/public/images/deposits-swaps.svg +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/examples/ui-demo/public/images/discord.svg b/examples/ui-demo/public/images/discord.svg deleted file mode 100644 index 4cf91a8586..0000000000 --- a/examples/ui-demo/public/images/discord.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - \ No newline at end of file diff --git a/examples/ui-demo/public/images/duckImage.png b/examples/ui-demo/public/images/duckImage.png deleted file mode 100644 index ff170a6019..0000000000 Binary files a/examples/ui-demo/public/images/duckImage.png and /dev/null differ diff --git a/examples/ui-demo/public/images/gassless-transactions.svg b/examples/ui-demo/public/images/gassless-transactions.svg deleted file mode 100644 index a9fcf84de5..0000000000 --- a/examples/ui-demo/public/images/gassless-transactions.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/ui-demo/public/images/grid.png b/examples/ui-demo/public/images/grid.png deleted file mode 100644 index 4615fc7f41..0000000000 Binary files a/examples/ui-demo/public/images/grid.png and /dev/null differ diff --git a/examples/ui-demo/public/images/key.svg b/examples/ui-demo/public/images/key.svg deleted file mode 100644 index 28a995b63f..0000000000 --- a/examples/ui-demo/public/images/key.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/examples/ui-demo/public/images/message-signing.svg b/examples/ui-demo/public/images/message-signing.svg deleted file mode 100644 index 04a8af8ecf..0000000000 --- a/examples/ui-demo/public/images/message-signing.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/examples/ui-demo/public/images/multi-factor-auth.svg b/examples/ui-demo/public/images/multi-factor-auth.svg deleted file mode 100644 index 7302bad499..0000000000 --- a/examples/ui-demo/public/images/multi-factor-auth.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/examples/ui-demo/public/images/paper-airplane.svg b/examples/ui-demo/public/images/paper-airplane.svg deleted file mode 100644 index c5833fd375..0000000000 --- a/examples/ui-demo/public/images/paper-airplane.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - -
- - - - - - - - -
- - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/examples/ui-demo/public/images/pen.svg b/examples/ui-demo/public/images/pen.svg deleted file mode 100644 index cd4f9eda0f..0000000000 --- a/examples/ui-demo/public/images/pen.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/examples/ui-demo/public/images/piggy-bank.svg b/examples/ui-demo/public/images/piggy-bank.svg deleted file mode 100644 index b0cfff99cc..0000000000 --- a/examples/ui-demo/public/images/piggy-bank.svg +++ /dev/null @@ -1,129 +0,0 @@ - - -
- - - -
- - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/examples/ui-demo/public/images/smart-wallets.svg b/examples/ui-demo/public/images/smart-wallets.svg deleted file mode 100644 index ffb23b24f3..0000000000 --- a/examples/ui-demo/public/images/smart-wallets.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/examples/ui-demo/public/images/twitter-dark.svg b/examples/ui-demo/public/images/twitter-dark.svg deleted file mode 100644 index 7b105ab274..0000000000 --- a/examples/ui-demo/public/images/twitter-dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/examples/ui-demo/public/images/twitter.svg b/examples/ui-demo/public/images/twitter.svg deleted file mode 100644 index 28b3b32b32..0000000000 --- a/examples/ui-demo/public/images/twitter.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/examples/ui-demo/public/next.svg b/examples/ui-demo/public/next.svg deleted file mode 100644 index 5174b28c56..0000000000 --- a/examples/ui-demo/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples/ui-demo/public/vercel.svg b/examples/ui-demo/public/vercel.svg deleted file mode 100644 index d2f8422273..0000000000 --- a/examples/ui-demo/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/examples/ui-demo/public/videos/splash-demo.mov b/examples/ui-demo/public/videos/splash-demo.mov deleted file mode 100644 index a3758ef558..0000000000 Binary files a/examples/ui-demo/public/videos/splash-demo.mov and /dev/null differ diff --git a/examples/ui-demo/src/app/api/prices/route.ts b/examples/ui-demo/src/app/api/prices/route.ts deleted file mode 100644 index 81ff4f19db..0000000000 --- a/examples/ui-demo/src/app/api/prices/route.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { NextRequest, NextResponse } from "next/server"; -import { env } from "../../../../env.mjs"; - -export async function GET(request: NextRequest) { - try { - const { searchParams } = new URL(request.url); - const rawSymbols = searchParams.get("symbols") ?? ""; - - const symbols = rawSymbols - ? rawSymbols.split(",").map((s) => s.trim()) - : ["ETH"]; - - const alchemyBaseUrl = `https://api.g.alchemy.com/prices/v1/${env.API_KEY}/tokens/by-symbol`; - - const url = new URL(alchemyBaseUrl); - symbols.forEach((symbol) => url.searchParams.append("symbols", symbol)); - - const alchemyRes = await fetch(url.toString(), { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - }); - - if (!alchemyRes.ok) { - const errText = await alchemyRes.text(); - return NextResponse.json( - { error: `Alchemy API error: ${errText}` }, - { status: alchemyRes.status }, - ); - } - - const payload = await alchemyRes.json(); - return NextResponse.json(payload); - } catch (err) { - console.error("Error in token-price route:", err); - return NextResponse.json( - { error: "Internal Server Error" }, - { status: 500 }, - ); - } -} diff --git a/examples/ui-demo/src/app/api/rpc-base-sepolia/route.ts b/examples/ui-demo/src/app/api/rpc-base-sepolia/route.ts deleted file mode 100644 index 714837fc81..0000000000 --- a/examples/ui-demo/src/app/api/rpc-base-sepolia/route.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NextRequest, NextResponse } from "next/server"; - -import { env } from "../../../../env.mjs"; - -export async function POST(req: NextRequest) { - const body = await req.json(); - const headers: Record = {}; - - req.headers.forEach((value: string, key: string) => { - // don't pass the cookie because it doesn't get used downstream - if (key === "cookie") return; - - headers[key] = value; - }); - - const res = await fetch(env.ALCHEMY_RPC_URL_BASE_SEPOLIA, { - method: "POST", - headers: { - ...headers, - }, - body: JSON.stringify(body), - }); - - if (!res.ok) { - return NextResponse.json(await res.json().catch((e) => ({})), { - status: res.status, - }); - } - - return NextResponse.json(await res.json()); -} diff --git a/examples/ui-demo/src/app/api/rpc/[...routes]/route.ts b/examples/ui-demo/src/app/api/rpc/[...routes]/route.ts deleted file mode 100644 index e0d8a4d27e..0000000000 --- a/examples/ui-demo/src/app/api/rpc/[...routes]/route.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { NextResponse } from "next/server"; - -import { env } from "../../../../../env.mjs"; - -export async function POST( - req: Request, - { params }: { params: { routes: string[] } }, -) { - const body = await req.text(); - - const headers: Record = { - Authorization: `Bearer ${env.API_KEY}`, - }; - req.headers.forEach((value: string, key: string) => { - // don't pass the cookie because it doesn't get used downstream - if (key === "cookie") return; - - headers[key] = value; - }); - - const res = await fetch(env.ALCHEMY_API_URL + `/${params.routes.join("/")}`, { - method: "POST", - headers: { - ...headers, - }, - body, - }); - - if (!res.ok) { - return NextResponse.json(await res.json().catch((e) => ({})), { - status: res.status, - }); - } - - return NextResponse.json(await res.json()); -} diff --git a/examples/ui-demo/src/app/api/rpc/route.ts b/examples/ui-demo/src/app/api/rpc/route.ts deleted file mode 100644 index 38afe6507f..0000000000 --- a/examples/ui-demo/src/app/api/rpc/route.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NextRequest, NextResponse } from "next/server"; - -import { env } from "../../../../env.mjs"; - -export async function POST(req: NextRequest) { - const body = await req.json(); - const headers: Record = {}; - - req.headers.forEach((value: string, key: string) => { - // don't pass the cookie because it doesn't get used downstream - if (key === "cookie") return; - - headers[key] = value; - }); - - const res = await fetch(env.ALCHEMY_RPC_URL, { - method: "POST", - headers: { - ...headers, - }, - body: JSON.stringify(body), - }); - - if (!res.ok) { - return NextResponse.json(await res.json().catch((e) => ({})), { - status: res.status, - }); - } - - return NextResponse.json(await res.json()); -} diff --git a/examples/ui-demo/src/app/api/rpc/solana/route.ts b/examples/ui-demo/src/app/api/rpc/solana/route.ts deleted file mode 100644 index b2a5774ff6..0000000000 --- a/examples/ui-demo/src/app/api/rpc/solana/route.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NextRequest, NextResponse } from "next/server"; - -import { env } from "../../../../../env.mjs"; - -export async function POST(req: NextRequest) { - const body = await req.text(); - const headers: Record = {}; - req.headers.forEach((value: string, key: string) => { - // don't pass the cookie because it doesn't get used downstream - if (key === "cookie") return; - - headers[key] = value; - }); - - const rpcUrl = env.ALCHEMY_SOLANA_URL; - const res = await fetch(rpcUrl, { - method: "POST", - headers: { - ...headers, - }, - body, - }); - - if (!res.ok) { - return NextResponse.json(await res.json().catch((e) => ({})), { - status: res.status, - }); - } - - return NextResponse.json(await res.json()); -} diff --git a/examples/ui-demo/src/app/config.tsx b/examples/ui-demo/src/app/config.tsx deleted file mode 100644 index 93ed5b560c..0000000000 --- a/examples/ui-demo/src/app/config.tsx +++ /dev/null @@ -1,155 +0,0 @@ -import { AuthCardHeader } from "@/components/shared/AuthCardHeader"; -import { alchemy, arbitrumSepolia, baseSepolia } from "@account-kit/infra"; -import { - cookieStorage, - createConfig, - configForExternalWallets, -} from "@account-kit/react"; -import { AccountKitTheme } from "@account-kit/react/tailwind"; -import { type KnownAuthProvider } from "@account-kit/signer"; -import { Connection } from "@solana/web3.js"; -import { QueryClient } from "@tanstack/react-query"; - -export type Config = { - auth: { - showEmail: boolean; - showExternalWallets: boolean; - showPasskey: boolean; - addPasskey: boolean; - showOAuth: boolean; - oAuthMethods: Record< - KnownAuthProvider | "auth0" | "twitter" | "discord", - boolean - >; - }; - ui: { - theme: "light" | "dark"; - primaryColor: { - dark: string; - light: string; - }; - borderRadius: AccountKitTheme["borderRadius"]; - illustrationStyle: "outline" | "linear" | "filled" | "flat"; - logoLight: - | { - fileName: string; - fileSrc: string; - } - | undefined; - logoDark: - | { - fileName: string; - fileSrc: string; - } - | undefined; - }; - accountMode: AccountMode; - supportUrl?: string; -}; - -export type AccountMode = "default" | "7702"; - -export const externalWalletsConfig = configForExternalWallets({ - wallets: ["wallet_connect", "coinbase wallet"], - chainType: ["svm", "evm"], - walletConnectProjectId: "30e7ffaff99063e68cc9870c105d905b", - hideMoreButton: false, - numFeaturedWallets: 1, -}); - -export const DEFAULT_CONFIG: Config = { - auth: { - showEmail: true, - showExternalWallets: true, - showPasskey: true, - addPasskey: false, - showOAuth: true, - oAuthMethods: { - google: true, - facebook: true, - twitch: true, - auth0: false, - apple: false, - discord: true, - twitter: true, - // TO DO: extend for BYO auth provider - }, - }, - ui: { - theme: "light", - primaryColor: { - light: "#363FF9", - dark: "#363FF9", - }, - borderRadius: "sm", - illustrationStyle: "outline", - logoLight: undefined, - logoDark: undefined, - }, - accountMode: "default", -}; - -export const queryClient = new QueryClient(); -const solanaConnection = new Connection( - `${ - (global || window)?.location?.origin || "http://localhost:3000" - }/api/rpc/solana`, - { - wsEndpoint: "wss://api.devnet.solana.com", - commitment: "confirmed", - }, -); - -export const alchemyConfig = () => { - return createConfig( - { - transport: alchemy({ rpcUrl: "/api/rpc" }), - chain: arbitrumSepolia, - policyId: process.env.NEXT_PUBLIC_PAYMASTER_POLICY_ID, - chains: [ - { - chain: arbitrumSepolia, - transport: alchemy({ rpcUrl: "/api/rpc" }), - }, - { - chain: baseSepolia, - transport: alchemy({ rpcUrl: "/api/rpc-base-sepolia" }), - }, - ], - ssr: true, - connectors: - typeof window === "undefined" - ? undefined - : externalWalletsConfig.connectors, - storage: cookieStorage, - enablePopupOauth: true, - solana: { - connection: solanaConnection, - policyId: process.env.NEXT_PUBLIC_SOLANA_POLICY_ID, - adapters: externalWalletsConfig.adapters, - }, - }, - { - illustrationStyle: DEFAULT_CONFIG.ui.illustrationStyle, - auth: { - sections: [ - [{ type: "email" }], - [ - { type: "passkey" }, - { type: "social", authProviderId: "google", mode: "popup" }, - { type: "social", authProviderId: "facebook", mode: "popup" }, - ], - ], - addPasskeyOnSignup: DEFAULT_CONFIG.auth.addPasskey, - header: ( - - ), - }, - uiMode: "embedded", - }, - ); -}; diff --git a/examples/ui-demo/src/app/favicon.ico b/examples/ui-demo/src/app/favicon.ico deleted file mode 100644 index a09ed7e440..0000000000 Binary files a/examples/ui-demo/src/app/favicon.ico and /dev/null differ diff --git a/examples/ui-demo/src/app/globals.css b/examples/ui-demo/src/app/globals.css deleted file mode 100644 index 873b3dfd30..0000000000 --- a/examples/ui-demo/src/app/globals.css +++ /dev/null @@ -1,143 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - :root { - --background: 0 0% 100%; - --foreground: #020617; - - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; - - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; - - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - - --secondary: 215 19% 35%; - --secondary-foreground: 215 19% 35%; - - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 210 40% 98%; - - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - --ring: 222.2 84% 4.9%; - - --radius: 0.5rem; - - --akui-fg-accent-brand: #363ff9; - --akui-btn-primary: #363ff9; - --akui-illustration-style: linear; - } -} - -@layer base { - /** - * For the color picker, see: https://uiwjs.github.io/react-color - */ - - [data-color-mode*="dark"] .w-color-sketch { - --sketch-background: #323232 !important; - } - - [data-color-mode*="dark"] .w-color-swatch { - --sketch-swatch-border-top: 1px solid #525252 !important; - } - - [data-color-mode*="dark"] .w-color-block { - --block-background-color: #323232 !important; - --block-box-shadow: rgb(0 0 0 / 10%) 0 1px !important; - } - - [data-color-mode*="dark"] .w-color-editable-input { - --editable-input-label-color: #757575 !important; - --editable-input-box-shadow: #616161 0px 0px 0px 1px inset !important; - --editable-input-color: #bbb !important; - } - - [data-color-mode*="dark"] .w-color-github { - --github-border: 1px solid rgba(0, 0, 0, 0.2) !important; - --github-background-color: #323232 !important; - --github-box-shadow: rgb(0 0 0 / 15%) 0px 3px 12px !important; - --github-arrow-border-color: rgba(0, 0, 0, 0.15) !important; - } - - [data-color-mode*="dark"] .w-color-compact { - --compact-background-color: #323232 !important; - } - - [data-color-mode*="dark"] .w-color-material { - --material-background-color: #323232 !important; - --material-border-bottom-color: #707070 !important; - } - - [data-color-mode*="dark"] .w-color-alpha { - --alpha-pointer-background-color: #6a6a6a !important; - --alpha-pointer-box-shadow: rgb(0 0 0 / 37%) 0px 1px 4px 0px !important; - } -} - -/* Radix Toast Animations - Desktop (horizontal slide) */ -@keyframes slideInToast { - from { - transform: translateX(100%); - opacity: 0; - } - to { - transform: translateX(0%); - opacity: 1; - } -} - -@keyframes hideToast { - from { - transform: translateX(0%); - opacity: 1; - } - to { - transform: translateX(100%); - opacity: 0; - } -} - -/* Mobile animations (vertical slide) */ -@media (max-width: 1024px) { - @keyframes slideInToast { - from { - transform: translateY(100%); - opacity: 0; - } - to { - transform: translateY(0%); - opacity: 1; - } - } - - @keyframes hideToast { - from { - transform: translateY(0%); - opacity: 1; - } - to { - transform: translateY(100%); - opacity: 0; - } - } -} - -#toast[data-state="open"] { - animation: slideInToast 200ms cubic-bezier(0.16, 1, 0.3, 1); -} - -#toast[data-state="closed"] { - animation: hideToast 100ms ease-in forwards; -} diff --git a/examples/ui-demo/src/app/layout.tsx b/examples/ui-demo/src/app/layout.tsx deleted file mode 100644 index 2584210685..0000000000 --- a/examples/ui-demo/src/app/layout.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import GoogleAnalytics from "@/components/shared/GoogleAnalytics"; -import { - cookieToInitialConfig, - generateClassesForRoot, - generateStylesForRoot, -} from "@/state/store"; -import { cookieToInitialState } from "@account-kit/core"; -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; -import { headers } from "next/headers"; -import { alchemyConfig } from "./config"; -import "./globals.css"; -import { Providers } from "./providers"; -import { HeapAnalytics } from "@/components/shared/HeapAnalytics"; - -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - title: "Smart Wallets Demo", - description: "Protected by Alchemy", -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - const initialState = cookieToInitialState( - alchemyConfig(), - headers().get("cookie") ?? undefined, - ); - - const initialConfig = cookieToInitialConfig(headers().get("cookie")); - - const classes = initialConfig - ? generateClassesForRoot(initialConfig) - : ["light"]; - const styles = initialConfig ? generateStylesForRoot(initialConfig) : []; - - return ( - - - - - - - - {children} - - - - ); -} diff --git a/examples/ui-demo/src/app/page.tsx b/examples/ui-demo/src/app/page.tsx deleted file mode 100644 index 891c2f5d3f..0000000000 --- a/examples/ui-demo/src/app/page.tsx +++ /dev/null @@ -1,58 +0,0 @@ -"use client"; - -import { ConfigurationSidebarWrapper } from "@/components/configuration/ConfigurationSidebarWrapper"; -import { Inter, Public_Sans } from "next/font/google"; -import { useState } from "react"; -import { TopNav } from "../components/topnav/TopNav"; -import { PreviewNav } from "@/components/preview/PreviewNav"; -import { PreviewWrapper } from "@/components/preview/PreviewWrapper"; -import { cn } from "@/lib/utils"; -import { useTheme } from "@/state/useTheme"; -import { useUser } from "@account-kit/react"; -import { Viewport } from "@radix-ui/react-toast"; -const publicSans = Public_Sans({ - subsets: ["latin"], - display: "swap", -}); - -const inter = Inter({ - subsets: ["latin"], - display: "swap", -}); - -export default function Home() { - const [showCode, setShowCode] = useState(false); - const theme = useTheme(); - const user = useUser(); - return ( -
- -
-
- -
- - - {/* Toast viewport */} - -
-
-
-
- ); -} diff --git a/examples/ui-demo/src/app/providers.tsx b/examples/ui-demo/src/app/providers.tsx deleted file mode 100644 index 74ea104e0b..0000000000 --- a/examples/ui-demo/src/app/providers.tsx +++ /dev/null @@ -1,55 +0,0 @@ -"use client"; - -import { ToastProvider } from "@/contexts/ToastProvider"; -import { convertDemoConfigToUiConfig } from "@/state/store"; -import { AlchemyClientState } from "@account-kit/core"; -import { - AlchemyAccountProvider, - AlchemyAccountsConfigWithUI, -} from "@account-kit/react"; -import { QueryClientProvider } from "@tanstack/react-query"; -import { PropsWithChildren, Suspense, useRef } from "react"; -import { ConfigContextProvider, ConfigSync } from "../state"; -import { alchemyConfig, Config, queryClient } from "./config"; - -export const Providers = ( - props: PropsWithChildren<{ - initialState?: AlchemyClientState; - initialConfig?: Config; - }>, -) => { - const configRef = useRef(); - - if (!configRef.current) { - configRef.current = (() => { - const innerConfig = alchemyConfig(); - return { - ...innerConfig, - ui: props.initialConfig - ? convertDemoConfigToUiConfig(props.initialConfig) - : innerConfig.ui, - }; - })(); - } - return ( - - - - - - - {props.children} - - - - - - ); -}; diff --git a/examples/ui-demo/src/app/sections.ts b/examples/ui-demo/src/app/sections.ts deleted file mode 100644 index a5d061062f..0000000000 --- a/examples/ui-demo/src/app/sections.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { AuthType } from "@account-kit/react"; -import { KnownAuthProvider } from "@account-kit/signer"; -import { Config, externalWalletsConfig } from "./config"; - -const isTesting = process.env.NEXT_PUBLIC_APP_ENV === "test"; -const auth0TestingConnection = process.env.NEXT_PUBLIC_AUTH0_TESTING_CONNECTION; -const SocialAuth0Providers = ["twitter", "discord"]; - -export function getSectionsForConfig( - config: Config, - walletConnectProjectId: string, -): AuthType[][] { - const { - showEmail, - showPasskey, - showOAuth, - oAuthMethods, - showExternalWallets, - } = config.auth; - const sections: AuthType[][] = []; - const midSection: AuthType[] = []; - if (showEmail) { - sections.push([{ type: "email" }]); - } - if (showPasskey) { - midSection.push({ type: "passkey" }); - } - if (showOAuth) { - for (const [method, enabled] of Object.entries(oAuthMethods)) { - if (enabled && SocialAuth0Providers.includes(method)) { - switch (method) { - case "twitter": - midSection.push({ - type: "social", - authProviderId: "auth0", - mode: "popup", - auth0Connection: "twitter", - displayName: "Twitter", - logoUrl: "/images/twitter.svg", - logoUrlDark: "/images/twitter-dark.svg", - scope: "openid profile", - }); - - break; - case "discord": - midSection.push({ - type: "social", - authProviderId: "auth0", - mode: "popup", - auth0Connection: "discord", - displayName: "Discord", - logoUrl: "/images/discord.svg", - scope: "openid profile", - }); - - break; - } - } else if (enabled) { - midSection.push({ - type: "social", - authProviderId: method as KnownAuthProvider, // TODO: extend for BYO auth provider - mode: "popup", - }); - } - } - } - if (midSection.length > 0) { - sections.push(midSection); - } - if (showExternalWallets) { - sections.push([ - { - type: "external_wallets", - ...externalWalletsConfig.uiConfig, - }, - ]); - } - if (isTesting && auth0TestingConnection) { - midSection.push({ - type: "social", - authProviderId: "auth0", - mode: "popup", - auth0Connection: auth0TestingConnection, - displayName: "Test", - // Re-using twitter logo for testing, will not be seen in production - logoUrl: "/images/key.svg", - logoUrlDark: "/images/key.svg", - scope: "openid profile", - }); - } - return sections; -} diff --git a/examples/ui-demo/src/components/configuration/Authentication.tsx b/examples/ui-demo/src/components/configuration/Authentication.tsx deleted file mode 100644 index b528d8760e..0000000000 --- a/examples/ui-demo/src/components/configuration/Authentication.tsx +++ /dev/null @@ -1,409 +0,0 @@ -import { cn } from "@/lib/utils"; -import { Metrics } from "@/metrics"; -import { useConfigStore } from "@/state"; -import { BiometricIcon } from "../icons/biometric"; -import { ExternalLinkIcon } from "../icons/external-link"; -import { FacebookIcon } from "../icons/facebook"; -import { GoogleIcon } from "../icons/google"; -import { DiscordLogo } from "../icons/discord"; -import { LockIcon } from "../icons/lock"; -import { MailIcon } from "../icons/mail"; -import { PhoneIcon } from "../icons/phone"; -import { SocialIcon } from "../icons/social"; -import { TwitterIcon } from "../icons/twitter"; -import { WalletIcon } from "../icons/wallet"; -import ExternalLink from "../shared/ExternalLink"; -import { Switch } from "../ui/switch"; -import { links } from "@/utils/links"; -import { TwitchIcon } from "../icons/twitch"; - -export const Authentication = ({ className }: { className?: string }) => { - const { auth, setAuth } = useConfigStore(({ auth, setAuth }) => ({ - auth, - setAuth, - })); - const setEmailAuth = (active: boolean) => { - setAuth({ showEmail: active }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { auth_type: "email", enabled: active }, - }); - }; - - const setPasskeysActive = (active: boolean) => { - setAuth({ showPasskey: active }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { auth_type: "passkeys", enabled: active }, - }); - }; - - const setAddPasskeyOnSignup = (active: boolean) => { - setAuth({ - addPasskey: active, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { auth_type: "add_passkey_on_signup", enabled: active }, - }); - }; - - const setWalletsActive = (active: boolean) => { - setAuth({ - showExternalWallets: active, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { auth_type: "external_wallets", enabled: active }, - }); - }; - - const setOAuthActive = (active: boolean) => { - setAuth({ - showOAuth: active, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { auth_type: "oauth", enabled: active }, - }); - }; - - const setAddGoogleAuth = () => { - setAuth({ - oAuthMethods: { - ...auth.oAuthMethods, - google: !auth.oAuthMethods.google, - }, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { auth_type: "oauth_google", enabled: !auth.oAuthMethods.google }, - }); - }; - - const setAddFacebookAuth = () => { - setAuth({ - oAuthMethods: { - ...auth.oAuthMethods, - facebook: !auth.oAuthMethods.facebook, - }, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { - auth_type: "oauth_facebook", - enabled: !auth.oAuthMethods.facebook, - }, - }); - }; - - const setAddDiscordAuth = () => { - setAuth({ - oAuthMethods: { - ...auth.oAuthMethods, - discord: !auth.oAuthMethods.discord, - }, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { - auth_type: "oauth_discord", - enabled: !auth.oAuthMethods.discord, - }, - }); - }; - - const setAddTwitterAuth = () => { - setAuth({ - oAuthMethods: { - ...auth.oAuthMethods, - twitter: !auth.oAuthMethods.twitter, - }, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { - auth_type: "oauth_twitter", - enabled: !auth.oAuthMethods.twitter, - }, - }); - }; - - const setAddTwitchAuth = () => { - setAuth({ - oAuthMethods: { - ...auth.oAuthMethods, - twitch: !auth.oAuthMethods.twitch, - }, - }); - Metrics.trackEvent({ - name: "authentication_toggled", - data: { - auth_type: "oauth_twitch", - enabled: !auth.oAuthMethods.twitch, - }, - }); - }; - - return ( -
-
- - Authentication -
-
-

Login

-
- } - name="Email" - active={auth.showEmail} - setActive={setEmailAuth} - /> - } - name="SMS" - active={false} - nameClassName="opacity-100" - unavailable={ - { - Metrics.trackEvent({ - name: "clicked_sms_early_access", - }); - }} - className="flex items-center gap-2" - > -
- - Early access - -
- -
- } - /> - } - name="Social" - iconClassName="mt-[2px] self-start" - details={ -
-
- } - onClick={setAddGoogleAuth} - name="Google" - /> - } - onClick={setAddFacebookAuth} - name="Facebook" - /> - } - onClick={setAddDiscordAuth} - name="Discord" - /> - } - onClick={setAddTwitterAuth} - name="Twitter" - /> - } - onClick={setAddTwitchAuth} - name="Twitch" - /> -
-
- { - Metrics.trackEvent({ - name: "clicked_custom_oauth_link", - }); - }} - className="akui-btn rounded-lg border border-border active:bg-demo-surface-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background transition-none w-full" - > -

- Custom -

- -
-
-
- } - active={auth.showOAuth} - setActive={setOAuthActive} - /> - } - iconClassName="mt-[2px] self-start" - name="Passkeys" - details={ - <> -
-

- Add passkey after sign up -

- -

- Add passkey after sign up -

- -
- -
- - } - active={auth.showPasskey} - setActive={setPasskeysActive} - /> -
-
- -
-

Connect

- } - name="External wallets" - active={auth.showExternalWallets} - setActive={setWalletsActive} - /> -
-
- ); -}; - -const AuthMethod = ({ - icon, - name, - details = null, - active = false, - disabled = false, - unavailable = false, - setActive, - className, - callout, - iconClassName, - nameClassName, -}: { - icon: React.ReactNode; - name: string; - details?: React.ReactNode; - active?: boolean; - disabled?: boolean; - unavailable?: React.ReactNode | boolean; - setActive?: (active: boolean) => void; - className?: string; - callout?: React.ReactNode; - iconClassName?: string; - nameClassName?: string; -}) => { - return ( -
-
-
{icon}
-
-
- - {!unavailable && ( - - )} -
- {details} -
- - {unavailable && ( - <> - {typeof unavailable === "boolean" ? ( -
-

Soon

-
- ) : ( - unavailable - )} - - )} -
- {callout} -
- ); -}; - -const OAuthMethod = ({ - icon, - onClick, - active, - name, -}: { - icon: React.ReactNode; - onClick: () => void; - className?: string; - active: boolean; - name: string; -}) => { - return ( - - ); -}; diff --git a/examples/ui-demo/src/components/configuration/ColorPicker.tsx b/examples/ui-demo/src/components/configuration/ColorPicker.tsx deleted file mode 100644 index 44b2fb766b..0000000000 --- a/examples/ui-demo/src/components/configuration/ColorPicker.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { - Popover, - PopoverContent, - PopoverTrigger, -} from "@/components/ui/popover"; -import { cn } from "@/lib/utils"; -import { Metrics } from "@/metrics"; -import { useConfigStore } from "@/state"; -import { useDebounceEffect } from "@/utils/hooks/useDebounceEffect"; -import { Sketch } from "@uiw/react-color"; -import { useLayoutEffect, useState } from "react"; - -export function ColorPicker({ theme }: { theme: "dark" | "light" }) { - const { primaryColor, setPrimaryColor } = useConfigStore( - ({ ui: { primaryColor }, setPrimaryColor }) => ({ - primaryColor, - setPrimaryColor, - }), - ); - - const [innerColor, setInnerColor] = useState(primaryColor[theme]); - - const onSetThemeColor = (color: string) => { - setPrimaryColor(theme, color); - Metrics.trackEvent({ - name: "branding_color_changed", - data: { theme }, - }); - }; - - useLayoutEffect(() => { - setInnerColor(primaryColor[theme]); - }, [primaryColor, theme]); - - useDebounceEffect( - () => { - onSetThemeColor(innerColor); - }, - [innerColor], - 250, - ); - - return ( - - -
-
{innerColor}
- - - { - setInnerColor(color.hex); - }} - /> - - - ); -} diff --git a/examples/ui-demo/src/components/configuration/Configuration.tsx b/examples/ui-demo/src/components/configuration/Configuration.tsx deleted file mode 100644 index ce4cb887c7..0000000000 --- a/examples/ui-demo/src/components/configuration/Configuration.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { cn } from "@/lib/utils"; - -import { SettingsIcon } from "../icons/settings"; -import { WalletTypeSwitch } from "../shared/WalletTypeSwitch"; -import ExternalLink from "../shared/ExternalLink"; -import { useConfigStore } from "@/state"; -import { - useAccount, - useChain, - useSmartAccountClient, - useUser, -} from "@account-kit/react"; -import { arbitrumSepolia, baseSepolia } from "@account-kit/infra"; -import { useEffect, useMemo } from "react"; -import { AccountMode } from "@/app/config"; -import { Chain } from "viem"; - -const chainForAccountMode: Record = { - default: arbitrumSepolia, - "7702": baseSepolia, -}; - -export const Configuration = ({ className }: { className?: string }) => { - const { setAccountMode, accountMode } = useConfigStore(); - const { chain, setChain } = useChain(); - const clientParams = useMemo( - () => ({ - type: "ModularAccountV2" as const, - accountParams: { - mode: accountMode, - }, - }), - [accountMode], - ); - const { isLoadingAccount } = useAccount(clientParams); - const { isLoadingClient } = useSmartAccountClient(clientParams); - const user = useUser(); - - const onSwitchWalletType = () => { - const newMode = accountMode === "default" ? "7702" : "default"; - setAccountMode(newMode); - }; - - // This must be in an effect so that it works correctly based on initial - // state (i.e. after refreshing page if 7702 is already active). - useEffect(() => { - if (chain.id === chainForAccountMode[accountMode].id) return; - setChain({ - chain: chainForAccountMode[accountMode], - }); - }, [accountMode, chain.id, setChain]); - - return ( -
-
- - Configuration -
-
- - {/* */} -
- -

- EIP-7702 adds smart account features to an EOA wallet.{" "} - - Learn more. - -

-
-
- ); -}; diff --git a/examples/ui-demo/src/components/configuration/ConfigurationSidebarWrapper.tsx b/examples/ui-demo/src/components/configuration/ConfigurationSidebarWrapper.tsx deleted file mode 100644 index 39426f70dc..0000000000 --- a/examples/ui-demo/src/components/configuration/ConfigurationSidebarWrapper.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; -import { Authentication } from "./Authentication"; -import { Styling } from "./Styling"; -import { Configuration } from "./Configuration"; - -export function ConfigurationSidebarWrapper() { - return ( -
- - - -
- ); -} diff --git a/examples/ui-demo/src/components/configuration/CornerRadiusOptions.tsx b/examples/ui-demo/src/components/configuration/CornerRadiusOptions.tsx deleted file mode 100644 index 82a5b1102c..0000000000 --- a/examples/ui-demo/src/components/configuration/CornerRadiusOptions.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import { ChevronDown } from "@/components/icons/chevron-down"; -import { - SelectMenu, - SelectMenuContent, - SelectMenuItem, - SelectMenuTrigger, - SelectMenuViewport, -} from "@/components/ui/select-menu"; -import { cn } from "@/lib/utils"; -import { Metrics } from "@/metrics"; -import { useConfigStore } from "@/state"; -import { getBorderRadiusValue } from "@account-kit/react/tailwind"; -import { useState } from "react"; - -const RADIUS_OPTIONS = [ - { label: "None", id: "none" as const }, - { label: "Small", id: "sm" as const }, - { label: "Medium", id: "md" as const }, - { label: "Large", id: "lg" as const }, -]; - -function useBorderRadius() { - return useConfigStore( - ({ ui: { borderRadius, primaryColor, theme }, setBorderRadius }) => ({ - setBorderRadius, - theme, - primaryColor, - borderRadius, - }), - ); -} - -export function CornerRadiusOptions() { - const { borderRadius, setBorderRadius } = useBorderRadius(); - - return ( - <> -
- {RADIUS_OPTIONS.map((option) => ( - - ))} -
-
- -
- - ); -} - -function CornerRadiusSelectMenu() { - const { borderRadius, primaryColor, theme, setBorderRadius } = - useBorderRadius(); - - type BorderRadius = typeof borderRadius; - const [selected, setSelected] = useState(borderRadius); - const [menuOpen, setMenuOpen] = useState(false); - - const onChange = (borderRadius: BorderRadius) => { - setSelected(borderRadius); - - setBorderRadius(borderRadius); - }; - - const getRadiusLabel = (borderRadius: BorderRadius) => { - return ( - RADIUS_OPTIONS.find((option) => option.id === borderRadius)?.label || - "None" - ); - }; - - return ( - - - - {getRadiusLabel(selected)} - -
- -
-
- - - {RADIUS_OPTIONS.map((option) => ( - - {option.label} - - ))} - - -
- ); -} diff --git a/examples/ui-demo/src/components/configuration/IllustrationStyleOptions.tsx b/examples/ui-demo/src/components/configuration/IllustrationStyleOptions.tsx deleted file mode 100644 index eb42b38372..0000000000 --- a/examples/ui-demo/src/components/configuration/IllustrationStyleOptions.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import { ChevronDown } from "@/components/icons/chevron-down"; -import { IllustrationStyle } from "@/components/icons/illustration-style"; -import { - SelectMenu, - SelectMenuContent, - SelectMenuItem, - SelectMenuTrigger, - SelectMenuViewport, -} from "@/components/ui/select-menu"; -import { cn } from "@/lib/utils"; -import { Metrics } from "@/metrics"; -import { useConfigStore } from "@/state"; -import { useState } from "react"; - -const ILLUSTRATION_STYLE_OPTIONS = [ - { label: "Outline", id: "outline" as const }, - { label: "Linear", id: "linear" as const }, - { label: "Filled", id: "filled" as const }, - { label: "Flat", id: "flat" as const }, -]; - -const options = ["outline", "linear", "filled", "flat"] as const; - -export function IllustrationStyleOptions() { - const { illustrationStyle, setIllustrationStyle } = useConfigStore( - ({ ui: { illustrationStyle }, setIllustrationStyle }) => ({ - illustrationStyle, - setIllustrationStyle, - }), - ); - - return ( - <> -
- {options.map((value) => ( - - ))} -
-
- -
- - ); -} - -const IllustrationStyleSelectMenu = () => { - const { illustrationStyle, setIllustrationStyle } = useConfigStore( - ({ ui: { illustrationStyle, primaryColor }, setIllustrationStyle }) => ({ - illustrationStyle, - setIllustrationStyle, - primaryColor, - }), - ); - - type IllustrationStyle = typeof illustrationStyle; - const [selected, setSelected] = - useState(illustrationStyle); - const [menuOpen, setMenuOpen] = useState(false); - - const onChange = (style: IllustrationStyle) => { - setSelected(style); - - setIllustrationStyle(style); - }; - - const getIllustrationStyleValue = (style: IllustrationStyle) => { - return ( - ILLUSTRATION_STYLE_OPTIONS.find((option) => option.id === style)?.label || - "None" - ); - }; - - return ( - - - - {getIllustrationStyleValue(selected)} - -
- -
-
- - - {options.map((option) => ( - - {getIllustrationStyleValue(option)} - - ))} - - -
- ); -}; diff --git a/examples/ui-demo/src/components/configuration/PhotoUpload.tsx b/examples/ui-demo/src/components/configuration/PhotoUpload.tsx deleted file mode 100644 index a78dadc5f4..0000000000 --- a/examples/ui-demo/src/components/configuration/PhotoUpload.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { cn } from "@/lib/utils"; -import { Metrics } from "@/metrics"; -import { useConfigStore } from "@/state"; -import { ChangeEvent } from "react"; -import { PhotoIcon } from "../icons/photo"; -import FileUploadInput from "../shared/FileUploadInput"; - -const sidebarButton = `self-start border rounded-lg py-2 px-[10px] gap-2 flex items-center justify-between hover:opacity-80 w-28 h-10 border-gray-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`; - -export function PhotoUploads({ mode }: { mode: "dark" | "light" }) { - const { logo, setLogo } = useConfigStore(({ ui, setLogo }) => { - return { - logo: ui[mode === "dark" ? "logoDark" : "logoLight"], - setLogo, - }; - }); - - const onUpload = (e: ChangeEvent) => { - if (!e.target.files || e.target.files.length < 1) return; - - const file = e.target.files[0]; - setLogo(mode === "dark" ? "logoDark" : "logoLight", { - fileName: file.name, - fileSrc: URL.createObjectURL(file), - }); - Metrics.trackEvent({ - name: "branding_logo_changed", - }); - }; - - const onRemove = () => { - if (!logo?.fileSrc) return; - - setLogo(mode === "dark" ? "logoDark" : "logoLight", undefined); - URL.revokeObjectURL(logo.fileSrc); - }; - - return ( - <> - {logo ? ( - - ) : ( - - - Upload - - )} - - ); -} diff --git a/examples/ui-demo/src/components/configuration/Styling.tsx b/examples/ui-demo/src/components/configuration/Styling.tsx deleted file mode 100644 index 3576e9184f..0000000000 --- a/examples/ui-demo/src/components/configuration/Styling.tsx +++ /dev/null @@ -1,148 +0,0 @@ -import { cn } from "@/lib/utils"; -import { useConfigStore } from "@/state"; -import { PaletteIcon } from "../icons/palette"; -import { SparkleIcon } from "../icons/sparkle"; -import ExternalLink from "../shared/ExternalLink"; -import { HelpTooltip } from "../shared/HelpTooltip"; -import { ThemeSwitch } from "../shared/ThemeSwitch"; -import { ColorPicker } from "./ColorPicker"; -import { PhotoUploads } from "./PhotoUpload"; - -import { Metrics } from "@/metrics"; -import { CornerRadiusOptions } from "./CornerRadiusOptions"; -import { IllustrationStyleOptions } from "./IllustrationStyleOptions"; - -export function Styling({ className }: { className?: string }) { - const { logo, setSupportUrl, setTheme, supportUrl, theme } = useConfigStore( - ({ supportUrl, ui, setTheme, setSupportUrl }) => { - return { - logo: ui.theme === "dark" ? ui.logoDark : ui.logoLight, - supportUrl, - theme: ui.theme, - setTheme, - setSupportUrl, - }; - }, - ); - - const onSwitchTheme = (isDarkMode: boolean) => { - setTheme(isDarkMode ? "dark" : "light"); - }; - - return ( -
-
-
- - Branding -
-
-
-
- - -
-
- - -
-
-
- -

- {logo?.fileName ? ( - - {logo.fileName} - - ) : ( - "SVG or PNG, max 320x48 px" - )} -

-
- -
-
- -
-

- Corner radius -

- -
-
-
-

- Illustration Style -

- -
- - -
-
- - setSupportUrl(e.target.value)} - onBlur={(e) => { - setSupportUrl(e.target.value); - Metrics.trackEvent({ name: "branding_support_url_added" }); - }} - className="w-full border border-border rounded-lg px-[10px] py-[14px] h-10 text-sm" - placeholder="website, telegram, or email" - /> -
- -
- ); -} - -function LearnMore() { - return ( -
- -
- Customize every pixel with{" "} - - Metrics.trackEvent({ - name: "customize_css_clicked", - }) - } - href="https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/tailwind/types.ts#L6" - > - CSS - {" "} - overrides -
-
- ); -} diff --git a/examples/ui-demo/src/components/eoa-post-login/EOAPostLogin.tsx b/examples/ui-demo/src/components/eoa-post-login/EOAPostLogin.tsx deleted file mode 100644 index b396a539a2..0000000000 --- a/examples/ui-demo/src/components/eoa-post-login/EOAPostLogin.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { - EOAPostLoginContents, - EOAPostLoginActions, -} from "./EOAPostLoginContents"; - -export function EOAPostLogin() { - return ( -
-
- -
- -
-
-
- -
-
- ); -} diff --git a/examples/ui-demo/src/components/eoa-post-login/EOAPostLoginContents.tsx b/examples/ui-demo/src/components/eoa-post-login/EOAPostLoginContents.tsx deleted file mode 100644 index 00ddd56da2..0000000000 --- a/examples/ui-demo/src/components/eoa-post-login/EOAPostLoginContents.tsx +++ /dev/null @@ -1,143 +0,0 @@ -import { useLogout } from "@account-kit/react"; -import { CheckIcon } from "../icons/check"; -import { GasIcon } from "../icons/gas"; -import { UserIcon } from "../icons/user"; -import { WalletIcon } from "../icons/wallet"; - -export const EOAPostLoginActions = () => { - const { logout } = useLogout(); - return ( -
-

- - Want to experience{" "} - - gasless checkout? - - -
- Login with an email instead -

-
- - - View docs - -
-
- ); -}; - -export const EOAPostLoginContents = () => { - return ( -
-
- -

{`You're connected!`}

-
-
- -

- Reliable wallet connectors make it easy for you to connect all - of your existing web3 users -

-

- Reliable wallet connectors make it easy to connect your existing - users -

- - } - /> - -

- Embedded wallets with email, social, and passkey local to bring - mainstream users onchain -

-

- Embedded wallets with email, social, and passkey to bring users - onchain -

- - } - /> - -

- Gasless transactions available now for embedded wallets and - coming soon to EOAs -

-

- Gasless transactions available now for embedded wallets and - coming soon to EOAs -

- - } - /> -
-
- ); -}; - -type IconType = "connect" | "onboard" | "sponsor"; - -const Capabilities = ({ - icon, - title, - description, -}: { - icon: IconType; - title: string; - description: string | JSX.Element; -}) => { - return ( -
- {getPropIcon(icon)} -
-

{title}

-
- {description} -
-
-
- ); -}; - -const getPropIcon = (icon: IconType) => { - switch (icon) { - case "connect": - return ; - case "onboard": - return ; - case "sponsor": - return ; - } -}; diff --git a/examples/ui-demo/src/components/icons/BackArrow.tsx b/examples/ui-demo/src/components/icons/BackArrow.tsx deleted file mode 100644 index a6134a9407..0000000000 --- a/examples/ui-demo/src/components/icons/BackArrow.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { SVGProps } from "react"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const BackArrow = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/alchemy-logo-small.tsx b/examples/ui-demo/src/components/icons/alchemy-logo-small.tsx deleted file mode 100644 index e54afff389..0000000000 --- a/examples/ui-demo/src/components/icons/alchemy-logo-small.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { JSX, SVGProps } from "react"; - -export const AlchemyLogoSmall = ({ - fill = "#363FF9", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); diff --git a/examples/ui-demo/src/components/icons/alchemy-two-tone.tsx b/examples/ui-demo/src/components/icons/alchemy-two-tone.tsx deleted file mode 100644 index 5de7e6124f..0000000000 --- a/examples/ui-demo/src/components/icons/alchemy-two-tone.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { JSX, SVGProps } from "react"; - -export const AlchemyTwoToneLogo = ({ - fill, - textColor, - logoColor, - ...props -}: JSX.IntrinsicAttributes & - SVGProps & { - textColor?: string; - logoColor?: string; - }) => ( - - - - - - - - - - - - -); diff --git a/examples/ui-demo/src/components/icons/alchemy.tsx b/examples/ui-demo/src/components/icons/alchemy.tsx deleted file mode 100644 index 38935293e2..0000000000 --- a/examples/ui-demo/src/components/icons/alchemy.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { JSX, SVGProps } from "react"; - -export const AlchemyLogo = ({ - fill, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/app-store.tsx b/examples/ui-demo/src/components/icons/app-store.tsx deleted file mode 100644 index c84e419cf8..0000000000 --- a/examples/ui-demo/src/components/icons/app-store.tsx +++ /dev/null @@ -1,30 +0,0 @@ -export const AppStore = () => { - return ( - - - - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/arrow.tsx b/examples/ui-demo/src/components/icons/arrow.tsx deleted file mode 100644 index 21069dc058..0000000000 --- a/examples/ui-demo/src/components/icons/arrow.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { SVGProps } from "react"; - -export const ArrowUpRightIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/biometric.tsx b/examples/ui-demo/src/components/icons/biometric.tsx deleted file mode 100644 index adad225cf3..0000000000 --- a/examples/ui-demo/src/components/icons/biometric.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { SVGProps } from "react"; - -export const BiometricIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); diff --git a/examples/ui-demo/src/components/icons/check-circle-filled.tsx b/examples/ui-demo/src/components/icons/check-circle-filled.tsx deleted file mode 100644 index 70529b4873..0000000000 --- a/examples/ui-demo/src/components/icons/check-circle-filled.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { SVGProps } from "react"; - -export const CheckCircleFilledIcon = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/check.tsx b/examples/ui-demo/src/components/icons/check.tsx deleted file mode 100644 index ff5f41d1d3..0000000000 --- a/examples/ui-demo/src/components/icons/check.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { SVGProps } from "react"; - -export const CheckIcon = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - return ( - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/chevron-down.tsx b/examples/ui-demo/src/components/icons/chevron-down.tsx deleted file mode 100644 index 482a6d22f7..0000000000 --- a/examples/ui-demo/src/components/icons/chevron-down.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SVGProps } from "react"; - -export const ChevronDown = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/chevron.tsx b/examples/ui-demo/src/components/icons/chevron.tsx deleted file mode 100644 index 2f1202c7bd..0000000000 --- a/examples/ui-demo/src/components/icons/chevron.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { SVGProps } from "react"; - -export const ChevronRight = ({ - fill = "#475569", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/code.tsx b/examples/ui-demo/src/components/icons/code.tsx deleted file mode 100644 index 8d2ab17f7f..0000000000 --- a/examples/ui-demo/src/components/icons/code.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { SVGProps } from "react"; - -export const Code = ({ - stroke = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/copy-left.tsx b/examples/ui-demo/src/components/icons/copy-left.tsx deleted file mode 100644 index 37a6e014d8..0000000000 --- a/examples/ui-demo/src/components/icons/copy-left.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { JSX, SVGProps } from "react"; - -export const CopyLeftIcon = ({ - stroke = "#475569", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); diff --git a/examples/ui-demo/src/components/icons/discord.tsx b/examples/ui-demo/src/components/icons/discord.tsx deleted file mode 100644 index e768cd9882..0000000000 --- a/examples/ui-demo/src/components/icons/discord.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { JSX, SVGProps } from "react"; - -export const DiscordLogo = ({ - fill, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - - - - - - - - - - - - -); diff --git a/examples/ui-demo/src/components/icons/draw.tsx b/examples/ui-demo/src/components/icons/draw.tsx deleted file mode 100644 index 37d5aa0592..0000000000 --- a/examples/ui-demo/src/components/icons/draw.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { SVGProps } from "react"; - -export const DrawIcon = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - return ( - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/external-link.tsx b/examples/ui-demo/src/components/icons/external-link.tsx deleted file mode 100644 index 6b6d0e7d47..0000000000 --- a/examples/ui-demo/src/components/icons/external-link.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { SVGProps } from "react"; - -export const ExternalLinkIcon = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/facebook.tsx b/examples/ui-demo/src/components/icons/facebook.tsx deleted file mode 100644 index d7edcea2fa..0000000000 --- a/examples/ui-demo/src/components/icons/facebook.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { SVGProps } from "react"; - -export const FacebookIcon = ( - props: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/gas.tsx b/examples/ui-demo/src/components/icons/gas.tsx deleted file mode 100644 index 0ed5bde5e6..0000000000 --- a/examples/ui-demo/src/components/icons/gas.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { SVGProps } from "react"; - -export const GasIcon = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - return ( - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/github.tsx b/examples/ui-demo/src/components/icons/github.tsx deleted file mode 100644 index 951dffbe2c..0000000000 --- a/examples/ui-demo/src/components/icons/github.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SVGProps } from "react"; - -export const GithubLogo = ({ - fill = "black", - size = 24, - ...props -}: JSX.IntrinsicAttributes & SVGProps & { size?: number }) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/google-play.tsx b/examples/ui-demo/src/components/icons/google-play.tsx deleted file mode 100644 index 874a222374..0000000000 --- a/examples/ui-demo/src/components/icons/google-play.tsx +++ /dev/null @@ -1,38 +0,0 @@ -export const GooglePlay = () => { - return ( - - - - - - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/google.tsx b/examples/ui-demo/src/components/icons/google.tsx deleted file mode 100644 index 2db9718f04..0000000000 --- a/examples/ui-demo/src/components/icons/google.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import type { SVGProps } from "react"; - -// eslint-disable-next-line jsdoc/require-jsdoc -export const GoogleIcon = ( - props: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/illustration-style.tsx b/examples/ui-demo/src/components/icons/illustration-style.tsx deleted file mode 100644 index 494add9a34..0000000000 --- a/examples/ui-demo/src/components/icons/illustration-style.tsx +++ /dev/null @@ -1,154 +0,0 @@ -import { SVGProps } from "react"; - -export const IllustrationStyle = ({ - fill = "#363FF9", - size = 48, - variant, - ...props -}: JSX.IntrinsicAttributes & - SVGProps & { size?: number; variant: string }) => { - switch (variant) { - case "outline": - return ( - - - - - - - ); - case "linear": - return ( - - - - - - - - ); - case "filled": - return ( - - - - - - - - ); - case "flat": - return ( - - - - - - - - ); - } -}; diff --git a/examples/ui-demo/src/components/icons/info.tsx b/examples/ui-demo/src/components/icons/info.tsx deleted file mode 100644 index 2e308ea6a3..0000000000 --- a/examples/ui-demo/src/components/icons/info.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { SVGProps } from "react"; - -export const InfoIcon = ({ - stroke = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/key.tsx b/examples/ui-demo/src/components/icons/key.tsx deleted file mode 100644 index 77382983bb..0000000000 --- a/examples/ui-demo/src/components/icons/key.tsx +++ /dev/null @@ -1,22 +0,0 @@ -export const Key = ({ className }: { className?: string }) => ( - - - - -); diff --git a/examples/ui-demo/src/components/icons/loading.tsx b/examples/ui-demo/src/components/icons/loading.tsx deleted file mode 100644 index eb5041e0d8..0000000000 --- a/examples/ui-demo/src/components/icons/loading.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { useTheme } from "@/state/useTheme"; -export const LoadingIcon = ({ className }: { className?: string }) => { - const theme = useTheme(); - const animationClass = - theme === "dark" ? "animate-ui-loading-dark" : "animate-ui-loading-light"; - - return ( - - - - - - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/lock.tsx b/examples/ui-demo/src/components/icons/lock.tsx deleted file mode 100644 index 9678f1234d..0000000000 --- a/examples/ui-demo/src/components/icons/lock.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { SVGProps } from "react"; - -export const LockIcon = ({ - stroke = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/logout.tsx b/examples/ui-demo/src/components/icons/logout.tsx deleted file mode 100644 index 716750b0c8..0000000000 --- a/examples/ui-demo/src/components/icons/logout.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SVGProps } from "react"; - -export const LogoutIcon = ({ - stroke = "#363FF9", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/mail.tsx b/examples/ui-demo/src/components/icons/mail.tsx deleted file mode 100644 index d770f54f38..0000000000 --- a/examples/ui-demo/src/components/icons/mail.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { SVGProps } from "react"; - -export const MailIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/paint.tsx b/examples/ui-demo/src/components/icons/paint.tsx deleted file mode 100644 index 4301e0dfc4..0000000000 --- a/examples/ui-demo/src/components/icons/paint.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { SVGProps } from "react"; - -export const PaintIcon = ({ - stroke = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - - - -); diff --git a/examples/ui-demo/src/components/icons/palette.tsx b/examples/ui-demo/src/components/icons/palette.tsx deleted file mode 100644 index c34e064423..0000000000 --- a/examples/ui-demo/src/components/icons/palette.tsx +++ /dev/null @@ -1,22 +0,0 @@ -export const PaletteIcon = () => { - return ( - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/passkey.tsx b/examples/ui-demo/src/components/icons/passkey.tsx deleted file mode 100644 index e2713f9ce2..0000000000 --- a/examples/ui-demo/src/components/icons/passkey.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { JSX, SVGProps } from "react"; - -export const PasskeyIcon = ({ - stroke, - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/phone.tsx b/examples/ui-demo/src/components/icons/phone.tsx deleted file mode 100644 index 71eabe2150..0000000000 --- a/examples/ui-demo/src/components/icons/phone.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { SVGProps } from "react"; - -export const PhoneIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/photo.tsx b/examples/ui-demo/src/components/icons/photo.tsx deleted file mode 100644 index e6d24ed140..0000000000 --- a/examples/ui-demo/src/components/icons/photo.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { SVGProps } from "react"; - -export const PhotoIcon = ({ - color = "#475569", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/receipt.tsx b/examples/ui-demo/src/components/icons/receipt.tsx deleted file mode 100644 index 1ef6b63310..0000000000 --- a/examples/ui-demo/src/components/icons/receipt.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { SVGProps } from "react"; - -export const ReceiptIcon = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - return ( - - - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/settings.tsx b/examples/ui-demo/src/components/icons/settings.tsx deleted file mode 100644 index a42d3e4620..0000000000 --- a/examples/ui-demo/src/components/icons/settings.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SVGProps } from "react"; - -export const SettingsIcon = ({ - stroke = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/social.tsx b/examples/ui-demo/src/components/icons/social.tsx deleted file mode 100644 index 58b30c1e7d..0000000000 --- a/examples/ui-demo/src/components/icons/social.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { SVGProps } from "react"; - -export const SocialIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/sparkle.tsx b/examples/ui-demo/src/components/icons/sparkle.tsx deleted file mode 100644 index 8ec23ce05a..0000000000 --- a/examples/ui-demo/src/components/icons/sparkle.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import * as React from "react"; - -export const SparkleIcon = ( - props: React.JSX.IntrinsicAttributes & React.SVGProps, -) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/three-stars.tsx b/examples/ui-demo/src/components/icons/three-stars.tsx deleted file mode 100644 index d63831e487..0000000000 --- a/examples/ui-demo/src/components/icons/three-stars.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { SVGProps } from "react"; - -export const ThreeStarsIcon = ({ - width = 80, - height = 80, - isBranded = false, - ...props -}: JSX.IntrinsicAttributes & - SVGProps & { isBranded?: boolean }) => ( - - - - - - - -); diff --git a/examples/ui-demo/src/components/icons/twitch.tsx b/examples/ui-demo/src/components/icons/twitch.tsx deleted file mode 100644 index 96f092d995..0000000000 --- a/examples/ui-demo/src/components/icons/twitch.tsx +++ /dev/null @@ -1,31 +0,0 @@ -export const TwitchIcon = ({ ...props }: React.SVGProps) => ( - - - - - -); diff --git a/examples/ui-demo/src/components/icons/twitter.tsx b/examples/ui-demo/src/components/icons/twitter.tsx deleted file mode 100644 index 06b7a7766a..0000000000 --- a/examples/ui-demo/src/components/icons/twitter.tsx +++ /dev/null @@ -1,14 +0,0 @@ -export const TwitterIcon = ({ ...props }: React.SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/user.tsx b/examples/ui-demo/src/components/icons/user.tsx deleted file mode 100644 index 96f6425492..0000000000 --- a/examples/ui-demo/src/components/icons/user.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { useTheme } from "@/state/useTheme"; -import { SVGProps } from "react"; - -export const UserIcon = ({ - fill = "currentColor", - ...props -}: JSX.IntrinsicAttributes & SVGProps) => { - const theme = useTheme(); - const isDark = theme === "dark"; - - return ( - - - - ); -}; diff --git a/examples/ui-demo/src/components/icons/wallet.tsx b/examples/ui-demo/src/components/icons/wallet.tsx deleted file mode 100644 index 397a64500a..0000000000 --- a/examples/ui-demo/src/components/icons/wallet.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { SVGProps } from "react"; - -export const WalletIcon = ({ - ...props -}: JSX.IntrinsicAttributes & SVGProps) => ( - - - -); diff --git a/examples/ui-demo/src/components/icons/wordmark.tsx b/examples/ui-demo/src/components/icons/wordmark.tsx deleted file mode 100644 index 9724ec8fac..0000000000 --- a/examples/ui-demo/src/components/icons/wordmark.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { SVGProps } from "react"; - -export const Wordmark = ( - props: JSX.IntrinsicAttributes & SVGProps, -) => ( - - - - - - - - - - - - -); diff --git a/examples/ui-demo/src/components/icons/x.tsx b/examples/ui-demo/src/components/icons/x.tsx deleted file mode 100644 index 3de1c2c6eb..0000000000 --- a/examples/ui-demo/src/components/icons/x.tsx +++ /dev/null @@ -1,19 +0,0 @@ -export const XIcon = ({ ...props }: React.SVGProps) => ( - - - - - -); diff --git a/examples/ui-demo/src/components/modals/Erc20/BagIcon.tsx b/examples/ui-demo/src/components/modals/Erc20/BagIcon.tsx deleted file mode 100644 index b2b6d70298..0000000000 --- a/examples/ui-demo/src/components/modals/Erc20/BagIcon.tsx +++ /dev/null @@ -1,29 +0,0 @@ -export default function BagIcon({ - className, - color = "#CBD5E1", -}: { - className?: string; - color?: string; -}) { - return ( - - - - - - ); -} diff --git a/examples/ui-demo/src/components/modals/Erc20/Erc20Modal.tsx b/examples/ui-demo/src/components/modals/Erc20/Erc20Modal.tsx deleted file mode 100644 index ea62292f41..0000000000 --- a/examples/ui-demo/src/components/modals/Erc20/Erc20Modal.tsx +++ /dev/null @@ -1,381 +0,0 @@ -import React, { Fragment, useState, useEffect } from "react"; -import { Dialog, useAccount } from "@account-kit/react"; -import { Transition } from "@headlessui/react"; -import { XIcon } from "../../icons/x"; -import Image from "next/image"; -import { DynamicHeight } from "@/components/ui/dynamic-height"; -import BagIcon from "./BagIcon"; -import { cn } from "@/lib/utils"; -import { useReadErc20Balance } from "../../../hooks/useReadErc20Balance"; -import { useMintErc20 } from "../../../hooks/useMintErc20"; -import { useSendUOsErc20Sponsorship } from "../../../hooks/useSendUOsErc20Sponsorship"; -import { alchemy, arbitrumSepolia, baseSepolia } from "@account-kit/infra"; -import { AccountMode } from "@/app/config"; -import { LoadingIcon } from "../../icons/loading"; -import { MintStages } from "@/components/small-cards/MintStages"; -import { ModalCTAButton } from "../../shared/ModalCTAButton"; -import { getNftMintBatchUOs } from "./utils"; -import { useEstimateGasErc20Sponsorship } from "../../../hooks/useEstimateGasErc20Sponsorship"; -import { DEMO_USDC_ADDRESS_6_DECIMALS } from "../../../utils/constants"; -import { useDeploymentStatus } from "@/hooks/useDeploymentStatus"; - -type Erc20ModalProps = { - isOpen: boolean; - onClose: () => void; - accountMode: AccountMode; - imageUri?: string; - onNftMinted?: () => void; -}; - -const AMOUNT_OF_USDC_TO_MINT = 10; -const MINIMUM_USDC_BALANCE = 2; -const NFT_PRICE = 1; - -export function Erc20Modal({ - isOpen, - onClose, - accountMode, - imageUri, - onNftMinted, -}: Erc20ModalProps) { - const [networkFee, setNetworkFee] = useState(0); - const { address: accountAddress } = useAccount({ - type: "ModularAccountV2", - accountParams: { - mode: accountMode, - }, - }); - - const chain = accountMode === "7702" ? baseSepolia : arbitrumSepolia; - const transport = alchemy({ - rpcUrl: accountMode === "7702" ? "/api/rpc-base-sepolia" : "/api/rpc", - }); - - const { isDeployed, refetch: refetchDeploymentStatus } = - useDeploymentStatus(); - - const { - balance, - isLoading: isLoadingBalance, - isError: isErrorBalance, - refetch: refetchBalance, - } = useReadErc20Balance({ - accountAddress, - tokenAddress: DEMO_USDC_ADDRESS_6_DECIMALS, - clientOptions: { chain, transport }, - }); - - const { - mintAsync, - isMinting, - reset: resetMint, - } = useMintErc20({ - amount: String(AMOUNT_OF_USDC_TO_MINT), - clientOptions: { mode: accountMode, chain, transport }, - }); - - const { - sendUOsAsync: mintNftAsync, - isSending: isMintingNft, - isLoadingClient: isLoadingNftClient, - txHash: mintNftTxHash, - reset: resetMintNft, - } = useSendUOsErc20Sponsorship({ - accountMode, - toastText: "NFT minted successfully", - }); - - const { - estimateGasAsync: estimateMintNftFee, - isEstimating: isEstimatingGas, - } = useEstimateGasErc20Sponsorship({ - accountMode, - }); - - const balanceFloat = parseFloat(balance ?? "0"); - const readyToBuyNft = balanceFloat >= MINIMUM_USDC_BALANCE; - - const numericBalance = Math.floor(balanceFloat * 100) / 100; - const balanceDisplay = isLoadingBalance - ? "Loading..." - : isErrorBalance - ? "Error" - : `${numericBalance === 0 ? "0" : numericBalance.toFixed(2)} USDC`; - - const handleGetUSDC = async () => { - if (!accountAddress) return; - - try { - await mintAsync(); - await refetchBalance(); - } catch (e) { - console.error("Failed to get USDC:", e); - } - }; - - const handleClose = () => { - onClose(); - }; - - const handleBuyNFT = async () => { - if (!accountAddress) return; - - if (mintNftTxHash) { - resetMintNft(); - return; - } - - try { - const uos = await getNftMintBatchUOs(accountAddress); - await mintNftAsync(uos); - await refetchBalance(); - if (!isDeployed) { - refetchDeploymentStatus(); - } - onNftMinted?.(); - } catch (e) { - console.error("Failed to buy NFT:", e); - } - }; - - useEffect(() => { - if (isOpen && accountAddress) { - refetchBalance(); - } - }, [isOpen, accountAddress, refetchBalance]); - - useEffect(() => { - const fetchAndEstimateFee = async () => { - if (isOpen && accountAddress) { - try { - const uos = await getNftMintBatchUOs(accountAddress); - const feeResult = await estimateMintNftFee(uos); - if (feeResult && feeResult.feeUsd) { - setNetworkFee(feeResult.feeUsd); - } else { - console.warn("Fee estimation did not return expected data."); - setNetworkFee(0); - } - } catch (error) { - setNetworkFee(0); - } - } - }; - - fetchAndEstimateFee(); - }, [isOpen, accountAddress, estimateMintNftFee, balance]); - - useEffect(() => { - resetMintNft(); - resetMint(); - }, [accountMode, resetMintNft, resetMint]); - - const buyNftButtonEnabled = - readyToBuyNft && !isMintingNft && !isLoadingNftClient; - - const bagIconColor = mintNftTxHash - ? "#475569" - : buyNftButtonEnabled - ? "white" - : "#CBD5E1"; - - return ( - -
- -
- {/* Header */} -
-
-

- Pay gas with any token -

-

- Checkout with one click and a single token, for example USDC. -

-
- -
- - {/* Body */} -
- {/* Image */} -
-
- {imageUri ? ( - NFT - ) : ( - - )} -
-
- - {/* Details */} - {!isMintingNft && !mintNftTxHash && ( -
- {/* 1) Warning */} -
-
- -
-

- Insufficient funds. Minimum balance of 1 USDC plus - gas fees required. -

-
-
-
- {/* Wallet Balance */} -
- - Wallet Balance - -
- - {balanceDisplay} - -
- - - -
-
-
-
- - {/* Price Details */} -
-
- - NFT price - - - 1.00 USDC - -
-
- - Network fee est. - - - {isEstimatingGas ? ( -
- ) : networkFee === 0 ? ( - "-" - ) : networkFee < 0.01 ? ( - "< 0.01" - ) : ( - networkFee.toFixed(2) - )} -  USDC - -
-
- Total - - {networkFee === 0 ? "~" : ""} - {(NFT_PRICE + networkFee).toFixed(2)} USDC - -
-
-
- )} - {(isMintingNft || mintNftTxHash) && ( -
- -
- )} -
- - {/* Buy Button */} - - ) : undefined - } - > - {mintNftTxHash ? "Buy NFT again" : "Buy NFT"} - -
- -
-
- ); -} diff --git a/examples/ui-demo/src/components/modals/Erc20/index.ts b/examples/ui-demo/src/components/modals/Erc20/index.ts deleted file mode 100644 index 9215a4d71e..0000000000 --- a/examples/ui-demo/src/components/modals/Erc20/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { Erc20Modal } from "./Erc20Modal"; diff --git a/examples/ui-demo/src/components/modals/Erc20/utils.ts b/examples/ui-demo/src/components/modals/Erc20/utils.ts deleted file mode 100644 index 58eed6d0a2..0000000000 --- a/examples/ui-demo/src/components/modals/Erc20/utils.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - DEMO_NFT_USDC_MINTABLE_ADDRESS, - DEMO_USDC_ADDRESS_6_DECIMALS, -} from "../../../utils/constants"; -import { Address, encodeFunctionData, parseAbi } from "viem"; - -// Alchemy Paymaster address for entrypoint v0.7 -const ALCHEMY_PAYMASTER_ADDRESS: Address = - "0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633"; -const erc20Abi = parseAbi([ - "function approve(address spender, uint256 amount) returns (bool)", -]); -const nftAbi = parseAbi(["function mintTo(address to)"]); - -// Amount of USDC to approve for gas payment (e.g., 100 USDC, 100 * 10^6) -export const USDC_GAS_APPROVAL_AMOUNT = BigInt(100_000_000); -const NFT_MINT_PRICE = BigInt(1_000_000); // 1 USDC for mint price (1 * 10^6) - -export async function getNftMintBatchUOs(accountAddress: Address) { - // 1. Approve the Alchemy Paymaster to spend USDC for gas - const approveGasSponsorshipCallData = encodeFunctionData({ - abi: erc20Abi, - functionName: "approve", - args: [ALCHEMY_PAYMASTER_ADDRESS, USDC_GAS_APPROVAL_AMOUNT], - }); - - // 2. Approve the NFT contract to spend USDC for the mint price - const approveNftMintCallData = encodeFunctionData({ - abi: erc20Abi, - functionName: "approve", - args: [DEMO_NFT_USDC_MINTABLE_ADDRESS, NFT_MINT_PRICE], - }); - - // 3. Mint the NFT to the smart account's address - const mintCallData = encodeFunctionData({ - abi: nftAbi, - functionName: "mintTo", - args: [accountAddress], - }); - - return [ - { - target: DEMO_USDC_ADDRESS_6_DECIMALS, - data: approveGasSponsorshipCallData, - }, - { - target: DEMO_USDC_ADDRESS_6_DECIMALS, - data: approveNftMintCallData, - }, - { - target: DEMO_NFT_USDC_MINTABLE_ADDRESS, - data: mintCallData, - }, - ]; -} diff --git a/examples/ui-demo/src/components/modals/MFA/MFAModal.tsx b/examples/ui-demo/src/components/modals/MFA/MFAModal.tsx deleted file mode 100644 index 4df63cae65..0000000000 --- a/examples/ui-demo/src/components/modals/MFA/MFAModal.tsx +++ /dev/null @@ -1,283 +0,0 @@ -import { Dialog, useMFA } from "@account-kit/react"; -import { useEffect, useState, useCallback } from "react"; -import { XIcon } from "../../icons/x"; -import { AlchemyLogo } from "../../icons/alchemy"; -import { BackArrow } from "../../icons/BackArrow"; - -import { Button } from "../../small-cards/Button"; - -import { OTPCodeType, initialOTPValue } from "../../ui/OTPInput"; - -import { MFAModalStart } from "./stages/MFAModalStart"; -import { MFAModalQR } from "./stages/MFAModalQR"; -import { MFAModalCode } from "./stages/MFAModalCode"; -import { MFAModalVerify } from "./stages/MFAModalVerify"; -import { MFAModalSuccess } from "./stages/MFAModalSuccess"; -import { DynamicHeight } from "@/components/ui/dynamic-height"; - -export type MFAStage = "start" | "qr" | "code" | "verify" | "success"; - -type MFAModalProps = { - isMfaActive?: boolean; - onMfaEnabled?: () => void; - onMfaRemoved?: () => void; - isLoadingClient?: boolean; -}; - -export function MFAModal({ - isMfaActive = false, - onMfaEnabled, - onMfaRemoved, - isLoadingClient, -}: MFAModalProps) { - const [isModalOpen, setIsModalOpen] = useState(false); - const [stage, setStage] = useState("start"); - const [otp, setOTP] = useState(initialOTPValue); - const [totpUrl, setTotpUrl] = useState(null); - const [mfaKey, setMfaKey] = useState(null); - const [multiFactorId, setMultiFactorId] = useState(null); - const [otpError, setOtpError] = useState(null); - const [systemError, setSystemError] = useState(false); - - const { addMFA, verifyMFA, removeMFA, getMFAFactors, isReady } = useMFA(); - - const handleClose = () => setIsModalOpen(false); - - const handleInitMFASetup = async () => { - setStage("start"); - setOTP(initialOTPValue); - setTotpUrl(null); - setMultiFactorId(null); - setOtpError(null); - setSystemError(false); - setIsModalOpen(true); - }; - - const resetModalState = useCallback(() => { - setIsModalOpen(false); - setStage("start"); - setOTP(initialOTPValue); - setTotpUrl(null); - setMultiFactorId(null); - setOtpError(null); - setSystemError(false); - }, []); - - const startMFASetup = useCallback(() => { - if (!isReady) { - setSystemError(true); - console.error("MFA not available"); - return; - } - - addMFA.mutate( - { multiFactorType: "totp" }, - { - onSuccess: (result) => { - if (result?.multiFactorTotpUrl) { - setTotpUrl(result.multiFactorTotpUrl); - const url = new URL(result.multiFactorTotpUrl); - const secret = new URLSearchParams(url.search).get("secret"); - setMfaKey(secret); - setMultiFactorId(result.multiFactorId); - setStage("qr"); - } else { - setSystemError(true); - console.error("Failed to generate MFA setup"); - } - }, - onError: (error) => { - console.error("Error adding MFA:", error); - setSystemError(true); - }, - }, - ); - }, [addMFA, isReady]); - - const verifyTOTP = useCallback(() => { - if (!multiFactorId || !otp.join("")) { - setSystemError(true); - console.error("Missing required information for verification"); - return; - } - - verifyMFA.mutate( - { - multiFactorId: multiFactorId, - multiFactorCode: otp.join(""), - }, - { - onSuccess: () => { - setStage("success"); - onMfaEnabled?.(); - }, - onError: (error) => { - console.error("Error verifying MFA:", error); - setOtpError("The code you entered is incorrect"); - setOTP(initialOTPValue); - }, - }, - ); - }, [multiFactorId, onMfaEnabled, otp, verifyMFA]); - - const handleRemoveMFA = useCallback(() => { - if (!isReady) { - setSystemError(true); - console.error("MFA not available"); - return; - } - - getMFAFactors.mutate(undefined, { - onSuccess: (result) => { - const factorId = result?.multiFactors?.[0]?.multiFactorId; - - if (!factorId) { - setSystemError(true); - console.error("No MFA factor ID found"); - return; - } - - removeMFA.mutate( - { multiFactorIds: [factorId] }, - { - onSuccess: () => { - onMfaRemoved?.(); - resetModalState(); - }, - onError: (error) => { - console.error("Error removing MFA:", error); - setSystemError(true); - }, - }, - ); - }, - onError: (error) => { - console.error("Error getting MFA factors:", error); - setSystemError(true); - }, - }); - }, [getMFAFactors, isReady, onMfaRemoved, removeMFA, resetModalState]); - - useEffect(() => { - if (otp.every((value) => value !== "")) { - verifyTOTP(); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [otp]); - - const renderContent = useCallback(() => { - switch (stage) { - case "start": - return ( - - ); - case "qr": - return ( - - ); - case "code": - return ; - case "verify": - return ( - - ); - case "success": - return ; - } - }, [ - stage, - startMFASetup, - addMFA.isPending, - verifyMFA.isPending, - totpUrl, - mfaKey, - otp, - otpError, - resetModalState, - ]); - - const isLoading = - addMFA.isPending || - verifyMFA.isPending || - removeMFA.isPending || - getMFAFactors.isPending; - const handleBack = () => { - setStage("qr"); - }; - const canGoBack = stage === "verify" || stage === "code"; - - return ( - <> - {isMfaActive ? ( - - ) : ( - - )} - -
- -
-
- - {canGoBack && ( - - )} -
- {renderContent()} - {systemError && ( -
- Something went wrong. -
- )} -
- protected by - -
-
-
-
-
- - ); -} diff --git a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalCode.tsx b/examples/ui-demo/src/components/modals/MFA/stages/MFAModalCode.tsx deleted file mode 100644 index 06ff12a3d0..0000000000 --- a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalCode.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { useState } from "react"; -import { MFAStage } from "../MFAModal"; -import { TooltipComponent } from "@/components/ui/tooltip"; -import { CopyLeftIcon } from "@/components/icons/copy-left"; -import { MobileAuthenticatorLinks } from "@/components/shared/MobileAuthenticatorLinks"; -export function MFAModalCode({ - setStage, - mfaKey, -}: { - setStage: (stage: MFAStage) => void; - mfaKey: string | null; -}) { - const [copied, setCopied] = useState(false); - const handleCopyClick = () => { - if (!mfaKey) return; - navigator.clipboard.writeText(mfaKey); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - }; - return ( - <> -

- Set up authenticator app -

- -
    -
  1. - In the Google Authenticator app, tap the + button then tap{" "} - Enter a setup key -
  2. -
  3. -
    -
    - - Enter your email address and this key (spaces don't - matter): -
    -
    - {mfaKey?.match(/.{1,4}/g)?.join(" ")} -
    - - - -
    -
  4. -
  5. - Make sure Time based is selected. -
  6. -
  7. - Tap Add to finish. -
  8. -
-
- -
- - ); -} diff --git a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalQR.tsx b/examples/ui-demo/src/components/modals/MFA/stages/MFAModalQR.tsx deleted file mode 100644 index 54b9da67b1..0000000000 --- a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalQR.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { QRCodeSVG } from "qrcode.react"; -import { MFAStage } from "../MFAModal"; -import { useTheme } from "@/state/useTheme"; -import { MobileAuthenticatorLinks } from "@/components/shared/MobileAuthenticatorLinks"; - -export function MFAModalQR({ - totpUrl, - isLoading, - setStage, -}: { - totpUrl: string | null; - isLoading: boolean; - setStage: (stage: MFAStage) => void; -}) { - const theme = useTheme(); - - return ( - <> -

- Set up authenticator app -

- -
- {isLoading ? ( -
-
-
- ) : totpUrl ? ( - - ) : ( -
- No QR code available -
- )} -
-

- Alchemy recommends using Google Authenticator.
- Scan the QR code using your app. -

- - - - - ); -} diff --git a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalStart.tsx b/examples/ui-demo/src/components/modals/MFA/stages/MFAModalStart.tsx deleted file mode 100644 index 4f4017ea04..0000000000 --- a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalStart.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { AlchemyTwoToneLogo } from "@/components/icons/alchemy-two-tone"; -import Image from "next/image"; - -export function MFAModalStart({ - startMFASetup, - isLoading, -}: { - startMFASetup: () => void; - isLoading: boolean; -}) { - return ( - <> - - data-security icon -

- Enable 2-Step Verification -

-

- You're holding serious crypto. Make sure it stays that way.{" "} - Secure your assets in 10 seconds. -

- - - ); -} diff --git a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalSuccess.tsx b/examples/ui-demo/src/components/modals/MFA/stages/MFAModalSuccess.tsx deleted file mode 100644 index 3044ba1e8b..0000000000 --- a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalSuccess.tsx +++ /dev/null @@ -1,20 +0,0 @@ -export function MFAModalSuccess({ - resetModalState, -}: { - resetModalState: () => void; -}) { - return ( - <> -

Setup Complete!

-

- You will now be asked for a verification code when logging in. -

- - - ); -} diff --git a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalVerify.tsx b/examples/ui-demo/src/components/modals/MFA/stages/MFAModalVerify.tsx deleted file mode 100644 index 13106af266..0000000000 --- a/examples/ui-demo/src/components/modals/MFA/stages/MFAModalVerify.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { ThreeStarsIcon } from "@/components/icons/three-stars"; -import { OTPInput, OTPCodeType } from "@/components/ui/OTPInput"; -import { Spinner } from "@/components/ui/Spinner"; -import { Dispatch, SetStateAction } from "react"; -export function MFAModalVerify({ - otp, - setOTP, - setError, - error, - isLoading, -}: { - otp: OTPCodeType; - setOTP: (otp: OTPCodeType) => void; - setError: Dispatch>; - error: string | null; - isLoading: boolean; -}) { - return ( - <> -
- - -
-

- Enter authenticator app code -

-
- {}} - disabled={isLoading} - /> -
- - ); -} diff --git a/examples/ui-demo/src/components/modals/index.ts b/examples/ui-demo/src/components/modals/index.ts deleted file mode 100644 index 683fcbd8a3..0000000000 --- a/examples/ui-demo/src/components/modals/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { MFAModal } from "./MFA/MFAModal"; -export { Erc20Modal } from "./Erc20/Erc20Modal"; diff --git a/examples/ui-demo/src/components/preview/CodePreview.tsx b/examples/ui-demo/src/components/preview/CodePreview.tsx deleted file mode 100644 index 198a9a1129..0000000000 --- a/examples/ui-demo/src/components/preview/CodePreview.tsx +++ /dev/null @@ -1,190 +0,0 @@ -import { Config, DEFAULT_CONFIG } from "@/app/config"; -import { getSectionsForConfig } from "@/app/sections"; -import { Metrics } from "@/metrics"; -import { useConfigStore } from "@/state"; -import { links } from "@/utils/links"; -import dedent from "dedent"; -import { Check, Copy } from "lucide-react"; -import * as parserTypeScript from "prettier/parser-typescript"; -import * as prettierPluginEstree from "prettier/plugins/estree"; -import * as prettier from "prettier/standalone"; -import { useEffect, useState } from "react"; -import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; -import { atomDark as syntaxTheme } from "react-syntax-highlighter/dist/esm/styles/prism"; -import { twMerge } from "tailwind-merge"; -import ExternalLink from "../shared/ExternalLink"; - -export function CodePreview({ className }: { className?: string }) { - const config = useConfigStore((state) => state); - - useEffect(() => { - Metrics.trackEvent({ name: "codepreview_viewed" }); - }, []); - - return ( -
-
-
Config
-

- Pass this config object into the{" "} - AlchemyAccountProvider. -

- -
-
-
Style
-

- Not using tailwind?{" "} - - Metrics.trackEvent({ name: "codepreview_tailwind_setup_clicked" }) - } - className="text-blue-600 font-semibold" - > - Follow this guide to get started - - , then add the below code to your config file. -

- -
-
- ); -} - -function CodeBlock({ - title, - code, - eventName, -}: { - title: string; - code: string; - eventName: "codepreview_config_copied" | "codepreview_style_copied"; -}) { - const [copied, setCopied] = useState(false); - const [formattedCode, setFormattedCode] = useState(code); - - useEffect(() => { - prettier - .format(code, { - parser: "typescript", - plugins: [parserTypeScript, prettierPluginEstree], - }) - .then(setFormattedCode); - }, [code]); - - const onCopy = () => { - navigator.clipboard.writeText(code); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - Metrics.trackEvent({ name: eventName }); - }; - - return ( -
-
- {title} - -
- - {formattedCode} - -
- ); -} - -function getTailwindCode(ui: Config["ui"]) { - return dedent` - import { withAccountKitUi, createColorSet } from "@account-kit/react/tailwind"; - - // wrap your existing tailwind config with 'withAccountKitUi' - export default withAccountKitUi({ - // your tailwind config here - // if using tailwind v4, this can be left empty since most options are configured via css - // if using tailwind v3, add your existing tailwind config here - https://v3.tailwindcss.com/docs/installation/using-postcss - }, { - // override account kit themes - colors: { - "btn-primary": createColorSet("${ui.primaryColor.light}", "${ - ui.primaryColor.dark - }"), - "fg-accent-brand": createColorSet("${ui.primaryColor.light}", "${ - ui.primaryColor.dark - }"), - },${ - ui.borderRadius !== DEFAULT_CONFIG.ui.borderRadius - ? ` - borderRadius: "${ui.borderRadius}",` - : "" - } - })`; -} - -function getConfigCode(config: Config) { - const sections = getSectionsForConfig(config, "your-project-id"); - const socialIsEnabled = Object.values(config.auth.oAuthMethods).some( - (enabled) => enabled, - ); - - const code = dedent` - import { AlchemyAccountsUIConfig, createConfig } from "@account-kit/react"; - import { sepolia, alchemy } from "@account-kit/infra"; - import { QueryClient } from "@tanstack/react-query"; - - const uiConfig: AlchemyAccountsUIConfig = { - illustrationStyle: "${config.ui.illustrationStyle}", - auth: { - sections: ${JSON.stringify(sections)}, - addPasskeyOnSignup: ${ - config.auth.addPasskey && config.auth.showPasskey - },${ - config.ui.logoLight || config.ui.logoDark - ? '\n header: ,' - : "" - } - },${config.supportUrl ? `\n supportUrl: "${config.supportUrl}"` : ""} - }; - - export const config = createConfig({ - // if you don't want to leak api keys, you can proxy to a backend and set the rpcUrl instead here - // get this from the app config you create at ${links.dashboard} - transport: alchemy({ apiKey: "your-api-key" }), - chain: sepolia, - ssr: true, // set to false if you're not using server-side rendering${ - socialIsEnabled ? "\n enablePopupOauth: true," : "" - } - }, uiConfig); - - export const queryClient = new QueryClient(); -`; - - return code; -} diff --git a/examples/ui-demo/src/components/preview/MobileSplashPage.tsx b/examples/ui-demo/src/components/preview/MobileSplashPage.tsx deleted file mode 100644 index be88326506..0000000000 --- a/examples/ui-demo/src/components/preview/MobileSplashPage.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { useBreakpoint } from "@/hooks/useBreakpoint"; -import { useAuthModal, useSignerStatus } from "@account-kit/react"; -import { useEffect } from "react"; - -export function MobileSplashPage() { - const { openAuthModal } = useAuthModal(); - const { isAuthenticating } = useSignerStatus(); - const breakpoint = useBreakpoint(); - - useEffect(() => { - if (breakpoint === "sm" && isAuthenticating) { - openAuthModal(); - } - }, [breakpoint, isAuthenticating, openAuthModal]); - - return ( -
- {/* Header Text */} -
-

- Web2 UX,{" "} - - onchain - -

-

- Zero-friction onboarding, one-click transactions -

-
- {/* Image Wrapper */} -
-
- -
- {/* Bottom action buttons */} -
- - - View docs - -
-

- Visit desktop site to customize
styles - and auth methods -

-
-
- ); -} diff --git a/examples/ui-demo/src/components/preview/PreviewNav.tsx b/examples/ui-demo/src/components/preview/PreviewNav.tsx deleted file mode 100644 index 7dc61a96cd..0000000000 --- a/examples/ui-demo/src/components/preview/PreviewNav.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { CodePreviewSwitch } from "@/components/shared/CodePreviewSwitch"; -import ExternalLink from "@/components/shared/ExternalLink"; -import { cn } from "@/lib/utils"; -import { Metrics } from "@/metrics"; -import { useUser } from "@account-kit/react"; -import { RenderUserConnectionAvatar } from "../user-connection-avatar/RenderUserConnectionAvatar"; - -export function PreviewNav({ - showCode, - setShowCode, -}: { - showCode: boolean; - setShowCode: (showCode: boolean) => void; -}) { - const user = useUser(); - return ( -
-
- {!showCode && user && } - {showCode && ( -
- Export configuration -
- )} - - -
- {showCode && ( -

- To get started, simply paste the below code into your environment. - You'll need to add your Alchemy API key and Gas Policy ID.{" "} - - Metrics.trackEvent({ - name: "codepreview_theme_customization_clicked", - }) - } - href="https://www.alchemy.com/docs/wallets/react/customization/theme" - className="font-semibold text-blue-600" - > - Fully customize styling here. - -

- )} -
- ); -} diff --git a/examples/ui-demo/src/components/preview/PreviewWrapper.tsx b/examples/ui-demo/src/components/preview/PreviewWrapper.tsx deleted file mode 100644 index 6bf301f99b..0000000000 --- a/examples/ui-demo/src/components/preview/PreviewWrapper.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { cn } from "@/lib/utils"; -import { CodePreview } from "./CodePreview"; -import { AuthCard, useConnectedUser, useAuthContext } from "@account-kit/react"; - -import { MobileSplashPage } from "./MobileSplashPage"; -import { EOAPostLogin } from "../eoa-post-login/EOAPostLogin"; -import { useState, useEffect } from "react"; -import { SmallCardsWrapper } from "../small-cards/Wrapper"; - -export function PreviewWrapper({ showCode }: { showCode: boolean }) { - return ( - <> - {/* Don't unmount when showing code preview so that the auth card retains its state */} -
- -
- - {showCode && } - - ); -} -const RenderContent = () => { - const user = useConnectedUser(); - const { authStep } = useAuthContext(); - const [showAuthCard, setShowAuthCard] = useState(() => !user); - - useEffect(() => { - // Show auth card for unauthenticated users - if (!user) { - setShowAuthCard(true); - - // Get auth details for authenticated users - } else if (!!user && ["complete", "initial"].includes(authStep.type)) { - setShowAuthCard(false); - } - }, [authStep.type, user]); - - if (showAuthCard) { - return ( -
-
-
- -
-
- -
- ); - } - - const isEOAUser = user?.type === "eoa"; - - if (isEOAUser) { - return ( -
-
- -
-
- ); - } - - return ( -
- -
- ); -}; diff --git a/examples/ui-demo/src/components/shared/AuthCardHeader.tsx b/examples/ui-demo/src/components/shared/AuthCardHeader.tsx deleted file mode 100644 index 7c8c5b6bf2..0000000000 --- a/examples/ui-demo/src/components/shared/AuthCardHeader.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Config } from "@/app/config"; - -export function AuthCardHeader({ - logoDark, - logoLight, - theme, -}: Pick) { - const logo = theme === "dark" ? logoDark : logoLight; - - if (!logo) return null; - - return ( - // eslint-disable-next-line @next/next/no-img-element - {logo.fileName} - ); -} diff --git a/examples/ui-demo/src/components/shared/Button.tsx b/examples/ui-demo/src/components/shared/Button.tsx deleted file mode 100644 index 17369d2bd8..0000000000 --- a/examples/ui-demo/src/components/shared/Button.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { PropsWithChildren } from "react"; - -export function Button({ - children, - className, - ...rest -}: PropsWithChildren & { className?: string }>) { - return ( - - ); -} diff --git a/examples/ui-demo/src/components/shared/CodePreviewSwitch.tsx b/examples/ui-demo/src/components/shared/CodePreviewSwitch.tsx deleted file mode 100644 index 71368d2a49..0000000000 --- a/examples/ui-demo/src/components/shared/CodePreviewSwitch.tsx +++ /dev/null @@ -1,46 +0,0 @@ -"use client"; - -import * as React from "react"; -import * as SwitchPrimitives from "@radix-ui/react-switch"; - -import { cn } from "@/lib/utils"; -import { Code } from "../icons/code"; - -const CodePreviewSwitch = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( -
- - - - - - -
-)); -CodePreviewSwitch.displayName = SwitchPrimitives.Root.displayName; - -export { CodePreviewSwitch }; diff --git a/examples/ui-demo/src/components/shared/ExternalLink.tsx b/examples/ui-demo/src/components/shared/ExternalLink.tsx deleted file mode 100644 index 0e680a0e4d..0000000000 --- a/examples/ui-demo/src/components/shared/ExternalLink.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import Link, { LinkProps } from "next/link"; -import { forwardRef, ReactNode } from "react"; - -const ExternalLink = forwardRef< - HTMLAnchorElement, - LinkProps & { className?: string; children: ReactNode } ->(({ className, children, ...rest }, ref) => { - return ( - - {children} - - ); -}); -ExternalLink.displayName = "ExternalLink"; - -export default ExternalLink; diff --git a/examples/ui-demo/src/components/shared/FileUploadInput.tsx b/examples/ui-demo/src/components/shared/FileUploadInput.tsx deleted file mode 100644 index 118e7d7237..0000000000 --- a/examples/ui-demo/src/components/shared/FileUploadInput.tsx +++ /dev/null @@ -1,52 +0,0 @@ -"use client"; - -import React, { ChangeEvent, useRef } from "react"; - -interface FileUploadInputProps { - children: React.ReactNode; - onChange: (event: ChangeEvent) => void; - accept?: string; - [key: string]: any; - className?: string; -} - -const FileUploadInput: React.FC = ({ - children, - onChange, - accept = "image/*", - className, - ...props -}) => { - const ref = useRef(null); - - const selectImage = () => { - if (ref.current) { - // reset the current value so that the input's onChange handler fires even if the - // user keeps selecting the same file - ref.current.value = ""; - ref.current.click(); - } - }; - - return ( - - ); -}; - -export default FileUploadInput; diff --git a/examples/ui-demo/src/components/shared/GoogleAnalytics.tsx b/examples/ui-demo/src/components/shared/GoogleAnalytics.tsx deleted file mode 100644 index 9ca671f6df..0000000000 --- a/examples/ui-demo/src/components/shared/GoogleAnalytics.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Script from "next/script"; -import type { FC } from "react"; - -const GA_ID = "G-06P8E9XPPY"; - -const GoogleAnalytics: FC = () => ( -