pub struct DamlGrpcClient { /* private fields */ }Expand description
Daml v2 ledger client connection. A thin handle around a tonic
Channel that hands out per-service clients on demand. Cheap to
hold — service factories clone the channel rather than opening
new ones.
Implementations§
Source§impl DamlGrpcClient
impl DamlGrpcClient
Sourcepub async fn connect(config: DamlGrpcClientConfig) -> DamlResult<Self>
pub async fn connect(config: DamlGrpcClientConfig) -> DamlResult<Self>
Open a channel and connect.
pub const fn config(&self) -> &DamlGrpcClientConfig
Sourcepub fn package_service(&self) -> DamlPackageService<'_>
pub fn package_service(&self) -> DamlPackageService<'_>
Retrieve a DamlPackageService for querying the Daml-LF
packages supported by the participant.
Sourcepub fn command_submission_service(&self) -> DamlCommandSubmissionService<'_>
pub fn command_submission_service(&self) -> DamlCommandSubmissionService<'_>
Retrieve a DamlCommandSubmissionService for fire-and-forget
command submissions. Completion is observed separately through
command_completion_service.
Sourcepub fn command_completion_service(&self) -> DamlCommandCompletionService<'_>
pub fn command_completion_service(&self) -> DamlCommandCompletionService<'_>
Retrieve a DamlCommandCompletionService for observing the
asynchronous outcome (success or rejection) of command
submissions, plus periodic OffsetCheckpoint markers.
Sourcepub fn update_service(&self) -> DamlUpdateService<'_>
pub fn update_service(&self) -> DamlUpdateService<'_>
Retrieve a DamlUpdateService for reading the participant’s
update stream — transactions, reassignments, and topology
transactions, paginated or open-ended. v2’s replacement for
v1’s TransactionService.
Sourcepub fn state_service(&self) -> DamlStateService<'_>
pub fn state_service(&self) -> DamlStateService<'_>
Retrieve a DamlStateService for snapshotting the active
contract set, listing connected synchronizers, reading the
ledger end, and querying pruning watermarks. v2’s
replacement for v1’s ActiveContractsService.
Sourcepub fn event_query_service(&self) -> DamlEventQueryService<'_>
pub fn event_query_service(&self) -> DamlEventQueryService<'_>
Retrieve a DamlEventQueryService for per-contract event
lookup (create + consuming-archive halves) by contract id.
Sourcepub fn contract_service(&self) -> DamlContractService<'_>
pub fn contract_service(&self) -> DamlContractService<'_>
Retrieve a DamlContractService for contract-payload
lookup by id. Experimental / alpha per the proto; prefer
event_query_service or
state_service for stable surfaces.
Sourcepub fn command_service(&self) -> DamlCommandService<'_>
pub fn command_service(&self) -> DamlCommandService<'_>
Retrieve a DamlCommandService for synchronous command
submission: submit and wait for the participant’s verdict in
a single RPC.
Sourcepub fn version_service(&self) -> DamlVersionService<'_>
pub fn version_service(&self) -> DamlVersionService<'_>
Retrieve a DamlVersionService for querying the participant’s
Ledger API version.
Sourcepub fn package_management_service(&self) -> DamlPackageManagementService<'_>
pub fn package_management_service(&self) -> DamlPackageManagementService<'_>
Retrieve a DamlPackageManagementService for inspecting
known packages, uploading DARs, validating DARs, and adjusting
the participant’s package-vetting topology.
Sourcepub fn party_management_service(&self) -> DamlPartyManagementService<'_>
pub fn party_management_service(&self) -> DamlPartyManagementService<'_>
Retrieve a DamlPartyManagementService for inspecting and
administering participant-local party state.
Sourcepub fn user_management_service(&self) -> DamlUserManagementService<'_>
pub fn user_management_service(&self) -> DamlUserManagementService<'_>
Retrieve a DamlUserManagementService for managing
participant users and their rights.
Sourcepub fn identity_provider_config_service(
&self,
) -> DamlIdentityProviderConfigService<'_>
pub fn identity_provider_config_service( &self, ) -> DamlIdentityProviderConfigService<'_>
Retrieve a DamlIdentityProviderConfigService for managing
runtime-configured Identity Provider configurations.
Sourcepub fn command_inspection_service(&self) -> DamlCommandInspectionService<'_>
pub fn command_inspection_service(&self) -> DamlCommandInspectionService<'_>
Retrieve a DamlCommandInspectionService for debugging
in-flight commands on the participant. Alpha; only available
when the participant advertises
experimental.command_inspection_service.supported in its
VersionService.GetLedgerApiVersion feature descriptor.
Sourcepub fn participant_pruning_service(&self) -> DamlParticipantPruningService<'_>
pub fn participant_pruning_service(&self) -> DamlParticipantPruningService<'_>
Retrieve a DamlParticipantPruningService for truncating
older portions of the participant-local ledger view.
Sourcepub fn time_service(&self) -> DamlTimeService<'_>
pub fn time_service(&self) -> DamlTimeService<'_>
Retrieve a DamlTimeService for reading and advancing the
participant’s static-time clock. Only meaningful when the
participant is configured for static time (see the
experimental.static_time flag in
VersionService::GetLedgerApiVersion).
v2 dropped the sandbox feature gate — TimeService is part
of every Canton participant’s testing API; static-vs-
wallclock is a server-side config switch, not a client
build flag.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DamlGrpcClient
impl !UnwindSafe for DamlGrpcClient
impl Freeze for DamlGrpcClient
impl Send for DamlGrpcClient
impl Sync for DamlGrpcClient
impl Unpin for DamlGrpcClient
impl UnsafeUnpin for DamlGrpcClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request