LithosDocs
ProtocolPayoutsTokenStatsDocs
Start mining
Documentation home
Protocol
  • Lithos Protocol
  • LFSM
    • Rollups
    • NISPs
    • Emissions
    • Mining on Lithos
    • Candidate building
    • Ergo Voting
  • LithosDex
    • Trading with orders
    • Providing liquidity
Run Lithos
  • Startup guide
    • Setting up an Ergo testnet node
  • Configuration
    • Node connection and security
    • Stratum and difficulty
    • Block packages
    • Batching and orders
    • Collateral and emission
    • Wallet and consolidation
    • Statistics and web panels
    • Synchronization and storage
    • Tasks and dispatchers
    • Failure modes
    • Reporting issues
Client API
  • Overview
    • getLithos client information
    • getList UTXO ids for blocks
    • getUTXO ids by block height
    • getBlock info by UTXO id
    • postBlock info for multiple UTXO ids
    • getGet a block's miner set
    • getList all pool blocks
    • getGet Lithos payouts
    • getStatistics overview
    • getMining and payment totals
    • getMining statistics by hour or day
    • getEstimate Lithos hashrate
    • getNetwork difficulty by epoch
    • getThis client's own hashrate
    • getThis client's hashrate over time
    • getThis client's payouts and claims
    • getCollateral inventory
    • getLocal mining activity
    • getCollateral market snapshot
    • getList queue boxes
    • getList the active set
    • getPermit price history
    • getYour locked block rewards
    • postClaim unlocked block rewards
    • postQuote joining the queue
    • postJoin the collateral queue
    • getLithosDex pool state
    • getLithosDex fee vault state
    • getList your outstanding orders
    • postQuote a swap order
    • postPlace a swap order
    • postQuote a deposit order
    • postPlace a deposit order
    • postQuote a redeem order
    • postPlace a redeem order
    • postCancel an order
    • postQuote a swap
    • postQuote a swap by desired output
    • postExecute a swap
    • postQuote a liquidity deposit
    • postDeposit liquidity
    • postQuote a liquidity redemption
    • postRedeem liquidity
    • getList liquidity provisions
    • postClaim settled fees for a provision
    • postQuote a provision resize
    • postResize a provision
    • postCheck a pending fee flush
    • postFlush pending fees to the vault
    • getPool-wide fee history
    • getPool price history
    • getRecent pool activity
    • getFee history for one provision
    • getWallet balances and lending status
    • getGet Stratum information
    • getGet candidate settings
    • getGet difficulty commitment
    • postCommit a difficulty
    • getGet best NISP at height
Lithos

A decentralized mining pool protocol on Ergo. Miners build their own blocks; contracts pay them for proven work.

Live on Ergo mainnet
Protocol
  • How Lithos works
  • Mining on Lithos
  • NISPs
  • Emissions
  • LFSM contracts
Run Lithos
  • Startup guide
  • Configuration
  • LithosDex
  • Client API
  • Failure modes
Network
  • Live stats
  • Public stats API
  • Ergo Platform↗
  • SOAT Miner↗
Community
  • Telegram↗
  • X / Twitter↗
  • GitHub↗
Lithos
© 2026 Lithos Protocol. Open source under the MIT licence.λίθος — stone
Docs/Client API/Mining

Commit a difficulty

post/mining/commitmentapi_key

Registers 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/json
  • diffstringrequired

    A number and one of K, M, G, T or P, as stratum.diff is 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▶
  • txIdstringrequired
  • kindstringrequired
    one ofregistrationchange
  • outcomestringrequired

    The node's answer. uncertain means it was lost and the transaction may still confirm.

    one ofaccepteduncertain
  • scorestringrequired
    decimal string
  • diffstringrequired
  • sentAtHeightintegerrequired

    The tip the transaction was built at.

  • declaredHeightintegerrequired
  • servedFromHeightintegerrequired

    The first block the stratum mines at this score.

  • inForceFromHeightintegerrequired

    The first height whose rollups judge NISPs against this commitment.

  • replaceableFromHeightintegerrequired

    The 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▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

403The api_key header is missing or wrong.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed 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▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

422The newest commitment cannot be replaced yet, `state.disableTransforms` is on, the wallet cannot pay, or the node refused the transaction.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

503The commitment or the Miner Dictionary could not be read, or the transaction engine did not answer.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

defaultErrorApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

← PreviousGet difficulty commitmentNext →Get best NISP at height
Request
curl -X POST "http://localhost:9000/mining/commitment" \
  -H "api_key: $LITHOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "diff": "1.5M" }'
Response
{
  "txId": "string",
  "kind": "registration",
  "outcome": "accepted",
  "score": "0",
  "diff": "1.50M",
  "sentAtHeight": 0,
  "declaredHeight": 0,
  "servedFromHeight": 0,
  "inForceFromHeight": 0,
  "replaceableFromHeight": 0
}