application/ClientUtil.js
/**
     * 
     * @param {BeanDataBlock} blockData Data block with the set of process information.
     */
@param {BeanDataBlock} blockData Data block with the set of process information.
@param { BeanDataBlock } blockData Data block with the set of process information .
async validateValidatorRecipients(blockData) {
        let validator = blockData.validator;
        let recipientsHash = blockData.recipientsHash;
        let recipientsHashSignedByValidator = blockData.recipientsHashSignedByValidator;
        let verifyHashRecipients = false;
        verifyHashRecipients = EccUtil.verifyMessageSigned(recipientsHash, recipientsHashSignedByValidator, validator);
        if (!verifyHashRecipients) {
            let msgError = 'Recipients Data Incorrect. Validator Publick Key Not Validated';
            logWrite(`[validateValidatorRecipients] Message: ${msgError}`);
            throw msgError;
        }
        logWrite('[validateValidatorRecipients] Recipients Data Ckecked');
        return verifyHashRecipients;
    }
async validateValidatorRecipients ( blockData ) { let validator = blockData . validator ; let recipientsHash = blockData . recipientsHash ; let recipientsHashSignedByValidator = blockData . recipientsHashSignedByValidator ; let verifyHashRecipients = false ; verifyHashRecipients = EccUtil . verifyMessageSigned ( recipientsHash , recipientsHashSignedByValidator , validator ) ; if ( ! verifyHashRecipients ) { let msgError = 'Recipients Data Incorrect. Validator Publick Key Not Validated' ; logWrite ( ` ${ msgError } ` ) ; throw msgError ; } logWrite ( '[validateValidatorRecipients] Recipients Data Ckecked' ) ; return verifyHashRecipients ; }
@param {BeanDataBlock} blockData Data block with the set of process information.
@param { BeanDataBlock } blockData Data block with the set of process information .
//stop here; // Recipients: OK ---------------------------------------