# AI Pack: relay-client-rs

- Description: Relay Rust client.
- Remote: https://github.com/symbioticfi/relay-client-rs
- Remote ref: HEAD
- Commit: cb4ddf638b49afe7146c355a514d6da6fbcca01e
- Generated (UTC): 2026-06-02T10:22:21.999Z
- Repomix: 1.14.1
- Preset: common
- Ignore patterns: .gitignore, .dockerignore, .prettierignore, .npmignore, .nvmrc, .editorconfig, .gitattributes, **/.github/**, **/.husky/**, **/.vscode/**, **/.idea/**, \*_/.DS_Store, node_modules/, dist/, build/, .turbo/, .next/, out/, cache/, broadcast/, bin/, coverage_, \*.test, target/
- Flags: compress

---

This file is a merged representation of a subset of the codebase, containing files not matching ignore patterns, combined into a single document by Repomix.
The content has been processed where content has been compressed (code blocks are separated by ⋮---- delimiter).

# File Summary

## Purpose

This file contains a packed representation of a subset of the repository's contents that is considered the most important context.
It is designed to be easily consumable by AI systems for analysis, code review,
or other automated processes.

## File Format

The content is organized as follows:

1. This summary section
2. Repository information
3. Directory structure
4. Repository files (if enabled)
5. Multiple file entries, each consisting of:
   a. A header with the file path (## File: path/to/file)
   b. The full contents of the file in a code block

## Usage Guidelines

- This file should be treated as read-only. Any changes should be made to the
  original repository files, not this packed version.
- When processing this file, use the file path to distinguish
  between different files in the repository.
- Be aware that this file may contain sensitive information. Handle it with
  the same level of security as you would the original repository.

## Notes

- Some files may have been excluded based on .gitignore rules and Repomix's configuration
- Binary files are not included in this packed representation. Please refer to the Repository Structure section for a complete list of file paths, including binary files
- Files matching these patterns are excluded: .gitignore, .dockerignore, .prettierignore, .npmignore, .nvmrc, .editorconfig, .gitattributes, **/.github/**, **/.husky/**, **/.vscode/**, **/.idea/**, \*_/.DS_Store, node_modules/, dist/, build/, .turbo/, .next/, out/, cache/, broadcast/, bin/, coverage_, \*.test, target/
- Files matching patterns in .gitignore are excluded
- Files matching default ignore patterns are excluded
- Content has been compressed - code blocks are separated by ⋮---- delimiter
- Files are sorted by Git change count (files with more changes are at the bottom)

# Directory Structure

```
examples/
  basic_usage.rs
  Cargo.toml
  README.md
scripts/
  update-proto.sh
src/
  generated/
    api.proto.v1.rs
    api.proto.v1.serde.rs
    api.proto.v1.tonic.rs
    mod.rs
  lib.rs
buf.gen.yaml
buf.lock
buf.yaml
Cargo.toml
LICENSE
README.md
```

# Files

## File: examples/basic_usage.rs

```rust
//! Basic usage example for the Symbiotic Relay Rust client.
//!
⋮----
//!
//! This example demonstrates how to:
⋮----
//! This example demonstrates how to:
//! 1. Connect to a Symbiotic Relay server
⋮----
//! 1. Connect to a Symbiotic Relay server
//! 2. Get the current epoch and last committed epochs
⋮----
//! 2. Get the current epoch and last committed epochs
//! 3. Get validator set information
⋮----
//! 3. Get validator set information
//! 4. Sign a message
⋮----
//! 4. Sign a message
//! 5. Retrieve aggregation proofs by request ID
⋮----
//! 5. Retrieve aggregation proofs by request ID
//! 6. Get individual signatures by request ID
⋮----
//! 6. Get individual signatures by request ID
//! 7. Get aggregation proofs by epoch
⋮----
//! 7. Get aggregation proofs by epoch
//! 8. Get signatures by epoch
⋮----
//! 8. Get signatures by epoch
//! 9. Get validator by key
⋮----
//! 9. Get validator by key
//! 10. Get local validator information
⋮----
//! 10. Get local validator information
//! 11. Get signature request IDs by epoch
⋮----
//! 11. Get signature request IDs by epoch
//! 12. Get signature requests by epoch
⋮----
//! 12. Get signature requests by epoch
//! 13. Stream signatures in real-time
⋮----
//! 13. Stream signatures in real-time
//! 14. Stream aggregation proofs in real-time
⋮----
//! 14. Stream aggregation proofs in real-time
//! 15. Stream validator set changes in real-time
⋮----
//! 15. Stream validator set changes in real-time
use std::env;
⋮----
use tokio_stream::StreamExt;
use tonic::transport::Channel;
⋮----
/// Simple wrapper around the generated gRPC client.
pub struct RelayClient {
⋮----
pub struct RelayClient {
⋮----
impl RelayClient {
/// Create a new client connected to the specified server URL.
    pub async fn new(server_url: &str) -> Result<Self, Box<dyn std::error::Error>> {
⋮----
pub async fn new(server_url: &str) -> Result<Self, Box<dyn std::error::Error>> {
let endpoint = tonic::transport::Endpoint::from_shared(server_url.to_string())?;
let channel = endpoint.connect().await?;
⋮----
println!("Connected to Symbiotic Relay at {}", server_url);
⋮----
Ok(Self { client })
⋮----
/// Get the current epoch information.
    pub async fn get_current_epoch(
⋮----
pub async fn get_current_epoch(
⋮----
self.client.get_current_epoch(request).await
⋮----
/// Get the last all committed epochs for all chains.
    pub async fn get_last_all_committed(
⋮----
pub async fn get_last_all_committed(
⋮----
self.client.get_last_all_committed(request).await
⋮----
/// Sign a message using the specified key tag.
    pub async fn sign_message(
⋮----
pub async fn sign_message(
⋮----
message: message.into(),
⋮----
self.client.sign_message(request).await
⋮----
/// Get aggregation proof for a specific request.
    pub async fn get_aggregation_proof(
⋮----
pub async fn get_aggregation_proof(
⋮----
self.client.get_aggregation_proof(request).await
⋮----
/// Get individual signatures for a request.
    pub async fn get_signatures(
⋮----
pub async fn get_signatures(
⋮----
self.client.get_signatures(request).await
⋮----
/// Get validator set information.
    pub async fn get_validator_set(
⋮----
pub async fn get_validator_set(
⋮----
self.client.get_validator_set(request).await
⋮----
/// Get aggregation proofs by epoch.
    pub async fn get_aggregation_proofs_by_epoch(
⋮----
pub async fn get_aggregation_proofs_by_epoch(
⋮----
self.client.get_aggregation_proofs_by_epoch(request).await
⋮----
/// Get signatures by epoch.
    pub async fn get_signatures_by_epoch(
⋮----
pub async fn get_signatures_by_epoch(
⋮----
self.client.get_signatures_by_epoch(request).await
⋮----
/// Get all signature request IDs by epoch.
    pub async fn get_signature_request_ids_by_epoch(
⋮----
pub async fn get_signature_request_ids_by_epoch(
⋮----
.get_signature_request_i_ds_by_epoch(request)
⋮----
/// Get all signature requests by epoch.
    pub async fn get_signature_requests_by_epoch(
⋮----
pub async fn get_signature_requests_by_epoch(
⋮----
self.client.get_signature_requests_by_epoch(request).await
⋮----
/// Get validator by key.
    pub async fn get_validator_by_key(
⋮----
pub async fn get_validator_by_key(
⋮----
on_chain_key: on_chain_key.into(),
⋮----
self.client.get_validator_by_key(request).await
⋮----
/// Get local validator information.
    pub async fn get_local_validator(
⋮----
pub async fn get_local_validator(
⋮----
self.client.get_local_validator(request).await
⋮----
/// Listen to signatures stream in real-time.
    pub async fn listen_signatures(
⋮----
pub async fn listen_signatures(
⋮----
let response = self.client.listen_signatures(request).await?;
Ok(response.into_inner())
⋮----
/// Listen to aggregation proofs stream in real-time.
    pub async fn listen_proofs(
⋮----
pub async fn listen_proofs(
⋮----
let response = self.client.listen_proofs(request).await?;
⋮----
/// Listen to validator set changes stream in real-time.
    pub async fn listen_validator_set(
⋮----
pub async fn listen_validator_set(
⋮----
let response = self.client.listen_validator_set(request).await?;
⋮----
/// Main example function demonstrating client usage.
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize client
let server_url = env::var("RELAY_SERVER_URL").unwrap_or_else(|_| "localhost:8080".to_string());
⋮----
// Example 1: Get current epoch
println!("=== Getting Current Epoch ===");
let epoch_response = client.get_current_epoch().await?;
let epoch_data = epoch_response.into_inner();
println!("Current epoch: {}", epoch_data.epoch);
⋮----
println!("Start time: {:?}", start_time);
⋮----
// Example 2: Get suggested epoch
println!("\n=== Calculate Last Committed Epoch ===");
⋮----
let epoch_infos_response = client.get_last_all_committed().await?;
let epoch_infos_data = epoch_infos_response.into_inner();
⋮----
for (_, info) in epoch_infos_data.epoch_infos.iter() {
⋮----
println!("Last committed epoch: {}", suggested_epoch);
⋮----
// Example 3: Get validator set
println!("\n=== Getting Validator Set ===");
let validator_set = client.get_validator_set(None).await?;
let validator_set_data = validator_set.into_inner();
⋮----
println!("Validator set version: {}", vs.version);
println!("Epoch: {}", vs.epoch);
println!("Status: {:?}", vs.status());
println!("Number of validators: {}", vs.validators.len());
println!("Quorum threshold: {}", vs.quorum_threshold);
⋮----
// Display some validator details
⋮----
if let Some(first_validator) = vs.validators.first() {
println!("First validator operator: {}", first_validator.operator);
println!(
⋮----
println!("First validator is active: {}", first_validator.is_active);
println!("First validator keys count: {}", first_validator.keys.len());
⋮----
// Example 4: Sign a message
println!("\n=== Signing a Message ===");
let message_to_sign = "Hello, Symbiotic!".as_bytes().to_vec();
⋮----
let sign_response = client.sign_message(key_tag, message_to_sign, None).await?;
let sign_data = sign_response.into_inner();
println!("Request ID: {}", sign_data.request_id);
println!("Epoch: {}", sign_data.epoch);
⋮----
// Example 5: Get aggregation proof (this might fail if signing is not complete)
println!("\n=== Getting Aggregation Proof ===");
⋮----
.get_aggregation_proof(sign_data.request_id.clone())
⋮----
let proof_data = proof_response.into_inner();
⋮----
println!("Request ID: {}", proof.request_id);
println!("Proof length: {} bytes", proof.proof.len());
println!("Message hash length: {} bytes", proof.message_hash.len());
⋮----
println!("Could not get aggregation proof yet: {}", e.message());
⋮----
// Example 6: Get individual signatures
println!("\n=== Getting Individual Signatures ===");
match client.get_signatures(sign_data.request_id.clone()).await {
⋮----
let signatures_data = signatures_response.into_inner();
println!("Number of signatures: {}", signatures_data.signatures.len());
⋮----
for (index, signature) in signatures_data.signatures.iter().enumerate() {
println!("Signature {}:", index + 1);
println!("  - Request ID: {}", signature.request_id);
println!("  - Signature length: {} bytes", signature.signature.len());
⋮----
println!("Could not get signatures yet: {}", e.message());
⋮----
// Example 7: Get aggregation proofs by epoch
println!("\n=== Getting Aggregation Proofs by Epoch ===");
⋮----
match client.get_aggregation_proofs_by_epoch(current_epoch).await {
⋮----
let proofs_data = proofs_response.into_inner();
⋮----
println!("Next page cursor (next_from): {:?}", proofs_data.next_from);
for (index, proof) in proofs_data.aggregation_proofs.iter().take(3).enumerate() {
println!("Proof {}:", index + 1);
println!("  - Request ID: {}", proof.request_id);
println!("  - Proof length: {} bytes", proof.proof.len());
println!("  - Message hash length: {} bytes", proof.message_hash.len());
⋮----
println!("Could not get aggregation proofs: {}", e.message());
⋮----
// Example 8: Get signatures by epoch
println!("\n=== Getting Signatures by Epoch ===");
match client.get_signatures_by_epoch(current_epoch).await {
⋮----
println!("Next page cursor (next_from): {:?}", signatures_data.next_from);
⋮----
println!("Could not get signatures by epoch: {}", e.message());
⋮----
// Example 9: Get validator by key
println!("\n=== Getting Validator by Key ===");
⋮----
if let Some(first_key) = first_validator.keys.first() {
⋮----
.get_validator_by_key(None, first_key.tag, first_key.payload.to_vec())
⋮----
let validator = validator_response.into_inner().validator;
⋮----
println!("Found validator operator: {}", val.operator);
println!("Voting power: {}", val.voting_power);
println!("Is active: {}", val.is_active);
⋮----
println!("Could not get validator by key: {}", e.message());
⋮----
// Example 10: Get local validator
println!("\n=== Getting Local Validator ===");
match client.get_local_validator(None).await {
⋮----
let local_validator = local_validator_response.into_inner().validator;
⋮----
println!("Local validator operator: {}", val.operator);
⋮----
println!("Number of keys: {}", val.keys.len());
⋮----
println!("Could not get local validator: {}", e.message());
⋮----
// Example 11: Get signature request IDs by epoch
println!("\n=== Getting Signature Request IDs by Epoch ===");
⋮----
.get_signature_request_ids_by_epoch(current_epoch)
⋮----
let ids_data = ids_response.into_inner();
⋮----
println!("Next page cursor (next_from): {:?}", ids_data.next_from);
for (index, request_id) in ids_data.request_ids.iter().take(5).enumerate() {
println!("  {}: {}", index + 1, request_id);
⋮----
println!("Could not get signature request IDs: {}", e.message());
⋮----
// Example 12: Get signature requests by epoch
println!("\n=== Getting Signature Requests by Epoch ===");
match client.get_signature_requests_by_epoch(current_epoch).await {
⋮----
let requests_data = requests_response.into_inner();
⋮----
println!("Next page cursor (next_from): {:?}", requests_data.next_from);
for (index, request) in requests_data.signature_requests.iter().take(3).enumerate() {
println!("Signature Request {}:", index + 1);
println!("  - Request ID: {}", request.request_id);
println!("  - Key tag: {}", request.key_tag);
println!("  - Message length: {} bytes", request.message.len());
println!("  - Required epoch: {}", request.required_epoch);
⋮----
println!("Could not get signature requests: {}", e.message());
⋮----
// Example 13: Listen to signatures stream
println!("\n=== Listening to Signatures Stream ===");
println!("Starting signature stream (will show first 3 signatures)...");
match client.listen_signatures(Some(current_epoch)).await {
⋮----
while let Some(signature_response) = stream.next().await {
⋮----
println!("Received signature:");
println!("  - Request ID: {}", sig_data.request_id);
println!("  - Epoch: {}", sig_data.epoch);
⋮----
println!("  - Signature request ID: {}", signature.request_id);
⋮----
println!("Stream error: {}", e.message());
⋮----
println!("Could not start signatures stream: {}", e.message());
⋮----
// Example 14: Listen to proofs stream
println!("\n=== Listening to Proofs Stream ===");
println!("Starting proofs stream (will show first 3 proofs)...");
match client.listen_proofs(Some(current_epoch)).await {
⋮----
while let Some(proof_response) = stream.next().await {
⋮----
println!("Received proof:");
println!("  - Request ID: {}", proof_data.request_id);
println!("  - Epoch: {}", proof_data.epoch);
⋮----
println!("  - Proof request ID: {}", proof.request_id);
⋮----
println!("Could not start proofs stream: {}", e.message());
⋮----
// Example 15: Listen to validator set changes stream
println!("\n=== Listening to Validator Set Changes Stream ===");
println!("Starting validator set stream (will show first 2 updates)...");
match client.listen_validator_set(Some(current_epoch)).await {
⋮----
while let Some(validator_set_response) = stream.next().await {
⋮----
println!("Received validator set update:");
println!("  - Epoch: {}", vs.epoch);
println!("  - Number of validators: {}", vs.validators.len());
println!("  - Status: {:?}", vs.status());
⋮----
println!("Could not start validator set stream: {}", e.message());
⋮----
println!("\nExample completed");
Ok(())
```

## File: examples/Cargo.toml

```toml
[package]
name = "symbiotic-relay-client-examples"
version = "0.1.0"
edition = "2024"
publish = false

[[bin]]
name = "basic_usage"
path = "basic_usage.rs"

[dependencies]
symbiotic-relay-client = { path = "..", package = "symbiotic-relay-client" }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tokio-stream = "0.1"
tonic = { version = "0.12", features = ["transport"] }
```

## File: examples/README.md

````markdown
# Symbiotic Relay Client Examples

This directory contains examples demonstrating how to use the `symbiotic-relay-client` library to interact with Symbiotic Relay servers.

## Basic Usage Example

The `basic_usage.rs` example shows how to:

1. Connect to a Symbiotic Relay server
2. Get current epoch information
3. Sign messages
4. Retrieve aggregation proofs and signatures
5. Get validator set information
6. Use streaming responses for real-time updates

## Running the Example

```bash
cd examples
cargo run --bin basic_usage
```

By default, the example will try to connect to `localhost:8080`. You can specify a different server URL by setting the `RELAY_SERVER_URL` environment variable:

```bash
RELAY_SERVER_URL=my-relay-server:8080 cargo run --bin basic_usage
```

NOTE: for the signature/proof generation to work you need to run the script for all active relay servers to get the majority consensus to generate proof.

## Creating a Client

To use the relay client in your own project:

1. Add the dependency to your `Cargo.toml`:

```toml
[dependencies]
relay-client-rs = { path = "../path/to/relay-client-rs" }
tonic = "0.12"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
```

2. Create a client in your code:

```rust
use relay_client::gen::api::proto::v1::symbiotic_api_service_client::SymbioticApiServiceClient;
use tonic::transport::Endpoint;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create transport channel
    let endpoint = Endpoint::from_shared("localhost:8080")?;
    let channel = endpoint.connect().await?;

    // Create the gRPC client
    let mut client = SymbioticApiServiceClient::new(channel);

    // Use the client for API calls
    let response = client.get_current_epoch(
        tonic::Request::new(relay_client::GetCurrentEpochRequest {})
    ).await?;

    println!("Current epoch: {}", response.into_inner().epoch);

    Ok(())
}
```

## Configuration Options

You can configure the transport connection with various options:

```rust
use tonic::transport::Endpoint;
use std::time::Duration;

let endpoint = Endpoint::from_shared("localhost:8080")?
    .timeout(Duration::from_secs(30))
    .connect_timeout(Duration::from_secs(10))
    .tcp_keepalive(Some(Duration::from_secs(60)));

let channel = endpoint.connect().await?;
```

For more advanced configuration options, see the [tonic documentation](https://docs.rs/tonic/).
````

## File: scripts/update-proto.sh

```bash
#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
PROTO_DIR="$ROOT_DIR/api/proto/v1"

rm -rf "$ROOT_DIR/api" "$ROOT_DIR/src/generated"
mkdir -p "$PROTO_DIR"

curl -sfL https://raw.githubusercontent.com/symbioticfi/relay/dev/api/proto/v1/api.proto -o "$PROTO_DIR/api.proto"

cd "$ROOT_DIR"
buf format -w
buf lint
buf generate

# Ensure mod.rs exists for stable imports if plugins didn't create it
if [ ! -f src/generated/mod.rs ]; then
  mkdir -p src/generated
  cat > src/generated/mod.rs << 'EOF'
//! Generated gRPC client code from protocol buffer definitions.
//!
//! This module contains the auto-generated Rust code from the protocol buffer
//! definitions for the Symbiotic Relay API.

pub mod api {
    pub mod proto {
        pub mod v1 {
            // Include the generated prost types and client code
            include!("api.proto.v1.rs");
        }
    }
}
EOF
fi
```

## File: src/generated/api.proto.v1.rs

```rust
// @generated
// This file is @generated by prost-build.
/// Request to check if the current node should be active in a custom schedule.
/// The validator set is divided into groups that rotate through time slots.
⋮----
/// The validator set is divided into groups that rotate through time slots.
/// Use this to coordinate distributed tasks among multiple application instances.
⋮----
/// Use this to coordinate distributed tasks among multiple application instances.
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetCustomScheduleNodeStatusRequest {
/// Epoch number to use for the validator set (optional, defaults to current epoch)
    #[prost(uint64, optional, tag="1")]
⋮----
/// Custom seed for randomizing the schedule (optional). Different seeds produce different schedules
    /// for the same epoch, allowing multiple independent scheduling schemes. If not provided, the schedule
⋮----
/// for the same epoch, allowing multiple independent scheduling schemes. If not provided, the schedule
    /// is deterministic based on epoch alone.
⋮----
/// is deterministic based on epoch alone.
    #[prost(bytes="bytes", optional, tag="2")]
⋮----
/// Duration of each time slot in seconds. Determines how frequently active groups rotate.
    /// Example: 60 seconds means a new group becomes active every minute.
⋮----
/// Example: 60 seconds means a new group becomes active every minute.
    #[prost(uint64, tag="3")]
⋮----
/// Maximum validators per group. Controls redundancy: 1 for single-instance actions (less redundancy),
    /// 2+ for multi-instance actions (more reliability). All validators in a group are active simultaneously.
⋮----
/// 2+ for multi-instance actions (more reliability). All validators in a group are active simultaneously.
    #[prost(uint32, tag="4")]
⋮----
/// Minimum validators required to form a remainder group. When dividing validators into groups,
    /// any remainder smaller than this is not scheduled. Set equal to max for strict group sizes.
⋮----
/// any remainder smaller than this is not scheduled. Set equal to max for strict group sizes.
    #[prost(uint32, tag="5")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetCustomScheduleNodeStatusRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetCustomScheduleNodeStatusRequest".into() }}
/// Response indicating whether the current node should be active now.
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetCustomScheduleNodeStatusResponse {
/// True if this node is active in the current time slot and should perform the scheduled action.
    /// False if this node should wait (another group is active). When multiple validators share a slot,
⋮----
/// False if this node should wait (another group is active). When multiple validators share a slot,
    /// all return true simultaneously, enabling coordinated redundancy.
⋮----
/// all return true simultaneously, enabling coordinated redundancy.
    #[prost(bool, tag="1")]
⋮----
/// Start time of the current active slot. This marks the beginning of the current slot time window.
    /// Can be used to determine how much time is left in the slot.
⋮----
/// Can be used to determine how much time is left in the slot.
    #[prost(message, optional, tag="2")]
⋮----
/// End time of the current active slot. This marks the end of the current slot time window.
    /// Can be used to determine how much time is left in the slot.
⋮----
/// Can be used to determine how much time is left in the slot.
    #[prost(message, optional, tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetCustomScheduleNodeStatusResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetCustomScheduleNodeStatusResponse".into() }}
/// Request message for signing a message
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct SignMessageRequest {
/// Key tag identifier (0-127)
    #[prost(uint32, tag="1")]
⋮----
/// Message to be signed
    #[prost(bytes="bytes", tag="2")]
⋮----
/// Required epoch (optional, if not provided latest committed epoch will be used)
    #[prost(uint64, optional, tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.SignMessageRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.SignMessageRequest".into() }}
/// Response message for sign message request
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct SignMessageResponse {
/// Hash of the signature request
    #[prost(string, tag="1")]
⋮----
/// Epoch number
    #[prost(uint64, tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.SignMessageResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.SignMessageResponse".into() }}
/// Request message for listening to signatures stream
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ListenSignaturesRequest {
/// Optional: start epoch. If provided, stream will first send all historical signatures starting from this epoch, then continue with real-time updates
    /// If not provided, only signatures generated after stream creation will be sent
⋮----
/// If not provided, only signatures generated after stream creation will be sent
    #[prost(uint64, optional, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ListenSignaturesRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ListenSignaturesRequest".into() }}
/// Response message for signatures stream
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ListenSignaturesResponse {
/// Id of the signature request
    #[prost(string, tag="1")]
⋮----
/// Signature data
    #[prost(message, optional, tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ListenSignaturesResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ListenSignaturesResponse".into() }}
/// Request message for listening to aggregation proofs stream
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ListenProofsRequest {
/// Optional: start epoch. If provided, stream will first send all historical proofs starting from this epoch, then continue with real-time updates
    /// If not provided, only proofs generated after stream creation will be sent
⋮----
/// If not provided, only proofs generated after stream creation will be sent
    #[prost(uint64, optional, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ListenProofsRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ListenProofsRequest".into() }}
/// Response message for aggregation proofs stream
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ListenProofsResponse {
/// Id of the request
    #[prost(string, tag="1")]
⋮----
/// Final aggregation proof
    #[prost(message, optional, tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ListenProofsResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ListenProofsResponse".into() }}
/// Request message for listening to validator set changes stream
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ListenValidatorSetRequest {
/// Optional: start epoch. If provided, stream will first send all historical validator sets starting from this epoch, then continue with real-time updates
    /// If not provided, only validator sets generated after stream creation will be sent
⋮----
/// If not provided, only validator sets generated after stream creation will be sent
    #[prost(uint64, optional, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ListenValidatorSetRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ListenValidatorSetRequest".into() }}
/// Response message for validator set changes stream
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ListenValidatorSetResponse {
/// The validator set
    #[prost(message, optional, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ListenValidatorSetResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ListenValidatorSetResponse".into() }}
/// Request message for getting aggregation proof
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetAggregationProofRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetAggregationProofRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetAggregationProofRequest".into() }}
⋮----
pub struct GetAggregationProofsByEpochRequest {
/// Epoch number
    #[prost(uint64, tag="1")]
⋮----
/// Maximum number of items to return. 0 = server default (100). Server clamps to max (1000).
    #[prost(uint32, tag="2")]
⋮----
/// Opaque pagination cursor from a previous response's `next_from`. Empty string starts from the beginning.
    #[prost(string, tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetAggregationProofsByEpochRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetAggregationProofsByEpochRequest".into() }}
/// Request message for getting current epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetCurrentEpochRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetCurrentEpochRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetCurrentEpochRequest".into() }}
/// Request message for getting signatures
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignaturesRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignaturesRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignaturesRequest".into() }}
/// Request message for getting signatures by epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignaturesByEpochRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignaturesByEpochRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignaturesByEpochRequest".into() }}
/// Response message for getting signatures
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignaturesResponse {
/// List of signatures
    #[prost(message, repeated, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignaturesResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignaturesResponse".into() }}
/// Response message for getting signatures by epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignaturesByEpochResponse {
⋮----
/// Cursor to retrieve the next page. Empty when this is the last page.
    #[prost(string, tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignaturesByEpochResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignaturesByEpochResponse".into() }}
/// Request message for getting all signature request IDs by epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignatureRequestIDsByEpochRequest {
⋮----
/// Maximum number of items to return. 0 = server default (1000). Server clamps to max (10000).
    #[prost(uint32, tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignatureRequestIDsByEpochRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignatureRequestIDsByEpochRequest".into() }}
/// Response message for getting all signature request IDs by epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignatureRequestIDsByEpochResponse {
/// List of all signature request IDs for the epoch
    #[prost(string, repeated, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignatureRequestIDsByEpochResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignatureRequestIDsByEpochResponse".into() }}
/// Request message for getting all signature requests by epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignatureRequestsByEpochRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignatureRequestsByEpochRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignatureRequestsByEpochRequest".into() }}
/// Response message for getting all signature requests by epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignatureRequestsByEpochResponse {
/// List of all signature requests for the epoch
    #[prost(message, repeated, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignatureRequestsByEpochResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignatureRequestsByEpochResponse".into() }}
/// Request message for getting signature request
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignatureRequestRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignatureRequestRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignatureRequestRequest".into() }}
/// Request message for getting aggregation status
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetAggregationStatusRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetAggregationStatusRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetAggregationStatusRequest".into() }}
/// Request message for getting validator set
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorSetRequest {
/// Epoch number (optional, if not provided current epoch will be used)
    #[prost(uint64, optional, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorSetRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorSetRequest".into() }}
/// Request message for getting validator by address
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorByAddressRequest {
⋮----
/// Validator address (required)
    #[prost(string, tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorByAddressRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorByAddressRequest".into() }}
/// Request message for getting validator by key
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorByKeyRequest {
⋮----
/// Validator key tag (required)
    #[prost(uint32, tag="2")]
⋮----
/// Validator on chain (public) key (required)
    #[prost(bytes="bytes", tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorByKeyRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorByKeyRequest".into() }}
/// Request message for getting local validator
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetLocalValidatorRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetLocalValidatorRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetLocalValidatorRequest".into() }}
/// Request message for getting validator set header
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorSetHeaderRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorSetHeaderRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorSetHeaderRequest".into() }}
/// Request message for getting validator set metadata
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorSetMetadataRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorSetMetadataRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorSetMetadataRequest".into() }}
/// Response message for getting current epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetCurrentEpochResponse {
⋮----
/// Epoch start time
    #[prost(message, optional, tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetCurrentEpochResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetCurrentEpochResponse".into() }}
/// SignatureRequest represents a signature request
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct SignatureRequest {
/// Request ID
    #[prost(string, tag="1")]
⋮----
/// Key tag identifier (0-127)
    #[prost(uint32, tag="2")]
⋮----
/// Message to be signed
    #[prost(bytes="bytes", tag="3")]
⋮----
/// Required epoch
    #[prost(uint64, tag="4")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.SignatureRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.SignatureRequest".into() }}
/// Response message for getting signature request
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetSignatureRequestResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetSignatureRequestResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetSignatureRequestResponse".into() }}
/// Response message for getting aggregation proof
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetAggregationProofResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetAggregationProofResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetAggregationProofResponse".into() }}
⋮----
pub struct GetAggregationProofsByEpochResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetAggregationProofsByEpochResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetAggregationProofsByEpochResponse".into() }}
⋮----
pub struct AggregationProof {
/// Message hash
    #[prost(bytes="bytes", tag="2")]
⋮----
/// Proof data
    #[prost(bytes="bytes", tag="3")]
⋮----
/// Request ID
    #[prost(string, tag="4")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.AggregationProof".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.AggregationProof".into() }}
/// Response message for getting aggregation status
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetAggregationStatusResponse {
/// Current voting power of the aggregator (big integer as string)
    #[prost(string, tag="1")]
⋮----
/// List of operator addresses that signed the request
    #[prost(string, repeated, tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetAggregationStatusResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetAggregationStatusResponse".into() }}
/// Digital signature
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct Signature {
/// Signature data
    #[prost(bytes="bytes", tag="1")]
⋮----
/// Public key
    #[prost(bytes="bytes", tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.Signature".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.Signature".into() }}
/// Response message for getting validator set
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorSetResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorSetResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorSetResponse".into() }}
/// Response message for getting validator by address
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorByAddressResponse {
/// The validator
    #[prost(message, optional, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorByAddressResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorByAddressResponse".into() }}
/// Response message for getting validator by key
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorByKeyResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorByKeyResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorByKeyResponse".into() }}
/// Response message for getting local validator
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetLocalValidatorResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetLocalValidatorResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetLocalValidatorResponse".into() }}
⋮----
pub struct ExtraData {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ExtraData".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ExtraData".into() }}
/// Response message for getting validator set header
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetValidatorSetMetadataResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorSetMetadataResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorSetMetadataResponse".into() }}
⋮----
pub struct GetValidatorSetHeaderResponse {
/// Version of the validator set
    #[prost(uint32, tag="1")]
⋮----
/// Key tag required to commit next validator set
    #[prost(uint32, tag="2")]
⋮----
/// Validator set epoch
    #[prost(uint64, tag="3")]
⋮----
/// Epoch capture timestamp
    #[prost(message, optional, tag="4")]
⋮----
/// Quorum threshold (big integer as string)
    #[prost(string, tag="5")]
⋮----
/// Total voting power (big integer as string)
    #[prost(string, tag="6")]
⋮----
/// Validators SSZ Merkle root (hex string)
    #[prost(string, tag="7")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetValidatorSetHeaderResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetValidatorSetHeaderResponse".into() }}
/// Validator information
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct Validator {
/// Operator address (hex string)
    #[prost(string, tag="1")]
⋮----
/// Voting power of the validator (big integer as string)
    #[prost(string, tag="2")]
⋮----
/// Indicates if the validator is active
    #[prost(bool, tag="3")]
⋮----
/// List of cryptographic keys
    #[prost(message, repeated, tag="4")]
⋮----
/// List of validator vaults
    #[prost(message, repeated, tag="5")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.Validator".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.Validator".into() }}
/// Cryptographic key
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct Key {
⋮----
/// Key payload
    #[prost(bytes="bytes", tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.Key".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.Key".into() }}
/// Validator vault information
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ValidatorVault {
/// Chain identifier
    #[prost(uint64, tag="1")]
⋮----
/// Vault address
    #[prost(string, tag="2")]
⋮----
/// Voting power for this vault (big integer as string)
    #[prost(string, tag="3")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ValidatorVault".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ValidatorVault".into() }}
/// Request message for getting last committed epoch for a specific settlement chain
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetLastCommittedRequest {
/// Settlement chain ID
    #[prost(uint64, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetLastCommittedRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetLastCommittedRequest".into() }}
/// Response message for getting last committed epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetLastCommittedResponse {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetLastCommittedResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetLastCommittedResponse".into() }}
/// Request message for getting last committed epochs for all chains
///
⋮----
///
/// No parameters needed
⋮----
/// No parameters needed
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetLastAllCommittedRequest {
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetLastAllCommittedRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetLastAllCommittedRequest".into() }}
/// Response message for getting all last committed epochs
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct GetLastAllCommittedResponse {
/// List of settlement chains with their last committed epochs
    #[prost(map="uint64, message", tag="1")]
⋮----
/// Suggested epoch info for signatures, it is the minimum commited epoch among all chains
    #[prost(message, optional, tag="2")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.GetLastAllCommittedResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.GetLastAllCommittedResponse".into() }}
/// Settlement chain with its last committed epoch
#[allow(clippy::derive_partial_eq_without_eq)]
⋮----
pub struct ChainEpochInfo {
/// Last committed epoch for this chain
    #[prost(uint64, tag="1")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ChainEpochInfo".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ChainEpochInfo".into() }}
⋮----
pub struct ValidatorSet {
⋮----
/// Status of validator set header
    #[prost(enumeration="ValidatorSetStatus", tag="6")]
⋮----
/// List of validators
    #[prost(message, repeated, tag="7")]
⋮----
fn full_name() -> ::prost::alloc::string::String { "api.proto.v1.ValidatorSet".into() }fn type_url() -> ::prost::alloc::string::String { "/api.proto.v1.ValidatorSet".into() }}
/// Validator set status enumeration
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
⋮----
pub enum ValidatorSetStatus {
/// Default/unknown status
    Unspecified = 0,
/// Derived status
    Derived = 1,
/// Aggregated status
    Aggregated = 2,
/// Committed status
    Committed = 3,
⋮----
impl ValidatorSetStatus {
/// String value of the enum field names used in the ProtoBuf definition.
    ///
⋮----
///
    /// The values are not transformed in any way and thus are considered stable
⋮----
/// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
⋮----
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
⋮----
pub fn as_str_name(&self) -> &'static str {
⋮----
/// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
⋮----
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
⋮----
"VALIDATOR_SET_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"VALIDATOR_SET_STATUS_DERIVED" => Some(Self::Derived),
"VALIDATOR_SET_STATUS_AGGREGATED" => Some(Self::Aggregated),
"VALIDATOR_SET_STATUS_COMMITTED" => Some(Self::Committed),
⋮----
/// Signing process status enumeration
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
⋮----
pub enum SigningStatus {
⋮----
/// Request has been created and is waiting for signatures
    Pending = 1,
/// Signing process completed successfully with proof
    Completed = 2,
/// Signing process failed
    Failed = 3,
/// Signing request timed out
    Timeout = 4,
⋮----
impl SigningStatus {
⋮----
"SIGNING_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"SIGNING_STATUS_PENDING" => Some(Self::Pending),
"SIGNING_STATUS_COMPLETED" => Some(Self::Completed),
"SIGNING_STATUS_FAILED" => Some(Self::Failed),
"SIGNING_STATUS_TIMEOUT" => Some(Self::Timeout),
⋮----
/// Error code enumeration
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
⋮----
pub enum ErrorCode {
/// Default/unknown error
    Unspecified = 0,
/// No data found
    NoData = 1,
/// Internal server error
    Internal = 2,
/// Not an aggregator node
    NotAggregator = 3,
⋮----
impl ErrorCode {
⋮----
"ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"ERROR_CODE_NO_DATA" => Some(Self::NoData),
"ERROR_CODE_INTERNAL" => Some(Self::Internal),
"ERROR_CODE_NOT_AGGREGATOR" => Some(Self::NotAggregator),
⋮----
/// Encoded file descriptor set for the `api.proto.v1` package
pub const FILE_DESCRIPTOR_SET: &[u8] = &[
⋮----
include!("api.proto.v1.tonic.rs");
include!("api.proto.v1.serde.rs");
// @@protoc_insertion_point(module)
```

## File: src/generated/api.proto.v1.serde.rs

```rust
// @generated
⋮----
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
⋮----
use serde::ser::SerializeStruct;
⋮----
if !self.message_hash.is_empty() {
⋮----
if !self.proof.is_empty() {
⋮----
if !self.request_id.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.AggregationProof", len)?;
⋮----
struct_ser.serialize_field("messageHash", pbjson::private::base64::encode(&self.message_hash).as_str())?;
⋮----
struct_ser.serialize_field("proof", pbjson::private::base64::encode(&self.proof).as_str())?;
⋮----
struct_ser.serialize_field("requestId", &self.request_id)?;
⋮----
struct_ser.end()
⋮----
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
⋮----
enum GeneratedField {
⋮----
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
⋮----
struct GeneratedVisitor;
⋮----
type Value = GeneratedField;
⋮----
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
⋮----
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
⋮----
"messageHash" | "message_hash" => Ok(GeneratedField::MessageHash),
"proof" => Ok(GeneratedField::Proof),
"requestId" | "request_id" => Ok(GeneratedField::RequestId),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
⋮----
deserializer.deserialize_identifier(GeneratedVisitor)
⋮----
type Value = AggregationProof;
⋮----
formatter.write_str("struct api.proto.v1.AggregationProof")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<AggregationProof, V::Error>
⋮----
while let Some(k) = map_.next_key()? {
⋮----
if message_hash__.is_some() {
return Err(serde::de::Error::duplicate_field("messageHash"));
⋮----
Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
⋮----
if proof__.is_some() {
return Err(serde::de::Error::duplicate_field("proof"));
⋮----
if request_id__.is_some() {
return Err(serde::de::Error::duplicate_field("requestId"));
⋮----
request_id__ = Some(map_.next_value()?);
⋮----
Ok(AggregationProof {
message_hash: message_hash__.unwrap_or_default(),
proof: proof__.unwrap_or_default(),
request_id: request_id__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.AggregationProof", FIELDS, GeneratedVisitor)
⋮----
if self.start_time.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ChainEpochInfo", len)?;
⋮----
struct_ser.serialize_field("lastCommittedEpoch", ToString::to_string(&self.last_committed_epoch).as_str())?;
⋮----
if let Some(v) = self.start_time.as_ref() {
struct_ser.serialize_field("startTime", v)?;
⋮----
"lastCommittedEpoch" | "last_committed_epoch" => Ok(GeneratedField::LastCommittedEpoch),
"startTime" | "start_time" => Ok(GeneratedField::StartTime),
⋮----
type Value = ChainEpochInfo;
⋮----
formatter.write_str("struct api.proto.v1.ChainEpochInfo")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ChainEpochInfo, V::Error>
⋮----
if last_committed_epoch__.is_some() {
return Err(serde::de::Error::duplicate_field("lastCommittedEpoch"));
⋮----
Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
⋮----
if start_time__.is_some() {
return Err(serde::de::Error::duplicate_field("startTime"));
⋮----
start_time__ = map_.next_value()?;
⋮----
Ok(ChainEpochInfo {
last_committed_epoch: last_committed_epoch__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.ChainEpochInfo", FIELDS, GeneratedVisitor)
⋮----
serializer.serialize_str(variant)
⋮----
type Value = ErrorCode;
⋮----
fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
⋮----
.ok()
.and_then(|x| x.try_into().ok())
.ok_or_else(|| {
⋮----
fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
⋮----
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
⋮----
"ERROR_CODE_UNSPECIFIED" => Ok(ErrorCode::Unspecified),
"ERROR_CODE_NO_DATA" => Ok(ErrorCode::NoData),
"ERROR_CODE_INTERNAL" => Ok(ErrorCode::Internal),
"ERROR_CODE_NOT_AGGREGATOR" => Ok(ErrorCode::NotAggregator),
_ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
⋮----
deserializer.deserialize_any(GeneratedVisitor)
⋮----
if !self.key.is_empty() {
⋮----
if !self.value.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ExtraData", len)?;
⋮----
struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?;
⋮----
struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?;
⋮----
"key" => Ok(GeneratedField::Key),
"value" => Ok(GeneratedField::Value),
⋮----
type Value = ExtraData;
⋮----
formatter.write_str("struct api.proto.v1.ExtraData")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ExtraData, V::Error>
⋮----
if key__.is_some() {
return Err(serde::de::Error::duplicate_field("key"));
⋮----
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("value"));
⋮----
Ok(ExtraData {
key: key__.unwrap_or_default(),
value: value__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.ExtraData", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetAggregationProofRequest", len)?;
⋮----
type Value = GetAggregationProofRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetAggregationProofRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAggregationProofRequest, V::Error>
⋮----
Ok(GetAggregationProofRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetAggregationProofRequest", FIELDS, GeneratedVisitor)
⋮----
if self.aggregation_proof.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetAggregationProofResponse", len)?;
if let Some(v) = self.aggregation_proof.as_ref() {
struct_ser.serialize_field("aggregationProof", v)?;
⋮----
"aggregationProof" | "aggregation_proof" => Ok(GeneratedField::AggregationProof),
⋮----
type Value = GetAggregationProofResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetAggregationProofResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAggregationProofResponse, V::Error>
⋮----
if aggregation_proof__.is_some() {
return Err(serde::de::Error::duplicate_field("aggregationProof"));
⋮----
aggregation_proof__ = map_.next_value()?;
⋮----
Ok(GetAggregationProofResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetAggregationProofResponse", FIELDS, GeneratedVisitor)
⋮----
if !self.from.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetAggregationProofsByEpochRequest", len)?;
⋮----
struct_ser.serialize_field("epoch", ToString::to_string(&self.epoch).as_str())?;
⋮----
struct_ser.serialize_field("pageSize", &self.page_size)?;
⋮----
struct_ser.serialize_field("from", &self.from)?;
⋮----
"epoch" => Ok(GeneratedField::Epoch),
"pageSize" | "page_size" => Ok(GeneratedField::PageSize),
"from" => Ok(GeneratedField::From),
⋮----
type Value = GetAggregationProofsByEpochRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetAggregationProofsByEpochRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAggregationProofsByEpochRequest, V::Error>
⋮----
if epoch__.is_some() {
return Err(serde::de::Error::duplicate_field("epoch"));
⋮----
if page_size__.is_some() {
return Err(serde::de::Error::duplicate_field("pageSize"));
⋮----
if from__.is_some() {
return Err(serde::de::Error::duplicate_field("from"));
⋮----
from__ = Some(map_.next_value()?);
⋮----
Ok(GetAggregationProofsByEpochRequest {
epoch: epoch__.unwrap_or_default(),
page_size: page_size__.unwrap_or_default(),
from: from__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetAggregationProofsByEpochRequest", FIELDS, GeneratedVisitor)
⋮----
if !self.aggregation_proofs.is_empty() {
⋮----
if !self.next_from.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetAggregationProofsByEpochResponse", len)?;
⋮----
struct_ser.serialize_field("aggregationProofs", &self.aggregation_proofs)?;
⋮----
struct_ser.serialize_field("nextFrom", &self.next_from)?;
⋮----
"aggregationProofs" | "aggregation_proofs" => Ok(GeneratedField::AggregationProofs),
"nextFrom" | "next_from" => Ok(GeneratedField::NextFrom),
⋮----
type Value = GetAggregationProofsByEpochResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetAggregationProofsByEpochResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAggregationProofsByEpochResponse, V::Error>
⋮----
if aggregation_proofs__.is_some() {
return Err(serde::de::Error::duplicate_field("aggregationProofs"));
⋮----
aggregation_proofs__ = Some(map_.next_value()?);
⋮----
if next_from__.is_some() {
return Err(serde::de::Error::duplicate_field("nextFrom"));
⋮----
next_from__ = Some(map_.next_value()?);
⋮----
Ok(GetAggregationProofsByEpochResponse {
aggregation_proofs: aggregation_proofs__.unwrap_or_default(),
next_from: next_from__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetAggregationProofsByEpochResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetAggregationStatusRequest", len)?;
⋮----
type Value = GetAggregationStatusRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetAggregationStatusRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAggregationStatusRequest, V::Error>
⋮----
Ok(GetAggregationStatusRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetAggregationStatusRequest", FIELDS, GeneratedVisitor)
⋮----
if !self.current_voting_power.is_empty() {
⋮----
if !self.signer_operators.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetAggregationStatusResponse", len)?;
⋮----
struct_ser.serialize_field("currentVotingPower", &self.current_voting_power)?;
⋮----
struct_ser.serialize_field("signerOperators", &self.signer_operators)?;
⋮----
"currentVotingPower" | "current_voting_power" => Ok(GeneratedField::CurrentVotingPower),
"signerOperators" | "signer_operators" => Ok(GeneratedField::SignerOperators),
⋮----
type Value = GetAggregationStatusResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetAggregationStatusResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetAggregationStatusResponse, V::Error>
⋮----
if current_voting_power__.is_some() {
return Err(serde::de::Error::duplicate_field("currentVotingPower"));
⋮----
current_voting_power__ = Some(map_.next_value()?);
⋮----
if signer_operators__.is_some() {
return Err(serde::de::Error::duplicate_field("signerOperators"));
⋮----
signer_operators__ = Some(map_.next_value()?);
⋮----
Ok(GetAggregationStatusResponse {
current_voting_power: current_voting_power__.unwrap_or_default(),
signer_operators: signer_operators__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetAggregationStatusResponse", FIELDS, GeneratedVisitor)
⋮----
let struct_ser = serializer.serialize_struct("api.proto.v1.GetCurrentEpochRequest", len)?;
⋮----
Err(serde::de::Error::unknown_field(value, FIELDS))
⋮----
type Value = GetCurrentEpochRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetCurrentEpochRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCurrentEpochRequest, V::Error>
⋮----
while map_.next_key::<GeneratedField>()?.is_some() {
⋮----
Ok(GetCurrentEpochRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetCurrentEpochRequest", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetCurrentEpochResponse", len)?;
⋮----
type Value = GetCurrentEpochResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetCurrentEpochResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCurrentEpochResponse, V::Error>
⋮----
Ok(GetCurrentEpochResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetCurrentEpochResponse", FIELDS, GeneratedVisitor)
⋮----
if self.epoch.is_some() {
⋮----
if self.seed.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetCustomScheduleNodeStatusRequest", len)?;
if let Some(v) = self.epoch.as_ref() {
⋮----
struct_ser.serialize_field("epoch", ToString::to_string(&v).as_str())?;
⋮----
if let Some(v) = self.seed.as_ref() {
⋮----
struct_ser.serialize_field("seed", pbjson::private::base64::encode(&v).as_str())?;
⋮----
struct_ser.serialize_field("slotDurationSeconds", ToString::to_string(&self.slot_duration_seconds).as_str())?;
⋮----
struct_ser.serialize_field("maxParticipantsPerSlot", &self.max_participants_per_slot)?;
⋮----
struct_ser.serialize_field("minParticipantsPerSlot", &self.min_participants_per_slot)?;
⋮----
"seed" => Ok(GeneratedField::Seed),
"slotDurationSeconds" | "slot_duration_seconds" => Ok(GeneratedField::SlotDurationSeconds),
"maxParticipantsPerSlot" | "max_participants_per_slot" => Ok(GeneratedField::MaxParticipantsPerSlot),
"minParticipantsPerSlot" | "min_participants_per_slot" => Ok(GeneratedField::MinParticipantsPerSlot),
⋮----
type Value = GetCustomScheduleNodeStatusRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetCustomScheduleNodeStatusRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCustomScheduleNodeStatusRequest, V::Error>
⋮----
map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
⋮----
if seed__.is_some() {
return Err(serde::de::Error::duplicate_field("seed"));
⋮----
map_.next_value::<::std::option::Option<::pbjson::private::BytesDeserialize<_>>>()?.map(|x| x.0)
⋮----
if slot_duration_seconds__.is_some() {
return Err(serde::de::Error::duplicate_field("slotDurationSeconds"));
⋮----
if max_participants_per_slot__.is_some() {
return Err(serde::de::Error::duplicate_field("maxParticipantsPerSlot"));
⋮----
if min_participants_per_slot__.is_some() {
return Err(serde::de::Error::duplicate_field("minParticipantsPerSlot"));
⋮----
Ok(GetCustomScheduleNodeStatusRequest {
⋮----
slot_duration_seconds: slot_duration_seconds__.unwrap_or_default(),
max_participants_per_slot: max_participants_per_slot__.unwrap_or_default(),
min_participants_per_slot: min_participants_per_slot__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetCustomScheduleNodeStatusRequest", FIELDS, GeneratedVisitor)
⋮----
if self.current_slot_start_time.is_some() {
⋮----
if self.current_slot_end_time.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetCustomScheduleNodeStatusResponse", len)?;
⋮----
struct_ser.serialize_field("isActive", &self.is_active)?;
⋮----
if let Some(v) = self.current_slot_start_time.as_ref() {
struct_ser.serialize_field("currentSlotStartTime", v)?;
⋮----
if let Some(v) = self.current_slot_end_time.as_ref() {
struct_ser.serialize_field("currentSlotEndTime", v)?;
⋮----
"isActive" | "is_active" => Ok(GeneratedField::IsActive),
"currentSlotStartTime" | "current_slot_start_time" => Ok(GeneratedField::CurrentSlotStartTime),
"currentSlotEndTime" | "current_slot_end_time" => Ok(GeneratedField::CurrentSlotEndTime),
⋮----
type Value = GetCustomScheduleNodeStatusResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetCustomScheduleNodeStatusResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetCustomScheduleNodeStatusResponse, V::Error>
⋮----
if is_active__.is_some() {
return Err(serde::de::Error::duplicate_field("isActive"));
⋮----
is_active__ = Some(map_.next_value()?);
⋮----
if current_slot_start_time__.is_some() {
return Err(serde::de::Error::duplicate_field("currentSlotStartTime"));
⋮----
current_slot_start_time__ = map_.next_value()?;
⋮----
if current_slot_end_time__.is_some() {
return Err(serde::de::Error::duplicate_field("currentSlotEndTime"));
⋮----
current_slot_end_time__ = map_.next_value()?;
⋮----
Ok(GetCustomScheduleNodeStatusResponse {
is_active: is_active__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetCustomScheduleNodeStatusResponse", FIELDS, GeneratedVisitor)
⋮----
let struct_ser = serializer.serialize_struct("api.proto.v1.GetLastAllCommittedRequest", len)?;
⋮----
type Value = GetLastAllCommittedRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetLastAllCommittedRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetLastAllCommittedRequest, V::Error>
⋮----
Ok(GetLastAllCommittedRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetLastAllCommittedRequest", FIELDS, GeneratedVisitor)
⋮----
if !self.epoch_infos.is_empty() {
⋮----
if self.suggested_epoch_info.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetLastAllCommittedResponse", len)?;
⋮----
struct_ser.serialize_field("epochInfos", &self.epoch_infos)?;
⋮----
if let Some(v) = self.suggested_epoch_info.as_ref() {
struct_ser.serialize_field("suggestedEpochInfo", v)?;
⋮----
"epochInfos" | "epoch_infos" => Ok(GeneratedField::EpochInfos),
"suggestedEpochInfo" | "suggested_epoch_info" => Ok(GeneratedField::SuggestedEpochInfo),
⋮----
type Value = GetLastAllCommittedResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetLastAllCommittedResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetLastAllCommittedResponse, V::Error>
⋮----
if epoch_infos__.is_some() {
return Err(serde::de::Error::duplicate_field("epochInfos"));
⋮----
epoch_infos__ = Some(
⋮----
.into_iter().map(|(k,v)| (k.0, v)).collect()
⋮----
if suggested_epoch_info__.is_some() {
return Err(serde::de::Error::duplicate_field("suggestedEpochInfo"));
⋮----
suggested_epoch_info__ = map_.next_value()?;
⋮----
Ok(GetLastAllCommittedResponse {
epoch_infos: epoch_infos__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetLastAllCommittedResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetLastCommittedRequest", len)?;
⋮----
struct_ser.serialize_field("settlementChainId", ToString::to_string(&self.settlement_chain_id).as_str())?;
⋮----
"settlementChainId" | "settlement_chain_id" => Ok(GeneratedField::SettlementChainId),
⋮----
type Value = GetLastCommittedRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetLastCommittedRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetLastCommittedRequest, V::Error>
⋮----
if settlement_chain_id__.is_some() {
return Err(serde::de::Error::duplicate_field("settlementChainId"));
⋮----
Ok(GetLastCommittedRequest {
settlement_chain_id: settlement_chain_id__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetLastCommittedRequest", FIELDS, GeneratedVisitor)
⋮----
if self.epoch_info.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetLastCommittedResponse", len)?;
⋮----
if let Some(v) = self.epoch_info.as_ref() {
struct_ser.serialize_field("epochInfo", v)?;
⋮----
"epochInfo" | "epoch_info" => Ok(GeneratedField::EpochInfo),
⋮----
type Value = GetLastCommittedResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetLastCommittedResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetLastCommittedResponse, V::Error>
⋮----
if epoch_info__.is_some() {
return Err(serde::de::Error::duplicate_field("epochInfo"));
⋮----
epoch_info__ = map_.next_value()?;
⋮----
Ok(GetLastCommittedResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetLastCommittedResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetLocalValidatorRequest", len)?;
⋮----
type Value = GetLocalValidatorRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetLocalValidatorRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetLocalValidatorRequest, V::Error>
⋮----
Ok(GetLocalValidatorRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetLocalValidatorRequest", FIELDS, GeneratedVisitor)
⋮----
if self.validator.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetLocalValidatorResponse", len)?;
if let Some(v) = self.validator.as_ref() {
struct_ser.serialize_field("validator", v)?;
⋮----
"validator" => Ok(GeneratedField::Validator),
⋮----
type Value = GetLocalValidatorResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetLocalValidatorResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetLocalValidatorResponse, V::Error>
⋮----
if validator__.is_some() {
return Err(serde::de::Error::duplicate_field("validator"));
⋮----
validator__ = map_.next_value()?;
⋮----
Ok(GetLocalValidatorResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetLocalValidatorResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignatureRequestIDsByEpochRequest", len)?;
⋮----
type Value = GetSignatureRequestIDsByEpochRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetSignatureRequestIDsByEpochRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignatureRequestIDsByEpochRequest, V::Error>
⋮----
Ok(GetSignatureRequestIDsByEpochRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignatureRequestIDsByEpochRequest", FIELDS, GeneratedVisitor)
⋮----
if !self.request_ids.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignatureRequestIDsByEpochResponse", len)?;
⋮----
struct_ser.serialize_field("requestIds", &self.request_ids)?;
⋮----
"requestIds" | "request_ids" => Ok(GeneratedField::RequestIds),
⋮----
type Value = GetSignatureRequestIDsByEpochResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetSignatureRequestIDsByEpochResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignatureRequestIDsByEpochResponse, V::Error>
⋮----
if request_ids__.is_some() {
return Err(serde::de::Error::duplicate_field("requestIds"));
⋮----
request_ids__ = Some(map_.next_value()?);
⋮----
Ok(GetSignatureRequestIDsByEpochResponse {
request_ids: request_ids__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignatureRequestIDsByEpochResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignatureRequestRequest", len)?;
⋮----
type Value = GetSignatureRequestRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetSignatureRequestRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignatureRequestRequest, V::Error>
⋮----
Ok(GetSignatureRequestRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignatureRequestRequest", FIELDS, GeneratedVisitor)
⋮----
if self.signature_request.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignatureRequestResponse", len)?;
if let Some(v) = self.signature_request.as_ref() {
struct_ser.serialize_field("signatureRequest", v)?;
⋮----
"signatureRequest" | "signature_request" => Ok(GeneratedField::SignatureRequest),
⋮----
type Value = GetSignatureRequestResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetSignatureRequestResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignatureRequestResponse, V::Error>
⋮----
if signature_request__.is_some() {
return Err(serde::de::Error::duplicate_field("signatureRequest"));
⋮----
signature_request__ = map_.next_value()?;
⋮----
Ok(GetSignatureRequestResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignatureRequestResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignatureRequestsByEpochRequest", len)?;
⋮----
type Value = GetSignatureRequestsByEpochRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetSignatureRequestsByEpochRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignatureRequestsByEpochRequest, V::Error>
⋮----
Ok(GetSignatureRequestsByEpochRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignatureRequestsByEpochRequest", FIELDS, GeneratedVisitor)
⋮----
if !self.signature_requests.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignatureRequestsByEpochResponse", len)?;
⋮----
struct_ser.serialize_field("signatureRequests", &self.signature_requests)?;
⋮----
"signatureRequests" | "signature_requests" => Ok(GeneratedField::SignatureRequests),
⋮----
type Value = GetSignatureRequestsByEpochResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetSignatureRequestsByEpochResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignatureRequestsByEpochResponse, V::Error>
⋮----
if signature_requests__.is_some() {
return Err(serde::de::Error::duplicate_field("signatureRequests"));
⋮----
signature_requests__ = Some(map_.next_value()?);
⋮----
Ok(GetSignatureRequestsByEpochResponse {
signature_requests: signature_requests__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignatureRequestsByEpochResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignaturesByEpochRequest", len)?;
⋮----
type Value = GetSignaturesByEpochRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetSignaturesByEpochRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignaturesByEpochRequest, V::Error>
⋮----
Ok(GetSignaturesByEpochRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignaturesByEpochRequest", FIELDS, GeneratedVisitor)
⋮----
if !self.signatures.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignaturesByEpochResponse", len)?;
⋮----
struct_ser.serialize_field("signatures", &self.signatures)?;
⋮----
"signatures" => Ok(GeneratedField::Signatures),
⋮----
type Value = GetSignaturesByEpochResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetSignaturesByEpochResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignaturesByEpochResponse, V::Error>
⋮----
if signatures__.is_some() {
return Err(serde::de::Error::duplicate_field("signatures"));
⋮----
signatures__ = Some(map_.next_value()?);
⋮----
Ok(GetSignaturesByEpochResponse {
signatures: signatures__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignaturesByEpochResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignaturesRequest", len)?;
⋮----
type Value = GetSignaturesRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetSignaturesRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignaturesRequest, V::Error>
⋮----
Ok(GetSignaturesRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignaturesRequest", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetSignaturesResponse", len)?;
⋮----
type Value = GetSignaturesResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetSignaturesResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetSignaturesResponse, V::Error>
⋮----
Ok(GetSignaturesResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetSignaturesResponse", FIELDS, GeneratedVisitor)
⋮----
if !self.address.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorByAddressRequest", len)?;
⋮----
struct_ser.serialize_field("address", &self.address)?;
⋮----
"address" => Ok(GeneratedField::Address),
⋮----
type Value = GetValidatorByAddressRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorByAddressRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorByAddressRequest, V::Error>
⋮----
if address__.is_some() {
return Err(serde::de::Error::duplicate_field("address"));
⋮----
address__ = Some(map_.next_value()?);
⋮----
Ok(GetValidatorByAddressRequest {
⋮----
address: address__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorByAddressRequest", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorByAddressResponse", len)?;
⋮----
type Value = GetValidatorByAddressResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorByAddressResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorByAddressResponse, V::Error>
⋮----
Ok(GetValidatorByAddressResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorByAddressResponse", FIELDS, GeneratedVisitor)
⋮----
if !self.on_chain_key.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorByKeyRequest", len)?;
⋮----
struct_ser.serialize_field("keyTag", &self.key_tag)?;
⋮----
struct_ser.serialize_field("onChainKey", pbjson::private::base64::encode(&self.on_chain_key).as_str())?;
⋮----
"keyTag" | "key_tag" => Ok(GeneratedField::KeyTag),
"onChainKey" | "on_chain_key" => Ok(GeneratedField::OnChainKey),
⋮----
type Value = GetValidatorByKeyRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorByKeyRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorByKeyRequest, V::Error>
⋮----
if key_tag__.is_some() {
return Err(serde::de::Error::duplicate_field("keyTag"));
⋮----
if on_chain_key__.is_some() {
return Err(serde::de::Error::duplicate_field("onChainKey"));
⋮----
Ok(GetValidatorByKeyRequest {
⋮----
key_tag: key_tag__.unwrap_or_default(),
on_chain_key: on_chain_key__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorByKeyRequest", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorByKeyResponse", len)?;
⋮----
type Value = GetValidatorByKeyResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorByKeyResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorByKeyResponse, V::Error>
⋮----
Ok(GetValidatorByKeyResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorByKeyResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorSetHeaderRequest", len)?;
⋮----
type Value = GetValidatorSetHeaderRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorSetHeaderRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorSetHeaderRequest, V::Error>
⋮----
Ok(GetValidatorSetHeaderRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorSetHeaderRequest", FIELDS, GeneratedVisitor)
⋮----
if self.capture_timestamp.is_some() {
⋮----
if !self.quorum_threshold.is_empty() {
⋮----
if !self.total_voting_power.is_empty() {
⋮----
if !self.validators_ssz_mroot.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorSetHeaderResponse", len)?;
⋮----
struct_ser.serialize_field("version", &self.version)?;
⋮----
struct_ser.serialize_field("requiredKeyTag", &self.required_key_tag)?;
⋮----
if let Some(v) = self.capture_timestamp.as_ref() {
struct_ser.serialize_field("captureTimestamp", v)?;
⋮----
struct_ser.serialize_field("quorumThreshold", &self.quorum_threshold)?;
⋮----
struct_ser.serialize_field("totalVotingPower", &self.total_voting_power)?;
⋮----
struct_ser.serialize_field("validatorsSszMroot", &self.validators_ssz_mroot)?;
⋮----
"version" => Ok(GeneratedField::Version),
"requiredKeyTag" | "required_key_tag" => Ok(GeneratedField::RequiredKeyTag),
⋮----
"captureTimestamp" | "capture_timestamp" => Ok(GeneratedField::CaptureTimestamp),
"quorumThreshold" | "quorum_threshold" => Ok(GeneratedField::QuorumThreshold),
"totalVotingPower" | "total_voting_power" => Ok(GeneratedField::TotalVotingPower),
"validatorsSszMroot" | "validators_ssz_mroot" => Ok(GeneratedField::ValidatorsSszMroot),
⋮----
type Value = GetValidatorSetHeaderResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorSetHeaderResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorSetHeaderResponse, V::Error>
⋮----
if version__.is_some() {
return Err(serde::de::Error::duplicate_field("version"));
⋮----
if required_key_tag__.is_some() {
return Err(serde::de::Error::duplicate_field("requiredKeyTag"));
⋮----
if capture_timestamp__.is_some() {
return Err(serde::de::Error::duplicate_field("captureTimestamp"));
⋮----
capture_timestamp__ = map_.next_value()?;
⋮----
if quorum_threshold__.is_some() {
return Err(serde::de::Error::duplicate_field("quorumThreshold"));
⋮----
quorum_threshold__ = Some(map_.next_value()?);
⋮----
if total_voting_power__.is_some() {
return Err(serde::de::Error::duplicate_field("totalVotingPower"));
⋮----
total_voting_power__ = Some(map_.next_value()?);
⋮----
if validators_ssz_mroot__.is_some() {
return Err(serde::de::Error::duplicate_field("validatorsSszMroot"));
⋮----
validators_ssz_mroot__ = Some(map_.next_value()?);
⋮----
Ok(GetValidatorSetHeaderResponse {
version: version__.unwrap_or_default(),
required_key_tag: required_key_tag__.unwrap_or_default(),
⋮----
quorum_threshold: quorum_threshold__.unwrap_or_default(),
total_voting_power: total_voting_power__.unwrap_or_default(),
validators_ssz_mroot: validators_ssz_mroot__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorSetHeaderResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorSetMetadataRequest", len)?;
⋮----
type Value = GetValidatorSetMetadataRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorSetMetadataRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorSetMetadataRequest, V::Error>
⋮----
Ok(GetValidatorSetMetadataRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorSetMetadataRequest", FIELDS, GeneratedVisitor)
⋮----
if !self.extra_data.is_empty() {
⋮----
if !self.commitment_data.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorSetMetadataResponse", len)?;
⋮----
struct_ser.serialize_field("extraData", &self.extra_data)?;
⋮----
struct_ser.serialize_field("commitmentData", pbjson::private::base64::encode(&self.commitment_data).as_str())?;
⋮----
"extraData" | "extra_data" => Ok(GeneratedField::ExtraData),
"commitmentData" | "commitment_data" => Ok(GeneratedField::CommitmentData),
⋮----
type Value = GetValidatorSetMetadataResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorSetMetadataResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorSetMetadataResponse, V::Error>
⋮----
if extra_data__.is_some() {
return Err(serde::de::Error::duplicate_field("extraData"));
⋮----
extra_data__ = Some(map_.next_value()?);
⋮----
if commitment_data__.is_some() {
return Err(serde::de::Error::duplicate_field("commitmentData"));
⋮----
Ok(GetValidatorSetMetadataResponse {
extra_data: extra_data__.unwrap_or_default(),
commitment_data: commitment_data__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorSetMetadataResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorSetRequest", len)?;
⋮----
type Value = GetValidatorSetRequest;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorSetRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorSetRequest, V::Error>
⋮----
Ok(GetValidatorSetRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorSetRequest", FIELDS, GeneratedVisitor)
⋮----
if self.validator_set.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.GetValidatorSetResponse", len)?;
if let Some(v) = self.validator_set.as_ref() {
struct_ser.serialize_field("validatorSet", v)?;
⋮----
"validatorSet" | "validator_set" => Ok(GeneratedField::ValidatorSet),
⋮----
type Value = GetValidatorSetResponse;
⋮----
formatter.write_str("struct api.proto.v1.GetValidatorSetResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetValidatorSetResponse, V::Error>
⋮----
if validator_set__.is_some() {
return Err(serde::de::Error::duplicate_field("validatorSet"));
⋮----
validator_set__ = map_.next_value()?;
⋮----
Ok(GetValidatorSetResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.GetValidatorSetResponse", FIELDS, GeneratedVisitor)
⋮----
if !self.payload.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.Key", len)?;
⋮----
struct_ser.serialize_field("tag", &self.tag)?;
⋮----
struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?;
⋮----
"tag" => Ok(GeneratedField::Tag),
"payload" => Ok(GeneratedField::Payload),
⋮----
type Value = Key;
⋮----
formatter.write_str("struct api.proto.v1.Key")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<Key, V::Error>
⋮----
if tag__.is_some() {
return Err(serde::de::Error::duplicate_field("tag"));
⋮----
if payload__.is_some() {
return Err(serde::de::Error::duplicate_field("payload"));
⋮----
Ok(Key {
tag: tag__.unwrap_or_default(),
payload: payload__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.Key", FIELDS, GeneratedVisitor)
⋮----
if self.start_epoch.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ListenProofsRequest", len)?;
if let Some(v) = self.start_epoch.as_ref() {
⋮----
struct_ser.serialize_field("startEpoch", ToString::to_string(&v).as_str())?;
⋮----
"startEpoch" | "start_epoch" => Ok(GeneratedField::StartEpoch),
⋮----
type Value = ListenProofsRequest;
⋮----
formatter.write_str("struct api.proto.v1.ListenProofsRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListenProofsRequest, V::Error>
⋮----
if start_epoch__.is_some() {
return Err(serde::de::Error::duplicate_field("startEpoch"));
⋮----
Ok(ListenProofsRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.ListenProofsRequest", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ListenProofsResponse", len)?;
⋮----
type Value = ListenProofsResponse;
⋮----
formatter.write_str("struct api.proto.v1.ListenProofsResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListenProofsResponse, V::Error>
⋮----
Ok(ListenProofsResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.ListenProofsResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ListenSignaturesRequest", len)?;
⋮----
type Value = ListenSignaturesRequest;
⋮----
formatter.write_str("struct api.proto.v1.ListenSignaturesRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListenSignaturesRequest, V::Error>
⋮----
Ok(ListenSignaturesRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.ListenSignaturesRequest", FIELDS, GeneratedVisitor)
⋮----
if self.signature.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ListenSignaturesResponse", len)?;
⋮----
if let Some(v) = self.signature.as_ref() {
struct_ser.serialize_field("signature", v)?;
⋮----
"signature" => Ok(GeneratedField::Signature),
⋮----
type Value = ListenSignaturesResponse;
⋮----
formatter.write_str("struct api.proto.v1.ListenSignaturesResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListenSignaturesResponse, V::Error>
⋮----
if signature__.is_some() {
return Err(serde::de::Error::duplicate_field("signature"));
⋮----
signature__ = map_.next_value()?;
⋮----
Ok(ListenSignaturesResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.ListenSignaturesResponse", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ListenValidatorSetRequest", len)?;
⋮----
type Value = ListenValidatorSetRequest;
⋮----
formatter.write_str("struct api.proto.v1.ListenValidatorSetRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListenValidatorSetRequest, V::Error>
⋮----
Ok(ListenValidatorSetRequest {
⋮----
deserializer.deserialize_struct("api.proto.v1.ListenValidatorSetRequest", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ListenValidatorSetResponse", len)?;
⋮----
type Value = ListenValidatorSetResponse;
⋮----
formatter.write_str("struct api.proto.v1.ListenValidatorSetResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListenValidatorSetResponse, V::Error>
⋮----
Ok(ListenValidatorSetResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.ListenValidatorSetResponse", FIELDS, GeneratedVisitor)
⋮----
if !self.message.is_empty() {
⋮----
if self.required_epoch.is_some() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.SignMessageRequest", len)?;
⋮----
struct_ser.serialize_field("message", pbjson::private::base64::encode(&self.message).as_str())?;
⋮----
if let Some(v) = self.required_epoch.as_ref() {
⋮----
struct_ser.serialize_field("requiredEpoch", ToString::to_string(&v).as_str())?;
⋮----
"message" => Ok(GeneratedField::Message),
"requiredEpoch" | "required_epoch" => Ok(GeneratedField::RequiredEpoch),
⋮----
type Value = SignMessageRequest;
⋮----
formatter.write_str("struct api.proto.v1.SignMessageRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignMessageRequest, V::Error>
⋮----
if message__.is_some() {
return Err(serde::de::Error::duplicate_field("message"));
⋮----
if required_epoch__.is_some() {
return Err(serde::de::Error::duplicate_field("requiredEpoch"));
⋮----
Ok(SignMessageRequest {
⋮----
message: message__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.SignMessageRequest", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.SignMessageResponse", len)?;
⋮----
type Value = SignMessageResponse;
⋮----
formatter.write_str("struct api.proto.v1.SignMessageResponse")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignMessageResponse, V::Error>
⋮----
Ok(SignMessageResponse {
⋮----
deserializer.deserialize_struct("api.proto.v1.SignMessageResponse", FIELDS, GeneratedVisitor)
⋮----
if !self.signature.is_empty() {
⋮----
if !self.public_key.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.Signature", len)?;
⋮----
struct_ser.serialize_field("signature", pbjson::private::base64::encode(&self.signature).as_str())?;
⋮----
struct_ser.serialize_field("publicKey", pbjson::private::base64::encode(&self.public_key).as_str())?;
⋮----
"publicKey" | "public_key" => Ok(GeneratedField::PublicKey),
⋮----
type Value = Signature;
⋮----
formatter.write_str("struct api.proto.v1.Signature")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<Signature, V::Error>
⋮----
if public_key__.is_some() {
return Err(serde::de::Error::duplicate_field("publicKey"));
⋮----
Ok(Signature {
signature: signature__.unwrap_or_default(),
⋮----
public_key: public_key__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.Signature", FIELDS, GeneratedVisitor)
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.SignatureRequest", len)?;
⋮----
struct_ser.serialize_field("requiredEpoch", ToString::to_string(&self.required_epoch).as_str())?;
⋮----
type Value = SignatureRequest;
⋮----
formatter.write_str("struct api.proto.v1.SignatureRequest")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<SignatureRequest, V::Error>
⋮----
Ok(SignatureRequest {
⋮----
required_epoch: required_epoch__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.SignatureRequest", FIELDS, GeneratedVisitor)
⋮----
type Value = SigningStatus;
⋮----
"SIGNING_STATUS_UNSPECIFIED" => Ok(SigningStatus::Unspecified),
"SIGNING_STATUS_PENDING" => Ok(SigningStatus::Pending),
"SIGNING_STATUS_COMPLETED" => Ok(SigningStatus::Completed),
"SIGNING_STATUS_FAILED" => Ok(SigningStatus::Failed),
"SIGNING_STATUS_TIMEOUT" => Ok(SigningStatus::Timeout),
⋮----
if !self.operator.is_empty() {
⋮----
if !self.voting_power.is_empty() {
⋮----
if !self.keys.is_empty() {
⋮----
if !self.vaults.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.Validator", len)?;
⋮----
struct_ser.serialize_field("operator", &self.operator)?;
⋮----
struct_ser.serialize_field("votingPower", &self.voting_power)?;
⋮----
struct_ser.serialize_field("keys", &self.keys)?;
⋮----
struct_ser.serialize_field("vaults", &self.vaults)?;
⋮----
"operator" => Ok(GeneratedField::Operator),
"votingPower" | "voting_power" => Ok(GeneratedField::VotingPower),
⋮----
"keys" => Ok(GeneratedField::Keys),
"vaults" => Ok(GeneratedField::Vaults),
⋮----
type Value = Validator;
⋮----
formatter.write_str("struct api.proto.v1.Validator")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<Validator, V::Error>
⋮----
if operator__.is_some() {
return Err(serde::de::Error::duplicate_field("operator"));
⋮----
operator__ = Some(map_.next_value()?);
⋮----
if voting_power__.is_some() {
return Err(serde::de::Error::duplicate_field("votingPower"));
⋮----
voting_power__ = Some(map_.next_value()?);
⋮----
if keys__.is_some() {
return Err(serde::de::Error::duplicate_field("keys"));
⋮----
keys__ = Some(map_.next_value()?);
⋮----
if vaults__.is_some() {
return Err(serde::de::Error::duplicate_field("vaults"));
⋮----
vaults__ = Some(map_.next_value()?);
⋮----
Ok(Validator {
operator: operator__.unwrap_or_default(),
voting_power: voting_power__.unwrap_or_default(),
⋮----
keys: keys__.unwrap_or_default(),
vaults: vaults__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.Validator", FIELDS, GeneratedVisitor)
⋮----
if !self.validators.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ValidatorSet", len)?;
⋮----
.map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.status)))?;
struct_ser.serialize_field("status", &v)?;
⋮----
struct_ser.serialize_field("validators", &self.validators)?;
⋮----
"status" => Ok(GeneratedField::Status),
"validators" => Ok(GeneratedField::Validators),
⋮----
type Value = ValidatorSet;
⋮----
formatter.write_str("struct api.proto.v1.ValidatorSet")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ValidatorSet, V::Error>
⋮----
if status__.is_some() {
return Err(serde::de::Error::duplicate_field("status"));
⋮----
status__ = Some(map_.next_value::<ValidatorSetStatus>()? as i32);
⋮----
if validators__.is_some() {
return Err(serde::de::Error::duplicate_field("validators"));
⋮----
validators__ = Some(map_.next_value()?);
⋮----
Ok(ValidatorSet {
⋮----
status: status__.unwrap_or_default(),
validators: validators__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.ValidatorSet", FIELDS, GeneratedVisitor)
⋮----
type Value = ValidatorSetStatus;
⋮----
"VALIDATOR_SET_STATUS_UNSPECIFIED" => Ok(ValidatorSetStatus::Unspecified),
"VALIDATOR_SET_STATUS_DERIVED" => Ok(ValidatorSetStatus::Derived),
"VALIDATOR_SET_STATUS_AGGREGATED" => Ok(ValidatorSetStatus::Aggregated),
"VALIDATOR_SET_STATUS_COMMITTED" => Ok(ValidatorSetStatus::Committed),
⋮----
if !self.vault.is_empty() {
⋮----
let mut struct_ser = serializer.serialize_struct("api.proto.v1.ValidatorVault", len)?;
⋮----
struct_ser.serialize_field("chainId", ToString::to_string(&self.chain_id).as_str())?;
⋮----
struct_ser.serialize_field("vault", &self.vault)?;
⋮----
"chainId" | "chain_id" => Ok(GeneratedField::ChainId),
"vault" => Ok(GeneratedField::Vault),
⋮----
type Value = ValidatorVault;
⋮----
formatter.write_str("struct api.proto.v1.ValidatorVault")
⋮----
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ValidatorVault, V::Error>
⋮----
if chain_id__.is_some() {
return Err(serde::de::Error::duplicate_field("chainId"));
⋮----
if vault__.is_some() {
return Err(serde::de::Error::duplicate_field("vault"));
⋮----
vault__ = Some(map_.next_value()?);
⋮----
Ok(ValidatorVault {
chain_id: chain_id__.unwrap_or_default(),
vault: vault__.unwrap_or_default(),
⋮----
deserializer.deserialize_struct("api.proto.v1.ValidatorVault", FIELDS, GeneratedVisitor)
```

## File: src/generated/api.proto.v1.tonic.rs

```rust
// @generated
/// Generated client implementations.
pub mod symbiotic_api_service_client {
⋮----
pub mod symbiotic_api_service_client {
⋮----
use tonic::codegen::http::Uri;
⋮----
pub struct SymbioticApiServiceClient<T> {
⋮----
/// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
⋮----
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
⋮----
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
⋮----
pub fn new(inner: T) -> Self {
⋮----
pub fn with_origin(inner: T, origin: Uri) -> Self {
⋮----
pub fn with_interceptor<F>(
⋮----
/// Compress requests with the given encoding.
        ///
⋮----
///
        /// This requires the server to support it otherwise it might respond with an
⋮----
/// This requires the server to support it otherwise it might respond with an
        /// error.
⋮----
/// error.
        #[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
⋮----
/// Enable decompressing responses.
        #[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
⋮----
/// Limits the maximum size of a decoded message.
        ///
⋮----
///
        /// Default: `4MB`
⋮----
/// Default: `4MB`
        #[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
⋮----
/// Limits the maximum size of an encoded message.
        ///
⋮----
///
        /// Default: `usize::MAX`
⋮----
/// Default: `usize::MAX`
        #[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
⋮----
pub async fn sign_message(
⋮----
.ready()
⋮----
.map_err(|e| {
⋮----
format!("Service was not ready: {}", e.into()),
⋮----
let mut req = request.into_request();
req.extensions_mut()
.insert(
⋮----
self.inner.unary(req, path, codec).await
⋮----
pub async fn get_aggregation_proof(
⋮----
pub async fn get_aggregation_proofs_by_epoch(
⋮----
pub async fn get_current_epoch(
⋮----
pub async fn get_signatures(
⋮----
pub async fn get_signatures_by_epoch(
⋮----
pub async fn get_signature_request_i_ds_by_epoch(
⋮----
pub async fn get_signature_requests_by_epoch(
⋮----
pub async fn get_signature_request(
⋮----
pub async fn get_aggregation_status(
⋮----
pub async fn get_validator_set(
⋮----
pub async fn get_validator_by_address(
⋮----
pub async fn get_validator_by_key(
⋮----
pub async fn get_local_validator(
⋮----
pub async fn get_validator_set_header(
⋮----
pub async fn get_last_committed(
⋮----
pub async fn get_last_all_committed(
⋮----
pub async fn get_validator_set_metadata(
⋮----
pub async fn get_custom_schedule_node_status(
⋮----
pub async fn listen_signatures(
⋮----
self.inner.server_streaming(req, path, codec).await
⋮----
pub async fn listen_proofs(
⋮----
pub async fn listen_validator_set(
```

## File: src/generated/mod.rs

```rust
//! Generated gRPC client code from protocol buffer definitions.
//!
⋮----
//!
//! This module contains the auto-generated Rust code from the protocol buffer
⋮----
//! This module contains the auto-generated Rust code from the protocol buffer
//! definitions for the Symbiotic Relay API.
⋮----
//! definitions for the Symbiotic Relay API.
pub mod api {
pub mod proto {
pub mod v1 {
// Include the generated prost types and client code
include!("api.proto.v1.rs");
```

## File: src/lib.rs

````rust
//! Rust gRPC client library for Symbiotic Relay
//!
⋮----
//!
//! This library provides a client interface to communicate with Symbiotic Relay servers
⋮----
//! This library provides a client interface to communicate with Symbiotic Relay servers
//! using gRPC. It includes auto-generated client code from protocol buffer definitions.
⋮----
//! using gRPC. It includes auto-generated client code from protocol buffer definitions.
//!
⋮----
//!
//! # Usage
⋮----
//! # Usage
//!
⋮----
//!
//! ```rust,no_run
⋮----
//! ```rust,no_run
//! use symbiotic_relay_client::generated::api::proto::v1::symbiotic_api_service_client::SymbioticApiServiceClient;
⋮----
//! use symbiotic_relay_client::generated::api::proto::v1::symbiotic_api_service_client::SymbioticApiServiceClient;
//! use tonic::transport::Endpoint;
⋮----
//! use tonic::transport::Endpoint;
//!
⋮----
//!
//! #[tokio::main]
⋮----
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
⋮----
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     let endpoint = Endpoint::from_shared("http://localhost:8080")?;
⋮----
//!     let endpoint = Endpoint::from_shared("http://localhost:8080")?;
//!     let channel = endpoint.connect().await?;
⋮----
//!     let channel = endpoint.connect().await?;
//!     let client = SymbioticApiServiceClient::new(channel);
⋮----
//!     let client = SymbioticApiServiceClient::new(channel);
//!     // Use the client...
⋮----
//!     // Use the client...
//!     Ok(())
⋮----
//!     Ok(())
//! }
⋮----
//! }
//! ```
⋮----
//! ```
pub mod generated;
⋮----
// Re-export commonly used types for convenience
````

## File: buf.gen.yaml

```yaml
version: v2
inputs:
    - directory: .
managed:
    enabled: true
plugins:
    - remote: buf.build/community/neoeinstein-prost:v0.4.0
      out: src/generated
      opt:
          - compile_well_known_types
          - extern_path=.google.protobuf=::pbjson_types
          - file_descriptor_set
          - enable_type_names
          - bytes=.
    - remote: buf.build/community/neoeinstein-tonic:v0.4.1
      out: src/generated
      opt:
          - no_server
          - compile_well_known_types
          - extern_path=.google.protobuf=::pbjson_types
    - remote: buf.build/community/neoeinstein-prost-serde:v0.3.1
      out: src/generated
```

## File: buf.lock

```
# Generated by buf. DO NOT EDIT.
version: v2
deps:
  - name: buf.build/googleapis/googleapis
    commit: 72c8614f3bd0466ea67931ef2c43d608
    digest: b5:13efeea24e633fd45327390bdee941207a8727e96cf01affb84c1e4100fd8f48a42bbd508df11930cd2884629bafad685df1ac3111bc78cdaefcd38c9371c6b1
```

## File: buf.yaml

```yaml
version: v2
modules:
    - path: .
deps:
    - buf.build/googleapis/googleapis
```

## File: Cargo.toml

```toml
[package]
name = "symbiotic-relay-client"
version = "0.3.0"
edition = "2024"
authors = ["Symbiotic Team <hello@symbiotic.fi>"]
description = "Rust gRPC client for Symbiotic Relay"
license = "MIT"
repository = "https://github.com/symbioticfi/relay-client-rs"
homepage = "https://github.com/symbioticfi/relay-client-rs"
documentation = "https://docs.rs/symbiotic-relay-client"
readme = "README.md"
keywords = ["grpc", "symbiotic", "relay", "client", "blockchain"]
categories = [
  "api-bindings",
  "network-programming",
  "cryptography::cryptocurrencies",
]
exclude = ["examples/"]

[lib]
path = "src/lib.rs"

[dependencies]
tonic = { version = "0.12", features = ["transport"] }
prost = "0.13"
prost-types = "0.13"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
http = "1.3.1"
serde = { version = "1.0", features = ["derive"] }
pbjson = "0.7"
pbjson-types = "0.7"
```

## File: LICENSE

```
MIT License

Copyright (c) 2025 Symbiotic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## File: README.md

````markdown
# Symbiotic Relay Client (Rust)

Rust gRPC client for the Symbiotic Relay. Code is generated with buf using prost + tonic. Generated modules live under `crate::generated`.

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/symbioticfi/relay-client-rs)

# Installation

Add this to your `Cargo.toml`:

```toml
[dependencies]
symbiotic-relay-client = "0.3.0"
```

## Using Development/Nightly Versions

If you want to use the latest development version instead of a stable release, you can use a git dependency:

```toml
[dependencies]
symbiotic-relay-client = { git = "https://github.com/symbioticfi/relay-client-rs", rev = "9f35b8e" }
```

Replace `9f35b8e` with the specific commit hash you want to use. You can also use:

- `branch = "main"` for the latest main branch
- `tag = "v0.3.0"` for a specific release tag

# Usage

```rust
use symbiotic_relay_client::generated::api::proto::v1::symbiotic_api_service_client::SymbioticApiServiceClient;
use tonic::transport::Endpoint;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let channel = Endpoint::from_shared("http://localhost:8080")?.connect().await?;
    let mut client = SymbioticApiServiceClient::new(channel);

    // Use the client; e.g. see examples for requests and streaming usage
    Ok(())
}
```

For more usage (requests, streaming, helpers), see `examples/basic_usage.rs` in the [examples](./examples) directory.

# Development

Run scripts/update-proto.sh to fetch upstream proto and regenerate; run cargo build to compile.
````
