Open ruuda opened 2 years ago
Also, the code in this repository is currently licensed under the GPLv3, but for a library that is not ideal, we should go with something permissive for this part.
We already have some of these features pulled together for Steakwallet.
What we could do is separate it out into an MIT based library and someone with more knowhow fills in the rest of the functions. The withdraw functionality is a little complicated, for example, which is what we're blocked on right now
A work in progress is in #478.
Summary
There are various parties interacting with Solido from javascript. Until now we just had a dump of some useful snippets on https://docs.solana.lido.fi/development/frontend-integration, but we can do much better than this by offering a library.
Details
We should offer the following functions:
Probably we should parametrize those functions over the addresses, and then also offer one constant that contains the official mainnet addresses.
An attempt at defining this, but I know nothing about Typescript so feel free to correct me here:
Open questions
We can put the thing in this repository. @hritique, I am not very familiar with the js ecosystem ... should we also upload a package to NPM or something?
Also, my impression is that Typescript is taking over, and a Typescript library can be used from js after compilation, right? So probably it is most useful to offer it in Typescript so users who are also using it get maximum type safety, but users who are using legacy js can still use it? I see
solana-web3
is also written in Typescript, so that would fit in nicely.