A materialized Server that is configured to use a specific transport channel. The ServerView has an InvocationContext which contains the DID of the service itself, among other things.

Returned by @ucanto/server#create | Server.create when instantiating a server.

Type Parameters

Hierarchy

Properties

[Marker]?: T
canIssue?: ((capability, issuer) => boolean)

Type declaration

    • (capability, issuer): boolean
    • Informs validator whether given capability can be issued by a given DID or whether it needs to be delegated to the issuer.

      Parameters

      Returns boolean

catch: ((err) => void)

Type declaration

id: Signer<`did:${string}:${string}`, SigAlg>

Service DID which will be used to verify that received invocation audience matches it.

principal?: PrincipalParser

Takes principal parser that can be used to turn a UCAN.Principal into Ucanto.Principal.

service: T

Actual service providing capability handlers.

validateAuthorization: ((proofs) => Await<Schema.Result<Unit, Revoked>>)

Type declaration

Methods

Generated using TypeDoc