Scale JS / @scale-codec/definition-runtime / Codec
Interface: Codec<Encoded, Decoded>
@scale-codec/definition-runtime.Codec
General interface for any codec
Type parameters
Name | Type |
---|---|
Encoded | Encoded |
Decoded | Encoded |
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
Name | Type |
---|---|
src | ArrayBufferView |
Returns
Decoded
Defined in
packages/definition-runtime/src/core.ts:10
toBuffer
• toBuffer: (value
: Encoded
) => Uint8Array
Type declaration
▸ (value
): Uint8Array
Parameters
Name | Type |
---|---|
value | Encoded |
Returns
Uint8Array