npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@candoizo/aavegotchi-leaderboard

v1.0.0-6

Published

aavegotchi rarity farming leaderboard

Downloads

14

Readme

aavegotchi-leaderboard

aavegotchi rarity farming leaderboard

usage

import { leaderboard } from '@candoizo/aavegotchi-leaderboard';

there is also a cli:

npx @candoizo/aavegotchi-leaderboard --help

Functions

setData(index) ⇒

Get set information by index in the list of sets.

Kind: global function
Returns: The current set data at the given index.

| Param | Type | Description | | ----- | ------------------- | ----------------------------------------------- | | index | number | The index of the set in the list, starting at 0 |

isSetItemsInEquippedWearables(setItems, equippedWearables) ⇒ boolean

Checks whether the setItems is a subset of the equippedWearables

Kind: global function
Returns: boolean - True if the equippedWearables match the setItems

| Param | Type | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------ | | setItems | Array.<number> | Set to check the first array is a subset of the second array | | equippedWearables | Array.<number> | Set to check the first array is a subset of the second array |

allSetsForItems(items) ⇒ Array.<number>

This function will return all of the sets that a player has equipped based on the items they have equipped

Kind: global function
Returns: Array.<number> - An array of all the set by index that the player has equipped

| Param | Type | Description | | ----- | --------------------------------- | --------------------------------------------------------- | | items | Array.<number> | An array of all the item ids that the player has equipped |

allSetsForAavegotchi(aavegotchi) ⇒ Array.<number>

This function will return all of the sets that an Aavegotchi has equipped based on the items they have equipped and collateral

Kind: global function
Returns: Array.<number> - An array of all the set by index that the player has equipped

| Param | Type | Description | | ---------- | --------------------------- | -------------------------------------------------------------------------------------------------- | | aavegotchi | SubgraphResult | Object representing an Aavegotchi subgraph result with equippedWearables and collateral properties |

bestSetOfSets(sets) ⇒ number

Takes an array of set indices and returns the index of the set with the best bonuses

Kind: global function
Returns: number - The index of the set with the best bonuses

| Param | Type | Description | | ----- | --------------------------------- | ----------------------- | | sets | Array.<number> | An array of set indices |

returnRarity(number) ⇒ number

This function returns the rarity bonus of a number given.

Kind: global function
Returns: number - The rarity of the given number.

| Param | Type | Description | | ------ | ------------------- | --------------------------- | | number | number | A number between 1 and 100. |

rarityScoreBonus(traits) ⇒ number

Takes an array of trait values and returns the total rarity score bonus.

Kind: global function
Returns: number - The total rarity score bonus.

| Param | Type | Description | | ------ | --------------------------------- | ------------------------- | | traits | Array.<number> | An array of trait values. |

kinshipMinusLastInteracted(kinship, lastInteracted) ⇒ number

Get the on-chain kinship using sui the current kinship and last interaction timestamp to calculate kinship, to get accurate value from subgraph Aavegotchis

Kind: global function
Returns: number - A kinship score. https://github.com/aavegotchi/aavegotchi-contracts/blob/847e437bf31a746b520c1b506adef7788716e797/contracts/Aavegotchi/libraries/LibAavegotchi.sol#L223

| Param | Type | Description | | -------------- | ------------------- | ------------------------------------ | | kinship | number | A kinship value. | | lastInteracted | number | A timestamp of the last interaction. |

seasonRoundBlockSnapshots(season, round) ⇒ number | undefined

Get the block snapshots for the given season and round.

Kind: global function
Returns: number | undefined - A canonical snapshot block number for the given season and round. 0/undefined if not set.

| Param | Type | Description | | ------ | ------------------- | ----------------- | | season | number | The season number | | round | number | The round number |

aavegotchis([blockNumber]) ⇒ Promise.<Object>

Fetch all Aavegotchi information from subgraph

Kind: global function
Returns: Promise.<Object> - Returns data in a promise

| Param | Type | Description | | ------------- | ------------------- | -------------------------------- | | [blockNumber] | number | The number of the block to query |

leaderboard(round, [season], [blockNumber], [exportRange]) ⇒ Promise.<Object>

Returns the leaderboard for a given round

Kind: global function
Returns: Promise.<Object> - An object containing the leaderboard results

| Param | Type | Description | | ------------- | ------------------- | ---------------------------------------------------- | | round | number | The round for which to return the leaderboard | | [season] | number | The season for which to return the leaderboard | | [blockNumber] | number | The block number for which to return the leaderboard | | [exportRange] | number | The amount of results to return |