diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/basics.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/basics.md index 61ae62ab..2af3f0b2 100644 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/basics.md +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/basics.md @@ -3,89 +3,88 @@ id: overview title: Overview --- -# Overview +# GraphQL API Overview -To query the state of a Cartesi Rollups instance, frontend clients can make use of a GraphQL API that is exposed by the Cartesi Nodes. +The Cartesi Rollups GraphQL API provides a powerful interface for querying the state of a Cartesi Rollups instance. This API allows frontend clients to retrieve detailed information about inputs processed by the rollup and the outputs produced by the dApp's backend in response to these inputs. -This API allows any client to retrieve outputs produced by a dApp's backend, and to link those outputs to the corresponding inputs that triggered them. Outputs can generally come in the form of vouchers, notices and reports, and allow clients to both receive dApp updates and enforce consequences on the base layer. +The API primarily deals with four main types of entities: -The Cartesi Rollups state query API is fully specified by its GraphQL schema. +1. [Inputs](./queries/inputs.md): Requests submitted to the application to advance its state. +2. [Notices](./queries/notices.md): Informational statements that can be validated in the base layer blockchain. +3. [Vouchers](./queries/vouchers.md): Representations of transactions that can be carried out on the base layer blockchain. +4. [Reports](./queries/reports.md): Application logs or diagnostic information. -This specification is displayed in a more accessible and navigable way in the next sections. +Some key features of the GraphQL API include the ability to: -## Queries +- Retrieve detailed information about individual inputs, notices, vouchers, and reports. +- List and paginate through collections of these entities. +- Access proof data for notices and vouchers, allowing for validation on the base layer. +- Filter and sort results based on various criteria. -A number of top-level queries are available in order to retrieve rollup information for a Cartesi dApp. +## Basic Query Structure -In GraphQL, submitting a query involves defining parameters for filtering the entries to retrieve, and also specifying the data fields of interest, which can span any objects linked to the entry being retrieved. +GraphQL queries in the Cartesi Rollups API typically involve specifying: -For example, the following query retrieves the number of the base layer block in which the [input](./objects/input.mdx) was recorded: +1. The type of entity you're querying (input, notice, voucher, or report). +2. Any necessary arguments (e.g., index values, pagination parameters). +3. The fields you want to retrieve from the entity. -``` -input(index: "1") { - blockNumber - } -``` - -You can submit the query above as an HTTP POST request, specifying the Content-Type as `application/json`. For instance, using `curl` you could submit it as follows: - -``` -curl 'https://' -H 'Content-Type: application/json' -d '{"query":"{ input(index:1) {blockNumber} }"}' -``` - -The response of which would be something like this: +Here's a basic example of querying an input: -``` -{ - "data": { - "input": { - "blockNumber": 8629116 - } +```graphql +query { + input(index: 1) { + index + status + timestamp + msgSender + payload } } ``` -You can also retrieve linked information from the input. For example, the following query would retrieve notices from this particular input with support for pagination and with total number of entries that match the query: +## Pagination -``` -input(index: "1") { - notices { - totalCount - } - } -``` +The API uses cursor-based pagination for queries that return collections of entities (e.g., listing all notices). This is implemented through connection types (e.g.,[`InputConnection`](./objects/input-connection.md), [`NoticeConnection`](./objects/notice-connection.md)) that include `edges` and `pageInfo` fields. -The response of which would be something like this: +Example of a paginated query: -``` -{ - "data": { - "input": { - "notices": { - "totalCount": 6 +```graphql +query { + notices(first: 5, after: "cursor_value") { + edges { + node { + index + payload } + cursor + } + pageInfo { + hasNextPage + endCursor } } } ``` -## Response format +## Response Format -As exemplified above, GraphQL query responses are given in JSON format. In practice, a query might result in some data and some errors, and as such the specification of the returned JSON object is actually of the following form: +API responses are in JSON format and typically have the following structure: -``` +```json { - "data": { ... }, - "errors": [ ... ] + "data": { + // Requested data here + }, + "errors": [ + // Any errors encountered during query execution + ] } ``` - ## GraphQL Playground -The [GraphQL Playground](https://github.com/graphql/graphql-playground) is a graphical, interactive, in-browser GraphQL IDE. It is a tool that can be used to explore the contents of a GraphQL server, and as such can be used to navigate the inputs and outputs of a Cartesi Rollups dApp. - -For local development, the interactive playground is accessible at [http://localhost:8080/graphql](http://localhost:8080/graphql). +You can use the GraphQL Playground, an interactive in-browser IDE, to test and explore the API. For local development, it's typically accessible at `http://localhost:8080/graphql`. diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/inputs/input-filter.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/inputs/input-filter.md new file mode 100644 index 00000000..8193e1c0 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/inputs/input-filter.md @@ -0,0 +1,25 @@ +--- +id: input-filter +title: InputFilter +hide_table_of_contents: false +--- + + +Filter object to restrict results depending on input properties + +```graphql +input InputFilter { + indexLowerThan: Int + indexGreaterThan: Int +} +``` + + +## Fields + +| Name | Type | Description | +| ---- |------| ------| +| `indexLowerThan` | [`Int`](../../scalars/int) | Filter only inputs with index lower than a given value | +| `indexGreaterThan` | [`Int`](../../scalars/int) | Filter only inputs with index greater than a given value | + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/inputs/input-filter.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/inputs/input-filter.mdx deleted file mode 100644 index 9565a8c0..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/inputs/input-filter.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: input-filter -title: InputFilter -hide_table_of_contents: false ---- - - -Filter object to restrict results depending on input properties - -```graphql -input InputFilter { - indexLowerThan: Int - indexGreaterThan: Int -} -``` - - -### Fields - -#### `indexLowerThan` ([`Int`](../../scalars/int)) - -Filter only inputs with index lower than a given value - - -#### `indexGreaterThan` ([`Int`](../../scalars/int)) - -Filter only inputs with index greater than a given value diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/completion-status.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/completion-status.md new file mode 100644 index 00000000..b9ee93c2 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/completion-status.md @@ -0,0 +1,34 @@ +--- +id: completion-status +title: CompletionStatus +hide_table_of_contents: false +--- + +Enum representing the possible statuses of an input's processing. + +```graphql +enum CompletionStatus { + Unprocessed + Accepted + Rejected + Exception + MachineHalted + CycleLimitExceeded + TimeLimitExceeded + PayloadLengthLimitExceeded +} +``` + +## Values + +| Name | Description | +| ---- | ----------- | +| `Unprocessed` | The input has not been processed yet. | +| `Accepted` | The input was accepted and processed successfully. | +| `Rejected` | The input was processed and the results were rejected. | +| `Exception` | An exception occurred during the processing of the input. | +| `MachineHalted` | The machine halted during the processing of the input. | +| `CycleLimitExceeded` | The cycle limit was exceeded during the processing of the input. | +| `TimeLimitExceeded` | The time limit was exceeded during the processing of the input. | +| `PayloadLengthLimitExceeded` | The payload length limit was exceeded during the processing of the input. | + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-connection.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-connection.md new file mode 100644 index 00000000..f0920851 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-connection.md @@ -0,0 +1,26 @@ +--- +id: input-connection +title: InputConnection +hide_table_of_contents: false +--- + + +Represents a paginated connection of Inputs. + +```graphql +type InputConnection { + edges: [InputEdge!]! + pageInfo: PageInfo! +} +``` + +## Fields + +| Name | Type | Description | +| ---- |------| ------| +| `edges`| [`InputEdge`](../../objects/input-edge) | A list of `InputEdge` objects. Each edge contains an `Input` object and a cursor for pagination. | +| `pageInfo`| [`PageInfo`](../../objects/page-info) | Metadata about the pagination. | + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-connection.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-connection.mdx deleted file mode 100644 index 6942fb0f..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-connection.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -id: input-connection -title: InputConnection -hide_table_of_contents: false ---- - - -Pagination result - -```graphql -type InputConnection { - totalCount: Int! - edges: [InputEdge!]! - pageInfo: PageInfo! -} -``` - - -### Fields - -#### `totalCount` ([`Int!`](../../scalars/int)) - -Total number of entries that match the query - - -#### `edges` ([`InputEdge!`](../../objects/input-edge)) - -Pagination entries returned for the current page - - -#### `pageInfo` ([`PageInfo!`](../../objects/page-info)) - -Pagination metadata diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-edge.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-edge.md new file mode 100644 index 00000000..c757528a --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-edge.md @@ -0,0 +1,27 @@ +--- +id: input-edge +title: InputEdge +hide_table_of_contents: false +--- + + +Pagination entry. + +```graphql +type InputEdge { + node: Input! + cursor: String! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `node` | [`Input!`](../../objects/input) | The Input object. | +| `cursor` | [`String!`](../../scalars/string) | A string that serves as a pagination cursor for this particular edge. | + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-edge.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-edge.mdx deleted file mode 100644 index 0cb57766..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input-edge.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: input-edge -title: InputEdge -hide_table_of_contents: false ---- - - -Pagination entry - -```graphql -type InputEdge { - node: Input! - cursor: String! -} -``` - - -### Fields - -#### `node` ([`Input!`](../../objects/input)) - -Node instance - - -#### `cursor` ([`String!`](../../scalars/string)) - -Pagination cursor - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input.md new file mode 100644 index 00000000..49e0ac9b --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input.md @@ -0,0 +1,39 @@ +--- +id: input +title: Input +hide_table_of_contents: false +--- + + +Request submitted to the application to advance its state + +```graphql +type Input { + index: Int! + status: CompletionStatus! + timestamp: DateTime! + msgSender: String! + blockNumber: Int! + payload: String! + notices: NoticeConnection! + vouchers: VoucherConnection! + reports: ReportConnection! +} +``` + +### Fields + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `index` | [`Int!`](../../scalars/int) | Unique identifier for the input. | +| `status` | [`CompletionStatus!`](../../objects/completion-status) | Current status of the input processing. | +| `timestamp` | [`DateTime!`](../../scalars/date-time) | Timestamp associated with the input submission. | +| `msgSender` | [`String!`](../../scalars/string) | Address of the account that submitted the input. | +| `blockNumber` | [`Int!`](../../scalars/int) | Number of the base layer block in which the input was recorded. | +| `payload` | [`String!`](../../scalars/string) | The actual data/content of the input. | +| `notices` | [`NoticeConnection!`](../../objects/notice-connection) | List of notices associated with this input. | +| `vouchers` | [`VoucherConnection!`](../../objects/voucher-connection) | List of vouchers associated with this input. | +| `reports` | [`ReportConnection!`](../../objects/report-connection) | List of reports associated with this input. | + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input.mdx deleted file mode 100644 index 715898e0..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/input.mdx +++ /dev/null @@ -1,163 +0,0 @@ ---- -id: input -title: Input -hide_table_of_contents: false ---- - - -Request submitted to the application to advance its state - -```graphql -type Input { - index: Int! - msgSender: String! - timestamp: BigInt! - blockNumber: BigInt! - payload: String! - voucher( - index: Int! -): Voucher! - notice( - index: Int! -): Notice! - report( - index: Int! -): Report! - vouchers( - first: Int - last: Int - after: String - before: String -): VoucherConnection! - notices( - first: Int - last: Int - after: String - before: String -): NoticeConnection! - reports( - first: Int - last: Int - after: String - before: String -): ReportConnection! -} -``` - - -### Fields - -#### `index` ([`Int!`](../../scalars/int)) - -Input index starting from genesis - - -#### `msgSender` ([`String!`](../../scalars/string)) - -Address responsible for submitting the input - - -#### `timestamp` ([`BigInt!`](../../scalars/big-int)) - -Timestamp associated with the input submission, as defined by the base layer's block in which it was recorded - - -#### `blockNumber` ([`BigInt!`](../../scalars/big-int)) - -Number of the base layer block in which the input was recorded - - -#### `payload` ([`String!`](../../scalars/string)) - -Input payload in Ethereum hex binary format, starting with '0x' - - -#### `voucher` ([`Voucher!`](../../objects/voucher)) - -Get voucher from this particular input given the voucher's index -- ##### `index` ([`Int!`](../../scalars/int)) - - - - -#### `notice` ([`Notice!`](../../objects/notice)) - -Get notice from this particular input given the notice's index -- ##### `index` ([`Int!`](../../scalars/int)) - - - - -#### `report` ([`Report!`](../../objects/report)) - -Get report from this particular input given the report's index -- ##### `index` ([`Int!`](../../scalars/int)) - - - - -#### `vouchers` ([`VoucherConnection!`](../../objects/voucher-connection)) - -Get vouchers from this particular input with support for pagination -- ##### `first` ([`Int`](../../scalars/int)) - - - - -- ##### `last` ([`Int`](../../scalars/int)) - - - - -- ##### `after` ([`String`](../../scalars/string)) - - - - -- ##### `before` ([`String`](../../scalars/string)) - - - - -#### `notices` ([`NoticeConnection!`](../../objects/notice-connection)) - -Get notices from this particular input with support for pagination -- ##### `first` ([`Int`](../../scalars/int)) - - - - -- ##### `last` ([`Int`](../../scalars/int)) - - - - -- ##### `after` ([`String`](../../scalars/string)) - - - - -- ##### `before` ([`String`](../../scalars/string)) - - - - -#### `reports` ([`ReportConnection!`](../../objects/report-connection)) - -Get reports from this particular input with support for pagination -- ##### `first` ([`Int`](../../scalars/int)) - - - - -- ##### `last` ([`Int`](../../scalars/int)) - - - - -- ##### `after` ([`String`](../../scalars/string)) - - - - -- ##### `before` ([`String`](../../scalars/string)) diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-connection.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-connection.md new file mode 100644 index 00000000..7bdf6b88 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-connection.md @@ -0,0 +1,27 @@ +--- +id: notice-connection +title: NoticeConnection +hide_table_of_contents: false +--- + + +Represents a paginated connection of Notices. + +```graphql +type NoticeConnection { + edges: [NoticeEdge!]! + pageInfo: PageInfo! +} +``` + +## Fields + +| Name | Type | Description | +| ---- |------| ------| +| `edges`| [`NoticeEdge`](../../objects/notice-edge) | A list of `Notice` objects. Each edge contains a `Notice` object and a cursor for pagination. | +| `pageInfo`| [`PageInfo`](../../objects/page-info) | Metadata about the pagination. | + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-connection.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-connection.mdx deleted file mode 100644 index bd6370ba..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-connection.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: notice-connection -title: NoticeConnection -hide_table_of_contents: false ---- - - -Pagination result - -```graphql -type NoticeConnection { - totalCount: Int! - edges: [NoticeEdge!]! - pageInfo: PageInfo! -} -``` - - -### Fields - -#### `totalCount` ([`Int!`](../../scalars/int)) - -Total number of entries that match the query - - -#### `edges` ([`[NoticeEdge!]!`](../../objects/notice-edge)) - -Pagination entries returned for the current page - - -#### `pageInfo` ([`PageInfo!`](../../objects/page-info)) - -Pagination metadata - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-edge.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-edge.md new file mode 100644 index 00000000..09af6d6a --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-edge.md @@ -0,0 +1,27 @@ +--- +id: notice-edge +title: NoticeEdge +hide_table_of_contents: false +--- + + +Pagination entry + +```graphql +type NoticeEdge { + node: Notice! + cursor: String! +} +``` + +## Fields + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `node` | [`Notice!`](../../objects/notice) | The Notice object. | +| `cursor` | [`String!`](../../scalars/string) | A string that serves as a pagination cursor for this particular edge. | + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-edge.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-edge.mdx deleted file mode 100644 index 2a1e0397..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice-edge.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: notice-edge -title: NoticeEdge -hide_table_of_contents: false ---- - - -Pagination entry - -```graphql -type NoticeEdge { - node: Notice! - cursor: String! -} -``` - - -### Fields - -#### `node` ([`Notice!`](../../objects/notice)) - -Node instance - - -#### `cursor` ([`String!`](../../scalars/string)) - -Pagination cursor - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice.md new file mode 100644 index 00000000..1bc7bf07 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice.md @@ -0,0 +1,33 @@ +--- +id: notice +title: Notice +hide_table_of_contents: false +--- + + +Informational statement that can be validated in the base layer blockchain. + +```graphql +type Notice { + index: Int! + input: Input! + payload: String! + proof: Proof +} +``` + + +## Fields + +| Name | Type | Description | +| ---- |------| ----------- | +| `index`| [`Int!`](../../scalars/int) | Unique identifier for the notice. | +| `input`| [`Input!`](../../objects/input) | The input associated with this notice. | +| `payload`| [`String!`](../../scalars/string) |The actual data/content of the notice. | +| `proof`| [`Proof`](../../objects/proof) | Proof of the notice's validity (if available). | + + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice.mdx deleted file mode 100644 index a8cf2e63..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/notice.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: notice -title: Notice -hide_table_of_contents: false ---- - - -Informational statement that can be validated in the base layer blockchain - -```graphql -type Notice { - index: Int! - input: Input! - payload: String! - proof: Proof -} -``` - - -### Fields - -#### `index` ([`Int!`](../../scalars/int)) - -Notice index within the context of the input that produced it - - -#### `input` ([`Input!`](../../objects/input)) - -Input whose processing produced the notice - - -#### `payload` ([`String!`](../../scalars/string)) - -Notice data as a payload in Ethereum hex binary format, starting with '0x' - - -#### `proof` ([`Proof`](../../objects/proof)) - -Proof object that allows this notice to be validated by the base layer blockchain - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/output-validity-proof.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/output-validity-proof.md new file mode 100644 index 00000000..a5041fde --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/output-validity-proof.md @@ -0,0 +1,36 @@ +--- +id: output-validity-proof +title: OutputValidityProof +hide_table_of_contents: false +--- + + +Validity proof for an output. + +```graphql +type OutputValidityProof { + inputIndexWithinEpoch: Int! + outputIndexWithinInput: Int! + outputHashesRootHash: String! + vouchersEpochRootHash: String! + noticesEpochRootHash: String! + machineStateHash: String! + outputHashInOutputHashesSiblings: [String!]! + outputHashesInEpochSiblings: [String!]! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- |------| ----------- | +| `inputIndexWithinEpoch`| [`Int!`](../../scalars/int) | Local input index within the context of the related epoch. | +| `outputIndexWithinInput`| [`Int!`](../../scalars/int) | Output index within the context of the input that produced it. | +| `outputHashesRootHash`| [`String!`](../../scalars/string) | Merkle root of all output hashes of the related input, given in Ethereum hex binary format (32 bytes), starting with '0x'.| +| `vouchersEpochRootHash`| [`String!`](../../scalars/string) | Merkle root of all voucher hashes of the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x'.| +| `noticesEpochRootHash`| [`String!`](../../scalars/string) | Merkle root of all notice hashes of the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x'. | +| `machineStateHash`| [`String!`](../../scalars/string) | Hash of the machine state claimed for the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x'. | +| `outputHashInOutputHashesSiblings`| [`[String!]!`](../../scalars/string) | Proof that this output hash is in the output-hashes merkle tree. This array of siblings is bottom-up ordered (from the leaf to the root). Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'. | +| `outputHashesInEpochSiblings`| [`[String!]!`](../../scalars/string) | Proof that this output-hashes root hash is in epoch's output merkle tree. This array of siblings is bottom-up ordered (from the leaf to the root). Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'. | + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/output-validity-proof.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/output-validity-proof.mdx deleted file mode 100644 index ce7ab430..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/output-validity-proof.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -id: output-validity-proof -title: OutputValidityProof -hide_table_of_contents: false ---- - - -Validity proof for an output - -```graphql -type OutputValidityProof { - inputIndexWithinEpoch: Int! - outputIndexWithinInput: Int! - outputHashesRootHash: String! - vouchersEpochRootHash: String! - noticesEpochRootHash: String! - machineStateHash: String! - outputHashInOutputHashesSiblings: [String!]! - outputHashesInEpochSiblings: [String!]! -} -``` - - -### Fields - -#### `inputIndexWithinEpoch` ([`Int!`](../../scalars/int)) - -Local input index within the context of the related epoch - - -#### `outputIndexWithinInput` ([`Int!`](../../scalars/int)) - -Output index within the context of the input that produced it - - -#### `outputHashesRootHash` ([`String!`](../../scalars/string)) - -Merkle root of all output hashes of the related input, given in Ethereum hex binary format (32 bytes), starting with '0x' - - -#### [vouchersEpochRootHash` ([`String!`](../../scalars/string)) - -Merkle root of all voucher hashes of the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x' - - -#### `noticesEpochRootHash` ([`String!`](../../scalars/string)) - -Merkle root of all notice hashes of the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x' - - -#### `machineStateHash` ([`String!`](../../scalars/string)) - -Hash of the machine state claimed for the related epoch, given in Ethereum hex binary format (32 bytes), starting with '0x' - - -#### `outputHashInOutputHashesSiblings` ([`[String!]!`](../../scalars/string)) - -Proof that this output hash is in the output-hashes merkle tree. This array of siblings is bottom-up ordered (from the leaf to the root). Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'. - - -#### `outputHashesInEpochSiblings` ([`[String!]!`](../../scalars/string)) - -Proof that this output-hashes root hash is in epoch's output merkle tree. This array of siblings is bottom-up ordered (from the leaf to the root). Each hash is given in Ethereum hex binary format (32 bytes), starting with '0x'. diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/page-info.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/page-info.md new file mode 100644 index 00000000..94dd9a8f --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/page-info.md @@ -0,0 +1,29 @@ +--- +id: page-info +title: PageInfo +hide_table_of_contents: false +--- + + +Page metadata for the cursor-based Connection pagination pattern. + +```graphql +type PageInfo { + startCursor: String + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `startCursor` | [`String`](../../scalars/string) | Cursor pointing to the first entry of the page. | +| `endCursor` | [`String`](../../scalars/string) | Cursor pointing to the last entry of the page. | +| `hasNextPage` | [`Boolean!`](../../scalars/boolean) | Indicates if there are more pages after the current one. | +| `hasPreviousPage` | [`Boolean!`](../../scalars/boolean) | Indicates if there are previous pages before the current one. | + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/page-info.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/page-info.mdx deleted file mode 100644 index d34ff8ea..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/page-info.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: page-info -title: PageInfo -hide_table_of_contents: false ---- - - -Page metadata for the cursor-based Connection pagination pattern - -```graphql -type PageInfo { - startCursor: String - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! -} -``` - - -### Fields - -#### `startCursor` ([`String`](../../scalars/string)) - -Cursor pointing to the first entry of the page - - -#### `endCursor` ([`String`](../../scalars/string)) - -Cursor pointing to the last entry of the page - - -#### `hasNextPage` ([`Boolean!`](../../scalars/boolean)) - -Indicates if there are additional entries after the end curs - - -#### `hasPreviousPage` ([`Boolean!`](../../scalars/boolean)) - -Indicates if there are additional entries before the start curs - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/proof.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/proof.md new file mode 100644 index 00000000..2f96f7dd --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/proof.md @@ -0,0 +1,27 @@ +--- +id: proof +title: Proof +hide_table_of_contents: false +--- + +Represents the proof of validity for a notice or voucher. + +```graphql +type Proof { + validity: OutputValidityProof! + context: String! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- |------| ----------- | +| `validity`| [`OutputValidityProof!`](../../objects/output-validity-proof) | Validity proof for an output. | +| `context`| [`String!`](../../scalars/string) | Data that allows the validity proof to be contextualized within submitted claims, given as a payload in Ethereum hex binary format, starting with '0x'. | + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/proof.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/proof.mdx deleted file mode 100644 index 06d12efb..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/proof.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: proof -title: Proof -hide_table_of_contents: false ---- - - -Data that can be used as proof to validate notices and execute vouchers on the base layer blockchain - -```graphql -type Proof { - validity: OutputValidityProof! - context: String! -} -``` - - -### Fields - -#### `validity` ([`OutputValidityProof!`](../../objects/output-validity-proof)) - -Validity proof for an output - - -#### `context` ([`String!`](../../scalars/string)) - -Data that allows the validity proof to be contextualized within submitted claims, given as a payload in Ethereum hex binary format, starting with '0x' - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-connection.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-connection.md new file mode 100644 index 00000000..a79b44fc --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-connection.md @@ -0,0 +1,29 @@ +--- +id: report-connection +title: ReportConnection +hide_table_of_contents: false +--- + + +Represents a paginated connection of Reports. + +```graphql +type ReportConnection { + edges: [ReportEdge!]! + pageInfo: PageInfo! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- |------| ------| +| `edges`| [`ReportEdge`](../../objects/report-edge) | A list of `ReportEdge` objects. Each edge contains an `Input` object and a cursor for pagination. | +| `pageInfo`| [`PageInfo`](../../objects/page-info) | Metadata about the pagination. | + + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-connection.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-connection.mdx deleted file mode 100644 index d4f31f14..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-connection.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: report-connection -title: ReportConnection -hide_table_of_contents: false ---- - - -Pagination result - -```graphql -type ReportConnection { - totalCount: Int! - edges: [ReportEdge!]! - pageInfo: PageInfo! -} -``` - - -### Fields - -#### `totalCount` ([`Int!`](../../scalars/int)) - -Total number of entries that match the query - - -#### `edges` ([`[ReportEdge!]!`](../../objects/report-edge)) - -Pagination entries returned for the current page - - -#### `pageInfo` ([`PageInfo!`](../../objects/page-info)) - -Pagination metadata - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-edge.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-edge.md new file mode 100644 index 00000000..a6fba549 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-edge.md @@ -0,0 +1,29 @@ +--- +id: report-edge +title: ReportEdge +hide_table_of_contents: false +--- + + +Pagination entry + +```graphql +type ReportEdge { + node: Report! + cursor: String! +} +``` + + +### Fields + + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `node` | [`Report!`](../../objects/report) | The Report object. | +| `cursor` | [`String!`](../../scalars/string) | A string that serves as a pagination cursor for this particular edge. | + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-edge.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-edge.mdx deleted file mode 100644 index cabbc292..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report-edge.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: report-edge -title: ReportEdge -hide_table_of_contents: false ---- - - -Pagination entry - -```graphql -type ReportEdge { - node: Report! - cursor: String! -} -``` - - -### Fields - -#### `node` ([`Report!`](../../objects/report)) - -Node instance - - -#### `cursor` ([`String!`](../../scalars/string)) - -Pagination cursor - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report.md new file mode 100644 index 00000000..ba904c27 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report.md @@ -0,0 +1,31 @@ +--- +id: report +title: Report +hide_table_of_contents: false +--- + + +Represents application log or diagnostic information. + +```graphql +type Report { + index: Int! + input: Input! + payload: String! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- |------| ----------- | +| `index`| [`Int!`](../../scalars/int) | Unique identifier for the report. | +| `input`| [`Input!`](../../objects/input) | The input associated with this report. | +| `payload`| [`String!`](../../scalars/string) | The actual data/content of the report. | + + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report.mdx deleted file mode 100644 index c8517855..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/report.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: report -title: Report -hide_table_of_contents: false ---- - - -Application log or diagnostic information - -```graphql -type Report { - index: Int! - input: Input! - payload: String! -} -``` - - -### Fields - -#### `index` ([`Int!`](../../scalars/int)) - -Report index within the context of the input that produced it - - -#### `input` ([`Input!`](../../objects/input)) - -Input whose processing produced the report - - -#### `payload` ([`String!`](../../scalars/string)) - -Report data as a payload in Ethereum hex binary format, starting with '0x' - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-connection.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-connection.md new file mode 100644 index 00000000..02c05225 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-connection.md @@ -0,0 +1,29 @@ +--- +id: voucher-connection +title: VoucherConnection +hide_table_of_contents: false +--- + + +Represents a paginated connection of Vouchers. + +```graphql +type VoucherConnection { + edges: [VoucherEdge!]! + pageInfo: PageInfo! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `edges` | [`[VoucherEdge!]!`](../../objects/voucher-edge) | A list of `VoucherEdge` objects. Each edge contains a `Voucher` object and a cursor for pagination. | +| `pageInfo` | [`PageInfo!`](../../objects/page-info) | Pagination metadata. | + + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-connection.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-connection.mdx deleted file mode 100644 index d78f412d..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-connection.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: voucher-connection -title: VoucherConnection -hide_table_of_contents: false ---- - - -Pagination result - -```graphql -type VoucherConnection { - totalCount: Int! - edges: [VoucherEdge!]! - pageInfo: PageInfo! -} -``` - - -### Fields - -#### `totalCount` ([`Int!`](../../scalars/int)) - -Total number of entries that match the query - - -#### `edges` ([`[VoucherEdge!]!`](../../objects/voucher-edge)) - -Pagination entries returned for the current page - - -#### `pageInfo` ([`PageInfo!`](../../objects/page-info)) - -Pagination metadata - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-edge.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-edge.md new file mode 100644 index 00000000..99d42d30 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-edge.md @@ -0,0 +1,29 @@ +--- +id: voucher-edge +title: VoucherEdge +hide_table_of_contents: false +--- + + +Pagination entry. + +```graphql +type VoucherEdge { + node: Voucher! + cursor: String! +} +``` + + +## Fields + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `node` | [`Voucher!`](../../objects/voucher) | The `Voucher` object. | +| `cursor` | [`String!`](../../scalars/string) | A string that serves as a pagination cursor for this particular edge. | + + + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-edge.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-edge.mdx deleted file mode 100644 index e0ce6fd0..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher-edge.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: voucher-edge -title: VoucherEdge -hide_table_of_contents: false ---- - - -Pagination entry - -```graphql -type VoucherEdge { - node: Voucher! - cursor: String! -} -``` - - -### Fields - -#### `node` ([`Voucher!`](../../objects/voucher)) - -Node instance - - -#### `cursor` ([`String!`](../../scalars/string)) - -Pagination cursor - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher.md new file mode 100644 index 00000000..6713e671 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher.md @@ -0,0 +1,33 @@ +--- +id: voucher +title: Voucher +hide_table_of_contents: false +--- + + +Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets. + +```graphql +type Voucher { + index: Int! + input: Input! + destination: String! + payload: String! + proof: Proof +} +``` + + +## Fields + +| Name | Type | Description | +| ---- |------| ----------- | +| `index`| [`Int!`](../../scalars/int) | Unique identifier for the voucher. | +| `input`| [`Input!`](../../objects/input) | The input associated with this voucher. | +| `destination`| [`String!`](../../scalars/string) | The address or identifier of the voucher's destination. | +| `payload`| [`String!`](../../scalars/string) | The actual data/content of the voucher. | +| `proof`| [`Proof`](../../objects/proof) | Proof object that allows this voucher to be validated and executed on the base layer blockchain(if available). | + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher.mdx deleted file mode 100644 index 46206e86..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/objects/voucher.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: voucher -title: Voucher -hide_table_of_contents: false ---- - - -Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets - -```graphql -type Voucher { - index: Int! - input: Input! - destination: String! - payload: String! - proof: Proof -} -``` - - -### Fields - -#### `index` ([`Int!`](../../scalars/int)) - -Voucher index within the context of the input that produced it - - -#### `input` ([`Input!`](../../objects/input)) - -Input whose processing produced the voucher - - -#### `destination` ([`String!`](../../scalars/string)) - -Transaction destination address in Ethereum hex binary format (20 bytes), starting with '0x' - - -#### `payload` ([`String!`](../../scalars/string)) - -Transaction payload in Ethereum hex binary format, starting with '0x' - - -#### `proof` ([`Proof`](../../objects/proof)) - -Proof object that allows this voucher to be validated and executed on the base layer blockchain - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/inputs.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/inputs.md new file mode 100644 index 00000000..1b46ff0c --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/inputs.md @@ -0,0 +1,251 @@ +--- +id: inputs +title: Inputs +hide_table_of_contents: false +--- + +Inputs represent requests submitted to the application to advance its state. + +## 1. Get Input by Index + +Retrieve a specific input based on its identifier. + +```graphql +query getInput($inputIndex: Int!) { + input(index: $inputIndex) { + index + status + timestamp + msgSender + blockNumber + payload + } +} +``` + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `inputIndex` | [`Int`](../../scalars/int) | Index of the input to retrieve. | + +### Response Type + +[`Input`](../../objects/input) + + +## 2. Get Inputs + +Retrieve a list of inputs with support for pagination. + +```graphql +query inputs( + $first: Int + $last: Int + $after: String + $before: String + $where: InputFilter +) { + inputs( + first: $first + last: $last + after: $after + before: $before + where: $where + ) { + edges { + node { + index + status + timestamp + msgSender + blockNumber + payload + } + } + pageInfo { + hasNextPage + hasPreviousPage + startCursor + endCursor + } + } +} +``` + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `first` | [`Int`](../../scalars/int) | Get at most the first `n` entries (forward pagination). | +| `last` | [`Int`](../../scalars/int) | Get at most the last `n` entries (backward pagination). | +| `after` | [`String`](../../scalars/string) | Get entries after the provided cursor (forward pagination). | +| `before` | [`String`](../../scalars/string) | Get entries before the provided cursor (backward pagination). | +| `where` | [`InputFilter`](../../inputs/input-filter) | Filter criteria for inputs. | + + +### Response Type + +[`InputConnection`](../../objects/input-connection) + + +:::note pagination and filtering + +- You cannot mix forward pagination (`first`, `after`) with backward pagination (`last`, `before`) in the same query. + +- The `where` argument allows you to filter inputs based the [`InputFilter`](../../inputs/input-filter). + +- When using `where` with `after` or `before`, the filter is applied first, and then the pagination is applied to the filtered results. +::: + + + +## 3. Get Input Result + +Retrieve the result of a specific input, including its associated notices, vouchers, and reports. + +```graphql +query getInputResult($inputIndex: Int!) { + input(index: $inputIndex) { + status + timestamp + msgSender + blockNumber + reports { + edges { + node { + index + input { + index + } + payload + } + } + } + notices { + edges { + node { + index + input { + index + } + payload + } + } + } + vouchers { + edges { + node { + index + input { + index + } + destination + payload + } + } + } + } +} +``` + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `inputIndex` | [`Int`](../../scalars/int) | Index of the input to retrieve. | + + +### Response Type + +[`Input`](../../objects/input) with nested connections for reports, notices, and vouchers. + + +## Examples + +1. Fetching a specific input: + + ```graphql + query { + input(index: 5) { + index + status + timestamp + msgSender + blockNumber + payload + } + } + ``` + +2. Listing earlier(first 5) inputs: + + ```graphql + query { + inputs(first: 5) { + edges { + node { + index + status + timestamp + msgSender + payload + } + } + pageInfo { + hasNextPage + endCursor + } + } + } + ``` + +3. Retrieving input results: + + ```graphql + query { + input(index: 10) { + status + timestamp + notices { + edges { + node { + index + payload + } + } + } + vouchers { + edges { + node { + index + destination + payload + } + } + } + } + } + ``` + +4. Using pagination and filtering: + + ```graphql + query { + inputs(first: 5, where: { indexLowerThan: 1 }) { + edges { + node { + index + status + timestamp + msgSender + payload + } + } + pageInfo { + hasNextPage + endCursor + } + } + } + ``` \ No newline at end of file diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/inputs.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/inputs.mdx deleted file mode 100644 index e2d148b2..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/inputs.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -id: list_inputs -title: List Inputs -hide_table_of_contents: false ---- - -## Get input based on its identifier - -```graphql -input( - index: Int! -): Input! -``` - -### Arguments - -#### `index` ([`Int!`](../../scalars/int)) - -### Type - -#### [`Input`](../../objects/input) - -Request submitted to the application to advance its state. - -### Example usage - -#### 1. Get an input based on its `inputIndex`: - -```graphql -query inputByIndex($inputIndex: Int!) { - input(index: $inputIndex) { - index - payload - } -} -``` - -```graphql -{ - "inputIndex": 0 -} -``` - -In this example, the query is set to retrieve the input at `inputIndex` `0`. - -## Get inputs with support for pagination - -```graphql -inputs( - first: Int - last: Int - after: String - before: String - where: InputFilter -): InputConnection! -``` - -### Arguments - -#### `first` ([`Int`](../../scalars/int)) - -Get at most the first `n` entries (forward pagination). - -#### `last` ([`Int`](../../scalars/int)) - -Get at most the last `n` entries (backward pagination). - -#### `after` ([`String`](../../scalars/string)) - -Get entries that come after the provided cursor (forward pagination). - -#### `before` ([`String`](../../scalars/string)) - -Get entries that come before the provided cursor (backward pagination). - -#### `where` ([`InputFilter`](../../inputs/input-filter)) - -### Type - -#### [`InputConnection`](../../objects/input-connection) - -Pagination result. - -### Example usage - -#### 1. Query all inputs: - -```graphql -query inputs { - inputs { - edges { - node { - index - payload - } - } - } -} -``` - -In this example, the query retrieves all inputs with their respective indices and payloads. diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/notices.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/notices.md new file mode 100644 index 00000000..92c5749a --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/notices.md @@ -0,0 +1,185 @@ +--- +id: notices +title: Notices +hide_table_of_contents: false +--- + +Notices are informational statements that can be validated in the base layer blockchain. + +## 1. Get Notice by Index + +Retrieve a specific notice based on its index and associated input index. + +```graphql +query notice($noticeIndex: Int!, $inputIndex: Int!) { + notice(noticeIndex: $noticeIndex, inputIndex: $inputIndex) { + index + input { + index + timestamp + msgSender + blockNumber + } + payload + proof { + validity { + inputIndexWithinEpoch + outputIndexWithinInput + outputHashesRootHash + vouchersEpochRootHash + noticesEpochRootHash + machineStateHash + outputHashInOutputHashesSiblings + outputHashesInEpochSiblings + } + context + } + } +} +``` + +For notices, the API provides access to proof data that can be used for validation on the base layer blockchain. This proof data is accessible through the [`Proof`](../objects/proof.md) field on notice objects. + +### Arguments + +| Name | Type | Description | +| ------------- | --------------------------- | ---------------------------------------------- | +| `noticeIndex` | [`Int!`](../../scalars/int) | Index of the notice to retrieve. | +| `inputIndex` | [`Int!`](../../scalars/int) | Index of the input associated with the notice. | + +### Response Type + +[`Notice`](../../objects/notice) + +## 2. Get Notices + +Retrieve a list of notices with support for pagination. + +```graphql +query notices { + notices { + edges { + node { + index + input { + index + timestamp + msgSender + blockNumber + } + payload + } + } + } +} +``` + +### Arguments + +None + +### Response Type + +[`NoticeConnection`](../../objects/notice-connection) + +## 3. Get Notices by Input + +Retrieve notices associated with a specific input. + +```graphql +query noticesByInput($inputIndex: Int!) { + input(index: $inputIndex) { + notices { + edges { + node { + index + input { + index + timestamp + msgSender + blockNumber + } + payload + } + } + } + } +} +``` + +### Arguments + +| Name | Type | Description | +| ------------ | --------------------------- | ------------------------------------------- | +| `inputIndex` | [`Int!`](../../scalars/int) | Index of the input to retrieve notices for. | + +### Response Type + +[`NoticeConnection`](../../objects/notice-connection) + + +## Examples + +1. Fetching a specific notice: + +```graphql +query { + notice(noticeIndex: 3, inputIndex: 2) { + index + payload + proof { + validity { + inputIndexWithinEpoch + outputIndexWithinInput + } + context + } + } +} +``` + +2. Listing earlier(first 5) notices: + +```graphql +query { + notices(first: 5) { + edges { + node { + index + input { + index + timestamp + } + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } +} +``` + +3. Retrieving notices for a specific input: + +```graphql +query { + input(index: 10) { + notices(first: 3) { + edges { + node { + index + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } + } +} +``` diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/notices.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/notices.mdx deleted file mode 100644 index a40864b8..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/notices.mdx +++ /dev/null @@ -1,147 +0,0 @@ ---- -id: list_notices -title: List Notices -hide_table_of_contents: false ---- - -## Get notice based on its index - -```graphql -notice( - noticeIndex: Int! - inputIndex: Int! -): Notice! -``` - -### Arguments - -#### `noticeIndex` ([`Int!`](../../scalars/int)) - -#### `inputIndex` ([`Int!`](../../scalars/int)) - -### Type - -#### [`Notice`](../../objects/notice) - -Informational statement that can be validated in the base layer blockchain. - -### Example usage - -#### 1. Retrieve a detailed notice, including proof, using both the `noticeIndex` and `inputIndex`: - -```graphql -query notice($noticeIndex: Int!, $inputIndex: Int!) { - notice(noticeIndex: $noticeIndex, inputIndex: $inputIndex) { - index - input { - index - } - payload - proof { - validity { - inputIndexWithinEpoch - outputIndexWithinInput - outputHashesRootHash - vouchersEpochRootHash - noticesEpochRootHash - machineStateHash - outputHashInOutputHashesSiblings - outputHashesInEpochSiblings - } - context - } - } -} -``` - -Here, the query takes two variables: `noticeIndex` and `inputIndex`. - -```graphql -{ - "noticeIndex": 0, - "inputIndex": 1 -} -``` - -## Get notices with support for pagination - -```graphql -notices( - first: Int - last: Int - after: String - before: String -): NoticeConnection! -``` - -### Arguments - -#### `first` ([`Int`](../../scalars/int)) - -Get at most the first `n` entries (forward pagination). - -#### `last` ([`Int`](../../scalars/int)) - -Get at most the last `n` entries (backward pagination). - -#### `after` ([`String`](../../scalars/string)) - -Get entries that come after the provided cursor (forward pagination). - -#### `before` ([`String`](../../scalars/string)) - -Get entries that come before the provided cursor (backward pagination). - -### Type - -#### [`NoticeConnection`](../../objects/notice-connection) - -Pagination result - -### Example usage - -#### 1. Query all notices: - -```graphql -query notices { - notices { - edges { - node { - index - input { - index - } - payload - } - } - } -} -``` - -#### 2. Query notices based on their `inputIndex`: - -```graphql -query noticesByInput($inputIndex: Int!) { - input(index: $inputIndex) { - notices { - edges { - node { - index - input { - index - } - payload - } - } - } - } -} -``` - -```graphql -{ - "inputIndex": 1 -} -``` - -In this example, the query is set to retrieve all notices at `inputIndex` `1`. diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/reports.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/reports.md new file mode 100644 index 00000000..057cb383 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/reports.md @@ -0,0 +1,214 @@ +--- +id: reports +title: Reports +hide_table_of_contents: false +--- + +Reports contain application logs or diagnostic information and cannot be validated on-chain. + +## 1. Get Report by Index + +Retrieve a specific report based on its index and associated input index. + +```graphql +query report($reportIndex: Int!, $inputIndex: Int!) { + report(reportIndex: $reportIndex, inputIndex: $inputIndex) { + index + input { + index + status + timestamp + msgSender + blockNumber + } + payload + } +} +``` + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `reportIndex` | [`Int!`](../../scalars/int) | Index of the report to retrieve. | +| `inputIndex` | [`Int!`](../../scalars/int) | Index of the input associated with the report. | + + +### Response Type + + [`Report`](../../objects/report) + +## 2. Get reports + +Retrieve a list of reports with support for pagination. + +```graphql +query reports { + reports { + edges { + node { + index + input { + index + status + timestamp + msgSender + blockNumber + } + payload + } + } + } +} +``` + +### Arguments + +None + +### Response Type + +[`ReportConnection`](../../objects/report-connection) + +## 3. Get Reports by Input + +Retrieve reports associated with a specific input. + +```graphql +query reportsByInput($inputIndex: Int!) { + input(index: $inputIndex) { + reports { + edges { + node { + index + input { + index + status + timestamp + msgSender + blockNumber + } + payload + } + } + } + } +} +``` + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `inputIndex` | [`Int!`](../../scalars/int) | Index of the input to retrieve reports for. | + +### Response Type + +[`ReportConnection`](../../objects/report-connection) + +## Examples + + 1. Fetching a specific report: + + ```graphql + query { + report(reportIndex: 1, inputIndex: 5) { + index + input { + index + status + timestamp + } + payload + } + } + ``` + +2. Listing earlier(first 5) reports: + + ```graphql + query { + reports(first: 5) { + edges { + node { + index + input { + index + status + timestamp + } + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } + } + ``` + +3. Paginating through reports: + + ```graphql + query { + reports(first: 5, after: "MA==") { + edges { + node { + index + input { + index + status + } + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } + } + ``` + +4. Retrieving reports for a specific input: + + ```graphql + query { + input(index: 10) { + reports { + edges { + node { + index + payload + } + } + } + } + } + ``` + +5. Combining pagination with input-specific reports: + + ```graphql + query { + input(index: 0) { + reports(last: 5, before: "MA==") { + edges { + node { + index + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } + } + } + ``` + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/reports.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/reports.mdx deleted file mode 100644 index c709efcf..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/reports.mdx +++ /dev/null @@ -1,134 +0,0 @@ ---- -id: list_reports -title: List Reports -hide_table_of_contents: false ---- - -## Get report based on its index - -```graphql -report( - reportIndex: Int! - inputIndex: Int! -): Report! -``` - -### Arguments - -#### `reportIndex` ([`Int!`](../../scalars/int)) - -#### `inputIndex` ([`Int!`](../../scalars/int)) - -### Type - -#### [`Report`](../../objects/report) - -Application log or diagnostic information. - -### Example usage - -#### 1. Query a report with its `reportIndex` and `inputIndex`: - -```graphql -query report($reportIndex: Int!, $inputIndex: Int!) { - report(reportIndex: $reportIndex, inputIndex: $inputIndex) { - index - input { - index - } - payload - } -} -``` - -```graphql -{ - "reportIndex": 1, - "inputIndex": 2 -} -``` - -In this example, the query is set to retrieve the report at `reportIndex` `1` and `inputIndex` `2`. - -## Get reports with support for pagination - -```graphql -reports( - first: Int - last: Int - after: String - before: String -): ReportConnection! -``` - -### Arguments - -#### `first` ([`Int`](../../scalars/int)) - -Get at most the first `n` entries (forward pagination). - -#### `last` ([`Int`](../../scalars/int)) - -Get at most the last `n` entries (backward pagination). - -#### `after` ([`String`](../../scalars/string)) - -Get entries that come after the provided cursor (forward pagination). - -#### `before` ([`String`](../../scalars/string)) - -Get entries that come before the provided cursor (backward pagination). - -### Type - -#### [`ReportConnection`](../../objects/report-connection) - -Pagination result - -### Example usage - -#### 1. Query all reports: - -```graphql -query reports { - reports { - edges { - node { - index - input { - index - } - payload - } - } - } -} -``` - -#### 2. Query reports based on their `inputIndex`: - -```graphql -query reportsByInput($inputIndex: Int!) { - input(index: $inputIndex) { - reports { - edges { - node { - index - input { - index - } - payload - } - } - } - } -} -``` - -```graphql -{ - "inputIndex": 2 -} -``` - -In this example, the query is set to retrieve all reports at `inputIndex` `2`. diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/vouchers.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/vouchers.md new file mode 100644 index 00000000..9e4e2560 --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/vouchers.md @@ -0,0 +1,206 @@ +--- +id: vouchers +title: Vouchers +hide_table_of_contents: false +--- + + +Vouchers represent transactions that can be carried out on the base layer blockchain, such as asset transfers. They are used to effect changes in the base layer based on the application's state. + +## 1. Get Voucher by Index + +Retrieve a specific voucher based on its index and associated input index. + +```graphql +query voucher($voucherIndex: Int!, $inputIndex: Int!) { + voucher(voucherIndex: $voucherIndex, inputIndex: $inputIndex) { + index + input { + index + timestamp + msgSender + blockNumber + } + destination + payload + proof { + validity { + inputIndexWithinEpoch + outputIndexWithinInput + outputHashesRootHash + vouchersEpochRootHash + noticesEpochRootHash + machineStateHash + outputHashInOutputHashesSiblings + outputHashesInEpochSiblings + } + context + } + } +} +``` +For vouchers, the API provides access to proof data that can be used for validation on the base layer blockchain. This proof data is accessible through the [`Proof`](../objects/proof.md) field on voucher objects. + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `voucherIndex` | [`Int!`](../../scalars/int) | The index of the voucher to retrieve. | +| `inputIndex` | [`Int!`](../../scalars/int) | The index of the associated input. | + + + +### Response Type + +[`Voucher`](../../objects/voucher) + + +## 2. Get Vouchers + +Retrieve a list of vouchers with support for pagination. + +```graphql +query vouchers($first: Int, $after: String) { + vouchers(first: $first, after: $after) { + edges { + node { + index + input { + index + timestamp + msgSender + blockNumber + } + destination + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } +} +``` + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `first` | [`Int`](../../scalars/int) | Number of vouchers to retrieve (for pagination). | +| `after` | [`String`](../../scalars/string) | Cursor to start retrieving vouchers from (for pagination). | + + +### Response Type + +[`VoucherConnection`](../../objects/voucher-connection) + + +## 3. Get Vouchers by Input + +Retrieve vouchers associated with a specific input. + +```graphql +query vouchersByInput($inputIndex: Int!, $first: Int, $after: String) { + input(index: $inputIndex) { + vouchers(first: $first, after: $after) { + edges { + node { + index + destination + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } + } +} +``` + +### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| `inputIndex` | [`Int!`](../../scalars/int) | Index of the input to retrieve vouchers for. | +| `first` | [`Int`](../../scalars/int) | Number of vouchers to retrieve (for pagination). | +| `after` | [`String`](../../scalars/string) | Cursor to start retrieving vouchers from (for pagination). | + +### Response Type + +[`VoucherConnection`](../../objects/voucher-connection) + + + +## Examples + +1. Fetching a specific voucher: + + ```graphql + query { + voucher(voucherIndex: 3, inputIndex: 2) { + index + destination + payload + proof { + validity { + inputIndexWithinEpoch + outputIndexWithinInput + } + context + } + } + } + ``` + +2. Listing earlier(first 5) vouchers: + + ```graphql + query { + vouchers(first: 5) { + edges { + node { + index + input { + index + timestamp + } + destination + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } + } + ``` + +3. Retrieving vouchers associated with a specific input: + + ```graphql + query { + input(index: 10) { + vouchers(first: 3) { + edges { + node { + index + destination + payload + } + cursor + } + pageInfo { + hasNextPage + endCursor + } + } + } + } + ``` \ No newline at end of file diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/vouchers.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/vouchers.mdx deleted file mode 100644 index de5404fb..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/queries/vouchers.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -id: list-vouchers -title: List Vouchers -hide_table_of_contents: false ---- - -## Get voucher based on its index: - -```graphql -voucher( - voucherIndex: Int! - inputIndex: Int! -): Voucher! -``` - - -### Arguments - -#### `voucherIndex` ([`Int!`](../../scalars/int)) - -#### `inputIndex` ([`Int!`](../../scalars/int)) - -### Type - -#### [`Voucher`](../../objects/voucher) - -Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets. - -### Example usage - -#### 1. Query a detailed voucher, including proof, using both the `voucherIndex` and `inputIndex`: - - ```graphql - query voucher($voucherIndex: Int!, $inputIndex: Int!) { - voucher(voucherIndex: $voucherIndex, inputIndex: $inputIndex) { - index - input { - index - } - destination - payload - proof { - validity { - inputIndexWithinEpoch - outputIndexWithinInput - outputHashesRootHash - vouchersEpochRootHash - noticesEpochRootHash - machineStateHash - outputHashInOutputHashesSiblings - outputHashesInEpochSiblings - } - context - } - } - } - ``` - - Here, the query takes two variables: `voucherIndex` and `inputIndex`. - - ```graphql - { - "voucherIndex": 1, - "inputIndex": 5 - } - ``` - -## Get vouchers with support for pagination: - -```graphql -vouchers( - first: Int - last: Int - after: String - before: String -): VoucherConnection! -``` - - -### Arguments - -#### `first` ([`Int`](../../scalars/int)) -Get at most the first `n` entries(forward pagination). - -#### `last` ([`Int`](../../scalars/int)) -Get at most the last `n` entries(backward pagination). - - - -#### `after` ([`String`](../../scalars/string)) -Get entries that come after the provided cursor(forward pagination). - - - -#### `before` ([`String`](../../scalars/string)) -Get entries that come before the provided cursor(backward pagination). - - - -### Type - -#### [`VoucherConnection`](../../objects/voucher-connection) - -Pagination result. - - -### Example usage - -#### 1. Query all vouchers: - - ```graphql - query vouchers { - vouchers { - edges { - node { - index - input { - index - } - destination - payload - } - } - } - } - ``` - -#### 2. Query vouchers based on their `inputIndex`: - - ```graphql - query vouchersByInput($inputIndex: Int!) { - input(index: $inputIndex) { - vouchers { - edges { - node { - index - input { - index - } - destination - payload - } - } - } - } - } - ``` - - ```graphql - { - "inputIndex": 1 - } - - ``` - - In this example, the query is set to retrieve all vouchers at `inputIndex` `1` diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/DateTime.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/DateTime.md new file mode 100644 index 00000000..387b7d1b --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/DateTime.md @@ -0,0 +1,16 @@ +--- +id: date-time +title: DateTime +hide_table_of_contents: false +--- + + +The `DateTime` scalar type represents a point in time, expressed as the number of seconds that have elapsed since the Unix epoch (January 1, 1970, at 00:00:00 UTC), not counting leap seconds. This is also known as Unix time, POSIX time, or Epoch time. + +```graphql +scalar DateTime +``` + +Format: Integer representing seconds since the Unix epoch + +Example: `1723746395` (represents August 15, 2024, 00:59:55 UTC) \ No newline at end of file diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/big-int.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/big-int.md new file mode 100644 index 00000000..d5033f9f --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/big-int.md @@ -0,0 +1,17 @@ +--- +id: big-int +title: BigInt +hide_table_of_contents: false +--- + + +The `BigInt` scalar type represents arbitrarily large signed integer values. It can handle numbers beyond the range of a 32-bit integer, making it suitable for representing large numerical values. + + + +```graphql +scalar BigInt +``` + + +Example: `1234567890123456789012345678901234567890`. diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/big-int.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/big-int.mdx deleted file mode 100644 index b8fa7f7a..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/big-int.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: big-int -title: BigInt -hide_table_of_contents: false ---- - - -No description - -```graphql -scalar BigInt -``` - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/boolean.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/boolean.md new file mode 100644 index 00000000..ad00a4dc --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/boolean.md @@ -0,0 +1,16 @@ +--- +id: boolean +title: Boolean +hide_table_of_contents: false +--- + + +The `Boolean` scalar type represents a logical value of either `true` or `false`. It is used for simple yes/no or on/off flags in queries and mutations. + +```graphql +scalar Boolean +``` + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/boolean.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/boolean.mdx deleted file mode 100644 index 3f78d515..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/boolean.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: boolean -title: Boolean -hide_table_of_contents: false ---- - - -The `Boolean` scalar type represents `true` or `false`. - -```graphql -scalar Boolean -``` - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/int.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/int.md new file mode 100644 index 00000000..2169fbcb --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/int.md @@ -0,0 +1,20 @@ +--- +id: int +title: Int +hide_table_of_contents: false +--- + + +The Int scalar type represents non-fractional signed whole numeric values. It can represent values between -(2^31) and (2^31 - 1), inclusive. This type is suitable for most counting or indexing needs within the API. + +```graphql +scalar Int +``` + +Range: `-2,147,483,648` to `2,147,483,647`. + +Examples: `42`, `17`, `0`. + + + + diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/int.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/int.mdx deleted file mode 100644 index 71d91ee4..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/int.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: int -title: Int -hide_table_of_contents: false ---- - - -The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. - -```graphql -scalar Int -``` - - - - diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/string.md b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/string.md new file mode 100644 index 00000000..0835583e --- /dev/null +++ b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/string.md @@ -0,0 +1,15 @@ +--- +id: string +title: String +hide_table_of_contents: false +--- + + +The `String` scalar type represents textual data as UTF-8 character sequences. It is used for free-form human-readable text, identifiers, and other string-based data in the API. + +```graphql +scalar String +``` + + +Examples: `"Hello, World!"`, `"d290f1ee-6c54-4b01-90e6-d701748f0851"`. \ No newline at end of file diff --git a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/string.mdx b/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/string.mdx deleted file mode 100644 index 068a67f8..00000000 --- a/cartesi-rollups_versioned_docs/version-1.5/rollups-apis/graphql/scalars/string.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: string -title: String -hide_table_of_contents: false ---- - - -The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. - -```graphql -scalar String -``` - - - - diff --git a/cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json b/cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json index 7ebbd726..3aa3de82 100644 --- a/cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json +++ b/cartesi-rollups_versioned_sidebars/version-1.5-sidebars.json @@ -84,10 +84,10 @@ "label": "Queries", "collapsed": true, "items": [ - { - "type": "autogenerated", - "dirName": "rollups-apis/graphql/queries" - } + "rollups-apis/graphql/queries/inputs", + "rollups-apis/graphql/queries/notices", + "rollups-apis/graphql/queries/vouchers", + "rollups-apis/graphql/queries/reports" ] }, { @@ -111,6 +111,17 @@ "dirName": "rollups-apis/graphql/inputs" } ] + }, + { + "type": "category", + "label": "Scalars", + "collapsed": true, + "items": [ + { + "type": "autogenerated", + "dirName": "rollups-apis/graphql/scalars" + } + ] } ] } diff --git a/docusaurus.config.js b/docusaurus.config.js index 5e2b8487..19c1ea56 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -49,11 +49,12 @@ const config = { customCss: require.resolve("./src/css/custom.css"), }, gtag: { - trackingID: "GTM-MS89D9K", + trackingID: "GTM-NGX36B79", anonymizeIP: true, }, + googleTagManager: { - containerId: "GTM-MS89D9K", + containerId: "GTM-NGX36B79", }, sitemap: { changefreq: "weekly", @@ -69,17 +70,17 @@ const config = { /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ typesense: { - typesenseCollectionName: "cartesi_1716805080", + typesenseCollectionName: "cartesi_1723235151", typesenseServerConfig: { nodes: [ { - host: "chlxtu308rv7ijsfp-1.a1.typesense.net", + host: "rjh5fcveu4z3l7oqp-1.a1.typesense.net", port: 443, protocol: "https", }, ], - apiKey: "LfQmZC376xclgoL1ftRvR5Ap1XlVVlyz", + apiKey: "FMbnaJ3rp6NHGCzzi6obgDTDy2lGoAiv", }, // Optional: Typesense search parameters: https://typesense.org/docs/0.24.0/api/search.html#search-parameters @@ -373,6 +374,22 @@ const config = { to: "/cartesi-rollups/1.5/", // Redirects /cartesi-rollups/ to the latest version from: "/cartesi-rollups/", }, + { + to: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/inputs/", + from: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/list_inputs/", + }, + { + to: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/notices/", + from: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/list_notices/", + }, + { + to: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/vouchers/", + from: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/list-vouchers/", + }, + { + to: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/reports/", + from: "/cartesi-rollups/1.5/rollups-apis/graphql/queries/list_reports/", + }, { to: "/cartesi-rollups/1.5/development/cli-commands/", from: "/cartesi-rollups/1.5/development/node-configuration/",