> For the complete documentation index, see [llms.txt](https://hyperdrive.squads.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyperdrive.squads.so/development/instructions-interact-with-the-program/create-multisig.md).

# Create Multisig

## Typescript

```typescript
import * as multisig from "@sqds/multisig";

// Cluster Connection
const connection = new Connection( < your connection here > );

// Random Public Key that will be used to derive a multisig PDA
const createKey = Keypair.generate().publicKey;

// Creator should be a Keypair or a Wallet Adapter wallet
const creator = Keypair.generate();

// Derive the multisig PDA
const multisigPda = multisig.getMultisigPda({
    // The createKey has to be a Public Key, see accounts reference for more info
    createKey,
})[0];


await multisig.rpc.multisigCreate({
    connection,
    // One time random Key
    createKey,
    // The creator & fee payer
    creator,
    // The PDA of the multisig you are creating, derived by a random PublicKey
    multisigPda,
    // Here the config authority will be the system program
    configAuthority: null,
    // Create without any time-lock
    timeLock: 0,
    // List of the members to add to the multisig
    members: [{
            // Members Public Key
            key: creator.publicKey,
            // Members permissions inside the multisig
            permissions: Permissions.all(),
        },
        {
            key: secondMember.publicKey,
            // Member can only add votes to proposed transactions
            permissions: Permissions.fromPermissions([Permission.Vote]),
        },
    ],
    // This means that there needs to be 2 votes for a transaction proposal to be approved
    threshold: 2,
});

console.log("Multisig created: ", signature);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hyperdrive.squads.so/development/instructions-interact-with-the-program/create-multisig.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
