2023-11-12 12:14:43 +01: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]()
|
|
|
|
}
|