Overview
Cast a rejection vote on a given transaction’s proposal. Any qualifying member with “Voter” permissions can cast a rejection.Prerequisites
- Existing proposal in Active status
@sqds/multisigpackage installed- Member with Voter permissions
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
@sqds/multisig package installedimport * as multisig from "@sqds/multisig";
import { Connection, PublicKey } from "@solana/web3.js";
const connection = new Connection("<your rpc url>");
const ix = await multisig.instructions.proposalReject({
multisigPda,
transactionIndex,
member: member,
});
| Parameter | Type | Required | Description |
|---|---|---|---|
multisigPda | PublicKey | Yes | PDA of the multisig |
transactionIndex | bigint | Yes | Index of the transaction to reject |
member | PublicKey | Yes | Member casting the rejection (must have Voter permissions) |
import * as multisig from "@sqds/multisig";
import { Connection, PublicKey } from "@solana/web3.js"
async function main(member: PublicKey) {
// Cluster Connection
const connection = new Connection("<your rpc url>");
// If you've saved your createKey, you can define it as a static PublicKey
const createKey = new PublicKey("<your createkey>")
// Derive the multisig PDA
const [multisigPda] = multisig.getMultisigPda({
createKey,
});
// or
// const multisigPda = new PublicKey("<your multisig key>");
// Get deserialized multisig account info
const multisigInfo = await multisig.accounts.Multisig.fromAccountAddress(
connection,
multisigPda
);
// Get the current transaction index
const transactionIndex = BigInt(multisigInfo.transactionIndex.toString());
// or, if this is tied to your first transaction
// const transactionIndex = 1n;
const ix = await multisig.instructions.proposalReject({
multisigPda,
transactionIndex,
// Member must have "Voter" permissions
member: member,
});
}
| Error | Cause | Solution |
|---|---|---|
| Stale proposal | Transaction index ≤ stale transaction index | Cannot reject stale proposals |
AlreadyRejected | Member has already rejected | A member can reject once. A member who approved can still switch to reject while the proposal is Active |
| Insufficient permissions | Member lacks Voter permission | Use a member with Voter permissions |