This commit is contained in:
MacPro
2026-04-22 17:46:43 -05:00
commit 432250bffc
41 changed files with 2223 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
// Package-local persistent state. This is separate from the SQLite database
// inside the container — it's metadata the StartOS wrapper needs to remember
// between service starts (e.g., the generated admin API key so we don't
// regenerate it on every restart).
//
// StartOS persists this JSON through upgrades and backs it up automatically.
import { matches } from '@start9labs/start-sdk'
const { arr, num, obj, oneOf, literal, string } = matches
export const storeShape = obj({
// Admin API key for /v1/admin/* endpoints. Auto-generated on first init.
admin_api_key: string,
// Shared webhook secret configured on both sides (BTCPay + our service).
btcpay_webhook_secret: string,
// Operator display name shown on the service homepage.
operator_name: string,
// Tracks which version's init has already been applied.
schema_version: num,
})
export type Store = typeof storeShape._TYPE
export const store = {
shape: storeShape,
// Defaults. Populated for real during init.
path: 'store.json' as const,
}