npy0 / nanopy Goto Github PK
View Code? Open in Web Editor NEWThis project forked from icarusglider/pyrai
Python implementation of NANO related functions.
Home Page: https://nanopy.rtfd.io
License: MIT License
This project forked from icarusglider/pyrai
Python implementation of NANO related functions.
Home Page: https://nanopy.rtfd.io
License: MIT License
Hello!
Couldn't find your contact info anywhere, so I'll just open an issue and ask my question. Hope that's alright.
I'm working on a REPL-type CLI light-wallet for Nano, also written in Python, that uses your PoW code.
Perhaps you'd be interested in working together?
/Robert
The only example in the community right now is nanollet. nanollet doesn't need a backend at all to access data from the network. It directly connects to the network as a peer, requests for the data it needs and publishes blocks that it wants to broadcast. All directly to the network.
I want to add a submodule in the library which provide functions with which users can add this capability to their tools.
Probably I'm doing something dumb, but it looks like the default work_difficulty in nanopy (used by block_create) might need to be updated.
When I try to do a send, the RPC response consistently includes "error": "Block work is less than threshold"
def main():
connection = nanopy.rpc.RPC(url="https://proxy.powernode.cc/proxy")
info = connection.account_info(ACCOUNT, representative=True)
balance = int(info["balance"]) - int(nanopy.nano_to_raw("5"))
if balance < 0:
raise ValueError("You're out of nano.")
balance = str(balance)
nb = nanopy.block_create(PRIVATE, info["frontier"], info["representative"], balance, nanopy.account_key(PRIMARY))
result = connection.process(nb)
print(json.dumps(result, sort_keys=True, indent=4))
Hello, I've been trying to install the library and got this error, any ideas on what it could be?
PS C:\Users\The red eye Studio> pip install nanopy
Collecting nanopy
Using cached nanopy-23.0.tar.gz (121 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for nanopy, since package 'wheel' is not installed.
Installing collected packages: nanopy
Running setup.py install for nanopy ... error
error: subprocess-exited-with-error
× Running setup.py install for nanopy did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
AMD64 True ['nanopy/blake2b/sse/blake2b.c'] ED25519_SSE2
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\nanopy
copying nanopy\ed25519_blake2b_py.py -> build\lib.win-amd64-3.10\nanopy
copying nanopy\rpc.py -> build\lib.win-amd64-3.10\nanopy
copying nanopy\__init__.py -> build\lib.win-amd64-3.10\nanopy
running build_ext
building 'nanopy.work' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\nanopy
creating build\temp.win-amd64-3.10\Release\nanopy\blake2b
creating build\temp.win-amd64-3.10\Release\nanopy\blake2b\sse
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Inanopy/blake2b/sse -IC:\Users\The red eye Studio\AppData\Local\Programs\Python\Python310\include -IC:\Users\The red eye Studio\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcnanopy/blake2b/sse/blake2b.c /Fobuild\temp.win-amd64-3.10\Release\nanopy/blake2b/sse/blake2b.obj -O3 -march=native -fopenmp
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-march=native'
cl : Command line warning D9002 : ignoring unknown option '-fopenmp'
blake2b.c
C:\Users\The red eye Studio\AppData\Local\Temp\pip-install-35b6hpji\nanopy_bb370dbcbd49440e9424d63eb8deb3d1\nanopy\blake2b\sse\blake2-config.h(73): fatal error C1189: #error: "This code requires at least SSE2."
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> nanopy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Thanks in advance :)
This would allow using the library in non-SSE2-enabled devices like a raspberry pi.
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.