Skip to content

Conversation

@aorumbayev
Copy link
Collaborator

Adds minor tweaks to api generator along with initial support for indexer client.

This comment was marked as outdated.

@aorumbayev aorumbayev force-pushed the feat/indexer-client branch from b1dd4b8 to 65c9974 Compare August 11, 2025 23:48
Updates the OAS parser to represent top-level array schemas as type aliases (e.g., Vec) instead of structs.

This simplifies the generated Rust code and avoids creating unnecessary empty structs for array types. Also it renames and refactors the 'StateDelta' and 'TealKeyValueStore' to be type aliases rather than structs.
Adds the Indexer client to algokit-utils, enabling interaction with the Algorand Indexer service.

This includes:
- Integration of the `indexer_client` crate.
- Updates to `AlgorandClient` to support Indexer configuration.
- Addition of methods in `ClientManager` to manage Indexer client instances.
- Adds pre-commit hooks for formatting, linting, and testing the API OAS generator code.
- Adds integration tests for the Indexer client.
…ns; refine ci

Introduces a composite action to set up Rust, Bun, and Python dependencies.

Implements CI workflows for linting, testing, generating, and verifying the API client code. This includes output stability checks and compilation tests.

Adds a scheduled workflow to convert OpenAPI specifications and identify any necessary updates.

Fixes typos in the OpenAPI specification and generated code.
This change introduces a set of helper functions to facilitate testing involving the Algorand Indexer.

It provides functionality to wait for the indexer to catch up with transactions or applications, with configurable retry logic and error handling.
This ensures tests can reliably verify the state of the indexer after submitting transactions.

This commit also removes the previous implementation of indexer waiting logic, and replaces it with the new helpers.
@aorumbayev aorumbayev force-pushed the feat/indexer-client branch from 65c9974 to 2616b0c Compare August 12, 2025 09:02
@aorumbayev aorumbayev requested a review from Copilot August 12, 2025 09:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds initial support for the indexer client along with minor tweaks to the API generator tooling. The main purpose is to introduce a new HTTP client library for interacting with Algorand's indexer API alongside the existing algod client.

  • Adds new indexer API client with complete endpoint coverage and type-safe request/response handling
  • Expands API generation tooling to support both algod and indexer client generation
  • Updates documentation to include the new indexer client alongside the existing algod client

Reviewed Changes

Copilot reviewed 159 out of 161 changed files in this pull request and generated 3 comments.

File Description
tools/api_tools/src/main.rs Adds new CLI commands for indexer client generation, formatting, and OpenAPI conversion
docs/book/api_index.md Documents the new algod_client and indexer_client HTTP libraries
crates/indexer_client/ Contains the complete generated indexer client with models, APIs, and type definitions

Adds functionality to parse string enums from the OAS specification
and generate corresponding Rust enums. This includes adding a new
`enum_values` field to the `Schema` dataclass and a macro for
generating Rust enums from string values.

The changes also refactor the `OASParser` class to improve readability
and maintainability by extracting several methods for handling
vendor extensions, array schemas, and properties. This makes the code
easier to understand and modify in the future.
@aorumbayev aorumbayev merged commit fc5d5c2 into main Aug 12, 2025
19 checks passed
@aorumbayev aorumbayev deleted the feat/indexer-client branch August 12, 2025 23:25
@engineering-ci
Copy link
Contributor

🎉 This PR is included in version 1.0.0-alpha.52 🎉

The release is available on:

Your semantic-release bot 📦🚀

@engineering-ci
Copy link
Contributor

🎉 This PR is included in version 1.0.0-alpha.44 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants