@hashgraph/sdk
    Preparing search index...

    Class SignatureMap

    Hierarchy

    • default
      • SignatureMap
    Index

    Constructors

    Properties

    __map: Map<AccountId, NodeAccountIdSignatureMap>

    This map is from the key, to the value

    _fromString: (s: string) => AccountId

    A function pointer to convert a key into a string. So we can set each value in both maps.

    _map: Map<string, NodeAccountIdSignatureMap>

    This map is from the stringified version of the key, to the value

    Accessors

    • get size(): number

      Get the size of the map

      Returns number

    Methods

    • Create an iterator over key, value pairs

      Returns IterableIterator<[AccountId, NodeAccountIdSignatureMap], any, any>

    • Get a value by key or string.

      This is the main benefit of this class. If a user provides a KeyT we implicitly serialize it to a string and use the string version. Otherwise the user will get undefined even for a key that exists in the map since the KeyT the provided has a different pointer than the one we have stored. The string version doesn't have this issue since JS hashes the string and that would result in both KeyT hitting the same value even if they're different pointers.

      Parameters

      Returns null | NodeAccountIdSignatureMap

    • Stringify the map into something readable. NOTE: This implementation is not stable and can change.

      Returns string

    • Create iterator of values

      Returns IterableIterator<NodeAccountIdSignatureMap, any, any>