We have released v5.0.0 of the ICP JavaScript SDK Core library. This major release focuses on consolidating the @icp-sdk/core package and improving it.
For detailed upgrading instructions and information about the new features, see our V5 Upgrading Guide.
What’s New
New API versions
Agent now uses the latest IC API endpoints: /api/v4 for calls and /api/v3 for queries/read_state.
Local replica upgrade required
Use dfx >=v0.30.1 or PocketIC >=v11.0.0 or pic-js >=v0.17.0.
Peer dependencies removed
The @dfinity/{agent,candid,identity,identity-secp256k1,principal} packages are no longer peer dependencies. Remove them before upgrading the core package.
Refer to the upgrading guide for more details.
The source code of the @dfinity/{agent,candid,identity,identity-secp256k1,principal} packages has also been removed from the dfinity/icp-js-core repo.
New Certificate Utility functions
We’ve added some functions to send read_state requests to subnets using the /api/v3/subnet/<effective_subnet_id>/read_state endpoint and extract data from the certificate returned by the endpoint.
Take a look at the New Features section of the upgrading guide for more details.
Minor security improvements
query and read_state response validation has been improved, strengthening certificate verification and query/read_state signature checks.
The Changelog contains a full list of all the fixes.
Packages Deprecation
This release allows us to deprecate the following packages.
@dfinity/auth-client
The @dfinity/auth-client package has been deprecated. Please migrate to @icp-sdk/auth, which version has also been upgraded to use @icp-sdk/core v5.
@dfinity/assets
The @dfinity/assets package has been deprecated. Its functionality is now part of @icp-sdk/canisters, which version has also been upgraded to use @icp-sdk/core v5.
Future Work
- Continued improvements to the developer experience and the docs
- Deprecation of the
@dfinity/agent,@dfinity/candid,@dfinity/identity,@dfinity/identity-secp256k1and@dfinity/principalpackages