UNPKG

o1js

Version:

TypeScript framework for zk-SNARKs and zkApps

22 lines (18 loc) 456 B
import { Bytes as InternalBytes, createBytes } from './bytes.js'; export { Bytes }; type Bytes = InternalBytes; /** * A provable type representing an array of bytes. * * ```ts * class Bytes32 extends Bytes(32) {} * * let bytes = Bytes32.fromHex('deadbeef'); * ``` */ function Bytes(size: number) { return createBytes(size); } Bytes.from = InternalBytes.from; Bytes.fromHex = InternalBytes.fromHex; Bytes.fromString = InternalBytes.fromString;