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

feat: add ability to use a compressed publicKey as identifier #73

Merged
merged 1 commit into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions doc/did-method-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,27 @@ The method specific identifier is represented as the Hex-encoded Ethereum addres
on the target network.

ethr-did = "did:ethr:" ethr-specific-idstring
ethr-specific-idstring = [ ethr-network ":" ] ethr-address
ethr-network = "mainnet" / "ropsten" / "rinkeby" / "kovan"
ethr-address = "0x" 40*HEXDIG
ethr-specific-idstring = [ ethr-network ":" ] ethereum-address / public-key-hex
ethr-network = "mainnet" / "ropsten" / "rinkeby" / "kovan" / network-chain-id
network-chain-id = "0x" *HEXDIG
ethereum-address = "0x" 40*HEXDIG
public-key-hex = "0x" 66*HEXDIG

The Ethereum address is case-insensitive.
The Ethereum address or publicKeyHex are case-insensitive.

Note, if no public Ethereum network was specified, it is assumed that the DID is anchored
on the Ethereum mainnet per default. This means the following DIDs will resolve to the same
DID Document:

did:ethr:mainnet:0xb9c5714089478a327f09197987f16f9e5d936e8a
did:ethr:0x1:0xb9c5714089478a327f09197987f16f9e5d936e8a
did:ethr:0xb9c5714089478a327f09197987f16f9e5d936e8a

If the identifier is a `public-key-hex`:
* it MUST be represented in compressed form (see https://en.bitcoin.it/wiki/Secp256k1)
* the corresponding `ethereumAddress` entry is also added to the default DID document, unless the `owner` has been changed to a different address.
* all CRUD operations MUST be made using the corresponding `ethereumAddress` and MUST originate from the correct `owner` address.

## CRUD Operation Definitions

### Create (Register)
Expand Down
Loading