You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking for a way to generate a Principal from ed25519 Public Key bytes. I can't find it in the code (and the readme is out of date for Principals) and think this was originally intended to encode ed25519 public key bytes with 0xed, but it does not do what the comment implies it should do:
If this is elsewhere in the codebase I must have missed it, but if not, please consider this issue is raised to add this functionality to create tagged, encoded Principals from raw bytes. Thanks!
The text was updated successfully, but these errors were encountered:
Am I correct with creating a Principal like this, the code seems to work:
Yeah that seems reasonable!
We do not have a function to do exactly what you're looking for because we store tagged keys so that when importing them we don't need to have additional context about what kind of key it is.
I suppose we could add such a function, but I'm bit hesitant because lib is trying to abstract actual key algorithms with a universal interface. Importing raw keys obviously not going to work universally, but that's not so say we can't add a function to linked module to do just that.
For context, my use case is essentially: "Here is my public key, can you please send me a UCAN?" which is coming from someone who generated their keypair outside the library (so it wouldn't be tagged yet).
Hi all,
I've been looking for a way to generate a
Principal
fromed25519
Public Keybytes
. I can't find it in the code (and the readme is out of date forPrincipals
) and think this was originally intended to encode ed25519 public key bytes with0xed
, but it does not do what the comment implies it should do:https://github.com/web3-storage/ucanto/blob/582c4c504d2e75feee2c5d298ea08b2f01ff1c5e/packages/principal/src/ed25519/verifier.js#L61-L66
Am I correct with creating a Principal like this, the code seems to work:
If this is elsewhere in the codebase I must have missed it, but if not, please consider this issue is raised to add this functionality to create tagged, encoded Principals from raw bytes. Thanks!
The text was updated successfully, but these errors were encountered: