stjet / nanohakase Goto Github PK
View Code? Open in Web Editor NEWNanohakase is a python library for the Nano cryptocurrency. It aims to be the simplest Nano library out there, and is a self fork of Bananopie.
License: MIT License
Nanohakase is a python library for the Nano cryptocurrency. It aims to be the simplest Nano library out there, and is a self fork of Bananopie.
License: MIT License
Hey, I'm having an issue gettin the library to send XNO. It used to work, but since a few months it's returning a non-hexadecimal number error:
nrpc = nanoRPC("https://app.natrium.io/api")
nano_key = nanoWallet(nrpc, seed="XXXXX", index=0)
print(nano_key.get_balance())
print(nano_key.send("nano_3pdripjhteyymwjnaspc5nd96gyxgcdxcskiwwwoqxttnrncrxi974riid94", "0.001"))
{'balance': '2594130159959955286961', 'pending': '0', 'receivable': '0'}
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/__main__.py", line 7, in <module>
run()
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/app/base.py", line 236, in run
super().run()
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 58, in __init__
self.setup(app)
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 118, in setup
self.app.wsgi()
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/debian/.local/lib/python3.9/site-packages/gunicorn/util.py", line 371, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/debian/duino-coin-master-server/app.py", line 562, in <module>
print(nano_key.send("nano_3pdripjhteyymwjnaspc5nd96gyxgcdxcskiwwwoqxttnrncrxi974riid94", "0.001"))
File "/home/debian/.local/lib/python3.9/site-packages/nanohakase/wallet.py", line 50, in send
block_hash = hash_block(block)
File "/home/debian/.local/lib/python3.9/site-packages/nanohakase/util.py", line 110, in hash_block
blake_obj.update(hex_to_bytes(padded_balance))
File "/home/debian/.local/lib/python3.9/site-packages/nanohakase/util.py", line 65, in hex_to_bytes
return bytes.fromhex(hex)
ValueError: non-hexadecimal number found in fromhex() arg at position 8
I believe this is a bug in the library, as it used to work fine and my code hasn't changed. Can you maybe take a look at it in your free time?
Update nanohakase from the upstream bananopie repo. Unfortunately I didn't make this a fork so it's gonna be a bit tricky.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.