public void Initialize() { string file = Environment.GetEnvironmentVariable("POOL_GENESIS_FILE"); if (string.IsNullOrEmpty(file)) { file = PoolUtils.GenerateGenesisFile(); _filesCreated.Add(file); } _pool = IndyDotNet.Pool.Factory.GetPool("WriteDidAndQueryVeryKeyDemoPool", file); _pool.Create(); _pool.Open(); WalletConfig config = new WalletConfig() { Id = "WriteDidAndQueryVeryKeyDemoWalletId" }; WalletCredentials credentials = new WalletCredentials() { Key = "8dvfYSt5d1taSd6yJdpjq4emkwsPDDLYxkNFysFD2cZY", KeyDerivationMethod = KeyDerivationMethod.RAW }; _wallet = IndyDotNet.Wallet.Factory.GetWallet(config, credentials); _wallet.Create(); _wallet.Open(); }
public void Initialize() { string file = PoolUtils.GenerateGenesisFile(); _filesCreated.Add(file); _pool = IndyDotNet.Pool.Factory.GetPool("AllPaymentsTestsPool", file); _pool.Create(); _pool.Open(); WalletConfig config = new WalletConfig() { Id = "AllPaymentsTestWalletId" }; WalletCredentials credentials = new WalletCredentials() { Key = "8dvfYSt5d1taSd6yJdpjq4emkwsPDDLYxkNFysFD2cZY", KeyDerivationMethod = KeyDerivationMethod.RAW }; _wallet = IndyDotNet.Wallet.Factory.GetWallet(config, credentials); _wallet.Create(); _wallet.Open(); }
/// <summary> /// Opens the specified tag. /// </summary> /// <typeparam name="T">type of tag to open</typeparam> /// <param name="name">tag name</param> /// <returns>handle to tag</returns> protected T Open <T>(string name) where T : Tag { if (String.IsNullOrEmpty(name)) { return(null); } T tag; try { tag = pool.Open <T>(name, locked, GameID); } catch (Exception ex) // most likely a TagNotFoundException, but that's not accessable here (after a year of this damned message we know this not to be the case) { LogError("Failed to load dependent tag {0}. Pool.Open threw. Message: {1}", name, ex.Message); return(null); } if (tag == null) { LogError("Failed to load dependent tag {0}. Return value was null.", name); return(null); } return(tag); }
public void Initialize() { string file = PoolUtils.GenerateGenesisFile(); _filesCreated.Add(file); _pool = IndyDotNet.Pool.Factory.GetPool("AllCryptoTestsPool", file); _pool.Create(); _pool.Open(); WalletConfig config = new WalletConfig() { Id = "AllCryptoTestsWalletId" }; WalletCredentials credentials = new WalletCredentials() { Key = "8dvfYSt5d1taSd6yJdpjq4emkwsPDDLYxkNFysFD2cZY", KeyDerivationMethod = KeyDerivationMethod.RAW }; _wallet = IndyDotNet.Wallet.Factory.GetWallet(config, credentials); _wallet.Create(); _wallet.Open(); IdentitySeed seed = new IdentitySeed() { Seed = "00000000000000000000000000000My1" }; _senderDid = IndyDotNet.Did.Factory.CreateMyDid(_pool, _wallet, seed); }
public void OpenCreatedWalletSuccessfully() { IPool pool = IndyDotNet.Pool.Factory.GetPool("OpenCreatedWalletPool", _genesisFileName); pool.Create(); pool.Open(); _poolsCreated.Add(pool); WalletConfig config = new WalletConfig() { Id = "OpenCreateWalletID" }; WalletCredentials credentials = new WalletCredentials() { Key = "8dvfYSt5d1taSd6yJdpjq4emkwsPDDLYxkNFysFD2cZY", KeyDerivationMethod = KeyDerivationMethod.RAW }; IWallet wallet = IndyDotNet.Wallet.Factory.GetWallet(config, credentials); wallet.Create(); _walletsCreated.Add(wallet); wallet.Open(); }
public void Initialize() { string file = Environment.GetEnvironmentVariable("POOL_GENESIS_FILE"); // throw new Exception($"environment variable POOL_GENESIS_FILE is {file}"); if (string.IsNullOrEmpty(file)) { file = PoolUtils.GenerateGenesisFile(); _filesCreated.Add(file); } _pool = IndyDotNet.Pool.Factory.GetPool("IssueCredentialDemoPool", file); _pool.Create(); _pool.Open(); WalletConfig config = new WalletConfig() { Id = "IssueCredentialDemoWalletId" }; _wallet = IndyDotNet.Wallet.Factory.GetWallet(config, _credentials); _wallet.Create(); _wallet.Open(); }
private void OpenPool() { try { EditDialog dlg = new EditDialog("Open Pool", "Enter pool name:"); var dlgResults = dlg.Show(); if (DialogConstants.OK == dlgResults.Item1) { IPool pool = Factory.GetPool($"{dlgResults.Item2}"); pool.Open(); _openPools.Add(pool); } } catch (Exception ex) { MessageBox.Query(70, 7, "Pool Open Failed", $"Error: {ex.Message}", "Ok"); } }
public void ExportWalletSuccessfully() { IPool pool = IndyDotNet.Pool.Factory.GetPool("DeleteCreatedWalletPool", _genesisFileName); pool.Create(); pool.Open(); _poolsCreated.Add(pool); WalletConfig config = new WalletConfig() { Id = "DeleteCreateWalletID" }; WalletCredentials credentials = new WalletCredentials() { Key = "8dvfYSt5d1taSd6yJdpjq4emkwsPDDLYxkNFysFD2cZY", KeyDerivationMethod = KeyDerivationMethod.RAW }; IWallet wallet = IndyDotNet.Wallet.Factory.GetWallet(config, credentials); wallet.Create(); wallet.Open(); _walletsCreated.Add(wallet); WalletImportExportConfig exportConfig = new WalletImportExportConfig() { Key = "8dvfYSt5d1taSd6yJdpjq4emkwsPDDLYxkNFysFD2cZY", Path = System.IO.Path.GetTempFileName() }; wallet.Export(exportConfig); _filesCreated.Add(exportConfig.Path); Assert.IsTrue(System.IO.File.Exists(exportConfig.Path)); }