pub trait SparkSignerEcdsa {
// Required methods
fn sign_message_ecdsa_with_identity_key<T: AsRef<[u8]>>(
&self,
message: T,
apply_hashing: bool,
network: Network,
) -> Result<Signature, SparkSdkError>;
fn sign_message_ecdsa_with_key<T: AsRef<[u8]>>(
&self,
message: T,
public_key_for_signing_key: &PublicKey,
apply_hashing: bool,
) -> Result<Signature, SparkSdkError>;
}
Required Methods§
Sourcefn sign_message_ecdsa_with_identity_key<T: AsRef<[u8]>>(
&self,
message: T,
apply_hashing: bool,
network: Network,
) -> Result<Signature, SparkSdkError>
fn sign_message_ecdsa_with_identity_key<T: AsRef<[u8]>>( &self, message: T, apply_hashing: bool, network: Network, ) -> Result<Signature, SparkSdkError>
Signs a message using the identity private key. The identity key is the first derived key from the master seed (using child index 0).
Accepts any type that can be treated as a slice of u8
(e.g. Vec
§Arguments
message
- The message to sign. Must implementAsRef<[u8]>
.apply_hashing
- If true, the message will be hashed using SHA256 before signing. If false, the message will be signed directly.network
- The network to use for the signing key.
§Returns
The DER-serialized (non-compact) Signature
of the message.
Sourcefn sign_message_ecdsa_with_key<T: AsRef<[u8]>>(
&self,
message: T,
public_key_for_signing_key: &PublicKey,
apply_hashing: bool,
) -> Result<Signature, SparkSdkError>
fn sign_message_ecdsa_with_key<T: AsRef<[u8]>>( &self, message: T, public_key_for_signing_key: &PublicKey, apply_hashing: bool, ) -> Result<Signature, SparkSdkError>
Signs a message using a provided public key.
Accepts any type that can be treated as a slice of u8
(e.g. Vec
§Arguments
message
- The message to sign. Must implementAsRef<[u8]>
.public_key_for_signing_key
- The public key for the signing key.apply_hashing
- If true, the message will be hashed using SHA256 before signing. If false, the message will be signed directly.
§Returns
The DER-serialized (non-compact) Signature
of the message.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.