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

Where is the documentation of this project? #74

Open
thanpolas opened this issue Jan 22, 2025 · 13 comments
Open

Where is the documentation of this project? #74

thanpolas opened this issue Jan 22, 2025 · 13 comments
Labels
enhancement New feature or request

Comments

@thanpolas
Copy link

Overview

There is no documentation or migration path from 1.x to 2.x that I can find on the README or looking around the repository. Examples are not adequate.

Please let me know where i can find the documentation for 2.x and please please please link it to the top of README.

@thanpolas thanpolas added the bug Something isn't working label Jan 22, 2025
@steveluscher
Copy link
Collaborator

steveluscher commented Jan 23, 2025

It's all I'm working on; just a little while longer now.

In the meantime, if you can't wait and editor TypeScript hints (eg. Intellisense) aren't enough, you can make your own person documentation website by running this in the root directory:

pnpm i
pnpm typedoc
python3 -m http.server -d docs/

@steveluscher steveluscher added enhancement New feature or request and removed bug Something isn't working labels Jan 23, 2025
@romankurnovskii
Copy link

romankurnovskii commented Jan 28, 2025

@thanpolas , meantime I added some snippets I have changed
Although raydium and some other sdk's do not fully support solana v2 so far

@thanpolas
Copy link
Author

thank you all 🙏

@mcastrogg
Copy link

Docs please! spent to long looking for them lol

@lorisleiva
Copy link
Member

We are working on making the documentation easier to read via a dedicated website at the moment but most of the information is already available for you to read.

For each package inside this library, you will find a README that details all of the things you can do with that package. The Web3.js v2 library is merely a collection of all these packages.

For instance, if you want to get started with RPCs and send some HTTP request to them, you can find some documentation under the packages/rpc README. Do you need some ways of encoding/decoding data? Then check out the packages/codecs README.

I understand that this is not the most intuitive way to find this information at the moment — and we are working on that — but I just wanted to flag that this information currently exists.

@steveluscher
Copy link
Collaborator

While you wait, make use of this live documentation generator: https://tsdocs.dev/docs/@solana/web3.js/2.0.0/index.html

@OnkelTem
Copy link

@lorisleiva Sure we can read them. But examples don't have READMEs. So it's not clear what they are about.

Maybe there's a draft docs page we can check out for now? Currently it's not even clear how to create a basic connection, because there is nothing about "connections" in the library.

@OnkelTem
Copy link

@romankurnovskii Oh, I just discovered your page with snippets. Many thanks!

@steveluscher
Copy link
Collaborator

But examples don't have READMEs.

Be sure to take a look at the source code of the examples. Every single line is documented in detail, explaining what is being done at each step, and why.

@benjiqq
Copy link

benjiqq commented Mar 6, 2025

should I start using this in prod?
advantages over web3js?

readme has a lot of complex information I think those might be better in another markdown and focus readme on high level.

@steveluscher
Copy link
Collaborator

Many are, @benjiqq.

For questions, head over to https://sola.na/sse and we'll be happy to answer them in detail there.

What changes would you like to see to the READMEs?

@benjiqq
Copy link

benjiqq commented Mar 6, 2025

IMO: answers to more basics at the start eg

  • if i'm using web3js now should I look into migrating?
  • what stage is this project? (alpha, testing, production ready)

I would assume for most consumers fine details below are better in separate advanced doc

Tree-Shakability
Composable Internals
Modern JavaScript; Zero-Dependency
Functional Architecture
Custom RPC Transports
Sharding
Augmenting/Constraining the RPC API

@steveluscher
Copy link
Collaborator

advantages over web3js?

Don't miss this: solana-labs/solana-web3.js#1111. Also this: https://www.anza.xyz/blog/solana-web3-js-2-release-candidate

if i'm using web3js now should I look into migrating?

Yes.

what stage is this project? (alpha, testing, production ready)

This project is ready to use in production, the Release Candidate program having ended.

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

7 participants