Getting started

Pre-requisite

  • Docker: Official website

    Docker is a container management system. It supports Windows, mac and most linux distributions. Select the one that applies to your case and follow the instructions.

  • Docker-compose: Official website

    Docker compose allows advanced container management. It is required to build the daemon properly.

  • A Liquidity registered wallet: Official website

    This wallet will be managed by your daemon. Click on Add New Wallet, select the wallet you want register and click on Save. Then, open your newly created wallet, click on register and perform Metamask related actions.

Installation

In order to get the daemon up and running on your machine, you must follow the instructions listed below.

1. Clone Liquidity SDK repository 🐑

git clone git@github.com/liquidity-network/liquidity-daemon

Alternatively, you can download it from here

2. Configure your wallet instance 🌱

A template of the configuration is provided within config.template.json. You have to copy it into config.json and edit the configuration.

cp config.template.json config.json

Your configuration file should look like the following

Mainnet

{
  "ETHEREUM_WALLET_PRIVATE_KEY": "0x...",
  "ETHEREUM_NODE_URL": "https://mainnet.infura.io",
  "ETHEREUM_NETWORK_ID": "1",
  "HUB_CONTRACT_ADDRESS": "0x46a1657f132030476496112126Be35384bdDDDAD",
  "HUB_PROVIDER_URL": "https://public.liquidity.network"
}

Rinkeby Testnet

{
  "ETHEREUM_WALLET_PRIVATE_KEY": "0x...",
  "ETHEREUM_NODE_URL": "https://rinkeby.infura.io",
  "ETHEREUM_NETWORK_ID": "4",
  "HUB_CONTRACT_ADDRESS": "0x140D29486BABCbD57C63edCCCbf2EC92ffBfEc7c",
  "HUB_PROVIDER_URL": "https://rinkeby.liquidity.network"
}

3. Start your wallet 👩‍🔧

docker-compose up -d

This command will start your wallet daemon (docker-compose.yml file located at the project’s root directory). It can take some time for it to synchronise with the hub, especially at first launch.

4. Celebrate 🎉

You’re done with the installation! The SDK is self-hosted on your machine and is accessible under localhost:3600.

You can try accessing https://localhost:3600/wallet where you should see the current state of your wallet.

Documentation

The documentation you are about to read is structured in categories. Each category has a list of endpoints made accessible by the wallet daemon. These endpoints are documented with what they provide, how to call them, what are their result and an example is provided.

If you spot any issues, please post an issue on our github repository