-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial manifest support (#426) * add auth section to upgrade * exchange auth definitions through a manifest * fix a ton of stuff * skip custom keypair tests for now * allow explicit compat mode * no need to special case keypair * actually fix preload test * make manifest explicit * also set compat mode when replicating manifest * very explicit manifest exchange * verifyBatch -> verifyBatchUpgraded * tweak namespacing and add explicit default ns * add preliminary functions for parsing manifest * typo on imports * add encodings and entropy/namespacing * add compat signer and more tests * lib/core uses manifest createAuth function * default to compat mode * make signers classes and update tests * correctly set compat on sessions/clones/upgrade * fix bad merge * need to specify compat for clone * replace auth with manifest * update clone and ensure that key is different * update tests to manifest api * load new auth if secret key is provided * remove custom auth test * support passing a sign function * remove auth tests * manifest renamed to multipleSigners * properly set compat and keyPair * pass batch to patched verify * port tests from hypercore-crypto-multisig * include file for multisig helpers * rename to verifiers and add explicit compat verifier * split out signing and verification * remove sign option and just pass keyPair or signature * only set keyPair after openCapabilities * clarify code around creating a manifest * conflict test now works * fix core copyFrom and core clone tests * fix clone and clone tests * standardise opts across append and truncate * tidy up * add multisig lib file * expose helper * fix batch flush api * fix noManifest logic * fix some typos/missing apis * set signature on tree only after verification * rename static helpers * rename defaultAuth to verifier * rename defaultAuth to verifier * remove static createVerifier method * review by @mafintosh * move manifestHash to lib/manifest --------- Co-authored-by: Mathias Buus <mathiasbuus@gmail.com> * last part of the constructor should be openSession * simplify key handler * fix keypair handler * define writable condition in one place * fix typo in manifestHash * pass manifest directly to createVerifier * no need to dbl copy manifest now * tweak manifest construction * consistent errors * add manifest getter * tweak manifest checks on load * review by @chm-diederichs * set keypair in constructor if possible * simplify core append signature * tweak batch flush * simplify compat option * update batch test * move compat default to lib/core * move compat check to a single func * no manifesthash in caps --------- Co-authored-by: Christophe Diederichs <45171645+chm-diederichs@users.noreply.github.com> Co-authored-by: Christophe Diederichs <chm-diederichs@protonmail.com> Manifest tweaks (#431) * more tests for now truncate/append options * move more manifest functinality into manifest.js * move isCompat to manifest and simplify clone options * enable all tests * pass batches to verifiers and move namespace support to batch * fix storage test
- Loading branch information
Showing
17 changed files
with
1,648 additions
and
535 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
Oops, something went wrong.