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

request: Create a small SDK / package to simplify interactions #526

Closed
RezaRahemtola opened this issue Jun 27, 2024 · 9 comments
Closed
Labels
good first issue Good for newcomers

Comments

@RezaRahemtola
Copy link

The documentation is great to integrate Adena in an application, but some things are missing imo, like the type of the response.
For example here, only a sample response and a broad response type is specified (no way to know that ALREADY_CONNECTED is a potential type for example, except by testing locally).

The documentation could be improved, but the best thing would be to have an NPM package with some methods and types already included, because now I noticed that when building a project pretty much everyone (myself included) copies an existing implementation like this one: https://github.com/gnolang/memeland/blob/main/ui/src/services/adena/adena.ts
that already contains all the types and methods required.
Having this in an "official" NPM package would be easier (especially if some implementation details change, people will just have to update their package version).

Would be happy to help on this if needed ;)

@agherasie
Copy link

I second this !
and would also be happy to help if needed !

@leohhhn
Copy link

leohhhn commented Jul 8, 2024

@dongwon8247 @adr-sk What do you guys think about this?

@dongwon8247
Copy link
Member

@RezaRahemtola Thank you for opening an issue! This is on our to-do list after the launch of testnet4 next week. We were also thinking of including a social login provider in Adena's SDK so that dapps can provide various methods for signing.

For the issues you raised - We will improve the documentation, but for the official NPM package, it would be great if we could invite you guys (@RezaRahemtola @agherasie) to work on this together with us. Do you have a suggestion for where to start?

@RezaRahemtola
Copy link
Author

Do you have a suggestion for where to start?

Probably having a small package with the types of all the methods, that anybody could use instead of copying them from the docs into their app.
Then we can extend it by wrapping the entire method calls with error handling / typing / detection of window.adena etc

@dongwon8247 dongwon8247 added the good first issue Good for newcomers label Jul 15, 2024
@RezaRahemtola
Copy link
Author

Hey @dongwon8247, just made this if you want to take a look and discuss how we can improve it!
https://github.com/RezaRahemtola/adena-sdk-ts

@jinoosss
Copy link
Member

Awesome job ! @RezaRahemtola

It's intuitive and easy to use.
We will improve the SDK and make it officially available.
We can unify the responses and errors in the Adena wallet through the SDK.

There are a few features that I think could be added to the SDK.

  • Define error types
  • Method responses and error handling
  • Providers for managing wallet state
  • Type checker and parser utilities

I'll create an SDK repository.
Can you create a PR for the repository?

After that, let's work on improvements.

@jinoosss
Copy link
Member

Hey @RezaRahemtola ,
We created the adean-wallet-sdk repository.
We built it as a monorepo and want to add it to the packages/sdk project.

@RezaRahemtola
Copy link
Author

Hey @RezaRahemtola , We created the adean-wallet-sdk repository. We built it as a monorepo and want to add it to the packages/sdk project.

Here it is: onbloc/adena-wallet-sdk#1
Sorry for the delay I was working on something else. Happy to discuss future improvements of this!

@RezaRahemtola
Copy link
Author

I think we can close this and discuss further improvements on the new repository ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants