> For the complete documentation index, see [llms.txt](https://docs.squads.so/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.squads.so/main/development/typescript/instructions/cancel-proposal.md).

# Cancel Proposal

Cancelling a proposal will invalidate it. This requires that the member conducting the action have `Voter` permissions, the proposal is of `Approved` status, or the proposal is stale (Proposal `transactionIndex` < Multisig `staleTransactionIndex`).

## Example

<pre class="language-typescript"><code class="lang-typescript">import * as multisig from "@sqds/multisig";
import { Connection, PublicKey } from "@solana/web3.js"

<strong>async function main(member: PublicKey) {
</strong>    // Cluster Connection
    const connection = new Connection("&#x3C;your rpc url>");
    
    // If you've saved your createKey, you can define it as a static PublicKey
    const createKey = new PublicKey("&#x3C;your createkey>")
    
    // Derive the multisig PDA
    const [multisigPda] = multisig.getMultisigPda({
        createKey,
    });
    // or
    // const multisigPda = new PublicKey("&#x3C;your multisig key>");
    
    // Get deserialized multisig account info
    const multisigInfo = await multisig.accounts.Multisig.fromAccountAddress(
      connection,
      multisigPda
    );

    // Get the current transaction index
    const transactionIndex = Number(multisigInfo.transactionIndex);
    // or, if this is tied to your first transaction
    // const transactionIndex = 1n;
    
    const ix = await multisig.instructions.proposalCancel({
        multisigPda,
        transactionIndex,
        // Member must have "Voter" permissions
        member: member,
    });
}
</code></pre>

### Notes

* Cancelling members must have "Voter" permissions
* A Proposal can be cancelled if stale. The transaction index must be less than the stale transaction index (see [Multisig reference](/main/development/reference/accounts.md#multisig))


---

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

```
GET https://docs.squads.so/main/development/typescript/instructions/cancel-proposal.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.
