Skip to content
Snippets Groups Projects
Commit 90b0501c authored by Vincent Texier's avatar Vincent Texier
Browse files

issue #52 reformat code in examples

parent f11a2183
No related branches found
No related tags found
No related merge requests found
Pipeline #3558 passed
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment