Status

Introduction

The Filecoin V2 APIs represent a significant redesign of Filecoin’s RPC interface with several important goals in mind:

  1. User-Friendly Interface: The APIs provide intuitive ways to interact with the Filecoin network without requiring deep technical knowledge of its internals.
  2. Expressive Selection Mechanisms: Through the Selector pattern, users can clearly express what data they want using criteria that make sense for their use case.
  3. Smaller API Footprint: By using flexible selectors, we’ve reduced the number of distinct API methods needed, consolidating functionality into fewer, more powerful endpoints.
  4. F3 Awareness: The APIs are fully aware of Filecoin Fast Finality (F3) and can automatically adapt to provide the appropriate finality guarantees based on the node’s consensus protocol.
  5. Future Extensibility: The design allows for extending selection criteria without breaking existing functionality or requiring new API methods.

The Selector Pattern

At the core of the V2 APIs design is the concept of “Selectors” - flexible constructs that let you specify exactly what blockchain data you want. Rather than having different methods for different selection criteria, a single method accepts various selector types to retrieve data in different ways.

This documentation focuses on the TipSetSelector as implemented in the ChainGetTipSet method, which is just one part of the Chain API group in the larger V2 APIs initiative. Additional API groups are under development, including:

Each API group follows the same design principles of extensibility, expressiveness, and F3 awareness while minimising the API surface area.

The remainder of this documentation explores the TipSetSelector in detail, showing how to use it with the ChainGetTipSet method through various examples and use cases.

Overview