Skip to content

Commit d2195a0

Browse files
committed
Update mailroom README & config example
1 parent 28df26f commit d2195a0

2 files changed

Lines changed: 38 additions & 25 deletions

File tree

payjoin-mailroom/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ nix run .#payjoin-mailroom -- --config payjoin-mailroom/config.toml
3434

3535
## Telemetry
3636

37-
payjoin-mailroom supports **optional** OpenTelemetry-based telemetry (metrics, traces, and logs). Build with `--features telemetry` and add a `[telemetry]` section to your config:
37+
payjoin-mailroom supports **optional** OpenTelemetry-based telemetry (metrics).
38+
Build with `--features telemetry` and configure via the [`[telemetry]`](config.example.com) config section.
39+
When no telemetry configuration is present, it falls back to local-only console tracing.
3840

39-
```toml
40-
[telemetry]
41-
endpoint = "https://otlp-gateway-prod-us-west-0.grafana.net/otlp"
42-
auth_token = "<base64 instanceID:token>"
43-
operator_domain = "your-domain.example.com"
44-
```
41+
## Access Control
4542

46-
Or set the equivalent environment variables:
43+
Build with `--features access-control` to enable:
4744

48-
```sh
49-
export PJ_TELEMETRY__ENDPOINT="https://otlp-gateway-prod-us-west-0.grafana.net/otlp"
50-
export PJ_TELEMETRY__AUTH_TOKEN="<base64 instanceID:token>"
51-
export PJ_TELEMETRY__OPERATOR_DOMAIN="your-domain.example.com"
52-
```
45+
### IP Screening
46+
47+
Configured via the [`[access_control]`](config.example.toml) config section for IP- and region-based filtering.
48+
49+
The auto-fetched GeoLite2 database is provided by [MaxMind](https://www.maxmind.com) and distributed under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license.
50+
51+
### V1 Address Screening
5352

54-
When no `[telemetry]` section is present and no `PJ_TELEMETRY__*` variables are set, it falls back to local-only console tracing.
53+
When the V1 protocol is enabled, payjoin-mailroom can screen PSBTs for blocked Bitcoin addresses.
54+
Configure a local blocklist, a remote URL, or both via the [`[v1]`](config.example.toml) config section.

payjoin-mailroom/config.example.toml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Configuration can also be set via environment variables with the `PJ_`
44
# prefix. Nested values use double underscores as separators, e.g.
5-
# PJ_ACCESS_CONTROL__BLOCKED_REGIONS=CU,IR,KP,SY
5+
# PJ_TELEMETRY__OPERATOR_DOMAIN="your-domain.example.com"
66

77
# Address and port to listen on
88
# listener = "[::]:8080"
@@ -13,19 +13,18 @@
1313
# Request timeout in seconds
1414
# timeout = 30
1515

16-
# --- V1 protocol ---
17-
# Uncomment the [v1] section to enable V1 fallback support.
18-
# (address screening requires `access-control` feature)
19-
# [v1]
16+
# --- Telemetry (requires `--telemetry` feature) ---
17+
# [telemetry]
2018

21-
# Path to a local file containing blocked Bitcoin addresses (one per line).
22-
# blocked_addresses_path = "/path/to/blocked_addresses.txt"
19+
# OpenTelemetry Protocol (OTLP) endpoint to export telemetry to
20+
# endpoint = "https://otlp-gateway-prod-us-west-0.grafana.net/otlp"
2321

24-
# URL to periodically fetch an updated blocked-address list from.
25-
# blocked_addresses_url = "https://example.com/blocked_addresses.txt"
22+
# Authentication token for the OTLP endpoint
23+
# auth_token = "<base64 instanceID:token>"
2624

27-
# How often (in seconds) to refresh the remote address list (default: 86400).
28-
# blocked_addresses_refresh_secs = 86400
25+
# The domain you are running the payjoin-mailroom from.
26+
# This serves as an identifier for metrics collection.
27+
# operator_domain = "your-domain.example.com"
2928

3029
# --- Access-control (requires `access-control` feature) ---
3130
# [access_control]
@@ -40,3 +39,17 @@
4039

4140
# IP addresses or CIDR ranges whose requests should be blocked.
4241
# blocked_ips = ["192.0.2.0/24", "2001:db8::1"]
42+
43+
# --- V1 protocol ---
44+
# Uncomment the [v1] section to enable V1 fallback support.
45+
# (address screening requires `access-control` feature)
46+
# [v1]
47+
48+
# Path to a local file containing blocked Bitcoin addresses (one per line).
49+
# blocked_addresses_path = "/path/to/blocked_addresses.txt"
50+
51+
# URL to periodically fetch an updated blocked-address list from.
52+
# blocked_addresses_url = "https://example.com/blocked_addresses.txt"
53+
54+
# How often (in seconds) to refresh the remote address list (default: 86400).
55+
# blocked_addresses_refresh_secs = 86400

0 commit comments

Comments
 (0)