Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
79712f5
adding phoenixd api
SeverinAlexB Dec 11, 2025
f6d5f13
made test independent
SeverinAlexB Dec 11, 2025
42c45c4
added repo
SeverinAlexB Dec 16, 2025
ca8e9ea
merged sms_verification
SeverinAlexB Dec 16, 2025
077dba9
working await
SeverinAlexB Dec 18, 2025
5e4a780
added get ln verification
SeverinAlexB Dec 18, 2025
aa32aef
fmt + clippy
SeverinAlexB Dec 18, 2025
037f811
updated .env.example
SeverinAlexB Dec 18, 2025
efc129c
cleaned up tests
SeverinAlexB Dec 18, 2025
4b2e56c
fixed clippy
SeverinAlexB Dec 18, 2025
0047a60
another clippy fix
SeverinAlexB Dec 18, 2025
a05a93d
fixed tests
SeverinAlexB Dec 18, 2025
66bf109
improved error structure
SeverinAlexB Dec 18, 2025
7f5836b
remove unwrap
SeverinAlexB Dec 18, 2025
a42259c
upgraded getrandom dependency
SeverinAlexB Dec 18, 2025
0380763
renamed response structs
SeverinAlexB Dec 18, 2025
24b6a5c
Merge branch 'master' into ln_payment
SeverinAlexB Dec 18, 2025
e362e8c
renamed variables, removed index
SeverinAlexB Dec 19, 2025
d32a5b4
removed ln context
SeverinAlexB Dec 19, 2025
0b7bb50
extracted app_state
SeverinAlexB Dec 19, 2025
e342a14
fixed minor issues in the background syncer
SeverinAlexB Dec 19, 2025
0db05f4
clippy + fmt
SeverinAlexB Dec 19, 2025
359c687
improved openapi.yaml
SeverinAlexB Dec 19, 2025
787c30b
removed unnecessary slq default and changed payment_hash to id in http
SeverinAlexB Dec 22, 2025
d0dc854
AI refactor
SeverinAlexB Dec 22, 2025
ce4827f
changed sms_verification module from snake_case to camelCase
SeverinAlexB Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ HG_HOMESERVER_PUBKY=ufibwbmed6jeq9k4p583go95wofakh9fwpp4k734trq79pd9u1uy
# SMS verification limits (optional, defaults to 2 per week, 4 per year)
# HG_MAX_SMS_VERIFICATIONS_PER_WEEK=2
# HG_MAX_SMS_VERIFICATIONS_PER_YEAR=4

# Lightning Verification Settings
# HG_LIGHTNING_INVOICE_PRICE_SAT=1000
# HG_LIGHTNING_INVOICE_EXPIRY_SECONDS=600
# HG_LIGHTNING_INVOICE_DESCRIPTION="Pubky Homegate Verification"

# PhoenixD credentials
# For development purpose, run phoenixd with docker: `docker run -p 9740:9740 -d acinq/phoenixd:latest`
# Admin endpoint: http://localhost:9740
# Password is autogenerated in ~/.phoenix/phoenix.conf in the http-password variable.
HG_PHOENIXD_API_URL=http://localhost:9740
HG_PHOENIXD_API_PASSWORD=
99 changes: 98 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ edition = "2024"
anyhow = "1.0.100"
argon2 = "0.5"
async-trait = "0.1.89"
axum = { version = "0.8.1", features = ["macros"] }
axum = { version = "0.8.1", features = ["macros", "ws"] }
axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] }
base64 = "0.22"
blake3 = "1.5"
chrono = "0.4"
dotenvy = "0.15.7"
envy = "0.4.2"
futures-util = "0.3.31"
getrandom = "0.2"
getrandom = "0.3.4"
hex = "0.4"
regex = "1.11"
reqwest = { version = "0.12", features = ["json"] }
reqwest-websocket = "0.5.1"
sea-query = { version = "0.32.6", features = [ "with-chrono", "postgres-array" ]}
sea-query-binder = { version = "0.7.0", features = [ "with-chrono", "runtime-tokio", "sqlx-postgres", "postgres-array" ] }
serde = { version = "1.0.228", features = ["derive"] }
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

A backend service to gatekeep [Pubky Homeserver](https://github.com/pubky/pubky-core/) signups.

# Run
This service depends on

- [Prelude](https://docs.prelude.so/) as a SMS service provider.
- [PhoenixD](https://github.com/ACINQ/phoenixd) As a Lightning Payment provider.

# Usage

See `.env.example` for a description of which values you need to put in a `.env` file.

Expand All @@ -22,6 +27,10 @@ We use [Prelude](https://docs.prelude.so/) for SMS verification. Keep in mind th
- Has a maximum of 10 verifications.
- Has a single pending verification at a time. Multiple `send_code` calls reuse the existing session.

## Lightning Payment Verification

We use [phoenixd](https://github.com/ACINQ/phoenixd) for Lightning Payment verifications.

## Running Tests

Tests require a PostgreSQL connection string for database integration tests:
Expand Down
Loading
Loading