open-rarity
open-rarity copied to clipboard
Replicate the product on Javascript
It's been amazing to use so far on Python. That said, is it possible to recreate it on JS too?
It would also be great if we could still use NPM / Yarn to handle the packages similarly to pip.
Thanks
is it possible to recreate it on JS too?
-> Great idea @RichardAwoyemi. On JS native support , we have something in work that will help you - stay tuned! I will update the ticket once it's available.
it would also be great if we could still use NPM / Yarn to handle the packages similarly to pip.
-> you mean add support like it's described here https://classic.yarnpkg.com/en/package/python.node?
A TypeScript release would be amazing. I intend to use this on Rareboy.com
subscribe
is it possible to recreate it on JS too?
-> Great idea @RichardAwoyemi. On JS native support , we have something in work that will help you - stay tuned! I will update the ticket once it's available.
it would also be great if we could still use NPM / Yarn to handle the packages similarly to pip.
-> you mean add support like it's described here https://classic.yarnpkg.com/en/package/python.node?
Awesome any ETA on JS version?
While we are researching Node/JS support, will cloud endpoint API suffice your needs @emorling @samstr @RichardAwoyemi ?
While we are researching Node/JS support, will cloud endpoint API suffice your needs @emorling @samstr @RichardAwoyemi ?
Yes, but it depends on the rate limit. Will we be sending in all the metadata for a single collection in one request?
@emorling no metadata needed for this particular endpoint
I had assumed the logic would be client side, rather than an API endpoint.
It would be nice to prepare metadata as a local object/json and simply run it through a function to generate scores. Some projects I plan to generate with haven't minted yet, and I assume the endpoint would just take a contractAddress
and give the openrarity from an already minted collection?
@samstr great idea!
API endpoint was developed for simplicity of the data access and is complementary to the open-source library.
For not minted contracts you could just pipe collection data from metadata into OpenRarity models, you don't need to read from blockchain to construct the data. Check out these developer docs on how we do it in Python: https://openrarity.gitbook.io/developers/quick-guides/integrating-openrarity-in-your-application.
If you have the bandwidth to build this tool, we will be glad to figure out how to land the PR.
i'd be happy to jump in and contribute to the js version as well if needed.
and yes @impreso, an API endpoint would be a good start, and then eventually moving into standalone npm would be a great.
Hi all, that was a fun week for the OpenRarity team here, thanks for all the support and love from the community. We are carefully listening for all feedback that ya'll give and actively working on our next release.
Here is promised update with the OpenSea API that provides rarity data right now on the Assets API endpoint . We are still figuring out how to support other languages than python, but this should give you a straight integration point for TS.
One idea we had is to ship an OpenRarity docker image with an exposed REST endpoint to support all languages out there. Thoughts on this technical direction?
Hey @impreso, I’m impressed by your progress and devotion to this topic. I think a Docker Image would be great, and Iook forward to exploring the endpoints
Hi all, that was a fun week for the OpenRarity team here, thanks for all the support and love from the community. We are carefully listening for all feedback that ya'll give and actively working on our next release.
Here is promised update with the OpenSea API that provides rarity data right now on the Assets API endpoint . We are still figuring out how to support other languages than python, but this should give you a straight integration point for TS.
One idea we had is to ship an OpenRarity docker image with an exposed REST endpoint to support all languages out there. Thoughts on this technical direction?
Sorry I've been slow to respond in this thread but your efforts have been amazing @impreso! Wouldn't we need an OS API key to get the current Asset modal via the current endpoints?
The exposed docker endpoint would be a massive help. That way we could interact with it directly via js, or any other language.
If you offered a CLI rather than an SDK for each language that would be the best IMO.
If you offered a CLI rather than an SDK for each language that would be the best IMO.
That would not suffice for my use cases, when providing Rarity in a web site or chrome extension.
If you offered a CLI rather than an SDK for each language that would be the best IMO.
That would not suffice for my use cases, when providing Rarity in a web site or chrome extension.
Ok but that's not everyone's use case. If you have a website, you can run the cli server side and expose it on your website. Same with a chrome extension.
https://github.com/kongnet/openrarity
openRerity core algorithm JS implementation
100k tokens benchmark test
/* gen Collection items: 100,000 Rarity calc time: 651 ms -- Mac M2
{ v: 1.010524265698629, toeknId: 53076, rank: 1 }, { v: 1.009992300140172, toeknId: 10548, rank: 2 }, '.....', { v: 0.9894947869513546, toeknId: 44396, rank: 100000 } */
@gregorym When you say CLI , what do you mean? CLI +Docker container that is running locally or some other architecture in mind?
Is this still on the roadmap? Would love to implement in a web app
Yes , absolutely. The team is heads down implementing the TS version of the OpenRarity library. @dadashi to comment on this
@HIT2022 yes we're actively working on this. Can you speak more to how you plan on using it in your web app? Are you planning to use it in the browser or backend?
+1
Absolutely looking for this and eagerly waiting for a first party implementation (to avoid deviations).
Target use case is both for using in browser as well as in ts scripts to generate rarity of unreleased collections.
Edit: Happy to beta test a version or provide feedback on API implementation if necessary!
Any updates on the JS version?
👀 gm gm