public SimpleKinClient() { _deviceInfo = new Information("KinCsharpClient", "Samsung9+", "Samsung", "Android"); _marketPlaceClient = new MarketPlaceClient("https://api.developers.kinecosystem.com/v1", _deviceInfo, AuthorizationHeaderValueGetter); Config config = _marketPlaceClient.Config().Result; UserId = Guid.NewGuid().ToString(); _keyPair = KeyPair.Random(); Dictionary <string, JwtSecurityKey> kinsKeys = new Dictionary <string, JwtSecurityKey>(); foreach (KeyValuePair <string, JwtKey> configJwtKey in config.JwtKeys) { kinsKeys.Add(configJwtKey.Key, new JwtSecurityKey(configJwtKey.Value.Algorithm, configJwtKey.Value.Key)); } _marketPlaceJwtProvider = new JwtProvider("kin", kinsKeys); _blockChainHandler = new BlockChainHandler(config); }
public SimpleKinClient(string horizonUrl, string networkId, string appId) { _deviceInfo = new Information("Kinny", "RYZENBBY", "Chrome", "Windows", "1.0.0"); _marketPlaceClient = new MarketPlaceClient("https://api.developers.kinecosystem.com/v1", _deviceInfo, AuthorizationHeaderValueGetter); Config config = _marketPlaceClient.Config().Result; Dictionary <string, JwtSecurityKey> kinsKeys = new Dictionary <string, JwtSecurityKey>(); foreach (KeyValuePair <string, JwtKey> configJwtKey in config.JwtKeys) { kinsKeys.Add(configJwtKey.Key, new JwtSecurityKey(configJwtKey.Value.Algorithm, configJwtKey.Value.Key)); } UserId = Guid.NewGuid().ToString(); _keyPair = KeyPair.Random(); _marketPlaceJwtProvider = new JwtProvider("kin", kinsKeys); _blockChainHandler = new BlockChainHandler(horizonUrl, networkId, appId); }