public void SignAndTransferTest() { //7c64ad461b06168990ea5902eb2e054b3a1324be28d7335f05ab7cebca7ce044 key in hex //1GKMJp7NGBv9a8eY8nuK31yXgoe6e8DDAz //1GKMJp7NGBv9a8eY8nuK31yXgoe6e8DDAz //5Jm53JsNg72iix4PdChqyxvDuQXMfGuMsALY98VdeQWCsDikxYn const String PRIVATE_KEY_AS_DEC2 = "56264673822963068407370790525340191907437491654303176136090258467429147271236"; DC.Node.atm atm = new atm(); //String txn = atm.SignAndTransfer(PRIVATE_KEY_AS_DEC2, "1DugongACGcyyvvgvcy8skYyezsx5jy3aV", 0.0005046M); //Assert.IsFalse(String.IsNullOrEmpty(txn)); }
//[Ignore()] public void SignAndTransfer_DoubleSpend_Test() { //04a479d39cabab4454d98c410306188bda9ce494452b98eacd6f1c726269b544 key in hex //1Mc1ABCVr4A8duDiQGnRjKTgJnPiB64pH4 const String PRIVATE_KEY_AS_DEC2 = "2099855129312767045997633640821152469995996877318518352763986073205651125572"; DC.Node.atm atm = new atm(); //1hwFSZuJZ9ZeLJV3nD9smCaZjBseTTaCM //String txn = atm.SignAndTransfer(PRIVATE_KEY_AS_DEC2, "1HioFY2SXF2uhuvrxRPhCdfZrXhjfCu9XL", 0.0999M); //String txn = atm.SignAndTransfer(PRIVATE_KEY_AS_DEC2, "1C3QzD1QYAr33qKQGKwe38d5yA6PcTveyy", 0.0999M); //Assert.IsFalse(String.IsNullOrEmpty(txn)); }
public void CreatePublicEncryptedPrivateKeyTest() { DC.Node.atm atm = new atm(); Common.Models.Keys actual = atm.CreatePublicEncryptedPrivateKey(); Assert.IsNotNull(actual); Byte[] password = actual.Password; Byte[] cipher = Convert.FromBase64String(actual.PrivateKey); String privateKey = DC.Common.Security.DecryptStringFromBytes_Aes(cipher, password); Assert.IsTrue(privateKey.StartsWith("5") || privateKey.StartsWith("K")); //use brainwallet.org to verify private key yeilds public key //1As4KMx5U2GSve2FbcaenoL2sj4VxFGfTw //5J5dwHGRbwHgryR4DZ862tjeRwhrNCCwNT1Fct6HqgkCp5hCGzW }
public MountItemObject(atm instance) : base(instance) { _internal = instance; }