Class ValidatorKeysUpdatesList

    • Constructor Detail

      • ValidatorKeysUpdatesList

        public ValidatorKeysUpdatesList​(List<SchnorrPublicKey> signingKeysList,
                                        List<SchnorrPublicKey> masterKeysList,
                                        List<SchnorrPublicKey> updatedSigningKeysList,
                                        List<SchnorrPublicKey> updatedMasterKeysList,
                                        List<SchnorrSignature> updatedSigningKeysSkSignaturesList,
                                        List<SchnorrSignature> updatedSigningKeysMkSignaturesList,
                                        List<SchnorrSignature> updatedMasterKeysSkSignaturesList,
                                        List<SchnorrSignature> updatedMasterKeysMkSignaturesList,
                                        long maxPks)
        Create a set group for validators keys and signature updates.
        Parameters:
        signingKeysList - - The current signers' public keys.
        masterKeysList - - The current signers' master public keys.
        updatedSigningKeysList - - The list of updated signing keys. Should be equal to `signingKeysList` except where keys have changed. If no keys have changed, then this list should be equal to `signingKeysList`.
        updatedMasterKeysList - - The list of updated master signing keys. Should be equal to `masterKeysList` except where keys have changed. If no keys have changed, then this list should be equal to `masterKeysList`.
        updatedSigningKeysSkSignaturesList - - signatures made with old signing keys for new signing keys, elements can be empty if there was no update
        updatedSigningKeysMkSignaturesList - - signatures made with old master keys for new signing keys, elements can be empty if there was no update
        updatedMasterKeysSkSignaturesList - - signatures made with old signing keys for new master keys, elements can be empty if there was no update
        updatedMasterKeysMkSignaturesList - - signatures made with old master keys for new master keys, elements can be empty if there was no update
        maxPks - - the maximum number of key validators
    • Method Detail

      • getInputKeysRootHash

        public static FieldElement getInputKeysRootHash​(SchnorrPublicKey[] signingKeys,
                                                        SchnorrPublicKey[] masterKeys,
                                                        long maxPks)
                                                 throws Exception
        Utility: computes the validator keys merkle root given the set of signing keys and master keys passed as input to the function.
        Parameters:
        signingKeys - - The signers' public keys.
        masterKeys - - The signers' master public keys.
        maxPks - - Maximum number of pks
        Returns:
        the merkle root given the set of signing keys and master keys passed as input to the function
        Throws:
        Exception - - if it was not possible to compute the root
      • getKeysRootHash

        public FieldElement getKeysRootHash()
                                     throws Exception
        Computes the current validator keys merkle root.
        Returns:
        the current validator keys merkle root.
        Throws:
        Exception - - if it was not possible to compute the root
      • getUpdatedKeysRootHash

        public FieldElement getUpdatedKeysRootHash()
                                            throws Exception
        Computes the updated validator keys merkle root.
        Returns:
        the updated validator keys merkle root
        Throws:
        Exception - - if it was not possible to compute the root
      • getUpdatedSigningKeysSkSignatures

        public SchnorrSignature[] getUpdatedSigningKeysSkSignatures()
      • getUpdatedSigningKeysMkSignatures

        public SchnorrSignature[] getUpdatedSigningKeysMkSignatures()
      • getUpdatedMasterKeysSkSignatures

        public SchnorrSignature[] getUpdatedMasterKeysSkSignatures()
      • getUpdatedMasterKeysMkSignatures

        public SchnorrSignature[] getUpdatedMasterKeysMkSignatures()
      • setUpdatedSigningKeysSkSignatures

        public void setUpdatedSigningKeysSkSignatures​(SchnorrSignature[] updatedSigningKeysSkSignatures)
      • setUpdatedSigningKeysMkSignatures

        public void setUpdatedSigningKeysMkSignatures​(SchnorrSignature[] updatedSigningKeysMkSignatures)
      • setUpdatedMasterKeysSkSignatures

        public void setUpdatedMasterKeysSkSignatures​(SchnorrSignature[] updatedMasterKeysSkSignatures)
      • setUpdatedMasterKeysMkSignatures

        public void setUpdatedMasterKeysMkSignatures​(SchnorrSignature[] updatedMasterKeysMkSignatures)
      • setSigningKeys

        public void setSigningKeys​(SchnorrPublicKey[] signingKeys)
      • setUpdatedSigningKeys

        public void setUpdatedSigningKeys​(SchnorrPublicKey[] updatedSigningKeys)
      • setUpdatedMasterKeys

        public void setUpdatedMasterKeys​(SchnorrPublicKey[] updatedMasterKeys)