Skip to content
On this page

Scale JS / @scale-codec/definition-runtime / Codec

Interface: Codec<Encoded, Decoded>

@scale-codec/definition-runtime.Codec

General interface for any codec

Type parameters

NameType
EncodedEncoded
DecodedEncoded

Table of contents

Properties

Properties

decodeRaw

decodeRaw: Decode<Decoded>

Defined in

packages/definition-runtime/src/core.ts:9


encodeRaw

encodeRaw: Encode<Encoded>

Defined in

packages/definition-runtime/src/core.ts:8


fromBuffer

fromBuffer: (src: ArrayBufferView) => Decoded

Type declaration

▸ (src): Decoded

Parameters
NameType
srcArrayBufferView
Returns

Decoded

Defined in

packages/definition-runtime/src/core.ts:10


toBuffer

toBuffer: (value: Encoded) => Uint8Array

Type declaration

▸ (value): Uint8Array

Parameters
NameType
valueEncoded
Returns

Uint8Array

Defined in

packages/definition-runtime/src/core.ts:11