Accounts
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import * as multisig from "@sqds/multisig";
import { PublicKey } from "@solana/web3.js";
const { Proposal } = multisig.accounts;
const [proposalPda] = multisig.getProposalPda({
multisigPda,
transactionIndex: BigInt(1),
});
const proposalAccount = await Proposal.fromAccountAddress(
connection,
proposalPda
);
console.log("Proposal Status", proposalAccount.status);
["multisig", multisig_key (as buffer), "transaction", transaction_index, "proposal"]
import * as multisig from "@sqds/multisig";
const { Proposal } = multisig.accounts;
async function main() {
// Public Key of the Multisig PDA
const multisigPda = new PublicKey("MyAmazingMultisig");
// Fetch the deserialized Multisig account
const multisigInfo = await multisig.accounts.Multisig.fromAccountAddress(
connection,
multisigPda
);
// Get the current transaction index
const currentTransactionIndex = Number(multisigInfo.transactionIndex);
const transactionIndex = BigInt(currentTransactionIndex + 1);
// or, if this is your first transaction
// const transactionIndex = 1n;
// Bump is generally not needed
const [proposalPda, proposalBump] = multisig.getProposalPda({
multisigPda,
transactionIndex,
});
const proposalAccount = await Proposal.fromAccountAddress(
connection,
proposalPda
);
// Log the proposal status
console.log("Proposal Status", proposalAccount.status);
}
| Field | Type | Description |
|---|---|---|
multisig | Pubkey | The multisig this belongs to |
transactionIndex | u64 | Index of the associated transaction |
status | ProposalStatus | Current status of the transaction |
bump | u8 | PDA bump |
approved | Vec<Pubkey> | Keys that have approved |
rejected | Vec<Pubkey> | Keys that have rejected |
cancelled | Vec<Pubkey> | Keys that have cancelled (Approved only) |
| Status | Description |
|---|---|
Draft | Proposal created but not yet active (for batches) |
Active | Proposal is open for voting |
Approved | Threshold met, ready for execution |
Rejected | Rejection threshold met |
Cancelled | Proposal has been cancelled |
Executed | Transaction has been executed |