fabric-client/lib/Client.js
function _stringToSignature(string_signatures) {
	const signatures = [];
	for (let signature of string_signatures) {
		// check for properties rather than object type
		if (signature && signature.signature_header && signature.signature) {
			logger.debug('_stringToSignature - signature is protobuf');
		} else {
			logger.debug('_stringToSignature - signature is string');
			const signature_bytes = Buffer.from(signature, 'hex');
			signature = _configtxProto.ConfigSignature.decode(signature_bytes);
		}
		signatures.push(signature);
	}

	return signatures;
}
function _stringToSignature(string_signatures) {
	const signatures = [];
	for (let signature of string_signatures) {
		// check for properties rather than object type
		if (signature && signature.signature_header && signature.signature) {
			logger.debug('_stringToSignature - signature is protobuf');
		} else {
			logger.debug('_stringToSignature - signature is string');
			const signature_bytes = Buffer.from(signature, 'hex');
			signature = _configtxProto.ConfigSignature.decode(signature_bytes);
		}
		signatures.push(signature);
	}

	return signatures;
}
function _stringToSignature ( string_signatures ) { const signatures = [ ] ; for ( let signature of string_signatures ) { // check for properties rather than object type if ( signature && signature . signature_header && signature . signature ) { logger . debug ( '_stringToSignature - signature is protobuf' ) ; } else { logger . debug ( '_stringToSignature - signature is string' ) ; const signature_bytes = Buffer . from ( signature , 'hex' ) ; signature = _configtxProto . ConfigSignature . decode ( signature_bytes ) ; } signatures . push ( signature ) ; } return signatures ; }
internal utility method to check and convert any strings to protobuf signatures
internal utility method to check and convert any strings to protobuf signatures