<s> import signedjson . sign <EOL> class AssociationSigner : <EOL> def __init__ ( self , sydent ) : <EOL> self . sydent = sydent <EOL> def signedThreePidAssociation ( self , assoc ) : <EOL> sgassoc = { '<STR_LIT>' : assoc . medium , <EOL> '<STR_LIT:address>' : assoc . address , <EOL> '<STR_LIT>' : assoc . mxid , <EOL> '<STR_LIT>' : assoc . ts , <EOL> '<STR_LIT>' : assoc . not_before , <EOL> '<STR_LIT>' : assoc . not_after <EOL> } <EOL> sgassoc . update ( assoc . extra_fields ) <EOL> sgassoc = signedjson . sign . sign_json ( sgassoc , self . sydent . server_name , self . sydent . keyring . ed25519 ) <EOL> return sgassoc </s>
