Paid Uploads¶
| Variable | Meaning |
|---|---|
BLOSSOM_SATS_PER_MIB |
Price for each MiB, in satoshis. 0 is free |
BLOSSOM_FREE_BYTES |
Bytes that are free |
CASHU_MINTS |
Accepted Cashu mints |
LND_URL |
LND node for Lightning |
LND_CA, LND_MACAROON |
Files with its certificate and macaroon |
With a price, at least one mint or a Lightning node is required.
Flow¶
- The client uploads, or asks first with
HEAD /upload. - Without enough credit, the server answers 402 with a Cashu request in
X-Cashu-Requestand an invoice inX-Lightning. - The client pays and repeats the request with the token in
X-Cashuor the preimage inX-Lightning.
blossomctl upload -server https://media.example -file a.png -cashu <token>
Prices are published in /.well-known/nostr/nip96.json.