Preparing search index...
The search index is not available
Documentation
Documentation
@mysten/bcs
BcsType
Class BcsType<T, Input>
Type Parameters
T
Input
=
T
Index
Constructors
constructor
Properties
$infer
Input
$infer
Type
name
read
serialized
Size
validate
Methods
from
Base58
from
Base64
from
Hex
parse
serialize
transform
write
Constructors
constructor
new
Bcs
Type
<
T
,
Input
>
(
options
)
:
BcsType
<
T
,
Input
>
Type Parameters
T
Input
=
T
Parameters
options
:
{
name
:
string
;
read
:
(
(
reader
)
=>
T
)
;
serialize
?:
(
(
value
,
options
?
)
=>
Uint8Array
)
;
serializedSize
?:
(
(
value
)
=>
null
|
number
)
;
validate
?:
(
(
value
)
=>
void
)
;
write
:
(
(
value
,
writer
)
=>
void
)
;
}
&
BcsTypeOptions
<
T
,
Input
>
Returns
BcsType
<
T
,
Input
>
Properties
$infer
Input
$infer
Input
:
Input
$infer
Type
$infer
Type
:
T
name
name
:
string
read
read
:
(
(
reader
)
=>
T
)
Type declaration
(
reader
)
:
T
Parameters
reader
:
BcsReader
Returns
T
serialized
Size
serialized
Size
:
(
(
value
,
options
?
)
=>
null
|
number
)
Type declaration
(
value
,
options
?
)
:
null
|
number
Parameters
value
:
Input
Optional
options
:
BcsWriterOptions
Returns
null
|
number
validate
validate
:
(
(
value
)
=>
void
)
Type declaration
(
value
)
:
void
Parameters
value
:
Input
Returns
void
Methods
from
Base58
from
Base58
(
b64
)
:
T
Parameters
b64
:
string
Returns
T
from
Base64
from
Base64
(
b64
)
:
T
Parameters
b64
:
string
Returns
T
from
Hex
from
Hex
(
hex
)
:
T
Parameters
hex
:
string
Returns
T
parse
parse
(
bytes
)
:
T
Parameters
bytes
:
Uint8Array
Returns
T
serialize
serialize
(
value
,
options
?
)
:
SerializedBcs
<
T
,
Input
>
Parameters
value
:
Input
Optional
options
:
BcsWriterOptions
Returns
SerializedBcs
<
T
,
Input
>
transform
transform
<
T2
,
Input2
>
(
__namedParameters
)
:
BcsType
<
T2
,
Input2
>
Type Parameters
T2
Input2
Parameters
__namedParameters
:
{
input
:
(
(
val
)
=>
Input
)
;
output
:
(
(
value
)
=>
T2
)
;
}
&
BcsTypeOptions
<
T2
,
Input2
>
Returns
BcsType
<
T2
,
Input2
>
write
write
(
value
,
writer
)
:
void
Parameters
value
:
Input
writer
:
BcsWriter
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
$infer
Input
$infer
Type
name
read
serialized
Size
validate
from
Base58
from
Base64
from
Hex
parse
serialize
transform
write
Documentation
Loading...