Skip to content
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

blockchainAccountId example to support cosmos blockchains #347

Open
daoauth opened this issue Oct 20, 2021 · 1 comment
Open

blockchainAccountId example to support cosmos blockchains #347

daoauth opened this issue Oct 20, 2021 · 1 comment

Comments

@daoauth
Copy link
Contributor

daoauth commented Oct 20, 2021

Since Cosmos blockchains use 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.

Cosmos blockchain address (prefix is dsrv)
dsrv1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la

DID
did:dsrv:1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la

blockchainAccountId for verification
cosmos:dsrv:1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la

{
  "@context":[
    "https://www.w3.org/ns/did/v1",
    "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020#"
  ],
  "id":"did:dsrv:1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la",
  "publicKey":[{
    "id": "did:dsrv:1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la",
    "controller": "did:dsrv:1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la",
    "type": "EcdsaSecp256k1RecoveryMethod2020",
    "blockchainAccountId":"cosmos:dsrv:1zp78zmtj4a7qvs4p2s08ngjn9rcwpaf5k9d0la"
  }]
}

sample code
OR13/lds-blockchain2021#3

decentralized-identity/did-jwt#205

@daoauth daoauth changed the title blockchainAccountId example to support comos blockchains blockchainAccountId example to support cosmos blockchains Oct 20, 2021
@wip-abramson
Copy link

The blockchainAccountId has been added as a verificationMethod property in the registry - https://www.w3.org/TR/did-spec-registries/#blockchainaccountid.

Suggest this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants