Files
khatru/whitelisted
alex 642710fda8 start: propagate init errors
package users can now act accordingly on startup errors, for example
by exiting with a non-zero code. this is useful when running a service,
notifying a supervising process about such failures.

although this is technically a breaking change, most pkg users should be
unaffected since Start and StartConf returned nothing before this commit.
2022-12-24 18:52:06 -03:00
..
2022-12-24 18:52:06 -03:00

whitelisted relay

  • a basic relay implementation based on relayer.
  • uses postgres, which I think must be over version 12 since it uses generated columns.
  • only accepts events from specific pubkeys defined via the environment variable WHITELIST (comma-separated).

running

grab a binary from the releases page and run it with the environment variable POSTGRESQL_DATABASE set to some postgres url:

POSTGRESQL_DATABASE=postgres://name:pass@localhost:5432/dbname ./relayer-whitelisted

it also accepts a HOST and a PORT environment variables.

compiling

if you know Go you already know this:

go install github.com/fiatjaf/relayer/whitelisted

or something like that.