/// <summary>
        /// Waits for public key from keeper and returns confirmation hash
        /// </summary>
        /// <returns>confirmation hash</returns>
        public async Task <string> AcquireConfirmationHash(CancellationToken token)
        {
            while (!IsSenderKeyReceived())
            {
                var msg = await WhisperService.ReceiveMessages(token);

                TranslateMessage(msg);
            }
            return(GetConfirmationHash());
        }
        /// <summary>
        /// Waits for keystore data from keeper
        /// </summary>
        /// <returns>encrypted keystore data</returns>
        public async Task <string> AcquireKeystoreData(CancellationToken token)
        {
            while (!IsKeyStoreReceived())
            {
                var msg = await WhisperService.ReceiveMessages(token);

                TranslateMessage(msg);
            }
            return(DecryptedKeystoreData);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public AccountSynchronizer(IWebSocketProvider webSocketProvider)
 {
     WhisperService = new WhisperService(webSocketProvider);
     X9             = ECNamedCurveTable.GetByName("prime239v1");
     GenerateKeyPair();
 }