Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate the 192 bits X-API-SIG header (/api/v3/apiKey) #20

Open
26medias opened this issue Nov 29, 2021 · 1 comment
Open

How to generate the 192 bits X-API-SIG header (/api/v3/apiKey) #20

26medias opened this issue Nov 29, 2021 · 1 comment

Comments

@26medias
Copy link

26medias commented Nov 29, 2021

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!

@yueawang
Copy link
Contributor

yueawang commented Dec 2, 2021

We have the api call here

def get_apiKey(self):
. You can flow the whole process to make your code work.
Generally speaking, It is to sign the hash string of the whole request. The pseudo code is like

x_api_sig = eddsa_sign(poseidon_hash(sha256(url_request_string)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants