[proposal] Add cosmosAddress Property in verificationMethod like a ethereumAddress
See original GitHub issue[proposal] jwt validation using cosmosAddress #204
Since Cosmos uses prefixes for addresses, it is an advantageous address system to use as did. So, after decomposing the address into prefix and remainder, we want to use it as a DID. And, like Ethereum, Cosmos would like to add the address of Cosmos to the property so that it can be verified by extracting the public key from the signature.
dsrv1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la (cosmos address) did:dsrv:1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la (did)
interface VerificationMethod {
id: string
type: string
controller: string
publicKeyBase58?: string
publicKeyBase64?: string
publicKeyJwk?: JsonWebKey
publicKeyHex?: string
publicKeyMultibase?: string
blockchainAccountId?: string
ethereumAddress?: string
cosmosAddress?: string
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In addition ethereumAddress is deprecated in favor of blockchainAccountId. The current ethr driver doesn’t even return ethereumAddress anymore. I don’t think it would be wise from an interoperability POV to add features which are very ledger specific, before you know it the verificationMethods end up with all kinds of properties. With 100+ did methods that can become quite the challenge.
https://www.w3.org/TR/did-spec-registries/#ethereumaddress
I guess I am missing the relevant split parts you mentioned. I am not entirely familiar with the Cosmos address format, but isn’t dsrv a network on cosmos and is there something like a checksum in the address? If so why not have it like many other methods and make it part of the method specific id:
did:[method]:[network]:[account, address, or hashed publickey]?
Ethereum example:
did:ethr:rinkeby:0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736
Its blockchainAccountId contains this:
0x3b0BC51Ab9De1e5B7B6E34E5b960285805C41736@eip155:4
So it is exactly the method specific ID after the :rinkeby: prefix and with the the EIP155 network id (4 = Rinkeby) attached to it, which is also the first part of the method specific id for the ethr DID method.I would recommend to also add it to the W3C DID Spec Registries:
https://w3c.github.io/did-spec-registries/#verification-method-properties