pub struct Ed25519Auth { /* private fields */ }Expand description
Ed25519 authentication implementation for exchanges
Implementations§
Source§impl Ed25519Auth
impl Ed25519Auth
Sourcepub fn new(signing_key: SigningKey, api_key: SmartString) -> Self
pub fn new(signing_key: SigningKey, api_key: SmartString) -> Self
Create new Ed25519 authenticator with existing signing key
Sourcepub fn from_secret_key_hex(
secret_hex: &str,
api_key: SmartString,
) -> Result<Self>
pub fn from_secret_key_hex( secret_hex: &str, api_key: SmartString, ) -> Result<Self>
Sourcepub fn sign_params(&self, params: &[(&str, &str)]) -> Result<SmartString>
pub fn sign_params(&self, params: &[(&str, &str)]) -> Result<SmartString>
Sourcepub fn sign_request(
&self,
_method: &str,
_path: &str,
_body: Option<&str>,
) -> Result<FxHashMap<SmartString, SmartString>>
pub fn sign_request( &self, _method: &str, _path: &str, _body: Option<&str>, ) -> Result<FxHashMap<SmartString, SmartString>>
Sign a complete HTTP request
Creates authentication headers for an HTTP request including the signature. The signature is computed over the request parameters.
§Arguments
method- HTTP method (GET, POST, etc.)path- Request pathbody- Optional request body (currently unused but reserved for future use)
§Returns
HashMap containing authentication headers
Sourcepub fn public_key_hex(&self) -> SmartString
pub fn public_key_hex(&self) -> SmartString
Get the public key as hex string
Sourcepub const fn signing_key(&self) -> &SigningKey
pub const fn signing_key(&self) -> &SigningKey
Get the signing key reference (for advanced use cases)
Sourcepub const fn verifying_key(&self) -> &VerifyingKey
pub const fn verifying_key(&self) -> &VerifyingKey
Get the verifying key reference (for advanced use cases)
Trait Implementations§
Source§impl Clone for Ed25519Auth
impl Clone for Ed25519Auth
Source§fn clone(&self) -> Ed25519Auth
fn clone(&self) -> Ed25519Auth
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Ed25519Auth
impl RefUnwindSafe for Ed25519Auth
impl Send for Ed25519Auth
impl Sync for Ed25519Auth
impl Unpin for Ed25519Auth
impl UnwindSafe for Ed25519Auth
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
Mutably borrows from an owned value. Read more