Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@api3/airnode-node
Advanced tools
> The node part of Airnode that allows for connecting multiple blockchains to the rest of the world
@api3/airnode-node
The node part of Airnode that allows for connecting multiple blockchains to the rest of the world
You can learn all the information about Airnode in the docs.
To build the image follow these instructions.
Before running Airnode, you will need to have a valid config.json
and security.json
placed in the
packages/airnode-node folder. You can find more information on these files in the API3 documentation
repository.
You must have a valid config.json
file present in the __dev__
folder. It is also recommended to use a .env
file
for handling secrets. See Development below for more details.
Airnode does not yet have an stable API for usage. However, you can run Airnode locally, for development and test environments, by running the following command:
# Run Airnode once using the AWS serverless handler
yarn run dev:invoke
You can test the endpoints specified in your config.json
by running the following command:
# --endpoint-id Endpoint ID
# --parameters Parameters as JSON
yarn run dev:http-data-invoke --endpoint-id "0xd9e8c9bcc8960df5f954c0817757d2f7f9601bd638ea2f94e890ae5481681153" --parameters '{"coinId": "bitcoin"}'
src/
├── adapters/ # Modules allowing Airnode access to the outside world
│ └── http/ # The HTTP adapter
├── api/ # Contains the handler which calls the API provider, performs request processing
├── cli/ # Contains basic CLI which to invoke the Airnode locally during development and tests
├── config/ # Global Airnode configuration
├── coordinator/ # The "main" function that oversees execution and state
│ └── calls/ # Aggregating, executing and disaggregating API calls
├── evm/ # EVM specific code
│ ├── authorization/ # Authorizing requesters and requests
│ ├── contracts/ # Contract addresses and ABIs
│ ├── fulfillments/ # Fulfilling EVM requests
│ ├── handlers/ # EVM specific "pipeline" implementations
│ ├── requests/ # Request/response specific code
│ ├── templates # Fetching and applying request templates
│ └── verification/ # Request verification
├── handlers/ # "Pipeline" type modules that generally serve as entry points
├── providers/ # Provider workers and state
├── reporting/ # Heartbeat implementation
├── requests/ # Generic modules applicable to different blockchains
├── utils/ # General utility functions
└── workers/ # Utility function that allow for "forking"
└── cloud-platforms/ # Implementations for specific cloud vendors
Before you can use or invoke Airnode locally, you must have a valid config.json
in the config
folder. You can find
the specification in the
config.json documentation.
For your convenience, example config.json
and secrets.env
files are provided in the config
folder. You can simply
copy these files and remove the .example
from the filename.
Like with a development setup, it is important to ensure that all sibling dependencies are built before running tests.
Use yarn run build
from the monorepo root to build all of these packages.
Tests can run using the following commands:
# From the monorepo root
yarn run test:node
# Watches all changes to node files and re-runs tests when one is changed
yarn run test:node:watch
# Watches all changes to a specific node file and re-runs tests when it is changed
yarn run test:node:watch -f src/evm/handlers/initialize-provider.test.ts
# From the node package
yarn run test
yarn run test:watch
yarn run test:watch -f evm/handlers/initialize-provider.test.ts
End-to-end (E2E) tests test the entire Airnode request–response protocol, from start to finish. This includes (but is not limited to): deploying Airnode RRP, creating the relevant onchain data, making onchain requests, invoking Airnode and testing relevant expected outcomes.
In order to run E2E tests, you will need to have both an Ethereum node and the "dummy" web API running. The simplest way to accomplish this is by running following commands from the repo root:
# Start an Ethereum node and mock API
yarn run dev:eth-node
yarn run dev:api
# OR
# Start both an Ethereum node and the "dummy" web API as background processes
yarn run dev:background
E2E tests are run in parallel and can be run using the following commands:
# Run all E2E tests in parallel
yarn run test:e2e
# Run a specific E2E test and include Airnode log output. Change the test in package.json
yarn run test:e2e:debug
E2E tests are defined in the test/e2e/
folder and are identified by the feature.ts
extension.
FAQs
> The node part of Airnode that allows for connecting multiple blockchains to the rest of the world
We found that @api3/airnode-node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.