src/key/index.js
function constructValidSigners (address, inner_path, data) {
  let valid_signers = []
  if (inner_path === 'content.json') {
    if (data.signers) valid_signers = Object.keys(data.signers)
  } else {
    // TODO: multi-user
  }
  if (valid_signers.indexOf(address) === -1) valid_signers.push(address) // Address is always a valid signer
  return valid_signers
}
function constructValidSigners (address, inner_path, data) {
  let valid_signers = []
  if (inner_path === 'content.json') {
    if (data.signers) valid_signers = Object.keys(data.signers)
  } else {
    // TODO: multi-user
  }
  if (valid_signers.indexOf(address) === -1) valid_signers.push(address) // Address is always a valid signer
  return valid_signers
}
function constructValidSigners ( address , inner_path , data ) { let valid_signers = [ ] if ( inner_path === 'content.json' ) { if ( data . signers ) valid_signers = Object . keys ( data . signers ) } else { // TODO: multi-user } if ( valid_signers . indexOf ( address ) === - 1 ) valid_signers . push ( address ) // Address is always a valid signer return valid_signers }
Gets the valid signers for a file based on it's path and address
Will be soon deperacted in favor of zeronet-auth
@param {string} address - The address of the zie
@param {string} inner_path - The path of the content.json file
@param {object} data - The content.json contents as object
@return {array} - Array of valid signers
Gets the valid signers for a file based on it s path and address Will be soon deperacted in favor of zeronet - auth