mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-11-20 04:56:12 +00:00
- @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.
18 lines
465 B
JavaScript
18 lines
465 B
JavaScript
import { fromHex, toHex } from '@pezkuwi/papi-utils';
|
|
import { createCodec, Bytes } from 'scale-ts';
|
|
|
|
const enc$1 = (nBytes) => {
|
|
const _enc = Bytes.enc(nBytes);
|
|
return (value) => _enc(fromHex(value));
|
|
};
|
|
const dec$1 = (nBytes) => {
|
|
const _dec = Bytes.dec(nBytes);
|
|
return (value) => toHex(_dec(value));
|
|
};
|
|
const Hex = (nBytes) => createCodec(enc$1(nBytes), dec$1(nBytes));
|
|
Hex.enc = enc$1;
|
|
Hex.dec = dec$1;
|
|
|
|
export { Hex };
|
|
//# sourceMappingURL=Hex.mjs.map
|