Exemple #1
0
 def test_verifyAuthority(self):
     stm = self.bts
     stm.wallet.unlock("123")
     tx = TransactionBuilder(use_condenser_api=True, steem_instance=stm)
     tx.appendOps(Transfer(**{"from": "beem",
                              "to": "beem1",
                              "amount": Amount("1.300 SBD", steem_instance=stm),
                              "memo": "Foobar"}))
     account = Account("beem", steem_instance=stm)
     tx.appendSigner(account, "active")
     self.assertTrue(len(tx.wifs) > 0)
     tx.sign()
     tx.verify_authority()
     self.assertTrue(len(tx["signatures"]) > 0)
Exemple #2
0
 def test_verifyAuthority_appbase(self):
     stm = self.appbase
     tx = TransactionBuilder(steem_instance=stm)
     tx.appendOps(
         Transfer(
             **{
                 "from": "test",
                 "to": "test1",
                 "amount": Amount("1 STEEM", steem_instance=stm),
                 "memo": ""
             }))
     account = Account("test", steem_instance=stm)
     tx.appendSigner(account, "active")
     tx.appendWif(wif)
     self.assertTrue(len(tx.wifs) > 0)
     tx.sign()
     with self.assertRaises(exceptions.MissingRequiredActiveAuthority):
         tx.verify_authority()
     self.assertTrue(len(tx["signatures"]) > 0)
Exemple #3
0
 def test_verifyAuthorityException(self):
     nodelist = NodeList()
     stm = Steem(node=self.nodes,
                 keys=[self.posting_key],
                 nobroadcast=True,
                 expiration=120,
                 num_retries=10)
     tx = TransactionBuilder(use_condenser_api=True, steem_instance=stm)
     tx.appendOps(Transfer(**{"from": "beem",
                              "to": "beem1",
                              "amount": Amount("1 STEEM", steem_instance=stm),
                              "memo": ""}))
     account = Account("beem2", steem_instance=stm)
     tx.appendSigner(account, "active")
     tx.appendWif(self.posting_key)
     self.assertTrue(len(tx.wifs) > 0)
     tx.sign()
     with self.assertRaises(
         exceptions.MissingRequiredActiveAuthority
     ):
         tx.verify_authority()
     self.assertTrue(len(tx["signatures"]) > 0)