public WorldStateQueryParams build() {

      if (blockHash == null && stateRoot.isEmpty() && blockHeader == null) {
        throw new IllegalArgumentException(
            "Either blockHash, stateRoot, or blockHeader must be provided");
      }

      return new WorldStateQueryParams(this);
    }
Builds an instance of WorldStateQueryParams.

@return an instance of WorldStateQueryParams
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/common/provider/WorldStateQueryParams.java