public async Task GetWalletTransactionTestAsync() { // Stage var publish = await _wallet.PublishFromAsync(_address, "root", ChainEntity.GetUUID(), "Stream item data".ToHex(), ""); /* * Explicit blockchain name test */ // Act var expActual = await _wallet.GetWalletTransactionAsync(_chainName, UUID.NoHyphens, publish.Result, true, true); // Assert Assert.IsTrue(expActual.IsSuccess()); Assert.IsInstanceOf <RpcResponse <GetWalletTransactionResult> >(expActual); /* * Inferred blockchain name test */ // Act var infActual = await _wallet.GetWalletTransactionAsync(publish.Result, true, true); // Assert Assert.IsTrue(infActual.IsSuccess()); Assert.IsInstanceOf <RpcResponse <GetWalletTransactionResult> >(infActual); }
public async Task ListStreamTxItemsTestAsync() { // Stage var txid = await _wallet.PublishAsync("root", ChainEntity.GetUUID(), "Some Stream Item Data".ToHex(), ""); /* * Explicit blockchain name test */ // Act var expActual = await _wallet.ListStreamTxItemsAsync(_chainName, UUID.NoHyphens, "root", txid.Result, true); // Assert Assert.IsTrue(expActual.IsSuccess()); Assert.IsInstanceOf <RpcResponse <IList <object> > >(expActual); /* * Inferred blockchain name test */ // Act var infActual = await _wallet.ListStreamTxItemsAsync("root", txid.Result, true); // Assert Assert.IsTrue(infActual.IsSuccess()); Assert.IsInstanceOf <RpcResponse <IList <object> > >(infActual); }
public async Task GetStreamKeySummaryTestAsync() { // Stage var streamKey = ChainEntity.GetUUID(); await _wallet.PublishFromAsync(_address, "root", streamKey, "Stream item data".ToHex(), ""); /* * Explicit blockchain name test */ // Act var expActual = await _wallet.GetStreamKeySummaryAsync(_chainName, UUID.NoHyphens, "root", streamKey, "jsonobjectmerge,ignore,recursive"); // Assert Assert.IsTrue(expActual.IsSuccess()); Assert.IsInstanceOf <RpcResponse>(expActual); /* * Inferred blockchain name test */ // Act var infActual = await _wallet.GetStreamKeySummaryAsync("root", streamKey, "jsonobjectmerge,ignore,recursive"); // Assert Assert.IsTrue(infActual.IsSuccess()); Assert.IsInstanceOf <RpcResponse>(infActual); }
public async Task TxOutToBinaryCacheTestAsync() { /* * Explicit blockchain name test */ // Stage var expBinaryCache = await _utility.CreateBinaryCacheAsync(_chainName, UUID.NoHyphens); var expPublish = await _wallet.PublishFromAsync(_chainName, UUID.NoHyphens, _address, "root", ChainEntity.GetUUID(), "A bunch of text data that will be transcribed to this this publish event and this one is async brotato chip".ToHex(), ""); var expTransaction = await _wallet.GetAddressTransactionAsync(_chainName, UUID.NoHyphens, _address, expPublish.Result, true); // Act var exp = await _wallet.TxOutToBinaryCacheAsync(_chainName, UUID.NoHyphens, expBinaryCache.Result, expTransaction.Result.Txid, expTransaction.Result.Vout[0].N, 100000, 0); // Clean-up await _utility.DeleteBinaryCacheAsync(_chainName, UUID.NoHyphens, expBinaryCache.Result); // Assert Assert.IsTrue(exp.IsSuccess()); Assert.IsInstanceOf <RpcResponse <double> >(exp); /* * Inferred blockchain name test */ // Stage var infBinaryCache = await _utility.CreateBinaryCacheAsync(); var infPublish = await _wallet.PublishFromAsync(_address, "root", ChainEntity.GetUUID(), "A bunch of text data that will be transcribed to this this publish event and this one is async brotato chip".ToHex(), ""); var infTransaction = await _wallet.GetAddressTransactionAsync(_address, infPublish.Result, true); // Act var inf = await _wallet.TxOutToBinaryCacheAsync(infBinaryCache.Result, infTransaction.Result.Txid, infTransaction.Result.Vout[0].N, 100000, 0); // Clean-up await _utility.DeleteBinaryCacheAsync(infBinaryCache.Result); // Assert Assert.IsTrue(inf.IsSuccess()); Assert.IsInstanceOf <RpcResponse <double> >(inf); }