> For the complete documentation index, see [llms.txt](https://docs.blockscholes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockscholes.com/data-access/rest-api/signed-responses.md).

# Signed Responses

Request signed Block Scholes REST API responses for on-chain verification: EIP-712 signature domain, signed response format and how decimals scaling works.

Most Block Scholes REST API data requests can return a response signed by Block Scholes. A smart contract can then verify the data's integrity and provenance on-chain without trusting the caller.

Signing is requested through the `options.signature` object. Formatting fields (`timestamp`, `hexify`, `decimals`) are described on [Request Options](https://docs.blockscholes.com/data-access/rest-api/request-options.md).

## EIP-712 signatures

Add a `signature` object to receive a response signed under [EIP-712](https://eips.ethereum.org/EIPS/eip-712). Most data requests support signing.

Signing is optional. Without `signature`, you receive the data on its own.

### Signature domain

The domain binds a signature to your deployment, so a signed message cannot be replayed against a different contract or chain.

| Field                | Type   | Description                                                               |
| -------------------- | ------ | ------------------------------------------------------------------------- |
| `name`               | String | Name of your signing domain, such as your protocol or app.                |
| `version`            | String | Domain version. Decimal or `0x` hex string.                               |
| `chain_id`           | String | ID of the chain the verifying contract is on. Decimal or `0x` hex string. |
| `verifying_contract` | String | Address of the contract that will verify the signature.                   |

All four fields must match the values your contract uses when it rebuilds the EIP-712 domain separator. Any mismatch makes verification fail.

### Signed response

A signed response returns the data together with its signature. For endpoints that return a list, `data` and `signature` are parallel lists, and each signature covers the data item at the same position.

For type definitions and the full verification schema, see [Pull Oracle: verification via EIP-712](https://docs.blockscholes.com/blockchain-oracle/pull-based-oracle.md#verification-via-eip-712).

## How decimals affect a signed response

A signed request scales each value by 10<sup>decimals</sup> into an integer, so no precision is lost. With `"decimals": 9` a price of 67000.5013 is returned as `67000501300000`. Divide by 10<sup>decimals</sup> to recover the decimal value. The signature covers the formatted values, so request the precision you need up front.

## Frequently asked questions

**Which data requests can be signed?**\
Most data requests. Signing is optional and off unless you send `signature`.

**Why are my signed values so large?**\
They are scaled by 10<sup>decimals</sup> so they are integers.

**Why does verification fail?**\
All four domain fields must match the values your contract uses when it rebuilds the EIP-712 domain separator.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.blockscholes.com/data-access/rest-api/signed-responses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
