diff --git a/src/codecs/interface.ts b/src/codecs/interface.ts index 5e3ce278..8e5d9d1a 100644 --- a/src/codecs/interface.ts +++ b/src/codecs/interface.ts @@ -3,23 +3,23 @@ import type { ArrayBufferView, ByteView } from '../block/interface.js' /** * IPLD encoder part of the codec. */ -export interface BlockEncoder { +export interface BlockEncoder { name: string code: Code - encode(data: T): ByteView + encode(data: T): ByteView } /** * IPLD decoder part of the codec. */ -export interface BlockDecoder { +export interface BlockDecoder { code: Code - decode(bytes: ByteView | ArrayBufferView): T + decode(bytes: ByteView | ArrayBufferView): T } /** * An IPLD codec is a combination of both encoder and decoder. */ -export interface BlockCodec extends BlockEncoder, BlockDecoder {} +export interface BlockCodec extends BlockEncoder, BlockDecoder {} export type { ArrayBufferView, ByteView }