name: VoteThreshold
description: Voting threshold, used inside proposals to set change the voting tally
Hierarchy
↳ Enum
↳ VoteThreshold
Implements
Constructors
constructor
⊕ new VoteThreshold(index?: number | Uint8Array): VoteThreshold
Overrides Enum.constructor
Defined in VoteThreshold.ts:12
Parameters:
| Name | Type |
|---|---|
Optional index |
number | Uint8Array |
Returns: VoteThreshold
Accessors
encodedLength
getencodedLength(): number
Inherited from Enum.encodedLength
Defined in codec/Enum.ts:48
description: The length of the value when encoded as a Uint8Array
Returns: number
Methods
toHex
▸ toHex(): string
Defined in codec/Enum.ts:55
description: Returns a hex string representation of the value
Returns: string
toJSON
▸ toJSON(): any
Implementation of Codec.toJSON
Defined in codec/Enum.ts:62
description: Converts the Object to JSON, typically used for RPC transfers
Returns: any
toNumber
▸ toNumber(): number
Defined in codec/Enum.ts:69
description: Returns the number representation for the value
Returns: number
toString
▸ toString(): string
Implementation of Codec.toString
Defined in codec/Enum.ts:76
description: Returns the string representation of the value
Returns: string
toU8a
▸ toU8a(isBare?: undefined | false | true): Uint8Array
Defined in codec/Enum.ts:84
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
<Static> decodeEnum
▸ decodeEnum(value?: Enum | Uint8Array | number): number
Inherited from Enum.decodeEnum
Defined in codec/Enum.ts:35
Parameters:
| Name | Type | Default value |
|---|---|---|
Default value value |
Enum | Uint8Array | number |
0 |
Returns: number