mirror of
https://github.com/filecoin-project/lotus.git
synced 2025-05-19 16:21:24 +08:00

Introduce the first API for Lotus v2, focusing on `ChainGetTipSet` within the `Chain` group. Define `TipSetSelector` for advanced tipset retrieval options, and create a compact JSON-RPC call format. Gracefully accommodate both EC and F3 finalized tipsets based on node configuration, where: * EC finalized tipset is returned when F3 is turned off, has no finalized tipset or F3 isn't ready. * F3 finalized is returned otherwise. Support three categories of selectors under `TipSetSelector`: * By tag: either "latest" or "finalized." * By height: epoch, plus optional fallback to previous non-null tipset. * By tipset key. The selection falls back to tag "latest" if the user specifies no selection criterion. The JSON-RPC format is designed to use JSON Object as the parameters passed to the RPC call to remain compact, and extensible.
6 lines
202 B
Go
6 lines
202 B
Go
// Package v2api provides an interface for interacting with the v2 full node APIs
|
|
// within the Filecoin network.
|
|
//
|
|
// This package is experimental and the API may change without notice.
|
|
package v2api
|