Grano DID Client is a client library to interact with grano-did-contract. It wraps CosmJS client library.
-
Start grano did node with grano-did-contract is deployed.
-
Set grano did node access configuration in
.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'
- Call Client
const { GranoDidClient } = require('@eg-easy/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 folder to know more examples about how to interact with the grano did node.
{ controller: 'grano14fsulwpdj9wmjchsjzuze0k37qvw7n7am3reev' }