did-extensions
did-extensions copied to clipboard
blockchainAccountId example to support cosmos blockchains
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 https://github.com/OR13/lds-blockchain2021/pull/3
https://github.com/decentralized-identity/did-jwt/pull/205
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.