Skip to main content
The workshare explorer API is the one part of the krnx_ namespace with a frozen contract: result and error shapes do not change without a version bump. Build indexers against it, not against the pending views.

Ask what is queryable

Call krnx_getWorkshareCapabilities first. It always answers, even when the explorer API is disabled, and it tells you:
  • whether the API is enabled,
  • the canonical history anchors, including history.firstAvailableBlock,
  • the frozen limits,
  • the parent-chain mappings for BCH, LTC, RVN and ZEC.
If the API is off, every other explorer call returns KRNX_EXPLORER_RPC_DISABLED.

Page through workshares

krnx_getWorkshares takes exactly one object:
Both filters, when supplied, are intersected against the frozen parent/algorithm tuples — a contradictory intersection is an error, not an empty page. fromBlock cannot precede history.firstAvailableBlock, and a numeric toBlock must exist and cannot exceed the canonical head.

Snapshots and reorgs

On the first request the node resolves latest once, records the resolved number and hash, materializes defaults, normalizes the filters, and returns the whole normalized query back to you as snapshot. Send that snapshot back with the cursor on every subsequent page. The node re-checks the anchor, so a reorg under your feet surfaces as an error instead of a silently inconsistent result set. Restart paging from the new head when that happens.
shareDifficulty is the achieved proof-of-work difficulty of the share as a fixed-12 decimal string. It is not the DAA threshold, and it is not a hex quantity. Historical payloads with zero metadata are projected from shareHash rather than rewritten in place.

What not to index

Index the durable view only. A node also keeps in-memory views of work it has not yet bound to a canonical block; those are process-local diagnostics, two nodes will disagree about them, and nothing in them is authenticated as history.

Block-level data

For a block-at-a-time view rather than a share-at-a-time one, pair krnx_getBlockReward, which returns every recipient and amount for one block, with krnx_getAuxPowStatus.