Skip to content

Releases: anza-xyz/kit

v2.1.0

28 Feb 18:14
a164c87
Compare
Choose a tag to compare

2.1.0 (2024-02-27)

🎉 @solana/kit is the new name for the 2.x line of @solana/web3.js.

This should make it easier to adopt in projects that will continue to depend on the legacy 1.x line of web3.js for the time being. It will also prevent confusion for new developers who might install the 2.x line while following a legacy 1.x tutorial.

In time, more guide-based content will be released; in the meantime take a look at the READMEs, the examples/ directory, and https://tsdocs.dev/docs/@solana/kit. If you have questions, please post at https://sola.na/sse.

@solana/[email protected]

Minor Changes

  • #117 0c577eb Thanks @beeman! - Add getPublicKeyFromAddress to derive public keys from addresses

Patch Changes

@solana/[email protected]

Minor Changes

  • 5af7f20 Thanks @steveluscher! - When the HTTP transport throws an error, you can now access the response headers through e.context.headers. This can be useful, for instance, if the HTTP error is a 429 Rate Limit error, and the response contains a Retry-After header.

    try {
        const { value: latestBlockhash } = await rpc.getLatestBlockhash().send();
    } catch (e) {
        if (isSolanaError(e, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR)) {
            if (e.context.code === 429 /* rate limit error */) {
                const retryAfterHeaderValue = e.context.headers.get('Retry-After');
                if (retryAfterHeaderValue != null) {
                    // ...
                }
            }
        }
    }

Patch Changes

  • 1adf435 Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via the engines field, including the one in the root of the pnpm workspace, and engine-strictness is delegated to the .npmrc files.

  • #130 c7b7dd9 Thanks @lorisleiva! - Gracefully handle JSON RPC errors that do not provide a code attribute in their response

  • 704d8a2 Thanks @mcintyre94! - Change data field of transaction message instructions to use ReadonlyUint8Array

@solana/[email protected]

Minor Changes

  • 5af7f20 Thanks @steveluscher! - When the HTTP transport throws an error, you can now access the response headers through e.context.headers. This can be useful, for instance, if the HTTP error is a 429 Rate Limit error, and the response contains a Retry-After header.

    try {
        const { value: latestBlockhash } = await rpc.getLatestBlockhash().send();
    } catch (e) {
        if (isSolanaError(e, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR)) {
            if (e.context.code === 429 /* rate limit error */) {
                const retryAfterHeaderValue = e.context.headers.get('Retry-After');
                if (retryAfterHeaderValue != null) {
                    // ...
                }
            }
        }
    }

Patch Changes

@solana/[email protected]

Minor Changes

  • c880687 Thanks @steveluscher! - Removed the fees sysvar which has been disabled on the network for a year, and has now been removed from the test validator in Agave 2.0

    % solana feature status JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG
    Feature                                      | Status                  | Activation Slot | Description
    JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG | active since epoch 483  | 208656004       | disable fees sysvar
    

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

  • 1adf435 Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via the engines field, including the one in the root of the pnpm workspace, and engine-strictness is delegated to the .npmrc files.

  • Updated dependencies [1adf435, [c7b7dd9](https://github.c...

Read more