Files
KamadoPool-StartOS-0351/scripts/procedures/getConfig.ts
T
satoshi 54935bf638 Add configurable stratum port (default 3333)
Exposes stratum-port in the StartOS config UI so users running
simpleproxy or another TCP forwarder can point Kamado at a
non-default port. Entrypoint substitutes the value into
ckpool.conf serverurl.

Also pins placeholder KAMADO_SHA in the Dockerfile — swap to a
real pushed commit before the first build.
2026-04-13 03:54:49 +03:00

146 lines
4.3 KiB
TypeScript

import { compat, types as T } from "../deps.ts";
export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
"bitcoind": {
"type": "union",
"name": "Bitcoin Core",
"description": "Select which Bitcoin Core node Kamado should use.",
"tag": {
"id": "type",
"name": "Type",
"description": "Mainnet bitcoind or the testnet4 variant.",
"variant-names": {
"bitcoind": "Bitcoin Core (mainnet)",
"bitcoind-testnet": "Bitcoin Core (testnet4)",
},
},
"default": "bitcoind",
"variants": {
"bitcoind": {
"user": {
"type": "pointer",
"name": "RPC Username",
"description": "The RPC username from Bitcoin Core.",
"subtype": "package",
"package-id": "bitcoind",
"target": "config",
"multi": false,
"selector": "$.rpc.username",
},
"password": {
"type": "pointer",
"name": "RPC Password",
"description": "The RPC password from Bitcoin Core.",
"subtype": "package",
"package-id": "bitcoind",
"target": "config",
"multi": false,
"selector": "$.rpc.password",
},
},
"bitcoind-testnet": {
"user": {
"type": "pointer",
"name": "RPC Username",
"description": "The RPC username from Bitcoin Core (testnet4).",
"subtype": "package",
"package-id": "bitcoind-testnet",
"target": "config",
"multi": false,
"selector": "$.rpc.username",
},
"password": {
"type": "pointer",
"name": "RPC Password",
"description": "The RPC password from Bitcoin Core (testnet4).",
"subtype": "package",
"package-id": "bitcoind-testnet",
"target": "config",
"multi": false,
"selector": "$.rpc.password",
},
},
},
},
"pool-address": {
"type": "string",
"name": "Payout Address",
"description":
"Bitcoin address that receives the full block reward when a block is solved. Solo mining — no fees, no splits.",
"nullable": false,
"masked": false,
"copyable": true,
},
"pool-identifier": {
"type": "string",
"name": "Coinbase Tag",
"description":
"Short string embedded in the coinbase transaction of solved blocks. Max 32 characters.",
"nullable": false,
"default": "/Kamado/",
"masked": false,
"copyable": false,
},
"stratum-port": {
"type": "number",
"name": "Stratum Port",
"description":
"TCP port the stratum server listens on inside the container. Defaults to 3333. Change this if you are running simpleproxy (or another TCP forwarder) and want Kamado to listen on a different port — useful when another service on the same host already uses 3333.",
"nullable": false,
"default": 3333,
"range": "[1,65535]",
"integral": true,
},
"startdiff": {
"type": "number",
"name": "Starting Difficulty",
"description":
"Initial vardiff target for new miner connections. Bitaxe-class miners typically land around 16384.",
"nullable": false,
"default": 16384,
"range": "[1,*)",
"integral": true,
},
"mindiff": {
"type": "number",
"name": "Minimum Difficulty",
"description": "Floor for the vardiff algorithm.",
"nullable": false,
"default": 1000,
"range": "[1,*)",
"integral": true,
},
"maxdiff": {
"type": "number",
"name": "Maximum Difficulty",
"description": "Ceiling for the vardiff algorithm. 0 means no cap.",
"nullable": false,
"default": 0,
"range": "[0,*)",
"integral": true,
},
"dropidle": {
"type": "number",
"name": "Drop Idle (seconds)",
"description":
"Disconnect clients that have not submitted a share in this many seconds. 0 disables the idle disconnect.",
"nullable": false,
"default": 0,
"range": "[0,*)",
"integral": true,
},
"log-level": {
"type": "enum",
"name": "Log Level",
"description": "Verbosity of the kamado-api log output.",
"values": ["debug", "info", "warn", "error"],
"value-names": {
"debug": "Debug",
"info": "Info",
"warn": "Warn",
"error": "Error",
},
"default": "info",
},
});