A definition for a Service, combined with an optional handler method for execution errors.

Used as input to @ucanto/server#create | Server.create when defining a service implementation.

Type Parameters

  • T

Hierarchy

Properties

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

Generated using TypeDoc