pub struct SolanaSigner { /* private fields */ }Expand description
Solana Ed25519 signer.
Implementations§
Source§impl SolanaSigner
impl SolanaSigner
Source§impl SolanaSigner
impl SolanaSigner
Sourcepub fn scalar_bytes(&self) -> Zeroizing<Vec<u8>>
pub fn scalar_bytes(&self) -> Zeroizing<Vec<u8>>
Export the clamped Ed25519 scalar (first 32 bytes of SHA-512(seed), clamped).
⚠️ Advanced use only — for MPC, threshold signing, or key derivation. The scalar is the actual private scalar used in Ed25519 signing.
Trait Implementations§
Source§impl Drop for SolanaSigner
impl Drop for SolanaSigner
Source§impl KeyPair for SolanaSigner
impl KeyPair for SolanaSigner
Source§fn from_keypair_bytes(keypair: &[u8]) -> Result<Self, SignerError>
fn from_keypair_bytes(keypair: &[u8]) -> Result<Self, SignerError>
Import from Solana’s 64-byte keypair format (seed ∥ pubkey). Validates that the derived public key matches bytes[32..64] using constant-time comparison to prevent timing side-channels.
Source§fn keypair_bytes(&self) -> Zeroizing<Vec<u8>>
fn keypair_bytes(&self) -> Zeroizing<Vec<u8>>
Export as Solana’s 64-byte keypair (seed ∥ pubkey).
Source§fn generate() -> Result<Self, SignerError>
fn generate() -> Result<Self, SignerError>
Source§fn from_bytes(private_key: &[u8]) -> Result<Self, SignerError>
fn from_bytes(private_key: &[u8]) -> Result<Self, SignerError>
Source§impl Signer for SolanaSigner
impl Signer for SolanaSigner
Source§fn sign_prehashed(&self, digest: &[u8]) -> Result<SolanaSignature, SignerError>
fn sign_prehashed(&self, digest: &[u8]) -> Result<SolanaSignature, SignerError>
§⚠️ Not Actually Pre-Hashed
Ed25519 hashes internally per RFC 8032. This method is identical to
sign() — the digest parameter is treated as a raw message, not a
pre-computed hash. Passing a SHA-256 digest here will sign the digest
bytes as a message, NOT use them as a pre-computed hash.
Provided for trait consistency only.