pub struct Tx3Client { /* private fields */ }Expand description
High-level client over a TX3 protocol.
Holds the deconstructed protocol parts — per-transaction TIR envelopes, named profiles, the set of declared party names — plus the runtime state (TRP client, bound parties, selected profile and env overrides).
Construct one through Tx3ClientBuilder, obtained via
Protocol::client: profile selection and party/env binding happen on
the builder, and build() performs all fallible validation.
Implementations§
Source§impl Tx3Client
impl Tx3Client
Sourcepub fn with_party(
self,
name: impl Into<String>,
party: Party,
) -> Result<Self, Error>
pub fn with_party( self, name: impl Into<String>, party: Party, ) -> Result<Self, Error>
Binds a party (signer or read-only address) by name after the client has been built. Useful for late binding when, e.g., a user logs in after the client is already in scope.
Overrides any address the selected profile declared for the same name.
§Errors
Returns Error::UnknownParty if name is not a party declared by
the protocol.
Sourcepub fn with_party_unchecked(self, name: impl Into<String>, party: Party) -> Self
pub fn with_party_unchecked(self, name: impl Into<String>, party: Party) -> Self
Binds a party without validating the name against the protocol’s
declared parties. Intended for codegen-generated wrappers — see
Tx3ClientBuilder::with_party_unchecked. Hand-written code SHOULD
use Tx3Client::with_party.
Sourcepub fn with_parties<I, K>(self, parties: I) -> Result<Self, Error>
pub fn with_parties<I, K>(self, parties: I) -> Result<Self, Error>
Binds multiple parties at once. See Tx3Client::with_party.