UNPKG

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