Box storage search API: Box by App + Box name and All boxes by App
Problem
To help off-chain consumers introspect Boxes, we want to build out a Box search API like:
- Find Box by App ID and Box name.
- Find all Boxes by App ID.
Here's info applying to all APIs with API-specific callouts in subsequent sections:
- Response codes mirror https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-id.
- Response type is
application/json. - Box value is base64 encoded.
Find Box by App ID and Box name
Suggest following Algod specification: https://github.com/algorand/go-algorand/issues/3973.
Find all Boxes by App ID
Suggest starting with Algod specification (https://github.com/algorand/go-algorand/issues/4021) and enriching with token-based pagination.
Solution
The story presumes ingestion happens in #1006.
Dependencies
Urgency
What is a box?
@winder it's described in the epic this story is assigned to! Basically: new storage paradigm for applications.
Thanks @algoanne depending on how boxes are stored this may need a new table as well. Maybe thats been omitted because there is some "clever stuff" done in the implementation to make boxes a special type of application?
@winder yes definitely (I think) will need a new table as well. I can update the title & description so that's more explicitly understood.
Closing in favor of https://github.com/algorand/go-algorand/issues/3973 because we agreed it's sufficient to start with an algod-only approach.
Rationale:
- Indexer does not support rewind capabilities for existing Application state (local + global storage). Its APIs support retrieving Application state as of query time.
- Since the initial objective is to provide parity with existing facilities, and because it's conceivable to provide as of query time APIs in algod, we're opting to start in algod. The intent is to reduce duplicative efforts between algod and indexer.
Re-opening - For parity with other offered APIs, we're opting to expose indexer APIs. Updating the description with proposed APIs.