Canton Administration APIs

Canton has builtin modes of administrative interaction, ie the CLI tool and the REPL. It is however possible to also write your own client and connect to the administration gRPC endpoints of both participants and domains.

gRPC endpoints

Canton also offers raw gRPC endpoints a client application can connect to. For example Canton’s gRPC API for domain connectivity is

syntax = "proto3";

package com.digitalasset.canton.participant.admin.api.v0;

import "com/digitalasset/canton/identity/v0/identity_transaction.proto";

/**
 * Domain connectivity service for adding and connecting to domains
 *
 * The domain connectivity service allows to register to new domains and control the
 * participants domain connections.
 */
service DomainConnectivityService {
    // configure a new domain connection
    rpc RegisterDomain(RegisterDomainRequest) returns (RegisterDomainResponse);
    // connect to a configured domain
    rpc ConnectDomain(ConnectDomainRequest) returns (ConnectDomainResponse);
    // disconnect from a configured domain
    rpc DisconnectDomain(DisconnectDomainRequest) returns (DisconnectDomainResponse);
    // list connected domains
    rpc ListConnectedDomains(ListConnectedDomainsRequest) returns (ListConnectedDomainsResponse);
    // list configured domains
    rpc ListConfiguredDomains(ListConfiguredDomainsRequest) returns (ListConfiguredDomainsResponse);
}

message DomainConnectionConfig {
    // participant local identifier of the target domain
    string domainAlias = 1;
    // connection information to domain (http[s]://<host>:<port>")
    string connection = 2;
    // if true, then domain will be automatically connected to (default false)
    bool autoConnect = 3;
    // optional essential state (if TLS isn't to be trusted)
    com.digitalasset.canton.identity.v0.EssentialState essentialState = 4;
    // optional. if not using system certificates this should be the bytes of a X.509 certificate collection in PEM format chain.
    bytes certificates = 5;
}

/** Register and optionally auto-connect to a new domain */
message RegisterDomainRequest {
    DomainConnectionConfig add = 1;
}

message RegisterDomainResponse {

}

message ListConfiguredDomainsRequest {

}

message ListConfiguredDomainsResponse {
    message Result {
        DomainConnectionConfig config = 1;
        bool connected = 2;
    }
    repeated Result results = 1;
}


message ConnectDomainRequest {
    string domainAlias = 1;
}

message ConnectDomainResponse {
}

message DisconnectDomainRequest {
    string domainAlias = 1;
}

message DisconnectDomainResponse {
}

message ListConnectedDomainsRequest {
}

message ListConnectedDomainsResponse {
    message Result {
        string domainAlias = 1;
        string domainId = 2;
    }
    repeated Result connectedDomains = 1;
}