public SeedController(ISp8deTransactionStorage storage, ICryptoService cryptoService, Sp8deNodeConfig config) { if (config == null || config.PrivateKeys == null) { throw new ArgumentNullException(nameof(Sp8deNodeConfig)); } this.keys = config.PrivateKeys.Select(x => EthKeySecret.Load(x)).ToArray(); this.storage = storage; this.cryptoService = cryptoService; this.transactionService = new Sp8deTransactionNodeService(cryptoService, storage, Enumerable.Empty <IExternalAnchorService>()); }
private IKeySecret GetKey() { return(EthKeySecret.Load(appConfig.PrivateKeys[new Random().Next(0, appConfig.PrivateKeys.Length)])); }