fn attribute_and_id(
            identity: &T::AccountId,
            name: &[u8],
        ) -> Option<AttributedId<T::BlockNumber, <<T as Config>::Time as Time>::Moment>> {
            let nonce = Self::nonce_of((&identity, name.to_vec()));
    
            // Used for first time attribute creation
            let lookup_nonce = match nonce {
                0u64 => 0u64,
                _ => nonce - 1u64,
            };
    
            // Looks up for the existing attribute.
            // Needs to use actual attribute nonce -1.
            let id = (&identity, name, lookup_nonce).using_encoded(blake2_256);
    
            if <AttributeOf<T>>::contains_key((&identity, &id)) {
                Some((Self::attribute_of((identity, id)), id))
            } else {
                None
            }
        }
//  Returns the attribute and its hash identifier  
//  Uses a nonce to keep track of identifier making them unique after attribute deletion
Returns the attribute and its hash identifier
Uses a nonce to keep track of identifier making them unique after attribute deletion
Returns the attribute and its hash identifier Uses a nonce to keep track of identifier making them unique after attribute deletion
fn attribute_and_id(
            identity: &T::AccountId,
            name: &[u8],
        ) -> Option<AttributedId<T::BlockNumber, <<T as Config>::Time as Time>::Moment>> {
            let nonce = Self::nonce_of((&identity, name.to_vec()));
            // Used for first time attribute creation
            let lookup_nonce = match nonce {
                0u64 => 0u64,
                _ => nonce - 1u64,
            };
            // Looks up for the existing attribute.
            // Needs to use actual attribute nonce -1.
            let id = (&identity, name, lookup_nonce).using_encoded(blake2_256);
            if <AttributeOf<T>>::contains_key((&identity, &id)) {
                Some((Self::attribute_of((identity, id)), id))
            } else {
                None
            }
        }
fn attribute_and_id ( identity : & T :: AccountId , name : & [ u8 ] , ) -> Option < AttributedId < T :: BlockNumber , < < T as Config > :: Time as Time > :: Moment > > { let nonce = Self :: nonce_of ( ( & identity , name . to_vec ( ) ) ) ; // Used for first time attribute creation let lookup_nonce = match nonce { 0u64 => 0u64 , _ => nonce - 1u64 , } ; // Looks up for the existing attribute. // Needs to use actual attribute nonce -1. let id = ( & identity , name , lookup_nonce ) . using_encoded ( blake2_256 ) ; if < AttributeOf < T > > :: contains_key ( ( & identity , & id ) ) { Some ( ( Self :: attribute_of ( ( identity , id ) ) , id ) ) } else { None } }
Returns the attribute and its hash identifier
Uses a nonce to keep track of identifier making them unique after attribute deletion
Returns the attribute and its hash identifier Uses a nonce to keep track of identifier making them unique after attribute deletion
identity
&T::AccountId
name
&[u8]
identity
&T::AccountId
name
&[u8]