Commit 90b0501c authored by Vincent Texier's avatar Vincent Texier

issue #52 reformat code in examples

parent f11a2183
Pipeline #3558 passed with stages
in 1 minute and 47 seconds
......@@ -4,7 +4,6 @@ from duniterpy.key import SigningKey
################################################
if __name__ == '__main__':
# prompt hidden user entry
salt = getpass.getpass("Enter your passphrase (salt): ")
......@@ -16,5 +15,3 @@ if __name__ == '__main__':
# Display your public key
print("Public key for your credentials: %s" % key.pubkey)
......@@ -9,6 +9,7 @@ from duniterpy.api import bma
# Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
################################################
......@@ -70,6 +71,7 @@ async def main():
# Close client aiohttp session
await client.close()
# Latest duniter-python-api is asynchronous and you have to use asyncio, an asyncio loop and a "as" on the data.
# ( https://docs.python.org/3/library/asyncio.html )
asyncio.get_event_loop().run_until_complete(main())
......@@ -67,8 +67,6 @@ async def main():
print("{:}:{:}".format(str(e.__class__.__name__), str(e)))
# Latest duniter-python-api is asynchronous and you have to use asyncio, an asyncio loop and a "as" on the data.
# ( https://docs.python.org/3/library/asyncio.html )
asyncio.get_event_loop().run_until_complete(main())
......@@ -7,7 +7,6 @@ import libnacl.sign
SIGNED_MESSAGE_FILENAME = 'duniter_signed_message.bin'
if __name__ == '__main__':
# prompt hidden user entry
salt = getpass.getpass("Enter your passphrase (salt): ")
......
......@@ -30,7 +30,7 @@ password = getpass.getpass("Enter your password: ")
pubkey = input("Enter your public key: ")
# init signer instance
signer = SigningKey(salt, password)\
signer = SigningKey(salt, password)
# check public key
if signer.pubkey != pubkey:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment