BcsEnum
@iota/iota-sdk / bcs / BcsEnum
Class: BcsEnum<T, Name>
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:103
Extends
BcsType<EnumOutputShape<{ [K in keyof T]: T[K] extends BcsType<infer U, any> ? U : true }>,EnumInputShape<{ [K in keyof T]: T[K] extends BcsType<any, infer U, any> ? U : boolean | object | null }>,Name>
Type Parameters
T
T extends Record<string, BcsType<any> | null>
Name
Name extends string = string
Constructors
Constructor
new BcsEnum<
T,Name>(__namedParameters):BcsEnum<T,Name>
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:108
Parameters
__namedParameters
BcsEnumOptions<T, Name>
Returns
BcsEnum<T, Name>
Overrides
Properties
$inferInput
$inferInput:
EnumInputShape
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:12
Inherited from
$inferType
$inferType:
EnumOutputShape
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:11
Inherited from
name
name:
Name
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:13
Inherited from
read
read: (
reader) =>EnumOutputShape
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:14
Parameters
reader
BcsReader
Returns
EnumOutputShape
Inherited from
serializedSize
serializedSize: (
value,options?) =>number|null
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:15
Parameters
value
EnumInputShape
options?
BcsWriterOptions
Returns
number | null
Inherited from
validate
validate: (
value) =>void
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:16
Parameters
value
EnumInputShape
Returns
void
Inherited from
Methods
fromBase58()
fromBase58(
b64):EnumOutputShape
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:29
Parameters
b64
string
Returns
EnumOutputShape
Inherited from
fromBase64()
fromBase64(
b64):EnumOutputShape
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:30
Parameters
b64
string
Returns
EnumOutputShape
Inherited from
fromHex()
fromHex(
hex):EnumOutputShape
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:28
Parameters
hex
string
Returns
EnumOutputShape
Inherited from
parse()
parse(
bytes):EnumOutputShape
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:27
Parameters
bytes
Uint8Array
Returns
EnumOutputShape
Inherited from
serialize()
serialize(
value,options?):SerializedBcs<EnumOutputShape<{ [K in string | number | symbol]: T[K] extends BcsType<U, any, string> ? U : true },Extract<keyofT,string>, { [K in string | number | symbol]: T[K] extends BcsType<U, any, string> ? U : true }[keyofT] extendsType?TypeextendsBcsType<U,U,string> ?U:never:never>,EnumInputShape<{ [K in string | number | symbol]: T[K] extends BcsType<any, U, any> ? U : boolean | object | null }>>
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:26
Parameters
value
EnumInputShape
options?
BcsWriterOptions
Returns
SerializedBcs<EnumOutputShape<{ [K in string | number | symbol]: T[K] extends BcsType<U, any, string> ? U : true }, Extract<keyof T, string>, { [K in string | number | symbol]: T[K] extends BcsType<U, any, string> ? U : true }[keyof T] extends Type ? Type extends BcsType<U, U, string> ? U : never : never>, EnumInputShape<{ [K in string | number | symbol]: T[K] extends BcsType<any, U, any> ? U : boolean | object | null }>>
Inherited from
transform()
transform<
T2,Input2,NewName>(__namedParameters):BcsType<T2,Input2,NewName>
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:31
Type Parameters
T2
T2 = EnumOutputShape<{ [K in string | number | symbol]: T[K] extends BcsType<U, any, string> ? U : true }, Extract<keyof T, string>, { [K in string | number | symbol]: T[K] extends BcsType<U, any, string> ? U : true }[keyof T] extends Type ? Type extends BcsType<U, U, string> ? U : never : never>
Input2
Input2 = EnumInputShape<{ [K in string | number | symbol]: T[K] extends BcsType<any, U, any> ? U : boolean | object | null }>
NewName
NewName extends string = Name
Parameters
__namedParameters
object & BcsTypeOptions<T2, Input2, NewName>
Returns
BcsType<T2, Input2, NewName>
Inherited from
write()
write(
value,writer):void
Defined in: sdk/bcs/dist/cjs/bcs-type.d.ts:25
Parameters
value
EnumInputShape
writer
BcsWriter
Returns
void