Class UserStatsMap

Hierarchy

  • UserStatsMap

Constructors

Properties

bulkAccountLoader: BulkAccountLoader
driftClient: DriftClient
userStatsMap: Map<string, UserStats> = ...

map from authority pubkey to UserStats

Methods

  • Parameters

    • authority: PublicKey

      that owns the UserStatsAccount

    • Optional userStatsAccount: UserStatsAccount

      optional UserStatsAccount to subscribe to, if undefined will be fetched later

    • Optional skipFetch: boolean

      if true, will not immediately fetch the UserStatsAccount

    Returns Promise<void>

  • Enforce that a UserStats will exist for the given authorityPublicKey, reading one from the blockchain if necessary.

    Returns

    Parameters

    • authorityPublicKey: string

    Returns Promise<UserStats>

  • Sync the UserStatsMap

    Parameters

    • authorities: PublicKey[]

      list of authorities to derive UserStatsAccount public keys from. You may want to get this list from UserMap in order to filter out idle users

    Returns Promise<void>

Generated using TypeDoc