name: MisbehaviorKind
description: An EnumType containing a Bft misbehaviour
Hierarchy
↳ EnumType<BftProposeOutOfTurn | BftDoublePropose | BftDoublePrepare | BftDoubleCommit>
↳ MisbehaviorKind
Implements
Constructors
constructor
⊕ new MisbehaviorKind(value?: BftAtReportValue | Uint8Array, index?: undefined | number): MisbehaviorKind
Overrides EnumType.constructor
Defined in MisbehaviorReport.ts:121
Parameters:
| Name | Type | |
|---|---|---|
Optional value |
BftAtReportValue |
Uint8Array |
Optional index |
undefined |
number |
Returns: MisbehaviorKind
Accessors
asBftDoubleCommit
getasBftDoubleCommit(): BftDoubleCommit
Defined in MisbehaviorReport.ts:134
description: Returns the item as a BftDoubleCommit
Returns: BftDoubleCommit
asBftDoublePrepare
getasBftDoublePrepare(): BftDoublePrepare
Defined in MisbehaviorReport.ts:141
description: Returns the item as a BftDoublePrepare
Returns: BftDoublePrepare
asBftDoublePropose
getasBftDoublePropose(): BftDoublePropose
Defined in MisbehaviorReport.ts:148
description: Returns the item as a BftDoublePropose
Returns: BftDoublePropose
asBftProposeOutOfTurn
getasBftProposeOutOfTurn(): BftProposeOutOfTurn
Defined in MisbehaviorReport.ts:155
description: Returns the item as a BftProposeOutOfTurn
Returns: BftProposeOutOfTurn
encodedLength
getencodedLength(): number
Inherited from EnumType.encodedLength
Defined in codec/EnumType.ts:101
description: The length of the value when encoded as a Uint8Array
Returns: number
index
getindex(): number
Defined in codec/EnumType.ts:108
description: The index of the metadata value
Returns: number
isNone
getisNone(): boolean
Inherited from EnumType.isNone
Defined in codec/EnumType.ts:115
description: Checks if the Enum points to a Null type
Returns: boolean
isNull
getisNull(): boolean
Inherited from EnumType.isNull
Defined in codec/EnumType.ts:122
description: Checks if the Enum points to a Null type (deprecated, use isNone)
Returns: boolean
type
gettype(): string
Defined in codec/EnumType.ts:129
description: The name of the type this enum value represents
Returns: string
value
getvalue(): Codec
Defined in codec/EnumType.ts:136
description: The value of the enum
Returns: Codec
Methods
eq
▸ eq(other?: any): boolean
Defined in codec/EnumType.ts:143
description: Compares the value of the input to see if there is a match
Parameters:
| Name | Type |
|---|---|
Optional other |
any |
Returns: boolean
toHex
▸ toHex(): string
Defined in codec/EnumType.ts:156
description: Returns a hex string representation of the value
Returns: string
toJSON
▸ toJSON(): any
Implementation of Codec.toJSON
Inherited from EnumType.toJSON
Defined in codec/EnumType.ts:163
description: Converts the Object to JSON, typically used for RPC transfers
Returns: any
toNumber
▸ toNumber(): number
Inherited from EnumType.toNumber
Defined in codec/EnumType.ts:172
description: Returns the number representation for the value
Returns: number
toString
▸ toString(): string
Implementation of Codec.toString
Inherited from EnumType.toString
Defined in codec/EnumType.ts:179
description: Returns the string representation of the value
Returns: string
toU8a
▸ toU8a(isBare?: undefined | false | true): Uint8Array
Defined in codec/EnumType.ts:187
description: Encodes the value as a Uint8Array as per the parity-codec specifications
Parameters:
| Name | Type | Description | ||
|---|---|---|---|---|
Optional isBare |
undefined |
false |
true |
true when the value has none of the type-specific prefixes (internal) |
Returns: Uint8Array