A minimalistic Python implementation of the Supra client.
This repository provides scripts for managing a multi-sig authenticator on Supra, including generating mnemonics, proposing and voting on multisig transactions, and executing them. Below are detailed steps for both the multisig authenticator and onchain multisig.
Use gen_mnemonic.py
to create a new 12-word mnemonic. The private keys for all accounts will be derived from this mnemonic.
- Note: Account 0 (Address 0) corresponds to the account shown in the StarKey wallet loaded with the same mnemonic.
- This example uses the faucet to fund the multisig account, which is suitable for testnet.
- For mainnet, manually transfer tokens to the multi-sig account.
Use gen_mnemonic.py
to create a new 12-word mnemonic.
- Use
airdrop.py
for testnet. - Use
transfer_supra.py
for mainnet.
Use derive_key.py
to see the addresses of the accounts derived from the mnemonic.
One owner account can propose a new multi-sig transaction using propose_multisig_tx.py
.
All owner accounts, except the proposer, should vote using vote_multisig_tx.py
.
Known Issue: During Step 5, the simulation always succeeds, even if the multi-sig transaction doesn't gather enough votes. This is due to an Aptos issue aptos-labs/aptos-core#8304.
Once sufficient votes are gathered, any of the owner accounts can run execute_multisig_tx.py
to execute the transaction.
- The same script can also be used to check the votes and remove failed multi-sig transactions.
- Note: If a multi-sig transaction is expired or rejected, it must be removed, otherwise no other multi-sig transaction can be executed.
- Install the Aptos SDK:
pip install aptos_sdk
- Install
bip_tools
(for handling mnemonics):pip install bip_tools
- If you do not need to use mnemonics, this step can be skipped.
Feel free to open an issue or reach out if you have any questions or run into issues.