> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://viem.sh/api/mcp` to find what you need.

# Nested Multisig Accounts

## Overview

A multisig account can own another multisig. Initialize every nested owner before using it to
approve a parent transaction.

## Recipes

These recipes assume you have [set up a Tempo client](/tempo).

### Create and Initialize the Child

This child account has one local owner. Its first transaction initializes the child config
onchain.

:::code-group
```ts twoslash [example.ts]
import { Account } from 'viem/tempo'
import {
  prepareTransactionRequest,
  sendRawTransaction,
  signTransaction,
} from 'viem/actions'
import { client } from './viem.config'

const childOwner = Account.fromSecp256k1(
  '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
)
const child = Account.fromMultisig({ owners: [childOwner] })

const childRequest = await prepareTransactionRequest(client, {
  account: child,
  to: child.address,
  value: 0n,
})
const childTransaction = await signTransaction(client, childRequest)
await sendRawTransaction(client, { serializedTransaction: childTransaction })
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

### Use the Child as an Owner

Pass the child account as the parent owner. When the child signs the parent request, its local
owner produces the nested approval.

:::code-group
```ts twoslash [example.ts]
import { Account } from 'viem/tempo'
import {
  prepareTransactionRequest,
  sendTransaction,
  signTransaction,
} from 'viem/actions'
import { client } from './viem.config'

const childOwner = Account.fromSecp256k1(
  '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
)
const child = Account.fromMultisig({ owners: [childOwner] })
const account = Account.fromMultisig({ owners: [child] })

const request = await prepareTransactionRequest(client, {
  account,
  calls: [
    { to: '0xcafebabecafebabecafebabecafebabecafebabe', value: 1n },
  ],
})
const signature = await signTransaction(client, {
  ...request,
  account: child,
})
const hash = await sendTransaction(client, {
  ...request,
  signatures: [signature],
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/tempo/viem.config.ts:setup]
```
:::

## Best Practices

### Initialize Every Child First

The child address must have enough fee token to initialize itself. Signing fails when a nested
multisig owner has not been initialized.

### Resolve Current Configurations During Preparation

Prepare the parent request before collecting approvals. Preparation resolves the current version
and configuration for each initialized nested account.

## See More

<Cards>
  <Card icon="lucide:send" title="Send Transactions" description="Prepare one request and collect independent owner approvals." to="/tempo/guides/multisig/send" />

  <Card icon="lucide:scale" title="Weighted Owners" description="Combine nested ownership with weighted approval thresholds." to="/tempo/guides/multisig/weighted-owners" />

  <Card icon="lucide:settings" title="multisig.getConfig" description="Read a multisig account's current configuration and version." to="/tempo/actions/multisig.getConfig" />
</Cards>
