Commands
The following is an overview of commands available to interact with the Squads V4 program via CLI.
Overview
Supported wallets
Commands
Create config transaction
Execute config transaction
Create multisig
Vote on proposals
Reclaim Vault Transaction rent
Create new Vault Transaction
Execute Vault Transaction
1. Supported wallets
The Squads CLI has exactly the same wallet support as the Solana CLI, meaning it supports file system wallets as well as Ledger hardware wallets.
File system wallets
You can easily use your local filesystem wallet by using it as the "keypair" argument in commands.
This specifies the path of the Keypair that you want to use to sign a CLI transaction.
Ledger support
To use a Ledger with the Squads CLI, just specify the Ledger device URL in the "keypair" argument.
This will use the default derivation path of your Ledger.
This specifies a custom derivation path. You can read more about it here.
2. Commands
Config Transaction Create
Description
Creates a new configuration proposal transaction for a specific action.
Syntax
Parameters
--rpc_url <RPC_URL>
: (Optional) The URL of the Solana RPC endpoint. Defaults to mainnet if not specified.--program_id <PROGRAM_ID>
: (Optional) The ID of the multisig program. Defaults to a standard ID if not specified.--keypair <KEYPAIR_PATH>
: Path to your keypair file.--multisig_pubkey <MULTISIG_PUBLIC_KEY>
: The public key of the multisig account.--action <ACTION>
: The action to execute. Format depends on the action type.--memo <MEMO>
: (Optional) A memo for the transaction.
Examples
Add a New Member:
Adds a new member to the multisig configuration with specified permissions. Permissions: 1: Initiate only 7: All permissions (Initiate, Approve, Execute)
Remove a Member:
Removes an existing member from the multisig configuration.
Change Threshold:
Changes the threshold number of signatures required for executing multisig transactions.
Set Time Lock:
Sets a time lock for the multisig account.
Add Spending Limit:
Adds a spending limit to the multisig account.
Remove Spending Limit:
Removes an existing spending limit from the multisig account.
Set Rent Collector:
Sets a new rent collector for the multisig account.
Config Transaction Execute
Description
Executes a proposed transaction for a multisig configuration change. This command is used to execute configuration transactions once they have reached threshold.
Syntax
Parameters
--rpc_url <RPC_URL>
: (Optional) The URL of the Solana RPC endpoint. Defaults to mainnet if not specified.--program_id <PROGRAM_ID>
: (Optional) The ID of the multisig program. Defaults to a standard ID if not specified.--keypair <KEYPAIR_PATH>
: Path to your keypair file.--multisig_pubkey <MULTISIG_PUBLIC_KEY>
: The public key of the multisig account.--transaction_index <TRANSACTION_INDEX>
: The index of the transaction to be executed.
Example Usage
Multisig Create
Description
Creates a new multisig with initial members and threshold configuration.
Syntax
Parameters
--rpc_url <RPC_URL>
: (Optional) The URL of the Solana RPC endpoint. Defaults to mainnet if not specified.--program_id <PROGRAM_ID>
: (Optional) The ID of the multisig program. Defaults to a standard ID if not specified.--keypair <KEYPAIR_PATH>
: Path to your keypair file.--config_authority <CONFIG_AUTHORITY>
: (Optional) Address of the Program Config Authority.--members <MEMBER_...>
: List of members' public keys, separated by spaces.--threshold <THRESHOLD>
: The threshold number of signatures required for executing multisig transactions.
Notes
Stacking permissions for a single member requires adding up the permission mappings. For example, a member with full permissions (Proposer, Voter, Executor) would use a value of 7.
The permission types map to the following:
Proposer - 1
Voter - 2
Executor - 4
All of the above - 7
Example Usage
Creating a Multisig with Two Members:
Creates a new multisig account with two members and a threshold of 2.
Creating a Multisig with Config Authority:
Initializes a multisig account with a specified config authority and a threshold of 1.
Proposal Vote
Description
Casts a vote on a proposed transaction proposal. This command allows a member of a multisig to approve, reject, or cancel a transaction proposal.
Syntax
Parameters
--rpc_url <RPC_URL>
: (Optional) The URL of the Solana RPC endpoint. Defaults to mainnet if not specified.--program_id <PROGRAM_ID>
: (Optional) The ID of the multisig program. Defaults to a standard ID if not specified.--keypair <KEYPAIR_PATH>
: Path to your keypair file.--multisig_pubkey <MULTISIG_PUBLIC_KEY>
: The public key of the multisig account.--transaction_index <TRANSACTION_INDEX>
: The index of the transaction to vote on.--action <ACTION>
: The vote action to cast (Approve, Reject, Cancel).--memo <MEMO>
: (Optional) A memo for the vote.
Example Usage
Approving a Transaction:
Casts an approval vote for the transaction at index 1 in the specified multisig account.
Rejecting a Transaction:
Casts a rejection vote for the transaction at index 1.
Cancelling a Transaction:
Cancels the transaction at index 1 in the multisig account.
Vault Transaction Accounts Close
Description
Closes the proposal and transaction accounts associated with a specific Vault Transaction. The rent will be returned to the multisigs "rent_collector".
Syntax
Parameters
--rpc_url <RPC_URL>
: (Optional) The URL of the Solana RPC endpoint. Defaults to mainnet if not specified.--program_id <PROGRAM_ID>
: (Optional) The ID of the multisig program. Defaults to a standard ID if not specified.--keypair <KEYPAIR_PATH>
: Path to your keypair file.--multisig_pubkey <MULTISIG_PUBLIC_KEY>
: The public key of the multisig account.--transaction_index <TRANSACTION_INDEX>
: The index of the transaction whose accounts are to be closed.--rent_collector <RENT_COLLECTOR_PUBKEY>
: The public key of the account responsible for collecting rent.
Example Usage
In this example, the command closes the transaction accounts for the transaction at index 1 in the specified multisig account and collects rent using the provided rent collector public key.
Vault Transaction Create
Description
Creates a new vault transaction with a custom transaction message.
Syntax
Parameters
--rpc_url <RPC_URL>
: (Optional) The URL of the Solana RPC endpoint. Defaults to mainnet if not specified.--program_id <PROGRAM_ID>
: (Optional) The ID of the multisig program. Defaults to a standard ID if not specified.--keypair <KEYPAIR_PATH>
: Path to your keypair file.--multisig_pubkey <MULTISIG_PUBLIC_KEY>
: The public key of the multisig account.--vault_index <VAULT_INDEX>
: The index of the vault where the transaction is being created.--transaction_message <TRANSACTION_MESSAGE>
: The message or payload of the transaction.--memo <MEMO>
: (Optional) A memo for the transaction.
Example Usage
In this example, a new transaction with the specified message is proposed in the multisig vault at vault index 1.
Vault Transaction Execute
Description
Executes a transaction once its proposal has reachen threshold.
Syntax
Parameters
--rpc_url <RPC_URL>
: (Optional) The URL of the Solana RPC endpoint. Defaults to mainnet if not specified.--program_id <PROGRAM_ID>
: (Optional) The ID of the multisig program. Defaults to a standard ID if not specified.--keypair <KEYPAIR_PATH>
: Path to your keypair file.--multisig_pubkey <MULTISIG_PUBLIC_KEY>
: The public key of the multisig account.--transaction_index <TRANSACTION_INDEX>
: The index of the transaction to be executed.
Example Usage
This example executes the transaction at index 1 in the specified multisig.
Last updated