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§
- Authorization
Context - 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.
- Conversion
Error - Error from a
TryFrom
orFromStr
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.
- Private
Key - A raw private key in SEC1 PEM format.
- Utils
- A convenience wrapper used as a namespace for utility functions
- Wallet
ApiRequest Signature Input - 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§
- Crypto
Error - Errors related to cryptographic keys and operations.
- KeyError
- Errors related to handling cryptographic keys.
- Method
- The HTTP method used in the request.
- Privy
ApiError - Error produced by generated client methods.
- Privy
Create Error - Errors that can occur during
PrivyClient
initialization. - Privy
Export Error - Errors that can appear during wallet export.
- Privy
Signed ApiError - The primary error type for the Privy SDK.
- Signature
Generation Error - 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.
- Signing
Error - 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. - Into
Signature - 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