WebsiteServer

fmgp.did.method.prism.cli.WebsiteServer
object WebsiteServer

ZIO-http server that serves the cardano-prism CIP-30 webapp.

The webapp bundle is built by sbt (sbt cardanoPrismCip30Webapp/cip30Bundle) and embedded in this jar as cip30/bundle.js. Set CIP30_WEBAPP_BUNDLE to a filesystem path to override the embedded copy during development.

Two modes:

  • runUntilDone: one-shot. Injects events as window.PRISM_CIP30_EVENTS, registers a /done handler, and completes when the page POSTs the tx hash. Used by submit-cip30.
  • runForever: long-running. No events injected, no /done handler. Used by open and simulate. Runs until interrupted (Ctrl-C).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

enum Landing

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class TxResult(txHash: String, networkId: Int)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TxResult

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TxResult.type

Value members

Concrete methods

def runForever(landing: Landing, port: Int): ZIO[Any, Throwable, Nothing]

Long-running. Serves the SPA at the given landing page until interrupted.

Long-running. Serves the SPA at the given landing page until interrupted.

Attributes

def runUntilDone(events: Seq[SignedPrismEvent], port: Int): ZIO[Any, Throwable, TxResult]

One-shot. Completes when the browser page POSTs /done.

One-shot. Completes when the browser page POSTs /done.

Attributes