Revolutionizing Digital Trust: The Arrival of SignerSet Implementation!
New features and enhanced functionality debut as developers tackle complex edge cases in the groundbreaking SignerSet project, setting the stage for a secure future in digital transactions.
Commit Details:
[feature] Add SignerSet implementation (#38) * initial commit * Add questions * add varun chat notes * Add initial spec * refactor to only do SignerAddition for adding a delegate * add testing logic * test happy path * fix return type of numSigners * org dir structure * addDelegate works * add removeDelegate code * remove yarn lock * revert yarn lock * revert package lock * add Saturday plan * add cleanup work task * cleanup unit tests * Handle for more edge cases * not dry but all tests run and use secp256k1 eth package now * remove package * remove @types/secp256k1 import * add msg property to SignerNode * change to SignerAdd * refactor to use graph design * remove redundant comment * Add logic to remove subtree in edge case of addDelegate * refactor addSigner -> addCustody * fix tests wrt addCustody name change * change rootKey to custodySigner in tests * remove happy path label * change to Result type * remove 'new code' comment * change comment to be more descriptive of the case we're handling for * change test label * remove comment * change naming * change from this.revoked to this.removed * recursively delete entire delegate subtree * ensure number of removed is correct for unit test * change to parent,child params * no need for _numRemoved * add idempotency behavior for addCustody * remove comment * new design * fix test * Add leftover tasks section * add second concurrent edge case * fix bug and add todo for handling a variant of conflicting rem-add concurrent edge case * do not remove edges * got concurrent test case 2 passing * reorder * no-op * add pseudocode missing gap section * add other edge case pseudocode * deterministically always pass unit tests * fix label * add line item * add line item * add line item * add sub task in 7 * Refactor signerSet and tests * SignerSet tests pass * Clean up SignerSet * Remove signerSet README * Remove signerSet subdirectory * Fix signerSet linting problems * Cleanup signerSet declarations * Add comments to types/index and add SignerAdd and SignerRemove factory transient params types * Update custody signer tests to use secp256k1 utils * Check for cycles on SignerSet.add * Clean up private method names * Use SignatureAlgorithm enum and add test for removing all parent edges of vertex being removed * Clean up signer set methods and error messages * Remove TODO * Move private getters to bottom and add explanatory comment at top of signer set * Add comments to signerset methods and fix custody as child test * Handle Ethereum signers or Eddsa signers in signer set * Add _signers to engine and add engine.signer.test * Fix linter warnings * Update engine.signer tests to use signer instead of privateKey * Add signatureType to messages * Remove comment in types * Cleanup SignerAdd factory and comments * Fix engine.signer tests * Use signer set instead of signer changes * Use lowercased address as signerKey for EthereumSigner and add utils tests * Use lowercased address as signerKey for EthereumSigner and add utils tests * Remove commented code * Use lowercased address as signerKey for EthereumSigner and add utils tests * Expand signerSet test suite * Cleanup signer set tests and add test where addCustody fails if delegate already present * Only generate Eddsa signers in engine tests * Remove unused imports * Remove unused imports * Add explanatory comments about generateEd25519Signer and generateEthereumSigner * Do not use SignatureAlgorithm.EthereumPersonalSign in factories * Expand remove subtree test in signer set * Add removeCustody method to signer set * Wrap toLowerCase calls with sanitizeKey method and add more comments * Starting to completely remove roots and signer changes * Initial simplify commit * Add tests * Cleanup signer set and add comments about conflict resolution * Make SignerSet extend event emitter and check events in tests * Remove signers directly and emit removeSigner events instead of revokeMessage * Improve comments in signer set * Add engine.revoke test case * Remove simulator and update readme * Add revokeSigner tests for sets * Update SignerAdd interface * Rename params in factories * Rename signerset addCustody method * Add re-adding custody test case and improve comments * Improve comments in signerset and fix bug with dropping custody remove messages * Add extra tests to improve signer set coverage * Unexpected state error to signerset * Add extra params to SignerSet events Co-authored-by: Shreyas Jaganmohan <[email protected]>