Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@api3/airnode-admin

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@api3/airnode-admin - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

CHANGELOG.md

42

package.json
{
"name": "@api3/airnode-admin",
"license": "MIT",
"version": "0.1.5",
"bin": "./cli-wrapper.js",
"main": "dist/index",
"version": "0.2.0",
"private": false,
"bin": {
"airnode-admin": "./dist/bin/admin.js"
},
"main": "./dist/src/index",
"files": [
"dist"
],
"scripts": {
"build": "yarn run clean && yarn run compile",
"clean": "rimraf -rf ./dist",
"compile": "tsc -p tsconfig.build.json"
"clean": "rimraf -rf ./dist *.tgz",
"cli": "ts-node bin/admin.ts",
"compile": "tsc -p tsconfig.build.json",
"pack": "yarn pack",
"test:e2e": "jest --selectProjects e2e",
"test:e2e:watch": "jest --coverage --watch --selectProjects e2e",
"test": "SILENCE_LOGGER=true jest --coverage --selectProjects unit",
"test:watch": "SILENCE_LOGGER=true jest --coverage --watch --selectProjects unit",
"test:watch:debug": "jest \"implementation.test\" --selectProjects unit --watch"
},
"dependencies": {
"@api3/airnode-protocol": "^0.1.0",
"@api3/airnode-abi": "^0.1.0",
"ethers": "^5.0.24",
"yargs": "^16.2.0"
"@api3/airnode-abi": "^0.2.0",
"@api3/airnode-protocol": "^0.2.0",
"ethers": "^5.4.5",
"lodash": "^4.17.21",
"yargs": "^17.0.1"
},
"devDependencies": {
"@types/lodash": "^4.14.169",
"@types/node": "^15.12.2",
"@types/yargs": "^17.0.2",
"jest": "^26.6.3",
"rimraf": "^3.0.2",
"ts-jest": "^26.5.6",
"ts-node": "^10.1.0",
"typescript": "^4.2.4"
}
}

@@ -1,2 +0,3 @@

# Monorepo version: `@airnode/admin`
# Monorepo version: `@api3/airnode-admin`
# Stand-alone version: `@api3/airnode-admin`

@@ -6,171 +7,13 @@

All commands require you to either provide a `providerUrl` (e.g., `https://ropsten.infura.io/v3/<KEY>`) or a `chain` (e.g., `ropsten`).
**Using `chain` will use the default ethers.js provider, which may rate-limit you.**
Furthermore, it may not support the chain you want to use (xDai, Fantom, etc.)
## User documentation
Commands that require `mnemonic` will make an on-chain transaction.
Make sure that the wallet that is associated with the mnemonic is funded on the target chain.
The application will not exit until the transaction is confirmed.
You can find documentation on how to use the admin CLI package in the
[admin CLI docs](https://docs.api3.org/airnode/v0.2/reference/packages/admin-cli-commands.html).
To see all commands:
```sh
npx @api3/airnode-admin --help
```
To see the parameters of a command:
```sh
npx @api3/airnode-admin $COMMAND --help
```
## For developers
## Requester commands
This package has multiple features:
### `create-requester`
Creates a [requester](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/requester.md) and returns a requester index.
Note down your requester index because you will be using it in future interactions.
```sh
npx @api3/airnode-admin create-requester \
--chain ropsten \
--mnemonic "nature about salad..." \
--requesterAdmin 0x5c17cb...
```
### `update-requester-admin`
Updates the [requester admin](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/requester.md#requesteradmin).
The `mnemonic` you provide here has to belong to the previous requester admin.
```sh
npx @api3/airnode-admin update-requester-admin \
--chain ropsten \
--mnemonic "nature about salad..." \
--requesterIndex 6 \
--requesterAdmin 0xe97301...
```
### `derive-designated-wallet`
Derives the address of the [wallet designated by a provider for a requester](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/designated-wallet.md).
```sh
npx @api3/airnode-admin derive-designated-wallet \
--chain ropsten \
--providerId 0xe1e0dd... \
--requesterIndex 6
```
### `endorse-client`
[Endorses](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/endorsement.md) a client contract so that its requests can be fulfilled by the requester's designated wallet.
The `mnemonic` you provide here has to belong to the requester admin.
```sh
npx @api3/airnode-admin endorse-client \
--chain ropsten \
--mnemonic "nature about salad..." \
--requesterIndex 6 \
--clientAddress 0x2c2e12...
```
### `unendorse-client`
Unendorses a client contract so that its requests can no longer be fulfilled by the requester's designated wallet.
The `mnemonic` you provide here has to belong to the requester admin.
```sh
npx @api3/airnode-admin unendorse-client \
--chain ropsten \
--mnemonic "nature about salad..." \
--requesterIndex 6 \
--clientAddress 0x2c2e12...
```
### `create-template`
Reads a file, uses its contents to create a [template](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/template.md) and returns the template ID.
See the `/example` directory for an example template file.
```sh
npx @api3/airnode-admin create-template \
--chain ropsten \
--mnemonic "nature about salad..." \
--templateFilePath ./template.json
```
### `request-withdrawal`
Requests a [withdrawal](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/designated-wallet.md#withdrawals) from the wallet designated by a provider for a requester, and returns the request ID.
The `mnemonic` you provide here has to belong to the requester admin.
```sh
npx @api3/airnode-admin request-withdrawal \
--chain ropsten \
--mnemonic "nature about salad..." \
--providerId 0xe1e0dd... \
--requesterIndex 6 \
--destination 0x98aaba...
```
### `check-withdrawal-request`
Checks the status of the withdrawal request with the given ID.
```sh
npx @api3/airnode-admin check-withdrawal-request \
--chain ropsten \
--withdrawalRequestId 0x011d1b...
```
## Provider commands
### `create-provider`
Creates a [provider](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/provider.md) and returns a provider ID.
**You probably should not be using this.**
Airnode will create your provider during [deployment](https://github.com/api3dao/api3-docs/blob/master/provider-guides/deploying-airnode.md).
```sh
npx @api3/airnode-admin create-provider \
--chain ropsten \
--mnemonic "nature about salad..." \
--providerAdmin 0xc2193d...
```
### `update-provider-admin`
Updates the [provider admin](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/provider.md#provideradmin).
The `mnemonic` you provide here has to belong to the previous provider admin.
```sh
npx @api3/airnode-admin update-provider-admin \
--chain ropsten \
--mnemonic "nature about salad..." \
--providerId 0xe1e0dd... \
--providerAdmin 0x60558a...
```
### `derive-endpoint-id`
Derives the endpoint ID using the OIS title and the endpoint name using the convention described [here](https://github.com/api3dao/api3-docs/blob/master/provider-guides/configuring-airnode.md#triggers).
```sh
npx @api3/airnode-admin derive-endpoint-id \
--oisTitle "My OIS title..." \
--endpointName "My endpoint name..."
```
### `update-authorizers`
Updates the [authorizers](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/authorizer.md) of an [endpoint](https://github.com/api3dao/api3-docs/blob/master/request-response-protocol/endpoint.md) belonging to a provider.
The `mnemonic` you provide here has to belong to the provider admin.
See the `/example` directory for an example authorizers file.
```sh
npx @api3/airnode-admin update-authorizers \
--chain ropsten \
--mnemonic "nature about salad..." \
--providerId 0xe1e0dd... \
--endpointId 0x260558... \
--authorizersFilePath ./authorizers.json
```
- Exports a collection of functions for interacting with the Airnode contracts on chain
- Exports a class based SDK, which is simpler to use
- A CLI tool which is most commonly used by end users
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc