import { unifyMetadata, decAnyMetadata } from '@pezkuwi/bizinikiwi-bindings';

const getMetadata = (input) => {
  try {
    const metadata = unifyMetadata(decAnyMetadata(input));
    if (metadata.version <= 14) throw new Error("Wrong metadata version");
    return metadata;
  } catch (e) {
    throw e || new Error("Unable to decode metadata");
  }
};

export { getMetadata };
//# sourceMappingURL=get-metadata.mjs.map
