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

Is there any way to create the neutered extended key by the public key? #23

Open
thomas-tran opened this issue Apr 24, 2020 · 2 comments
Labels
question Further information is requested

Comments

@thomas-tran
Copy link

Hi,

From the extended key we can get the private and public key in buffer and convert it to hex. Is there anyway that we can recreate the neutered extended key from either private key or public key hex?

The issue if some one send me the hash message, the signature and provide the public key. I need to verify it. In order to create the account, the Wallet only accept the extended key.

@evias
Copy link
Contributor

evias commented Apr 24, 2020

Hello, following should be of help, please don't hesitate if any more question:

const key = new NodeEd25519(
            undefined, // privateKey (D part)
            this.publicKey, // publicKey (Q part)
            this.chainCode,
            Network.CATAPULT,
            0, // depth
            0, // index
            0x00000000, // parentFingerprint
        );

using the above you can then instantiate a neutered extended key: new ExtendedKey(key, Network.CATAPULT)

@evias evias added the question Further information is requested label Apr 24, 2020
@thomas-tran
Copy link
Author

thomas-tran commented Apr 24, 2020

Hi evias,

Assume I only got the public key in hex. What's the chaincode? How can I construct the NodeEd25519 without knowing the chaincode ?

Another question is can the wallet holds multiple account or 1 wallet only had 1 account?

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

No branches or pull requests

2 participants