Expand description
Serialization utilities for witness and proof data
Handles conversion between JavaScript types and Arkworks field elements. All byte arrays use Little-Endian format (as expected by Arkworks).
Functionsยง
- bytes_
to_ fr - Convert Little-Endian bytes to Arkworks Fr field element
- bytes_
to_ scalar - Convert Little-Endian bytes to zkhash Scalar
- decimal_
to_ field_ bytes - Convert a decimal string to Little-Endian field element bytes
- field_
bytes_ to_ hex - Convert Little-Endian field bytes to hex string
- fr_
to_ bytes - Convert Arkworks Fr field element to Little-Endian bytes
- hex_
to_ field_ bytes - Convert hex string to Little-Endian field bytes
- hex_
to_ scalar - Convert hex string to zkhash Scalar
- parse_
witness - Parse witness bytes into vector of Fr elements
- scalar_
to_ bytes - Convert zkhash Scalar to Little-Endian bytes
- scalar_
to_ hex - Convert zkhash Scalar to hex string (for JS BigInt)
- u64_
to_ field_ bytes - Convert a u64 to Little-Endian field element bytes
- witness_
element_ count - Get the number of witness elements