> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
