24 releases (10 breaking)

0.11.1 Jun 23, 2022
0.10.1 Mar 23, 2022
0.5.4 Dec 17, 2021
0.4.0 Nov 28, 2021

#26 in #multisig

29 downloads per month
Used in 8 crates (2 directly)

AGPL-3.0

35KB
685 lines

smart-wallet

Multisig Solana wallet with Timelock capabilities.

License

Goki Protocol is licensed under the GNU Affero General Public License v3.0.

In short, this means that any changes to this code must be made open source and available under the AGPL-v3.0 license, even if only used privately. If you have a need to use this program and cannot respect the terms of the license, please message us our team directly at team@goki.so.


lib.rs:

Multisig Solana wallet with Timelock capabilities.

This program can be used to allow a smart wallet to govern anything a regular [Pubkey] can govern. One can use the smart wallet as a BPF program upgrade authority, a mint authority, etc.

To use, one must first create a [SmartWallet] account, specifying two important parameters:

  1. Owners - the set of addresses that sign transactions for the smart wallet.
  2. Threshold - the number of signers required to execute a transaction.
  3. Minimum Delay - the minimum amount of time that must pass before a [Transaction] can be executed. If 0, this is ignored.

Once the [SmartWallet] account is created, one can create a [Transaction] account, specifying the parameters for a normal Solana instruction.

To sign, owners should invoke the smart_wallet::approve instruction, and finally, smart_wallet::execute_transaction, once enough (i.e. SmartWallet::threshold) of the owners have signed.

Dependencies

~11–23MB
~334K SLoC