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

Merge did:health driver into universal resolver #387

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ uniresolver_driver_did_com_network=https://lcd-mainnet.commercio.network

uniresolver_driver_did_ev_node_url=https://polygon-mumbai.g.alchemy.com/v2/jLMUummm16stzMQjW1OB79IwuDjsJqS7
uniresolver_driver_did_ev_address_im=0x4E4f55190185f2694D331E5c9Fd70a2B75Eb4Bd2
uniresolver_driver_did_ev_base_blocks=2700000
uniresolver_driver_did_ev_base_blocks=2700000

ETHEREUM_NODE_ENDPOINT=https://goerli.infura.io/v3/fb8220b7b2934907806afc7ff635f1f0
CONTRACT_ABI=[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"_healthDid","type":"string"},{"internalType":"string[]","name":"_uris","type":"string[]"}],"name":"addAltData","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_peerAddress","type":"address"},{"internalType":"string","name":"_healthDid","type":"string"}],"name":"addDelegateAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressDidMapping","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"healthDid","type":"string"},{"internalType":"string","name":"ipfsUri","type":"string"},{"internalType":"uint8","name":"reputationScore","type":"uint8"},{"internalType":"bool","name":"hasWorldId","type":"bool"},{"internalType":"bool","name":"hasPolygonId","type":"bool"},{"internalType":"bool","name":"hasSocialId","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"}],"name":"delegateAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_healthDid","type":"string"}],"name":"getHealtDID","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address[]","name":"delegateAddresses","type":"address[]"},{"internalType":"string","name":"healthDid","type":"string"},{"internalType":"string","name":"ipfsUri","type":"string"},{"internalType":"string[]","name":"altIpfsUris","type":"string[]"},{"internalType":"uint8","name":"reputationScore","type":"uint8"},{"internalType":"bool","name":"hasWorldId","type":"bool"},{"internalType":"bool","name":"hasPolygonId","type":"bool"},{"internalType":"bool","name":"hasSocialId","type":"bool"}],"internalType":"struct Structs.HealthDID","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_healthDID","type":"string"},{"internalType":"string","name":"_uri","type":"string"}],"name":"registerDID","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_peerAddress","type":"address"},{"internalType":"string","name":"_healthDid","type":"string"}],"name":"removeDelegateAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"did","type":"string"}],"name":"resolveChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"_source","type":"string"}],"name":"stringToBytes32","outputs":[{"internalType":"bytes32","name":"_result","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"},{"internalType":"string","name":"_healthDid","type":"string"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_healthDid","type":"string"},{"internalType":"string","name":"_uri","type":"string"}],"name":"updateDIDData","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]


3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ You should then be able to resolve identifiers locally using simple `curl` reque
curl -X GET http://localhost:8080/1.0/identifiers/did:keri:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP
curl -X GET http://localhost:8080/1.0/identifiers/did:webs:peacekeeper.github.io:did-webs-iiw-tutorial:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP
curl -X GET http://localhost:8080/1.0/identifiers/did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo
curl -X GET http://localhost:8080/1.0/identifiers/did:health:000005saasas1234


You can also use an "Accept" header to request the DID document in a specific representation, e.g.:

Expand Down Expand Up @@ -175,6 +177,7 @@ Are you developing a DID method and Universal Resolver driver? Click [Driver Dev
| [did-keri](https://github.com/hyperledger-labs/did-webs-resolver) | 0.1 | [0.1](https://trustoverip.github.io/tswg-did-method-webs-specification/) | [gleif/did-keri-resolver](https://hub.docker.com/r/gleif/did-keri-resolver) | KERI |
| [did-webs](https://github.com/hyperledger-labs/did-webs-resolver) | 0.1 | [0.1](https://trustoverip.github.io/tswg-did-method-webs-specification/) | [gleif/did-webs-resolver](https://hub.docker.com/r/gleif/did-webs-resolver) | KER, Web |
| [did-content](https://github.com/KataruInc/did-content-spec) | 0.1 | [0.1](https://github.com/KataruInc/did-content-spec) | [kataru/content-did-driver](https://hub.docker.com/repository/docker/kataru/content-did-driver) | Content DID |
| [did-health](https://github.com/didhealth/health-did-resolver/blob/v2/doc/did-method-spec.md) | 2.0 | [2.0](https://github.com/didhealth/health-did-resolver/blob/v2/doc/did-method-spec.md) | [didhealth/uni-resolver-driver-did-health](https://hub.docker.com/r/didhealth/uni-resolver-driver-did-health) | did:health |

## More Information

Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,8 @@ services:
image: kataru/content-did-driver:latest
ports:
- "8148:8888"
driver-did-health:
image: didhealth/uni-resolver-driver-did-health:latest
ports:
- "8149:8080"

6 changes: 5 additions & 1 deletion uni-resolver-web/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,8 @@ uniresolver:
- pattern: "^(did:content:.+)$"
url: http://driver-did-content:8888/
testIdentifiers:
- did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo
- did:content:3SqTXtoMpiPeNo5vEP2p7yNGQUeCGjqW1wnctv8yaCWXojD29GYcUEo
- pattern: "^(did:health:.+)$"
url: http://driver-did-health:8080/
testIdentifiers:
- did:health:000005saasas1234