Ensure the AirSwap CLI is installed.
$ yarn global add airswap
Once your Server is up and running at a public URL, you're ready to add it to the Registry. First, ensure an account is set with the
airswap account:import command. You can but are not required to use the same Ethereum account that your Server is using.
Let's take a look at the available Registry commands.
$ airswap registryAirSwap CLI 1.6.0 — https://airswap.io/add and remove supported tokensUSAGE$ airswap registry:COMMANDCOMMANDSregistry:add add supported tokens to the registryregistry:enable enable staking on the registryregistry:get get urls from the registryregistry:list list supported tokens from registryregistry:remove remove supported tokens from the registryregistry:url set server url on the registry
First run the following command to enable staking for your account.
$ airswap registry:enable
Now run the following command to set your server url on the registry.
$ airswap registry:url
Now run the following command to add tokens you support.
$ airswap registry:add
To ensure your configuration is correct, you can query tokens that you support on the registry.
$ airswap registry:getAirSwap CLI 1.6.0 — https://airswap.io/get urls from the registry RINKEBYRegistry 0xa77fbeD39D5128e1cA9795d68D73010851393BCcToken pair (e.g. WETH/USDT): DAI/WETHServer----------------------------------------https://maker.example.com/
Now that your Server is running and has been added to the Registry, your quotes will be returned among results of the
airswap order:best command and aggregators like MetaMask Swaps.
$ airswap order:bestAirSwap CLI 1.6.0 — https://airswap.io/get the best available order MAINNETfull or light: lightbuy or sell: buyamount: 0.1of: wethfor: daiQuote from https://maker.example.com/✨ Buy 0.1 WETH for 250 DAIPrice 0.0004 WETH/DAI (2500 DAI/WETH)