Agent-JS Beta Release - v3.0.0-beta.0

Big changes coming to Agent JS! We’d love for you to test them out before they go live.

You can install and test the beta versions with

npm install --save @dfinity/agent@beta

or

npm install --save @dfinity/agent@3.0.0-beta.0

Many thanks to @ilbert and @NathanosDev, this release will be the biggest reduction in tech debt in the agent since Genesis, and brings the JS agent into closer compliance with the IC Specification and will behave more closely to the Rust agent. And there’s more to come soon!

Breaking changes:

  • Removes the management canister in favor of @dfinity/ic-management
  • changes all interfaces to Uint8Array<ArrayBuffer> instead of a mix of ArrayBuffer and Uint8Array
  • Replaces buffer methods with exports from @noble/hashes
  • Finally removes BigNumber and Buffer in favor of @NathanosDev’s new cbor library :tada:
    • includes up to a 50% bundle size reduction!
  • Big changes to our errors to be more typesafe and legible
  • A new syncTime strategy that’s safe enough we can do it by default (no more ingress_expiry) errors

And more!

See the full changelog at:

22 Likes

For anyone interested:

8 Likes

nice!! guys, let’s give it a try!

2 Likes

Exciting, congrats for so many improvements @ilbert @NathanosDev, will try to update and be on the lookout for errors then :+1:

2 Likes

We’ve released the new beta version 3.0.0-beta.1 for all the Agent JS packages. Please consider upgrading to this version if you’re testing the beta.

Thanks to @hpeebles for spotting the bug in the @dfinity/identity’s package dependencies.

See the full changelog at:

2 Likes

Great job! You saved the best change for last :sweat_smile:

Out of curiosity, how is that a breaking change?

2 Likes

It’s a change in the error handling behavior and to the original sync time implementation

1 Like

v3 is officially out! Check out the announcement: ICP JavaScript SDK v3.0.0 is released!

1 Like