question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nklompcommented, Oct 13, 2021

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.

1reaction
peacekeepercommented, Oct 13, 2021

I would recommend to also add it to the W3C DID Spec Registries:

https://w3c.github.io/did-spec-registries/#verification-method-properties

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found