iota_rest_api/
types.rs

1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5/// Chain ID of the current chain
6pub const X_IOTA_CHAIN_ID: &str = "x-iota-chain-id";
7
8/// Chain name of the current chain
9pub const X_IOTA_CHAIN: &str = "x-iota-chain";
10
11/// Current checkpoint height
12pub const X_IOTA_CHECKPOINT_HEIGHT: &str = "x-iota-checkpoint-height";
13
14/// Lowest available checkpoint for which transaction and checkpoint data can be
15/// requested.
16///
17/// Specifically this is the lowest checkpoint for which the following data can
18/// be requested:
19///  - checkpoints
20///  - transactions
21///  - effects
22///  - events
23pub const X_IOTA_LOWEST_AVAILABLE_CHECKPOINT: &str = "x-iota-lowest-available-checkpoint";
24
25/// Lowest available checkpoint for which object data can be requested.
26///
27/// Specifically this is the lowest checkpoint for which input/output object
28/// data will be available.
29pub const X_IOTA_LOWEST_AVAILABLE_CHECKPOINT_OBJECTS: &str =
30    "x-iota-lowest-available-checkpoint-objects";
31
32/// Current epoch of the chain
33pub const X_IOTA_EPOCH: &str = "x-iota-epoch";
34
35/// Cursor to be used for endpoints that support cursor-based pagination. Pass
36/// this to the start field of the endpoint on the next call to get the next
37/// page of results.
38pub const X_IOTA_CURSOR: &str = "x-iota-cursor";
39
40/// Current timestamp of the chain - represented as number of milliseconds from
41/// the Unix epoch
42pub const X_IOTA_TIMESTAMP_MS: &str = "x-iota-timestamp-ms";