/// <summary> /// /// </summary> /// <param name="seed"></param> /// <param name="security"></param> /// <returns></returns> public MamState InitMamState(string seed = null, int security = 2) { var channel = new MamChannel { SideKey = null, Mode = MamMode.Public, NextRoot = null, Security = security, Start = 0, Count = 1, NextCount = 1, Index = 0 }; if (string.IsNullOrEmpty(seed)) { seed = SeedRandomGenerator.GenerateNewSeed(); } return(new MamState { Seed = seed, Channel = channel //Subscribed }); }
public void ShouldGenerateNewSeed() { string generatedSeed = SeedRandomGenerator.GenerateNewSeed(); Assert.IsTrue(InputValidator.IsValidSeed(generatedSeed)); Assert.AreEqual(generatedSeed.Length, Constants.SEED_LENGTH_MAX); }
public void Attach(string trytes, string address, int depth = 6, int mwm = 14) { var tag = "999999999999999999999999999"; var transfers = new List <Transfer> { new Transfer(address.AddChecksum(), 0, trytes, tag) }; // ReSharper disable once UnusedVariable var result = Iota.SendTransfer( SeedRandomGenerator.GenerateNewSeed(), 2, depth, mwm, transfers.ToArray(), null, null, false, true, null); }