Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate the product on Javascript #53

Open
richawo opened this issue Sep 15, 2022 · 23 comments
Open

Replicate the product on Javascript #53

richawo opened this issue Sep 15, 2022 · 23 comments
Assignees
Labels
enhancement New feature or request

Comments

@richawo
Copy link

richawo commented Sep 15, 2022

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

@richawo richawo added the enhancement New feature or request label Sep 15, 2022
@impreso
Copy link
Contributor

impreso commented Sep 15, 2022

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?

@samstr
Copy link

samstr commented Sep 18, 2022

A TypeScript release would be amazing. I intend to use this on Rareboy.com

@emorling
Copy link

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?

@impreso
Copy link
Contributor

impreso commented Sep 19, 2022

While we are researching Node/JS support, will cloud endpoint API suffice your needs @emorling @samstr @RichardAwoyemi ?

@emorling
Copy link

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?

@impreso
Copy link
Contributor

impreso commented Sep 20, 2022

@emorling no metadata needed for this particular endpoint

@samstr
Copy link

samstr commented Sep 20, 2022

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?

@impreso
Copy link
Contributor

impreso commented Sep 20, 2022

@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.

@jeevanpillay0000
Copy link

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.

@impreso
Copy link
Contributor

impreso commented Sep 24, 2022

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?

@emorling
Copy link

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

@richawo
Copy link
Author

richawo commented Sep 24, 2022

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.

@gregorym
Copy link

If you offered a CLI rather than an SDK for each language that would be the best IMO.

@emorling
Copy link

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.

@gregorym
Copy link

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.

@kongnet
Copy link

kongnet commented Sep 26, 2022

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 }
*/

@impreso
Copy link
Contributor

impreso commented Sep 27, 2022

@gregorym When you say CLI , what do you mean? CLI +Docker container that is running locally or some other architecture in mind?

@HIT2022
Copy link

HIT2022 commented Oct 19, 2022

Is this still on the roadmap? Would love to implement in a web app

@impreso
Copy link
Contributor

impreso commented Oct 20, 2022

Yes , absolutely. The team is heads down implementing the TS version of the OpenRarity library. @dadashi to comment on this

@dadashi
Copy link
Collaborator

dadashi commented Oct 21, 2022

@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?

@akshatmittal
Copy link

akshatmittal commented Oct 27, 2022

+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!

@danielmedvec
Copy link

Any updates on the JS version?

@vikiival
Copy link

👀 gm gm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests