Questions tagged [python]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Changes upcoming with version 8 - changelog item When the client asks for a password

This item is listed in the change log for v8, "When the client asks for a password, it no longer tries to hide its input if the client was not run from a terminal, which allows for use in a ...
1
vote
1answer
34 views

How to compare a mutez value with int in smartpy

When trying to check the transferred value is positive I get an error that TMutez is not TIntOrNat.: sp.verify(sp.amount > 0, "Amount should be positive")
2
votes
1answer
100 views

Why does smartpy use sp.for/sp.while instead of the default loops provided by python?

So I just started out with smartpy and I am kinda confused about the point of having separate expression for loops. My understanding is that it is may be because it's a part of on-chain computations, ...
1
vote
2answers
89 views

How to total smartpy.TMutez type stored as values in smartpy.bigmap?

I have the following smartpy.bigmap in smart contract storage: import smartpy as sp self.data.init(bgmp=sp.bigmap(tkey=sp.TAddress,tvalue=sp.TMutez)) I would like to total all the stored tvalue so ...
2
votes
2answers
110 views

How to connect to sandboxed server with pytezos?

I'm trying to use pytezos with sandboxed tezos server. Pytezos requires the following arguments for connection: shell, set to http://localhost:18731/ key, which I can't figure out I tried the ...
4
votes
2answers
171 views

Unable to get consistent tz2 (secp256pk1) signature

I am trying to reproduce the signing algorithm used for tz2 address which uses the secp256pk1 elliptic curve. My problem is that when I try to verify if the signature is valid with the tezos cli, I ...
3
votes
1answer
365 views

Creating public key hash

Could somebody please point me to a piece of working Python 3.7 code that generates a Tezos public key hash out of seed, password and e-mail address? Everything I could find so far is always a mix of ...
2
votes
1answer
69 views

Can inject operation but can't preapply operation, returns 400

I can inject an operation but can't preapply an operation, it returns 400. I checked the body's format and it's OK. Why does this rpc return 400? I can inject the operation.
7
votes
3answers
273 views

How do I base58 encode the chain ID using Python?

When Tezos needs to sign a baking or endorsement operation payload, byte 0 will be a 0x01 for a baking operation or 0x02 for an endorsement operation. Bytes 1-5 in the operation payload contain the ...