name: Nonce

description: The Compact or number of transactions sent by a specific account. Generally used with extrinsics to determine the order of execution.

Hierarchy

↳ Compact

↳ NonceCompact

Implements

Constructors

constructor

⊕ new NonceCompact(Type: Constructor<UInt | Moment>, value?: Compact | AnyNumber): NonceCompact

Inherited from Compact.constructor

Overrides Base.constructor

Defined in codec/Compact.ts:23

Parameters:

Name Type Default value
Type Constructor<UInt | Moment> -
Default value value Compact | AnyNumber 0

Returns: NonceCompact


Properties

<Static> addLengthPrefix

● addLengthPrefix: compactAddLength = compactAddLength

Inherited from Compact.addLengthPrefix

Defined in codec/Compact.ts:41

Prepend a Uint8Array with its compact length.

param: The Uint8Array to be prefixed


<Static> decodeU8a

● decodeU8a: compactFromU8a = compactFromU8a

Inherited from Compact.decodeU8a

Defined in codec/Compact.ts:42


<Static> encodeU8a

● encodeU8a: compactToU8a = compactToU8a

Inherited from Compact.encodeU8a

Defined in codec/Compact.ts:43


Accessors

encodedLength

get encodedLength(): number

Inherited from Compact.encodedLength

Defined in codec/Compact.ts:72

description: The length of the value when encoded as a Uint8Array

Returns: number


isEmpty

get isEmpty(): boolean

Inherited from Compact.isEmpty

Defined in codec/Compact.ts:79

description: Checks if the value is an empty value

Returns: boolean


Methods

bitLength

▸ bitLength(): UIntBitLength

Inherited from Compact.bitLength

Defined in codec/Compact.ts:86

description: Returns the number of bits in the value

Returns: UIntBitLength


eq

▸ eq(other?: any): boolean

Implementation of Codec.eq

Inherited from Compact.eq

Defined in codec/Compact.ts:93

description: Compares the value of the input to see if there is a match

Parameters:

Name Type
Optional other any

Returns: boolean


toBn

▸ toBn(): BN

Inherited from Compact.toBn

Defined in codec/Compact.ts:104

description: Returns the BN representation of the number

Returns: BN


toHex

▸ toHex(): any

Implementation of Codec.toHex

Inherited from Compact.toHex

Defined in codec/Compact.ts:111

description: Returns a hex string representation of the value

Returns: any


toJSON

▸ toJSON(): any

Implementation of Codec.toJSON

Inherited from Compact.toJSON

Defined in codec/Compact.ts:118

description: Converts the Object to JSON, typically used for RPC transfers

Returns: any


toNumber

▸ toNumber(): number

Inherited from Compact.toNumber

Defined in codec/Compact.ts:125

description: Returns the number representation for the value

Returns: number


toString

▸ toString(): string

Implementation of Codec.toString

Inherited from Compact.toString

Defined in codec/Compact.ts:132

description: Returns the string representation of the value

Returns: string


toU8a

▸ toU8a(isBare?: undefined | false | true): Uint8Array

Implementation of Codec.toU8a

Inherited from Compact.toU8a

Defined in codec/Compact.ts:140

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


unwrap

▸ unwrap(): UInt | Moment

Inherited from Compact.unwrap

Defined in codec/Compact.ts:147

description: Returns the embedded UInt or Moment value

Returns: UInt | Moment


<Static> decodeCompact

▸ decodeCompact(Type: Constructor<UInt | Moment>, value: Compact | AnyNumber): Moment | UInt

Inherited from Compact.decodeCompact

Defined in codec/Compact.ts:51

Parameters:

Name Type
Type Constructor<UInt | Moment>
value Compact | AnyNumber

Returns: Moment | UInt


<Static> stripLengthPrefix

▸ stripLengthPrefix(u8a: Uint8Array, bitLength?: UIntBitLength): Uint8Array

Inherited from Compact.stripLengthPrefix

Defined in codec/Compact.ts:45

Parameters:

Name Type Default value
u8a Uint8Array -
Default value bitLength UIntBitLength DEFAULT_BITLENGTH

Returns: Uint8Array


<Static> with

▸ with(Type: Constructor<UInt | Moment>): Constructor<Compact>

Inherited from Compact.with

Defined in codec/Compact.ts:28

Parameters:

Name Type
Type Constructor<UInt | Moment>

Returns: Constructor<Compact>


Last Updated: 2/25/2019, 4:39:16 PM