Returns a new client that knows how to make requests to the mock HSM. @param client client object that makes request to the core @return new client object @throws BadURLException
(Client client)
| 26 | * @throws BadURLException |
| 27 | */ |
| 28 | public static Client getSignerClient(Client client) throws ChainException { |
| 29 | try { |
| 30 | List<URL> urls = new ArrayList<>(); |
| 31 | for (URL url : client.urls()) { |
| 32 | urls.add(new URL(url.toString() + "/mockhsm")); |
| 33 | } |
| 34 | return new Client.Builder(client).setURLs(urls).build(); |
| 35 | } catch (MalformedURLException e) { |
| 36 | throw new BadURLException(e.getMessage()); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * A class representing an extended public key. An instance of this class |