function isValidSignChallengeArray(
    signChallenges, challengeValueRequired, appIdRequired) {
  for (var i = 0; i < signChallenges.length; i++) {
    var incomingChallenge = signChallenges[i];
    if (challengeValueRequired &&
        !incomingChallenge.hasOwnProperty('challenge'))
      return false;
    if (!isValidRegisteredKey(incomingChallenge, appIdRequired)) {
      return false;
    }
  }
  return true;
}
/**
 * Returns whether the array of SignChallenges appears to be valid.
 * @param {Array<SignChallenge>} signChallenges The array of sign challenges.
 * @param {boolean} challengeValueRequired Whether each challenge object
 *     requires a challenge value.
 * @param {boolean} appIdRequired Whether the appId property is required on
 *     each challenge.
 * @return {boolean} Whether the array appears valid.
 */
Returns whether the array of SignChallenges appears to be valid.
@param {Array} signChallenges The array of sign challenges.
@param {boolean} challengeValueRequired Whether each challenge object
requires a challenge value.
@param {boolean} appIdRequired Whether the appId property is required on
each challenge.
@return {boolean} Whether the array appears valid.
Returns whether the array of SignChallenges appears to be valid . @param { Array } signChallenges The array of sign challenges . @param { boolean } challengeValueRequired Whether each challenge object requires a challenge value . @param { boolean } appIdRequired Whether the appId property is required on each challenge . @return { boolean } Whether the array appears valid .
function isValidSignChallengeArray(
    signChallenges, challengeValueRequired, appIdRequired) {
  for (var i = 0; i < signChallenges.length; i++) {
    var incomingChallenge = signChallenges[i];
    if (challengeValueRequired &&
        !incomingChallenge.hasOwnProperty('challenge'))
      return false;
    if (!isValidRegisteredKey(incomingChallenge, appIdRequired)) {
      return false;
    }
  }
  return true;
}
function isValidSignChallengeArray ( signChallenges , challengeValueRequired , appIdRequired ) { for ( var i = 0 ; i < signChallenges . length ; i ++ ) { var incomingChallenge = signChallenges [ i ] ; if ( challengeValueRequired && ! incomingChallenge . hasOwnProperty ( 'challenge' ) ) return false ; if ( ! isValidRegisteredKey ( incomingChallenge , appIdRequired ) ) { return false ; } } return true ; }
Returns whether the array of SignChallenges appears to be valid.
Returns whether the array of SignChallenges appears to be valid .