/// <summary> /// Initializes a new instance of the <see cref="PythiaProtocol"/> class. /// </summary> public PythiaProtocol(IPythiaClient client, IPythiaCrypto pythiaCrypto, IAccessTokenProvider tokenProvider, IEnumerable <string> proofKeys) { this.tokenProvider = tokenProvider; this.client = client; this.pythiaCrypto = pythiaCrypto; if (proofKeys == null && !proofKeys.Any()) { throw new ArgumentException("No one Proof Key has been set"); } this.proofKeys = new ConcurrentDictionary <int, byte[]>(); foreach (var proofKey in proofKeys) { var parsedProofKey = this.TryParseProofKey(proofKey); this.proofKeys.TryAdd(parsedProofKey.Item1, parsedProofKey.Item2); } }
/// <summary> /// Initializes a new instance of the <see cref="PythiaProtocol"/> class. /// </summary> public BrainKey(IPythiaClient client, IPythiaCrypto pythiaCrypto, IAccessTokenProvider tokenProvider) { this.tokenProvider = tokenProvider; this.client = client; this.crypto = pythiaCrypto; }