message: DIDDoc fixes to pass aries test suite
diff: @@ -4,6 +4,8 @@ use url::Url;
  pub const CONTEXT: &str = "https://w3id.org/did/v1";
  pub const KEY_TYPE: &str = "Ed25519VerificationKey2018";
  pub const KEY_AUTHENTICATION_TYPE: &str = "Ed25519SignatureAuthentication2018";
  +pub const SERVICE_SUFFIX: &str = "indy";
  +pub const SERVICE_TYPE: &str = "IndyAgent";
  #[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
  pub struct DidDoc {
  @@ -62,8 +64,8 @@ impl Default for DidDoc {
  authentication: vec![],
  service: vec![Service {
  // TODO: FIXME Several services????
  - id: String::from("did:example:123456789abcdefghi;did-communication"),
  - type_: String::from("did-communication"),
  + id: format!("did:example:123456789abcdefghi;{}", SERVICE_SUFFIX),
  + type_: String::from(SERVICE_TYPE),
  priority: 0,
  service_endpoint: String::new(),
  recipient_keys: Vec::new(),
  @@ -350,12 +352,10 @@ pub mod tests {
  Authentication { type_: KEY_AUTHENTICATION_TYPE.to_string(), public_key: _key_reference_1() }
  ],
  service: vec![Service {
  - id: String::from("did:example:123456789abcdefghi;did-communication"),
  - type_: String::from("did-communication"),
  - priority: 0,
  service_endpoint: _service_endpoint(),
  recipient_keys: vec![_key_reference_1()],
  routing_keys: vec![_key_reference_2(), _key_reference_3()],
  + ..Default::default()
  }],
  }
  }
  @@ -373,12 +373,10 @@ pub mod tests {
  Authentication { type_: KEY_AUTHENTICATION_TYPE.to_string(), public_key: _key_reference_1() }
  ],
  service: vec![Service {
  - id: String::from("did:example:123456789abcdefghi;did-communication"),
  - type_: String::from("did-communication"),
  - priority: 0,
  service_endpoint: _service_endpoint(),
  recipient_keys: vec![_key_1()],
  routing_keys: vec![_key_2(), _key_3()],
  + ..Default::default()
  }],
  }
  }
  @@ -396,12 +394,10 @@ pub mod tests {
  Authentication { type_: KEY_AUTHENTICATION_TYPE.to_string(), public_key: _key_1() }
  ],
  service: vec![Service {
  - id: String::from("did:example:123456789abcdefghi;did-communication"),
  - type_: String::from("did-communication"),
  - priority: 0,
  service_endpoint: _service_endpoint(),
  recipient_keys: vec![_key_1()],
  routing_keys: vec![_key_2(), _key_3()],
  + ..Default::default()
  }],
  }
  }
  @@ -417,12 +413,10 @@ pub mod tests {
  Authentication { type_: KEY_AUTHENTICATION_TYPE.to_string(), public_key: _key_1() }
  ],
  service: vec![Service {
  - id: String::from("did:example:123456789abcdefghi;did-communication"),
  - type_: String::from("did-communication"),
  - priority: 0,
  service_endpoint: _service_endpoint(),
  recipient_keys: vec![_key_1()],
  routing_keys: vec![],
  + ..Default::default()
  }],
  }
  }
  