mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-06-20 19:41:03 +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.
1 line
1.8 KiB
Plaintext
1 line
1.8 KiB
Plaintext
{"version":3,"file":"blockHeader.mjs","sources":["../../../src/codecs/blockHeader.ts"],"sourcesContent":["import {\n Bytes,\n CodecType,\n Struct,\n Vector,\n _void,\n enhanceCodec,\n Hex,\n Variant,\n compactNumber,\n} from \"./scale\"\n\nconst textEncoder = new TextEncoder()\nconst textDecoder = new TextDecoder()\n\nconst fourChars = enhanceCodec(\n Bytes(4),\n textEncoder.encode.bind(textEncoder),\n textDecoder.decode.bind(textDecoder),\n)\n\nconst diggestVal = Struct({\n engine: fourChars,\n payload: Hex(),\n})\n\nconst diggest = Variant(\n {\n other: Bytes(),\n consensus: diggestVal,\n seal: diggestVal,\n preRuntime: diggestVal,\n runtimeUpdated: _void,\n },\n [0, 4, 5, 6, 8],\n)\n\nconst hex32 = Hex(32)\nexport const blockHeader = Struct({\n parentHash: hex32,\n number: compactNumber,\n stateRoot: hex32,\n extrinsicRoot: hex32,\n digests: Vector(diggest),\n})\n\nexport type BlockHeader = CodecType<typeof blockHeader>\n"],"names":["textEncoder","hex32"],"mappings":";;;;;;;;;;;;;AAYA,MAAMA,aAAA,GAAc,IAAI,WAAA,EAAY;AACpC,MAAM,WAAA,GAAc,IAAI,WAAA,EAAY;AAEpC,MAAM,SAAA,GAAY,YAAA;AAAA,EAChB,MAAM,CAAC,CAAA;AAAA,EACPA,aAAA,CAAY,MAAA,CAAO,IAAA,CAAKA,aAAW,CAAA;AAAA,EACnC,WAAA,CAAY,MAAA,CAAO,IAAA,CAAK,WAAW;AACrC,CAAA;AAEA,MAAM,aAAa,MAAA,CAAO;AAAA,EACxB,MAAA,EAAQ,SAAA;AAAA,EACR,SAAS,GAAA;AACX,CAAC,CAAA;AAED,MAAM,OAAA,GAAU,OAAA;AAAA,EACd;AAAA,IACE,OAAO,KAAA,EAAM;AAAA,IACb,SAAA,EAAW,UAAA;AAAA,IACX,IAAA,EAAM,UAAA;AAAA,IACN,UAAA,EAAY,UAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,CAAC,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,GAAG,CAAC;AAChB,CAAA;AAEA,MAAMC,OAAA,GAAQ,IAAI,EAAE,CAAA;AACb,MAAM,cAAc,MAAA,CAAO;AAAA,EAChC,UAAA,EAAYA,OAAA;AAAA,EACZ,MAAA,EAAQ,aAAA;AAAA,EACR,SAAA,EAAWA,OAAA;AAAA,EACX,aAAA,EAAeA,OAAA;AAAA,EACf,OAAA,EAAS,OAAO,OAAO;AACzB,CAAC;;;;"} |