Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Dependent Signer Function APIs #319

Merged
merged 9 commits into from
Feb 21, 2023
Merged

Key Dependent Signer Function APIs #319

merged 9 commits into from
Feb 21, 2023

Conversation

SupremoUGH
Copy link
Contributor

@SupremoUGH SupremoUGH commented Feb 15, 2023

Goes together with Manta-Network/sdk#85

Changes for Signer and SignerState in manta-accounting::wallet::signer:

  • SignerState, instead of an AccountTable to be initialized, now it has Option<AccountTable> and Option<AuthorizationContext>.
  • sign requires AccountTable to be there. New field in SignError if it's None.
  • sync requires AuthorizationContext to be there. New field in SyncError if it's None.
  • New methods: instantiation without AccountTable, and loading/dropping AccountTable and AuthorizationContext.

More changes with design decisions:

  • address requires AccountTable. We could require the weaker AuthorizationContext for this, or, have an Address field in SignerState because it is the lowest level of security.
  • address now returns Option<Address> because of this.
  • transaction_data requires AccountTable. We could require the weaker AuthorizationContext for this or, have a DecryptionKey field in SignerState because that's all it's needed. However, it makes sense to require the AccountTable because it's commonly used in the compound method sign_with_transaction_data, which does require AccountTable.
  • transaction_data and identity_proof still return Option. Perhaps it makes sense that they return more verbose Results now?

manta-pay::signer::functions.rs changes:

  • Function new_signer initializes the signer with just parameters and optionally the state.
  • Derivation of all keys from a Mnemonic.

Before we can merge this PR, please make sure that all the following items have been checked off:

  • Linked to an issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Added one line describing your change in CHANGELOG.md and added the appropriate changelog label to the PR.
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Checked that changes and commits conform to the standards outlined in CONTRIBUTING.md.

@SupremoUGH SupremoUGH self-assigned this Feb 16, 2023
@SupremoUGH SupremoUGH linked an issue Feb 16, 2023 that may be closed by this pull request
@SupremoUGH SupremoUGH changed the title first prototype Key Dependent Signer Function APIs Feb 16, 2023
@SupremoUGH SupremoUGH added the changelog:added Changelog: add these changes to the `added` section of the changelog label Feb 16, 2023
@SupremoUGH SupremoUGH marked this pull request as ready for review February 16, 2023 13:00
manta-accounting/src/wallet/mod.rs Outdated Show resolved Hide resolved
manta-accounting/src/wallet/signer/mod.rs Outdated Show resolved Hide resolved
manta-accounting/src/wallet/signer/mod.rs Outdated Show resolved Hide resolved
@bhgomes bhgomes mentioned this pull request Feb 17, 2023
4 tasks
@SupremoUGH SupremoUGH requested a review from bhgomes February 20, 2023 12:30
@bhgomes bhgomes merged commit 45107d3 into main Feb 21, 2023
@bhgomes bhgomes deleted the feat/key_signer branch February 21, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:added Changelog: add these changes to the `added` section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Key-Dependent Signer Function API Updates
3 participants