multi-party-computation-controller-api
    Preparing search index...

    Client service for the Rust controller engine gRPC Controller service.

    Every outbound call attaches an Authorization: Bearer metadata entry so the engine can authenticate the request. The Bearer token is read once from AppConfigService and injected per-call.

    The underlying gRPC channel is created and managed by NestJS ClientsModule; this service is responsible only for the application-level mapping between NestJS method calls and Observable-based gRPC stubs.

    Implements

    • OnModuleInit
    Index

    Constructors

    Properties

    configService: AppConfigService
    controllerClient: ControllerClient
    grpcClient: ClientGrpc

    Methods

    • Calls the Abort RPC to cancel an in-progress protocol session.

      Parameters

      • request: AbortRequest

        Contains the UUID of the session to abort.

      Returns ResultAsync<void, Error>

      Ok on success, or a formatted engine error if the session is not found.

    • Builds a gRPC Metadata object containing the engine Bearer token. Called on every outbound RPC so the token is always fresh from config.

      Returns Metadata

      A populated Metadata instance.

    • Calls the GenerateKey RPC on the Rust controller engine.

      The call blocks until the distributed key-generation protocol completes on all nodes. CGGMP24 may take up to several tens of seconds.

      Parameters

      Returns ResultAsync<GenerateKeyResponse, Error>

      The canonical public key and the opaque public-key package.

      The underlying gRPC StatusObject on transport or engine errors.

    • Initialises the typed Controller service stub after the module's dependencies have been resolved.

      Returns void

    • Calls the Sign RPC on the cryptographic engine.

      Parameters

      • request: SignRequest

        Signing parameters including the opaque public-key package.

      Returns ResultAsync<SignResponse, Error>

      The raw or ECDSA signature produced by the threshold protocol, or a formatted engine error.