interface Tally {
    [toStringTag]: string;
    ayes: Balance;
    createdAtHash?: IU8a;
    initialU8aLength?: number;
    isStorageFallback?: boolean;
    nays: Balance;
    records: BTreeMap<AccountId, Vote>;
    registry: Registry;
    size: number;
    get Type(): E;
    get defKeys(): string[];
    get encodedLength(): number;
    get hash(): IU8a;
    get isEmpty(): boolean;
    [iterator](): IterableIterator<[string, Codec]>;
    clear(): void;
    delete(key): boolean;
    entries(): IterableIterator<[string, Codec]>;
    eq(other?): boolean;
    forEach(callbackfn, thisArg?): void;
    get(key): Codec;
    getAtIndex(index): Codec;
    getT<T>(key): T;
    has(key): boolean;
    inspect(isBare?): Inspect;
    keys(): IterableIterator<string>;
    set(key, value): this;
    toArray(): Codec[];
    toHex(): `0x${string}`;
    toHuman(isExtended?, disableAscii?): Record<string, AnyJson>;
    toJSON(): Record<string, AnyJson>;
    toPrimitive(disableAscii?): Record<string, AnyJson>;
    toRawType(): string;
    toString(): string;
    toU8a(isBare?): Uint8Array;
    values(): IterableIterator<Codec>;
}

Hierarchy

  • Struct
    • Tally

Properties

[toStringTag]: string
ayes: Balance
createdAtHash?: IU8a
initialU8aLength?: number
isStorageFallback?: boolean
nays: Balance
records: BTreeMap<AccountId, Vote>
registry: Registry
size: number

Returns

the number of elements in the Map.

Accessors

  • get Type(): E
  • Returns E

    Description

    Returns the Type description of the structure

  • get defKeys(): string[]
  • Returns string[]

    Description

    The available keys for this struct

  • get encodedLength(): number
  • Returns number

    Description

    The length of the value when encoded as a Uint8Array

  • get hash(): IU8a
  • Returns IU8a

    Description

    returns a hash of the contents

  • get isEmpty(): boolean
  • Returns boolean

    Description

    Checks if the value is an empty value

Methods

  • Returns an iterable of entries in the map.

    Returns IterableIterator<[string, Codec]>

  • Returns void

  • Parameters

    • key: string

    Returns boolean

    true if an element in the Map existed and has been removed, or false if the element does not exist.

  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[string, Codec]>

  • Parameters

    • Optional other: unknown

    Returns boolean

    Description

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

  • Executes a provided function once per each key/value pair in the Map, in insertion order.

    Parameters

    • callbackfn: ((value, key, map) => void)
        • (value, key, map): void
        • Parameters

          • value: Codec
          • key: string
          • map: Map<string, Codec>

          Returns void

    • Optional thisArg: any

    Returns void

  • Parameters

    • key: string

      The name of the entry to retrieve

    Returns Codec

    Description

    Returns a specific names entry in the structure

  • Parameters

    • index: number

    Returns Codec

    Description

    Returns the values of a member at a specific index (Rather use get(name) for performance)

  • Type Parameters

    • T = Codec

    Parameters

    • key: string

    Returns T

    Description

    Returns the a types value by name

  • Parameters

    • key: string

    Returns boolean

    boolean indicating whether an element with the specified key exists or not.

  • Parameters

    • Optional isBare: BareOpts

    Returns Inspect

    Description

    Returns a breakdown of the hex encoding for this Codec

  • Returns an iterable of keys in the map

    Returns IterableIterator<string>

  • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

    Parameters

    • key: string
    • value: Codec

    Returns this

  • Returns Codec[]

    Description

    Converts the Object to an standard JavaScript Array

  • Returns `0x${string}`

    Description

    Returns a hex string representation of the value

  • Parameters

    • Optional isExtended: boolean
    • Optional disableAscii: boolean

    Returns Record<string, AnyJson>

    Description

    Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information

  • Returns Record<string, AnyJson>

    Description

    Converts the Object to JSON, typically used for RPC transfers

  • Parameters

    • Optional disableAscii: boolean

    Returns Record<string, AnyJson>

    Description

    Converts the value in a best-fit primitive form

  • Returns string

    Description

    Returns the base runtime type name for this instance

  • Returns string

    Description

    Returns the string representation of the value

  • Parameters

    • Optional isBare: BareOpts

      true when the value has none of the type-specific prefixes (internal)

    Returns Uint8Array

    Description

    Encodes the value as a Uint8Array as per the SCALE specifications

  • Returns an iterable of values in the map

    Returns IterableIterator<Codec>