From fe8f14b9f1dedcb2c3430103e5928f19dc9c0526 Mon Sep 17 00:00:00 2001 From: moldy Date: Fri, 10 Jan 2025 18:47:39 -0500 Subject: [PATCH] docs: remove dead reference docs --- .../functions/createSMAV2Account.mdx | 28 -------- .../functions/createSMAV2AccountClient.mdx | 52 -------------- .../getDefaultAllowlistModuleAddress.mdx | 37 ---------- ...etDefaultNativeTokenLimitModuleAddress.mdx | 37 ---------- .../getDefaultPaymasterGuardModuleAddress.mdx | 37 ---------- ...ultSingleSignerValidationModuleAddress.mdx | 37 ---------- .../getDefaultTimeRangeModuleAddress.mdx | 37 ---------- ...DefaultWebauthnValidationModuleAddress.mdx | 37 ---------- .../functions/installValidationActions.mdx | 69 ------------------- .../functions/nativeSMASigner.mdx | 53 -------------- .../functions/serializeHookConfig.mdx | 49 ------------- .../functions/serializeModuleEntity.mdx | 43 ------------ .../functions/serializeValidationConfig.mdx | 49 ------------- 13 files changed, 565 deletions(-) delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/createSMAV2Account.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/createSMAV2AccountClient.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/getDefaultAllowlistModuleAddress.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/getDefaultNativeTokenLimitModuleAddress.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/getDefaultPaymasterGuardModuleAddress.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/getDefaultSingleSignerValidationModuleAddress.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/getDefaultTimeRangeModuleAddress.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/getDefaultWebauthnValidationModuleAddress.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/installValidationActions.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/nativeSMASigner.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/serializeHookConfig.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/serializeModuleEntity.mdx delete mode 100644 site/pages/reference/account-kit/smart-contracts/functions/serializeValidationConfig.mdx diff --git a/site/pages/reference/account-kit/smart-contracts/functions/createSMAV2Account.mdx b/site/pages/reference/account-kit/smart-contracts/functions/createSMAV2Account.mdx deleted file mode 100644 index d789f0559b..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/createSMAV2Account.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -# This file is autogenerated -title: createSMAV2Account -description: Overview of the createSMAV2Account method ---- - -# createSMAV2Account - -Creates an SMAV2 account using defined parameters including chain, signer, salt, factory address, and more. -Handles account initialization code, nonce generation, transaction encoding, and more to construct a modular account with optional validation hooks. - -## Import - -```ts -import { createSMAV2Account } from "@account-kit/smart-contracts"; -``` - -## Parameters - -### config - -`CreateSMAV2AccountParams` -Configuration parameters for creating an SMAV2 account. Includes chain details, signer, salt, factory address, and more. - -## Returns - -`Promise` -A promise that resolves to an `MAV2Account` providing methods for nonce retrieval, transaction execution, and more. diff --git a/site/pages/reference/account-kit/smart-contracts/functions/createSMAV2AccountClient.mdx b/site/pages/reference/account-kit/smart-contracts/functions/createSMAV2AccountClient.mdx deleted file mode 100644 index 8b7bcd96ab..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/createSMAV2AccountClient.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -# This file is autogenerated - -title: createSMAV2AccountClient -description: Overview of the createSMAV2AccountClient method ---- - -# createSMAV2AccountClient - -Creates a SMAv2 account client using the provided configuration parameters. - -## Import - -```ts -import { createSMAV2AccountClient } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { http } from "viem"; -import { createSMAV2AccountClient } from "@account-kit/smart-contracts"; -import { LocalAccountSigner } from "@aa-sdk/core"; -import { sepolia } from "@account-kit/infra"; - -const MNEMONIC = "..."; -const RPC_URL = "..."; - -const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - -const chain = sepolia; - -const transport = http(RPC_URL); - -const SMAV2SignerAccountClient = await createSMAV2AccountClient({ - chain, - signer, - transport, -}); -``` - -## Parameters - -### config - -`CreateSMAV2AccountClientParams` -The configuration parameters required to create the MAv2 account client - -## Returns - -`Promise` -A promise that resolves to a `SmartAccountClient` instance diff --git a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultAllowlistModuleAddress.mdx b/site/pages/reference/account-kit/smart-contracts/functions/getDefaultAllowlistModuleAddress.mdx deleted file mode 100644 index 5522e43076..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultAllowlistModuleAddress.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -# This file is autogenerated -title: getDefaultAllowlistModuleAddress -description: Overview of the getDefaultAllowlistModuleAddress method ---- - -# getDefaultAllowlistModuleAddress - -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. - -## Import - -```ts -import { getDefaultAllowlistModuleAddress } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { getDefaultAllowlistModuleAddress } from "@account-kit/smart-contracts"; -import { Chain, Address } from "viem"; - -const chain: Chain = ... -const allowlistModule: Address = getDefaultAllowlistModuleAddress(chain); -``` - -## Parameters - -### 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 diff --git a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultNativeTokenLimitModuleAddress.mdx b/site/pages/reference/account-kit/smart-contracts/functions/getDefaultNativeTokenLimitModuleAddress.mdx deleted file mode 100644 index 54dcc49268..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultNativeTokenLimitModuleAddress.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -# This file is autogenerated -title: getDefaultNativeTokenLimitModuleAddress -description: Overview of the getDefaultNativeTokenLimitModuleAddress method ---- - -# getDefaultNativeTokenLimitModuleAddress - -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. - -## Import - -```ts -import { getDefaultNativeTokenLimitModuleAddress } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { getDefaultNativeTokenLimitModuleAddress } from "@account-kit/smart-contracts"; -import { Chain, Address } from "viem"; - -const chain: Chain = ... -const nativeTokenLimitAddress: Address = getDefaultNativeTokenLimitModuleAddress(chain); -``` - -## Parameters - -### 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 diff --git a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultPaymasterGuardModuleAddress.mdx b/site/pages/reference/account-kit/smart-contracts/functions/getDefaultPaymasterGuardModuleAddress.mdx deleted file mode 100644 index 11e25ca3b0..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultPaymasterGuardModuleAddress.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -# This file is autogenerated -title: getDefaultPaymasterGuardModuleAddress -description: Overview of the getDefaultPaymasterGuardModuleAddress method ---- - -# getDefaultPaymasterGuardModuleAddress - -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. - -## Import - -```ts -import { getDefaultPaymasterGuardModuleAddress } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { getDefaultPaymasterGuardModuleAddress } from "@account-kit/smart-contracts"; -import { Chain, Address } from "viem"; - -const chain: Chain = ... -const paymasterGuardAddress: Address = getDefaultPaymasterGuardModuleAddress(chain); -``` - -## Parameters - -### 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 diff --git a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultSingleSignerValidationModuleAddress.mdx b/site/pages/reference/account-kit/smart-contracts/functions/getDefaultSingleSignerValidationModuleAddress.mdx deleted file mode 100644 index 04c02888cc..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultSingleSignerValidationModuleAddress.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -# This file is autogenerated -title: getDefaultSingleSignerValidationModuleAddress -description: Overview of the getDefaultSingleSignerValidationModuleAddress method ---- - -# getDefaultSingleSignerValidationModuleAddress - -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. - -## Import - -```ts -import { getDefaultSingleSignerValidationModuleAddress } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { getDefaultSingleSignerValidationModuleAddress } from "@account-kit/smart-contracts"; -import { Chain, Address } from "viem"; - -const chain: Chain = ... -const singleSignerValidationAddress: Address = getDefaultSingleSignerValidationModuleAddress(chain); -``` - -## Parameters - -### 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 diff --git a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultTimeRangeModuleAddress.mdx b/site/pages/reference/account-kit/smart-contracts/functions/getDefaultTimeRangeModuleAddress.mdx deleted file mode 100644 index 3de832b874..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultTimeRangeModuleAddress.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -# This file is autogenerated -title: getDefaultTimeRangeModuleAddress -description: Overview of the getDefaultTimeRangeModuleAddress method ---- - -# getDefaultTimeRangeModuleAddress - -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. - -## Import - -```ts -import { getDefaultTimeRangeModuleAddress } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { getDefaultTimeRangeModuleAddress } from "@account-kit/smart-contracts"; -import { Chain, Address } from "viem"; - -const chain: Chain = ... -const timeRangeModuleAddress: Address = getDefaultTimeRangeModuleAddress(chain); -``` - -## Parameters - -### 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 diff --git a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultWebauthnValidationModuleAddress.mdx b/site/pages/reference/account-kit/smart-contracts/functions/getDefaultWebauthnValidationModuleAddress.mdx deleted file mode 100644 index fd27c9dac5..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/getDefaultWebauthnValidationModuleAddress.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -# This file is autogenerated -title: getDefaultWebauthnValidationModuleAddress -description: Overview of the getDefaultWebauthnValidationModuleAddress method ---- - -# getDefaultWebauthnValidationModuleAddress - -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. - -## Import - -```ts -import { getDefaultWebauthnValidationModuleAddress } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { getDefaultWebauthnValidationModuleAddress } from "@account-kit/smart-contracts"; -import { Chain, Address } from "viem"; - -const chain: Chain = ... -const webauthnValidationAddress: Address = getDefaultWebauthnValidationModuleAddress(chain); -``` - -## Parameters - -### 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 diff --git a/site/pages/reference/account-kit/smart-contracts/functions/installValidationActions.mdx b/site/pages/reference/account-kit/smart-contracts/functions/installValidationActions.mdx deleted file mode 100644 index 602162dacc..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/installValidationActions.mdx +++ /dev/null @@ -1,69 +0,0 @@ ---- -# This file is autogenerated - -title: installValidationActions -description: Overview of the installValidationActions method ---- - -# installValidationActions - -Provides validation installation and uninstallation functionalities for a MA v2 client, ensuring compatibility with `SmartAccountClient`. - -## Import - -```ts -import { installValidationActions } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { createSMAV2AccountClient, installValidationActions, getDefaultSingleSignerValidationModuleAddress, SingleSignerValidationModule } from "@account-kit/smart-contracts"; -import { Address } from "viem"; - -const client = (await createSMAV2AccountClient({ ... })).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: [], -}); - -``` - -## Parameters - -### client - -`object` - -- The client instance which provides account and sendUserOperation functionality. - - ## Returns - - `object` - -- An object containing two methods, `installValidation` and `uninstallValidation`. diff --git a/site/pages/reference/account-kit/smart-contracts/functions/nativeSMASigner.mdx b/site/pages/reference/account-kit/smart-contracts/functions/nativeSMASigner.mdx deleted file mode 100644 index 0052b9b056..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/nativeSMASigner.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -# This file is autogenerated -title: nativeSMASigner -description: Overview of the nativeSMASigner method ---- - -# nativeSMASigner - -Creates an object with methods for generating a dummy signature, signing user operation hashes, signing messages, and signing typed data. - -## Import - -```ts -import { nativeSMASigner } from "@account-kit/smart-contracts"; -``` - -## Usage - -```ts -import { nativeSMASigner } from "@account-kit/smart-contracts"; - -import { LocalAccountSigner } from "@aa-sdk/core"; - -const MNEMONIC = "...": - -const account = createSMAV2Account({ config }); - -const signer = LocalAccountSigner.mnemonicToAccountSigner(MNEMONIC); - -const messageSigner = nativeSMASigner(signer, chain, account.address); -``` - -## Parameters - -### signer - -`SmartAccountSigner` -Signer to use for signing operations - -### chain - -`Chain` -Chain object for the signer - -### accountAddress - -`Address` -address of the smart account using this signer - -## Returns - -`object` -an object with methods for signing operations and managing signatures diff --git a/site/pages/reference/account-kit/smart-contracts/functions/serializeHookConfig.mdx b/site/pages/reference/account-kit/smart-contracts/functions/serializeHookConfig.mdx deleted file mode 100644 index 94b6f1f3b1..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/serializeHookConfig.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -# This file is autogenerated - -title: serializeHookConfig -description: Overview of the serializeHookConfig method ---- - -# serializeHookConfig - -Serializes a `HookConfig` object into a `Hex` format by encoding the hook type, presence of post/pre hooks, address, and entity ID. - -## Import - -```ts -import { serializeHookConfig } from "@account-kit/smart-contracts"; -``` - -## Usage - -```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 -}); -``` - -## Parameters - -### config - -`HookConfig` -The hook configuration containing address, entity ID, hook type, and post/pre hook indicators - -## Returns - -`Hex` -The serialized hook configuration in hexadecimal format diff --git a/site/pages/reference/account-kit/smart-contracts/functions/serializeModuleEntity.mdx b/site/pages/reference/account-kit/smart-contracts/functions/serializeModuleEntity.mdx deleted file mode 100644 index a95495eaa9..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/serializeModuleEntity.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -# This file is autogenerated - -title: serializeModuleEntity -description: Overview of the serializeModuleEntity method ---- - -# serializeModuleEntity - -Serializes a module entity into a hexadecimal format by concatenating the module address and entity ID. - -## Import - -```ts -import { serializeModuleEntity } from "@account-kit/smart-contracts"; -``` - -## Usage - -```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, -}); -``` - -## Parameters - -### config - -`ModuleEntity` -The module entity configuration containing the module address and entity ID - -## Returns - -`Hex` -A hexadecimal string representation of the serialized module entity diff --git a/site/pages/reference/account-kit/smart-contracts/functions/serializeValidationConfig.mdx b/site/pages/reference/account-kit/smart-contracts/functions/serializeValidationConfig.mdx deleted file mode 100644 index f66a26e095..0000000000 --- a/site/pages/reference/account-kit/smart-contracts/functions/serializeValidationConfig.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -# This file is autogenerated - -title: serializeValidationConfig -description: Overview of the serializeValidationConfig method ---- - -# 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. - -## Import - -```ts -import { serializeValidationConfig } from "@account-kit/smart-contracts"; -``` - -## Usage - -```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 -}); -``` - -## Parameters - -### config - -`ValidationConfig` -The validation configuration object containing details to serialize - -## Returns - -`Hex` -A hexadecimal string representing the serialized configuration