@dfinity/identity
Advanced tools
Changelog
[3.0.0-beta.4] - 2025-07-17
pnpm dlx tsx
for version management scriptsingressExpiryInMinutes
option (taking into account the clock drift).AuthClient.create
's options now have an additional loginOptions
optional parameter, which is merged with the options passed to login
when calling it.lebEncode
and slebEncode
from @dfinity/candid
. As a result, @dfinity/candid
now correctly encodes large bigints as Nat
values..ts
extension required for all relative imports. This is required to avoid the "Module not found" error when importing the packages in Node.js (ESM).Changelog
[3.0.0-beta.1] - 2025-06-19
@noble/*
dependencies@noble/hashes
as a dependency rather than a dev dependencyChangelog
[3.0.0-beta.0] - 2025-06-17
chore!: removes management canister from @dfinity/agent in favor of @dfinity/ic-management
feat!: changes all @dfinity/candid interfaces to Uint8Array<ArrayBuffer>
instead of ArrayBuffer
to make the API more consistent.
feat!: replaces fromHex
, toHex
, concat
utils with bytesToHex
, hexToBytes
, and concatBytes
from @noble/hashes/utils
respectively, to take advantage of existing dependencies.
feat!: changes polling strategy for read_state
requests to support presigned requests. By default, read_state
requests will create a new signature with a new ingress expiry each time they are made. However, the new preSignReadStateRequest
will make one signature and use it for all polling requests. This is useful for hardware wallets or other external signing solutions that make signing cumbersome.
strategy
, request
, and preSignReadStateRequest
to the options: PollingOptions
objectPollingOptions
typepollingOptions
object that can be passed to the actor
function and will be passed to the pollForResponse
methodfeat!: removes the unused defaultAgent
global concept and the getDefaultAgent
function. The HttpAgent
constructor is now the only way to create an agent.
feat!: removes the ProxyAgent
class.
feat!: removes the following errors in favor of the new AgentError
:
AgentHTTPResponseError
AgentCallError
AgentQueryError
AgentReadStateError
CertificateVerificationError
ActorCallError
QueryCallRejectedError
UpdateCallRejectedError
The new AgentError
error uses the code
and kind
props to enable a better programmatic error handling.
feat!: refactors Expiry
class to use static factory methods and add JSON serialization/deserialization.
feat!: makes lookup_path
compliant with the IC Interface Specification. Renames the lookup
method of the Certificate
class into lookup_path
, for consistency.
feat!: removes the lookup_label
method from the Certificate
class.
feat!: replaces hash
with sha256
from @noble/hashes/sha2
to take advantage of existing dependencies
chore!: drops support for Node.js v19 or lower, and Node.js v21
chore: removes unused bs58check
dependency from @dfinity/identity-secp256k1
fix: AuthClient isAuthenticated
now correctly returns false if the delegation chain is invalid; eg: expired session
feat: introduces the lookup_subtree
standalone function and Certificate
class method.
chore: formatting files and changelog
test: removes backwards comatibility test for Actor
with v1
HttpAgent due to breaking interface changes.
fix: Check subtyping relationship when decoding function or service references
fix: retry requests that fail due to a malformed response body
Changelog
[2.4.1] - 2025-04-10
toRaw
where the output was not an ArrayBufferpocket-ic
by querying for the default_effective_canister_id
before calling the management canisterPrincipal
library where the management canister id util was incorrectly importing using fromHex
Changelog
[2.4.0] - 2025-03-24
opt
types up to Candid spec:
In particular, when decoding at an opt
type:
opt
type, decode its payload at the expected content type
(as before).null
wire type as IDL value null
(i.e. JS []
).reserved
wire type, defaulting to IDL value null
(i.e. JS []
).null
(i.e. JS []
).null
or reserved
or (nested) opt
, return IDL value null
(i.e. JS []
).null
, reserved
or nested opt
:
allow decoding of the non-optioned value v
as opt v
(JS [v*]
) if compatible with
the expected content type; if incompatible, return IDL value null
(JS []
).Changelog
[2.2.1] - 2025-02-07
Changelog
[2.3.0] - 2025-02-07
HttpAgent
constructorshouldFetchRootKey
is set