https://github.com/intellltech/grano-did-contract
CosmWasm based DID (Decentralized Identifier) and DID document implementation
https://github.com/intellltech/grano-did-contract
Last synced: 4 months ago
JSON representation
CosmWasm based DID (Decentralized Identifier) and DID document implementation
- Host: GitHub
- URL: https://github.com/intellltech/grano-did-contract
- Owner: intellltech
- License: apache-2.0
- Created: 2024-12-25T14:45:33.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-25T15:30:18.000Z (6 months ago)
- Last Synced: 2024-12-25T16:26:25.307Z (6 months ago)
- Language: Rust
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Grano DID Contract
Grano DID Contract is cosmwasm based did (decentralized identifier) implementation inspired by [ERC1056 DIDRegistry implementation](https://github.com/uport-project/ethr-did-registry/blob/develop/contracts/EthereumDIDRegistry.sol).
**WARNING**: Grano DID Contract is under VERY ACTIVE DEVELOPMENT and should be treated as pre-alpha software. This means it is not meant to be run in production, its APIs are subject to change without warning and should not be relied upon, and it should not be used to hold any value.
## Test Contract
```
sh scripts/check.sh
```## Build Contract
```
sh scripts/build.sh
```## Start local chain
It is required to install [grano-did-node](https://github.com/intellltech/grano-did-node) first.
```
sh scripts/start.sh
```## Deploy & Interact with Contract
```
sh scripts/wasm.sh
```## Msg Type
### Query
#### controller
```json
{
"controller": {
"identifier": "grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev"
}
}
```#### attribute
```json
{
"attribute": {
"identifier": "grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev",
"name": "service"
}
}
```#### validTo
```json
{
"valid_to": {
"identifier": "grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev",
"name": "service",
"value": "github"
}
}
```#### changed
```json
{
"changed": {
"identifier": "grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev"
}
}
```### Execute
#### changeController
```json
{
"change_controller": {
"identifier": "grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev",
"new_controller": "grano1m2pz9nj72lj2yxnpcmxqwfwk50v35gq7wd399m"
}
}
```#### setAttribute
```json
{
"set_attribute": {
"identifier": "grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev",
"name": "service",
"value": "github",
"validity": 1000
}
}
```#### revokeAttribute
```json
{
"revoke_attribute": {
"identifier": "grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev",
"name": "service",
"value": "github"
}
}
```## References
- https://github.com/intellltech/grano-did
- https://github.com/intellltech/grano-did-client
- https://github.com/intellltech/grano-did-exporter
- https://github.com/intellltech/grano-did-node
- https://github.com/intellltech/grano-did-resolver