File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ impl DidDocument {
3939 pub fn get_pds_endpoint ( & self ) -> Option < String > {
4040 self . get_service_endpoint ( "#atproto_pds" , "AtprotoPersonalDataServer" )
4141 }
42+ pub fn get_feed_gen_endpoint ( & self ) -> Option < String > {
43+ self . get_service_endpoint ( "#bsky_fg" , "BskyFeedGenerator" )
44+ }
45+ pub fn get_notif_endpoint ( & self ) -> Option < String > {
46+ self . get_service_endpoint ( "#bsky_notif" , "BskyNotificationService" )
47+ }
4248 fn get_service_endpoint ( & self , id : & str , r#type : & str ) -> Option < String > {
4349 let full_id = self . id . to_string ( ) + id;
4450 if let Some ( services) = & self . service {
@@ -62,4 +68,11 @@ impl DidDocument {
6268 } )
6369 . unwrap_or_default ( )
6470 }
71+ pub fn get_signing_key ( & self ) -> Option < & VerificationMethod > {
72+ self . verification_method . as_ref ( ) . and_then ( |methods| {
73+ methods. iter ( ) . find ( |method| {
74+ method. id == "#atproto" || method. id == format ! ( "{}#atproto" , self . id)
75+ } )
76+ } )
77+ }
6578}
You can’t perform that action at this time.
0 commit comments