Account.cairo
is a contract account based on OZ with a single signer by default. It integrates a plugin system which allow to have different ways to validate a transaction and access your account.
AccountPlugin.cairo
is a base contract that only works with plugin (with one by default in case none is specified when making a transaction).
The idea is that the rules behind an account can change during its life and Ledger's wallet will have two set of rules: one without an hardware wallet, and one with. Switching from one to the other should not trigger a migration of your account.
Plugins give wallets the options to validate a transaction. For instance, we have a SessionKey plugin that allow dapps to make transactions on your behalf to make possible a new UX where users do not have to face the "sign" popup for every action they want to take. This sessionKey plugin is a joint exploration with the Argent team and a good explanation about it is available here.
Another idea is to have a recovery plugin that allows an account to be recover in case you loose your signers by changing the default plugin.
python -m venv ./venv
source ./venv/bin/activate
brew install gmp
See for more details:
pip install -r requirements.txt
nile compile src/Account.cairo
pytest tests/*