Skip to main content

DamlGrpcClient

Struct DamlGrpcClient 

Source
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

Source

pub async fn connect(config: DamlGrpcClientConfig) -> DamlResult<Self>

Open a channel and connect.

Source

pub const fn config(&self) -> &DamlGrpcClientConfig

Source

pub fn package_service(&self) -> DamlPackageService<'_>

Retrieve a DamlPackageService for querying the Daml-LF packages supported by the participant.

Source

pub fn command_submission_service(&self) -> DamlCommandSubmissionService<'_>

Retrieve a DamlCommandSubmissionService for fire-and-forget command submissions. Completion is observed separately through command_completion_service.

Source

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.

Source

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.

Source

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.

Source

pub fn event_query_service(&self) -> DamlEventQueryService<'_>

Retrieve a DamlEventQueryService for per-contract event lookup (create + consuming-archive halves) by contract id.

Source

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.

Source

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.

Source

pub fn version_service(&self) -> DamlVersionService<'_>

Retrieve a DamlVersionService for querying the participant’s Ledger API version.

Source

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.

Source

pub fn party_management_service(&self) -> DamlPartyManagementService<'_>

Retrieve a DamlPartyManagementService for inspecting and administering participant-local party state.

Source

pub fn user_management_service(&self) -> DamlUserManagementService<'_>

Retrieve a DamlUserManagementService for managing participant users and their rights.

Source

pub fn identity_provider_config_service( &self, ) -> DamlIdentityProviderConfigService<'_>

Retrieve a DamlIdentityProviderConfigService for managing runtime-configured Identity Provider configurations.

Source

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.

Source

pub fn participant_pruning_service(&self) -> DamlParticipantPruningService<'_>

Retrieve a DamlParticipantPruningService for truncating older portions of the participant-local ledger view.

Source

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§

Source§

impl Debug for DamlGrpcClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more