Files
pezkuwi-api/packages/bizinikiwi-bindings/dist/esm/codecs/scale/Hex.mjs.map
T
Kurdistan Tech Ministry 31467f90d4 feat: add PAPI rebrand packages
- @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.
2026-01-22 15:40:12 +03:00

1 line
1.2 KiB
Plaintext

{"version":3,"file":"Hex.mjs","sources":["../../../../src/codecs/scale/Hex.ts"],"sourcesContent":["import { fromHex, toHex } from \"@pezkuwi/papi-utils\"\nimport { Bytes, Codec, Decoder, Encoder, createCodec } from \"scale-ts\"\n\nexport type HexString = string & { __hexString?: unknown }\n\nconst enc = (nBytes?: number): Encoder<HexString> => {\n const _enc = Bytes.enc(nBytes)\n return (value: string) => _enc(fromHex(value))\n}\n\nconst dec = (nBytes?: number): Decoder<HexString> => {\n const _dec = Bytes.dec(nBytes)\n return (value) => toHex(_dec(value)) as HexString\n}\n\nexport const Hex = (nBytes?: number): Codec<HexString> =>\n createCodec(enc(nBytes), dec(nBytes))\n\nHex.enc = enc\nHex.dec = dec\n"],"names":["enc","dec"],"mappings":";;;AAKA,MAAMA,KAAA,GAAM,CAAC,MAAA,KAAwC;AACnD,EAAA,MAAM,IAAA,GAAO,KAAA,CAAM,GAAA,CAAI,MAAM,CAAA;AAC7B,EAAA,OAAO,CAAC,KAAA,KAAkB,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAC,CAAA;AAC/C,CAAA;AAEA,MAAMC,KAAA,GAAM,CAAC,MAAA,KAAwC;AACnD,EAAA,MAAM,IAAA,GAAO,KAAA,CAAM,GAAA,CAAI,MAAM,CAAA;AAC7B,EAAA,OAAO,CAAC,KAAA,KAAU,KAAA,CAAM,IAAA,CAAK,KAAK,CAAC,CAAA;AACrC,CAAA;AAEO,MAAM,GAAA,GAAM,CAAC,MAAA,KAClB,WAAA,CAAYD,MAAI,MAAM,CAAA,EAAGC,KAAA,CAAI,MAAM,CAAC;AAEtC,GAAA,CAAI,GAAA,GAAMD,KAAA;AACV,GAAA,CAAI,GAAA,GAAMC,KAAA;;;;"}