-
Notifications
You must be signed in to change notification settings - Fork 1
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
add functions in support of new ndaujs package for exchange integrators #3
base: master
Are you sure you want to change the base?
Conversation
jsLogReject(callback, "error decoding data from hex: %s", err) | ||
return | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check for correct seed length here? I don't think it's necessary, since a bad key length will just cause GenerateFromSeed
to return an error.
return | ||
} | ||
|
||
addr, err := address.Generate(address.KindExchange, key.KeyBytes()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is for general ndaujs
usage we shouldn't hard-code this as an Exchange-type key.
|
||
// Generate a high-level keypair from a given seed | ||
func GenerateFromSeed(al Algorithm, seed []byte) (public PublicKey, private PrivateKey, err error) { | ||
pubBytes, privBytes, err := al.GenerateFromSeed(seed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as earlier - is it worth it to do any kind of checking on the seed here (as in ed25519 below)? It won't any difference in the outcome, just in the error logged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few notes about error-checking for seed properties.
No description provided.