Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(access-api): access-api version endpoint has publicKey property (#…
…317) ...which is always the underlying did:key publicKey, even if signer.did() is a did:web Motivation * #316 * historically there has been a `did` property, which is (historically) always a `did:key` (so a public key) * now we deal with non-key dids like `did:web`. So the did may not be identical to the public key (you have to resolve a `did:web` to determine its pubkeys) * we should have a property that is explicitly only ever a public key (serialized as a `did:key` string) * e.g. for code like this to rely on: https://github.com/web3-storage/w3protocol/blob/main/packages/access-client/src/cli/utils.js#L40 (which I think will break when version endpoint's `did` property is a `did:web`) Rants * try to avoid calling things 'did' when you mean 'public key'. Or assuming that things called 'did' will always be a `did:key` * we often say 'did' or 'did:key' when we mean 'keypair', which is confusing because: * 1. a 'did' may have zero keypairs * 2. a 'did:key', on its own, has no private key. You can't make a 'signer' from only a `did:key` string.
- Loading branch information