This documentation is DEPRECATED.

Some descriptions might be invalid.

A relayer is a RESTful JSON API server written in node.js and express.js that allows interacting with a wallet contract using meta-transactions. The relayer gets a signed message and propagates it to the network. It pays for transactions and gets the refund from contracts.

Below are the instructions on how to run the relayer.

If you would like to use your own domain, jump to the section ENS registration.

Starting a relayer



To run a relayer in a development mode and to run tests you need to have Postgres installed and running. You also need to have universal_login_relayer_development database created.

You can do it in your favorite database UI, or using psql:

psql -c "create database universal_login_relayer_development;"

Factory contract

To run a relayer you also need to deploy your own factory contract, with the same wallet that the relayer will have. To do that you will need a wallet master contract address (you can deploy your own or use ours). To deploy the factory contract run:

universal-login deploy:factory [walletMasterAddress] --privateKey 'YOUR_PRIVATE_KEY' --nodeUrl 'JSON-RPC URL'
universal-login deploy:factory 0xfb152D3b3bB7330aA52b2504BF5ed1f376B1C189 --privateKey 'YOUR_PRIVATE_KEY' --nodeUrl

From command line

To start a relayer from the command line, clone UniversalLoginSDK github repository and follow steps:

1. Setup environment

Create .env file in /universal-login-relayer directory and fill up .env file with parameters:

  • JSON_RPC_URL : string - JSON-RPC URL of an Ethereum node
  • PORT : number - a relayer endpoint
  • PRIVATE_KEY : string - a private key of a relayer wallet
  • ENS_ADDRESS : string - an address of an ENS contract
  • ENS_DOMAINS : string - a list of names of a domain
  • WALLET_MASTER_ADDRESS : string - WalletMaster contract address
  • FACTORY_ADDRESS : string - Factory contract address

example .env file


2. Run relayer

Run the following command from universal-login-relayer directory

yarn relayer:start