pub trait SparkSignerDerivationPath {
// Required methods
fn get_deposit_signing_key(
&self,
network: Network,
) -> Result<PublicKey, SparkSdkError>;
fn derive_spark_key(
leaf_id: Option<String>,
account: u32,
seed_bytes: &[u8],
key_type: SparkKeyType,
network: Network,
) -> Result<SecretKey, SparkSdkError>;
fn get_identity_derivation_path(
account_index: u32,
) -> Result<SparkDerivationPath, SparkSdkError>;
}
Required Methods§
Sourcefn get_deposit_signing_key(
&self,
network: Network,
) -> Result<PublicKey, SparkSdkError>
fn get_deposit_signing_key( &self, network: Network, ) -> Result<PublicKey, SparkSdkError>
Derives the deposit signing key for the user. In Spark, currently users always have a single deposit key, derived deterministically from their seed.
Sourcefn derive_spark_key(
leaf_id: Option<String>,
account: u32,
seed_bytes: &[u8],
key_type: SparkKeyType,
network: Network,
) -> Result<SecretKey, SparkSdkError>
fn derive_spark_key( leaf_id: Option<String>, account: u32, seed_bytes: &[u8], key_type: SparkKeyType, network: Network, ) -> Result<SecretKey, SparkSdkError>
Derives a Spark key for the specified key type, account, and optionally leaf ID. If the leaf ID is not provided, the function uses the identity.
Sourcefn get_identity_derivation_path(
account_index: u32,
) -> Result<SparkDerivationPath, SparkSdkError>
fn get_identity_derivation_path( account_index: u32, ) -> Result<SparkDerivationPath, SparkSdkError>
Returns the derivation path for the identity key.
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.