> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kronex.network/llms.txt
> Use this file to discover all available pages before exploring further.

# krnx_getWorkshares

> Durable workshares bound to canonical blocks



## OpenAPI

````yaml specs/krnx_getWorkshares.json POST /
openapi: 3.1.0
info:
  description: >-
    Generated from internal/krnxapi/krnx_workshare_explorer_rpc.go by
    tools/rpcdocgen. Do not edit by hand.
  title: KRNX JSON-RPC
  version: 1.0.0
servers:
  - url: https://rpc.kronex.network
security: []
paths:
  /:
    post:
      summary: krnx_getWorkshares
      description: >-
        Returns durable workshares bound to canonical KRNX blocks, using
        immutable snapshots and reorg-checked cursors.


        `fromBlock` and `toBlock` are required; `toBlock` is a hex quantity or
        exactly `latest`. `limit` defaults to 500 (range 1..500) and `maxBlocks`
        to 64 (range 1..64). `parentChainIds` and `algorithmIds` are optional
        subsets, intersected by the frozen parent/algorithm tuples.
        `shareDifficulty` in the result is the achieved PoW difficulty as a
        fixed-12 decimal string, never the DAA threshold.


        Returns `KRNX_EXPLORER_RPC_DISABLED` while the explorer API is switched
        off.
      operationId: krnx_getWorkshares
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
          description: JSON-RPC response
components:
  schemas:
    Request:
      properties:
        id:
          example: 1
          type: integer
        jsonrpc:
          enum:
            - '2.0'
          example: '2.0'
          type: string
        method:
          enum:
            - krnx_getWorkshares
          example: krnx_getWorkshares
          type: string
        params:
          description: 'Positional parameters: 1. `raw` (object, optional).'
          example:
            - algorithmIds:
                - sha256d
                - scrypt
                - kawpow
                - equihash
              fromBlock: '0x100000'
              limit: 500
              maxBlocks: 64
              parentChainIds:
                - 1
                - 2
                - 3
                - 4
              toBlock: latest
          maxItems: 1
          minItems: 0
          type: array
      required:
        - jsonrpc
        - method
        - params
        - id
      type: object
    Response:
      properties:
        error:
          description: Present instead of `result` when the call fails.
          properties:
            code:
              example: -32602
              type: integer
            message:
              type: string
          type: object
        id:
          example: 1
          type: integer
        jsonrpc:
          example: '2.0'
          type: string
        result:
          $ref: '#/components/schemas/krnxWorksharePage'
      type: object
    krnxWorksharePage:
      properties:
        complete:
          type: boolean
        contractVersion:
          type: string
        items:
          items:
            $ref: '#/components/schemas/krnxWorkshareItem'
          type: array
        nextCursor:
          $ref: '#/components/schemas/krnxWorksharePublicCursor'
        scannedThrough:
          $ref: '#/components/schemas/krnxWorkshareScannedThrough'
        snapshot:
          $ref: '#/components/schemas/krnxWorkshareSnapshot'
      required:
        - complete
        - contractVersion
        - items
        - scannedThrough
        - snapshot
      type: object
    krnxWorkshareItem:
      properties:
        algorithmId:
          type: string
        auxRoot:
          type: string
        baseReward:
          $ref: '#/components/schemas/krnxAmountResult'
        beneficiary:
          type: string
        boundKrnxBlockNumber:
          type: string
        coinbaseTxHash:
          type: string
        coinbaseTxSize:
          type: integer
        commitment:
          type: string
        daaStateDigest:
          type: string
        freshnessResult: {}
        identityVersion:
          type: integer
        krnxBlockHash:
          type: string
        krnxBlockNumber:
          type: string
        krnxBlockTimestamp:
          type: string
        krnxChainId:
          type: string
        merkleBranchDigest:
          type: string
        merkleBranchLength:
          type: integer
        merkleIndex:
          type: string
        merkleRoot:
          type: string
        parentBlockHash:
          type: string
        parentBlockHeight:
          type: string
        parentChain:
          type: string
        parentChainId:
          type: integer
        parentHeaderHash:
          type: string
        parentHeaderSize:
          type: integer
        parentTemplateBindingHash:
          type: string
        parentTemplateFamilyHash:
          type: string
        payloadVersion:
          type: integer
        powId:
          type: string
        protocolVersion:
          type: integer
        replayProtectionResult: {}
        shareDifficulty:
          type: string
        shareHash:
          type: string
        shareTarget:
          type: string
        templateBindingHash:
          type: string
        templateKrnxBlockHash:
          type: string
        templateKrnxBlockNumber:
          type: string
        validationCode: {}
        validationReadiness:
          type: string
        workshareId:
          type: string
        workshareIndex:
          type: string
      required:
        - algorithmId
        - auxRoot
        - coinbaseTxHash
        - coinbaseTxSize
        - commitment
        - freshnessResult
        - identityVersion
        - krnxBlockHash
        - krnxBlockNumber
        - krnxBlockTimestamp
        - krnxChainId
        - merkleBranchDigest
        - merkleBranchLength
        - merkleIndex
        - merkleRoot
        - parentBlockHash
        - parentBlockHeight
        - parentChain
        - parentChainId
        - parentHeaderHash
        - parentHeaderSize
        - payloadVersion
        - powId
        - protocolVersion
        - replayProtectionResult
        - shareDifficulty
        - shareHash
        - shareTarget
        - validationCode
        - validationReadiness
        - workshareId
        - workshareIndex
      type: object
    krnxWorksharePublicCursor:
      properties:
        anchorBlockHash:
          type: string
        anchorBlockNumber:
          type: string
        nextBlockNumber:
          type: string
        nextWorkshareIndex:
          type: string
      required:
        - anchorBlockHash
        - anchorBlockNumber
        - nextBlockNumber
        - nextWorkshareIndex
      type: object
    krnxWorkshareScannedThrough:
      properties:
        blockComplete:
          type: boolean
        blockHash:
          type: string
        blockNumber:
          type: string
        nextWorkshareIndex:
          type: string
      required:
        - blockComplete
        - blockHash
        - blockNumber
        - nextWorkshareIndex
      type: object
    krnxWorkshareSnapshot:
      properties:
        algorithmIds:
          items:
            type: string
          type: array
        contractVersion:
          type: string
        fromBlockNumber:
          type: string
        krnxChainId:
          type: string
        limit:
          type: integer
        maxBlocks:
          type: integer
        parentChainIds:
          items:
            type: integer
          type: array
        toBlockHash:
          type: string
        toBlockNumber:
          type: string
      required:
        - algorithmIds
        - contractVersion
        - fromBlockNumber
        - krnxChainId
        - limit
        - maxBlocks
        - parentChainIds
        - toBlockHash
        - toBlockNumber
      type: object
    krnxAmountResult:
      properties:
        decimal:
          type: string
        raw:
          type: string
      required:
        - decimal
        - raw
      type: object

````