You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@dfinity/identity

Package Overview
Dependencies
Maintainers
11
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/identity - npm Package Versions

2345
9

3.0.0

Diff
b
bitdivine
published 3.0.0 •

Changelog

Source

[3.0.0] - 2025-07-17

n
nathan.mcgrath.dfinity
published 3.0.0-beta.4 •

Changelog

Source

[3.0.0-beta.4] - 2025-07-17

Changed

  • chore: replaces ts-node with pnpm dlx tsx for version management scripts
  • chore: updates the version script to work with new pnpm workspaces
  • feat: removes the watermark checks when checking query responses. Now the agent checks if the node signature is not older than the ingressExpiryInMinutes option (taking into account the clock drift).
  • fix: always account for the clock drift when calculating the ingress expiry.
  • fix: AuthClient.create's options now have an additional loginOptions optional parameter, which is merged with the options passed to login when calling it.
  • fix: handle BigInt values when instantiating the buffer in lebEncode and slebEncode from @dfinity/candid. As a result, @dfinity/candid now correctly encodes large bigints as Nat values.
  • fix: make .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).

Added

  • feat: Starlight documentation website, with custom plugin for typedoc
n
nathan.mcgrath.dfinity
published 3.0.0-beta.3 •
k
krpeacock
published 3.0.0-beta.2 •
n
nathan.mcgrath.dfinity
published 3.0.0-beta.1 •

Changelog

Source

[3.0.0-beta.1] - 2025-06-19

Changed

  • chore: update @noble/* dependencies
  • fix: mark @noble/hashes as a dependency rather than a dev dependency
k
krpeacock
published 3.0.0-beta.0 •

Changelog

Source

[3.0.0-beta.0] - 2025-06-17

Changed

  • 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.

    • pollForResponse now moves strategy, request, and preSignReadStateRequest to the options: PollingOptions object
    • new export: PollingOptions type
    • Actor also includes a pollingOptions object that can be passed to the actor function and will be passed to the pollForResponse method
  • feat!: 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

    • This means we now follow the Candid spec more closely, and reduces the risk of calling services with the wrong argument types
  • fix: retry requests that fail due to a malformed response body

b
bitdivine
published 2.4.1 •

Changelog

Source

[2.4.1] - 2025-04-10

Changed

  • fix: fixes a bug in Ed25519KeyIdentity toRaw where the output was not an ArrayBuffer
  • test: fixes e2e tests for compatibility with dfx 0.26.0 and pocket-ic by querying for the default_effective_canister_id before calling the management canister
  • fix: fixes a bug in the Ed25519KeyIdentity verify implementation where the argument order was incorrect
  • fix: fixes a bug in the Principal library where the management canister id util was incorrectly importing using fromHex
  • feat: change auth-client's default identity provider url
b
bitdivine
published 2.4.0 •

Changelog

Source

[2.4.0] - 2025-03-24

Changed

  • chore: changes trap e2e test to check for the response "trapping". Resolves a discrepancy with the replica response introduced in dfx 0.25.1
  • fix: Bring Candid decoding of opt types up to Candid spec: In particular, when decoding at an opt type:
    • If the wire type is an opt type, decode its payload at the expected content type (as before).
    • Allow decoding null wire type as IDL value null (i.e. JS []).
    • Allow decoding of value of reserved wire type, defaulting to IDL value null (i.e. JS []).
    • Allow decoding of wider variant type on the wire at narrower expected variant type, provided the decoded value is valid at the expected variant type. Otherwise, default to null (i.e. JS []).
    • Otherwise:
      • If the expected content type is null or reserved or (nested) opt, return IDL value null (i.e. JS []).
      • The expected content type is neither 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 []).

Added

  • feat: refactor nonce logic to prioritize options and ensure compatibility with ArrayBuffer and Uint8Array
  • test: added e2e test for CanisterStatus requesting a subnet path, as a reference for getting the subnet id of a given canister id
k
krpeacock
published 2.2.1 •

Changelog

Source

[2.2.1] - 2025-02-07

Changed

  • fix: reverts read_state polling expiry changes due to mismatched signature introduced in 2.1.3. Polling will re-use the original request as before, up to the point where the request expires
b
bitdivine
published 2.3.0 •

Changelog

Source

[2.3.0] - 2025-02-07

Added

  • shouldFetchRootKey option added to HttpAgent constructor
  • ci: adds BOT_APPROVED_FILES config

Changed

  • feat: HttpAgent uses anonymous identity to make syncTime call, which can allow readState calls to work beyond 5 minutes
  • chore: bumps .nvmrc and nodejs version in CI to 22
  • HttpAgent now awaits fetching rootkey before making network calls if shouldFetchRootKey is set
  • chore: npm audit fixes
  • feat: enhanced details in agent call, query, and read_state errors
    • error now includes hex encoded response, requestId, sender_pubkey, and sender_sig in addition to message for improved debugging process
2345
9