name: MethodIndex
description: A wrapper around the [sectionIndex, methodIndex] value that uniquely identifies a method
Hierarchy
↳ U8aFixed
↳ MethodIndex
Implements
Indexable
[index: number]: number
Constructors
constructor
⊕ new MethodIndex(value?: AnyU8a): MethodIndex
Overrides U8aFixed.constructor
Defined in primitive/Method.ts:57
Parameters:
| Name | Type |
|---|---|
Optional value | AnyU8a |
Returns: MethodIndex
Properties
BYTES_PER_ELEMENT
● BYTES_PER_ELEMENT: number
Inherited from Uint8Array.BYTES_PER_ELEMENT
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:1962
The size in bytes of each element in the array.
__@toStringTag
● __@toStringTag: "UInt8Array"
Inherited from Uint8Array.[Symbol.toStringTag]
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:276
buffer
● buffer: ArrayBufferLike
Inherited from Uint8Array.buffer
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:1967
The ArrayBuffer instance referenced by the array.
byteLength
● byteLength: number
Inherited from Uint8Array.byteLength
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:1972
The length in bytes of the array.
byteOffset
● byteOffset: number
Inherited from Uint8Array.byteOffset
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:1977
The offset in bytes of the array.
Accessors
encodedLength
get encodedLength(): number
Inherited from U8a.encodedLength
Defined in codec/U8a.ts:36
description: The length of the value when encoded as a Uint8Array
Returns: number
isEmpty
get isEmpty(): boolean
Defined in codec/U8a.ts:43
description: Returns true if the type wraps an empty/default all-0 value
Returns: boolean
length
get length(): number
Overrides Uint8Array.length
Defined in codec/U8a.ts:50
description: The length of the value
Returns: number
Methods
__@iterator
▸ __@iterator(): IterableIterator<number>
Inherited from Uint8Array.[Symbol.iterator]
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es2015.iterable.d.ts:267
Returns: IterableIterator<number>
bitLength
▸ bitLength(): number
Inherited from U8aFixed.bitLength
Defined in codec/U8aFixed.ts:52
description: Returns the number of bits in the value
Returns: number
copyWithin
▸ copyWithin(target: number, start: number, end?: undefined | number): this
Inherited from Uint8Array.copyWithin
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:1988
Returns the this object after copying a section of the array identified by start and end to the same array starting at position target
Parameters:
| Name | Type | Description |
|---|---|---|
| target | number | If target is negative, it is treated as length+target where length is the length of the array. |
| start | number | If start is negative, it is treated as length+start. If end is negative, it is treated as length+end. |
Optional end | undefined | number | If not specified, length of the this object is used as its default value. |
Returns: this
entries
▸ entries(): IterableIterator<[number, number]>
Inherited from Uint8Array.entries
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es2015.iterable.d.ts:271
Returns an array of key, value pairs for every entry in the array
Returns: IterableIterator<[number, number]>
eq
▸ eq(other?: any): boolean
Defined in codec/U8a.ts:58
description: Compares the value of the input to see if there is a match
Parameters:
| Name | Type |
|---|---|
Optional other | any |
Returns: boolean
every
▸ every(callbackfn: function, thisArg?: any): boolean
Inherited from Uint8Array.every
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:1998
Determines whether all the members of an array satisfy the specified test.
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. |
Optional thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: boolean
fill
▸ fill(value: number, start?: undefined | number, end?: undefined | number): this
Inherited from Uint8Array.fill
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2008
Returns the this object after filling the section identified by start and end with value
Parameters:
| Name | Type | Description |
|---|---|---|
| value | number | value to fill array section with |
Optional start | undefined | number | index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array. |
Optional end | undefined | number | index to stop filling the array at. If end is negative, it is treated as length+end. |
Returns: this
filter
▸ filter(callbackfn: function, thisArg?: any): Uint8Array
Inherited from Uint8Array.filter
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2017
Returns the elements of an array that meet the condition specified in a callback function.
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. |
Optional thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: Uint8Array
find
▸ find(predicate: function, thisArg?: any): number | undefined
Inherited from Uint8Array.find
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2028
Returns the value of the first element in the array where predicate is true, and undefined otherwise.
Parameters:
| Name | Type | Description |
|---|---|---|
| predicate | function | find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. |
Optional thisArg | any | If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead. |
Returns: number | undefined
findIndex
▸ findIndex(predicate: function, thisArg?: any): number
Inherited from Uint8Array.findIndex
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2039
Returns the index of the first element in the array where predicate is true, and -1 otherwise.
Parameters:
| Name | Type | Description |
|---|---|---|
| predicate | function | find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1. |
Optional thisArg | any | If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead. |
Returns: number
forEach
▸ forEach(callbackfn: function, thisArg?: any): void
Inherited from Uint8Array.forEach
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2048
Performs the specified action for each element in an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. |
Optional thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: void
includes
▸ includes(searchElement: number, fromIndex?: undefined | number): boolean
Inherited from Uint8Array.includes
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es2016.array.include.d.ts:54
Determines whether an array includes a certain element, returning true or false as appropriate.
Parameters:
| Name | Type | Description |
|---|---|---|
| searchElement | number | The element to search for. |
Optional fromIndex | undefined | number | The position in this array at which to begin searching for searchElement. |
Returns: boolean
indexOf
▸ indexOf(searchElement: number, fromIndex?: undefined | number): number
Inherited from Uint8Array.indexOf
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2056
Returns the index of the first occurrence of a value in an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| searchElement | number | The value to locate in the array. |
Optional fromIndex | undefined | number | The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. |
Returns: number
join
▸ join(separator?: undefined | string): string
Inherited from Uint8Array.join
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2063
Adds all the elements of an array separated by the specified separator string.
Parameters:
| Name | Type | Description |
|---|---|---|
Optional separator | undefined | string | A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. |
Returns: string
keys
▸ keys(): IterableIterator<number>
Inherited from Uint8Array.keys
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es2015.iterable.d.ts:275
Returns an list of keys in the array
Returns: IterableIterator<number>
lastIndexOf
▸ lastIndexOf(searchElement: number, fromIndex?: undefined | number): number
Inherited from Uint8Array.lastIndexOf
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2071
Returns the index of the last occurrence of a value in an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| searchElement | number | The value to locate in the array. |
Optional fromIndex | undefined | number | The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. |
Returns: number
map
▸ map(callbackfn: function, thisArg?: any): Uint8Array
Inherited from Uint8Array.map
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2086
Calls a defined callback function on each element of an array, and returns an array that contains the results.
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. |
Optional thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: Uint8Array
reduce
▸ reduce(callbackfn: function): number
▸ reduce(callbackfn: function, initialValue: number): number
▸ reduce<U>(callbackfn: function, initialValue: U): U
Inherited from Uint8Array.reduce
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2098
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. |
Returns: number
Inherited from Uint8Array.reduce
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2099
Parameters:
| Name | Type |
|---|---|
| callbackfn | function |
| initialValue | number |
Returns: number
Inherited from Uint8Array.reduce
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2111
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type parameters:
U
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. |
| initialValue | U | If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. |
Returns: U
reduceRight
▸ reduceRight(callbackfn: function): number
▸ reduceRight(callbackfn: function, initialValue: number): number
▸ reduceRight<U>(callbackfn: function, initialValue: U): U
Inherited from Uint8Array.reduceRight
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2123
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. |
Returns: number
Inherited from Uint8Array.reduceRight
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2124
Parameters:
| Name | Type |
|---|---|
| callbackfn | function |
| initialValue | number |
Returns: number
Inherited from Uint8Array.reduceRight
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2136
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type parameters:
U
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. |
| initialValue | U | If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. |
Returns: U
reverse
▸ reverse(): Uint8Array
Inherited from Uint8Array.reverse
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2141
Reverses the elements in an Array.
Returns: Uint8Array
set
▸ set(array: ArrayLike<number>, offset?: undefined | number): void
Inherited from Uint8Array.set
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2148
Sets a value or an array of values.
Parameters:
| Name | Type | Description |
|---|---|---|
| array | ArrayLike<number> | A typed or untyped array of values to set. |
Optional offset | undefined | number | The index in the current array at which the values are to be written. |
Returns: void
slice
▸ slice(start?: undefined | number, end?: undefined | number): Uint8Array
Inherited from Uint8Array.slice
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2155
Returns a section of an array.
Parameters:
| Name | Type | Description |
|---|---|---|
Optional start | undefined | number | The beginning of the specified portion of the array. |
Optional end | undefined | number | The end of the specified portion of the array. |
Returns: Uint8Array
some
▸ some(callbackfn: function, thisArg?: any): boolean
Inherited from Uint8Array.some
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2165
Determines whether the specified callback function returns true for any element of an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| callbackfn | function | A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. |
Optional thisArg | any | An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. |
Returns: boolean
sort
▸ sort(compareFn?: undefined | function): this
Inherited from Uint8Array.sort
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2172
Sorts an array.
Parameters:
| Name | Type | Description |
|---|---|---|
Optional compareFn | undefined | function | The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order. |
Returns: this
subarray
▸ subarray(begin: number, end?: undefined | number): Uint8Array
Overrides Uint8Array.subarray
Defined in codec/U8a.ts:73
description: Create a new subarray from the actual buffer. This is needed for compat reasons since a new Uint8Array gets returned here
Parameters:
| Name | Type | Description |
|---|---|---|
| begin | number | The position to start at |
Optional end | undefined | number | The position to end at |
Returns: Uint8Array
toHex
▸ toHex(): string
Defined in codec/U8a.ts:80
description: Returns a hex string representation of the value
Returns: string
toJSON
▸ toJSON(): any
Implementation of Codec.toJSON
Defined in codec/U8a.ts:87
description: Converts the Object to JSON, typically used for RPC transfers
Returns: any
toLocaleString
▸ toLocaleString(): string
Inherited from Uint8Array.toLocaleString
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:2185
Converts a number to a string by using the current locale.
Returns: string
toString
▸ toString(): string
Implementation of Codec.toString
Overrides Uint8Array.toString
Defined in codec/U8a.ts:94
description: Returns the string representation of the value
Returns: string
toU8a
▸ toU8a(isBare?: undefined | false | true): Uint8Array
Defined in codec/U8a.ts:102
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
values
▸ values(): IterableIterator<number>
Inherited from Uint8Array.values
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es2015.iterable.d.ts:279
Returns an list of values in the array
Returns: IterableIterator<number>