Class: Skyfall::Firehose::IdentityMessage
- Defined in:
- lib/skyfall/firehose/identity_message.rb
Overview
Firehose message sent when a new DID is created or when the details of someone’s DID document are changed (usually either a handle change or a migration to a different PDS). The message may include currently assigned handle, though it’s not required that this field is set.
Note: the message is originally emitted from the account’s PDS and is passed as is by relays, which means you can’t fully trust that the handle is actually correctly assigned to the DID and verified by DNS or well-known. To confirm that, use DID.resolve_handle from [DIDKit](ruby.sdk.blue/didkit/).
Instance Attribute Summary collapse
-
#handle ⇒ String?
readonly
Current handle assigned to the DID.
Attributes inherited from Message
#data_object, #did, #seq, #type, #type_object
Instance Method Summary collapse
-
#initialize(type_object, data_object) ⇒ IdentityMessage
constructor
A new instance of IdentityMessage.
Methods inherited from Message
#inspect, new, #operations, #time, #unknown?
Constructor Details
#initialize(type_object, data_object) ⇒ IdentityMessage
Returns a new instance of IdentityMessage.
27 28 29 30 31 32 |
# File 'lib/skyfall/firehose/identity_message.rb', line 27 def initialize(type_object, data_object) super check_if_not_nil 'seq', 'did', 'time' @handle = @data_object['handle'] end |
Instance Attribute Details
#handle ⇒ String? (readonly)
Returns current handle assigned to the DID.
35 36 37 |
# File 'lib/skyfall/firehose/identity_message.rb', line 35 def handle @handle end |