public static string AsString(this NymRoles role) { switch (role) { case NymRoles.Steward: return("STEWARD"); case NymRoles.TrustAnchor: return("TRUST_ANCHOR"); case NymRoles.Trustee: return("TRUSTEE"); default: return(null); } }
public BuildRequestResult BuildRequest(IDid submitterDid, IDid targetDid, string verKey, string alias, NymRoles role) { string json = LedgerAsync.BuildNymRequestAsync(submitterDid, targetDid, verKey, alias, role.AsString()).Result; Logger.Info($"BuildNymRequestAsync returned: {json}"); return(JsonConvert.DeserializeObject <BuildRequestResult>(json)); }