1 unstable release
0.11.1 | Jun 15, 2023 |
---|
#18 in #cosmic
32KB
684 lines
This program can be used to allow a smallet to govern anything a regular [Pubkey] can govern. One can use the smallet as a BPF program upgrade authority, a mint authority, etc.
To use, one must first create a [Smallet] account, specifying two important parameters:
- Owners - the set of addresses that sign transactions for the smallet.
- Threshold - the number of signers required to execute a transaction.
- Minimum Delay - the minimum amount of time that must pass before a [Transaction] can be executed. If 0, this is ignored.
Once the [Smallet] account is created, one can create a [Transaction] account, specifying the parameters for a normal Solana instruction.
To sign, owners should invoke the smallet::approve instruction, and finally, smallet::execute_transaction, once enough (i.e. Smallet::threshold) of the owners have signed.
Dependencies
~10–22MB
~312K SLoC