Steven Luscher

Results 228 comments of Steven Luscher

This is our [Solana-wide Prettier config](https://github.com/solana-labs/prettier-config-solana). I hate it too, but I didn't get here early enough to have a say. See also https://github.com/solana-labs/eslint-config-solana. In any case, your suggestions belong...

I'm a huge fan of making Node LTS+ the requirement, I added this in few packages but seem to have missed some others. ```json "engine": { "node": ">=17.4" }, ```...

When you try to use `generateKeyPair()` in the new library, the error message tells you to install and import `@solana/webcrypto-ed25519-polyfill`. https://github.com/solana-labs/solana-web3.js/blob/7adc22b1a57cff867d2f735301725dc6384c3e5e/packages/assertions/src/subtle-crypto.ts#L46-L56

I've put up a PR that does this, but I don't think it's going to be particularly useful. The `engines` field doesn't prevent anyone from installing this library, even if...

We now have first-class `SolanaErrors` being thrown for custom program errors. ```ts try { // Something. } catch (e) { if (isSolanaError(e, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE)) { // Now TypeScript knows that you...

Errors are so much better now in the 2.0 line of web3.js, and the addition of `isProgramError()` [here](https://github.com/solana-labs/solana-web3.js/tree/7b90a8dbd19978f4c145c7ecb1625618b2c715fe/packages/programs#isprogramerror) rounds it out. Specifically, addressing the use case in your original post...

Using `isSolanaError()` you can disambiguate between network errors and other kinds of errors. ```ts try { const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); } catch(e) { if (isSolanaError(e, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR))...

I've started to have a few second thoughts here. 1. Responsibly removing these methods would require a major version bump, which would take legacy web3.js to 2.0. 2. The new...

Hey @sekaieth; you can follow along with the Release Candidates [here](https://github.com/solana-labs/solana-web3.js/releases/tag/v2.0.0-rc.1). It's looking like the final will come shortly after Solana Breakpoint this year.