loopring / hello_loopring Goto Github PK
View Code? Open in Web Editor NEWhello_loopring
hello_loopring
Hi,
I have exported my account data, I can run the basic keygen example (using python poseidon_hash_sample.py -a sign -i 1,2,3 -k 0x1
), however I'm confused as to what data from my account settings (Public X, public Y, Private EDDSA) to pass to the keygen and in which format.
The doc seems to be missing that part.
My goal is to obtain my API key via /api/v3/apiKey, so I can then connect to the websockets (https://docs.loopring.io/en/websocket/overview.html)
Thanks!
Hi, I've been using this example to create a LoopringAPI C# wrapper so that us non-python folk can have some of that Loopring fun. Link here https://github.com/taranasus/LoopringAPI
I've been using this python repo as the basis and test example. Here's the thing. The code works for production just fine, but for uat2 it generates the wrong ECDSA signature. It happens for both the python code linked above and the C# method i've made linked here: https://github.com/taranasus/LoopringAPI/blob/2bf91fb432907ec68662fb31e4dfbe4e1fe45c6d/LoopringAPI/SecureClient.cs#L539
It's been driving me nuts to try and come to this conclusion, as you'd expect the example code in python to work and I was running under the assumption that I was being dumb. but no.
Can you please have a look at this python example and see why it won't work with uat2, so we all know what went wrong.
How's it going mate can I have my ether back now ๐ค ๐ ๐ณ ๐ฌ ๐?
Hello,
it would be great if the package could be installable via pip
, either hosted on PyPI (voluntary) or at least from the repo directly. It would need a setup.py
that has all the necessary information for pip
.
Installation example via PyPI:
pip install hello_loopring
Installation example via repo:
pip install git+https://github.com/Loopring/hello_loopring
This way it could automatically be used as a dependency in other tools, such as trading frameworks.
Much of the code is currently unusable as-is.
Example 1: the REST API Endpoint that's hard-coded into the client isn't even a real domain: https://github.com/Loopring/hello_loopring/blob/loopring-v3/sdk/loopring_v3_client.py#L25
Example 2: the command line explorer isn't even usable as-is, because it can't import sdk
from that folder structure.
Anyone wanting to use the code would need to download and tweak it. That's sad, when it can be made usable with hopefully just minor tweaks.
I could submit a PR if you like.
Thank you.
Hello, I was trying the trading example in my local machine and started downloading the python dependencies manually as soon as I get some ModuleNotFoundError
.
At some point I got something like ImportError: cannot import name 'keccak'
, so searching for it on internet I installed pycryptodome
, but got next error:
Traceback (most recent call last):
File "trading/trading_example.py", line 3, in <module>
from trading.loopring_rest_sample import LoopringRestApiSample
File "/home/erick/src/hello_loopring/trading/loopring_rest_sample.py", line 19, in <module>
from ethsnarks.eddsa import PureEdDSA, PoseidonEdDSA
File "/home/erick/src/hello_loopring/ethsnarks/eddsa.py", line 10, in <module>
from .mimc import mimc_hash
File "/home/erick/src/hello_loopring/ethsnarks/mimc/__init__.py", line 1, in <module>
from .permutation import mimc, mimc_hash, mimc_hash_md
File "/home/erick/src/hello_loopring/ethsnarks/mimc/permutation.py", line 32, in <module>
assert H(123) == 38632140595220392354280998614525578145353818029287874088356304829962854601866
File "/home/erick/src/hello_loopring/ethsnarks/mimc/permutation.py", line 29, in H
hashed = keccak_256(data).digest()
File "/home/erick/src/hello_loopring/ethsnarks/sha3.py", line 7, in <lambda>
keccak_256 = lambda *args: keccak.new(*args, digest_bits=256)
TypeError: new() takes 0 positional arguments but 1 was given
Looking at the code here I found it could be solved installing pysha3
instead. But I think it should be checked in order to support pycryptodome
as it suppose to be.
Also, it would be fine to have a requirements.txt
file.
Thanks :)
File ".../hello_loopring/ethsnarks/sha3.py", line 7, in <lambda>
keccak_256 = lambda *args: keccak.new(*args, digest_bits=256)
TypeError: new() takes 0 positional arguments but 1 was given
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.