2023-09-19 18:52:35 +02:00
|
|
|
import * as Protocols from '../protocols/index.js'
|
|
|
|
|
|
|
|
export const getProtocol = (protocolId) => {
|
|
|
|
if (!(protocolId in Protocols)) { throw Error('Protocol definition file missing: ' + protocolId) }
|
|
|
|
|
|
|
|
return new Protocols[protocolId]()
|
|
|
|
}
|