function generateUpdateEntry(rootChainId, serverManagementSubchainId, efficiency, sk1) {
    if (rootChainId === serverManagementSubchainId) {
        throw new Error(
            `The root chain id cannot be the same as the server management subchain id (${rootChainId})`
        );
    }
    if (!isValidServerIdentityChainId(rootChainId)) {
        throw new Error(`Invalid root chain id ${rootChainId}`);
    }
    if (!isValidServerIdentityChainId(serverManagementSubchainId)) {
        throw new Error(`Invalid server management subchain id ${serverManagementSubchainId}`);
    }
    if (!isValidSk1(sk1)) {
        throw new Error('Lowest level identity key (sk1) is not valid');
    }
    if (typeof efficiency !== 'number' || efficiency < 0 || efficiency > 100) {
        throw new Error('Efficiency must be a number between 0 and 100');
    }

    return getEfficiencyUpdateEntry(rootChainId, serverManagementSubchainId, efficiency, sk1);
}
/**
 * Generate Entry object to update a server identity efficiency.
 * @memberof server
 * @function generateEfficiencyUpdateEntry
 * @param {string} rootChainId - Identity Root Chain Id.
 * @param {string} serverManagementSubchainId - Server Management Subchain Id.
 * @param {number} efficiency - Efficiency between 0 and 100.
 * @param {string} sk1 - Server identity Secret Key 1.
 * @returns {{chainId: Buffer, extIds: Buffer[], content: Buffer}}
 */
Generate Entry object to update a server identity efficiency.
@memberof server
@function generateEfficiencyUpdateEntry
@param {string} rootChainId - Identity Root Chain Id.
@param {string} serverManagementSubchainId - Server Management Subchain Id.
@param {number} efficiency - Efficiency between 0 and 100.
@param {string} sk1 - Server identity Secret Key 1.
Generate Entry object to update a server identity efficiency . @memberof server @function generateEfficiencyUpdateEntry @param { string } rootChainId - Identity Root Chain Id . @param { string } serverManagementSubchainId - Server Management Subchain Id . @param { number } efficiency - Efficiency between 0 and 100 . @param { string } sk1 - Server identity Secret Key 1 .
function generateUpdateEntry(rootChainId, serverManagementSubchainId, efficiency, sk1) {
    if (rootChainId === serverManagementSubchainId) {
        throw new Error(
            `The root chain id cannot be the same as the server management subchain id (${rootChainId})`
        );
    }
    if (!isValidServerIdentityChainId(rootChainId)) {
        throw new Error(`Invalid root chain id ${rootChainId}`);
    }
    if (!isValidServerIdentityChainId(serverManagementSubchainId)) {
        throw new Error(`Invalid server management subchain id ${serverManagementSubchainId}`);
    }
    if (!isValidSk1(sk1)) {
        throw new Error('Lowest level identity key (sk1) is not valid');
    }
    if (typeof efficiency !== 'number' || efficiency < 0 || efficiency > 100) {
        throw new Error('Efficiency must be a number between 0 and 100');
    }
    return getEfficiencyUpdateEntry(rootChainId, serverManagementSubchainId, efficiency, sk1);
}
function generateUpdateEntry ( rootChainId , serverManagementSubchainId , efficiency , sk1 ) { if ( rootChainId === serverManagementSubchainId ) { throw new Error ( ` ${ rootChainId } ` ) ; } if ( ! isValidServerIdentityChainId ( rootChainId ) ) { throw new Error ( ` ${ rootChainId } ` ) ; } if ( ! isValidServerIdentityChainId ( serverManagementSubchainId ) ) { throw new Error ( ` ${ serverManagementSubchainId } ` ) ; } if ( ! isValidSk1 ( sk1 ) ) { throw new Error ( 'Lowest level identity key (sk1) is not valid' ) ; } if ( typeof efficiency !== 'number' || efficiency < 0 || efficiency > 100 ) { throw new Error ( 'Efficiency must be a number between 0 and 100' ) ; } return getEfficiencyUpdateEntry ( rootChainId , serverManagementSubchainId , efficiency , sk1 ) ; }
Generate Entry object to update a server identity efficiency.
Generate Entry object to update a server identity efficiency .