Interact with the Squads Multisig Program through a simple CLI.
npm install @hubbleprotocol/squads-kamino-cli``
_____ ____ __ __ ___ ____ _____ __ __ ___ __ ___ ____ _ __ ____
/ ___/ / __ \ / / / / / | / __ \ / ___/ / //_/ / | / |/ / / _/ / | / / / __ \
\__ \ / / / / / / / / / /| | / / / / \__ \ ______ / ,< / /| | / /|_/ / / / / |/ / / / / /
___/ / / /_/ / / /_/ / / ___ | / /_/ / ___/ / /_____/ / /| | / ___ | / / / / _/ / / /| / / /_/ /
/____/ \___\_\ \____/ /_/ |_| /_____/ /____/ /_/ |_| /_/ |_| /_/ /_/ /___/ /_/ |_/ \____/
`
Interact with the Squads Multisig Program through a simple CLI.
Nodejs version >= 16
- install
npm install -g @hubbleprotocol/squads-kamino-cliwhich squads-kamino-cli
- set path
to find path: echo -n 'export PATH=
to set path: >> ~/.zshrc | (on MAC) where
- update
npm update --g @hubbleprotocol/squads-kamino-cli
Running the simple command will start the tool and ask a few setup questions for the wallet and the network cluster.\
squads-kamino-cli
squads-kamino-cli --help should display all available commands and arguments
``
CLUSTER=
LEDGER_ADDRESS_KEY=
IRONFORGE_CLUSTER=
#### Input file should only contain base58 transaction/instructions separated by newlines
- Get multisigs
npx ts-node src/index.ts create-transaction-from-instructions-file --cluster https://rpc.url --ledger-address-key 0 --multisig BxdLNhoRXVs45wTVAZBrYQUkxbex5zXFCaJtsuRpoqMj --file-path ./ixns.innpx ts-node src/index.ts create-transaction-from-instructions-file --cluster https://rpc.url --ledger-address-key 0 --multisig E35i5qn7872eEmBt15e5VGhziUBzCTm43XCSWvDoQNNv --file-path ./ixns.in --title 'Squads cli test add token' --mode print
- Transactions from file - print
npx ts-node src/index.ts create-transaction-from-instructions-file --squad kamino --file-path ./ixns.in --title 'Squads cli test add token' --mode print
- Transactions from file - print, using .env for cluster and ledger-pubkey, using squad name instead of multisig pubkey
npx ts-node src/index.ts create-transaction-from-instructions-file --multisig 7Pd2qaTnHmbfwcdVnf812xz2mdWz8G6sQxEjc3t7NChz --file-path ./ixns.in --title 'Squads cli test add token' --mode propose
- With .env file from file
npx ts-node src/index.ts create-program-upgrade --multisig BxdLNhoRXVs45wTVAZBrYQUkxbex5zXFCaJtsuRpoqMj --program-id SLendK7ySfcEzyaFqy93gDnD3RtrpXJcnRwb6zFHJSh --buffer EnYZG1528vJQpGmEFSCR4KLVy8aoShzSUt6zBECyP7mg --refund-address sadmBTQm5HJsyzWHEjV4YwG9CiahZKVDVqAyS4Wx1zH --title 'Squads cli test program upgrade' --mode propose
- Program upgrade proposal (THIS WILL ONLY CREATE A PROGRAM UPGRADE BUT IT WILL NOT INITIATE IT)
https://github.com/Squads-Protocol/squads-cli
npm install -g @sqds/cli - to install
squads-cli --cluster - to runEnter the path of your wallet file or ledger
This will prompt you with -> usb://ledger - works for some ledgers, or usb://ledger?key=0 - you know it worked when you see the right Connected wallet:.
!! Make sure your ledger is connected and unlocked when you run the cli.
When you press Choose multisig it will let you select from all the multisig your wallet is part of.
For reference:BbM3mbcLsa3QcYEVx8iovwfKaA1iZ6DK5fEbbtHwS3N8 - KFarmsA9rQoX1sictAQkyXxaZA8nz674xutHwoqpK2mwLyexCZ - KLendE35i5qn7872eEmBt15e5VGhziUBzCTm43XCSWvDoQNNv - Kamino MSBxdLNhoRXVs45wTVAZBrYQUkxbex5zXFCaJtsuRpoqMj - KLend Staging
After choosing the multisig, you can interact with squads. The most useful interaction is to approve and execute transactions, especially when the v3 UI is not responsive. To do so select Transactions and then select a tranmsaction. (The latest transactions are always at the end of the list -> scroll all the way down or just go up past the <- Go back option and you should see the latest ones, or the non-executed ones if there are any)
You can also create or asamble transactions using this CLI but it's a lot slower than just using squads-kamino-cli