Skip to content

Commit

Permalink
docs: add basic description
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Feb 15, 2024
1 parent e055199 commit 87b0c78
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# The database that should be used
DATABASE_URL=sqlite://./db.sqlite

# When finding a lockup transaction, how many seconds to wait before broadcasting the covenant claim (0 for instantly)
SWEEP_TIME=120

# How often to broadcast claim transaction in seconds
SWEEP_INTERVAL=30

# Possible values: mainnet, testnet, regtest
NETWORK=regtest

# Rest API configuration
API_HOST=127.0.0.1
API_PORT=1234

# Configuration of the Elements daemon to connect to
ELEMENTS_HOST=127.0.0.1
ELEMENTS_PORT=18884
ELEMENTS_COOKIE=/home/michael/Git/TypeScript/boltz-backend/docker/regtest/data/core/cookies/.elements-cookie
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# covclaim
# covclaim

This is a daemon that connects to Elements via RPC and ZMQ and watches the chain for claimable covenants of Boltz reverse swaps and broadcasts them.

## Configuration

The configuration of covclaim is in the `.env` file.

## REST API

To register a new reverse swap the daemon should watch for:

`POST /covenant`

With these values in the request body:

```JSON
{
"internalKey": "<aggregated public key of the swap>",
"preimage": "<preimage of the swap>",
"blindingKey": "<blinding key of the lockup address of the swap>",
"address": "<address to which the covenant should be claimed>",
"tree": "<the swapTree of the response when creating the swap as object>"
}
```

0 comments on commit 87b0c78

Please sign in to comment.