/**
 * Flowtype definitions for serialize
 * Generated by Flowgen from a Typescript Definition
 * Flowgen v1.21.0
 * @flow
 */

import type {
  FixLenHexString,
  HexString,
  Int64_str,
  ParsedCredential,
  Uint8_t,
  Uint16_t,
  Uint32_t,
  Uint64_str,
  ParsedAnchor,
} from "../types/internal";
declare export function uint8_to_buf(value: Uint8_t): Buffer;
declare export function uint16_to_buf(value: Uint16_t | Uint8_t): Buffer;
declare export function buf_to_uint16(data: Buffer): Uint16_t;
declare export function uint32_to_buf(
  value: Uint32_t | Uint16_t | Uint8_t
): Buffer;
declare export function buf_to_uint32(data: Buffer): Uint32_t;
declare export function uint64_to_buf(value: Uint64_str): Buffer;
declare export function uint64Number_to_buf(value: number): Buffer;
declare export function int64_to_buf(value: Int64_str): Buffer;
declare export function hex_to_buf(
  data: HexString | FixLenHexString<mixed>
): Buffer;
declare export function buf_to_hex(data: Buffer): string;
declare export function path_to_buf(path: Array<number>): Buffer;
declare export function serializeOptionFlag(included: boolean): Buffer;
declare export function serializeCoin(coin: Uint64_str): Buffer;
declare export function serializeCredential(
  credential: ParsedCredential
): Buffer;
declare export function serializeAnchor(anchor: ParsedAnchor | null): Buffer;
