* Throws if `version` is not a well-formed `MAJOR.MINOR.PATCH` string.
*/
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(version);
if (!match) {
throw new Error(`Invalid protocol version: ${version}`);
}
}
/**