File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1- from uuid import uuid4
2-
1+ import json
32import exonum .transactions as tx
43import exonum .datatypes as exonum
54
5+ from uuid import uuid4
66from pysodium import crypto_sign_keypair
77
88from importlib import reload
2424# a.tx(secret_key)
2525
2626public_key = bytes .fromhex (
27- "0f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9"
28- )
27+ "0f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9" )
2928secret_key = bytes .fromhex (
30- "5520c351b7760aedeef32687918eb2587ab515e4ae0eeef271a0f0a99f1df3710f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9"
31- )
29+ "5520c351b7760aedeef32687918eb2587ab515e4ae0eeef271a0f0a99f1df3710f17189c062e7f3fbb47a21834d41e4d5c5388dd7db38c4de1ce732971a38ef9" )
3230
3331
3432@transactions
3533class CreateUser (metaclass = exonum .EncodingStruct ):
36- public_key = exonum .PublicKey
37- name = exonum .Str
34+ public_key = exonum .PublicKey ()
35+ name = exonum .Str ()
3836
3937
4038a = CreateUser (public_key = public_key , name = "Me" )
4139
42- import json
43-
4440print (json .dumps (a .tx (secret_key ), indent = 2 ))
41+ print ('tx hash:' , a .hash (secret_key ))
You can’t perform that action at this time.
0 commit comments