Skip to content

DIDKit Changelog ​

[0.5.0] - 2026-10-26 ​

Breaking changes:

  • the ATProto DID spec now says that if there are multiple handles in a document, only the first one should be checked bi-directionally and the rest should be skipped:

    The first syntactically valid handle found in the ordered list is treated as the claimed handle, even if it fails to resolve bi-directionally. Any other handle URIs should be ignored.

    • the get_verified_handle algorithm has been updated to match this behavior
    • Resolver#first_verified_handle method has been removed
  • DIDKit::PLCImporter::PLC_SERVICE was moved to DIDKit::DEFAULT_PLC_DIRECTORY

  • DIDKit::DID::GENERIC_REGEXP was moved to DIDKit::GENERIC_DID_REGEXP

  • DIDKit::Resolver#nameserver has been changed to be read-only

  • DIDKit::Resolver#resolve_handle and DID.resolve_handle now verify the resolve handle bi-directionally, checking also if the matched DID has that handle assigned too; pass verify: false to skip this (default is true). This call can now raise an error if the DID document cannot be fetched.

Added:

  • added support for decoding public (signing) keys – Document#signing_key, PLCOperation#signing_key and DIDKit::PublicKey class
  • DIDKit::Resolver now accepts a :plc_directory option that lets you use a PLC mirror server instead of https://plc.directory
  • added a shared global DIDKit.default_resolver, used internally by DID & Document – you can reassign it to one configured with a custom DNS nameserver or PLC mirror
  • added support for PLC servers returning application/did+json content type instead of application/did+ld+json (the spec allows it and the replica server implementation does that)
  • added support for PLC servers returning services with IDs in the absolute format did:...#id instead of just #id
  • added DID#did_web_host, which returns the did:web host URL together with http(s):// and a port if included (only for localhost), and raises a DIDError if the DID is not a did:web; #web_domain renamed to #did_web_domain and kept with the old behavior, #web_domain added as an alias

Other:

  • more detailed validation of DID & handle strings and for service endpoint URLs
  • fixed DNS-based handle verification if there are multiple text chunks in a TXT record or multiple TXT records
  • make sure that handle verification is case-insensitive
  • the global DID alias is not reassigned if something else already defines it before DIDKit is loaded
  • fixed redirects to relative URLs, and disallowed redirects to non-HTTP URLs and from HTTPS to HTTP
  • fixed :max_redirects & :timeout options not being used when loading a DID document

[0.4.0] - 2026-07-02 ​

  • added #also_known_as separate from #handles in Document and PLCOperation, which stores the original array of strings as listed in the JSON, not filtered and not stripped of the at:// prefix
  • added PLCOperation#nullified?
  • added support for parsing handle and service fields from legacy (2022-23 era) :create PLC ops in PLCOperation
  • PLCImporter can be configured with a custom hostname of a PLC mirror to use instead of plc.directory
  • PLCImporter will no longer update cursor to local request time if an empty page is received, but will instead leave the cursor as is – local time might have some offset vs. server time if the clock isn't set right, and this could lead to skipped operations
  • in DID#account_status / account_active? / account_exists?, accept getRepoStatus endpoint returning responses with status 404 instead of 400 (since some PDS implementations do it this way)
  • tweaked parsing of services in Document and PLCOperation:
    1. Document raises format errors if the fields are missing or not of expected type (since this shouldn't happen)
    2. Document & PLCOperation silently ignore the service if its endpoint is not a valid URI (since this does happen)
    3. Removed ignore_errors / error_handler from PLCImporter, since because of 2) no expected errors are emitted outside PLCOperation

[0.3.3] - 2026-02-22 ​

  • fixed old FormatError classes mentioned in PLCImporter

[0.3.2] - 2026-02-15 ​

  • added YARD API documentation
  • marked some helper methods in requests.rb, at_handles.rb and DIDKit::Resolver as private
  • merged all "FormatErrors" into one DIDKit::FormatError
  • added frozen_string_literal directive everywhere to minimize garbage collection

[0.3.1] - 2025-12-19 ​

  • allow passing a DID string or object to #resolve_handle and just return that DID – so you can have a script that accepts either a handle or a DID, and passes the input to DID.resolve_handle without checking which one it is
  • allow passing another DID object to DID.new and return a copy of that DID
  • parse seq field in PLCOperation if included and expose it as a property
  • fixed some errors on Rubies older than 3.2 due to missing filter_map and URI#origin
  • PLCOperation verifies if the argument is a Hash

[0.3.0] - 2025-12-15 ​

Breaking changes:

  • removed DID#is_known_by_relay? – it doesn't work anymore, since relays are now non-archival and they expose almost no XRPC routes
  • renamed a few handle-related methods:
    • get_validated_handle -> get_verified_handle
    • pick_valid_handle -> first_verified_handle

Also:

  • added DID#account_status method, which checks getRepoStatus endpoint to tell if an account is active, deactivated, taken down etc.
  • added DID#account_active? helper (account_status == :active)
  • DID#account_exists? now calls getRepoStatus (via account_status, checking if it's not nil) instead of getLatestCommit
  • added DID#document which keeps a memoized copy of the document
  • added pds_host & labeler_host methods to PLCOperation and Document, which return the PDS/labeller address without the https://
  • added labeller_endpoint & labeller_host aliases for the double-L enjoyers :]
  • added PLCOperation#cid
  • PLCImporter now removes duplicate operations at the edge of pages returned from the /export API
  • rewritten some networking code – all classes now use Net::HTTP with consistent options instead of open-uri

[0.2.3] - 2024-07-02 ​

  • added a DID#get_audit_log method that fetches the PLC audit log for a DID
  • added a way to set an error handler in PLCImporter
  • reverted the change from 0.2.1 that added Ruby stdlib dependencies explicitly to the gemspec, since this causes more problems than it's worth
  • minor bug fixes

[0.2.2] - 2024-04-01 ​

  • added helpers for checking if a DID is known by (federated with) a relay or if the repo exists on its assigned PDS

[0.2.1] - 2024-03-26 ​

  • tweaked validations in Document and PLCOperation to make them more aligned with what might be expected
  • added Ruby stdlib dependencies explicitly to the gemspec

[0.2.0] - 2024-03-19 ​

  • added PLCImporter class, which lets you import operations from PLC in pages of 1000 through the "export" API
  • implemented parsing of all services from DID doc & operations, not only atproto_pds (specifically labeller endpoints)
  • allow setting the nameserver in Resolver initializer

[0.1.0] - 2024-03-12 ​

  • rejecting handles from disallowed domains like .arpa or .test
  • validating handles with the .well-known file having a trailing newline
  • validating handles with .well-known address returning a redirect
  • added #pick_valid_handle helper
  • allow overriding the nameserver for Resolv::DNS
  • other bug fixes

[0.0.4] - 2024-03-07 ​

  • extracted resolving code from DID to a new Resolver class (DID has helper methods to call the resolver)
  • added Resolver#get_validated_handle method to validate handles from the Document (+ helpers in DID in Document)
  • added timeout to #resolve_handle_by_well_known

[0.0.3] - 2024-03-06 ​

  • added Document#handles with handle info extracted from alsoKnownAs field
  • added validation of various fields of the DID document
  • added DID#resolved_by (:dns or :http)
  • added DID#did which returns the DID in a string form like to_s
  • added DID#web_domain which returns the domain part of a did:web
  • changed DID#type to be stored as a symbol

[0.0.2] - 2023-11-14 ​

  • fixed missing require
  • fixed some connection error handling

[0.0.1] - 2023-11-14 ​

Initial release:

  • resolving handle to DID via DNS or HTTP well-known
  • loading DID document via PLC or did:web well-known
  • extracting PDS endpoint field from the DID doc