Files
recap-relay/startos/dependencies.ts
T

25 lines
945 B
TypeScript

import { sdk } from './sdk'
// Required running dependency on BTCPay Server. Mirrors Keysat's
// pattern. The dep declaration is what gives us:
// - guaranteed `btcpayserver.startos` DNS resolution inside our
// container (used for daemon-to-daemon BTCPay API calls — see
// server/btcpay-client.js)
// - StartOS-level guarantee that BTCPay is running before the
// relay starts, so the credit-purchase flow's webhook
// auto-registration always works
//
// Without this declaration the docker network link isn't wired up
// and `btcpayserver.startos` doesn't resolve — which previously
// surfaced as "fetch failed" when the relay tried to list stores or
// create the webhook during the one-click setup.
export const setDependencies = sdk.setupDependencies(async ({ effects: _effects }) => {
return {
btcpayserver: {
kind: 'running',
versionRange: '>=1.11.0:0',
healthChecks: [],
},
}
})