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

web3.js Roadmap – July 2022 – Discussion thread #26342

Closed
steveluscher opened this issue Jun 30, 2022 · 8 comments
Closed

web3.js Roadmap – July 2022 – Discussion thread #26342

steveluscher opened this issue Jun 30, 2022 · 8 comments

Comments

@steveluscher
Copy link
Contributor

What do you want to see accomplished in @solana/web3.js in the month of July 2022?

Milestone: https://github.com/solana-labs/solana/milestone/198

@beeman
Copy link
Contributor

beeman commented Jul 1, 2022

Improve browser DX for @solana/web3.js

It would be great if we could improve compatibility with running @solana/web3.js in the browser like so:

<script type="module" >
  import { Connection, Keypair, clusterApiUrl } from "https://unpkg.com/@solana/web3.js"
 
  const kp = Keypair.generate()
  const conn = new Connection(clusterApiUrl('devnet'))
</script>

Example here

It might be easier to aim at making it work with Skypack:

<script type="module" >
  import { Connection, Keypair, clusterApiUrl } from "https://cdn.skypack.dev/@solana/web3.js"
 
  const kp = Keypair.generate()
  const conn = new Connection(clusterApiUrl('devnet'))
</script>

Example here

SkyPack seems to fail on uuid4 that's a dependency of jayson:
image

If it's hard to fix these upstream deps another option might be to ship a fatter bundle that includes some of the deps. By far not ideal (and basically the opposite of solana-labs/solana-web3.js#1122) but it would make Solana work on platforms without a build step (no-code solutions, CMS, web-based IDEs, etc).

@beeman
Copy link
Contributor

beeman commented Jul 1, 2022

Support for mnemonic phrases

Currently, any application that wants to support mnemonic phrases needs to look at how others implement this to maintain compatibility with the rest of the ecosystem.

It would be good to standardize this and implement it in an official Solana library like @solana/keypair (possibly together with the other Keypair classes).

@steveluscher
Copy link
Contributor Author

Created issue to address browser bundles: #26371.

@beeman
Copy link
Contributor

beeman commented Jul 4, 2022

Serialize lastValidBlockHeight on Transaction

The lastValidBlockHeight property is not serialized on the Transaction object.

I would expect this to pass when added here

expect(deserializedTransaction.lastValidBlockHeight).to.eql(9999);

I looked at adding it but it doesn't seem trivial. I'm also not sure what we lose in not having that property being de-serialized on the API.

@steveluscher
Copy link
Contributor Author

Serialize lastValidBlockHeight on Transaction

There is a set of unfortunate properties on Transaction that:

  1. Only exist because sendAndConfirmTransaction() wants them,
  2. Should not be there.

These are properties like lastValidBlockHeight and minContextSlot. They are ultimately ‘transaction confirmation’ details, and don't belong on the transaction object.

We should have made sendAndConfirmTransaction take both a transaction and confirmation params, but alas, we'll have to wait for solana-labs/solana-web3.js#1111.

@steveluscher
Copy link
Contributor Author

Support for mnemonic phrases

Before this discussion thread gets closed out @beeman, do you want to move this into a GitHub issue? I don't know exactly where this should live, or if it should be Solana Labs Official™, but I don't want the thought to be lost as July turns to August.

@steveluscher
Copy link
Contributor Author

That's a wrap on July! Onward to August. https://github.com/solana-labs/solana/milestone/199.

@beeman
Copy link
Contributor

beeman commented Aug 1, 2022

Serialize lastValidBlockHeight on Transaction

There is a set of unfortunate properties on Transaction that:

1. Only exist because `sendAndConfirmTransaction()` wants them,

2. Should not be there.

These are properties like lastValidBlockHeight and minContextSlot. They are ultimately ‘transaction confirmation’ details, and don't belong on the transaction object.

We should have made sendAndConfirmTransaction take both a transaction and confirmation params, but alas, we'll have to wait for solana-labs/solana-web3.js#1111.

Ok, that makes sense. In that case, I'll keep on sending lastValidBlockHeight to the backend separately instead of serializing.

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

No branches or pull requests

2 participants