+97
-2
@@ -1,6 +1,13 @@
|
||||
import { i18n } from './i18n'
|
||||
import { sdk } from './sdk'
|
||||
import { EXPLORER_PORT, uiPort } from './utils'
|
||||
import {
|
||||
CERTRELAY_PORT,
|
||||
EXPLORER_PORT,
|
||||
SUBSPACES_PROVER_PORT,
|
||||
SUBSPACES_REGISTRY_PORT,
|
||||
SUBSPACES_UI_PORT,
|
||||
uiPort,
|
||||
} from './utils'
|
||||
|
||||
export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
|
||||
const uiMulti = sdk.MultiHost.of(effects, 'ui-multi')
|
||||
@@ -43,5 +50,93 @@ export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
|
||||
|
||||
const explorerReceipt = await explorerMultiOrigin.export([explorer])
|
||||
|
||||
return [uiReceipt, explorerReceipt]
|
||||
const subspacesMulti = sdk.MultiHost.of(effects, 'subspaces-multi')
|
||||
const subspacesMultiOrigin = await subspacesMulti.bindPort(SUBSPACES_UI_PORT, {
|
||||
protocol: 'http',
|
||||
})
|
||||
const subspaces = sdk.createInterface(effects, {
|
||||
name: i18n('Subspaces Web UI'),
|
||||
id: 'subspaces',
|
||||
description: i18n(
|
||||
'Off-chain Bitcoin handles via the Spaces protocol (spacesops/subs). Talks to the local spaced over loopback RPC. Only useful while Subspaces is enabled.',
|
||||
),
|
||||
type: 'ui',
|
||||
masked: false,
|
||||
schemeOverride: null,
|
||||
username: null,
|
||||
path: '',
|
||||
query: {},
|
||||
})
|
||||
|
||||
const subspacesReceipt = await subspacesMultiOrigin.export([subspaces])
|
||||
|
||||
const proverMulti = sdk.MultiHost.of(effects, 'subspaces-prover-multi')
|
||||
const proverMultiOrigin = await proverMulti.bindPort(SUBSPACES_PROVER_PORT, {
|
||||
protocol: 'http',
|
||||
})
|
||||
const prover = sdk.createInterface(effects, {
|
||||
name: i18n('Subspaces Prover'),
|
||||
id: 'subspaces-prover',
|
||||
description: i18n(
|
||||
'RISC Zero prover server for Subspaces (no GPU). Generates the cryptographic proofs the Subspaces UI requests. Only useful while Subspaces is enabled.',
|
||||
),
|
||||
type: 'api',
|
||||
masked: false,
|
||||
schemeOverride: null,
|
||||
username: null,
|
||||
path: '',
|
||||
query: {},
|
||||
})
|
||||
|
||||
const proverReceipt = await proverMultiOrigin.export([prover])
|
||||
|
||||
const registryMulti = sdk.MultiHost.of(effects, 'subspaces-registry-multi')
|
||||
const registryMultiOrigin = await registryMulti.bindPort(
|
||||
SUBSPACES_REGISTRY_PORT,
|
||||
{ protocol: 'http' },
|
||||
)
|
||||
const registry = sdk.createInterface(effects, {
|
||||
name: i18n('Subspaces Registry'),
|
||||
id: 'subspaces-registry',
|
||||
description: i18n(
|
||||
'Registry server for publishing and resolving Subspaces handles. Only useful while Subspaces is enabled.',
|
||||
),
|
||||
type: 'api',
|
||||
masked: false,
|
||||
schemeOverride: null,
|
||||
username: null,
|
||||
path: '',
|
||||
query: {},
|
||||
})
|
||||
|
||||
const registryReceipt = await registryMultiOrigin.export([registry])
|
||||
|
||||
const certrelayMulti = sdk.MultiHost.of(effects, 'certrelay-multi')
|
||||
const certrelayMultiOrigin = await certrelayMulti.bindPort(CERTRELAY_PORT, {
|
||||
protocol: 'http',
|
||||
})
|
||||
const certrelay = sdk.createInterface(effects, {
|
||||
name: i18n('Certrelay'),
|
||||
id: 'certrelay',
|
||||
description: i18n(
|
||||
'Certrelay serves cryptographic proofs binding Bitcoin-anchored handles to owner keys. SETUP NOTE: run the "Configure Certrelay" action and set CERTRELAY_SELF_URL to the publicly visible URL StartOS exposes for this interface (your clearnet domain or .onion address) — peers and clients reach this relay at that URL.',
|
||||
),
|
||||
type: 'api',
|
||||
masked: false,
|
||||
schemeOverride: null,
|
||||
username: null,
|
||||
path: '',
|
||||
query: {},
|
||||
})
|
||||
|
||||
const certrelayReceipt = await certrelayMultiOrigin.export([certrelay])
|
||||
|
||||
return [
|
||||
uiReceipt,
|
||||
explorerReceipt,
|
||||
subspacesReceipt,
|
||||
proverReceipt,
|
||||
registryReceipt,
|
||||
certrelayReceipt,
|
||||
]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user