{"owner":"wevm","repo":"wagmi","hasSkills":true,"totalSkillsCount":16,"totalTokensCount":13884,"categories":["anthropic-skill","plugin-manifest","root-instruction"],"hasMcp":false,"mcpConfig":null,"found":[".agents/skills/wagmi-development/SKILL.md","packages/cli/README.md","packages/connectors/README.md","packages/core/README.md","packages/core/src/query/AGENTS.md","packages/core/src/tempo/AGENTS.md","packages/create-wagmi/README.md","packages/create-wagmi/templates/next/README.md","packages/create-wagmi/templates/vite-react/README.md","packages/create-wagmi/templates/vite-vue/README.md","packages/react/README.md","packages/react/src/hooks/AGENTS.md","packages/react/src/tempo/AGENTS.md","packages/solid/README.md","packages/vue/README.md","site/AGENTS.md"],"skills":{".agents/skills/wagmi-development/SKILL.md":"---\nname: wagmi-development\ndescription: Creates Wagmi features across all layers - core actions, query options, framework bindings. Use when adding new actions, hooks, or working across packages/core, packages/react, packages/vue.\n---\n\n# Wagmi Development\n\nFull-stack patterns for adding Wagmi features. This skill covers Viem-based actions only (not Wagmi config actions).\n\n## Layer Overview\n\n1. **Core Action** (`packages/core/src/actions/`) - Base functionality wrapping Viem\n2. **Query Options** (`packages/core/src/query/`) - TanStack Query integration\n3. **Framework Bindings** - React (`packages/react/src/hooks/`), Vue (`packages/vue/src/composables/`)\n\n---\n\n## 1. Core Action\n\n### Structure\n\n```ts\nimport {\n  type MyActionErrorType as viem_MyActionErrorType,\n  type MyActionParameters as viem_MyActionParameters,\n  type MyActionReturnType as viem_MyActionReturnType,\n  myAction as viem_myAction,\n} from 'viem/actions'\n\nimport type { Config } from '../createConfig.js'\nimport type { ChainIdParameter, ConnectorParameter } from '../types/properties.js'\nimport type { Compute } from '../types/utils.js'\nimport { getAction } from '../utils/getAction.js'\n\nexport type MyActionParameters<config extends Config = Config> = Compute<\n  ChainIdParameter<config> & viem_MyActionParameters\n>\n\nexport type MyActionReturnType = viem_MyActionReturnType\n\nexport type MyActionErrorType = viem_MyActionErrorType\n\n/** https://wagmi.sh/core/api/actions/myAction */\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: MyActionParameters<config>,\n): Promise<MyActionReturnType> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  const action = getAction(client, viem_myAction, 'myAction')\n  return action(rest)\n}\n```\n\n### Key Rules\n\n- **Viem imports**: Prefix with `viem_` (e.g., `viem_getBalance`)\n- **Client access**: \n  - Read-only: `config.getClient({ chainId })`\n  - Wallet: `await getConnectorClient(config, { chainId, connector, account })`\n  - Mixed: Use `getConnectorClient` for account, `getClient` for action (see `estimateGas.ts`)\n- **Parameters**: Add `ChainIdParameter<config>` always. Add `ConnectorParameter` for wallet actions.\n- **Type params**: Mirror Viem's type params for inference. Use `const` modifier for literal inference (abi, args).\n- **Spread**: Omit wagmi-specific props (`chainId`, `connector`) when calling Viem action.\n\n### Testing\n\n**Runtime tests** (`action.test.ts`):\n```ts\nimport { abi, address, config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  await expect(myAction(config, { /* required params */ })).resolves.toMatchInlineSnapshot(`...`)\n})\n\ntest('parameters: chainId', async () => { /* test chainId param */ })\n\ntest('behavior: error case', async () => { /* test error handling */ })\n```\n\n**Type tests** (`action.test-d.ts`) - only if action has type inference:\n```ts\nimport { config } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  const result = await myAction(config, { /* params */ })\n  expectTypeOf(result).toEqualTypeOf<ExpectedType>()\n})\n```\n\n**Type benchmarks** (`action.bench-d.ts`) - only if action has type inference:\n```ts\nimport { attest } from '@ark/attest'\nimport { test } from 'vitest'\nimport type { MyActionParameters } from './myAction.js'\n\ntest('default', () => {\n  type Result = MyActionParameters<typeof abi.erc20, 'balanceOf'>\n  const res = {} as Result\n  attest.instantiations([12345, 'instantiations'])\n  attest(res.args).type.toString.snap(`readonly [account: \\`0x\\${string}\\`]`)\n})\n```\n\n**Wallet action tests**: Connect before, disconnect after:\n```ts\ntest('default', async () => {\n  await connect(config, { connector })\n  await expect(myAction(config, { /* params */ })).resolves.toMatchInlineSnapshot(`...`)\n  await disconnect(config, { connector })\n})\n```\n\n---\n\n## 2. Query Options\n\nQuery (read-only) or Mutation (wallet) options for TanStack Query.\n\n### Query Structure\n\n```ts\nimport {\n  type MyActionErrorType,\n  type MyActionParameters,\n  type MyActionReturnType,\n  myAction,\n} from '../actions/myAction.js'\nimport type { Config } from '../createConfig.js'\nimport type { ScopeKeyParameter } from '../types/properties.js'\nimport type { QueryOptions, QueryParameter } from '../types/query.js'\nimport type { Compute, ExactPartial } from '../types/utils.js'\nimport { filterQueryOptions, structuralSharing } from './utils.js'\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.requiredParam && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.requiredParam) throw new Error('requiredParam is required')\n      const result = await myAction(config, {\n        ...(parameters as MyActionParameters),\n        requiredParam: parameters.requiredParam,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when returning complex objects/arrays\n  }\n}\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\nexport type MyActionData = MyActionQueryFnData\n\nexport function myActionQueryKey<config extends Config>(\n  options: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(options)] as const\n}\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<typeof myActionQueryKey<config>>\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = QueryOptions<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n```\n\n### Mutation Structure\n\n```ts\nimport type { MutationOptions, MutationParameter } from '../types/query.js'\n\nexport type MyActionOptions<config extends Config, context = unknown> = MutationParameter<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>,\n  context\n>\n\nexport function myActionMutationOptions<config extends Config, context>(\n  config: config,\n  options: MyActionOptions<config, context> = {},\n): MyActionMutationOptions<config> {\n  return {\n    ...options.mutation,\n    mutationFn: async (variables) => {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  }\n}\n\nexport type MyActionMutationOptions<config extends Config> = MutationOptions<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>\n>\n```\n\n### Key Rules\n\n- **ExactPartial vs UnionExactPartial**: Use `ExactPartial` for simple types, `UnionExactPartial` for complex unions (contract actions)\n- **enabled**: Based on required params being truthy\n- **structuralSharing**: Include when action returns objects/arrays\n- **filterQueryOptions**: Filters common non-serializable props. Skip props like `onReplaced` manually in query key.\n- **Query key**: Always `['actionName', filterQueryOptions(options)]`\n\n### Testing\n\n```ts\nimport { config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myActionQueryOptions } from './myAction.js'\n\ntest('default', () => {\n  expect(myActionQueryOptions(config, {})).toMatchInlineSnapshot(`\n    {\n      \"enabled\": false,\n      \"queryFn\": [Function],\n      \"queryKey\": [\"myAction\", {}],\n    }\n  `)\n})\n\ntest('enabled', () => {\n  expect(myActionQueryOptions(config, { requiredParam: 'value' }).enabled).toBe(true)\n})\n\ntest('queryFn: calls query fn', async () => {\n  const options = myActionQueryOptions(config, { requiredParam: 'value' })\n  const result = await options.queryFn({ queryKey: options.queryKey } as any)\n  expect(result).toMatchInlineSnapshot(`...`)\n})\n```\n\n---\n\n## 3. Framework Bindings\n\n### React Query Hook\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n    query: parameters.query,\n  })\n  return useQuery(options)\n}\n```\n\n### React Mutation Hook\n\n```ts\n'use client'\nimport { useMutation } from '@tanstack/react-query'\nimport type { Config, ResolvedRegister, MyActionErrorType } from '@wagmi/core'\nimport {\n  type MyActionData,\n  type MyActionMutate,\n  type MyActionMutateAsync,\n  type MyActionOptions,\n  type MyActionVariables,\n  myActionMutationOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { UseMutationReturnType } from '../utils/query.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<config extends Config = Config, context = unknown> =\n  MyActionOptions<config, context> & ConfigParameter<config>\n\nexport type UseMyActionReturnType<config extends Config = Config, context = unknown> =\n  UseMutationReturnType<\n    MyActionData,\n    MyActionErrorType,\n    MyActionVariables<config>,\n    context,\n    MyActionMutate<config, context>,\n    MyActionMutateAsync<config, context>\n  >\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: UseMyActionParameters<config, context> = {},\n): UseMyActionReturnType<config, context> {\n  const config = useConfig(parameters)\n  const options = myActionMutationOptions(config, parameters)\n  const mutation = useMutation(options)\n  type Return = UseMyActionReturnType<config, context>\n  return {\n    ...mutation,\n    mutate: mutation.mutate as Return['mutate'],\n    mutateAsync: mutation.mutateAsync as Return['mutateAsync'],\n  }\n}\n```\n\n### Vue Composable (Query)\n\n```ts\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport { computed } from 'vue'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { DeepMaybeRef } from '../types/ref.js'\nimport { deepUnref } from '../utils/cloneDeep.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<DeepMaybeRef<MyActionOptions<config, selectData> & ConfigParameter<config>>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/vue/api/composables/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const params = computed(() => deepUnref(parameters))\n  const config = useConfig(params)\n  const chainId = useChainId({ config })\n  const options = computed(() =>\n    myActionQueryOptions(config as any, {\n      ...params.value,\n      chainId: params.value.chainId ?? chainId.value,\n      query: params.value.query,\n    }),\n  )\n  return useQuery(options as any) as any\n}\n```\n\n### Framework Rules\n\n| Rule | React | Vue |\n|------|-------|-----|\n| Top directive | `'use client'` | None |\n| Parameters wrapper | `Compute<...>` | `Compute<DeepMaybeRef<...>>` |\n| Reactivity | Direct | `computed()` + `deepUnref()` |\n| Doc URL | `wagmi.sh/react/api/hooks/` | `wagmi.sh/vue/api/composables/` |\n\n**Shared rules:**\n- `ResolvedRegister['config']`: Use in function signature only, not type defs\n- No `enabled`/`structuralSharing` in hooks: Handled by queryOptions\n\n### Testing\n\n**Query hook test-d.ts**:\n```ts\nimport { abi } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('select data', () => {\n  const result = useMyAction({\n    /* params */\n    query: {\n      select(data) {\n        expectTypeOf(data).toEqualTypeOf<ExpectedDataType>()\n        return data\n      },\n    },\n  })\n  expectTypeOf(result.data).toEqualTypeOf<ExpectedDataType>()\n})\n```\n\n**Mutation hook test-d.ts**:\n```ts\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('context', () => {\n  const { mutate } = useMyAction({\n    mutation: {\n      onMutate(variables) {\n        expectTypeOf(variables).toMatchTypeOf<{ /* expected shape */ }>()\n        return { foo: 'bar' }\n      },\n      onError(error, variables, context) { /* test types */ },\n      onSuccess(data, variables, context) { /* test types */ },\n      onSettled(data, error, variables, context) { /* test types */ },\n    },\n  })\n\n  mutate({ /* params */ }, {\n    onSuccess(data, variables, context) { /* test inference */ },\n  })\n})\n```\n\n---\n\n## Exports\n\nAdd to `exports/index.ts` in respective package:\n\n```ts\n// packages/core/src/exports/index.ts\nexport {\n  type MyActionParameters,\n  type MyActionReturnType,\n  type MyActionErrorType,\n  myAction,\n} from '../actions/myAction.js'\n\n// packages/core/src/exports/query.ts\nexport {\n  type MyActionData,\n  type MyActionOptions,\n  type MyActionQueryFnData,\n  type MyActionQueryKey,\n  type MyActionQueryOptions,\n  myActionQueryKey,\n  myActionQueryOptions,\n} from '../query/myAction.js'\n\n// packages/react/src/exports/index.ts\nexport {\n  type UseMyActionParameters,\n  type UseMyActionReturnType,\n  useMyAction,\n} from '../hooks/useMyAction.js'\n```\n\n---\n\n## Verification\n\n```bash\n# Format\npnpm format\n\n# Type check (all or filtered)\npnpm check:types\npnpm --filter @wagmi/core check:types\npnpm --filter wagmi check:types\n\n# Test (all or filtered)\npnpm test\npnpm test --project core\npnpm test --project react\n\n# Update test snapshots\npnpm vitest -u\n\n# Type benchmarks\npnpm bench:types\n\n# Viem version mismatch in test snapshots\npnpm version:update:viem\n\n# Build (all or filtered)\npnpm run clean && pnpm build\npnpm --filter @wagmi/core build\n```\n","packages/cli/README.md":"# @wagmi/cli\n\nManage and generate code from Ethereum ABIs\n\n## Installation\n\n```bash\npnpm add @wagmi/cli\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/connectors/README.md":"# @wagmi/connectors\n\nCollection of connectors for Wagmi\n\n## Installation\n\n```bash\npnpm add @wagmi/connectors @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/core/README.md":"# @wagmi/core\n\nVanillaJS library for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/core/src/query/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for query options\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Options Format\n\n```ts\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.foo && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.foo) throw new Error('foo is required')\n      const result = await myAction(config, {\n        foo: parameters.foo,\n        ...parameters,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when action returns objects, nested values, or arrays\n  }\n}\n\nexport function myActionQueryKey<\n  config extends Config,\n  selectData = MyActionData\n>(\n  parameters: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(parameters)] as const\n}\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<\n    MyActionQueryFnData,\n    MyActionErrorType,\n    selectData,\n    MyActionQueryKey<config>\n  >\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n> = QueryOptions<\n  MyActionQueryFnData,\n  MyActionErrorType,\n  selectData,\n  MyActionQueryKey<config>\n>\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\n\nexport type MyActionData = MyActionQueryFnData\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<\n  typeof myActionQueryKey<config>\n>\n```\n\n## Style Conventions\n\n### `queryFn` Syntax\n\n- Use arrow function property syntax: `queryFn: async (context) =>` (not method shorthand `async queryFn(context)`)\n- Use `context` parameter, not destructuring: `async (context) =>` (not `async ({ queryKey }) =>`)\n- Access `queryKey` via `context.queryKey`\n\n### Destructuring `queryKey`\n\nUse array destructuring with `parameters`, then access properties via `parameters.foo`:\n\n```ts\n// ✓ Correct\nconst [, { scopeKey: _, ...parameters }] = context.queryKey\nif (!parameters.account) throw new Error('account is required')\n\n// ✗ Avoid\nconst { account, scopeKey: _, ...parameters } = context.queryKey[1]\n```\n\n### Calling Actions\n\nWhen calling actions, spread parameters first, then pass required parameters:\n\n```ts\n// ✓ Correct - spread, then explicit required param\nreturn myAction(config, { ...parameters, foo: parameters.foo })\n\n// ✗ Avoid - just passing parameters directly\nreturn myAction(config, parameters)\n```\n\n### Accessing Skipped Properties\n\nProperties filtered from the queryKey (e.g., `connector`, `abi`) should be accessed via `options.`:\n\n```ts\nqueryFn: async (context) => {\n  const [, { scopeKey: _, ...parameters }] = context.queryKey\n  // ✓ Use rest.connector for properties not in queryKey\n  const result = await myAction(config, { ...parameters, connector: options.connector })\n  return result ?? null\n}\n```\n\n## Type Parameter Nuances\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function readContractQueryOptions<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config,\n>\n```\n\n### `ExactPartial` vs `UnionExactPartial`\n\n- **`ExactPartial`**: Use for simple cases with straightforward parameter types\n- **`UnionExactPartial`**: Use for complex type inference or action parameter types with lots of unions (e.g., contract-related actions)\n\nIf unsure, check the underlying action's parameter types or ask.\n\n### Default Parameter Value\n\n- **Simple cases**: `options: MyActionOptions<config, selectData> = {}`\n- **Complex generics** (e.g., contract actions with abi/args): `options: MyActionOptions<...> = {} as any`\n\n## `structuralSharing`\n\nInclude `structuralSharing` from `./utils.js` when the action returns:\n- Objects\n- Nested values  \n- Arrays\n\nSee `packages/react/src/hooks` for more examples.\n\n## Special Query Key Handling\n\nFor `getConnectorClient`, include `connectorUid` separately in the query key:\n\n```ts\nreturn [\n  'connectorClient',\n  { ...filterQueryOptions(options), connectorUid: options.connector?.uid },\n] as const\n```\n","packages/core/src/tempo/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for `@wagmi/core/tempo`.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Code Generation\n\n### Wagmi Actions\n\nWhen generating Wagmi actions (in `actions/`), follow these guidelines.\n\nAn example of a generated action set can be found in `actions/fee.ts`.\n\n#### Source of Truth\n\n- **All actions must be based on their corresponding Viem actions** from `import { Actions } from viem/tempo` (local path might be `../viem/src/tempo/actions` or you can clone `gh repo clone wevm/viem`)\n- Wagmi actions are wrappers around Viem actions that integrate with Wagmi's config and TanStack Query\n\n#### Documentation Requirements\n\nAll actions **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the action does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (`createConfig`, `http`, action imports)\n   - Config setup with chains and transports\n   - Action usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **`@param` tags** - For each parameter (config, parameters)\n4. **`@returns` tag** - Description of the return value\n\nExample:\n```ts\n/**\n * Gets the user's default fee token.\n *\n * @example\n * ```ts\n * import { createConfig, http } from '@wagmi/core'\n * import { tempo } from '@wagmi/core/chains'\n * import { Actions } from '@wagmi/core/tempo'\n *\n * const config = createConfig({\n *   chains: [tempo],\n *   transports: {\n *     [tempo.id]: http(),\n *   },\n * })\n *\n * const token = await Actions.fee.getUserToken(config, {\n *   account: '0x...',\n * })\n * ```\n *\n * @param config - Config.\n * @param parameters - Parameters.\n * @returns The user's fee token address.\n */\n```\n\n#### Action Types\n\n##### Query-based Actions (Read-Only)\n\nFor read-only actions that fetch data:\n\n- Return the result from the corresponding Viem action\n- Parameters include `ChainIdParameter<config>` and the Viem action's parameters\n- Must include query utilities for TanStack Query integration\n\n```ts\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue<config>> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  return viem_Actions.myAction(client, rest)\n}\n```\n\n##### Mutation-based Actions (Write)\n\nFor state-changing actions, both variants must be implemented:\n\n**1. Standard Variant**\n\n- Uses `getConnectorClient` to get the wallet client\n- Returns the result from the corresponding Viem action\n- Does not wait for transaction confirmation\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myAction(\n    client,\n    parameters as viem_Actions.myAction.Parameters,\n  )\n}\n```\n\n**2. Sync Variant (`*Sync`)**\n\n- Named with `Sync` suffix (e.g., `setUserTokenSync`)\n- Uses `getConnectorClient` to get the wallet client\n- Waits for transaction inclusion on a block before returning a response\n- Returns both the receipt and extracted event data\n\n```ts\nexport async function myActionSync<config extends Config>(\n  config: config,\n  parameters: myActionSync.Parameters<config>,\n): Promise<myActionSync.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myActionSync(\n    client,\n    parameters as viem_Actions.myActionSync.Parameters,\n  )\n}\n```\n\n#### Namespace Properties\n\n##### Query-based Actions\n\nAll query-based actions must include the following components:\n\n- Include `enabled` logic to disable the query when required reactive parameters (e.g. addresses) are undefined\n- The `enabled` conditional must check ALL required reactive parameters (e.g., `account && spender` for allowance checks)\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nimport { filterQueryOptions } from './utils.js'\nimport type { QueryOptions, QueryParameter } from './utils.js'\n\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    viem_Actions.myAction.Parameters\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n\n  export function queryKey<config extends Config>(\n    parameters: Parameters<config>,\n  ) {\n    return ['myAction', filterQueryOptions(parameters)] as const\n  }\n\n  export type QueryKey<config extends Config> = ReturnType<\n    typeof queryKey<config>\n  >\n\n  export function queryOptions<config extends Config, selectData = ReturnValue>(\n    config: Config,\n    parameters: queryOptions.Parameters<config, selectData>,\n  ): queryOptions.ReturnValue<config, selectData> {\n    const { query, ...rest } = parameters\n    return {\n      ...query,\n      enabled: Boolean(rest.account && (query?.enabled ?? true)),\n      queryKey: queryKey(rest),\n      async queryFn(context) {\n        const [, parameters] = context.queryKey\n        return await myAction(config, parameters)\n      },\n    }\n  }\n\n  export declare namespace queryOptions {\n    export type Parameters<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = myAction.Parameters<config> &\n      QueryParameter<\n        myAction.ReturnValue,\n        myAction.ErrorType,\n        selectData,\n        myAction.QueryKey<config>\n      >\n\n    export type ReturnValue<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = QueryOptions<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    >\n  }\n}\n```\n\n##### Mutation-based Actions\n\nAll mutation-based actions must include the following components:\n\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport declare namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myAction.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n}\n\nexport declare namespace myActionSync {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myActionSync.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myActionSync.ReturnValue\n\n  export type ErrorType = viem_Actions.myActionSync.ErrorType\n}\n```\n\n#### Testing\n\nTests should be co-located with actions in `*action-name*.test.ts` files.\n\n**Important**: Wagmi action tests should follow the same test flows as the corresponding Viem action tests in `src/tempo/actions/`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that Wagmi tests use `config` instead of `client`, and mutation actions don't require explicit `account` parameters since they use the connector's account.\n\nSee `actions/token.test.ts` for a comprehensive example of test patterns and structure.\n\n##### Test Structure\n\nOrganize tests by action name with a default test case. Use namespace imports for cleaner code:\n\n```ts\nimport { connect } from '@wagmi/core'\nimport { accounts,  config, queryClient } from '@wagmi/test/tempo'\nimport { describe, expect, test } from 'vitest'\nimport * as myNamespace from './myNamespace.js'\n\nconst account = accounts[0]\n\n// Query-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    const result = await myNamespace.myAction(config, {\n      // ...\n    })\n    expect(result).toMatchInlineSnapshot(`...`)\n  })\n\n  describe('queryOptions', () => {\n    test('default', async () => {\n      const options = myNamespace.myAction.queryOptions(config, {\n        // ...\n      })\n      expect(await queryClient.fetchQuery(options)).toMatchInlineSnapshot(`...`)\n    })\n  })\n})\n\n// Mutation-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    // e.g., create tokens, grant roles, mint tokens, etc.\n    \n    const hash = await myNamespace.myAction(config, {\n      // ... (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n  })\n})\n\ndescribe('myActionSync', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    \n    const result = await myNamespace.myActionSync(config, {\n      // ... (no account parameter needed)\n    })\n    expect(result).toBeDefined()\n  })\n})\n```\n","packages/create-wagmi/README.md":"# create-wagmi\n\nGet up and running quickly with [Wagmi](https://wagmi.sh) by using the `create-wagmi` CLI.\n\n## Installation\n\n```bash\nnpm create wagmi\n# or\npnpm create wagmi\n# or\nyarn create wagmi\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh/cli/create-wagmi).\n","packages/create-wagmi/templates/next/README.md":"This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","packages/create-wagmi/templates/vite-react/README.md":"This is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","packages/create-wagmi/templates/vite-vue/README.md":"This is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","packages/react/README.md":"# wagmi\n\nReact Hooks for Ethereum\n\n## Installation\n\n```bash\npnpm add wagmi viem @tanstack/react-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/react/src/hooks/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for React hooks\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Hook Format\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  })\n  return useQuery(options)\n}\n```\n\n## Key Patterns\n\n### `'use client'` Directive\n\nAll hooks must start with `'use client'` directive.\n\n### `useConfig` and `useChainId`\n\nQuery hooks always call these to get config from React context and current chain:\n\n```ts\nconst config = useConfig(parameters)\nconst chainId = useChainId({ config })\n```\n\n### `ResolvedRegister['config']`\n\nUse `ResolvedRegister['config']` as default for `config` in the **function signature only** (not in type definitions). This allows type inference when config is injected via React context:\n\n```ts\n// Type definition uses Config\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = ...\n\n// Function uses ResolvedRegister['config']\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(...) { ... }\n```\n\n### `enabled` and `structuralSharing`\n\nDo NOT set `enabled` or `structuralSharing` in hooks. These are handled by `queryOptions` from `@wagmi/core/query`.\n\n### Doc Comment\n\nUse a simple link to the docs:\n\n```ts\n/** https://wagmi.sh/react/api/hooks/useMyAction */\n```\n\n## Type Parameter Nuances\n\n### `Compute` vs `UnionCompute`\n\n- **`Compute`**: Use for simple hooks with straightforward parameter types\n- **`UnionCompute`**: Use for complex type inference (e.g., contract-related hooks)\n- **Neither**: Some hooks with very complex inference may not support either\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function useReadContract<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config = ResolvedRegister['config'],\n  selectData = ReadContractData<abi, functionName, args>,\n>\n```\n\n### Default Parameter Value\n\n- **Simple cases**: `parameters: UseMyActionParameters<config, selectData> = {}`\n- **Complex generics**: `parameters: UseMyActionParameters<...> = {} as any`\n","packages/react/src/tempo/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for `wagmi/tempo` Hooks.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Wagmi Hooks\n\nWhen generating Wagmi hooks (in `hooks/`), follow these guidelines.\n\nAn example of a generated hook set can be found in `hooks/fee.ts`.\n\n### Source of Truth\n\n- **All hooks must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Wagmi hooks are React hooks that wrap Wagmi actions with TanStack Query's `useQuery` and `useMutation`\n- If the Wagmi action is unclear or missing, implement the Wagmi action first\n\n### Documentation Requirements\n\nAll hooks **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the hook does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (hook imports)\n   - React component usage\n   - Hook usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **@param parameters** - Parameters description\n4. **`@returns` tag** - Description of the return value\n\nExample:\n\n```typescript\n/**\n * Hook for getting the user's default fee token.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   const { data, isLoading } = Hooks.fee.useUserToken({\n *     account: '0x20c...0055',\n *   })\n *   if (isLoading) return <div>Loading...</div>\n *   return <div>Token: {data?.address}</div>\n * }\n * ```\n * \n * @param parameters - Parameters.\n * @returns Query result with token address and ID.\n */\n```\n\n### Query Hooks\n\nFor read-only hooks that fetch data:\n\n- Use `useQuery` from `../../utils/query.js`\n- Use `useConfig` and `useChainId` from `../../hooks/(useChainId|useConfig).js`\n- Call the corresponding action's `queryOptions` function\n- All parameters should be optional. Use `ExactPartial` to make all query parameters optional\n- Support optional `query` parameter for TanStack Query options\n- Default `parameters` to `{}` only if all parameters are truly optional (no required non-reactive parameters like `token`, `role`, etc.)\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<config, selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myAction.queryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  } as never)\n  return useQuery(options)\n}\n```\n\n### Mutation Hooks\n\nFor state-changing hooks, both variants must be implemented:\n\n**1. Standard Variant**\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  })\n}\n```\n\n**2. Sync Variant (`use*Sync`)**\n\n```typescript\nexport function useMyActionSync<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyActionSync.Parameters<config, context> = {},\n): useMyActionSync.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myActionSync(config, variables)\n    },\n    mutationKey: ['myActionSync'],\n  })\n}\n```\n\n### Watch Hooks\n\nFor event watching hooks:\n\n- Call the corresponding action's watch function inside `useEffect`\n- All parameters should be optional using `ExactPartial`\n- Include an `enabled` parameter (defaults to `true`) to control whether the watcher is active\n- Check if all required properties (like the callback) are defined before setting up the watcher\n- Include all optional properties for `rest` in the dependency array (e.g. `rest.foo`, `rest.bar`, `rest.baz`)\n- Return the unwatch function from the `useEffect` for cleanup\n\nAll watch hooks must include comprehensive JSDoc with:\n1. **Function description** - What events the hook watches for\n2. **`@example` block** - Complete working example showing hook usage in a React component\n3. **`@param` tag** - Parameters description\n\n```typescript\n/**\n * Hook for watching TIP20 token mint events.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   Hooks.token.useWatchMint({\n *     onMint(args) {\n *       console.log('Mint:', args)\n *     },\n *   })\n *   return <div>Watching for mints...</div>\n * }\n * ```\n *\n * @param parameters - Parameters.\n */\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) {\n  const { enabled = true, onMyEvent, ...rest } = parameters\n\n  const config = useConfig({ config: parameters.config })\n  const configChainId = useChainId({ config })\n  const chainId = parameters.chainId ?? configChainId\n\n  useEffect(() => {\n    if (!enabled) return\n    if (!onMyEvent) return\n    return Actions.watchMyEvent(config, {\n      ...rest,\n      chainId,\n      onMyEvent,\n    })\n  }, [config, enabled, onMyEvent, rest.foo, rest.bar, rest.baz])\n}\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n### Namespace Properties\n\n#### Query Hooks\n\nAll query hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<selectData> { ... }\n\nexport declare namespace useMyAction {\n  export type Parameters<\n    config extends Config = ResolvedRegister['config'],\n    selectData = myAction.ReturnValue,\n  > = ConfigParameter<config> &\n    QueryParameter<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    > &\n    ExactPartial<myAction.Parameters<config>>\n\n  export type ReturnValue<selectData = myAction.ReturnValue> =\n    UseQueryReturnType<selectData, Error>\n}\n```\n\n**Note:** Use `ExactPartial<T>` to make all query parameters optional. This ensures that reactive parameters can be undefined initially and populated later for proper reactivity.\n\n#### Watch Hooks\n\nAll watch hooks must include the following components:\n\n```typescript\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) { ... }\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n**Note:** Watch hooks don't have a return value - they set up event listeners in a `useEffect` and automatically clean up when the component unmounts or dependencies change.\n\n#### Mutation Hooks\n\nAll mutation hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> { ... }\n\nexport declare namespace useMyAction {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myAction.ReturnValue,\n          myAction.ErrorType,\n          myAction.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myAction.ReturnValue,\n    myAction.ErrorType,\n    myAction.Parameters<config>,\n    context\n  >\n}\n\nexport declare namespace useMyActionSync {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myActionSync.ReturnValue,\n          myActionSync.ErrorType,\n          myActionSync.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myActionSync.ReturnValue,\n    myActionSync.ErrorType,\n    myActionSync.Parameters<config>,\n    context\n  >\n}\n```\n\n### Testing\n\nTests should be co-located with hooks in `myNamespace.test.ts` files.\n\n**Important**: Wagmi hook tests should follow the same test flows as the corresponding Wagmi action tests in `@wagmi/core/tempo`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that hooks use React rendering patterns with `renderHook`, and mutation hooks don't require explicit `account` parameters in `mutateAsync` calls since they use the connector's account.\n\nSee `hooks/fee.test.ts` for a comprehensive example of test patterns and structure.\n\n#### Test Structure\n\nOrganize tests by hook name with a default test case. Use namespace imports for cleaner code when importing hooks:\n\n```typescript\nimport { type Address } from 'viem'\nimport { describe, expect, test, vi } from 'vitest'\nimport { useConnect } from 'wagmi'\nimport { accounts, config, renderHook } from '@wagmi/test/tempo'\nimport * as myNamespace from './myNamespace.js'\n\n// Query hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() =>\n      myNamespace.useMyAction({ account: account.address }),\n    )\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n\n  test('reactivity: account parameter', async () => {\n    const { result, rerender } = await renderHook(\n      (props) =>\n        myNamespace.useMyAction({ account: props?.account }),\n      { initialProps: { account: undefined as Address | undefined } },\n    )\n\n    await vi.waitFor(() => result.current.fetchStatus === 'fetching')\n\n    // Should be disabled when account is undefined\n    expect(result.current.data).toBeUndefined()\n    expect(result.current.isPending).toBe(true)\n    // expect(result.current.isEnabled).toBe(false) // TODO: Disabled until @tanstack/react-query bumped to latest\n\n    // Set account\n    rerender({ account: account.address })\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    // Should now be enabled and have data\n    expect(result.current.isEnabled).toBe(true)\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n})\n\n// Mutation hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyAction(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n    // e.g., create tokens, grant roles, etc. using the action's mutateAsync\n\n    const hash = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\ndescribe('useMyActionSync', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyActionSync(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n\n    const data = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(data).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\n// Watch hooks\ndescribe('useWatchMyEvent', () => {\n  test('default', async () => {\n    const { result: connectResult } = await renderHook(() => ({\n      connect: useConnect(),\n      createSync: myNamespace.useCreateSync(),\n      // ... any other setup hooks needed\n    }))\n\n    await connectResult.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup (e.g., create token, grant roles)\n\n    const events: any[] = []\n    await renderHook(() =>\n      myNamespace.useWatchMyEvent({\n        // ... parameters\n        onMyEvent(args) {\n          events.push(args)\n        },\n      }),\n    )\n\n    // Trigger the event by calling a sync action\n    // e.g., await connectResult.current.myActionSync.mutateAsync({ ... })\n\n    await vi.waitUntil(() => events.length >= 1)\n\n    expect(events.length).toBeGreaterThanOrEqual(1)\n    expect(events[0]?.someField).toBe(expectedValue)\n  })\n})\n```\n","packages/solid/README.md":"# @wagmi/solid\n\nSolid Primitives for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/solid viem @tanstack/solid-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n","packages/vue/README.md":"# @wagmi/vue\n\nVue Composables for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/vue viem @tanstack/vue-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n","site/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for the Wagmi documentation site.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Tempo\n\n- All Tempo documentation must be added under the `/tempo` sidebar item.\n\n## Wagmi Actions\n\n- **All documentation must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Make sure you update `site/tempo/actions/index.md` for new actions\n\n### Query Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// @filename: example.ts\n// ---cut---\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result = await Actions.amm.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', result)\n// @log: Result: 10500000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`bigint`\n\ndescription\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n### baz (optional)\n\n- **Type:** `Hex`\n\ndescription\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Mutation Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result =\n  await Actions.namespace.actionSync(config, {\n    foo: '0x...',\n    bar: 123n,\n  })\n\nconsole.log('Foo:', result.foo)\n// @log: Foo: 5250000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `namespace.action` action and wait for inclusion manually:\n\n```ts\nimport { Actions as viem_Actions } from 'viem/tempo'\nimport { Actions } from 'wagmi/tempo'\nimport { waitForTransactionReceipt } from 'wagmi/actions'\n\nconst hash = await Actions.namespace.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\nconst receipt = await waitForTransactionReceipt(config, { hash })\n\nconst { args: { baz } } \n  = viem_Actions.namespace.action.extractEvent(receipt.logs)\n```\n\n## Return Type\n\ndescription\n\n```ts\ntype ReturnType = {\n  /** description */\n  baz: bigint\n}\n```\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n<!--@include: @shared/tempo-write-parameters.md-->\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Watch Actions\n\n````md\n# `namespace.watchAction`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst unwatch = Actions.namespace.watchAction(config, {\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n\n// Later, stop watching\nunwatch()\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`() => void`\n\nReturns a function to unsubscribe from the event.\n\n## Parameters\n\n### onAction\n\n- **Type:** `function`\n\n```ts\ndeclare function onBurn(args: Args, log: Log): void\n\ntype Args = {\n  /** description */\n  foo: bigint\n  /** description */\n  barBaz: bigint\n}\n```\n\nCallback to invoke when action occurs.\n\n### fromBlock (optional)\n\n- **Type:** `bigint`\n\nBlock to start listening from.\n\n### onError (optional)\n\n- **Type:** `function`\n\n```ts\ndeclare function onError(error: Error): void\n```\n\nThe callback to call when an error occurred when trying to get for a new block.\n\n### poll (optional)\n\n- **Type:** `true`\n\nEnable polling mode.\n\n### pollingInterval (optional)\n\n- **Type:** `number`\n\nPolling frequency (in ms). Defaults to Client's pollingInterval config.\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n## Wagmi Hooks\n\n- **All documentation must be based on their corresponding Wagmi hooks** from `wagmi/tempo` (`packages/react/src/tempo/`)\n- Make sure you update `site/tempo/hooks/index.md` for new actions\n\n### Query Hooks\n\nAn example of a generated hook set can be found in `hooks/amm.useLiquidityBalance.ts`. Template example:\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst { data: result } = Hooks.namespace.useHook({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', resut)\n// @log: Result: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\nSee [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n## Parameters\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n### query\n\nSee the [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Mutation Hooks\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst actionNameSync = Hooks.namespace.useHookSync()\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionNameSync.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Received baz:', actionNameSync.data?.baz)\n// @log: Received baz: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `amm.burn` action and wait for inclusion manually:\n\n```ts\nimport { Actions } from 'viem/tempo'\nimport { Hooks } from 'wagmi/tempo'\nimport { useWaitForTransactionReceipt } from 'wagmi'\n\nconst actionName = Hooks.namespace.useHook()\nconst { data: receipt } = useWaitForTransactionReceipt({ hash: actionName.data })\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionName.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nif (receipt) {\n  const { args: { baz } } \n    = Actions.namespace.action.extractEvent(receipt.logs)\n}\n```\n\n## Return Type\n\nSee [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n### mutate/mutateAsync\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n## Parameters\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n### mutation\n\nSee the [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Watch Hooks\n\n````md\n# `namespace.useWatchHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nHooks.amm.useWatchHook({\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Parameters\n\nSee [Wagmi Action `namespace.watchAction` Parameters](/tempo/actions/namespace.watchAction#parameters)\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n- [`namespace.watchAction`](/tempo/actions/namespace.watchAction)\n````\n"},"files":{".agents/skills/wagmi-development/SKILL.md":"---\nname: wagmi-development\ndescription: Creates Wagmi features across all layers - core actions, query options, framework bindings. Use when adding new actions, hooks, or working across packages/core, packages/react, packages/vue.\n---\n\n# Wagmi Development\n\nFull-stack patterns for adding Wagmi features. This skill covers Viem-based actions only (not Wagmi config actions).\n\n## Layer Overview\n\n1. **Core Action** (`packages/core/src/actions/`) - Base functionality wrapping Viem\n2. **Query Options** (`packages/core/src/query/`) - TanStack Query integration\n3. **Framework Bindings** - React (`packages/react/src/hooks/`), Vue (`packages/vue/src/composables/`)\n\n---\n\n## 1. Core Action\n\n### Structure\n\n```ts\nimport {\n  type MyActionErrorType as viem_MyActionErrorType,\n  type MyActionParameters as viem_MyActionParameters,\n  type MyActionReturnType as viem_MyActionReturnType,\n  myAction as viem_myAction,\n} from 'viem/actions'\n\nimport type { Config } from '../createConfig.js'\nimport type { ChainIdParameter, ConnectorParameter } from '../types/properties.js'\nimport type { Compute } from '../types/utils.js'\nimport { getAction } from '../utils/getAction.js'\n\nexport type MyActionParameters<config extends Config = Config> = Compute<\n  ChainIdParameter<config> & viem_MyActionParameters\n>\n\nexport type MyActionReturnType = viem_MyActionReturnType\n\nexport type MyActionErrorType = viem_MyActionErrorType\n\n/** https://wagmi.sh/core/api/actions/myAction */\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: MyActionParameters<config>,\n): Promise<MyActionReturnType> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  const action = getAction(client, viem_myAction, 'myAction')\n  return action(rest)\n}\n```\n\n### Key Rules\n\n- **Viem imports**: Prefix with `viem_` (e.g., `viem_getBalance`)\n- **Client access**: \n  - Read-only: `config.getClient({ chainId })`\n  - Wallet: `await getConnectorClient(config, { chainId, connector, account })`\n  - Mixed: Use `getConnectorClient` for account, `getClient` for action (see `estimateGas.ts`)\n- **Parameters**: Add `ChainIdParameter<config>` always. Add `ConnectorParameter` for wallet actions.\n- **Type params**: Mirror Viem's type params for inference. Use `const` modifier for literal inference (abi, args).\n- **Spread**: Omit wagmi-specific props (`chainId`, `connector`) when calling Viem action.\n\n### Testing\n\n**Runtime tests** (`action.test.ts`):\n```ts\nimport { abi, address, config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  await expect(myAction(config, { /* required params */ })).resolves.toMatchInlineSnapshot(`...`)\n})\n\ntest('parameters: chainId', async () => { /* test chainId param */ })\n\ntest('behavior: error case', async () => { /* test error handling */ })\n```\n\n**Type tests** (`action.test-d.ts`) - only if action has type inference:\n```ts\nimport { config } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  const result = await myAction(config, { /* params */ })\n  expectTypeOf(result).toEqualTypeOf<ExpectedType>()\n})\n```\n\n**Type benchmarks** (`action.bench-d.ts`) - only if action has type inference:\n```ts\nimport { attest } from '@ark/attest'\nimport { test } from 'vitest'\nimport type { MyActionParameters } from './myAction.js'\n\ntest('default', () => {\n  type Result = MyActionParameters<typeof abi.erc20, 'balanceOf'>\n  const res = {} as Result\n  attest.instantiations([12345, 'instantiations'])\n  attest(res.args).type.toString.snap(`readonly [account: \\`0x\\${string}\\`]`)\n})\n```\n\n**Wallet action tests**: Connect before, disconnect after:\n```ts\ntest('default', async () => {\n  await connect(config, { connector })\n  await expect(myAction(config, { /* params */ })).resolves.toMatchInlineSnapshot(`...`)\n  await disconnect(config, { connector })\n})\n```\n\n---\n\n## 2. Query Options\n\nQuery (read-only) or Mutation (wallet) options for TanStack Query.\n\n### Query Structure\n\n```ts\nimport {\n  type MyActionErrorType,\n  type MyActionParameters,\n  type MyActionReturnType,\n  myAction,\n} from '../actions/myAction.js'\nimport type { Config } from '../createConfig.js'\nimport type { ScopeKeyParameter } from '../types/properties.js'\nimport type { QueryOptions, QueryParameter } from '../types/query.js'\nimport type { Compute, ExactPartial } from '../types/utils.js'\nimport { filterQueryOptions, structuralSharing } from './utils.js'\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.requiredParam && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.requiredParam) throw new Error('requiredParam is required')\n      const result = await myAction(config, {\n        ...(parameters as MyActionParameters),\n        requiredParam: parameters.requiredParam,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when returning complex objects/arrays\n  }\n}\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\nexport type MyActionData = MyActionQueryFnData\n\nexport function myActionQueryKey<config extends Config>(\n  options: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(options)] as const\n}\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<typeof myActionQueryKey<config>>\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = QueryOptions<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n```\n\n### Mutation Structure\n\n```ts\nimport type { MutationOptions, MutationParameter } from '../types/query.js'\n\nexport type MyActionOptions<config extends Config, context = unknown> = MutationParameter<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>,\n  context\n>\n\nexport function myActionMutationOptions<config extends Config, context>(\n  config: config,\n  options: MyActionOptions<config, context> = {},\n): MyActionMutationOptions<config> {\n  return {\n    ...options.mutation,\n    mutationFn: async (variables) => {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  }\n}\n\nexport type MyActionMutationOptions<config extends Config> = MutationOptions<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>\n>\n```\n\n### Key Rules\n\n- **ExactPartial vs UnionExactPartial**: Use `ExactPartial` for simple types, `UnionExactPartial` for complex unions (contract actions)\n- **enabled**: Based on required params being truthy\n- **structuralSharing**: Include when action returns objects/arrays\n- **filterQueryOptions**: Filters common non-serializable props. Skip props like `onReplaced` manually in query key.\n- **Query key**: Always `['actionName', filterQueryOptions(options)]`\n\n### Testing\n\n```ts\nimport { config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myActionQueryOptions } from './myAction.js'\n\ntest('default', () => {\n  expect(myActionQueryOptions(config, {})).toMatchInlineSnapshot(`\n    {\n      \"enabled\": false,\n      \"queryFn\": [Function],\n      \"queryKey\": [\"myAction\", {}],\n    }\n  `)\n})\n\ntest('enabled', () => {\n  expect(myActionQueryOptions(config, { requiredParam: 'value' }).enabled).toBe(true)\n})\n\ntest('queryFn: calls query fn', async () => {\n  const options = myActionQueryOptions(config, { requiredParam: 'value' })\n  const result = await options.queryFn({ queryKey: options.queryKey } as any)\n  expect(result).toMatchInlineSnapshot(`...`)\n})\n```\n\n---\n\n## 3. Framework Bindings\n\n### React Query Hook\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n    query: parameters.query,\n  })\n  return useQuery(options)\n}\n```\n\n### React Mutation Hook\n\n```ts\n'use client'\nimport { useMutation } from '@tanstack/react-query'\nimport type { Config, ResolvedRegister, MyActionErrorType } from '@wagmi/core'\nimport {\n  type MyActionData,\n  type MyActionMutate,\n  type MyActionMutateAsync,\n  type MyActionOptions,\n  type MyActionVariables,\n  myActionMutationOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { UseMutationReturnType } from '../utils/query.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<config extends Config = Config, context = unknown> =\n  MyActionOptions<config, context> & ConfigParameter<config>\n\nexport type UseMyActionReturnType<config extends Config = Config, context = unknown> =\n  UseMutationReturnType<\n    MyActionData,\n    MyActionErrorType,\n    MyActionVariables<config>,\n    context,\n    MyActionMutate<config, context>,\n    MyActionMutateAsync<config, context>\n  >\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: UseMyActionParameters<config, context> = {},\n): UseMyActionReturnType<config, context> {\n  const config = useConfig(parameters)\n  const options = myActionMutationOptions(config, parameters)\n  const mutation = useMutation(options)\n  type Return = UseMyActionReturnType<config, context>\n  return {\n    ...mutation,\n    mutate: mutation.mutate as Return['mutate'],\n    mutateAsync: mutation.mutateAsync as Return['mutateAsync'],\n  }\n}\n```\n\n### Vue Composable (Query)\n\n```ts\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport { computed } from 'vue'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { DeepMaybeRef } from '../types/ref.js'\nimport { deepUnref } from '../utils/cloneDeep.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<DeepMaybeRef<MyActionOptions<config, selectData> & ConfigParameter<config>>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/vue/api/composables/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const params = computed(() => deepUnref(parameters))\n  const config = useConfig(params)\n  const chainId = useChainId({ config })\n  const options = computed(() =>\n    myActionQueryOptions(config as any, {\n      ...params.value,\n      chainId: params.value.chainId ?? chainId.value,\n      query: params.value.query,\n    }),\n  )\n  return useQuery(options as any) as any\n}\n```\n\n### Framework Rules\n\n| Rule | React | Vue |\n|------|-------|-----|\n| Top directive | `'use client'` | None |\n| Parameters wrapper | `Compute<...>` | `Compute<DeepMaybeRef<...>>` |\n| Reactivity | Direct | `computed()` + `deepUnref()` |\n| Doc URL | `wagmi.sh/react/api/hooks/` | `wagmi.sh/vue/api/composables/` |\n\n**Shared rules:**\n- `ResolvedRegister['config']`: Use in function signature only, not type defs\n- No `enabled`/`structuralSharing` in hooks: Handled by queryOptions\n\n### Testing\n\n**Query hook test-d.ts**:\n```ts\nimport { abi } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('select data', () => {\n  const result = useMyAction({\n    /* params */\n    query: {\n      select(data) {\n        expectTypeOf(data).toEqualTypeOf<ExpectedDataType>()\n        return data\n      },\n    },\n  })\n  expectTypeOf(result.data).toEqualTypeOf<ExpectedDataType>()\n})\n```\n\n**Mutation hook test-d.ts**:\n```ts\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('context', () => {\n  const { mutate } = useMyAction({\n    mutation: {\n      onMutate(variables) {\n        expectTypeOf(variables).toMatchTypeOf<{ /* expected shape */ }>()\n        return { foo: 'bar' }\n      },\n      onError(error, variables, context) { /* test types */ },\n      onSuccess(data, variables, context) { /* test types */ },\n      onSettled(data, error, variables, context) { /* test types */ },\n    },\n  })\n\n  mutate({ /* params */ }, {\n    onSuccess(data, variables, context) { /* test inference */ },\n  })\n})\n```\n\n---\n\n## Exports\n\nAdd to `exports/index.ts` in respective package:\n\n```ts\n// packages/core/src/exports/index.ts\nexport {\n  type MyActionParameters,\n  type MyActionReturnType,\n  type MyActionErrorType,\n  myAction,\n} from '../actions/myAction.js'\n\n// packages/core/src/exports/query.ts\nexport {\n  type MyActionData,\n  type MyActionOptions,\n  type MyActionQueryFnData,\n  type MyActionQueryKey,\n  type MyActionQueryOptions,\n  myActionQueryKey,\n  myActionQueryOptions,\n} from '../query/myAction.js'\n\n// packages/react/src/exports/index.ts\nexport {\n  type UseMyActionParameters,\n  type UseMyActionReturnType,\n  useMyAction,\n} from '../hooks/useMyAction.js'\n```\n\n---\n\n## Verification\n\n```bash\n# Format\npnpm format\n\n# Type check (all or filtered)\npnpm check:types\npnpm --filter @wagmi/core check:types\npnpm --filter wagmi check:types\n\n# Test (all or filtered)\npnpm test\npnpm test --project core\npnpm test --project react\n\n# Update test snapshots\npnpm vitest -u\n\n# Type benchmarks\npnpm bench:types\n\n# Viem version mismatch in test snapshots\npnpm version:update:viem\n\n# Build (all or filtered)\npnpm run clean && pnpm build\npnpm --filter @wagmi/core build\n```\n","packages/cli/README.md":"# @wagmi/cli\n\nManage and generate code from Ethereum ABIs\n\n## Installation\n\n```bash\npnpm add @wagmi/cli\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/connectors/README.md":"# @wagmi/connectors\n\nCollection of connectors for Wagmi\n\n## Installation\n\n```bash\npnpm add @wagmi/connectors @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/core/README.md":"# @wagmi/core\n\nVanillaJS library for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/core/src/query/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for query options\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Options Format\n\n```ts\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.foo && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.foo) throw new Error('foo is required')\n      const result = await myAction(config, {\n        foo: parameters.foo,\n        ...parameters,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when action returns objects, nested values, or arrays\n  }\n}\n\nexport function myActionQueryKey<\n  config extends Config,\n  selectData = MyActionData\n>(\n  parameters: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(parameters)] as const\n}\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<\n    MyActionQueryFnData,\n    MyActionErrorType,\n    selectData,\n    MyActionQueryKey<config>\n  >\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n> = QueryOptions<\n  MyActionQueryFnData,\n  MyActionErrorType,\n  selectData,\n  MyActionQueryKey<config>\n>\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\n\nexport type MyActionData = MyActionQueryFnData\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<\n  typeof myActionQueryKey<config>\n>\n```\n\n## Style Conventions\n\n### `queryFn` Syntax\n\n- Use arrow function property syntax: `queryFn: async (context) =>` (not method shorthand `async queryFn(context)`)\n- Use `context` parameter, not destructuring: `async (context) =>` (not `async ({ queryKey }) =>`)\n- Access `queryKey` via `context.queryKey`\n\n### Destructuring `queryKey`\n\nUse array destructuring with `parameters`, then access properties via `parameters.foo`:\n\n```ts\n// ✓ Correct\nconst [, { scopeKey: _, ...parameters }] = context.queryKey\nif (!parameters.account) throw new Error('account is required')\n\n// ✗ Avoid\nconst { account, scopeKey: _, ...parameters } = context.queryKey[1]\n```\n\n### Calling Actions\n\nWhen calling actions, spread parameters first, then pass required parameters:\n\n```ts\n// ✓ Correct - spread, then explicit required param\nreturn myAction(config, { ...parameters, foo: parameters.foo })\n\n// ✗ Avoid - just passing parameters directly\nreturn myAction(config, parameters)\n```\n\n### Accessing Skipped Properties\n\nProperties filtered from the queryKey (e.g., `connector`, `abi`) should be accessed via `options.`:\n\n```ts\nqueryFn: async (context) => {\n  const [, { scopeKey: _, ...parameters }] = context.queryKey\n  // ✓ Use rest.connector for properties not in queryKey\n  const result = await myAction(config, { ...parameters, connector: options.connector })\n  return result ?? null\n}\n```\n\n## Type Parameter Nuances\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function readContractQueryOptions<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config,\n>\n```\n\n### `ExactPartial` vs `UnionExactPartial`\n\n- **`ExactPartial`**: Use for simple cases with straightforward parameter types\n- **`UnionExactPartial`**: Use for complex type inference or action parameter types with lots of unions (e.g., contract-related actions)\n\nIf unsure, check the underlying action's parameter types or ask.\n\n### Default Parameter Value\n\n- **Simple cases**: `options: MyActionOptions<config, selectData> = {}`\n- **Complex generics** (e.g., contract actions with abi/args): `options: MyActionOptions<...> = {} as any`\n\n## `structuralSharing`\n\nInclude `structuralSharing` from `./utils.js` when the action returns:\n- Objects\n- Nested values  \n- Arrays\n\nSee `packages/react/src/hooks` for more examples.\n\n## Special Query Key Handling\n\nFor `getConnectorClient`, include `connectorUid` separately in the query key:\n\n```ts\nreturn [\n  'connectorClient',\n  { ...filterQueryOptions(options), connectorUid: options.connector?.uid },\n] as const\n```\n","packages/core/src/tempo/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for `@wagmi/core/tempo`.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Code Generation\n\n### Wagmi Actions\n\nWhen generating Wagmi actions (in `actions/`), follow these guidelines.\n\nAn example of a generated action set can be found in `actions/fee.ts`.\n\n#### Source of Truth\n\n- **All actions must be based on their corresponding Viem actions** from `import { Actions } from viem/tempo` (local path might be `../viem/src/tempo/actions` or you can clone `gh repo clone wevm/viem`)\n- Wagmi actions are wrappers around Viem actions that integrate with Wagmi's config and TanStack Query\n\n#### Documentation Requirements\n\nAll actions **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the action does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (`createConfig`, `http`, action imports)\n   - Config setup with chains and transports\n   - Action usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **`@param` tags** - For each parameter (config, parameters)\n4. **`@returns` tag** - Description of the return value\n\nExample:\n```ts\n/**\n * Gets the user's default fee token.\n *\n * @example\n * ```ts\n * import { createConfig, http } from '@wagmi/core'\n * import { tempo } from '@wagmi/core/chains'\n * import { Actions } from '@wagmi/core/tempo'\n *\n * const config = createConfig({\n *   chains: [tempo],\n *   transports: {\n *     [tempo.id]: http(),\n *   },\n * })\n *\n * const token = await Actions.fee.getUserToken(config, {\n *   account: '0x...',\n * })\n * ```\n *\n * @param config - Config.\n * @param parameters - Parameters.\n * @returns The user's fee token address.\n */\n```\n\n#### Action Types\n\n##### Query-based Actions (Read-Only)\n\nFor read-only actions that fetch data:\n\n- Return the result from the corresponding Viem action\n- Parameters include `ChainIdParameter<config>` and the Viem action's parameters\n- Must include query utilities for TanStack Query integration\n\n```ts\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue<config>> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  return viem_Actions.myAction(client, rest)\n}\n```\n\n##### Mutation-based Actions (Write)\n\nFor state-changing actions, both variants must be implemented:\n\n**1. Standard Variant**\n\n- Uses `getConnectorClient` to get the wallet client\n- Returns the result from the corresponding Viem action\n- Does not wait for transaction confirmation\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myAction(\n    client,\n    parameters as viem_Actions.myAction.Parameters,\n  )\n}\n```\n\n**2. Sync Variant (`*Sync`)**\n\n- Named with `Sync` suffix (e.g., `setUserTokenSync`)\n- Uses `getConnectorClient` to get the wallet client\n- Waits for transaction inclusion on a block before returning a response\n- Returns both the receipt and extracted event data\n\n```ts\nexport async function myActionSync<config extends Config>(\n  config: config,\n  parameters: myActionSync.Parameters<config>,\n): Promise<myActionSync.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myActionSync(\n    client,\n    parameters as viem_Actions.myActionSync.Parameters,\n  )\n}\n```\n\n#### Namespace Properties\n\n##### Query-based Actions\n\nAll query-based actions must include the following components:\n\n- Include `enabled` logic to disable the query when required reactive parameters (e.g. addresses) are undefined\n- The `enabled` conditional must check ALL required reactive parameters (e.g., `account && spender` for allowance checks)\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nimport { filterQueryOptions } from './utils.js'\nimport type { QueryOptions, QueryParameter } from './utils.js'\n\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    viem_Actions.myAction.Parameters\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n\n  export function queryKey<config extends Config>(\n    parameters: Parameters<config>,\n  ) {\n    return ['myAction', filterQueryOptions(parameters)] as const\n  }\n\n  export type QueryKey<config extends Config> = ReturnType<\n    typeof queryKey<config>\n  >\n\n  export function queryOptions<config extends Config, selectData = ReturnValue>(\n    config: Config,\n    parameters: queryOptions.Parameters<config, selectData>,\n  ): queryOptions.ReturnValue<config, selectData> {\n    const { query, ...rest } = parameters\n    return {\n      ...query,\n      enabled: Boolean(rest.account && (query?.enabled ?? true)),\n      queryKey: queryKey(rest),\n      async queryFn(context) {\n        const [, parameters] = context.queryKey\n        return await myAction(config, parameters)\n      },\n    }\n  }\n\n  export declare namespace queryOptions {\n    export type Parameters<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = myAction.Parameters<config> &\n      QueryParameter<\n        myAction.ReturnValue,\n        myAction.ErrorType,\n        selectData,\n        myAction.QueryKey<config>\n      >\n\n    export type ReturnValue<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = QueryOptions<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    >\n  }\n}\n```\n\n##### Mutation-based Actions\n\nAll mutation-based actions must include the following components:\n\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport declare namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myAction.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n}\n\nexport declare namespace myActionSync {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myActionSync.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myActionSync.ReturnValue\n\n  export type ErrorType = viem_Actions.myActionSync.ErrorType\n}\n```\n\n#### Testing\n\nTests should be co-located with actions in `*action-name*.test.ts` files.\n\n**Important**: Wagmi action tests should follow the same test flows as the corresponding Viem action tests in `src/tempo/actions/`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that Wagmi tests use `config` instead of `client`, and mutation actions don't require explicit `account` parameters since they use the connector's account.\n\nSee `actions/token.test.ts` for a comprehensive example of test patterns and structure.\n\n##### Test Structure\n\nOrganize tests by action name with a default test case. Use namespace imports for cleaner code:\n\n```ts\nimport { connect } from '@wagmi/core'\nimport { accounts,  config, queryClient } from '@wagmi/test/tempo'\nimport { describe, expect, test } from 'vitest'\nimport * as myNamespace from './myNamespace.js'\n\nconst account = accounts[0]\n\n// Query-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    const result = await myNamespace.myAction(config, {\n      // ...\n    })\n    expect(result).toMatchInlineSnapshot(`...`)\n  })\n\n  describe('queryOptions', () => {\n    test('default', async () => {\n      const options = myNamespace.myAction.queryOptions(config, {\n        // ...\n      })\n      expect(await queryClient.fetchQuery(options)).toMatchInlineSnapshot(`...`)\n    })\n  })\n})\n\n// Mutation-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    // e.g., create tokens, grant roles, mint tokens, etc.\n    \n    const hash = await myNamespace.myAction(config, {\n      // ... (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n  })\n})\n\ndescribe('myActionSync', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    \n    const result = await myNamespace.myActionSync(config, {\n      // ... (no account parameter needed)\n    })\n    expect(result).toBeDefined()\n  })\n})\n```\n","packages/create-wagmi/README.md":"# create-wagmi\n\nGet up and running quickly with [Wagmi](https://wagmi.sh) by using the `create-wagmi` CLI.\n\n## Installation\n\n```bash\nnpm create wagmi\n# or\npnpm create wagmi\n# or\nyarn create wagmi\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh/cli/create-wagmi).\n","packages/create-wagmi/templates/next/README.md":"This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","packages/create-wagmi/templates/vite-react/README.md":"This is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","packages/create-wagmi/templates/vite-vue/README.md":"This is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","packages/react/README.md":"# wagmi\n\nReact Hooks for Ethereum\n\n## Installation\n\n```bash\npnpm add wagmi viem @tanstack/react-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","packages/react/src/hooks/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for React hooks\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Hook Format\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  })\n  return useQuery(options)\n}\n```\n\n## Key Patterns\n\n### `'use client'` Directive\n\nAll hooks must start with `'use client'` directive.\n\n### `useConfig` and `useChainId`\n\nQuery hooks always call these to get config from React context and current chain:\n\n```ts\nconst config = useConfig(parameters)\nconst chainId = useChainId({ config })\n```\n\n### `ResolvedRegister['config']`\n\nUse `ResolvedRegister['config']` as default for `config` in the **function signature only** (not in type definitions). This allows type inference when config is injected via React context:\n\n```ts\n// Type definition uses Config\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = ...\n\n// Function uses ResolvedRegister['config']\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(...) { ... }\n```\n\n### `enabled` and `structuralSharing`\n\nDo NOT set `enabled` or `structuralSharing` in hooks. These are handled by `queryOptions` from `@wagmi/core/query`.\n\n### Doc Comment\n\nUse a simple link to the docs:\n\n```ts\n/** https://wagmi.sh/react/api/hooks/useMyAction */\n```\n\n## Type Parameter Nuances\n\n### `Compute` vs `UnionCompute`\n\n- **`Compute`**: Use for simple hooks with straightforward parameter types\n- **`UnionCompute`**: Use for complex type inference (e.g., contract-related hooks)\n- **Neither**: Some hooks with very complex inference may not support either\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function useReadContract<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config = ResolvedRegister['config'],\n  selectData = ReadContractData<abi, functionName, args>,\n>\n```\n\n### Default Parameter Value\n\n- **Simple cases**: `parameters: UseMyActionParameters<config, selectData> = {}`\n- **Complex generics**: `parameters: UseMyActionParameters<...> = {} as any`\n","packages/react/src/tempo/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for `wagmi/tempo` Hooks.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Wagmi Hooks\n\nWhen generating Wagmi hooks (in `hooks/`), follow these guidelines.\n\nAn example of a generated hook set can be found in `hooks/fee.ts`.\n\n### Source of Truth\n\n- **All hooks must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Wagmi hooks are React hooks that wrap Wagmi actions with TanStack Query's `useQuery` and `useMutation`\n- If the Wagmi action is unclear or missing, implement the Wagmi action first\n\n### Documentation Requirements\n\nAll hooks **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the hook does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (hook imports)\n   - React component usage\n   - Hook usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **@param parameters** - Parameters description\n4. **`@returns` tag** - Description of the return value\n\nExample:\n\n```typescript\n/**\n * Hook for getting the user's default fee token.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   const { data, isLoading } = Hooks.fee.useUserToken({\n *     account: '0x20c...0055',\n *   })\n *   if (isLoading) return <div>Loading...</div>\n *   return <div>Token: {data?.address}</div>\n * }\n * ```\n * \n * @param parameters - Parameters.\n * @returns Query result with token address and ID.\n */\n```\n\n### Query Hooks\n\nFor read-only hooks that fetch data:\n\n- Use `useQuery` from `../../utils/query.js`\n- Use `useConfig` and `useChainId` from `../../hooks/(useChainId|useConfig).js`\n- Call the corresponding action's `queryOptions` function\n- All parameters should be optional. Use `ExactPartial` to make all query parameters optional\n- Support optional `query` parameter for TanStack Query options\n- Default `parameters` to `{}` only if all parameters are truly optional (no required non-reactive parameters like `token`, `role`, etc.)\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<config, selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myAction.queryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  } as never)\n  return useQuery(options)\n}\n```\n\n### Mutation Hooks\n\nFor state-changing hooks, both variants must be implemented:\n\n**1. Standard Variant**\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  })\n}\n```\n\n**2. Sync Variant (`use*Sync`)**\n\n```typescript\nexport function useMyActionSync<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyActionSync.Parameters<config, context> = {},\n): useMyActionSync.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myActionSync(config, variables)\n    },\n    mutationKey: ['myActionSync'],\n  })\n}\n```\n\n### Watch Hooks\n\nFor event watching hooks:\n\n- Call the corresponding action's watch function inside `useEffect`\n- All parameters should be optional using `ExactPartial`\n- Include an `enabled` parameter (defaults to `true`) to control whether the watcher is active\n- Check if all required properties (like the callback) are defined before setting up the watcher\n- Include all optional properties for `rest` in the dependency array (e.g. `rest.foo`, `rest.bar`, `rest.baz`)\n- Return the unwatch function from the `useEffect` for cleanup\n\nAll watch hooks must include comprehensive JSDoc with:\n1. **Function description** - What events the hook watches for\n2. **`@example` block** - Complete working example showing hook usage in a React component\n3. **`@param` tag** - Parameters description\n\n```typescript\n/**\n * Hook for watching TIP20 token mint events.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   Hooks.token.useWatchMint({\n *     onMint(args) {\n *       console.log('Mint:', args)\n *     },\n *   })\n *   return <div>Watching for mints...</div>\n * }\n * ```\n *\n * @param parameters - Parameters.\n */\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) {\n  const { enabled = true, onMyEvent, ...rest } = parameters\n\n  const config = useConfig({ config: parameters.config })\n  const configChainId = useChainId({ config })\n  const chainId = parameters.chainId ?? configChainId\n\n  useEffect(() => {\n    if (!enabled) return\n    if (!onMyEvent) return\n    return Actions.watchMyEvent(config, {\n      ...rest,\n      chainId,\n      onMyEvent,\n    })\n  }, [config, enabled, onMyEvent, rest.foo, rest.bar, rest.baz])\n}\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n### Namespace Properties\n\n#### Query Hooks\n\nAll query hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<selectData> { ... }\n\nexport declare namespace useMyAction {\n  export type Parameters<\n    config extends Config = ResolvedRegister['config'],\n    selectData = myAction.ReturnValue,\n  > = ConfigParameter<config> &\n    QueryParameter<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    > &\n    ExactPartial<myAction.Parameters<config>>\n\n  export type ReturnValue<selectData = myAction.ReturnValue> =\n    UseQueryReturnType<selectData, Error>\n}\n```\n\n**Note:** Use `ExactPartial<T>` to make all query parameters optional. This ensures that reactive parameters can be undefined initially and populated later for proper reactivity.\n\n#### Watch Hooks\n\nAll watch hooks must include the following components:\n\n```typescript\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) { ... }\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n**Note:** Watch hooks don't have a return value - they set up event listeners in a `useEffect` and automatically clean up when the component unmounts or dependencies change.\n\n#### Mutation Hooks\n\nAll mutation hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> { ... }\n\nexport declare namespace useMyAction {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myAction.ReturnValue,\n          myAction.ErrorType,\n          myAction.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myAction.ReturnValue,\n    myAction.ErrorType,\n    myAction.Parameters<config>,\n    context\n  >\n}\n\nexport declare namespace useMyActionSync {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myActionSync.ReturnValue,\n          myActionSync.ErrorType,\n          myActionSync.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myActionSync.ReturnValue,\n    myActionSync.ErrorType,\n    myActionSync.Parameters<config>,\n    context\n  >\n}\n```\n\n### Testing\n\nTests should be co-located with hooks in `myNamespace.test.ts` files.\n\n**Important**: Wagmi hook tests should follow the same test flows as the corresponding Wagmi action tests in `@wagmi/core/tempo`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that hooks use React rendering patterns with `renderHook`, and mutation hooks don't require explicit `account` parameters in `mutateAsync` calls since they use the connector's account.\n\nSee `hooks/fee.test.ts` for a comprehensive example of test patterns and structure.\n\n#### Test Structure\n\nOrganize tests by hook name with a default test case. Use namespace imports for cleaner code when importing hooks:\n\n```typescript\nimport { type Address } from 'viem'\nimport { describe, expect, test, vi } from 'vitest'\nimport { useConnect } from 'wagmi'\nimport { accounts, config, renderHook } from '@wagmi/test/tempo'\nimport * as myNamespace from './myNamespace.js'\n\n// Query hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() =>\n      myNamespace.useMyAction({ account: account.address }),\n    )\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n\n  test('reactivity: account parameter', async () => {\n    const { result, rerender } = await renderHook(\n      (props) =>\n        myNamespace.useMyAction({ account: props?.account }),\n      { initialProps: { account: undefined as Address | undefined } },\n    )\n\n    await vi.waitFor(() => result.current.fetchStatus === 'fetching')\n\n    // Should be disabled when account is undefined\n    expect(result.current.data).toBeUndefined()\n    expect(result.current.isPending).toBe(true)\n    // expect(result.current.isEnabled).toBe(false) // TODO: Disabled until @tanstack/react-query bumped to latest\n\n    // Set account\n    rerender({ account: account.address })\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    // Should now be enabled and have data\n    expect(result.current.isEnabled).toBe(true)\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n})\n\n// Mutation hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyAction(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n    // e.g., create tokens, grant roles, etc. using the action's mutateAsync\n\n    const hash = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\ndescribe('useMyActionSync', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyActionSync(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n\n    const data = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(data).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\n// Watch hooks\ndescribe('useWatchMyEvent', () => {\n  test('default', async () => {\n    const { result: connectResult } = await renderHook(() => ({\n      connect: useConnect(),\n      createSync: myNamespace.useCreateSync(),\n      // ... any other setup hooks needed\n    }))\n\n    await connectResult.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup (e.g., create token, grant roles)\n\n    const events: any[] = []\n    await renderHook(() =>\n      myNamespace.useWatchMyEvent({\n        // ... parameters\n        onMyEvent(args) {\n          events.push(args)\n        },\n      }),\n    )\n\n    // Trigger the event by calling a sync action\n    // e.g., await connectResult.current.myActionSync.mutateAsync({ ... })\n\n    await vi.waitUntil(() => events.length >= 1)\n\n    expect(events.length).toBeGreaterThanOrEqual(1)\n    expect(events[0]?.someField).toBe(expectedValue)\n  })\n})\n```\n","packages/solid/README.md":"# @wagmi/solid\n\nSolid Primitives for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/solid viem @tanstack/solid-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n","packages/vue/README.md":"# @wagmi/vue\n\nVue Composables for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/vue viem @tanstack/vue-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n","site/AGENTS.md":"# Agent Guidelines\n\nAgent guidance for the Wagmi documentation site.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Tempo\n\n- All Tempo documentation must be added under the `/tempo` sidebar item.\n\n## Wagmi Actions\n\n- **All documentation must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Make sure you update `site/tempo/actions/index.md` for new actions\n\n### Query Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// @filename: example.ts\n// ---cut---\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result = await Actions.amm.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', result)\n// @log: Result: 10500000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`bigint`\n\ndescription\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n### baz (optional)\n\n- **Type:** `Hex`\n\ndescription\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Mutation Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result =\n  await Actions.namespace.actionSync(config, {\n    foo: '0x...',\n    bar: 123n,\n  })\n\nconsole.log('Foo:', result.foo)\n// @log: Foo: 5250000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `namespace.action` action and wait for inclusion manually:\n\n```ts\nimport { Actions as viem_Actions } from 'viem/tempo'\nimport { Actions } from 'wagmi/tempo'\nimport { waitForTransactionReceipt } from 'wagmi/actions'\n\nconst hash = await Actions.namespace.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\nconst receipt = await waitForTransactionReceipt(config, { hash })\n\nconst { args: { baz } } \n  = viem_Actions.namespace.action.extractEvent(receipt.logs)\n```\n\n## Return Type\n\ndescription\n\n```ts\ntype ReturnType = {\n  /** description */\n  baz: bigint\n}\n```\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n<!--@include: @shared/tempo-write-parameters.md-->\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Watch Actions\n\n````md\n# `namespace.watchAction`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst unwatch = Actions.namespace.watchAction(config, {\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n\n// Later, stop watching\nunwatch()\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`() => void`\n\nReturns a function to unsubscribe from the event.\n\n## Parameters\n\n### onAction\n\n- **Type:** `function`\n\n```ts\ndeclare function onBurn(args: Args, log: Log): void\n\ntype Args = {\n  /** description */\n  foo: bigint\n  /** description */\n  barBaz: bigint\n}\n```\n\nCallback to invoke when action occurs.\n\n### fromBlock (optional)\n\n- **Type:** `bigint`\n\nBlock to start listening from.\n\n### onError (optional)\n\n- **Type:** `function`\n\n```ts\ndeclare function onError(error: Error): void\n```\n\nThe callback to call when an error occurred when trying to get for a new block.\n\n### poll (optional)\n\n- **Type:** `true`\n\nEnable polling mode.\n\n### pollingInterval (optional)\n\n- **Type:** `number`\n\nPolling frequency (in ms). Defaults to Client's pollingInterval config.\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n## Wagmi Hooks\n\n- **All documentation must be based on their corresponding Wagmi hooks** from `wagmi/tempo` (`packages/react/src/tempo/`)\n- Make sure you update `site/tempo/hooks/index.md` for new actions\n\n### Query Hooks\n\nAn example of a generated hook set can be found in `hooks/amm.useLiquidityBalance.ts`. Template example:\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst { data: result } = Hooks.namespace.useHook({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', resut)\n// @log: Result: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\nSee [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n## Parameters\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n### query\n\nSee the [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Mutation Hooks\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst actionNameSync = Hooks.namespace.useHookSync()\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionNameSync.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Received baz:', actionNameSync.data?.baz)\n// @log: Received baz: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `amm.burn` action and wait for inclusion manually:\n\n```ts\nimport { Actions } from 'viem/tempo'\nimport { Hooks } from 'wagmi/tempo'\nimport { useWaitForTransactionReceipt } from 'wagmi'\n\nconst actionName = Hooks.namespace.useHook()\nconst { data: receipt } = useWaitForTransactionReceipt({ hash: actionName.data })\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionName.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nif (receipt) {\n  const { args: { baz } } \n    = Actions.namespace.action.extractEvent(receipt.logs)\n}\n```\n\n## Return Type\n\nSee [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n### mutate/mutateAsync\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n## Parameters\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n### mutation\n\nSee the [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Watch Hooks\n\n````md\n# `namespace.useWatchHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nHooks.amm.useWatchHook({\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Parameters\n\nSee [Wagmi Action `namespace.watchAction` Parameters](/tempo/actions/namespace.watchAction#parameters)\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n- [`namespace.watchAction`](/tempo/actions/namespace.watchAction)\n````\n"},"items":[{"name":"AGENTS.md","path":"site/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/site/AGENTS.md","title":"site - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Agent Guidelines\n\nAgent guidance for the Wagmi documentation site.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Tempo\n\n- All Tempo documentation must be added under the `/tempo` sidebar item.\n\n## Wagmi Actions\n\n- **All documentation must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Make sure you update `site/tempo/actions/index.md` for new actions\n\n### Query Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// @filename: example.ts\n// ---cut---\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result = await Actions.amm.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', result)\n// @log: Result: 10500000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`bigint`\n\ndescription\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n### baz (optional)\n\n- **Type:** `Hex`\n\ndescription\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Mutation Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result =\n  await Actions.namespace.actionSync(config, {\n    foo: '0x...',\n    bar: 123n,\n  })\n\nconsole.log('Foo:', result.foo)\n// @log: Foo: 5250000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `namespace.action` action and wait for inclusion manually:\n\n```ts\nimport { Actions as viem_Actions } from 'viem/tempo'\nimport { Actions } from 'wagmi/tempo'\nimport { waitForTransactionReceipt } from 'wagmi/actions'\n\nconst hash = await Actions.namespace.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\nconst receipt = await waitForTransactionReceipt(config, { hash })\n\nconst { args: { baz } } \n  = viem_Actions.namespace.action.extractEvent(receipt.logs)\n```\n\n## Return Type\n\ndescription\n\n```ts\ntype ReturnType = {\n  /** description */\n  baz: bigint\n}\n```\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n<!--@include: @shared/tempo-write-parameters.md-->\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Watch Actions\n\n````md\n# `namespace.watchAction`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst unwatch = Actions.namespace.watchAction(config, {\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n\n// Later, stop watching\nunwatch()\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`() => void`\n\nReturns a function to unsubscribe from the event.\n\n## Parameters\n\n### onAction\n\n- **Type:** `function`\n\n```ts\ndeclare function onBurn(args: Args, log: Log): void\n\ntype Args = {\n  /** description */\n  foo: bigint\n  /** description */\n  barBaz: bigint\n}\n```\n\nCallback to invoke when action occurs.\n\n### fromBlock (optional)\n\n- **Type:** `bigint`\n\nBlock to start listening from.\n\n### onError (optional)\n\n- **Type:** `function`\n\n```ts\ndeclare function onError(error: Error): void\n```\n\nThe callback to call when an error occurred when trying to get for a new block.\n\n### poll (optional)\n\n- **Type:** `true`\n\nEnable polling mode.\n\n### pollingInterval (optional)\n\n- **Type:** `number`\n\nPolling frequency (in ms). Defaults to Client's pollingInterval config.\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n## Wagmi Hooks\n\n- **All documentation must be based on their corresponding Wagmi hooks** from `wagmi/tempo` (`packages/react/src/tempo/`)\n- Make sure you update `site/tempo/hooks/index.md` for new actions\n\n### Query Hooks\n\nAn example of a generated hook set can be found in `hooks/amm.useLiquidityBalance.ts`. Template example:\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst { data: result } = Hooks.namespace.useHook({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', resut)\n// @log: Result: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\nSee [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n## Parameters\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n### query\n\nSee the [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Mutation Hooks\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst actionNameSync = Hooks.namespace.useHookSync()\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionNameSync.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Received baz:', actionNameSync.data?.baz)\n// @log: Received baz: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `amm.burn` action and wait for inclusion manually:\n\n```ts\nimport { Actions } from 'viem/tempo'\nimport { Hooks } from 'wagmi/tempo'\nimport { useWaitForTransactionReceipt } from 'wagmi'\n\nconst actionName = Hooks.namespace.useHook()\nconst { data: receipt } = useWaitForTransactionReceipt({ hash: actionName.data })\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionName.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nif (receipt) {\n  const { args: { baz } } \n    = Actions.namespace.action.extractEvent(receipt.logs)\n}\n```\n\n## Return Type\n\nSee [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n### mutate/mutateAsync\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n## Parameters\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n### mutation\n\nSee the [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Watch Hooks\n\n````md\n# `namespace.useWatchHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nHooks.amm.useWatchHook({\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Parameters\n\nSee [Wagmi Action `namespace.watchAction` Parameters](/tempo/actions/namespace.watchAction#parameters)\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n- [`namespace.watchAction`](/tempo/actions/namespace.watchAction)\n````\n","isInternal":false,"tokens":2274,"sizeBytes":8738},{"name":"SKILL.md","path":".agents/skills/wagmi-development/SKILL.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/.agents/skills/wagmi-development/SKILL.md","title":"wagmi-development","category":"anthropic-skill","format":"markdown","content":"---\nname: wagmi-development\ndescription: Creates Wagmi features across all layers - core actions, query options, framework bindings. Use when adding new actions, hooks, or working across packages/core, packages/react, packages/vue.\n---\n\n# Wagmi Development\n\nFull-stack patterns for adding Wagmi features. This skill covers Viem-based actions only (not Wagmi config actions).\n\n## Layer Overview\n\n1. **Core Action** (`packages/core/src/actions/`) - Base functionality wrapping Viem\n2. **Query Options** (`packages/core/src/query/`) - TanStack Query integration\n3. **Framework Bindings** - React (`packages/react/src/hooks/`), Vue (`packages/vue/src/composables/`)\n\n---\n\n## 1. Core Action\n\n### Structure\n\n```ts\nimport {\n  type MyActionErrorType as viem_MyActionErrorType,\n  type MyActionParameters as viem_MyActionParameters,\n  type MyActionReturnType as viem_MyActionReturnType,\n  myAction as viem_myAction,\n} from 'viem/actions'\n\nimport type { Config } from '../createConfig.js'\nimport type { ChainIdParameter, ConnectorParameter } from '../types/properties.js'\nimport type { Compute } from '../types/utils.js'\nimport { getAction } from '../utils/getAction.js'\n\nexport type MyActionParameters<config extends Config = Config> = Compute<\n  ChainIdParameter<config> & viem_MyActionParameters\n>\n\nexport type MyActionReturnType = viem_MyActionReturnType\n\nexport type MyActionErrorType = viem_MyActionErrorType\n\n/** https://wagmi.sh/core/api/actions/myAction */\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: MyActionParameters<config>,\n): Promise<MyActionReturnType> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  const action = getAction(client, viem_myAction, 'myAction')\n  return action(rest)\n}\n```\n\n### Key Rules\n\n- **Viem imports**: Prefix with `viem_` (e.g., `viem_getBalance`)\n- **Client access**: \n  - Read-only: `config.getClient({ chainId })`\n  - Wallet: `await getConnectorClient(config, { chainId, connector, account })`\n  - Mixed: Use `getConnectorClient` for account, `getClient` for action (see `estimateGas.ts`)\n- **Parameters**: Add `ChainIdParameter<config>` always. Add `ConnectorParameter` for wallet actions.\n- **Type params**: Mirror Viem's type params for inference. Use `const` modifier for literal inference (abi, args).\n- **Spread**: Omit wagmi-specific props (`chainId`, `connector`) when calling Viem action.\n\n### Testing\n\n**Runtime tests** (`action.test.ts`):\n```ts\nimport { abi, address, config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  await expect(myAction(config, { /* required params */ })).resolves.toMatchInlineSnapshot(`...`)\n})\n\ntest('parameters: chainId', async () => { /* test chainId param */ })\n\ntest('behavior: error case', async () => { /* test error handling */ })\n```\n\n**Type tests** (`action.test-d.ts`) - only if action has type inference:\n```ts\nimport { config } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  const result = await myAction(config, { /* params */ })\n  expectTypeOf(result).toEqualTypeOf<ExpectedType>()\n})\n```\n\n**Type benchmarks** (`action.bench-d.ts`) - only if action has type inference:\n```ts\nimport { attest } from '@ark/attest'\nimport { test } from 'vitest'\nimport type { MyActionParameters } from './myAction.js'\n\ntest('default', () => {\n  type Result = MyActionParameters<typeof abi.erc20, 'balanceOf'>\n  const res = {} as Result\n  attest.instantiations([12345, 'instantiations'])\n  attest(res.args).type.toString.snap(`readonly [account: \\`0x\\${string}\\`]`)\n})\n```\n\n**Wallet action tests**: Connect before, disconnect after:\n```ts\ntest('default', async () => {\n  await connect(config, { connector })\n  await expect(myAction(config, { /* params */ })).resolves.toMatchInlineSnapshot(`...`)\n  await disconnect(config, { connector })\n})\n```\n\n---\n\n## 2. Query Options\n\nQuery (read-only) or Mutation (wallet) options for TanStack Query.\n\n### Query Structure\n\n```ts\nimport {\n  type MyActionErrorType,\n  type MyActionParameters,\n  type MyActionReturnType,\n  myAction,\n} from '../actions/myAction.js'\nimport type { Config } from '../createConfig.js'\nimport type { ScopeKeyParameter } from '../types/properties.js'\nimport type { QueryOptions, QueryParameter } from '../types/query.js'\nimport type { Compute, ExactPartial } from '../types/utils.js'\nimport { filterQueryOptions, structuralSharing } from './utils.js'\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.requiredParam && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.requiredParam) throw new Error('requiredParam is required')\n      const result = await myAction(config, {\n        ...(parameters as MyActionParameters),\n        requiredParam: parameters.requiredParam,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when returning complex objects/arrays\n  }\n}\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\nexport type MyActionData = MyActionQueryFnData\n\nexport function myActionQueryKey<config extends Config>(\n  options: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(options)] as const\n}\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<typeof myActionQueryKey<config>>\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = QueryOptions<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n```\n\n### Mutation Structure\n\n```ts\nimport type { MutationOptions, MutationParameter } from '../types/query.js'\n\nexport type MyActionOptions<config extends Config, context = unknown> = MutationParameter<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>,\n  context\n>\n\nexport function myActionMutationOptions<config extends Config, context>(\n  config: config,\n  options: MyActionOptions<config, context> = {},\n): MyActionMutationOptions<config> {\n  return {\n    ...options.mutation,\n    mutationFn: async (variables) => {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  }\n}\n\nexport type MyActionMutationOptions<config extends Config> = MutationOptions<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>\n>\n```\n\n### Key Rules\n\n- **ExactPartial vs UnionExactPartial**: Use `ExactPartial` for simple types, `UnionExactPartial` for complex unions (contract actions)\n- **enabled**: Based on required params being truthy\n- **structuralSharing**: Include when action returns objects/arrays\n- **filterQueryOptions**: Filters common non-serializable props. Skip props like `onReplaced` manually in query key.\n- **Query key**: Always `['actionName', filterQueryOptions(options)]`\n\n### Testing\n\n```ts\nimport { config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myActionQueryOptions } from './myAction.js'\n\ntest('default', () => {\n  expect(myActionQueryOptions(config, {})).toMatchInlineSnapshot(`\n    {\n      \"enabled\": false,\n      \"queryFn\": [Function],\n      \"queryKey\": [\"myAction\", {}],\n    }\n  `)\n})\n\ntest('enabled', () => {\n  expect(myActionQueryOptions(config, { requiredParam: 'value' }).enabled).toBe(true)\n})\n\ntest('queryFn: calls query fn', async () => {\n  const options = myActionQueryOptions(config, { requiredParam: 'value' })\n  const result = await options.queryFn({ queryKey: options.queryKey } as any)\n  expect(result).toMatchInlineSnapshot(`...`)\n})\n```\n\n---\n\n## 3. Framework Bindings\n\n### React Query Hook\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n    query: parameters.query,\n  })\n  return useQuery(options)\n}\n```\n\n### React Mutation Hook\n\n```ts\n'use client'\nimport { useMutation } from '@tanstack/react-query'\nimport type { Config, ResolvedRegister, MyActionErrorType } from '@wagmi/core'\nimport {\n  type MyActionData,\n  type MyActionMutate,\n  type MyActionMutateAsync,\n  type MyActionOptions,\n  type MyActionVariables,\n  myActionMutationOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { UseMutationReturnType } from '../utils/query.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<config extends Config = Config, context = unknown> =\n  MyActionOptions<config, context> & ConfigParameter<config>\n\nexport type UseMyActionReturnType<config extends Config = Config, context = unknown> =\n  UseMutationReturnType<\n    MyActionData,\n    MyActionErrorType,\n    MyActionVariables<config>,\n    context,\n    MyActionMutate<config, context>,\n    MyActionMutateAsync<config, context>\n  >\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: UseMyActionParameters<config, context> = {},\n): UseMyActionReturnType<config, context> {\n  const config = useConfig(parameters)\n  const options = myActionMutationOptions(config, parameters)\n  const mutation = useMutation(options)\n  type Return = UseMyActionReturnType<config, context>\n  return {\n    ...mutation,\n    mutate: mutation.mutate as Return['mutate'],\n    mutateAsync: mutation.mutateAsync as Return['mutateAsync'],\n  }\n}\n```\n\n### Vue Composable (Query)\n\n```ts\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport { computed } from 'vue'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { DeepMaybeRef } from '../types/ref.js'\nimport { deepUnref } from '../utils/cloneDeep.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<DeepMaybeRef<MyActionOptions<config, selectData> & ConfigParameter<config>>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/vue/api/composables/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const params = computed(() => deepUnref(parameters))\n  const config = useConfig(params)\n  const chainId = useChainId({ config })\n  const options = computed(() =>\n    myActionQueryOptions(config as any, {\n      ...params.value,\n      chainId: params.value.chainId ?? chainId.value,\n      query: params.value.query,\n    }),\n  )\n  return useQuery(options as any) as any\n}\n```\n\n### Framework Rules\n\n| Rule | React | Vue |\n|------|-------|-----|\n| Top directive | `'use client'` | None |\n| Parameters wrapper | `Compute<...>` | `Compute<DeepMaybeRef<...>>` |\n| Reactivity | Direct | `computed()` + `deepUnref()` |\n| Doc URL | `wagmi.sh/react/api/hooks/` | `wagmi.sh/vue/api/composables/` |\n\n**Shared rules:**\n- `ResolvedRegister['config']`: Use in function signature only, not type defs\n- No `enabled`/`structuralSharing` in hooks: Handled by queryOptions\n\n### Testing\n\n**Query hook test-d.ts**:\n```ts\nimport { abi } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('select data', () => {\n  const result = useMyAction({\n    /* params */\n    query: {\n      select(data) {\n        expectTypeOf(data).toEqualTypeOf<ExpectedDataType>()\n        return data\n      },\n    },\n  })\n  expectTypeOf(result.data).toEqualTypeOf<ExpectedDataType>()\n})\n```\n\n**Mutation hook test-d.ts**:\n```ts\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('context', () => {\n  const { mutate } = useMyAction({\n    mutation: {\n      onMutate(variables) {\n        expectTypeOf(variables).toMatchTypeOf<{ /* expected shape */ }>()\n        return { foo: 'bar' }\n      },\n      onError(error, variables, context) { /* test types */ },\n      onSuccess(data, variables, context) { /* test types */ },\n      onSettled(data, error, variables, context) { /* test types */ },\n    },\n  })\n\n  mutate({ /* params */ }, {\n    onSuccess(data, variables, context) { /* test inference */ },\n  })\n})\n```\n\n---\n\n## Exports\n\nAdd to `exports/index.ts` in respective package:\n\n```ts\n// packages/core/src/exports/index.ts\nexport {\n  type MyActionParameters,\n  type MyActionReturnType,\n  type MyActionErrorType,\n  myAction,\n} from '../actions/myAction.js'\n\n// packages/core/src/exports/query.ts\nexport {\n  type MyActionData,\n  type MyActionOptions,\n  type MyActionQueryFnData,\n  type MyActionQueryKey,\n  type MyActionQueryOptions,\n  myActionQueryKey,\n  myActionQueryOptions,\n} from '../query/myAction.js'\n\n// packages/react/src/exports/index.ts\nexport {\n  type UseMyActionParameters,\n  type UseMyActionReturnType,\n  useMyAction,\n} from '../hooks/useMyAction.js'\n```\n\n---\n\n## Verification\n\n```bash\n# Format\npnpm format\n\n# Type check (all or filtered)\npnpm check:types\npnpm --filter @wagmi/core check:types\npnpm --filter wagmi check:types\n\n# Test (all or filtered)\npnpm test\npnpm test --project core\npnpm test --project react\n\n# Update test snapshots\npnpm vitest -u\n\n# Type benchmarks\npnpm bench:types\n\n# Viem version mismatch in test snapshots\npnpm version:update:viem\n\n# Build (all or filtered)\npnpm run clean && pnpm build\npnpm --filter @wagmi/core build\n```\n","frontmatter":{"name":"wagmi-development","description":"Creates Wagmi features across all layers - core actions, query options, framework bindings. Use when adding new actions, hooks, or working across packages/core, packages/react, packages/vue."},"isInternal":false,"tokens":3797,"sizeBytes":15392},{"name":"AGENTS.md","path":"packages/core/src/query/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/core/src/query/AGENTS.md","title":"Query Skill","category":"anthropic-skill","format":"markdown","content":"# Agent Guidelines\n\nAgent guidance for query options\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Options Format\n\n```ts\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.foo && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.foo) throw new Error('foo is required')\n      const result = await myAction(config, {\n        foo: parameters.foo,\n        ...parameters,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when action returns objects, nested values, or arrays\n  }\n}\n\nexport function myActionQueryKey<\n  config extends Config,\n  selectData = MyActionData\n>(\n  parameters: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(parameters)] as const\n}\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<\n    MyActionQueryFnData,\n    MyActionErrorType,\n    selectData,\n    MyActionQueryKey<config>\n  >\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n> = QueryOptions<\n  MyActionQueryFnData,\n  MyActionErrorType,\n  selectData,\n  MyActionQueryKey<config>\n>\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\n\nexport type MyActionData = MyActionQueryFnData\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<\n  typeof myActionQueryKey<config>\n>\n```\n\n## Style Conventions\n\n### `queryFn` Syntax\n\n- Use arrow function property syntax: `queryFn: async (context) =>` (not method shorthand `async queryFn(context)`)\n- Use `context` parameter, not destructuring: `async (context) =>` (not `async ({ queryKey }) =>`)\n- Access `queryKey` via `context.queryKey`\n\n### Destructuring `queryKey`\n\nUse array destructuring with `parameters`, then access properties via `parameters.foo`:\n\n```ts\n// ✓ Correct\nconst [, { scopeKey: _, ...parameters }] = context.queryKey\nif (!parameters.account) throw new Error('account is required')\n\n// ✗ Avoid\nconst { account, scopeKey: _, ...parameters } = context.queryKey[1]\n```\n\n### Calling Actions\n\nWhen calling actions, spread parameters first, then pass required parameters:\n\n```ts\n// ✓ Correct - spread, then explicit required param\nreturn myAction(config, { ...parameters, foo: parameters.foo })\n\n// ✗ Avoid - just passing parameters directly\nreturn myAction(config, parameters)\n```\n\n### Accessing Skipped Properties\n\nProperties filtered from the queryKey (e.g., `connector`, `abi`) should be accessed via `options.`:\n\n```ts\nqueryFn: async (context) => {\n  const [, { scopeKey: _, ...parameters }] = context.queryKey\n  // ✓ Use rest.connector for properties not in queryKey\n  const result = await myAction(config, { ...parameters, connector: options.connector })\n  return result ?? null\n}\n```\n\n## Type Parameter Nuances\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function readContractQueryOptions<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config,\n>\n```\n\n### `ExactPartial` vs `UnionExactPartial`\n\n- **`ExactPartial`**: Use for simple cases with straightforward parameter types\n- **`UnionExactPartial`**: Use for complex type inference or action parameter types with lots of unions (e.g., contract-related actions)\n\nIf unsure, check the underlying action's parameter types or ask.\n\n### Default Parameter Value\n\n- **Simple cases**: `options: MyActionOptions<config, selectData> = {}`\n- **Complex generics** (e.g., contract actions with abi/args): `options: MyActionOptions<...> = {} as any`\n\n## `structuralSharing`\n\nInclude `structuralSharing` from `./utils.js` when the action returns:\n- Objects\n- Nested values  \n- Arrays\n\nSee `packages/react/src/hooks` for more examples.\n\n## Special Query Key Handling\n\nFor `getConnectorClient`, include `connectorUid` separately in the query key:\n\n```ts\nreturn [\n  'connectorClient',\n  { ...filterQueryOptions(options), connectorUid: options.connector?.uid },\n] as const\n```\n","isInternal":false,"tokens":1101,"sizeBytes":4711},{"name":"AGENTS.md","path":"packages/core/src/tempo/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/core/src/tempo/AGENTS.md","title":"Tempo Skill","category":"anthropic-skill","format":"markdown","content":"# Agent Guidelines\n\nAgent guidance for `@wagmi/core/tempo`.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Code Generation\n\n### Wagmi Actions\n\nWhen generating Wagmi actions (in `actions/`), follow these guidelines.\n\nAn example of a generated action set can be found in `actions/fee.ts`.\n\n#### Source of Truth\n\n- **All actions must be based on their corresponding Viem actions** from `import { Actions } from viem/tempo` (local path might be `../viem/src/tempo/actions` or you can clone `gh repo clone wevm/viem`)\n- Wagmi actions are wrappers around Viem actions that integrate with Wagmi's config and TanStack Query\n\n#### Documentation Requirements\n\nAll actions **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the action does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (`createConfig`, `http`, action imports)\n   - Config setup with chains and transports\n   - Action usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **`@param` tags** - For each parameter (config, parameters)\n4. **`@returns` tag** - Description of the return value\n\nExample:\n```ts\n/**\n * Gets the user's default fee token.\n *\n * @example\n * ```ts\n * import { createConfig, http } from '@wagmi/core'\n * import { tempo } from '@wagmi/core/chains'\n * import { Actions } from '@wagmi/core/tempo'\n *\n * const config = createConfig({\n *   chains: [tempo],\n *   transports: {\n *     [tempo.id]: http(),\n *   },\n * })\n *\n * const token = await Actions.fee.getUserToken(config, {\n *   account: '0x...',\n * })\n * ```\n *\n * @param config - Config.\n * @param parameters - Parameters.\n * @returns The user's fee token address.\n */\n```\n\n#### Action Types\n\n##### Query-based Actions (Read-Only)\n\nFor read-only actions that fetch data:\n\n- Return the result from the corresponding Viem action\n- Parameters include `ChainIdParameter<config>` and the Viem action's parameters\n- Must include query utilities for TanStack Query integration\n\n```ts\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue<config>> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  return viem_Actions.myAction(client, rest)\n}\n```\n\n##### Mutation-based Actions (Write)\n\nFor state-changing actions, both variants must be implemented:\n\n**1. Standard Variant**\n\n- Uses `getConnectorClient` to get the wallet client\n- Returns the result from the corresponding Viem action\n- Does not wait for transaction confirmation\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myAction(\n    client,\n    parameters as viem_Actions.myAction.Parameters,\n  )\n}\n```\n\n**2. Sync Variant (`*Sync`)**\n\n- Named with `Sync` suffix (e.g., `setUserTokenSync`)\n- Uses `getConnectorClient` to get the wallet client\n- Waits for transaction inclusion on a block before returning a response\n- Returns both the receipt and extracted event data\n\n```ts\nexport async function myActionSync<config extends Config>(\n  config: config,\n  parameters: myActionSync.Parameters<config>,\n): Promise<myActionSync.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myActionSync(\n    client,\n    parameters as viem_Actions.myActionSync.Parameters,\n  )\n}\n```\n\n#### Namespace Properties\n\n##### Query-based Actions\n\nAll query-based actions must include the following components:\n\n- Include `enabled` logic to disable the query when required reactive parameters (e.g. addresses) are undefined\n- The `enabled` conditional must check ALL required reactive parameters (e.g., `account && spender` for allowance checks)\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nimport { filterQueryOptions } from './utils.js'\nimport type { QueryOptions, QueryParameter } from './utils.js'\n\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    viem_Actions.myAction.Parameters\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n\n  export function queryKey<config extends Config>(\n    parameters: Parameters<config>,\n  ) {\n    return ['myAction', filterQueryOptions(parameters)] as const\n  }\n\n  export type QueryKey<config extends Config> = ReturnType<\n    typeof queryKey<config>\n  >\n\n  export function queryOptions<config extends Config, selectData = ReturnValue>(\n    config: Config,\n    parameters: queryOptions.Parameters<config, selectData>,\n  ): queryOptions.ReturnValue<config, selectData> {\n    const { query, ...rest } = parameters\n    return {\n      ...query,\n      enabled: Boolean(rest.account && (query?.enabled ?? true)),\n      queryKey: queryKey(rest),\n      async queryFn(context) {\n        const [, parameters] = context.queryKey\n        return await myAction(config, parameters)\n      },\n    }\n  }\n\n  export declare namespace queryOptions {\n    export type Parameters<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = myAction.Parameters<config> &\n      QueryParameter<\n        myAction.ReturnValue,\n        myAction.ErrorType,\n        selectData,\n        myAction.QueryKey<config>\n      >\n\n    export type ReturnValue<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = QueryOptions<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    >\n  }\n}\n```\n\n##### Mutation-based Actions\n\nAll mutation-based actions must include the following components:\n\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport declare namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myAction.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n}\n\nexport declare namespace myActionSync {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myActionSync.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myActionSync.ReturnValue\n\n  export type ErrorType = viem_Actions.myActionSync.ErrorType\n}\n```\n\n#### Testing\n\nTests should be co-located with actions in `*action-name*.test.ts` files.\n\n**Important**: Wagmi action tests should follow the same test flows as the corresponding Viem action tests in `src/tempo/actions/`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that Wagmi tests use `config` instead of `client`, and mutation actions don't require explicit `account` parameters since they use the connector's account.\n\nSee `actions/token.test.ts` for a comprehensive example of test patterns and structure.\n\n##### Test Structure\n\nOrganize tests by action name with a default test case. Use namespace imports for cleaner code:\n\n```ts\nimport { connect } from '@wagmi/core'\nimport { accounts,  config, queryClient } from '@wagmi/test/tempo'\nimport { describe, expect, test } from 'vitest'\nimport * as myNamespace from './myNamespace.js'\n\nconst account = accounts[0]\n\n// Query-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    const result = await myNamespace.myAction(config, {\n      // ...\n    })\n    expect(result).toMatchInlineSnapshot(`...`)\n  })\n\n  describe('queryOptions', () => {\n    test('default', async () => {\n      const options = myNamespace.myAction.queryOptions(config, {\n        // ...\n      })\n      expect(await queryClient.fetchQuery(options)).toMatchInlineSnapshot(`...`)\n    })\n  })\n})\n\n// Mutation-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    // e.g., create tokens, grant roles, mint tokens, etc.\n    \n    const hash = await myNamespace.myAction(config, {\n      // ... (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n  })\n})\n\ndescribe('myActionSync', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    \n    const result = await myNamespace.myActionSync(config, {\n      // ... (no account parameter needed)\n    })\n    expect(result).toBeDefined()\n  })\n})\n```\n","isInternal":false,"tokens":2205,"sizeBytes":9610},{"name":"AGENTS.md","path":"packages/react/src/hooks/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/react/src/hooks/AGENTS.md","title":"Hooks Skill","category":"anthropic-skill","format":"markdown","content":"# Agent Guidelines\n\nAgent guidance for React hooks\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Hook Format\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  })\n  return useQuery(options)\n}\n```\n\n## Key Patterns\n\n### `'use client'` Directive\n\nAll hooks must start with `'use client'` directive.\n\n### `useConfig` and `useChainId`\n\nQuery hooks always call these to get config from React context and current chain:\n\n```ts\nconst config = useConfig(parameters)\nconst chainId = useChainId({ config })\n```\n\n### `ResolvedRegister['config']`\n\nUse `ResolvedRegister['config']` as default for `config` in the **function signature only** (not in type definitions). This allows type inference when config is injected via React context:\n\n```ts\n// Type definition uses Config\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = ...\n\n// Function uses ResolvedRegister['config']\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(...) { ... }\n```\n\n### `enabled` and `structuralSharing`\n\nDo NOT set `enabled` or `structuralSharing` in hooks. These are handled by `queryOptions` from `@wagmi/core/query`.\n\n### Doc Comment\n\nUse a simple link to the docs:\n\n```ts\n/** https://wagmi.sh/react/api/hooks/useMyAction */\n```\n\n## Type Parameter Nuances\n\n### `Compute` vs `UnionCompute`\n\n- **`Compute`**: Use for simple hooks with straightforward parameter types\n- **`UnionCompute`**: Use for complex type inference (e.g., contract-related hooks)\n- **Neither**: Some hooks with very complex inference may not support either\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function useReadContract<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config = ResolvedRegister['config'],\n  selectData = ReadContractData<abi, functionName, args>,\n>\n```\n\n### Default Parameter Value\n\n- **Simple cases**: `parameters: UseMyActionParameters<config, selectData> = {}`\n- **Complex generics**: `parameters: UseMyActionParameters<...> = {} as any`\n","isInternal":false,"tokens":843,"sizeBytes":3588},{"name":"AGENTS.md","path":"packages/react/src/tempo/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/react/src/tempo/AGENTS.md","title":"Tempo Skill","category":"anthropic-skill","format":"markdown","content":"# Agent Guidelines\n\nAgent guidance for `wagmi/tempo` Hooks.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Wagmi Hooks\n\nWhen generating Wagmi hooks (in `hooks/`), follow these guidelines.\n\nAn example of a generated hook set can be found in `hooks/fee.ts`.\n\n### Source of Truth\n\n- **All hooks must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Wagmi hooks are React hooks that wrap Wagmi actions with TanStack Query's `useQuery` and `useMutation`\n- If the Wagmi action is unclear or missing, implement the Wagmi action first\n\n### Documentation Requirements\n\nAll hooks **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the hook does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (hook imports)\n   - React component usage\n   - Hook usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **@param parameters** - Parameters description\n4. **`@returns` tag** - Description of the return value\n\nExample:\n\n```typescript\n/**\n * Hook for getting the user's default fee token.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   const { data, isLoading } = Hooks.fee.useUserToken({\n *     account: '0x20c...0055',\n *   })\n *   if (isLoading) return <div>Loading...</div>\n *   return <div>Token: {data?.address}</div>\n * }\n * ```\n * \n * @param parameters - Parameters.\n * @returns Query result with token address and ID.\n */\n```\n\n### Query Hooks\n\nFor read-only hooks that fetch data:\n\n- Use `useQuery` from `../../utils/query.js`\n- Use `useConfig` and `useChainId` from `../../hooks/(useChainId|useConfig).js`\n- Call the corresponding action's `queryOptions` function\n- All parameters should be optional. Use `ExactPartial` to make all query parameters optional\n- Support optional `query` parameter for TanStack Query options\n- Default `parameters` to `{}` only if all parameters are truly optional (no required non-reactive parameters like `token`, `role`, etc.)\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<config, selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myAction.queryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  } as never)\n  return useQuery(options)\n}\n```\n\n### Mutation Hooks\n\nFor state-changing hooks, both variants must be implemented:\n\n**1. Standard Variant**\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  })\n}\n```\n\n**2. Sync Variant (`use*Sync`)**\n\n```typescript\nexport function useMyActionSync<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyActionSync.Parameters<config, context> = {},\n): useMyActionSync.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myActionSync(config, variables)\n    },\n    mutationKey: ['myActionSync'],\n  })\n}\n```\n\n### Watch Hooks\n\nFor event watching hooks:\n\n- Call the corresponding action's watch function inside `useEffect`\n- All parameters should be optional using `ExactPartial`\n- Include an `enabled` parameter (defaults to `true`) to control whether the watcher is active\n- Check if all required properties (like the callback) are defined before setting up the watcher\n- Include all optional properties for `rest` in the dependency array (e.g. `rest.foo`, `rest.bar`, `rest.baz`)\n- Return the unwatch function from the `useEffect` for cleanup\n\nAll watch hooks must include comprehensive JSDoc with:\n1. **Function description** - What events the hook watches for\n2. **`@example` block** - Complete working example showing hook usage in a React component\n3. **`@param` tag** - Parameters description\n\n```typescript\n/**\n * Hook for watching TIP20 token mint events.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   Hooks.token.useWatchMint({\n *     onMint(args) {\n *       console.log('Mint:', args)\n *     },\n *   })\n *   return <div>Watching for mints...</div>\n * }\n * ```\n *\n * @param parameters - Parameters.\n */\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) {\n  const { enabled = true, onMyEvent, ...rest } = parameters\n\n  const config = useConfig({ config: parameters.config })\n  const configChainId = useChainId({ config })\n  const chainId = parameters.chainId ?? configChainId\n\n  useEffect(() => {\n    if (!enabled) return\n    if (!onMyEvent) return\n    return Actions.watchMyEvent(config, {\n      ...rest,\n      chainId,\n      onMyEvent,\n    })\n  }, [config, enabled, onMyEvent, rest.foo, rest.bar, rest.baz])\n}\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n### Namespace Properties\n\n#### Query Hooks\n\nAll query hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<selectData> { ... }\n\nexport declare namespace useMyAction {\n  export type Parameters<\n    config extends Config = ResolvedRegister['config'],\n    selectData = myAction.ReturnValue,\n  > = ConfigParameter<config> &\n    QueryParameter<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    > &\n    ExactPartial<myAction.Parameters<config>>\n\n  export type ReturnValue<selectData = myAction.ReturnValue> =\n    UseQueryReturnType<selectData, Error>\n}\n```\n\n**Note:** Use `ExactPartial<T>` to make all query parameters optional. This ensures that reactive parameters can be undefined initially and populated later for proper reactivity.\n\n#### Watch Hooks\n\nAll watch hooks must include the following components:\n\n```typescript\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) { ... }\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n**Note:** Watch hooks don't have a return value - they set up event listeners in a `useEffect` and automatically clean up when the component unmounts or dependencies change.\n\n#### Mutation Hooks\n\nAll mutation hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> { ... }\n\nexport declare namespace useMyAction {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myAction.ReturnValue,\n          myAction.ErrorType,\n          myAction.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myAction.ReturnValue,\n    myAction.ErrorType,\n    myAction.Parameters<config>,\n    context\n  >\n}\n\nexport declare namespace useMyActionSync {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myActionSync.ReturnValue,\n          myActionSync.ErrorType,\n          myActionSync.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myActionSync.ReturnValue,\n    myActionSync.ErrorType,\n    myActionSync.Parameters<config>,\n    context\n  >\n}\n```\n\n### Testing\n\nTests should be co-located with hooks in `myNamespace.test.ts` files.\n\n**Important**: Wagmi hook tests should follow the same test flows as the corresponding Wagmi action tests in `@wagmi/core/tempo`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that hooks use React rendering patterns with `renderHook`, and mutation hooks don't require explicit `account` parameters in `mutateAsync` calls since they use the connector's account.\n\nSee `hooks/fee.test.ts` for a comprehensive example of test patterns and structure.\n\n#### Test Structure\n\nOrganize tests by hook name with a default test case. Use namespace imports for cleaner code when importing hooks:\n\n```typescript\nimport { type Address } from 'viem'\nimport { describe, expect, test, vi } from 'vitest'\nimport { useConnect } from 'wagmi'\nimport { accounts, config, renderHook } from '@wagmi/test/tempo'\nimport * as myNamespace from './myNamespace.js'\n\n// Query hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() =>\n      myNamespace.useMyAction({ account: account.address }),\n    )\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n\n  test('reactivity: account parameter', async () => {\n    const { result, rerender } = await renderHook(\n      (props) =>\n        myNamespace.useMyAction({ account: props?.account }),\n      { initialProps: { account: undefined as Address | undefined } },\n    )\n\n    await vi.waitFor(() => result.current.fetchStatus === 'fetching')\n\n    // Should be disabled when account is undefined\n    expect(result.current.data).toBeUndefined()\n    expect(result.current.isPending).toBe(true)\n    // expect(result.current.isEnabled).toBe(false) // TODO: Disabled until @tanstack/react-query bumped to latest\n\n    // Set account\n    rerender({ account: account.address })\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    // Should now be enabled and have data\n    expect(result.current.isEnabled).toBe(true)\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n})\n\n// Mutation hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyAction(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n    // e.g., create tokens, grant roles, etc. using the action's mutateAsync\n\n    const hash = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\ndescribe('useMyActionSync', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyActionSync(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n\n    const data = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(data).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\n// Watch hooks\ndescribe('useWatchMyEvent', () => {\n  test('default', async () => {\n    const { result: connectResult } = await renderHook(() => ({\n      connect: useConnect(),\n      createSync: myNamespace.useCreateSync(),\n      // ... any other setup hooks needed\n    }))\n\n    await connectResult.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup (e.g., create token, grant roles)\n\n    const events: any[] = []\n    await renderHook(() =>\n      myNamespace.useWatchMyEvent({\n        // ... parameters\n        onMyEvent(args) {\n          events.push(args)\n        },\n      }),\n    )\n\n    // Trigger the event by calling a sync action\n    // e.g., await connectResult.current.myActionSync.mutateAsync({ ... })\n\n    await vi.waitUntil(() => events.length >= 1)\n\n    expect(events.length).toBeGreaterThanOrEqual(1)\n    expect(events[0]?.someField).toBe(expectedValue)\n  })\n})\n```\n","isInternal":false,"tokens":3101,"sizeBytes":13581},{"name":"README.md","path":"packages/cli/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/cli/README.md","title":"cli Documentation","category":"plugin-manifest","format":"markdown","content":"# @wagmi/cli\n\nManage and generate code from Ethereum ABIs\n\n## Installation\n\n```bash\npnpm add @wagmi/cli\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","isInternal":false,"tokens":55,"sizeBytes":193},{"name":"README.md","path":"packages/connectors/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/connectors/README.md","title":"connectors Documentation","category":"plugin-manifest","format":"markdown","content":"# @wagmi/connectors\n\nCollection of connectors for Wagmi\n\n## Installation\n\n```bash\npnpm add @wagmi/connectors @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","isInternal":false,"tokens":62,"sizeBytes":215},{"name":"README.md","path":"packages/core/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/core/README.md","title":"core Documentation","category":"plugin-manifest","format":"markdown","content":"# @wagmi/core\n\nVanillaJS library for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","isInternal":false,"tokens":55,"sizeBytes":187},{"name":"README.md","path":"packages/create-wagmi/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/create-wagmi/README.md","title":"create-wagmi Documentation","category":"plugin-manifest","format":"markdown","content":"# create-wagmi\n\nGet up and running quickly with [Wagmi](https://wagmi.sh) by using the `create-wagmi` CLI.\n\n## Installation\n\n```bash\nnpm create wagmi\n# or\npnpm create wagmi\n# or\nyarn create wagmi\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh/cli/create-wagmi).\n","isInternal":false,"tokens":93,"sizeBytes":302},{"name":"README.md","path":"packages/create-wagmi/templates/next/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/create-wagmi/templates/next/README.md","title":"next Documentation","category":"plugin-manifest","format":"markdown","content":"This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","isInternal":false,"tokens":41,"sizeBytes":147},{"name":"README.md","path":"packages/create-wagmi/templates/vite-react/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/create-wagmi/templates/vite-react/README.md","title":"vite-react Documentation","category":"plugin-manifest","format":"markdown","content":"This is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","isInternal":false,"tokens":42,"sizeBytes":144},{"name":"README.md","path":"packages/create-wagmi/templates/vite-vue/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/create-wagmi/templates/vite-vue/README.md","title":"vite-vue Documentation","category":"plugin-manifest","format":"markdown","content":"This is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n","isInternal":false,"tokens":42,"sizeBytes":144},{"name":"README.md","path":"packages/react/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/react/README.md","title":"react Documentation","category":"plugin-manifest","format":"markdown","content":"# wagmi\n\nReact Hooks for Ethereum\n\n## Installation\n\n```bash\npnpm add wagmi viem @tanstack/react-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n","isInternal":false,"tokens":52,"sizeBytes":191},{"name":"README.md","path":"packages/solid/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/solid/README.md","title":"solid Documentation","category":"plugin-manifest","format":"markdown","content":"# @wagmi/solid\n\nSolid Primitives for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/solid viem @tanstack/solid-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n","isInternal":false,"tokens":62,"sizeBytes":211},{"name":"README.md","path":"packages/vue/README.md","rawUrl":"https://raw.githubusercontent.com/wevm/wagmi/HEAD/packages/vue/README.md","title":"vue Documentation","category":"plugin-manifest","format":"markdown","content":"# @wagmi/vue\n\nVue Composables for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/vue viem @tanstack/vue-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n","isInternal":false,"tokens":59,"sizeBytes":204}],"systemPromptSnippet":"<yakaai_skills repo=\"wevm/wagmi\">\n<!-- File: site/AGENTS.md (Tokens: ~2274 | Category: root-instruction) -->\n# Agent Guidelines\n\nAgent guidance for the Wagmi documentation site.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Tempo\n\n- All Tempo documentation must be added under the `/tempo` sidebar item.\n\n## Wagmi Actions\n\n- **All documentation must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Make sure you update `site/tempo/actions/index.md` for new actions\n\n### Query Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// @filename: example.ts\n// ---cut---\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result = await Actions.amm.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', result)\n// @log: Result: 10500000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`bigint`\n\ndescription\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n### baz (optional)\n\n- **Type:** `Hex`\n\ndescription\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Mutation Actions\n\n````md\n# `namespace.action`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst result =\n  await Actions.namespace.actionSync(config, {\n    foo: '0x...',\n    bar: 123n,\n  })\n\nconsole.log('Foo:', result.foo)\n// @log: Foo: 5250000000000000000n\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `namespace.action` action and wait for inclusion manually:\n\n```ts\nimport { Actions as viem_Actions } from 'viem/tempo'\nimport { Actions } from 'wagmi/tempo'\nimport { waitForTransactionReceipt } from 'wagmi/actions'\n\nconst hash = await Actions.namespace.action(config, {\n  foo: '0x...',\n  bar: 123n,\n})\nconst receipt = await waitForTransactionReceipt(config, { hash })\n\nconst { args: { baz } } \n  = viem_Actions.namespace.action.extractEvent(receipt.logs)\n```\n\n## Return Type\n\ndescription\n\n```ts\ntype ReturnType = {\n  /** description */\n  baz: bigint\n}\n```\n\n## Parameters\n\n### foo\n\n- **Type:** `Address`\n\ndescription\n\n### bar\n\n- **Type:** `bigint`\n\ndescription\n\n<!--@include: @shared/tempo-write-parameters.md-->\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n### Watch Actions\n\n````md\n# `namespace.watchAction`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\n// @filename: config.ts\n// @errors: 2322\nimport type { Config } from 'wagmi'\nimport { tempoTestnet } from 'wagmi/chains'\nexport const config = {} as Config<readonly [typeof tempoTestnet]>\n// ---cut---\n// @filename: example.ts\nimport { Actions } from 'wagmi/tempo'\nimport { config } from './config'\n\nconst unwatch = Actions.namespace.watchAction(config, {\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n\n// Later, stop watching\nunwatch()\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\n`() => void`\n\nReturns a function to unsubscribe from the event.\n\n## Parameters\n\n### onAction\n\n- **Type:** `function`\n\n```ts\ndeclare function onBurn(args: Args, log: Log): void\n\ntype Args = {\n  /** description */\n  foo: bigint\n  /** description */\n  barBaz: bigint\n}\n```\n\nCallback to invoke when action occurs.\n\n### fromBlock (optional)\n\n- **Type:** `bigint`\n\nBlock to start listening from.\n\n### onError (optional)\n\n- **Type:** `function`\n\n```ts\ndeclare function onError(error: Error): void\n```\n\nThe callback to call when an error occurred when trying to get for a new block.\n\n### poll (optional)\n\n- **Type:** `true`\n\nEnable polling mode.\n\n### pollingInterval (optional)\n\n- **Type:** `number`\n\nPolling frequency (in ms). Defaults to Client's pollingInterval config.\n\n## Viem\n\n- [`namespace.action`](https://viem.sh/tempo/actions/namespace.action)\n````\n\n## Wagmi Hooks\n\n- **All documentation must be based on their corresponding Wagmi hooks** from `wagmi/tempo` (`packages/react/src/tempo/`)\n- Make sure you update `site/tempo/hooks/index.md` for new actions\n\n### Query Hooks\n\nAn example of a generated hook set can be found in `hooks/amm.useLiquidityBalance.ts`. Template example:\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst { data: result } = Hooks.namespace.useHook({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Result:', resut)\n// @log: Result: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Return Type\n\nSee [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n## Parameters\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n### query\n\nSee the [TanStack Query query docs](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Mutation Hooks\n\n````md\n# `namespace.useHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nconst actionNameSync = Hooks.namespace.useHookSync()\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionNameSync.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nconsole.log('Received baz:', actionNameSync.data?.baz)\n// @log: Received baz: ...\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n### Asynchronous Usage\n\nThe example above uses a `*Sync` variant of the action, that will wait for the transaction to be included before returning.\n\nIf you are optimizing for performance, you should use the non-sync `amm.burn` action and wait for inclusion manually:\n\n```ts\nimport { Actions } from 'viem/tempo'\nimport { Hooks } from 'wagmi/tempo'\nimport { useWaitForTransactionReceipt } from 'wagmi'\n\nconst actionName = Hooks.namespace.useHook()\nconst { data: receipt } = useWaitForTransactionReceipt({ hash: actionName.data })\n\n// Call `mutate` in response to user action (e.g. button click, form submission)\nactionName.mutate({\n  foo: '0x...',\n  bar: 123n,\n})\n\nif (receipt) {\n  const { args: { baz } } \n    = Actions.namespace.action.extractEvent(receipt.logs)\n}\n```\n\n## Return Type\n\nSee [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook return types.\n\n### data\n\nSee [Wagmi Action `namespace.action` Return Type](/tempo/actions/namespace.action#return-type)\n\n### mutate/mutateAsync\n\nSee [Wagmi Action `namespace.action` Parameters](/tempo/actions/namespace.action#parameters)\n\n## Parameters\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n### mutation\n\nSee the [TanStack Query mutation docs](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation) for more info hook parameters.\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n````\n\n### Watch Hooks\n\n````md\n# `namespace.useWatchHook`\n\ndescription\n\n## Usage\n\n::: code-group\n```ts twoslash [example.ts]\nimport { Hooks } from 'wagmi/tempo'\n\nHooks.amm.useWatchHook({\n  onAction(args, log) {\n    console.log('args:', args)\n  },\n})\n```\n<<< @/snippets/react/config-tempo.ts{ts} [config.ts]\n:::\n\n## Parameters\n\nSee [Wagmi Action `namespace.watchAction` Parameters](/tempo/actions/namespace.watchAction#parameters)\n\n### config\n\n`Config | undefined`\n\n[`Config`](https://wagmi.sh/react/api/createConfig#config) to use instead of retrieving from the nearest [`WagmiProvider`](https://wagmi.sh/react/api/WagmiProvider).\n\n## Action\n\n- [`namespace.action`](/tempo/actions/namespace.action)\n- [`namespace.watchAction`](/tempo/actions/namespace.watchAction)\n````\n\n<!-- File: .agents/skills/wagmi-development/SKILL.md (Tokens: ~3797 | Category: anthropic-skill) -->\n---\nname: wagmi-development\ndescription: Creates Wagmi features across all layers - core actions, query options, framework bindings. Use when adding new actions, hooks, or working across packages/core, packages/react, packages/vue.\n---\n\n# Wagmi Development\n\nFull-stack patterns for adding Wagmi features. This skill covers Viem-based actions only (not Wagmi config actions).\n\n## Layer Overview\n\n1. **Core Action** (`packages/core/src/actions/`) - Base functionality wrapping Viem\n2. **Query Options** (`packages/core/src/query/`) - TanStack Query integration\n3. **Framework Bindings** - React (`packages/react/src/hooks/`), Vue (`packages/vue/src/composables/`)\n\n---\n\n## 1. Core Action\n\n### Structure\n\n```ts\nimport {\n  type MyActionErrorType as viem_MyActionErrorType,\n  type MyActionParameters as viem_MyActionParameters,\n  type MyActionReturnType as viem_MyActionReturnType,\n  myAction as viem_myAction,\n} from 'viem/actions'\n\nimport type { Config } from '../createConfig.js'\nimport type { ChainIdParameter, ConnectorParameter } from '../types/properties.js'\nimport type { Compute } from '../types/utils.js'\nimport { getAction } from '../utils/getAction.js'\n\nexport type MyActionParameters<config extends Config = Config> = Compute<\n  ChainIdParameter<config> & viem_MyActionParameters\n>\n\nexport type MyActionReturnType = viem_MyActionReturnType\n\nexport type MyActionErrorType = viem_MyActionErrorType\n\n/** https://wagmi.sh/core/api/actions/myAction */\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: MyActionParameters<config>,\n): Promise<MyActionReturnType> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  const action = getAction(client, viem_myAction, 'myAction')\n  return action(rest)\n}\n```\n\n### Key Rules\n\n- **Viem imports**: Prefix with `viem_` (e.g., `viem_getBalance`)\n- **Client access**: \n  - Read-only: `config.getClient({ chainId })`\n  - Wallet: `await getConnectorClient(config, { chainId, connector, account })`\n  - Mixed: Use `getConnectorClient` for account, `getClient` for action (see `estimateGas.ts`)\n- **Parameters**: Add `ChainIdParameter<config>` always. Add `ConnectorParameter` for wallet actions.\n- **Type params**: Mirror Viem's type params for inference. Use `const` modifier for literal inference (abi, args).\n- **Spread**: Omit wagmi-specific props (`chainId`, `connector`) when calling Viem action.\n\n### Testing\n\n**Runtime tests** (`action.test.ts`):\n```ts\nimport { abi, address, config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  await expect(myAction(config, { /* required params */ })).resolves.toMatchInlineSnapshot(`...`)\n})\n\ntest('parameters: chainId', async () => { /* test chainId param */ })\n\ntest('behavior: error case', async () => { /* test error handling */ })\n```\n\n**Type tests** (`action.test-d.ts`) - only if action has type inference:\n```ts\nimport { config } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { myAction } from './myAction.js'\n\ntest('default', async () => {\n  const result = await myAction(config, { /* params */ })\n  expectTypeOf(result).toEqualTypeOf<ExpectedType>()\n})\n```\n\n**Type benchmarks** (`action.bench-d.ts`) - only if action has type inference:\n```ts\nimport { attest } from '@ark/attest'\nimport { test } from 'vitest'\nimport type { MyActionParameters } from './myAction.js'\n\ntest('default', () => {\n  type Result = MyActionParameters<typeof abi.erc20, 'balanceOf'>\n  const res = {} as Result\n  attest.instantiations([12345, 'instantiations'])\n  attest(res.args).type.toString.snap(`readonly [account: \\`0x\\${string}\\`]`)\n})\n```\n\n**Wallet action tests**: Connect before, disconnect after:\n```ts\ntest('default', async () => {\n  await connect(config, { connector })\n  await expect(myAction(config, { /* params */ })).resolves.toMatchInlineSnapshot(`...`)\n  await disconnect(config, { connector })\n})\n```\n\n---\n\n## 2. Query Options\n\nQuery (read-only) or Mutation (wallet) options for TanStack Query.\n\n### Query Structure\n\n```ts\nimport {\n  type MyActionErrorType,\n  type MyActionParameters,\n  type MyActionReturnType,\n  myAction,\n} from '../actions/myAction.js'\nimport type { Config } from '../createConfig.js'\nimport type { ScopeKeyParameter } from '../types/properties.js'\nimport type { QueryOptions, QueryParameter } from '../types/query.js'\nimport type { Compute, ExactPartial } from '../types/utils.js'\nimport { filterQueryOptions, structuralSharing } from './utils.js'\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.requiredParam && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.requiredParam) throw new Error('requiredParam is required')\n      const result = await myAction(config, {\n        ...(parameters as MyActionParameters),\n        requiredParam: parameters.requiredParam,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when returning complex objects/arrays\n  }\n}\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\nexport type MyActionData = MyActionQueryFnData\n\nexport function myActionQueryKey<config extends Config>(\n  options: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(options)] as const\n}\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<typeof myActionQueryKey<config>>\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = QueryOptions<MyActionQueryFnData, MyActionErrorType, selectData, MyActionQueryKey<config>>\n```\n\n### Mutation Structure\n\n```ts\nimport type { MutationOptions, MutationParameter } from '../types/query.js'\n\nexport type MyActionOptions<config extends Config, context = unknown> = MutationParameter<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>,\n  context\n>\n\nexport function myActionMutationOptions<config extends Config, context>(\n  config: config,\n  options: MyActionOptions<config, context> = {},\n): MyActionMutationOptions<config> {\n  return {\n    ...options.mutation,\n    mutationFn: async (variables) => {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  }\n}\n\nexport type MyActionMutationOptions<config extends Config> = MutationOptions<\n  MyActionData,\n  MyActionErrorType,\n  MyActionVariables<config>\n>\n```\n\n### Key Rules\n\n- **ExactPartial vs UnionExactPartial**: Use `ExactPartial` for simple types, `UnionExactPartial` for complex unions (contract actions)\n- **enabled**: Based on required params being truthy\n- **structuralSharing**: Include when action returns objects/arrays\n- **filterQueryOptions**: Filters common non-serializable props. Skip props like `onReplaced` manually in query key.\n- **Query key**: Always `['actionName', filterQueryOptions(options)]`\n\n### Testing\n\n```ts\nimport { config } from '@wagmi/test'\nimport { expect, test } from 'vitest'\nimport { myActionQueryOptions } from './myAction.js'\n\ntest('default', () => {\n  expect(myActionQueryOptions(config, {})).toMatchInlineSnapshot(`\n    {\n      \"enabled\": false,\n      \"queryFn\": [Function],\n      \"queryKey\": [\"myAction\", {}],\n    }\n  `)\n})\n\ntest('enabled', () => {\n  expect(myActionQueryOptions(config, { requiredParam: 'value' }).enabled).toBe(true)\n})\n\ntest('queryFn: calls query fn', async () => {\n  const options = myActionQueryOptions(config, { requiredParam: 'value' })\n  const result = await options.queryFn({ queryKey: options.queryKey } as any)\n  expect(result).toMatchInlineSnapshot(`...`)\n})\n```\n\n---\n\n## 3. Framework Bindings\n\n### React Query Hook\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n    query: parameters.query,\n  })\n  return useQuery(options)\n}\n```\n\n### React Mutation Hook\n\n```ts\n'use client'\nimport { useMutation } from '@tanstack/react-query'\nimport type { Config, ResolvedRegister, MyActionErrorType } from '@wagmi/core'\nimport {\n  type MyActionData,\n  type MyActionMutate,\n  type MyActionMutateAsync,\n  type MyActionOptions,\n  type MyActionVariables,\n  myActionMutationOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { UseMutationReturnType } from '../utils/query.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<config extends Config = Config, context = unknown> =\n  MyActionOptions<config, context> & ConfigParameter<config>\n\nexport type UseMyActionReturnType<config extends Config = Config, context = unknown> =\n  UseMutationReturnType<\n    MyActionData,\n    MyActionErrorType,\n    MyActionVariables<config>,\n    context,\n    MyActionMutate<config, context>,\n    MyActionMutateAsync<config, context>\n  >\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: UseMyActionParameters<config, context> = {},\n): UseMyActionReturnType<config, context> {\n  const config = useConfig(parameters)\n  const options = myActionMutationOptions(config, parameters)\n  const mutation = useMutation(options)\n  type Return = UseMyActionReturnType<config, context>\n  return {\n    ...mutation,\n    mutate: mutation.mutate as Return['mutate'],\n    mutateAsync: mutation.mutateAsync as Return['mutateAsync'],\n  }\n}\n```\n\n### Vue Composable (Query)\n\n```ts\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport { computed } from 'vue'\nimport type { ConfigParameter } from '../types/properties.js'\nimport type { DeepMaybeRef } from '../types/ref.js'\nimport { deepUnref } from '../utils/cloneDeep.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<DeepMaybeRef<MyActionOptions<config, selectData> & ConfigParameter<config>>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/vue/api/composables/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const params = computed(() => deepUnref(parameters))\n  const config = useConfig(params)\n  const chainId = useChainId({ config })\n  const options = computed(() =>\n    myActionQueryOptions(config as any, {\n      ...params.value,\n      chainId: params.value.chainId ?? chainId.value,\n      query: params.value.query,\n    }),\n  )\n  return useQuery(options as any) as any\n}\n```\n\n### Framework Rules\n\n| Rule | React | Vue |\n|------|-------|-----|\n| Top directive | `'use client'` | None |\n| Parameters wrapper | `Compute<...>` | `Compute<DeepMaybeRef<...>>` |\n| Reactivity | Direct | `computed()` + `deepUnref()` |\n| Doc URL | `wagmi.sh/react/api/hooks/` | `wagmi.sh/vue/api/composables/` |\n\n**Shared rules:**\n- `ResolvedRegister['config']`: Use in function signature only, not type defs\n- No `enabled`/`structuralSharing` in hooks: Handled by queryOptions\n\n### Testing\n\n**Query hook test-d.ts**:\n```ts\nimport { abi } from '@wagmi/test'\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('select data', () => {\n  const result = useMyAction({\n    /* params */\n    query: {\n      select(data) {\n        expectTypeOf(data).toEqualTypeOf<ExpectedDataType>()\n        return data\n      },\n    },\n  })\n  expectTypeOf(result.data).toEqualTypeOf<ExpectedDataType>()\n})\n```\n\n**Mutation hook test-d.ts**:\n```ts\nimport { expectTypeOf, test } from 'vitest'\nimport { useMyAction } from './useMyAction.js'\n\ntest('context', () => {\n  const { mutate } = useMyAction({\n    mutation: {\n      onMutate(variables) {\n        expectTypeOf(variables).toMatchTypeOf<{ /* expected shape */ }>()\n        return { foo: 'bar' }\n      },\n      onError(error, variables, context) { /* test types */ },\n      onSuccess(data, variables, context) { /* test types */ },\n      onSettled(data, error, variables, context) { /* test types */ },\n    },\n  })\n\n  mutate({ /* params */ }, {\n    onSuccess(data, variables, context) { /* test inference */ },\n  })\n})\n```\n\n---\n\n## Exports\n\nAdd to `exports/index.ts` in respective package:\n\n```ts\n// packages/core/src/exports/index.ts\nexport {\n  type MyActionParameters,\n  type MyActionReturnType,\n  type MyActionErrorType,\n  myAction,\n} from '../actions/myAction.js'\n\n// packages/core/src/exports/query.ts\nexport {\n  type MyActionData,\n  type MyActionOptions,\n  type MyActionQueryFnData,\n  type MyActionQueryKey,\n  type MyActionQueryOptions,\n  myActionQueryKey,\n  myActionQueryOptions,\n} from '../query/myAction.js'\n\n// packages/react/src/exports/index.ts\nexport {\n  type UseMyActionParameters,\n  type UseMyActionReturnType,\n  useMyAction,\n} from '../hooks/useMyAction.js'\n```\n\n---\n\n## Verification\n\n```bash\n# Format\npnpm format\n\n# Type check (all or filtered)\npnpm check:types\npnpm --filter @wagmi/core check:types\npnpm --filter wagmi check:types\n\n# Test (all or filtered)\npnpm test\npnpm test --project core\npnpm test --project react\n\n# Update test snapshots\npnpm vitest -u\n\n# Type benchmarks\npnpm bench:types\n\n# Viem version mismatch in test snapshots\npnpm version:update:viem\n\n# Build (all or filtered)\npnpm run clean && pnpm build\npnpm --filter @wagmi/core build\n```\n\n<!-- File: packages/core/src/query/AGENTS.md (Tokens: ~1101 | Category: anthropic-skill) -->\n# Agent Guidelines\n\nAgent guidance for query options\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Options Format\n\n```ts\nexport function myActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n>(\n  config: config,\n  options: MyActionOptions<config, selectData> = {},\n): MyActionQueryOptions<config, selectData> {\n  return {\n    ...options.query,\n    enabled: Boolean(options.foo && (options.query?.enabled ?? true)),\n    queryFn: async (context) => {\n      const [, { scopeKey: _, ...parameters }] = context.queryKey\n      if (!parameters.foo) throw new Error('foo is required')\n      const result = await myAction(config, {\n        foo: parameters.foo,\n        ...parameters,\n      })\n      return result ?? null\n    },\n    queryKey: myActionQueryKey(options),\n    structuralSharing, // include when action returns objects, nested values, or arrays\n  }\n}\n\nexport function myActionQueryKey<\n  config extends Config,\n  selectData = MyActionData\n>(\n  parameters: Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> = {},\n) {\n  return ['myAction', filterQueryOptions(parameters)] as const\n}\n\nexport type MyActionOptions<\n  config extends Config,\n  selectData = MyActionData,\n> = Compute<ExactPartial<MyActionParameters<config>> & ScopeKeyParameter> &\n  QueryParameter<\n    MyActionQueryFnData,\n    MyActionErrorType,\n    selectData,\n    MyActionQueryKey<config>\n  >\n\nexport type MyActionQueryOptions<\n  config extends Config,\n  selectData = MyActionData\n> = QueryOptions<\n  MyActionQueryFnData,\n  MyActionErrorType,\n  selectData,\n  MyActionQueryKey<config>\n>\n\nexport type MyActionQueryFnData = Compute<MyActionReturnType>\n\nexport type MyActionData = MyActionQueryFnData\n\nexport type MyActionQueryKey<config extends Config> = ReturnType<\n  typeof myActionQueryKey<config>\n>\n```\n\n## Style Conventions\n\n### `queryFn` Syntax\n\n- Use arrow function property syntax: `queryFn: async (context) =>` (not method shorthand `async queryFn(context)`)\n- Use `context` parameter, not destructuring: `async (context) =>` (not `async ({ queryKey }) =>`)\n- Access `queryKey` via `context.queryKey`\n\n### Destructuring `queryKey`\n\nUse array destructuring with `parameters`, then access properties via `parameters.foo`:\n\n```ts\n// ✓ Correct\nconst [, { scopeKey: _, ...parameters }] = context.queryKey\nif (!parameters.account) throw new Error('account is required')\n\n// ✗ Avoid\nconst { account, scopeKey: _, ...parameters } = context.queryKey[1]\n```\n\n### Calling Actions\n\nWhen calling actions, spread parameters first, then pass required parameters:\n\n```ts\n// ✓ Correct - spread, then explicit required param\nreturn myAction(config, { ...parameters, foo: parameters.foo })\n\n// ✗ Avoid - just passing parameters directly\nreturn myAction(config, parameters)\n```\n\n### Accessing Skipped Properties\n\nProperties filtered from the queryKey (e.g., `connector`, `abi`) should be accessed via `options.`:\n\n```ts\nqueryFn: async (context) => {\n  const [, { scopeKey: _, ...parameters }] = context.queryKey\n  // ✓ Use rest.connector for properties not in queryKey\n  const result = await myAction(config, { ...parameters, connector: options.connector })\n  return result ?? null\n}\n```\n\n## Type Parameter Nuances\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function readContractQueryOptions<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config,\n>\n```\n\n### `ExactPartial` vs `UnionExactPartial`\n\n- **`ExactPartial`**: Use for simple cases with straightforward parameter types\n- **`UnionExactPartial`**: Use for complex type inference or action parameter types with lots of unions (e.g., contract-related actions)\n\nIf unsure, check the underlying action's parameter types or ask.\n\n### Default Parameter Value\n\n- **Simple cases**: `options: MyActionOptions<config, selectData> = {}`\n- **Complex generics** (e.g., contract actions with abi/args): `options: MyActionOptions<...> = {} as any`\n\n## `structuralSharing`\n\nInclude `structuralSharing` from `./utils.js` when the action returns:\n- Objects\n- Nested values  \n- Arrays\n\nSee `packages/react/src/hooks` for more examples.\n\n## Special Query Key Handling\n\nFor `getConnectorClient`, include `connectorUid` separately in the query key:\n\n```ts\nreturn [\n  'connectorClient',\n  { ...filterQueryOptions(options), connectorUid: options.connector?.uid },\n] as const\n```\n\n<!-- File: packages/core/src/tempo/AGENTS.md (Tokens: ~2205 | Category: anthropic-skill) -->\n# Agent Guidelines\n\nAgent guidance for `@wagmi/core/tempo`.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Code Generation\n\n### Wagmi Actions\n\nWhen generating Wagmi actions (in `actions/`), follow these guidelines.\n\nAn example of a generated action set can be found in `actions/fee.ts`.\n\n#### Source of Truth\n\n- **All actions must be based on their corresponding Viem actions** from `import { Actions } from viem/tempo` (local path might be `../viem/src/tempo/actions` or you can clone `gh repo clone wevm/viem`)\n- Wagmi actions are wrappers around Viem actions that integrate with Wagmi's config and TanStack Query\n\n#### Documentation Requirements\n\nAll actions **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the action does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (`createConfig`, `http`, action imports)\n   - Config setup with chains and transports\n   - Action usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **`@param` tags** - For each parameter (config, parameters)\n4. **`@returns` tag** - Description of the return value\n\nExample:\n```ts\n/**\n * Gets the user's default fee token.\n *\n * @example\n * ```ts\n * import { createConfig, http } from '@wagmi/core'\n * import { tempo } from '@wagmi/core/chains'\n * import { Actions } from '@wagmi/core/tempo'\n *\n * const config = createConfig({\n *   chains: [tempo],\n *   transports: {\n *     [tempo.id]: http(),\n *   },\n * })\n *\n * const token = await Actions.fee.getUserToken(config, {\n *   account: '0x...',\n * })\n * ```\n *\n * @param config - Config.\n * @param parameters - Parameters.\n * @returns The user's fee token address.\n */\n```\n\n#### Action Types\n\n##### Query-based Actions (Read-Only)\n\nFor read-only actions that fetch data:\n\n- Return the result from the corresponding Viem action\n- Parameters include `ChainIdParameter<config>` and the Viem action's parameters\n- Must include query utilities for TanStack Query integration\n\n```ts\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue<config>> {\n  const { chainId, ...rest } = parameters\n  const client = config.getClient({ chainId })\n  return viem_Actions.myAction(client, rest)\n}\n```\n\n##### Mutation-based Actions (Write)\n\nFor state-changing actions, both variants must be implemented:\n\n**1. Standard Variant**\n\n- Uses `getConnectorClient` to get the wallet client\n- Returns the result from the corresponding Viem action\n- Does not wait for transaction confirmation\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myAction(\n    client,\n    parameters as viem_Actions.myAction.Parameters,\n  )\n}\n```\n\n**2. Sync Variant (`*Sync`)**\n\n- Named with `Sync` suffix (e.g., `setUserTokenSync`)\n- Uses `getConnectorClient` to get the wallet client\n- Waits for transaction inclusion on a block before returning a response\n- Returns both the receipt and extracted event data\n\n```ts\nexport async function myActionSync<config extends Config>(\n  config: config,\n  parameters: myActionSync.Parameters<config>,\n): Promise<myActionSync.ReturnValue> {\n  const { account, chainId, connector } = parameters\n  const client = await getConnectorClient(config, {\n    account,\n    assertChainId: false,\n    chainId,\n    connector,\n  })\n  return viem_Actions.myActionSync(\n    client,\n    parameters as viem_Actions.myActionSync.Parameters,\n  )\n}\n```\n\n#### Namespace Properties\n\n##### Query-based Actions\n\nAll query-based actions must include the following components:\n\n- Include `enabled` logic to disable the query when required reactive parameters (e.g. addresses) are undefined\n- The `enabled` conditional must check ALL required reactive parameters (e.g., `account && spender` for allowance checks)\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nimport { filterQueryOptions } from './utils.js'\nimport type { QueryOptions, QueryParameter } from './utils.js'\n\nexport function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    viem_Actions.myAction.Parameters\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n\n  export function queryKey<config extends Config>(\n    parameters: Parameters<config>,\n  ) {\n    return ['myAction', filterQueryOptions(parameters)] as const\n  }\n\n  export type QueryKey<config extends Config> = ReturnType<\n    typeof queryKey<config>\n  >\n\n  export function queryOptions<config extends Config, selectData = ReturnValue>(\n    config: Config,\n    parameters: queryOptions.Parameters<config, selectData>,\n  ): queryOptions.ReturnValue<config, selectData> {\n    const { query, ...rest } = parameters\n    return {\n      ...query,\n      enabled: Boolean(rest.account && (query?.enabled ?? true)),\n      queryKey: queryKey(rest),\n      async queryFn(context) {\n        const [, parameters] = context.queryKey\n        return await myAction(config, parameters)\n      },\n    }\n  }\n\n  export declare namespace queryOptions {\n    export type Parameters<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = myAction.Parameters<config> &\n      QueryParameter<\n        myAction.ReturnValue,\n        myAction.ErrorType,\n        selectData,\n        myAction.QueryKey<config>\n      >\n\n    export type ReturnValue<\n      config extends Config,\n      selectData = myAction.ReturnValue,\n    > = QueryOptions<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    >\n  }\n}\n```\n\n##### Mutation-based Actions\n\nAll mutation-based actions must include the following components:\n\n- If there isn't an `ErrorType` for the Viem Action, use `import { BaseError } from 'viem'`\n\n```ts\nexport async function myAction<config extends Config>(\n  config: config,\n  parameters: myAction.Parameters<config>,\n): Promise<myAction.ReturnValue> { ... }\n\nexport declare namespace myAction {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myAction.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myAction.ReturnValue\n\n  export type ErrorType = viem_Actions.myAction.ErrorType\n}\n\nexport declare namespace myActionSync {\n  export type Parameters<config extends Config> = ChainIdParameter<config> &\n    ConnectorParameter &\n    Omit<viem_Actions.myActionSync.Parameters<undefined, Account>, 'chain'>\n\n  export type ReturnValue = viem_Actions.myActionSync.ReturnValue\n\n  export type ErrorType = viem_Actions.myActionSync.ErrorType\n}\n```\n\n#### Testing\n\nTests should be co-located with actions in `*action-name*.test.ts` files.\n\n**Important**: Wagmi action tests should follow the same test flows as the corresponding Viem action tests in `src/tempo/actions/`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that Wagmi tests use `config` instead of `client`, and mutation actions don't require explicit `account` parameters since they use the connector's account.\n\nSee `actions/token.test.ts` for a comprehensive example of test patterns and structure.\n\n##### Test Structure\n\nOrganize tests by action name with a default test case. Use namespace imports for cleaner code:\n\n```ts\nimport { connect } from '@wagmi/core'\nimport { accounts,  config, queryClient } from '@wagmi/test/tempo'\nimport { describe, expect, test } from 'vitest'\nimport * as myNamespace from './myNamespace.js'\n\nconst account = accounts[0]\n\n// Query-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    const result = await myNamespace.myAction(config, {\n      // ...\n    })\n    expect(result).toMatchInlineSnapshot(`...`)\n  })\n\n  describe('queryOptions', () => {\n    test('default', async () => {\n      const options = myNamespace.myAction.queryOptions(config, {\n        // ...\n      })\n      expect(await queryClient.fetchQuery(options)).toMatchInlineSnapshot(`...`)\n    })\n  })\n})\n\n// Mutation-based actions\ndescribe('myAction', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    // e.g., create tokens, grant roles, mint tokens, etc.\n    \n    const hash = await myNamespace.myAction(config, {\n      // ... (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n  })\n})\n\ndescribe('myActionSync', () => {\n  test('default', async () => {\n    await connect(config, {\n      connector: config.connectors[0]!,\n    })\n    \n    // Include any necessary setup from the corresponding viem test\n    \n    const result = await myNamespace.myActionSync(config, {\n      // ... (no account parameter needed)\n    })\n    expect(result).toBeDefined()\n  })\n})\n```\n\n<!-- File: packages/react/src/hooks/AGENTS.md (Tokens: ~843 | Category: anthropic-skill) -->\n# Agent Guidelines\n\nAgent guidance for React hooks\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Query Hook Format\n\n```ts\n'use client'\nimport type { Config, MyActionErrorType, ResolvedRegister } from '@wagmi/core'\nimport type { Compute } from '@wagmi/core/internal'\nimport {\n  type MyActionData,\n  type MyActionOptions,\n  myActionQueryOptions,\n} from '@wagmi/core/query'\nimport type { ConfigParameter } from '../types/properties.js'\nimport { type UseQueryReturnType, useQuery } from '../utils/query.js'\nimport { useChainId } from './useChainId.js'\nimport { useConfig } from './useConfig.js'\n\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = Compute<MyActionOptions<config, selectData> & ConfigParameter<config>>\n\nexport type UseMyActionReturnType<selectData = MyActionData> =\n  UseQueryReturnType<selectData, MyActionErrorType>\n\n/** https://wagmi.sh/react/api/hooks/useMyAction */\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(\n  parameters: UseMyActionParameters<config, selectData> = {},\n): UseMyActionReturnType<selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myActionQueryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  })\n  return useQuery(options)\n}\n```\n\n## Key Patterns\n\n### `'use client'` Directive\n\nAll hooks must start with `'use client'` directive.\n\n### `useConfig` and `useChainId`\n\nQuery hooks always call these to get config from React context and current chain:\n\n```ts\nconst config = useConfig(parameters)\nconst chainId = useChainId({ config })\n```\n\n### `ResolvedRegister['config']`\n\nUse `ResolvedRegister['config']` as default for `config` in the **function signature only** (not in type definitions). This allows type inference when config is injected via React context:\n\n```ts\n// Type definition uses Config\nexport type UseMyActionParameters<\n  config extends Config = Config,\n  selectData = MyActionData,\n> = ...\n\n// Function uses ResolvedRegister['config']\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = MyActionData,\n>(...) { ... }\n```\n\n### `enabled` and `structuralSharing`\n\nDo NOT set `enabled` or `structuralSharing` in hooks. These are handled by `queryOptions` from `@wagmi/core/query`.\n\n### Doc Comment\n\nUse a simple link to the docs:\n\n```ts\n/** https://wagmi.sh/react/api/hooks/useMyAction */\n```\n\n## Type Parameter Nuances\n\n### `Compute` vs `UnionCompute`\n\n- **`Compute`**: Use for simple hooks with straightforward parameter types\n- **`UnionCompute`**: Use for complex type inference (e.g., contract-related hooks)\n- **Neither**: Some hooks with very complex inference may not support either\n\n### `const` Modifier\n\nUse `const` for type parameters that need literal type inference (e.g., abi, args):\n\n```ts\nexport function useReadContract<\n  const abi extends Abi | readonly unknown[],\n  functionName extends ContractFunctionName<abi, 'pure' | 'view'>,\n  const args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,\n  config extends Config = ResolvedRegister['config'],\n  selectData = ReadContractData<abi, functionName, args>,\n>\n```\n\n### Default Parameter Value\n\n- **Simple cases**: `parameters: UseMyActionParameters<config, selectData> = {}`\n- **Complex generics**: `parameters: UseMyActionParameters<...> = {} as any`\n\n<!-- File: packages/react/src/tempo/AGENTS.md (Tokens: ~3101 | Category: anthropic-skill) -->\n# Agent Guidelines\n\nAgent guidance for `wagmi/tempo` Hooks.\n\n> **Communication Style**: Be brief, concise. Maximize information density, minimize tokens. Incomplete sentences acceptable when clear. Remove filler words. Prioritize clarity over grammar.\n\n## Wagmi Hooks\n\nWhen generating Wagmi hooks (in `hooks/`), follow these guidelines.\n\nAn example of a generated hook set can be found in `hooks/fee.ts`.\n\n### Source of Truth\n\n- **All hooks must be based on their corresponding Wagmi actions** from `@wagmi/core/tempo` (`packages/core/src/tempo/`)\n- Wagmi hooks are React hooks that wrap Wagmi actions with TanStack Query's `useQuery` and `useMutation`\n- If the Wagmi action is unclear or missing, implement the Wagmi action first\n\n### Documentation Requirements\n\nAll hooks **must include comprehensive TSDoc** with:\n\n1. **Function description** - What the hook does\n2. **`@example` block** - Complete working example showing:\n   - Required imports (hook imports)\n   - React component usage\n   - Hook usage with realistic parameters\n   - Expected return value handling (if applicable)\n3. **@param parameters** - Parameters description\n4. **`@returns` tag** - Description of the return value\n\nExample:\n\n```typescript\n/**\n * Hook for getting the user's default fee token.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   const { data, isLoading } = Hooks.fee.useUserToken({\n *     account: '0x20c...0055',\n *   })\n *   if (isLoading) return <div>Loading...</div>\n *   return <div>Token: {data?.address}</div>\n * }\n * ```\n * \n * @param parameters - Parameters.\n * @returns Query result with token address and ID.\n */\n```\n\n### Query Hooks\n\nFor read-only hooks that fetch data:\n\n- Use `useQuery` from `../../utils/query.js`\n- Use `useConfig` and `useChainId` from `../../hooks/(useChainId|useConfig).js`\n- Call the corresponding action's `queryOptions` function\n- All parameters should be optional. Use `ExactPartial` to make all query parameters optional\n- Support optional `query` parameter for TanStack Query options\n- Default `parameters` to `{}` only if all parameters are truly optional (no required non-reactive parameters like `token`, `role`, etc.)\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<config, selectData> {\n  const config = useConfig(parameters)\n  const chainId = useChainId({ config })\n  const options = myAction.queryOptions(config, {\n    ...parameters,\n    chainId: parameters.chainId ?? chainId,\n  } as never)\n  return useQuery(options)\n}\n```\n\n### Mutation Hooks\n\nFor state-changing hooks, both variants must be implemented:\n\n**1. Standard Variant**\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myAction(config, variables)\n    },\n    mutationKey: ['myAction'],\n  })\n}\n```\n\n**2. Sync Variant (`use*Sync`)**\n\n```typescript\nexport function useMyActionSync<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyActionSync.Parameters<config, context> = {},\n): useMyActionSync.ReturnValue<config, context> {\n  const { mutation = {} } = parameters\n  const config = useConfig(parameters)\n  return useMutation({\n    ...mutation,\n    async mutationFn(variables) {\n      return myActionSync(config, variables)\n    },\n    mutationKey: ['myActionSync'],\n  })\n}\n```\n\n### Watch Hooks\n\nFor event watching hooks:\n\n- Call the corresponding action's watch function inside `useEffect`\n- All parameters should be optional using `ExactPartial`\n- Include an `enabled` parameter (defaults to `true`) to control whether the watcher is active\n- Check if all required properties (like the callback) are defined before setting up the watcher\n- Include all optional properties for `rest` in the dependency array (e.g. `rest.foo`, `rest.bar`, `rest.baz`)\n- Return the unwatch function from the `useEffect` for cleanup\n\nAll watch hooks must include comprehensive JSDoc with:\n1. **Function description** - What events the hook watches for\n2. **`@example` block** - Complete working example showing hook usage in a React component\n3. **`@param` tag** - Parameters description\n\n```typescript\n/**\n * Hook for watching TIP20 token mint events.\n *\n * @example\n * ```tsx\n * import { Hooks } from 'wagmi/tempo'\n *\n * function App() {\n *   Hooks.token.useWatchMint({\n *     onMint(args) {\n *       console.log('Mint:', args)\n *     },\n *   })\n *   return <div>Watching for mints...</div>\n * }\n * ```\n *\n * @param parameters - Parameters.\n */\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) {\n  const { enabled = true, onMyEvent, ...rest } = parameters\n\n  const config = useConfig({ config: parameters.config })\n  const configChainId = useChainId({ config })\n  const chainId = parameters.chainId ?? configChainId\n\n  useEffect(() => {\n    if (!enabled) return\n    if (!onMyEvent) return\n    return Actions.watchMyEvent(config, {\n      ...rest,\n      chainId,\n      onMyEvent,\n    })\n  }, [config, enabled, onMyEvent, rest.foo, rest.bar, rest.baz])\n}\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n### Namespace Properties\n\n#### Query Hooks\n\nAll query hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  selectData = myAction.ReturnValue,\n>(parameters: useMyAction.Parameters<config, selectData> = {}): useMyAction.ReturnValue<selectData> { ... }\n\nexport declare namespace useMyAction {\n  export type Parameters<\n    config extends Config = ResolvedRegister['config'],\n    selectData = myAction.ReturnValue,\n  > = ConfigParameter<config> &\n    QueryParameter<\n      myAction.ReturnValue,\n      myAction.ErrorType,\n      selectData,\n      myAction.QueryKey<config>\n    > &\n    ExactPartial<myAction.Parameters<config>>\n\n  export type ReturnValue<selectData = myAction.ReturnValue> =\n    UseQueryReturnType<selectData, Error>\n}\n```\n\n**Note:** Use `ExactPartial<T>` to make all query parameters optional. This ensures that reactive parameters can be undefined initially and populated later for proper reactivity.\n\n#### Watch Hooks\n\nAll watch hooks must include the following components:\n\n```typescript\nexport function useWatchMyEvent<\n  config extends Config = ResolvedRegister['config'],\n>(parameters: useWatchMyEvent.Parameters<config> = {}) { ... }\n\nexport declare namespace useWatchMyEvent {\n  type Parameters<config extends Config = Config> = UnionCompute<\n    ExactPartial<Actions.watchMyEvent.Parameters<config>> &\n      ConfigParameter<config> & { enabled?: boolean | undefined }\n  >\n}\n```\n\n**Note:** Watch hooks don't have a return value - they set up event listeners in a `useEffect` and automatically clean up when the component unmounts or dependencies change.\n\n#### Mutation Hooks\n\nAll mutation hooks must include the following components:\n\n```typescript\nexport function useMyAction<\n  config extends Config = ResolvedRegister['config'],\n  context = unknown,\n>(\n  parameters: useMyAction.Parameters<config, context> = {},\n): useMyAction.ReturnValue<config, context> { ... }\n\nexport declare namespace useMyAction {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myAction.ReturnValue,\n          myAction.ErrorType,\n          myAction.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myAction.ReturnValue,\n    myAction.ErrorType,\n    myAction.Parameters<config>,\n    context\n  >\n}\n\nexport declare namespace useMyActionSync {\n  type Parameters<\n    config extends Config = Config,\n    context = unknown,\n  > = ConfigParameter<config> & {\n    mutation?:\n      | UseMutationParameters<\n          myActionSync.ReturnValue,\n          myActionSync.ErrorType,\n          myActionSync.Parameters<config>,\n          context\n        >\n      | undefined\n  }\n\n  type ReturnValue<\n    config extends Config = Config,\n    context = unknown,\n  > = UseMutationResult<\n    myActionSync.ReturnValue,\n    myActionSync.ErrorType,\n    myActionSync.Parameters<config>,\n    context\n  >\n}\n```\n\n### Testing\n\nTests should be co-located with hooks in `myNamespace.test.ts` files.\n\n**Important**: Wagmi hook tests should follow the same test flows as the corresponding Wagmi action tests in `@wagmi/core/tempo`. This includes:\n- Setting up the same initial state (creating tokens, granting roles, minting tokens, etc.)\n- Testing the same behaviors and edge cases\n- Using the same test data and assertions where applicable\n\nThe main difference is that hooks use React rendering patterns with `renderHook`, and mutation hooks don't require explicit `account` parameters in `mutateAsync` calls since they use the connector's account.\n\nSee `hooks/fee.test.ts` for a comprehensive example of test patterns and structure.\n\n#### Test Structure\n\nOrganize tests by hook name with a default test case. Use namespace imports for cleaner code when importing hooks:\n\n```typescript\nimport { type Address } from 'viem'\nimport { describe, expect, test, vi } from 'vitest'\nimport { useConnect } from 'wagmi'\nimport { accounts, config, renderHook } from '@wagmi/test/tempo'\nimport * as myNamespace from './myNamespace.js'\n\n// Query hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() =>\n      myNamespace.useMyAction({ account: account.address }),\n    )\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n\n  test('reactivity: account parameter', async () => {\n    const { result, rerender } = await renderHook(\n      (props) =>\n        myNamespace.useMyAction({ account: props?.account }),\n      { initialProps: { account: undefined as Address | undefined } },\n    )\n\n    await vi.waitFor(() => result.current.fetchStatus === 'fetching')\n\n    // Should be disabled when account is undefined\n    expect(result.current.data).toBeUndefined()\n    expect(result.current.isPending).toBe(true)\n    // expect(result.current.isEnabled).toBe(false) // TODO: Disabled until @tanstack/react-query bumped to latest\n\n    // Set account\n    rerender({ account: account.address })\n\n    await vi.waitFor(() => expect(result.current.isSuccess).toBeTruthy())\n\n    // Should now be enabled and have data\n    expect(result.current.isEnabled).toBe(true)\n    expect(result.current.data).toBeDefined()\n    // Additional assertions...\n  })\n})\n\n// Mutation hooks\ndescribe('useMyAction', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyAction(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n    // e.g., create tokens, grant roles, etc. using the action's mutateAsync\n\n    const hash = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(hash).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\ndescribe('useMyActionSync', () => {\n  test('default', async () => {\n    const { result } = await renderHook(() => ({\n      connect: useConnect(),\n      myAction: myNamespace.useMyActionSync(),\n    }))\n\n    await result.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup from the corresponding Wagmi action test\n\n    const data = await result.current.myAction.mutateAsync({\n      // ... mutation parameters (no account parameter needed)\n    })\n    expect(data).toBeDefined()\n\n    await vi.waitFor(() =>\n      expect(result.current.myAction.isSuccess).toBeTruthy(),\n    )\n  })\n})\n\n// Watch hooks\ndescribe('useWatchMyEvent', () => {\n  test('default', async () => {\n    const { result: connectResult } = await renderHook(() => ({\n      connect: useConnect(),\n      createSync: myNamespace.useCreateSync(),\n      // ... any other setup hooks needed\n    }))\n\n    await connectResult.current.connect.mutateAsync({\n      connector: config.connectors[0]!,\n    })\n\n    // Include any necessary setup (e.g., create token, grant roles)\n\n    const events: any[] = []\n    await renderHook(() =>\n      myNamespace.useWatchMyEvent({\n        // ... parameters\n        onMyEvent(args) {\n          events.push(args)\n        },\n      }),\n    )\n\n    // Trigger the event by calling a sync action\n    // e.g., await connectResult.current.myActionSync.mutateAsync({ ... })\n\n    await vi.waitUntil(() => events.length >= 1)\n\n    expect(events.length).toBeGreaterThanOrEqual(1)\n    expect(events[0]?.someField).toBe(expectedValue)\n  })\n})\n```\n\n<!-- File: packages/cli/README.md (Tokens: ~55 | Category: plugin-manifest) -->\n# @wagmi/cli\n\nManage and generate code from Ethereum ABIs\n\n## Installation\n\n```bash\npnpm add @wagmi/cli\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n<!-- File: packages/connectors/README.md (Tokens: ~62 | Category: plugin-manifest) -->\n# @wagmi/connectors\n\nCollection of connectors for Wagmi\n\n## Installation\n\n```bash\npnpm add @wagmi/connectors @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n<!-- File: packages/core/README.md (Tokens: ~55 | Category: plugin-manifest) -->\n# @wagmi/core\n\nVanillaJS library for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/core viem\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n<!-- File: packages/create-wagmi/README.md (Tokens: ~93 | Category: plugin-manifest) -->\n# create-wagmi\n\nGet up and running quickly with [Wagmi](https://wagmi.sh) by using the `create-wagmi` CLI.\n\n## Installation\n\n```bash\nnpm create wagmi\n# or\npnpm create wagmi\n# or\nyarn create wagmi\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh/cli/create-wagmi).\n\n<!-- File: packages/create-wagmi/templates/next/README.md (Tokens: ~41 | Category: plugin-manifest) -->\nThis is a [Next.js](https://nextjs.org) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n\n<!-- File: packages/create-wagmi/templates/vite-react/README.md (Tokens: ~42 | Category: plugin-manifest) -->\nThis is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n\n<!-- File: packages/create-wagmi/templates/vite-vue/README.md (Tokens: ~42 | Category: plugin-manifest) -->\nThis is a [Vite](https://vitejs.dev) project bootstrapped with [`create-wagmi`](https://github.com/wevm/wagmi/tree/main/packages/create-wagmi).\n\n<!-- File: packages/react/README.md (Tokens: ~52 | Category: plugin-manifest) -->\n# wagmi\n\nReact Hooks for Ethereum\n\n## Installation\n\n```bash\npnpm add wagmi viem @tanstack/react-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n<!-- File: packages/solid/README.md (Tokens: ~62 | Category: plugin-manifest) -->\n# @wagmi/solid\n\nSolid Primitives for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/solid viem @tanstack/solid-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n\n<!-- File: packages/vue/README.md (Tokens: ~59 | Category: plugin-manifest) -->\n# @wagmi/vue\n\nVue Composables for Ethereum\n\n## Installation\n\n```bash\npnpm add @wagmi/vue viem @tanstack/vue-query\n```\n\n## Documentation\n\nFor documentation and guides, visit [wagmi.sh](https://wagmi.sh).\n</yakaai_skills>"}