public void testSerializedPaymentTransaction() { string expectedSerialization = "120000240000000561D4C44364C5BB00000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000000F73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD0208114B5F762798A53D543A014CAF8B297CFF8F2F937E88314FD94A75318DE40B1D513E6764ECBCB6F1E7056ED"; AccountId ac = AccountId.FromSeed(TestFixtures.MasterSeed); StObject fromSO = StObject.NewInstance(); fromSO.Add(Field.TransactionType, "Payment"); fromSO.Add(AccountId.Account, ac.Address); fromSO.Add(UInt32.Sequence, 5); fromSO.Add(Amount.Fee, "15"); fromSO.Add(VariableLength.SigningPubKey, ac.KeyPair.PubHex()); fromSO.Add(AccountId.Destination, TestFixtures.BobAccount.Address); fromSO.Add(Amount.AmountFld, "12/USD/" + ac.Address); Assert.AreEqual(expectedSerialization, fromSO.ToHex()); }
public void TestAddress() { var account = AccountId.FromSeed(TestFixtures.MasterSeed); Assert.AreEqual(TestFixtures.MasterSeedAddress, account.Address); }