Commit a difficulty
/mining/commitmentapi_keyRegisters this miner with diff as its first commitment, or replaces its commitment with diff. The response gives the heights the new commitment acts at.
A registration locks 0.001 ERG in this miner's data box and pays a 0.001 ERG network fee. A change pays the network fee.
Refused with 409 while state.autoCommit is on, since it keeps the commitment at stratum.diff.
Request body
CommitmentRequest · application/jsondiffstringrequiredA number and one of K, M, G, T or P, as
stratum.diffis written.
Responses
200The transaction was sent. With `outcome` uncertain the node's answer was lost and it may still confirm: read `GET /mining/commitment` before sending again.CommitmentResult▶
txIdstringrequiredkindstringrequiredone ofregistrationchangeoutcomestringrequiredThe node's answer.
uncertainmeans it was lost and the transaction may still confirm.one ofaccepteduncertainscorestringrequireddecimal stringdiffstringrequiredsentAtHeightintegerrequiredThe tip the transaction was built at.
declaredHeightintegerrequiredservedFromHeightintegerrequiredThe first block the stratum mines at this score.
inForceFromHeightintegerrequiredThe first height whose rollups judge NISPs against this commitment.
replaceableFromHeightintegerrequiredThe first tip the next change can be sent from.
400Malformed body, a `diff` that does not parse, or a `diff` that is already the newest commitment.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
403The api_key header is missing or wrong.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
409`state.autoCommit` is on, an earlier registration or change has not settled, another request is being sent, or the chain moved between the read and the send. Read `GET /mining/commitment` and retry.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
422The newest commitment cannot be replaced yet, `state.disableTransforms` is on, the wallet cannot pay, or the node refused the transaction.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503The commitment or the Miner Dictionary could not be read, or the transaction engine did not answer.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
defaultErrorApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description