Migrating from Squads multisig
This guide demostrates how to migrate from Squads multisig.Prerequisites
Before you begin, make sure you have the following installed:- Bun (latest version)
- The PublicKey of the Multisig
- A Member of the multisig with some SOL for transaction fees
Setup
First, clone the swig-ts repository and navigate to the migrate-from-squads example:@sqds/multisigfor Squads Multisig functionality@swig-wallet/classicfor Swig wallet functionality@solana/web3.jsfor Solana interactionschalkfor colorful console output
Understanding the Code
The example demonstrates several key concepts:- Extrating data from the Squads multisig account
- Creating a Swig with multiple authorities in a single transaction
- Updating Swig roles
1. Decode the multisig account
Before swapping, we need to ensure the Swig account has the necessary token accounts:2. Extract data needed to create a Swig
3. Create a Swig including all the members as authorities
The most critical part is properly separating and handling instructions:Next steps
- Asset Transfer:
- Transfer of assets can be done from the Squads multisig dashboard.
- Assets should be transferred to the wallet address of the newly created Swig.
Running the Example
- Prepare a member keypair file of the squad mulitig. (This will also be the transaction fee payer).
- Get the address of the squads multisig.
- Run the example:
- Get all the members of the squads multisig
- Include all members of the squads multisig as authorities in a newly created swig.
Production Considerations
-
Security:
- Securely manage keypairs and private keys
- Implement proper error recovery mechanisms
- Add transaction timeout handling
-
Performance:
- Consider using RPC endpoints with higher rate limits
- Implement proper retry mechanisms
-
User Experience:
- Add progress indicators for multi-step operations

