moki_getIdentity
Returns information for an identity.
Parameters
address
: address - Address of identity
Returns
identity
: object - Identity ObjectpublicKey
: hex - Public Key of identitydeligate_public_key
: hex - Public Key of deligate identityservice_id
: address - Address of service
Example
Request
- curl
- javascript
curl https://mainnet.moki.network \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "moki_getIdentity", "params": ["0x22a4dc6353e087A5c37c7168bCF149e9342eB922"], "id": 1}'
import fetch from "node-fetch"
fetch("https://mainnet.moki.network", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
method: "moki_getIdentity",
params: ["0x22a4dc6353e087A5c37c7168bCF149e9342eB922"],
id: 1,
}),
})
.then((response) => response.json())
.then((data) => {
console.log(data)
})
.catch((error) => {
console.error(error)
})
Reponse
Example Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"public_key": "0x0256c1229c7554e0ccb61f626d1dd9ab46cd2c631f1cab839cb5a283803ef03924",
"deligate_public_key": "0x02c6047f9441ed7d6d3045406e95c07cd85a9c0d6d0f77c3f4d5f5cbdc0e5f6b6a",
"service_id": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f"
}
}