Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/intellltech/grano-did-client
did client
https://github.com/intellltech/grano-did-client
Last synced: 22 days ago
JSON representation
did client
- Host: GitHub
- URL: https://github.com/intellltech/grano-did-client
- Owner: intellltech
- License: apache-2.0
- Created: 2024-12-25T14:44:18.000Z (26 days ago)
- Default Branch: main
- Last Pushed: 2024-12-25T15:29:15.000Z (26 days ago)
- Last Synced: 2024-12-25T16:26:17.792Z (26 days ago)
- Language: JavaScript
- Homepage:
- Size: 469 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 Client
Grano DID Client is a client library to interact with [grano-did-contract](https://github.com/intellltech/grano-did-contract). It wraps [CosmJS](https://github.com/cosmos/cosmjs) client library.## How to Use
0. Start [grano did node](https://github.com/intellltech/grano-did-node) with [grano-did-contract](https://github.com/intellltech/grano-did-contract) is deployed.1. Set grano did node access configuration in `.env`
```env
END_POINT='http://localhost:26657'
DENOM='ugrano'
MNEMONIC='estate giraffe icon february goat observe actor left armed zone million note system myth coconut series calm steak dinosaur twin immune mansion morning drastic'
PREFIX='grano'
FROM_ADDRESS='grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev'
```2. Call Client
```index.js
const { GranoDidClient } = require('@intellltech/grano-did-client')const main = async () => {
const granoDidClient = await GranoDidClient.createFulfilled()const controllerParams = {
contractAddress: 'grano1cefw8elvkj8t63k5ea2mlpkgyxgjlw2g4vw5l7j3txu925ug9ffskc6vhc',
identifier: 'grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev',
}
const queryControllerResult = await granoDidClient.controller(controllerParams)console.dir(queryControllerResult, { depth: null })
}main()
```Please check [trials](./trials) folder to know more examples about how to interact with the grano did node.
## Sample Response
```js
{ controller: 'grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev' }
```## References
- https://github.com/intellltech/grano-did
- https://github.com/intellltech/grano-did-contract
- https://github.com/intellltech/grano-did-exporter
- https://github.com/intellltech/grano-did-node
- https://github.com/intellltech/grano-did-resolver