# Multisig (/sdk/v5_3_x/advanced/multisig)

> For the complete documentation index, see [llms.txt](/llms.txt)



<VersionWarning version="5.3.x" />

<Callout type="info">
  Impatient?  Check out [complete examples here](https://github.com/zerodevapp/zerodev-examples/tree/main/multisig).
</Callout>

With Kernel, it's possible to configure multiple signers for your smart account.  The plugin that supports this functionality is named `WeightedECDSAValidator`, for the fact that it supports multiple ECDSA signers, each having a specific "weight."

## How it works [#how-it-works]

Each signer is set up with a **weight**, and for any given signature, there must be enough combined weight to reach or surpass the **threshold** for the signature to be considered valid.

For example, let's say we have:

* Threshold: 100
* Weights:
  * Signer A: 100
  * Signer B: 50
  * Signer C: 50

In this case, we are setting up a multisig where either signer A alone (100 = 100), or signer B and C together (50 + 50 = 100) can provide a valid signature.

## Installation [#installation]

<Tabs items="[&#x22;npm&#x22;,&#x22;yarn&#x22;,&#x22;pnpm&#x22;,&#x22;bun&#x22;]">
  <Tab value="npm">
    ```bash
    npm i @zerodev/weighted-ecdsa-validator
    ```
  </Tab>

  <Tab value="yarn">
    ```bash
    yarn add @zerodev/weighted-ecdsa-validator
    ```
  </Tab>

  <Tab value="pnpm">
    ```bash
    pnpm i @zerodev/weighted-ecdsa-validator
    ```
  </Tab>

  <Tab value="bun">
    ```bash
    bun i @zerodev/weighted-ecdsa-validator
    ```
  </Tab>
</Tabs>

## Setting up a new multisig account [#setting-up-a-new-multisig-account]

To set up a new multisig account, start by creating a validator:

```ts
import { createWeightedECDSAValidator } from "@zerodev/weighted-ecdsa-validator"

const multisigValidator = await createWeightedECDSAValidator(publicClient, {
  entryPoint,
  kernelVersion,
  config: {
    threshold: 100,
    signers: [
      { address: signerA.address, weight: 100 },
      { address: signerB.address, weight: 50 },
      { address: signerC.address, weight: 50 },
    ]
  },
  signers: [signerB, signerC],
})
```

In `config`, you specify the `threshold` and an list of signer addresses, as well as their weights.

In `signers`, you specify the list of signers ([Viem accounts](https://viem.sh/docs/accounts/local)) that will be signing for this account.  The combined weight of these signers must reach the threshold.

After creating the validator, you can [set up a Kernel account using the validator](/sdk/v5_3_x/core-api/create-account#create-a-kernel-account) as usual.

## Using an existing multisig account [#using-an-existing-multisig-account]

If a multisig account has already been deployed, you can skip the multisig config but specify the deployed multisig address when you create the account:

```ts
const multisigValidator = await createWeightedECDSAValidator(publicClient, {
  entryPoint,
  kernelVersion,
  signers: [signerB, signerC],
})

const account = await createKernelAccount(publicClient, {
  entryPoint,
  kernelVersion,
  deployedAccountAddress: '<your multisig address>',
  plugins: {
    sudo: multisigValidator,
  }
})
```

## Updating multisig config [#updating-multisig-config]

In many use cases, you may need to add and remove signers over time.  To do so, send a UserOp that updates the config:

```ts
import { getUpdateConfigCall } from "@zerodev/weighted-ecdsa-validator"

// getUpdateConfigCall can be used with either sendTransaction or sendUserOperation

await kernelClient.sendTransaction(
  getUpdateConfigCall({
    threshold: 100,
    signers: [
      { address: signer1.address, weight: 50 },
      { address: signer2.address, weight: 50 },
      { address: signer3.address, weight: 50 },
    ]
  }),
)
```

Note that `kernelClient` here must itself be a correctly set-up instance of a multisig account client.
