# General Structure
The first protocol implemented for Airnode is request–response. An Airnode serving the request–response protocol listens for requests, makes the API call specified by the request, and fulfills the request as soon as possible.
The request–response protocol is implemented as a single permissionless contract that all Airnodes interact with, which is named Airnode.sol
.
This contract has the following inheritance tree that compartmentalizes the aspects of the protocol:
Airnode.sol
├── TemplateStore.sol
└── EndpointStore.sol
└── ProviderStore.sol
└── RequesterStore.sol
2
3
4
5
# Airnode.sol
Airnode.sol (opens new window)
- Used by clients to make requests.
- Used by Airnodes to fulfill requests.
# TemplateStore.sol
TemplateStore.sol (opens new window)
- Used by requesters to store request templates.
- Used by Airnodes to retrieve request templates.
# EndpointStore.sol
EndpointStore.sol (opens new window)
- Used by providers to set endpoint authorizers.
- Used by Airnodes to retrieve endpoint authorizers to check authorization status.
# ProviderStore.sol
ProviderStore.sol (opens new window)
- Used by Airnodes to create provider records.
- Used by requesters to retrieve the extended public keys of providers to derive their designated wallet addresses.
- Used by requesters to request withdrawals from their designated wallets.
- Used by Airnodes to fulfill withdrawal requests.
# RequesterStore.sol
RequesterStore.sol (opens new window)
- Used by requesters to create requester records.
- Used by requesters to endorse clients, which allows clients to make requests that will be fulfilled by the requesters' designated wallets.
# Convenience.sol
Convenience.sol (opens new window)
This contract is used by Airnodes to make batch-calls to Airnode.sol
.
For example, instead of making a separate static call to retrieve each template, an Airnode can use Convenience.sol
to retrieve multiple templates with a single static call.
In addition, Airnodes use the this contract to check if a request is authorized according to endpoint authorizers.
# Concepts
Click the links to go to the page of the specific concept. You are recommended to read these in the given order.
A provider operates an Airnode to serve one or more APIs to smart contracts.
Each of the API operations that the provider's Airnode serves is accessible over an endpoint. The provider sets authorizers for these endpoints, which are contracts that implement authorization policies.
A requester owns contracts that make requests to providers. Each of these contracts is called a client.
Each provider keeps a designated wallet for each requester. The requester endorses their clients for them to be allowed to make requests that will be fulfilled by the requester's designated wallet.
A requester can create a request template, which is an on-chain record that they can refer to while making requests.
# @api3/airnode-admin
@api3/airnode-admin
(opens new window) is a package and a CLI tool used by providers, requesters and third parties to interact with Airnode.sol
and perform the administrative actions mentioned above.