GitHub
App
Preparing search index...
The search index is not available
CCC Docs
CCC Docs
@ckb-ccc core
index
ccc
mol
Codec
Class Codec<Encodable, Decoded>
Type Parameters
Encodable
Decoded
=
Encodable
Index
Constructors
constructor
Properties
encode
decode
byte
Length?
Methods
from
map
map
In
map
Out
Constructors
constructor
new
Codec
<
Encodable
,
Decoded
>
(
encode
,
decode
,
byteLength
?
)
:
Codec
<
Encodable
,
Decoded
>
Type Parameters
Encodable
Decoded
=
Encodable
Parameters
encode
:
(
(
encodable
:
Encodable
)
=>
Uint8Array
)
(
encodable
)
:
Uint8Array
Parameters
encodable
:
Encodable
Returns
Uint8Array
decode
:
(
(
decodable
:
BytesLike
)
=>
Decoded
)
(
decodable
)
:
Decoded
Parameters
decodable
:
BytesLike
Returns
Decoded
Optional
byteLength
:
number
Returns
Codec
<
Encodable
,
Decoded
>
Properties
Readonly
encode
encode
:
(
(
encodable
:
Encodable
)
=>
Uint8Array
)
Readonly
decode
decode
:
(
(
decodable
:
BytesLike
)
=>
Decoded
)
Optional
Readonly
byte
Length
byte
Length
?:
number
Methods
Static
from
from
<
Encodable
,
Decoded
>
(
__namedParameters
)
:
Codec
<
Encodable
,
Decoded
>
Type Parameters
Encodable
Decoded
=
Encodable
Parameters
__namedParameters
:
CodecLike
<
Encodable
,
Decoded
>
Returns
Codec
<
Encodable
,
Decoded
>
map
map
<
NewEncodable
,
NewDecoded
>
(
__namedParameters
)
:
Codec
<
NewEncodable
,
NewDecoded
>
Type Parameters
NewEncodable
=
Encodable
NewDecoded
=
Decoded
Parameters
__namedParameters
:
{
inMap
?:
(
(
encodable
:
NewEncodable
)
=>
Encodable
)
;
outMap
?:
(
(
decoded
:
Decoded
)
=>
NewDecoded
)
;
}
Optional
in
Map
?:
(
(
encodable
:
NewEncodable
)
=>
Encodable
)
(
encodable
)
:
Encodable
Parameters
encodable
:
NewEncodable
Returns
Encodable
Optional
out
Map
?:
(
(
decoded
:
Decoded
)
=>
NewDecoded
)
(
decoded
)
:
NewDecoded
Parameters
decoded
:
Decoded
Returns
NewDecoded
Returns
Codec
<
NewEncodable
,
NewDecoded
>
map
In
map
In
<
NewEncodable
>
(
map
)
:
Codec
<
NewEncodable
,
Decoded
>
Type Parameters
NewEncodable
Parameters
map
:
(
(
encodable
:
NewEncodable
)
=>
Encodable
)
(
encodable
)
:
Encodable
Parameters
encodable
:
NewEncodable
Returns
Encodable
Returns
Codec
<
NewEncodable
,
Decoded
>
map
Out
map
Out
<
NewDecoded
>
(
map
)
:
Codec
<
Encodable
,
NewDecoded
>
Type Parameters
NewDecoded
Parameters
map
:
(
(
decoded
:
Decoded
)
=>
NewDecoded
)
(
decoded
)
:
NewDecoded
Parameters
decoded
:
Decoded
Returns
NewDecoded
Returns
Codec
<
Encodable
,
NewDecoded
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
encode
decode
byte
Length
Methods
from
map
map
In
map
Out
GitHub
App
CCC Docs
Loading...