# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
