pub struct Signature { /* private fields */ }Expand description
A signature over a hash the participant produced.
signed_by is the fingerprint the participant assigned to the key, not
anything derivable from the key material here: Canton computes it, and
GenerateExternalPartyTopology is where a caller learns it. Sending a
fingerprint Canton did not issue fails verification, which is why
Ed25519Key cannot become a Signer
until it has one.
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn new(
format: SignatureFormat,
bytes: Vec<u8>,
signed_by: impl Into<String>,
algorithm: SigningAlgorithm,
) -> Result<Signature, Error>
pub fn new( format: SignatureFormat, bytes: Vec<u8>, signed_by: impl Into<String>, algorithm: SigningAlgorithm, ) -> Result<Signature, Error>
A signature from its parts.
§Errors
canton_core::Error::InvalidRequest if the bytes cannot be what they claim: empty
— which the Ledger API marks as required non-empty — or the wrong length
for an Ed25519 Concat signature. A truncated reply from a signing
service is worth catching here rather than as a verification failure
with nothing to point at.
Sourcepub fn format(&self) -> SignatureFormat
pub fn format(&self) -> SignatureFormat
How bytes is laid out.
Sourcepub fn signed_by(&self) -> &str
pub fn signed_by(&self) -> &str
The fingerprint of the key that produced it, as Canton assigned it.
Sourcepub fn algorithm(&self) -> SigningAlgorithm
pub fn algorithm(&self) -> SigningAlgorithm
The algorithm it was produced with.
Trait Implementations§
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnsafeUnpin for Signature
impl UnwindSafe for Signature
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> 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::RequestSource§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