getTotalShares()

/**
   * Get the total number of shares of the Collective Portrait.
   * @param {CollectivePortraitName | number} identity - The name of the Collective Portrait that the user would like to get the total number of shares for.
   * @returns {number} - The total number of shares of the Collective Portrait.
   * @beta
   * @async
   */
  getTotalShares(identity: CollectivePortraitName | number): number {
    const id =
      typeof identity === 'number' ? identity : this.getTokenIdByName(identity);

    return this.portrait.portraitCollectiveContract.totalSupply(id);
  }

Last updated