mokiService_getServiceNonce
Info
This function requires the
Authorization
Header, you can read more about this header here.Returns the service nonce of the requester. The service nonce represents the number of persisted actions performed since account creation (non-message).
Parameters
NoneReturns
serviceNonce
: hex - A hexadecimal of the service nonceExample
Request
- curl
- javascript
curl https://mainnet.moki.network \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "mokiService_getServiceNonce", "params": [], "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: "mokiService_getServiceNonce",
params: [],
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": "0x1a"
}