All the Xatum connections are secured by TLS. Self-signed certificates are accepted, but the miner can show the certificate fingerprint to the user or verify it via configuration for protection against MITM attacks.
Packets are separated by \n.
A packet is formed by a "method string", followed by tilde ("~") and then the JSON message.
-
Client connects via TCP with TLS.
-
Client sends handshake packet with JSON
-
Server validates handshake, and then starts responding with jobs
C2S: Client To Server S2C: Server To Client
xel/0: XelisHash, first version
BlockMiner represents a block to mine, has a fixed length of 112 bytes. The miner must insert the timestamp and increase the nonce, while the workhash, extranonce and publickey are given by the pool in the job and miner must not change them.
workhash: 32 bytes 0-31 timestamp: 8 bytes 32-39 nonce: 8 bytes 40-47 extranonce: 32 bytes 48-79 publickey: 32 bytes 80-111
shake~{
"addr": "xel:myAddress", // Address: wallet address
"work": "x", // Worker: worker name, by default "x"
"agent": "xmrig/v0.1.0", // Useragent: the mining software
"algos": [ // Algos: list of supported algorithms
"xel/0", "rx/0"
]
}job~{
"algo": "xel/0", // algorithm of the job
"diff": 15021, // difficulty of the job
"blob": "base64", // xelis blob, which embeds work hash, extra nonce and public key (96 bytes) encoded as base64 string
}submit~{
"data": "base64", // the 112-bytes BlockMiner encoded as base64 string
"hash": "hex", // the 32-bytes PoW hash of BlockMiner encoded as hex string
}This packet is sent to miner when a share is submit, to tell if operation is successful or not.
success~{
"msg": "ok" // "ok" if share is good, otherwise msg contains the error message
}This packet makes the miner print some information. Usually used before kicking the client, to send the error message. Can also send warnings.
print~{
"msg": "example message!", // this message will be printed in miner console
"lvl": 1, // log level, 0: verbose, 1: info, 2: warn, 3: error
}Sent by server, can be used to measure latency and check if connection is alive.
ping~{}
A reply to the ping packet. If the client does not send the packet, server may interrupt the connection.
pong~{}
These features aren't yet implemented into software, but are open to discussion and may, or may not, be added in a future version.
Used to redirect to another server address. Useful for pool-side load balancing. It works in a similar way to HTTP's Temporary Redirect.
redirect~{
"to": "IP:PORT" // the client will disconnect from the pool and connect to the new address
}