Portal

May 13, 2026 · View on GitHub

Portal

Ship login and Lightning payments in Bitcoin apps—without accounts, KYC, or a card processor.

Documentation · PortalHub · Docker image

License: MIT Changelog


Users prove identity with keys. You charge in BTC (or priced in fiat) over Nostr. This repo is the Rust workspace behind the REST daemon, core protocol, and native building blocks.

You wantPortal gives you
Passwordless sign-inKey handshake + Nostr; auth guide
One-off and recurring paySingle and subscription flows; payments
Tickets / tokensCashu paths; tokens

Quick start

Fastest path: spin up a hosted instance on PortalHub—no server to run.

Self-host the REST daemon:

docker run -d -p 3000:3000 \
  -e PORTAL__AUTH__AUTH_TOKEN=$(openssl rand -hex 32) \
  -e PORTAL__NOSTR__PRIVATE_KEY=<your-64-char-hex-key> \
  getportal/sdk-daemon:0.4.2

Then curl http://localhost:3000/health should return OK.

Client SDKs

WhereInstall / link
TypeScript / JavaScriptnpm install portal-sdk
JavaJitPack
Anything with HTTPREST API

Workspace layout

Rust crates live under crates/. The portal crate is not a top-level workspace member but is the shared core every service binary depends on.

CrateWhat it is
portalProtocol types, Nostr conversations, message router
portal-restrest binary: Bearer auth, streaming events, webhooks
portal-appPackage app: UniFFI staticlib + runtime (wallet, relays, payment UI hooks)
portal-walletPortalWallet implementations: NWC, Breez Spark
portal-sdkAsync SDK: relay pool + high-level send/receive helpers
portal-ratesFiat/BTC rates (multi-source, BlueWallet-style logic)
portal-macrosBuild-time fetch_git_hash! and related macros
portal-cliSmall binaries for manual protocol and integration checks
portal-app-demoLocal Axum demo: multi-session HTTP API over app
portal-rest/clients/tsTypeScript client

License

MIT — see LICENSE.