Crate privy_rs

Crate privy_rs 

Source
Expand description

Privy SDK for Rust

Re-exports§

pub use client::PrivyClient;
pub use privy_hpke::PrivyHpke;

Modules§

client
Privy client implementations.
ethereum
Ethereum wallet operations service.
generated
Generated types from privy’s openapi spec
privy_hpke
privy_hpke
solana
Solana wallet operations service.
subclients
Subclients

Structs§

AuthorizationContext
A context for signing messages. Any keys added to the context will be automatically added to the list of signatories for requests to the Privy API that require authorization.
ConversionError
Error from a TryFrom or FromStr implementation.
FnKey
A wrapper for a closure that implements IntoKey. This uses the newtype pattern to avoid conflicting blanket impls.
FnSigner
A wrapper for a closure that implements IntoSignature. This uses the newtype pattern to avoid conflicting blanket impls.
JwtUser
A key that is sourced from the user identified by the provided JWT.
PrivateKey
A raw private key in SEC1 PEM format.
Utils
A convenience wrapper used as a namespace for utility functions
WalletApiRequestSignatureInput
The wallet API request signature input is used during the signing process as a canonical representation of the request. Ensure that you serialize this struct with the serde_json_canonicalizer to get the appropriate RFC-8785 canonicalized string. For more information, see https://datatracker.ietf.org/doc/html/rfc8785

Enums§

CryptoError
Errors related to cryptographic keys and operations.
KeyError
Errors related to handling cryptographic keys.
Method
The HTTP method used in the request.
PrivyApiError
Error produced by generated client methods.
PrivyCreateError
Errors that can occur during PrivyClient initialization.
PrivyExportError
Errors that can appear during wallet export.
PrivySignedApiError
The primary error type for the Privy SDK.
SignatureGenerationError
Errors from the authorization signature generation process. This can very rarely occur from serialization (either the request could not be serialized or the serialized data can not be converted to base64), or (more likely) there was an error when undergoing the signing process.
SigningError
Errors that occur specifically during a digital signature operation.

Traits§

IntoKey
A trait for getting a key from a source. See IntoKey::get_key for more details.
IntoSignature
A trait for signing messages. See IntoSignature::sign for more details.

Functions§

format_request_for_authorization_signature
Create canonical request data for signing
generate_authorization_signatures
Generates an authorization signature for a given request