1

I've created an address of tezos by using pytezos with the below mentioned code

addr = Key.generate()
publicKey = addr.public_key_hash()
pvtKey = addr.secret_key(passphrase='12435')

and when I import the above generated address in Temple wallet by using the pvtKey it's imported correctly but when I've sign the transaction with private key and I used my generated pvtKey it thorws an error of wrong pvt key and then I've imported the private key of above generated address from my temple wallet I've got the different pvt key and it's working fine I'm not getting why it's happening?

1 Answer 1

1

pytezos.using expects a private key as key parameter. In the example above you are providing the public key hash, which is incorrect.

:param key: 
  base58 encoded key, path to the faucet file, faucet file itself, alias from tezos-client, or **Key**
client = pytezos.using(shell='https://rpc.kathmandunet.teztnets.xyz', key= "<private_key>")
13
  • Actually I'm using kukai wallet and I'm not getting my private key it's only giving me my secret phrase.how could I find my private key? Nov 7, 2022 at 5:22
  • I've created another account on Temple Wallet and in the code I've used the private key of my account in key but still I'm getting the hash of operation but it's not including. Nov 7, 2022 at 6:16
  • Do you have balance in that account that you created? Also try to do <client>.transaction(...).send(min_confirmations=1), it will wait for the operation to be confirmed in a block. Nov 7, 2022 at 7:22
  • I've 6001 tez and I'm doing it on kathmandu net Nov 7, 2022 at 7:51
  • here's my code now opg = pytezos.using(shell='rpc.kathmandunet.teztnets.xyz', key= "edskRuKSyPoztVVFvbFmeSMmkDLBc9fun1xtwTVJVFnSqv8fsegtHmnhCyao7Pdi8wa2yeEcB5iPURAwgnJrq8qSdPyNj7AYWZ") opg1 = pytezos.transaction(destination='tz1WvwfBrGkeum9McZgaBXUt7iTvkvQHjjVT', amount=Decimal('12')).fill().sign().inject() Nov 7, 2022 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.