public HFClient getHFClient() throws CryptoException, InvalidArgumentException, IllegalAccessException, InstantiationException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException { // Create instance of client. HFClient client = HFClient.createNewInstance(); logger.info("Create instance of HFClient"); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); logger.info("Set Crypto Suite of HFClient"); return client; }
public FabricManager use(String cc, String username) throws Exception { IntermediateOrg org = orgMap.get(cc); // org.init(fabricStore); org.setUsername(username); org.setClient(HFClient.createNewInstance()); org.getChannel().init(org); return new FabricManager(org); }
logger.info(String.format("[Channel Name:- %s, Chaincode Function:- %s, Chaincode Args:- %s]", channel.getName(), chaincodeFunction, Arrays.asList(chaincodeArgs))); HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); client.setUserContext(user);
logger.info(String.format("[Channel Name:- %s, Chaincode Function:- %s, Chaincode Args:- %s]", channel.getName(), chaincodeFunction, Arrays.asList(chaincodeArgs))); HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); client.setUserContext(user);