Exemplo n.º 1
0
        public void WriteSet()
        {
            var writeSet = new WriteSetLCS();

            writeSet.WriteSet = new Dictionary <AccessPathLCS, WriteOpLCS>();
            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "a71d76faa2d2d5c3224ec3d41deb293973564a791e55c6782ba76c2bf0495f9a"
                },
                Path = "01217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc97".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Deletion
            });

            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "c4c63f80c74b11263e421ebf8486a4e398d0dbc09fa7d4f62ccdb309f3aea81f"
                },
                Path = "01217da6c6b3e19f18".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Value,
                Value       = "cafed00d".FromHexToBytes()
            });

            var actual   = LCSCore.LCSDeserialization(writeSet).ByteArrayToString();
            var expected = "0200000020000000A71D76FAA2D2D5C3224EC3D41DEB293973564A791E55C6782BA76C2BF0495F9A2100000001217DA6C6B3E19F1825CFB2676DAECCE3BF3DE03CF26647C78DF00B371B25CC970000000020000000C4C63F80C74B11263E421EBF8486A4E398D0DBC09FA7D4F62CCDB309F3AEA81F0900000001217DA6C6B3E19F180100000004000000CAFED00D".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 2
0
        public void Program()
        {
            var program = new ProgramLCS();

            program.Code = "move".ToBytes();
            program.TransactionArguments = new List <TransactionArgumentLCS>();
            program.TransactionArguments.Add(new TransactionArgumentLCS
            {
                ArgType = Types.TransactionArgument.Types.ArgType.String,
                String  = "CAFE D00D"
            });
            program.TransactionArguments.Add(new TransactionArgumentLCS
            {
                ArgType = Types.TransactionArgument.Types.ArgType.String,
                String  = "cafe d00d"
            });
            program.Modules = new List <byte[]>();
            program.Modules.Add("CA".FromHexToBytes());
            program.Modules.Add("FED0".FromHexToBytes());
            program.Modules.Add("0D".FromHexToBytes());

            var actual   = LCSCore.LCSDeserialization(program).ByteArrayToString();
            var expected = "040000006D6F766502000000020000000900000043414645204430304402000000090000006361666520643030640300000001000000CA02000000FED0010000000D".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 3
0
        SendTransactionAsync(
            byte[] privateKey, RawTransactionLCS rawTransaction)
        {
            var bytesTrx = LCSCore.LCSerialize(rawTransaction);
            //Console.WriteLine();
            //Console.WriteLine(bytesTrx.ByteArryToString());
            //Console.WriteLine();

            LibraHasher libraHasher = new LibraHasher(EHashType.RawTransaction);
            var         hash        = libraHasher.GetHash(bytesTrx);

            var key = Key.Import(SignatureAlgorithm.Ed25519, privateKey,
                                 KeyBlobFormat.RawPrivateKey);

            AdmissionControl.SubmitTransactionRequest req =
                new AdmissionControl.SubmitTransactionRequest();

            req.Transaction = new SignedTransaction();

            List <byte> retArr = new List <byte>();

            retArr = retArr.Concat(bytesTrx).ToList();
            retArr = retArr.Concat(
                LCSCore.LCSerialize(key.Export(KeyBlobFormat.RawPublicKey))).ToList();
            var sig = SignatureAlgorithm.Ed25519.Sign(key, hash);

            retArr = retArr.Concat(LCSCore.LCSerialize(sig)).ToList();
            req.Transaction.TxnBytes = ByteString.CopyFrom(retArr.ToArray());

            var result = await _client.SubmitTransactionAsync(
                req, new Metadata());

            return(result);
        }
Exemplo n.º 4
0
        public void WriteSet()
        {
            var writeSet = new WriteSetLCS();

            writeSet.WriteSet = new Dictionary <AccessPathLCS, WriteOpLCS>();
            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "a71d76faa2d2d5c3224ec3d41deb293973564a791e55c6782ba76c2bf0495f9a"
                },
                Path = "01217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc97".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Deletion
            });

            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "c4c63f80c74b11263e421ebf8486a4e398d0dbc09fa7d4f62ccdb309f3aea81f"
                },
                Path = "01217da6c6b3e19f18".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Value,
                Value       = "cafed00d".FromHexToBytes()
            });

            var actual   = LCSCore.LCSDeserialization(writeSet).ByteArrayToString();
            var expected = "02000000a71d76faa2d2d5c3224ec3d41deb293973564a791e55c6782ba76c2bf0495f9a2100000001217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc9700000000c4c63f80c74b11263e421ebf8486a4e398d0dbc09fa7d4f62ccdb309f3aea81f0900000001217da6c6b3e19f180100000004000000cafed00d".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 5
0
        public void WriteOpDeletion()
        {
            var writeOp = new WriteOpLCS
            {
                WriteOpType = WriteOpType.Deletion
            };
            var actual   = LCSCore.LCSDeserialization(writeOp).ByteArrayToString();
            var expected = "00000000".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 6
0
        public void AccountAddress()
        {
            var addressLCS = new AddressLCS()
            {
                Value = "ca820bf9305eb97d0d784f71b3955457fbf6911f5300ceaa5d7e8621529eae19"
            };
            var actual   = LCSCore.LCSDeserialization(addressLCS).ByteArrayToString();
            var expected = "CA820BF9305EB97D0D784F71B3955457FBF6911F5300CEAA5D7E8621529EAE19".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 7
0
        public void WriteOpValue()
        {
            var writeOp = new WriteOpLCS
            {
                WriteOpType = WriteOpType.Value,
                Value       = "cafed00d".FromHexToBytes()
            };
            var actual   = LCSCore.LCSDeserialization(writeOp).ByteArrayToString();
            var expected = "0100000004000000CAFED00D".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 8
0
        public void TransactionArgumentByteAddress()
        {
            var transactionArgument = new TransactionArgumentLCS
            {
                ArgType   = Types.TransactionArgument.Types.ArgType.Bytearray,
                ByteArray = "cafed00d".FromHexToBytes()
            };

            var actual   = LCSCore.LCSDeserialization(transactionArgument).ByteArrayToString();
            var expected = "0300000004000000CAFED00D".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 9
0
        public void TransactionArgumentString()
        {
            var stringArgument = new TransactionArgumentLCS()
            {
                String  = "Hello, World!",
                ArgType = Types.TransactionArgument.Types.ArgType.String
            };

            var actual   = LCSCore.LCSDeserialization(stringArgument).ByteArrayToString();
            var expected = "020000000D00000048656C6C6F2C20576F726C6421".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 10
0
        public void TransactionArgumentU64()
        {
            var u64Argument = new TransactionArgumentLCS()
            {
                U64     = 9213671392124193148,
                ArgType = Types.TransactionArgument.Types.ArgType.U64
            };

            var actual   = LCSCore.LCSDeserialization(u64Argument).ByteArrayToString();
            var expected = "000000007CC9BDA45089DD7F".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 11
0
        public void RawTransaction()
        {
            var writeSet = new WriteSetLCS();

            writeSet.WriteSet = new Dictionary <AccessPathLCS, WriteOpLCS>();
            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "a71d76faa2d2d5c3224ec3d41deb293973564a791e55c6782ba76c2bf0495f9a"
                },
                Path = "01217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc97".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Deletion
            });

            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "c4c63f80c74b11263e421ebf8486a4e398d0dbc09fa7d4f62ccdb309f3aea81f"
                },
                Path = "01217da6c6b3e19f18".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Value,
                Value       = "cafed00d".FromHexToBytes()
            });

            var transaction = new RawTransactionLCS
            {
                Sender = new AddressLCS
                {
                    Value = "c3398a599a6f3b9f30b635af29f2ba046d3a752c26e9d0647b9647d1f4c04ad4"
                },
                SequenceNumber     = 32,
                TransactionPayload = new TransactionPayloadLCS
                {
                    PayloadType = TransactionPayloadType.WriteSet,
                    WriteSet    = writeSet
                },
                MaxGasAmount   = 0UL,
                GasUnitPrice   = 0UL,
                ExpirationTime = 18446744073709551615UL
            };
            var actual   = LCSCore.LCSDeserialization(transaction).ByteArrayToString();
            var expected = "c3398a599a6f3b9f30b635af29f2ba046d3a752c26e9d0647b9647d1f4c04ad420000000000000000100000002000000a71d76faa2d2d5c3224ec3d41deb293973564a791e55c6782ba76c2bf0495f9a2100000001217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc9700000000c4c63f80c74b11263e421ebf8486a4e398d0dbc09fa7d4f62ccdb309f3aea81f0900000001217da6c6b3e19f180100000004000000cafed00d00000000000000000000000000000000ffffffffffffffff".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 12
0
        public void RawTransaction()
        {
            var writeSet = new WriteSetLCS();

            writeSet.WriteSet = new Dictionary <AccessPathLCS, WriteOpLCS>();
            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "a71d76faa2d2d5c3224ec3d41deb293973564a791e55c6782ba76c2bf0495f9a"
                },
                Path = "01217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc97".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Deletion
            });

            writeSet.WriteSet.Add(new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "c4c63f80c74b11263e421ebf8486a4e398d0dbc09fa7d4f62ccdb309f3aea81f"
                },
                Path = "01217da6c6b3e19f18".FromHexToBytes()
            }, new WriteOpLCS
            {
                WriteOpType = WriteOpType.Value,
                Value       = "cafed00d".FromHexToBytes()
            });

            var transaction = new RawTransactionLCS
            {
                Sender = new AddressLCS
                {
                    Value = "c3398a599a6f3b9f30b635af29f2ba046d3a752c26e9d0647b9647d1f4c04ad4"
                },
                SequenceNumber     = 32,
                TransactionPayload = new TransactionPayloadLCS
                {
                    PayloadType = TransactionPayloadType.WriteSet,
                    WriteSet    = writeSet
                },
                MaxGasAmount   = 0UL,
                GasUnitPrice   = 0UL,
                ExpirationTime = 18446744073709551615UL
            };
            var actual   = LCSCore.LCSDeserialization(transaction).ByteArrayToString();
            var expected = "20000000C3398A599A6F3B9F30B635AF29F2BA046D3A752C26E9D0647B9647D1F4C04AD42000000000000000010000000200000020000000A71D76FAA2D2D5C3224EC3D41DEB293973564A791E55C6782BA76C2BF0495F9A2100000001217DA6C6B3E19F1825CFB2676DAECCE3BF3DE03CF26647C78DF00B371B25CC970000000020000000C4C63F80C74B11263E421EBF8486A4E398D0DBC09FA7D4F62CCDB309F3AEA81F0900000001217DA6C6B3E19F180100000004000000CAFED00D00000000000000000000000000000000FFFFFFFFFFFFFFFF".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 13
0
        public void TransactionArgumentAccountAddress()
        {
            var transactionArgument = new TransactionArgumentLCS
            {
                ArgType = Types.TransactionArgument.Types.ArgType.Address,
                Address = new AddressLCS()
                {
                    Value = "2c25991785343b23ae073a50e5fd809a2cd867526b3c1db2b0bf5d1924c693ed"
                }
            };
            var actual   = LCSCore.LCSDeserialization(transactionArgument).ByteArrayToString();
            var expected = "010000002c25991785343b23ae073a50e5fd809a2cd867526b3c1db2b0bf5d1924c693ed".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 14
0
        public void AccessPath()
        {
            var accessPath = new AccessPathLCS
            {
                Address = new AddressLCS
                {
                    Value = "9a1ad09742d1ffc62e659e9a7797808b206f956f131d07509449c01ad8220ad4"
                },
                Path = "01217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc97".FromHexToBytes()
            };
            var actual   = LCSCore.LCSDeserialization(accessPath).ByteArrayToString();
            var expected = "9A1AD09742D1FFC62E659E9A7797808B206F956F131D07509449C01AD8220AD42100000001217DA6C6B3E19F1825CFB2676DAECCE3BF3DE03CF26647C78DF00B371B25CC97".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 15
0
        public void RawTransactionWithProgram()
        {
            var program = new ProgramLCS();

            program.Code = "move".ToBytes();
            program.TransactionArguments = new List <TransactionArgumentLCS>();
            program.TransactionArguments.Add(new TransactionArgumentLCS
            {
                ArgType = Types.TransactionArgument.Types.ArgType.String,
                String  = "CAFE D00D"
            });
            program.TransactionArguments.Add(new TransactionArgumentLCS
            {
                ArgType = Types.TransactionArgument.Types.ArgType.String,
                String  = "cafe d00d"
            });
            program.Modules = new List <byte[]>();
            program.Modules.Add("CA".FromHexToBytes());
            program.Modules.Add("FED0".FromHexToBytes());
            program.Modules.Add("0D".FromHexToBytes());

            var transaction = new RawTransactionLCS
            {
                Sender = new AddressLCS
                {
                    Value = "3a24a61e05d129cace9e0efc8bc9e33831fec9a9be66f50fd352a2638a49b9ee"
                },
                SequenceNumber     = 32,
                TransactionPayload = new TransactionPayloadLCS
                {
                    PayloadType = TransactionPayloadType.Program,
                    Program     = program
                },
                MaxGasAmount   = 10000UL,
                GasUnitPrice   = 20000UL,
                ExpirationTime = 86400UL
            };
            var actual   = LCSCore.LCSDeserialization(transaction).ByteArrayToString();
            var expected = "3A24A61E05D129CACE9E0EFC8BC9E33831FEC9A9BE66F50FD352A2638A49B9EE200000000000000000000000040000006D6F766502000000020000000900000043414645204430304402000000090000006361666520643030640300000001000000CA02000000FED0010000000D1027000000000000204E0000000000008051010000000000".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 16
0
        public void Script()
        {
            var script = new ScriptLCS();

            script.Code = "move".ToBytes();
            script.TransactionArguments = new List <TransactionArgumentLCS>();
            script.TransactionArguments.Add(new TransactionArgumentLCS
            {
                ArgType = Types.TransactionArgument.Types.ArgType.String,
                String  = "CAFE D00D"
            });
            script.TransactionArguments.Add(new TransactionArgumentLCS
            {
                ArgType = Types.TransactionArgument.Types.ArgType.String,
                String  = "cafe d00d"
            });

            var actual   = LCSCore.LCSDeserialization(script).ByteArrayToString();
            var expected = "040000006d6f76650200000002000000090000004341464520443030440200000009000000636166652064303064".ToLower();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 17
0
        public async Task <bool> TransferCoins(Account sender, string receiverAddress, ulong amount, ulong gasUnitPrice = 0, ulong maxGasAmount = 1000000)
        {
            try
            {
                var accountState = await QueryBalance(sender.Address);

                var program = new ProgramLCS();
                program.Code = Convert.FromBase64String(Constant.ProgamBase64Codes.PeerToPeerTxn);
                program.TransactionArguments = new List <TransactionArgumentLCS>();
                program.TransactionArguments.Add(new TransactionArgumentLCS
                {
                    ArgType = Types.TransactionArgument.Types.ArgType.Address,
                    Address = new AddressLCS {
                        Value = receiverAddress
                    }
                });
                program.TransactionArguments.Add(new TransactionArgumentLCS
                {
                    ArgType = Types.TransactionArgument.Types.ArgType.U64,
                    U64     = amount
                });
                program.Modules = new List <byte[]>();

                var transaction = new RawTransactionLCS
                {
                    Sender = new AddressLCS {
                        Value = sender.Address
                    },
                    SequenceNumber     = accountState.SequenceNumber,
                    TransactionPayload = new TransactionPayloadLCS
                    {
                        PayloadType = TransactionPayloadType.Program,
                        Program     = program
                    },
                    MaxGasAmount   = maxGasAmount,
                    GasUnitPrice   = gasUnitPrice,
                    ExpirationTime = (ulong)Math.Floor((decimal)DateTimeOffset.Now.ToUnixTimeMilliseconds() / 1000) + 100
                };
                var transactionLCS = LCSCore.LCSDeserialization(transaction);

                var digestSHA3 = new SHA3_256();
                var saltDigest = digestSHA3.ComputeVariable(Constant.HashSaltValues.RawTransactionHashSalt.ToBytes());
                var saltDigestAndTransaction = saltDigest.Concat(transactionLCS).ToArray();
                var hash            = digestSHA3.ComputeVariable(saltDigestAndTransaction);
                var senderSignature = sender.KeyPair.Sign(hash);

                var publicKeyLen = BitConverter.GetBytes((uint)sender.PublicKey.Length);
                var signatureLen = BitConverter.GetBytes((uint)senderSignature.Length);
                var txnBytes     = transactionLCS.Concat(publicKeyLen).ToArray();
                txnBytes = txnBytes.Concat(sender.PublicKey).ToArray();
                txnBytes = txnBytes.Concat(signatureLen).ToArray();
                txnBytes = txnBytes.Concat(senderSignature).ToArray();

                var request = new SubmitTransactionRequest
                {
                    SignedTxn = new SignedTransaction
                    {
                        TxnBytes = txnBytes.ToByteString()
                    }
                };

                var response = await acClient.SubmitTransactionAsync(request);

                return(response.AcStatus.Code == AdmissionControlStatusCode.Accepted);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 18
0
        static void Main(string[] args)
        {
            LibraAdmissionControl service = new LibraAdmissionControl();

            ///---------------------
            /// GetTransactions
            ///---------------------
            var start        = 0u;
            var limit        = 10u;
            var transactions = service.GetTransactionsAsync(start, limit).Result;

            Console.WriteLine(transactions.Count());

            ///---------------------
            /// GetAccountInfo
            ///---------------------
            var address = "03d7cb76e3429ca23fc16ee1bc323ae928400a5040fb8993d2eeabc4b361f42b";
            var account = service.GetAccountInfoAsync(address).Result;

            Console.WriteLine(account.Balance);
            Console.WriteLine(account.SequenceNumber);

            #region LCS test
            AddressLCS addressLcs     = new AddressLCS(address);
            byte[]     addressByteLcs = LCSCore.LCSerialize(addressLcs);
            addressLcs = LCSCore.LCDeserialize <AddressLCS>(addressByteLcs);
            Console.WriteLine("LCS - " + addressLcs);
            #endregion

            #region SendTransaction
            ///---------------------
            /// SendTransaction PtP
            ///---------------------
            //Check account balance from the beginning
            var    privateKey = new byte[] { 82, 86, 29, 56, 85, 21, 64, 101, 182, 161, 68, 237, 96, 47, 86, 108, 60, 106, 231, 218, 202, 31, 215, 3, 131, 208, 224, 94, 96, 89, 149, 168 };
            string sender     = "36dba2da4eb4ee1f9955800940a029d435a6bc1cd4ad748ec63a9d9e4410c345";
            try
            {
                var result = service.SendTransactionPtoP(
                    privateKey,
                    sender,
                    address,
                    10).Result;
                Console.WriteLine("SendTransaction Result = {0}", result);
                //{ "acStatus": { } }
                // - Success
            }
            catch (Exception ex)
            {
                //Check account balance from the beginning
                Console.WriteLine(ex.Message);
            }
            #endregion

            #region Publish Module
            var module  = new byte[] { 76, 73, 66, 82, 65, 86, 77, 10, 1, 0, 11, 1, 110, 0, 0, 0, 2, 0, 0, 0, 2, 112, 0, 0, 0, 4, 0, 0, 0, 3, 116, 0, 0, 0, 18, 0, 0, 0, 12, 134, 0, 0, 0, 4, 0, 0, 0, 13, 138, 0, 0, 0, 42, 0, 0, 0, 14, 180, 0, 0, 0, 48, 0, 0, 0, 5, 228, 0, 0, 0, 42, 0, 0, 0, 4, 14, 1, 0, 0, 32, 0, 0, 0, 9, 46, 1, 0, 0, 4, 0, 0, 0, 10, 50, 1, 0, 0, 6, 0, 0, 0, 11, 56, 1, 0, 0, 118, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 3, 1, 0, 4, 2, 0, 5, 1, 0, 6, 3, 0, 7, 4, 1, 2, 1, 1, 2, 1, 7, 0, 0, 2, 2, 1, 0, 2, 0, 1, 6, 7, 0, 0, 0, 2, 0, 2, 6, 7, 0, 0, 2, 0, 2, 0, 2, 6, 7, 0, 0, 1, 0, 2, 0, 1, 7, 0, 0, 0, 3, 2, 2, 1, 3, 0, 3, 2, 6, 7, 0, 0, 6, 2, 3, 3, 6, 7, 0, 0, 2, 6, 2, 3, 3, 6, 7, 0, 0, 6, 1, 1, 3, 3, 6, 7, 0, 0, 1, 6, 1, 3, 3, 7, 0, 0, 2, 1, 5, 82, 84, 101, 115, 116, 1, 84, 3, 110, 101, 119, 2, 116, 49, 2, 116, 50, 2, 116, 51, 2, 116, 52, 9, 100, 101, 115, 116, 114, 111, 121, 95, 116, 4, 102, 105, 110, 116, 2, 102, 114, 12, 3, 123, 235, 224, 10, 235, 48, 138, 129, 204, 244, 105, 168, 125, 242, 195, 86, 179, 51, 244, 158, 68, 156, 44, 219, 91, 44, 253, 143, 13, 146, 0, 2, 2, 0, 0, 8, 0, 0, 9, 1, 0, 1, 0, 2, 0, 4, 0, 12, 0, 12, 1, 20, 0, 1, 2, 1, 1, 0, 2, 2, 7, 0, 12, 0, 16, 0, 13, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 12, 1, 23, 2, 2, 1, 0, 2, 3, 7, 0, 12, 0, 16, 0, 13, 2, 12, 1, 12, 2, 23, 2, 3, 1, 0, 2, 4, 9, 0, 12, 0, 16, 1, 13, 1, 9, 13, 2, 12, 2, 12, 1, 23, 2, 4, 1, 0, 2, 5, 7, 0, 12, 0, 16, 1, 13, 2, 12, 1, 12, 2, 23, 2, 5, 1, 0, 1, 6, 5, 0, 12, 0, 21, 0, 1, 13, 2, 13, 1, 2 };
            var resultM = service.SendTransactionModule(
                privateKey,
                sender, module
                ).Result;
            Console.WriteLine("Publish Module Result = {0}", resultM);
            #endregion

            try
            {
                ///---------------------
                /// GetTransactions by Seqenc number
                ///---------------------
                address = "5d2e159c1ac8ad0c4ac2071b4a977bf0103a4ae469e186093aa5e03efc1e0afe";
                var trx = service.GetTransactionsBySequenceNumberAsync(address, 0).Result;
                Console.WriteLine("Receiver = {0}, Amount = {1}", trx.Receiver, trx.Amount);
            }
            catch
            {
            }

            Console.ReadKey();
        }