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

Suggestion: Make did:pkh completely based on new caip10 spec #238

Closed
oed opened this issue Jul 28, 2021 · 8 comments · Fixed by #286
Closed

Suggestion: Make did:pkh completely based on new caip10 spec #238

oed opened this issue Jul 28, 2021 · 8 comments · Fixed by #286

Comments

@oed
Copy link
Contributor

oed commented Jul 28, 2021

So this is mostly just an idea that I think would simplify things, however the caip10 spec is not yet settled.

Suggestion: make the DID PKH be represented as:

did:pkh:<caip-10-account-id>

This would mean that we always include the chainId, so it may break existing identifiers, but it would make the PKH spec much more clear!

Examples

// ethereum mainnet
did:pkh:evm:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb

A benefit of using this approach is that we automatically can support new blockchains that are added to the CAIP repo without having to change the PKH spec at all.

Note, this is based on the discussion taking place here: ChainAgnostic/CAIPs#51

@wyc
Copy link
Contributor

wyc commented Jul 28, 2021

Great suggestion. I think we can perhaps add :caip10: as a submethod....or perhaps default to caip10 methods if not explicitly defined in did-pkh. This would allow the specification some flexibility to work with non-CAIP/non-blockchain PKH reprs, such as GPG fingerprints.

# explicitly mention CAIP-10
did:pkh:caip10:evm:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb
# fallback to CAIP-10
did:pkh:evm:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb
# new CAIP DID method
did:caip10:evm:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb
did:blockchain:evm:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb

I'm okay with a lot of these, but prefer explicitness where possible.

@oed
Copy link
Contributor Author

oed commented Jul 29, 2021

I would prefer if we don't end up with a lot of different ways to represent a single account-id. Imo we should select one of these options and stick with it!

See your point on non-CAIP PKHs though. In theory we could create caip10 specs for these as well. This is the case for Radicle which is not a blockchain id. If we could converge between caip10 and did:pkh it would be awesome since it seems we are trying to achieve a lot of similar things.

@wyc
Copy link
Contributor

wyc commented Jul 30, 2021

Agreed! I like the idea that we accept CAIP-10 registration as a top-level submethod, e.g., did:pkh:evm:1:... but we should accept that the same priv key for a bitcoin address e.g. can be used for Ethereum due do both using the secp256k1 curve.

+1 to convergence

@bumblefudge
Copy link
Contributor

Closed by #252

@oed
Copy link
Contributor Author

oed commented Aug 24, 2021

@bumblefudge This should not be closed by #252! The main thing that needs to be update in the spec is how DIDs are represented.

@bumblefudge bumblefudge reopened this Aug 24, 2021
@bumblefudge
Copy link
Contributor

bumblefudge commented Aug 24, 2021

My mistake! Will update the spec ASAP to reflect the code as soon as the changes have been fully integrated

@oed
Copy link
Contributor Author

oed commented Aug 24, 2021

Thanks :)

@wyc
Copy link
Contributor

wyc commented Sep 2, 2021

Let's try to get this next week. cc @bumblefudge

This was linked to pull requests Sep 9, 2021
@clehner clehner mentioned this issue Sep 9, 2021
1 task
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

Successfully merging a pull request may close this issue.

3 participants