-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Migrate accounts to auth witness (#2281)
Changes all account contracts to use auth witnesses for authentication **Noir** - Auth witnesses now have variable length. - Introduces an `AccountActions` module in Noir that abstracts most of the account contract requirements, leaving only `is_valid` to be implemented by the developer. - Removes the `AccountInterface` helper in Noir in favor of two `assert_valid` functions. **Accounts** - Introduces a `BaseAccountContract` in ts, such that an account dev only needs to provide the abi, deploy args, and an `AuthWitnessProvider` that is basically a signer. Removes all the different entrypoint implementations, since we now have just a single one. - Adds a set of `AuthWitness`es to a `TxExecutionRequest`, which is used by the simulator during that tx run, so it doesn't need to be persisted in the local db. - Renames `Account` to `AccountManager`. - Renames `Entrypoint` to `AccountInterface`. **Wallet** - Adds a single `createAuthWitness` method to the `Wallet` interface that creates and registers the witness. - Adds a convenience `setPublicAuth` to the `AccountWallet` implementation for crafting the tx that sets a public auth (I think we can do better here though, it should be easy for the dev to create an action where they also include several public auths as part of a batch, but we can push that for later). - Kills `EntrypointWallet` and `AuthWitnessEntrypointWallet` in favor of a single `AccountWallet`. **Docs** - Yes. Fixes #2043
- Loading branch information
1 parent
f85ecd9
commit 91152af
Showing
85 changed files
with
2,696 additions
and
2,040 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.