Skip to content

PortalTechnologiesInc/lib

Repository files navigation

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 want Portal gives you
Passwordless sign-in Key handshake + Nostr; auth guide
One-off and recurring pay Single and subscription flows; payments
Tickets / tokens Cashu 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

Where Install / link
TypeScript / JavaScript npm install portal-sdk
Java JitPack
Anything with HTTP REST 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.

Crate What it is
portal Protocol types, Nostr conversations, message router
portal-rest rest binary: Bearer auth, streaming events, webhooks
portal-app Package app: UniFFI staticlib + runtime (wallet, relays, payment UI hooks)
portal-wallet PortalWallet implementations: NWC, Breez Spark
portal-sdk Async SDK: relay pool + high-level send/receive helpers
portal-rates Fiat/BTC rates (multi-source, BlueWallet-style logic)
portal-macros Build-time fetch_git_hash! and related macros
portal-cli Small binaries for manual protocol and integration checks
portal-app-demo Local Axum demo: multi-session HTTP API over app
portal-rest/clients/ts TypeScript client

License

MIT — see LICENSE.

About

Portal protocol implementation in Rust

Resources

License

Stars

Watchers

Forks

Contributors