Releases: dfinity/icp-js-core
v3.0.0-beta.1
What's Changed
- fix: mark
@noble/hashesas a dependency rather than a dev dependency by @hpeebles in #1034 - chore: update
@noble/*dependencies by @ilbertt in #1035 - chore: release 3.0.0 beta.1 by @nathanosdev in #1036
Full Changelog: v3.0.0-beta.0...v3.0.0-beta.1
v3.0.0-beta.0
What's Changed
- chore: npm audit fix by @krpeacock in #998
- feat!: removes proxyagent and getDefaultAgent exports by @krpeacock in #992
- chore: formatting files and changelog by @krpeacock in #999
- ci: ubuntu latest for unit tests by @krpeacock in #1003
- test: cover invalid tree leaf structure case in
lookup_pathby @ilbertt in #1001 - style: fix linter errors and commands by @ilbertt in #1002
- fix: checks subtyping relation when decoding reference types in Candid by @christoph-dfinity in #994
- refactor: use new error system and error codes by @ilbertt in #1004
- feat!: breaking out readState into signed and unsigned by @krpeacock in #1000
- ci: node v22 for unit tests by @ilbertt in #1006
- feat!: use new error system in Agent and Actor by @ilbertt in #1005
- test: avoid skipping tests where possible, replace deprecated Jest assertions by @ilbertt in #1007
- feat!:
ExpiryJSON serialization and deserialization by @ilbertt in #1008 - feat:
isCertifiedflag on errors by @ilbertt in #1010 - feat!: make
lookup_pathcompliant with the spec and introducelookup_subtreeby @ilbertt in #1009 - chore: removes unused
bs58checkdependency from `@dfinity/identity-… by @krpeacock in #1013 - feat!: standardizes on uint8array for agent-js interfaces by @krpeacock in #1012
- fix: make isAuthenticated validate delegation expiry by @asabates-dfinity in #985
- refactor: remove unnecessary
uint8FromBufLikecalls by @ilbertt in #1017 - ci: prepare node action by @ilbertt in #1018
- feat: remove
base64-arraybufferdependency by @ilbertt in #1016 - feat!: replace
hashwithsha256from@noble/hashes/sha2to take advantage of existing dependencies by @ilbertt in #1019 - refactor: use
@noble/hashes/sha2consistently by @ilbertt in #1020 - feat!: replace
concatwithconcatBytesfrom@noble/hashes/utilsby @ilbertt in #1021 - refactor: use hex utils from
@noble/hashesby @ilbertt in #1022 - chore!: deprecate management canister by @krpeacock in #1023
- chore!: drop support for node v19 or lower, and for node v21 by @ilbertt in #1025
- refactor: update typescript config by @ilbertt in #1026
- ci: test docs builds by @ilbertt in #1029
- ci: use bundle command in size-limit action by @ilbertt in #1030
- fix: handle
response.arrayBuffer()throws in#requestAndRetryby @ilbertt in #1031 - feat: sync time with the network when an ingress expiry error was received by @nathanosdev in #1014
- test: re-add removed assertion by @nathanosdev in #1032
- feat: use new cbor library by @nathanosdev in #1015
New Contributors
- @ilbertt made their first contribution in #1001
- @christoph-dfinity made their first contribution in #994
- @asabates-dfinity made their first contribution in #985
Full Changelog: v2.4.1...v3.0.0-beta.0
Release 2.4.1
What's Changed
- chore: changes trap e2e test to check for the response "trapping" by @krpeacock in #986
- feat: Change auth-client's default identity provider url by @lmuntaner in #987
- fix: fixes a bug in the
Principallibrary where the management can… by @krpeacock in #990 - fix: fixes a bug in the Ed25519KeyIdentity verify implementation by @krpeacock in #991
- test: fixes e2e tests for compatibility with dfx 0.26.0 by @krpeacock in #996
- fix: fixes a bug in Ed25519KeyIdentity
toRawby @krpeacock in #995
Full Changelog: v2.4.0...v2.4.1
Release 2.4.0
What's Changed
- chore: release 2.2.1 by @krpeacock in #974
- test: added e2e test for CanisterStatus subnet path by @krpeacock in #978
- chore: npm audit updates by @krpeacock in #982
- fix: make IDL/Candid decoding of options spec compliant by @crusso in #981
- feat: allows httpagent.call to be provided with a nonce by @krpeacock in #983
New Contributors
Full Changelog: v2.3.0...v2.4.0
Release 2.3.0
What's Changed
FetchRootKey
- refactors logic so that fetchrootkey is awaited before the first async call is made if
shouldFetchRootKeyis set. This resolves potential race conditions during local development
ReadState Expiry Rollback
- rolls back an intermittent bug introduced in v2.1.3, where a re-used readstate request would be sent with a mismatching ingress_expiry for a re-used signature. Should reduce the frequency of Invalid Signature errors. An improved strategy will be released in a future update
SyncTime
- HttpAgent now uses an anonymous identity for syncTime calls, which the replica will allow to have an invalid ingress_expiry provided. This (at last) allows clients with clocks diverging by >5 minutes to sync their time with the replica and behave normally
Enhanced Errors
- HttpAgent Errors now include more useful information when thrown, including the signature, the request id, the public key, and a stack trace. The agent's ObservableLog utility is now also exported, and can be used for testing or independently. Reminder that the log exists! You can subscribe to events in the agent, and it is helpful for debugging
- chore: bumps .nvmrc by @krpeacock in #962
- feat: support allow list for canister logs in agent-js by @vincent-dfinity in #965
- chore: update the document. by @vincent-dfinity in #964
- chore: npm audit fixes by @krpeacock in #967
- feat: fetch root key before making calls by @krpeacock in #966
- feat: enhanced details in agent call errors by @krpeacock in #968
- feat: HttpAgent uses anonymous identity to make syncTime call by @krpeacock in #969
- feat: enhanced details in agent query and read_state errors by @krpeacock in #970
- fix: reverts read_state polling expiry changes by @krpeacock in #971
New Contributors
- @vincent-dfinity made their first contribution in #965
Full Changelog: v2.2.0...v2.3.0
Release 2.2.0
What's Changed
Minor stability and documentation changes.
Shouldn't lead to any issues when updating, but tagged as a minor version due to changing the return types in pollForResponse from any to undefined of #958 .
Last release planned for 2024 - see you all in the new year!
- feat: adds management canister support for canister snapshots by @krpeacock in #917
- chore: removes message warning in auth-client by @krpeacock in #948
- chore: update license file by @sesi200 in #949
- chore: update typo in README.md by @dfx-json in #947
- chore: npm audit fix, bumping cross-spawn by @krpeacock in #955
- feat: effective target canister ID for mgmt call by @peterpeterparker in #954
- fix: Make pollForResponse typesafe to avoid exceptions from unknown requests by @sea-snake in #958
- chore: pins nanoid dev dependency version to override warning by @krpeacock in #960
- build: fix @peculiar/webcrypto is no peer dependencies but dev dependencies by @peterpeterparker in #959
- feat: target_canister to be handled only for method install_chunked_code by @peterpeterparker in #957
- fix: JsDoc typo in DelegationIdentity class's
fromDelegationmethod by @georgiod9 in #951
New Contributors
- @sesi200 made their first contribution in #949
- @georgiod9 made their first contribution in #951
Full Changelog: v2.1.3...v2.2.0
Release 2.1.3
What's Changed
We have a couple fixes and some improvements to errors in this release.
Fixes
- Fixed an issue where
read_statepolling requests would fail after the initial expiry, but before the request was processed- This was an edge case for subnets under high load. The
read_stateis allowed to use a fresh ingress_expiry, sopollForResponseandretrylogic now uses this pattern
- This was an edge case for subnets under high load. The
- Added a check to handle a regression when calling the management canister using the new sync_call flow
Error handling
-
Fixed an issue where
reject_codeandreject_messageweren't passed correctly to the error in synchronous callrejectortrapresponses. -
new
ActorCallErrorclass -
AgentErrorandActorCallErrorsupportinstanceofchecks, as well as anameattribute that you can use for easier error handling- some old generic
Errors are now labeled more preciesely
- some old generic
-
chore: Correct the typo in
agent/src/actor.tsby @AlexV525 in #939 -
fix: trap and throw handling in v3 sync call by @krpeacock in #940
-
fix: read state with fresh expiry by @krpeacock in #938
-
test: automatically deploys trap canister if it doesn't exist yet dur… by @krpeacock in #942
-
chore: skip range check when the certificate comes from the management canister by @dfx-json in #945
-
feat: allow for setting HttpAgent ingress expiry using
ingressExpiryInMinutesoption by @krpeacock in #905 -
feat: improved assertion options for agent errors by @krpeacock in #908
New Contributors
Full Changelog: v2.1.2...v2.1.3
Release 2.1.2
What's Changed
- chore: revert "feat: allow option set agent replica time" by @dfx-json in #935
Full Changelog: v2.1.1...v2.1.2
Release 2.1.1
What's Changed
- feat(asset): add headers to StoreArgs by @chenyan-dfinity in #928
Full Changelog: v2.1.0...v2.1.1
Release 2.1.0
Noteworthy Features
This feature includes the v3 synchronous call API! Calls to mainnet are able to bypass polling using the new endpoint
The HttpAgent allows you to set and read replicaTime, which it will maintain information about in order to handle disagreements between the client and replica about time.
Fixes and improvements for the useAuthClient library
Other changes and enhancements
- chore: updating dependencies for elliptic advisory by @krpeacock in #912
- feat: management canister interface schnorr update by @krpeacock in #913
- feat: use-auth-client react hook by @krpeacock in #911
- docs: documentation and metadata for use-auth-client by @krpeacock in #914
- feat: ensure that seed phrase must produce a 64 byte seed by @krpeacock in #915
- feat: new option for setting rootKey during agent creation by @krpeacock in #918
- chore: npm audit by @krpeacock in #919
- fix: passing request correctly during pollForResponse Processing status by @krpeacock in #909
- feat: v3 api sync call by @krpeacock in #906
- docs: clarifies meaning of
effectiveCanisterIdinCallOptionsby @krpeacock in #920 - feat: exports polling utilities from
@dfinity/agentby @krpeacock in #921 - feat: multi-actor config by @krpeacock in #916
- feat: expose inner certificate in Certificate by @krpeacock in #925
- fix: build paths on use-auth-client by @pocesar in #922
- feat: allow option set agent replica time by @krpeacock in #923
- chore: awaits prettier formatting by @krpeacock in #926
New Contributors
Full Changelog: v2.0.0...v2.1.0