Specifications (Specs)

Overview

Specifications (specs) are the foundational blueprints for Netova's multichain support. Presented in JSON format, they outline the bare minimum requirements for an API to run on Netova. Through these specs, Netova determines which chains and methods are supported and enabled, and establishes the costs, requirements, and verifications for them.

Whenever the ecosystem demands a new API, a new spec is integrated. This dynamic approach incorporates modularity and extensibility directly into the protocol, ensuring that Netova remains current and adaptable.

📖 Key Concepts

Index 📑

An index is the name of the spec. Any time a spec is referenced, it will be through its index.

Imports ⬇️

Imports are references to borrowed functions from other sources. APIs/Chains of the same or similar architecture can import methods from an existing spec using its index and implement any new logic. Imports improve efficiency by eliminating the need to repeatedly integrate identical APIs.

API Collection 🛠️

A specification always contains an api_collection. The api_collection includes the list of available methods or APIs that are activated and their respective api_interfaces (e.g., "rest," "grpc," "jsonrpc," "tendermintrpc," etc.). In other words, it outlines all the APIs or methods that must be active and operational to support a specific chain/API. Each method listed here must be served by providers and be answerable to consumers.

Compute Units (CU) 🔢

Every API call has a computational overhead. To quantify this, Netova employs "compute_units" or CUs. They act as a metric, assigning a nominal "cost" to each API call. This ensures transparent resource allocation and utilization, allowing consumers to gauge the intensity of their calls, and providers, in turn, to be rewarded based on the intensity of compute.

Add-Ons ➕

Add-Ons ("add-on") introduce optional new methods and APIs beyond the basic requirements for a chain/API. They are akin to plugins or modules that specific consumers may request from time to time, and providers may choose to serve for additional rewards. This allows for supplementary functionalities to be outlined inside a spec, giving both providers and consumers flexibility in customizing their experiences.

Extensions 〰️

"Extensions" allow for the adjustment or enhancement of existing methods and APIs within a spec for special use cases. They provide the means to tweak, optimize, or expand current functions based on the needs of a subset of consumers who require more functionality from specified method calls. This allows for alternative functionalities to be outlined inside a spec, giving both providers and consumers the flexibility to serve/request special functions.

Last updated