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

Pass pubKey via prefunded_accounts #262

Closed
renlulu opened this issue Dec 3, 2020 · 5 comments
Closed

Pass pubKey via prefunded_accounts #262

renlulu opened this issue Dec 3, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@renlulu
Copy link
Contributor

renlulu commented Dec 3, 2020

Is your feature request related to a problem? Please describe.

Since our signature algorithm needs sender public key to join the encoding part, so currently I am using account_identifier's metadata to let rosetta-cli aware of this info and it does work. But this will cause a side effect that we should ensure all account_identifier has this metadata, but that cannot happen in the confirmed transaction as it just doesn't contain it. That means I cannot make derive api contain pubKey too. So I would like to ask if there is another way to pass pubKey else in the json file.

 "prefunded_accounts": [
   {
    "privkey": "******",
    "account_identifier": {
     "address": "c18273C95DE42Eb979E99f8842aA0cF7343Cb42e",
     "metadata": {
      "pubKey": "03ac3d6f2fed0102253d7658de77d802ec6cd6d8f5bdd056ae342540be3d00ae3f"
     }
    },
    "curve_type": "secp256k1",
    "currency": {
       "symbol":"ZIL",
       "decimals":12
    }
   }
  ]
@renlulu renlulu added the enhancement New feature or request label Dec 3, 2020
@patrick-ogrady
Copy link
Contributor

Since our signature algorithm needs sender public key to join the encoding part, so currently I am using account_identifier's metadata to let rosetta-cli aware of this info and it does work.

Can you not derive the pubKey from the provided privKey?

We already added a change to the specification that allows an implementation to request the pubKeys of specific AccountIdentifiers during construction. Are you using it (if so, what is missing)?:

The rosetta-cli fully supports this btw ^^^

@renlulu
Copy link
Contributor Author

renlulu commented Dec 4, 2020

Oh I am not using it. Yes, I can drive the pubKey from the privKey. I was researching a way to get the private key from config but could not though. Will take a look at your PRs. Thanks!

@patrick-ogrady
Copy link
Contributor

Closing this for now...happy to answer any other questions!

@renlulu
Copy link
Contributor Author

renlulu commented Dec 7, 2020

OH! it works, thanks a lot.

@patrick-ogrady
Copy link
Contributor

Very cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants