client.get_version stratum method explain and example

Follow and share now!

client.get_version is one of the in the stratum protocol defined method, used by encrypted currency mining pools to ask a mining software for her identity.

Function of client.get_version:

This as JSON decoded method call has no parameters and just a string as response. This string should contain the name and version number of the mining software.

client.get_version call:

Hint:

Extra line-wrapping for readability. Spaces get ignored, a call ends with a line feed. (UTF-8 10/0x0A)

Description:

{
	"id": <something>,
	"method": "client.get_version",
	"params": [ ]
}
(\n)

It is a usual stratum command. The map field id should contain anything others than null, you didn’t used before. The response will contain the same object you send, the usual way is to use an increasing number. The field method contains the name of the method to call and params is an empty list, since this method has no arguments.

Example:

{
	"id": 5,
	"method": "client.get_version",
	"params": [ ]
}
(\n)

client.get_version response:

Description:

{
	"id": <the same as above>,
	"result": <the identity of the miner>,
	"error": null
}
(\n)

The field id is the same as the request had. result contains the answer as a string and error is null, assumed there was no error.

Example:

{
	"id": 5,
	"result": "cgminer/4.11.1",
	"error": null
}
(\n)


Post Your Comment Here

Your email address will not be published. Required fields are marked *