checkBuffer = function(name, size) {
    var buff = arg[name];
    assert(BufferUtil.isBuffer(buff), name + ' argument is not a buffer, it\'s ' + typeof buff);
    assert(
      buff.length === size,
      name + ' has not the expected size: found ' + buff.length + ', expected ' + size
    );
  }
Receives a object with buffers in all the properties and populates the
internal structure

@param {Object} arg
@param {buffer.Buffer} arg.version
@param {buffer.Buffer} arg.depth
@param {buffer.Buffer} arg.parentFingerPrint
@param {buffer.Buffer} arg.childIndex
@param {buffer.Buffer} arg.chainCode
@param {buffer.Buffer} arg.publicKey
@param {buffer.Buffer} arg.checksum
@param {string=} arg.xpubkey - if set, don't recalculate the base58
     representation
@return {HDPublicKey} this