Skip to content

Conversation

@danidrasovean
Copy link
Contributor

Description of the pull request (what is new / what has changed)

Did you test the changes locally ?

  • yes
  • no

Which category (categories) does this pull request belong to?

  • document new feature
  • update documentation that is not relevant anymore
  • add examples or more information about a component
  • fix grammar issues
  • other

@danidrasovean danidrasovean self-assigned this Jul 24, 2025
@andreibancioiu andreibancioiu requested a review from Copilot July 24, 2025 14:49
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 comprehensive documentation for the /address/iterate-keys REST API endpoint, which allows efficient iteration through account storage keys in batches. The documentation explains the endpoint's purpose, configuration requirements, request/response formats, and provides practical usage examples.

  • Added detailed API documentation for the iterate-keys endpoint with examples and usage notes
  • Integrated the new documentation into the sidebar navigation structure

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sidebars.js Added navigation entry for the new iterate-keys documentation
docs/sdk-and-tools/rest-api/iterate-keys.md Created comprehensive documentation covering endpoint details, request/response formats, and usage examples

danidrasovean and others added 2 commits July 24, 2025 17:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@andreibancioiu andreibancioiu left a comment

Choose a reason for hiding this comment

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

Very nicely explained!


## Overview

Retrieving all storage keys for an account can be resource-intensive if the account has many entries. The `/address/iterate-keys` endpoint allows clients to efficiently iterate through all key-value pairs in an account's data trie, fetching them in batches and resuming from a checkpoint using an iterator state. This is especially useful for large accounts or when paginating through storage.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍


Retrieving all storage keys for an account can be resource-intensive if the account has many entries. The `/address/iterate-keys` endpoint allows clients to efficiently iterate through all key-value pairs in an account's data trie, fetching them in batches and resuming from a checkpoint using an iterator state. This is especially useful for large accounts or when paginating through storage.

If you need to ensure consistency across multiple requests (e.g., if the account might change), use the `?blockNonce={blockNonce}` query parameter to lock iteration to a specific trie root.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@danidrasovean danidrasovean changed the base branch from main to development July 24, 2025 15:02
@danidrasovean danidrasovean marked this pull request as ready for review July 24, 2025 15:16
@danidrasovean danidrasovean merged commit e1d0ca2 into development Jul 25, 2025
3 checks passed
@danidrasovean danidrasovean deleted the iterate-keys branch July 25, 2025 06:13
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.

4 participants