Module: DIDKit
- Defined in:
- lib/didkit/plc_importer.rb,
lib/didkit.rb,
lib/didkit/did.rb,
lib/didkit/errors.rb,
lib/didkit/version.rb,
lib/didkit/document.rb,
lib/didkit/requests.rb,
lib/didkit/resolver.rb,
lib/didkit/services.rb,
lib/didkit/constants.rb,
lib/didkit/at_handles.rb,
lib/didkit/public_key.rb,
lib/didkit/plc_operation.rb,
lib/didkit/service_record.rb
Overview
NOTE: this class is pending a rewrite to handle updated plc.directory APIs. Things will change here in v. 0.6.
Defined Under Namespace
Modules: AtHandles, Requests, Services Classes: APIError, DID, DIDError, Document, FormatError, PLCImporter, PLCOperation, PublicKey, PublicKeyError, Resolver, ServiceRecord
Constant Summary collapse
- VERSION =
"0.5.0"- DEFAULT_PLC_DIRECTORY =
URL of the standard PLC directory service.
'https://plc.directory'- HANDLE_REGEXP =
Pattern that matches any valid ATProto handle (without @)
/\A(#{DOMAIN_SEGMENT}\.)+#{LAST_DOMAIN_SEGMENT}\z/- DID_PLC_REGEXP =
Pattern that matches any valid did:plc DID
/\Adid\:plc\:[abcdefghijklmnopqrstuvwxyz234567]{24}\z/- DID_WEB_REGEXP =
Pattern that matches a percent-decoded did:web DID
/\Adid\:web\:((#{DOMAIN_SEGMENT}\.)+#{LAST_DOMAIN_SEGMENT}|localhost(:[1-9][0-9]{0,4})?)\z/- GENERIC_DID_REGEXP =
Pattern that matches any valid DID (including methods unsupported in ATProto)
/\Adid:[a-z]+:[a-zA-Z0-9_\.\:\%\-]*[a-zA-Z0-9_\.\-]\z/- MAX_DID_LENGTH =
Maximum allowed DID length in ATProto
2048- MAX_HANDLE_LENGTH =
Maximum allowed handle length in ATProto
253- RESERVED_DOMAINS =
TLDs that are not allowed in ATProto handles
%w(alt arpa example internal invalid local localhost onion test)
Class Attribute Summary collapse
Class Attribute Details
.default_resolver ⇒ DIDKit::Resolver
18 19 20 |
# File 'lib/didkit/resolver.rb', line 18 def default_resolver @default_resolver ||= Resolver.new end |