mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-04-22 10:17:56 +00:00
31467f90d4
- @pezkuwi/papi-utils (rebrand of @polkadot-api/utils) - @pezkuwi/bizinikiwi-bindings (rebrand of @polkadot-api/substrate-bindings) - @pezkuwi/metadata-builders (rebrand of @polkadot-api/metadata-builders) - @pezkuwi/merkleize-metadata (rebrand of @polkadot-api/merkleize-metadata) All @polkadot-api references replaced with @pezkuwi equivalents.
15 lines
420 B
JavaScript
15 lines
420 B
JavaScript
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
|