Beispiel #1
0
 def get_pushable(self) -> str:
     pubkey = privkey_to_pubkey(self._privkey)
     base64_pubkey = base64.b64encode(pubkey).decode("utf-8")
     pushable_tx = {
         "tx": {
             "msg":
             self._msgs,
             "fee": {
                 "gas":
                 str(self._gas),
                 "amount": [{
                     "denom": self._fee_denom,
                     "amount": str(self._fee)
                 }],
             },
             "memo":
             self._memo,
             "signatures": [{
                 "signature": self._sign(),
                 "pub_key": {
                     "type": "tendermint/PubKeySecp256k1",
                     "value": base64_pubkey
                 },
                 "account_number": str(self._account_num),
                 "sequence": str(self._sequence),
             }],
         },
         "mode": self._sync_mode,
     }
     return json.dumps(pushable_tx, separators=(",", ":"))
Beispiel #2
0
 def get_public_key(self):
     return privkey_to_pubkey(self.private_key)