function Messages(options) {
  this.builder = Messages.builder(options);

  // map message constructors by name
  for(var key in this.builder.commandsMap) {
    var name = this.builder.commandsMap[key];
    this[name] = this.builder.commands[key];
  }

  if (!options) {
    options = {};
  }
  this.network = options.network || bitcore.Networks.defaultNetwork;
}
A factory to build Bitcoin protocol messages.
@param {Object=} options
@param {Network=} options.network
@param {Function=} options.Block - A block constructor
@param {Function=} options.BlockHeader - A block header constructor
@param {Function=} options.MerkleBlock - A merkle block constructor
@param {Function=} options.Transaction - A transaction constructor
@constructor