UNPKG

1.41 kBTypeScriptView Raw
1import type { AnyNumber, Registry } from '@polkadot/types-codec/types';
2import { u32 } from '@polkadot/types-codec';
3import { BN } from '@polkadot/util';
4/**
5 * @name GenericAccountIndex
6 * @description
7 * A wrapper around an AccountIndex, which is a shortened, variable-length encoding
8 * for an Account. We extends from [[U32]] to provide the number-like properties.
9 */
10export declare class GenericAccountIndex extends u32 {
11 constructor(registry: Registry, value?: AnyNumber);
12 static calcLength(_value: BN | number): number;
13 static readLength(input: Uint8Array): [number, number];
14 static writeLength(input: Uint8Array): Uint8Array;
15 /**
16 * @description Compares the value of the input to see if there is a match
17 */
18 eq(other?: unknown): boolean;
19 /**
20 * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
21 */
22 toHuman(): string;
23 /**
24 * @description Converts the Object to JSON, typically used for RPC transfers
25 */
26 toJSON(): string;
27 /**
28 * @description Converts the value in a best-fit primitive form
29 */
30 toPrimitive(): string;
31 /**
32 * @description Returns the string representation of the value
33 */
34 toString(): string;
35 /**
36 * @description Returns the base runtime type name for this instance
37 */
38 toRawType(): string;
39}