mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-10-31 22:39:48 +00:00
The pezkuwi-dev build treats any package with a src/ directory as its own: it requires our license header on every file and builds it. These are upstream files that must stay byte-identical to the source embedded in dist/, so they live in upstream-src/ instead, which neither the build nor the root tsconfig picks up.
16 lines
463 B
TypeScript
16 lines
463 B
TypeScript
import { type HexString } from "@pezkuwi/bizinikiwi-bindings"
|
|
import { fromHex } from "@pezkuwi/papi-utils"
|
|
|
|
export const toBytes = (input: Uint8Array | HexString) =>
|
|
typeof input === "string" ? fromHex(input) : input
|
|
|
|
export const compactTypeRefs = {
|
|
null: "void" as const,
|
|
u8: "compactU8" as const,
|
|
u16: "compactU16" as const,
|
|
u32: "compactU32" as const,
|
|
u64: "compactU64" as const,
|
|
u128: "compactU128" as const,
|
|
u256: "compactU256" as const,
|
|
}
|