Interface BlockCodec<Code, T>

An IPLD codec is a combination of both encoder and decoder.

interface BlockCodec<Code, T> {
    code: Code;
    name: string;
    decode(bytes): T;
    encode(data): ByteView<T>;
}

Type Parameters

  • Code extends number
  • T

Hierarchy (view full)

Properties

Methods

Properties

code: Code
name: string

Methods