Skip to main content

moki_getService

Returns information for a service.

Parameters

  • address: address - Address of service

Returns

service: object - Service Object
  • id: address - Address of service
  • publicKey: hex - Public Key of service
  • deligate_id: address - Address of deligate identity
  • deligate_public_key: hex - Public Key of deligate identity
  • metadata: object - Metadata for service
    • url: string - URL of service
    • icon: string - URL of icon for service (png, jpg, webp)
  • offering: object - Offering details
    • retention_days: number - Days of message retention
    • cost: object - Optional cost data, null means the service is free

Example

Request

curl https://mainnet.moki.network \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "moki_getService", "params": [], "id": 1}'

Reponse

Example Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"id": "0x22a4dc6353e087A5c37c7168bCF149e9342eB922",
"public_key": "0x92e4dc6353e087A5c37c7168bCF149e9342eB922",
"deligate_id": "0x92e4dc6353e087A5c37c7168bCF149e9342eB922",
"deligate_public_key": "0x92e4dc6353e087A5c37c7168bCF149e9342eB922",
"metadata": {
"url": "https://example-service.com",
"icon": "https://example-service.com/images/icon.png"
},
"offering": {
"retention_days": 365,
"cost": null
}
}
}