#solana #goki #multisig #anchor

smart-wallet

Multisig Solana wallet with Timelock capabilities

14 releases (4 breaking)

Uses new Rust 2021

new 0.5.5 Jan 26, 2022
0.5.4 Dec 17, 2021
0.4.3 Dec 8, 2021
0.4.0 Nov 28, 2021
0.1.2 Oct 9, 2021

#523 in Magic Beans

Download history 13/week @ 2021-10-05 3/week @ 2021-10-12 26/week @ 2021-10-19 16/week @ 2021-11-02 14/week @ 2021-11-09 23/week @ 2021-11-16 56/week @ 2021-11-23 64/week @ 2021-11-30 116/week @ 2021-12-07 114/week @ 2021-12-14 77/week @ 2021-12-21 62/week @ 2021-12-28 111/week @ 2022-01-04 55/week @ 2022-01-11 107/week @ 2022-01-18

355 downloads per month
Used in 6 crates (2 directly)

AGPL-3.0

33KB
675 lines

smart-wallet

Multisig Solana wallet with Timelock capabilities.


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

~8–11MB
~230K SLoC