From 0585d26e4b8b1e811cf4205e35f8b82de1c51073 Mon Sep 17 00:00:00 2001 From: Keysat Date: Wed, 17 Jun 2026 15:24:55 -0500 Subject: [PATCH] Fix action and constant counts and the Step 3 import path --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2850bc5..cef73f9 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ A drop-in folder that adds Keysat licensing to your existing Start9 (StartOS 0.4.0.x) package. Your buyers get: - **"Buy license"** — pay with Bitcoin/Lightning on your BTCPay, never copy/paste the key. Optional discount/referral code field. +- **"Finish license purchase"** — after the buyer pays, fetch the issued key and persist it locally. - **"Redeem free license"** — paste a free-license code from the seller; key is issued immediately, no payment. - **"Activate license"** — paste a key you got out-of-band. - **"Check license status"** — re-verify on demand. @@ -19,6 +20,7 @@ only when the device is online. 2. You have created a product in your Keysat and have its **slug**. 3. You know your Keysat's **public URL** (clearnet, .onion, or both). 4. You have your Keysat's **Ed25519 public key in PEM form**. Get it from the "Show admin credentials" action on your Start9, or hit `GET /v1/pubkey` on your service. +5. The action files import `sdk` from `'../sdk'` — a module you must provide. Point that path at (or alias it to) your package's own `@start9labs/start-sdk` singleton; otherwise the template won't compile. ## Install @@ -26,7 +28,7 @@ Copy these folders into your buyer-side package's `startos/` directory: ``` startos/licensing/ ← config, store shape, runtime gate -startos/actions/ ← five actions (merge with your existing actions/) +startos/actions/ ← six actions (merge with your existing actions/) ``` Add the SDK to your package's `package.json`: @@ -39,8 +41,10 @@ npm install @keysat/licensing-client ### 1. Fill in `startos/licensing/config.ts` -There are three constants to set: `LICENSING_BASE_URL`, `PRODUCT_SLUG`, and -`ISSUER_PUBKEY_PEM`. Each is documented inline. +There are four constants to set: `LICENSING_BASE_URL`, `PRODUCT_SLUG`, +`ISSUER_PUBKEY_PEM`, and `PRODUCT_DISPLAY_NAME`. Each is documented inline. +`PRODUCT_DISPLAY_NAME` is interpolated into every user-visible string, so +leaving it at the default is a real mistake, not a cosmetic one. ### 2. Extend your store shape @@ -64,7 +68,7 @@ export const initStore: StoreShape = { In `startos/actions/index.ts`: ```ts -import { licensingActions } from './licensing-actions' // or wherever you dropped them +import { licensingActions } from './licensing/actions' // or wherever you dropped them export const actions = sdk.Actions.of() // ...your own actions... @@ -105,7 +109,7 @@ export const main = sdk.setupMain(async ({ effects, started }) => { ## What the buyer sees 1. Installs your package on their Start9. -2. Sees four new actions in the dashboard under the "License" group. +2. Sees six new actions in the dashboard under the "License" group. 3. Either: - Clicks **Buy license** → opens the returned URL → pays → clicks **Finish license purchase** → done. - Pastes a key they got from you into **Activate license** → done.