예제 #1
0
        public (bool status, string data, string error) VoteForDelegate(List <string> votes, string passPhrase,
                                                                        string secondPassPhrase = null)
        {
            var tx = TransactionApi.CreateVote(votes, passPhrase, secondPassPhrase);

            return(TransactionService.PostTransaction(tx));
        }
        public void CreateVoteSignTest()
        {
            List <string> votes = new List <string> {
                "+020664026362dce27637b8f77039b5158ec0e53dac9ad0cca7a15b55d9a6556ba0"
            };


            var tx = TransactionApi.CreateVote(votes, _passPhrase);

            var json = tx.ToObject(true);

            Assert.IsTrue(Crypto.Verify(tx));
            Assert.AreEqual(json, tx.ToObject(true));
        }
        public void CreateVoteSignTest()
        {
            List <string> votes = new List <string> {
                "+034151a3ec46b5670a682b0a63394f863587d1bc97483b1b6c70eb58e7f0aed192"
            };


            var tx = TransactionApi.CreateVote(votes, "ski rose knock live elder parade dose device fetch betray loan holiday");

            var json = tx.ToObject(true);

            Assert.IsTrue(Crypto.Verify(tx));
            Assert.AreEqual(json, tx.ToObject(true));
        }
예제 #4
0
        public void CreateVoteSignTest()
        {
            List <string> votes = new List <string> {
                "+034151a3ec46b5670a682b0a63394f863587d1bc97483b1b6c70eb58e7f0aed192"
            };


            var tx = TransactionApi.CreateVote(votes, _passPhrase);

            var json = tx.ToObject(true);

            Assert.IsTrue(Crypto.Verify(tx));
            Assert.AreEqual(json, tx.ToObject(true));
        }
        public async Task <SmartHoldemTransactionPostResponse> VoteForDelegateAsync(List <string> votes)
        {
            var tx = TransactionApi.CreateVote(votes, _passPhrase, _secondPassPhrase);

            return(await TransactionService.PostTransactionAsync(tx));
        }
        public SmartHoldemTransactionPostResponse VoteForDelegate(List <string> votes)
        {
            var tx = TransactionApi.CreateVote(votes, _passPhrase, _secondPassPhrase);

            return(TransactionService.PostTransaction(tx));
        }