What's Changed
FetchRootKey
- refactors logic so that fetchrootkey is awaited before the first async call is made if
shouldFetchRootKey
is 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