Socket
Socket
Sign inDemoInstall

@poprank/rankings

Package Overview
Dependencies
3
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @poprank/rankings

PopRank's NFT rarity and aesthetic ranking logic


Version published
Maintainers
1
Created

Readme

Source

Rankings

This package holds PopRank's NFT rankings logic. Curious as to how we calculate our rarity and aesthetics scores? Well, we believe it should be transparent, so it's all laid out publicly here!

For a more hands-on example which involves pulling NFTs from OpenSea via their API and then calculating their rarity, check out the example in our @poprank/opensea package

Please join us in our Discord too, we'd love to chat with you.

Rarity Punks outlined the base of our "Trait Sum" rarity calculation, we're thankful for their stellar work and recommend you check them out!

Install via npm / yarn:

yarn add @poprank/rankings

Example

In order to run the example, you need to have Node / NPM installed. To run a typescript file, we suggest installing npx such that you can run npx ts-node <filename>.ts.

There are numerous how-to's online about this that can explain it better than we can.

By default, our example.ts will use our saved collection we use for tests, in the rarity/ folder, which is an array of our NftBase type - NFTs with traits attached to them, but no rarity / trait counts calculated yet.

The example will calculate the rarity for the collection, saving the final rankings both in its JSON form, and a simple HTML file that'll show you visually the top 100 ranked NFTs!

You can make whatever edits you wish to our rarity algorithm and re-run the example.ts to see how it impacts the end result! We'd love to hear what you come up with :)

FAQs

Last updated on 07 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc