Files
2026-05-07 10:41:57 -05:00

61 lines
2.2 KiB
TypeScript

// -----------------------------------------------------------------------------
// Licensing template: CONFIGURATION — FILL IN THE THREE VALUES BELOW.
// -----------------------------------------------------------------------------
//
// This is the one file you must edit to adopt the licensing template. The
// action files consume these constants; nothing else should need changes.
//
// After a buyer (Bob) installs your Start9 package, the "Activate license" and
// "Buy license" actions in his package dashboard will talk to YOUR licensing
// server (the `BASE_URL` below), paid in Bitcoin via your BTCPay.
// -----------------------------------------------------------------------------
/**
* The public URL of YOUR running licensing-service, as reachable from the
* buyer's Start9 server. Typically a Tor .onion, a clearnet domain, or both
* (see TOR_FALLBACK below).
*
* Example: 'https://license.example.com'
*/
export const LICENSING_BASE_URL = 'https://license.YOUR-DOMAIN.example'
/**
* Optional Tor fallback. If set, the actions will try this URL if the primary
* URL fails — useful when your licensing server is behind Tor and the buyer's
* clearnet is flaky.
*
* Example: 'http://abc...xyz.onion'
*/
export const LICENSING_BASE_URL_TOR: string | null = null
/**
* The product slug you configured in your licensing-service (via the
* "Create product" action or the admin API). This is how the service knows
* which product a license is for.
*
* Example: 'bitcoin-ticker-pro'
*/
export const PRODUCT_SLUG = 'your-product-slug'
/**
* Your licensing-service's Ed25519 public key in PEM form. Embed the full
* multi-line block as a template literal. The buyer's device verifies license
* keys AGAINST THIS KEY offline — no network required for the common case.
*
* Get this from your licensing-service: run the "Show admin credentials"
* action on your own Start9, or hit GET /v1/pubkey.
*
* Example:
* -----BEGIN PUBLIC KEY-----
* MCowBQYDK2VwAyEA...
* -----END PUBLIC KEY-----
*/
export const ISSUER_PUBKEY_PEM = `-----BEGIN PUBLIC KEY-----
PASTE YOUR ISSUER PUBLIC KEY PEM HERE
-----END PUBLIC KEY-----`
/**
* The product name shown in UI prompts. Purely cosmetic.
*/
export const PRODUCT_DISPLAY_NAME = 'Your Product'