pub struct Client { /* private fields */ }Expand description
Client for Privy API
Version: 0.0.1
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str) -> Self
pub fn new(baseurl: &str) -> Self
Create a new client.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(baseurl: &str, client: Client) -> Self
pub fn new_with_client(baseurl: &str, client: Client) -> Self
Construct a new client with an existing reqwest::Client,
allowing more control over its configuration.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Source§impl Client
impl Client
Sourcepub async fn get_wallets<'a>(
&'a self,
chain_type: Option<GetWalletsChainType>,
cursor: Option<&'a GetWalletsCursor>,
limit: Option<f64>,
user_id: Option<&'a str>,
) -> Result<ResponseValue<GetWalletsResponse>, Error<()>>
pub async fn get_wallets<'a>( &'a self, chain_type: Option<GetWalletsChainType>, cursor: Option<&'a GetWalletsCursor>, limit: Option<f64>, user_id: Option<&'a str>, ) -> Result<ResponseValue<GetWalletsResponse>, Error<()>>
Get all wallets
Get all wallets in your app.
Sends a GET request to /v1/wallets
Sourcepub async fn create_wallet<'a>(
&'a self,
privy_idempotency_key: Option<&'a str>,
body: &'a CreateWalletBody,
) -> Result<ResponseValue<Wallet>, Error<()>>
pub async fn create_wallet<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a CreateWalletBody, ) -> Result<ResponseValue<Wallet>, Error<()>>
Create wallet
Create a new wallet.
Sends a POST request to /v1/wallets
Sourcepub async fn wallet_rpc<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
body: &'a WalletRpcBody,
) -> Result<ResponseValue<WalletRpcResponse>, Error<()>>
pub async fn wallet_rpc<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, body: &'a WalletRpcBody, ) -> Result<ResponseValue<WalletRpcResponse>, Error<()>>
Create a signature or transaction
Sign a message or transaction with a wallet by wallet ID.
Sends a POST request to /v1/wallets/{wallet_id}/rpc
Sourcepub async fn get_wallet<'a>(
&'a self,
wallet_id: &'a str,
) -> Result<ResponseValue<Wallet>, Error<()>>
pub async fn get_wallet<'a>( &'a self, wallet_id: &'a str, ) -> Result<ResponseValue<Wallet>, Error<()>>
Get wallet
Get a wallet by wallet ID.
Sends a GET request to /v1/wallets/{wallet_id}
Sourcepub async fn update_wallet<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
body: &'a UpdateWalletBody,
) -> Result<ResponseValue<Wallet>, Error<()>>
pub async fn update_wallet<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, body: &'a UpdateWalletBody, ) -> Result<ResponseValue<Wallet>, Error<()>>
Update wallet
Update a wallet’s policies or authorization key configuration.
Sends a PATCH request to /v1/wallets/{wallet_id}
Sourcepub async fn raw_sign<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
body: &'a RawSign,
) -> Result<ResponseValue<RawSignResponse>, Error<()>>
pub async fn raw_sign<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, body: &'a RawSign, ) -> Result<ResponseValue<RawSignResponse>, Error<()>>
Raw sign
Sign a message with a wallet by wallet ID.
Sends a POST request to /v1/wallets/{wallet_id}/raw_sign
Sourcepub async fn get_wallet_balance<'a>(
&'a self,
wallet_id: &'a str,
asset: &'a GetWalletBalanceAsset,
chain: &'a GetWalletBalanceChain,
include_currency: Option<GetWalletBalanceIncludeCurrency>,
) -> Result<ResponseValue<GetWalletBalanceResponse>, Error<()>>
pub async fn get_wallet_balance<'a>( &'a self, wallet_id: &'a str, asset: &'a GetWalletBalanceAsset, chain: &'a GetWalletBalanceChain, include_currency: Option<GetWalletBalanceIncludeCurrency>, ) -> Result<ResponseValue<GetWalletBalanceResponse>, Error<()>>
Get balance
Get the balance of a wallet by wallet ID.
Sends a GET request to /v1/wallets/{wallet_id}/balance
Sourcepub async fn wallet_transactions<'a>(
&'a self,
wallet_id: &'a str,
asset: &'a WalletTransactionsAsset,
chain: WalletTransactionsChain,
cursor: Option<&'a WalletTransactionsCursor>,
limit: Option<f64>,
) -> Result<ResponseValue<WalletTransactionsResponse>, Error<()>>
pub async fn wallet_transactions<'a>( &'a self, wallet_id: &'a str, asset: &'a WalletTransactionsAsset, chain: WalletTransactionsChain, cursor: Option<&'a WalletTransactionsCursor>, limit: Option<f64>, ) -> Result<ResponseValue<WalletTransactionsResponse>, Error<()>>
Get transactions
Get incoming and outgoing transactions of a wallet by wallet ID.
Sends a GET request to /v1/wallets/{wallet_id}/transactions
Sourcepub async fn authenticate<'a>(
&'a self,
body: &'a AuthenticateBody,
) -> Result<ResponseValue<AuthenticateResponse>, Error<()>>
pub async fn authenticate<'a>( &'a self, body: &'a AuthenticateBody, ) -> Result<ResponseValue<AuthenticateResponse>, Error<()>>
Obtain a session key to enable wallet access
Obtain a session key to enable wallet access.
Sends a POST request to /v1/wallets/authenticate
Sourcepub async fn wallet_import_init<'a>(
&'a self,
body: &'a WalletImportInitializationRequest,
) -> Result<ResponseValue<WalletImportInitializationResponse>, Error<()>>
pub async fn wallet_import_init<'a>( &'a self, body: &'a WalletImportInitializationRequest, ) -> Result<ResponseValue<WalletImportInitializationResponse>, Error<()>>
Initialize import
Initialize a wallet import. Complete by submitting the import.
Sends a POST request to /v1/wallets/import/init
Sourcepub async fn wallet_import_submit<'a>(
&'a self,
body: &'a WalletImportSubmissionRequest,
) -> Result<ResponseValue<Wallet>, Error<()>>
pub async fn wallet_import_submit<'a>( &'a self, body: &'a WalletImportSubmissionRequest, ) -> Result<ResponseValue<Wallet>, Error<()>>
Submit import
Submit a wallet import request.
Sends a POST request to /v1/wallets/import/submit
Sourcepub async fn wallet_export<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
body: &'a WalletExportRequestBody,
) -> Result<ResponseValue<WalletExportResponseBody>, Error<()>>
pub async fn wallet_export<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, body: &'a WalletExportRequestBody, ) -> Result<ResponseValue<WalletExportResponseBody>, Error<()>>
Export wallet
Export a wallet’s private key
Sends a POST request to /v1/wallets/{wallet_id}/export
Sourcepub async fn get_users<'a>(
&'a self,
cursor: Option<&'a GetUsersCursor>,
limit: Option<f64>,
) -> Result<ResponseValue<GetUsersResponse>, Error<()>>
pub async fn get_users<'a>( &'a self, cursor: Option<&'a GetUsersCursor>, limit: Option<f64>, ) -> Result<ResponseValue<GetUsersResponse>, Error<()>>
Gets Users
Get all users in your app.
Sends a GET request to /v1/users
Sourcepub async fn create_user<'a>(
&'a self,
body: &'a CreateUserBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn create_user<'a>( &'a self, body: &'a CreateUserBody, ) -> Result<ResponseValue<User>, Error<()>>
Create User
Create a new user with linked accounts. Optionally pre-generate embedded wallets for the user.
Sends a POST request to /v1/users
Sourcepub async fn get_user<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn get_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<User>, Error<()>>
Get User
Get a user by user ID.
Sends a GET request to /v1/users/{user_id}
Sourcepub async fn delete_user<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<()>, Error<ByteStream>>
pub async fn delete_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<()>, Error<ByteStream>>
Delete User
Delete a user by user ID.
Sends a DELETE request to /v1/users/{user_id}
Sourcepub async fn update_user_custom_metadata<'a>(
&'a self,
user_id: &'a str,
body: &'a UpdateUserCustomMetadataBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn update_user_custom_metadata<'a>( &'a self, user_id: &'a str, body: &'a UpdateUserCustomMetadataBody, ) -> Result<ResponseValue<User>, Error<()>>
Create Custom Metadata
Adds custom metadata to a user by user ID.
Sends a POST request to /v1/users/{user_id}/custom_metadata
Sourcepub async fn look_up_user_by_email<'a>(
&'a self,
body: &'a LookUpUserByEmailBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_email<'a>( &'a self, body: &'a LookUpUserByEmailBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Email Address
Looks up a user by their email address.
Sends a POST request to /v1/users/email/address
Sourcepub async fn look_up_user_by_custom_auth_id<'a>(
&'a self,
body: &'a LookUpUserByCustomAuthIdBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_custom_auth_id<'a>( &'a self, body: &'a LookUpUserByCustomAuthIdBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Custom Auth ID
Looks up a user by their custom auth ID.
Sends a POST request to /v1/users/custom_auth/id
Sourcepub async fn look_up_user_by_wallet_address<'a>(
&'a self,
body: &'a LookUpUserByWalletAddressBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_wallet_address<'a>( &'a self, body: &'a LookUpUserByWalletAddressBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by wallet address
Looks up a user by their wallet address.
Sends a POST request to /v1/users/wallet/address
Sourcepub async fn look_up_user_by_farcaster_id<'a>(
&'a self,
body: &'a LookUpUserByFarcasterIdBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_farcaster_id<'a>( &'a self, body: &'a LookUpUserByFarcasterIdBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Farcaster ID
Looks up a user by their Farcaster ID.
Sends a POST request to /v1/users/farcaster/fid
Sourcepub async fn look_up_user_by_phone_number<'a>(
&'a self,
body: &'a LookUpUserByPhoneNumberBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_phone_number<'a>( &'a self, body: &'a LookUpUserByPhoneNumberBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Phone Number
Looks up a user by their phone number.
Sends a POST request to /v1/users/phone/number
Sourcepub async fn look_up_user_by_smart_wallet_address<'a>(
&'a self,
body: &'a LookUpUserBySmartWalletAddressBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_smart_wallet_address<'a>( &'a self, body: &'a LookUpUserBySmartWalletAddressBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Smart Wallet Address
Looks up a user by their smart wallet address.
Sends a POST request to /v1/users/smart_wallet/address
Sourcepub async fn look_up_user_by_discord_username<'a>(
&'a self,
body: &'a LookUpUserByDiscordUsernameBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_discord_username<'a>( &'a self, body: &'a LookUpUserByDiscordUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Discord Username
Looks up a user by their Discord username.
Sends a POST request to /v1/users/discord/username
Sourcepub async fn look_up_user_by_github_username<'a>(
&'a self,
body: &'a LookUpUserByGithubUsernameBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_github_username<'a>( &'a self, body: &'a LookUpUserByGithubUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Github Username
Looks up a user by their Github username.
Sends a POST request to /v1/users/github/username
Sourcepub async fn look_up_user_by_twitter_username<'a>(
&'a self,
body: &'a LookUpUserByTwitterUsernameBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_twitter_username<'a>( &'a self, body: &'a LookUpUserByTwitterUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Twitter Username
Looks up a user by their Twitter username.
Sends a POST request to /v1/users/twitter/username
Sourcepub async fn look_up_user_by_twitter_subject<'a>(
&'a self,
body: &'a LookUpUserByTwitterSubjectBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_twitter_subject<'a>( &'a self, body: &'a LookUpUserByTwitterSubjectBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Twitter Subject
Looks up a user by their Twitter subject.
Sends a POST request to /v1/users/twitter/subject
Sourcepub async fn look_up_user_by_telegram_user_id<'a>(
&'a self,
body: &'a LookUpUserByTelegramUserIdBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_telegram_user_id<'a>( &'a self, body: &'a LookUpUserByTelegramUserIdBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Telegram User ID
Looks up a user by their Telegram user ID.
Sends a POST request to /v1/users/telegram/telegram_user_id
Sourcepub async fn look_up_user_by_telegram_username<'a>(
&'a self,
body: &'a LookUpUserByTelegramUsernameBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn look_up_user_by_telegram_username<'a>( &'a self, body: &'a LookUpUserByTelegramUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Telegram Username
Looks up a user by their Telegram username.
Sends a POST request to /v1/users/telegram/username
Sourcepub async fn search_users<'a>(
&'a self,
body: &'a SearchUsersBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn search_users<'a>( &'a self, body: &'a SearchUsersBody, ) -> Result<ResponseValue<User>, Error<()>>
Search Users by Search Term
Search users by search term, emails, phone numbers, or wallet addresses.
Sends a POST request to /v1/users/search
Sourcepub async fn create_user_wallet<'a>(
&'a self,
user_id: &'a str,
body: &'a CreateUserWalletBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn create_user_wallet<'a>( &'a self, user_id: &'a str, body: &'a CreateUserWalletBody, ) -> Result<ResponseValue<User>, Error<()>>
Create Embedded Wallet
Creates an embedded wallet for an existing user.
Sends a POST request to /v1/users/{user_id}/wallets
Sourcepub async fn add_or_update_user_linked_account<'a>(
&'a self,
user_id: &'a str,
body: &'a LinkedAccountInput,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn add_or_update_user_linked_account<'a>( &'a self, user_id: &'a str, body: &'a LinkedAccountInput, ) -> Result<ResponseValue<User>, Error<()>>
Add or update a user linked account
Adds or updates a linked account for a user. This endpoint is not yet available to all users.
Sends a POST request to /v1/users/{user_id}/accounts
Sourcepub async fn unlink_user_linked_account<'a>(
&'a self,
user_id: &'a str,
body: &'a UnlinkUserLinkedAccountBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn unlink_user_linked_account<'a>( &'a self, user_id: &'a str, body: &'a UnlinkUserLinkedAccountBody, ) -> Result<ResponseValue<User>, Error<()>>
Unlink a user linked account
Unlinks a user linked account.
Sends a POST request to /v1/users/{user_id}/accounts/unlink
Sourcepub async fn create_policy<'a>(
&'a self,
privy_idempotency_key: Option<&'a str>,
body: &'a CreatePolicyBody,
) -> Result<ResponseValue<Policy>, Error<()>>
pub async fn create_policy<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a CreatePolicyBody, ) -> Result<ResponseValue<Policy>, Error<()>>
Create Policy
Create a new policy.
Sends a POST request to /v1/policies
Sourcepub async fn get_policy<'a>(
&'a self,
policy_id: &'a GetPolicyPolicyId,
) -> Result<ResponseValue<Policy>, Error<()>>
pub async fn get_policy<'a>( &'a self, policy_id: &'a GetPolicyPolicyId, ) -> Result<ResponseValue<Policy>, Error<()>>
Get Policy
Get a policy by policy ID.
Sends a GET request to /v1/policies/{policy_id}
Sourcepub async fn delete_policy<'a>(
&'a self,
policy_id: &'a DeletePolicyPolicyId,
privy_authorization_signature: Option<&'a str>,
) -> Result<ResponseValue<DeletePolicyResponse>, Error<()>>
pub async fn delete_policy<'a>( &'a self, policy_id: &'a DeletePolicyPolicyId, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeletePolicyResponse>, Error<()>>
Delete Policy
Delete a policy by policy ID.
Sends a DELETE request to /v1/policies/{policy_id}
Sourcepub async fn update_policy<'a>(
&'a self,
policy_id: &'a UpdatePolicyPolicyId,
privy_authorization_signature: Option<&'a str>,
body: &'a UpdatePolicyBody,
) -> Result<ResponseValue<Policy>, Error<()>>
pub async fn update_policy<'a>( &'a self, policy_id: &'a UpdatePolicyPolicyId, privy_authorization_signature: Option<&'a str>, body: &'a UpdatePolicyBody, ) -> Result<ResponseValue<Policy>, Error<()>>
Update Policy
Update a policy by policy ID.
Sends a PATCH request to /v1/policies/{policy_id}
Sourcepub async fn create_policy_rule<'a>(
&'a self,
policy_id: &'a CreatePolicyRulePolicyId,
privy_authorization_signature: Option<&'a str>,
body: &'a PolicyRuleRequestBody,
) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>
pub async fn create_policy_rule<'a>( &'a self, policy_id: &'a CreatePolicyRulePolicyId, privy_authorization_signature: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>
Create Policy Rule
Create a new rule for a policy.
Sends a POST request to /v1/policies/{policy_id}/rules
Sourcepub async fn get_policy_rule<'a>(
&'a self,
policy_id: &'a GetPolicyRulePolicyId,
rule_id: &'a GetPolicyRuleRuleId,
) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>
pub async fn get_policy_rule<'a>( &'a self, policy_id: &'a GetPolicyRulePolicyId, rule_id: &'a GetPolicyRuleRuleId, ) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>
Get Policy Rule
Get a rule by policy ID and rule ID.
Sends a GET request to /v1/policies/{policy_id}/rules/{rule_id}
Sourcepub async fn delete_policy_rule<'a>(
&'a self,
policy_id: &'a DeletePolicyRulePolicyId,
rule_id: &'a DeletePolicyRuleRuleId,
privy_authorization_signature: Option<&'a str>,
) -> Result<ResponseValue<DeletePolicyRuleResponse>, Error<()>>
pub async fn delete_policy_rule<'a>( &'a self, policy_id: &'a DeletePolicyRulePolicyId, rule_id: &'a DeletePolicyRuleRuleId, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeletePolicyRuleResponse>, Error<()>>
Delete Policy Rule
Delete a rule by policy ID and rule ID.
Sends a DELETE request to /v1/policies/{policy_id}/rules/{rule_id}
Sourcepub async fn update_policy_rule<'a>(
&'a self,
policy_id: &'a UpdatePolicyRulePolicyId,
rule_id: &'a UpdatePolicyRuleRuleId,
privy_authorization_signature: Option<&'a str>,
body: &'a PolicyRuleRequestBody,
) -> Result<ResponseValue<UpdatePolicyRuleResponse>, Error<()>>
pub async fn update_policy_rule<'a>( &'a self, policy_id: &'a UpdatePolicyRulePolicyId, rule_id: &'a UpdatePolicyRuleRuleId, privy_authorization_signature: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<UpdatePolicyRuleResponse>, Error<()>>
Update Policy Rule
Update a rule by policy ID and rule ID.
Sends a PATCH request to /v1/policies/{policy_id}/rules/{rule_id}
Sourcepub async fn init_passkey_authentication<'a>(
&'a self,
body: &'a AuthPasskeyInitRequestBody,
) -> Result<ResponseValue<AuthPasskeyAuthenticationInitResponseBody>, Error<()>>
pub async fn init_passkey_authentication<'a>( &'a self, body: &'a AuthPasskeyInitRequestBody, ) -> Result<ResponseValue<AuthPasskeyAuthenticationInitResponseBody>, Error<()>>
Initiate Passkey Authentication
Request a passkey authentication challenge.
Sends a POST request to /v1/user-accounts/passkeys/authenticate/init
Sourcepub async fn authenticate_with_passkey<'a>(
&'a self,
body: &'a AuthPasskeyAuthenticationRequestBody,
) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>
pub async fn authenticate_with_passkey<'a>( &'a self, body: &'a AuthPasskeyAuthenticationRequestBody, ) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>
Authenticate With Passkey
Authenticate a user account with a passkey.
Sends a POST request to /v1/user-accounts/passkeys/authenticate
Sourcepub async fn init_passkey_registration<'a>(
&'a self,
body: &'a AuthPasskeyInitRequestBody,
) -> Result<ResponseValue<AuthPasskeyRegistrationInitResponseBody>, Error<()>>
pub async fn init_passkey_registration<'a>( &'a self, body: &'a AuthPasskeyInitRequestBody, ) -> Result<ResponseValue<AuthPasskeyRegistrationInitResponseBody>, Error<()>>
Initiate Passkey Registration
Request a passkey registration challenge
Sends a POST request to /v1/user-accounts/passkeys/register/init
Sourcepub async fn register_with_passkey<'a>(
&'a self,
body: &'a AuthPasskeyRegistrationRequestBody,
) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>
pub async fn register_with_passkey<'a>( &'a self, body: &'a AuthPasskeyRegistrationRequestBody, ) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>
Register With Passkey
Register a new user account with a passkey.
Sends a POST request to /v1/user-accounts/passkeys/register
Sourcepub async fn init_passkey_link<'a>(
&'a self,
body: &'a AuthPasskeyLinkInitRequestBody,
) -> Result<ResponseValue<AuthPasskeyRegistrationInitResponseBody>, Error<()>>
pub async fn init_passkey_link<'a>( &'a self, body: &'a AuthPasskeyLinkInitRequestBody, ) -> Result<ResponseValue<AuthPasskeyRegistrationInitResponseBody>, Error<()>>
Initiate Passkey Link
Request a passkey registration challenge linked to a user account.
Sends a POST request to /v1/user-accounts/passkeys/link/init
Sourcepub async fn link_passkey<'a>(
&'a self,
body: &'a AuthPasskeyLinkedRegistrationRequestBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn link_passkey<'a>( &'a self, body: &'a AuthPasskeyLinkedRegistrationRequestBody, ) -> Result<ResponseValue<User>, Error<()>>
Link Passkey
Link a passkey to an existing user account.
Sends a POST request to /v1/user-accounts/passkeys/link
Sourcepub async fn unlink_passkey<'a>(
&'a self,
body: &'a AuthPasskeyUnlinkRequestBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn unlink_passkey<'a>( &'a self, body: &'a AuthPasskeyUnlinkRequestBody, ) -> Result<ResponseValue<User>, Error<()>>
Unlink Passkey
Unlink a passkey from a user account.
Sends a POST request to /v1/user-accounts/passkeys/unlink
Sourcepub async fn send_code_to_email<'a>(
&'a self,
body: &'a SendCodeToEmailRequestBody,
) -> Result<ResponseValue<SendCodeToEmailResponseBody>, Error<()>>
pub async fn send_code_to_email<'a>( &'a self, body: &'a SendCodeToEmailRequestBody, ) -> Result<ResponseValue<SendCodeToEmailResponseBody>, Error<()>>
Initiate Passwordless Authentication
Request a one time code to be sent to the user’s email.
Sends a POST request to /v1/user-accounts/passwordless/init
Sourcepub async fn authenticate_with_email<'a>(
&'a self,
body: &'a AuthenticateWithEmailRequestBody,
) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>
pub async fn authenticate_with_email<'a>( &'a self, body: &'a AuthenticateWithEmailRequestBody, ) -> Result<ResponseValue<AuthenticatedUser>, Error<()>>
Authenticate With Passwordless
Authenticate a user account with an email and code.
Sends a POST request to /v1/user-accounts/passwordless/authenticate
Sourcepub async fn link_email<'a>(
&'a self,
body: &'a LinkEmailRequestBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn link_email<'a>( &'a self, body: &'a LinkEmailRequestBody, ) -> Result<ResponseValue<User>, Error<()>>
Link Passwordless
Link an email to an existing user account.
Sends a POST request to /v1/user-accounts/passwordless/link
Sourcepub async fn unlink_email<'a>(
&'a self,
body: &'a UnlinkEmailRequestBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn unlink_email<'a>( &'a self, body: &'a UnlinkEmailRequestBody, ) -> Result<ResponseValue<User>, Error<()>>
Unlink Passwordless
Unlink an email from a user account.
Sends a POST request to /v1/user-accounts/passwordless/unlink
Sourcepub async fn update_email<'a>(
&'a self,
body: &'a UpdateEmailRequestBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn update_email<'a>( &'a self, body: &'a UpdateEmailRequestBody, ) -> Result<ResponseValue<User>, Error<()>>
Update Passwordless
Update a user’s linked email account.
Sends a POST request to /v1/user-accounts/passwordless/update
Sourcepub async fn get_transaction<'a>(
&'a self,
transaction_id: &'a str,
) -> Result<ResponseValue<Transaction>, Error<()>>
pub async fn get_transaction<'a>( &'a self, transaction_id: &'a str, ) -> Result<ResponseValue<Transaction>, Error<()>>
Get Transaction
Get a transaction by transaction ID.
Sends a GET request to /v1/transactions/{transaction_id}
Sourcepub async fn get_key_quorum<'a>(
&'a self,
key_quorum_id: &'a str,
) -> Result<ResponseValue<KeyQuorum>, Error<()>>
pub async fn get_key_quorum<'a>( &'a self, key_quorum_id: &'a str, ) -> Result<ResponseValue<KeyQuorum>, Error<()>>
Get key quorum
Get a key quorum by ID.
Sends a GET request to /v1/key_quorums/{key_quorum_id}
Sourcepub async fn delete_key_quorum<'a>(
&'a self,
key_quorum_id: &'a str,
privy_authorization_signature: Option<&'a str>,
) -> Result<ResponseValue<DeleteKeyQuorumResponse>, Error<()>>
pub async fn delete_key_quorum<'a>( &'a self, key_quorum_id: &'a str, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeleteKeyQuorumResponse>, Error<()>>
Delete key quorum
Delete a key quorum by key quorum ID.
Sends a DELETE request to /v1/key_quorums/{key_quorum_id}
Sourcepub async fn update_key_quorum<'a>(
&'a self,
key_quorum_id: &'a str,
privy_authorization_signature: Option<&'a str>,
body: &'a UpdateKeyQuorumBody,
) -> Result<ResponseValue<KeyQuorum>, Error<()>>
pub async fn update_key_quorum<'a>( &'a self, key_quorum_id: &'a str, privy_authorization_signature: Option<&'a str>, body: &'a UpdateKeyQuorumBody, ) -> Result<ResponseValue<KeyQuorum>, Error<()>>
Update key quorum
Update a key quorum by key quorum ID.
Sends a PATCH request to /v1/key_quorums/{key_quorum_id}
Sourcepub async fn create_key_quorum<'a>(
&'a self,
body: &'a CreateKeyQuorumBody,
) -> Result<ResponseValue<KeyQuorum>, Error<()>>
pub async fn create_key_quorum<'a>( &'a self, body: &'a CreateKeyQuorumBody, ) -> Result<ResponseValue<KeyQuorum>, Error<()>>
Create key quorum
Create a new key quorum.
Sends a POST request to /v1/key_quorums
Sourcepub async fn user_fiat_statuses<'a>(
&'a self,
user_id: &'a str,
body: &'a UserFiatStatusesBody,
) -> Result<ResponseValue<UserFiatStatusesResponse>, Error<()>>
pub async fn user_fiat_statuses<'a>( &'a self, user_id: &'a str, body: &'a UserFiatStatusesBody, ) -> Result<ResponseValue<UserFiatStatusesResponse>, Error<()>>
Get a list of fiat transactions and their statuses
Returns a list of fiat transactions and their statuses
Sends a POST request to /v1/users/{user_id}/fiat/status
Sourcepub async fn create_user_fiat_tos<'a>(
&'a self,
user_id: &'a str,
body: &'a CreateUserFiatTosBody,
) -> Result<ResponseValue<CreateUserFiatTosResponse>, Error<()>>
pub async fn create_user_fiat_tos<'a>( &'a self, user_id: &'a str, body: &'a CreateUserFiatTosBody, ) -> Result<ResponseValue<CreateUserFiatTosResponse>, Error<()>>
Create a terms of service agreement for a user
Creates a terms of service agreement for a user
Sends a POST request to /v1/users/{user_id}/fiat/tos
Sourcepub async fn get_user_fiat_kyc_status<'a>(
&'a self,
user_id: &'a str,
provider: GetUserFiatKycStatusProvider,
) -> Result<ResponseValue<GetUserFiatKycStatusResponse>, Error<()>>
pub async fn get_user_fiat_kyc_status<'a>( &'a self, user_id: &'a str, provider: GetUserFiatKycStatusProvider, ) -> Result<ResponseValue<GetUserFiatKycStatusResponse>, Error<()>>
Get KYC status for a user
Get the current KYC verification status for a user from the configured provider
Sends a GET request to /v1/users/{user_id}/fiat/kyc
Sourcepub async fn initiate_user_fiat_kyc<'a>(
&'a self,
user_id: &'a str,
body: &'a InitiateUserFiatKycBody,
) -> Result<ResponseValue<InitiateUserFiatKycResponse>, Error<()>>
pub async fn initiate_user_fiat_kyc<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatKycBody, ) -> Result<ResponseValue<InitiateUserFiatKycResponse>, Error<()>>
Initiate KYC verification for a user
Initiates KYC verification process for a user with the configured provider
Sends a POST request to /v1/users/{user_id}/fiat/kyc
Sourcepub async fn update_user_fiat_kyc_status<'a>(
&'a self,
user_id: &'a str,
body: &'a UpdateUserFiatKycStatusBody,
) -> Result<ResponseValue<UpdateUserFiatKycStatusResponse>, Error<()>>
pub async fn update_user_fiat_kyc_status<'a>( &'a self, user_id: &'a str, body: &'a UpdateUserFiatKycStatusBody, ) -> Result<ResponseValue<UpdateUserFiatKycStatusResponse>, Error<()>>
Update KYC status for a user
Update the KYC verification status for a user from the configured provider
Sends a PATCH request to /v1/users/{user_id}/fiat/kyc
Sourcepub async fn get_user_fiat_kyc_link<'a>(
&'a self,
user_id: &'a str,
body: &'a GetUserFiatKycLinkBody,
) -> Result<ResponseValue<GetUserFiatKycLinkResponse>, Error<()>>
pub async fn get_user_fiat_kyc_link<'a>( &'a self, user_id: &'a str, body: &'a GetUserFiatKycLinkBody, ) -> Result<ResponseValue<GetUserFiatKycLinkResponse>, Error<()>>
Get a KYC link for a user
Returns a KYC link for a user
Sends a POST request to /v1/users/{user_id}/fiat/kyc_link
Sourcepub async fn get_user_fiat_accounts<'a>(
&'a self,
user_id: &'a str,
provider: GetUserFiatAccountsProvider,
) -> Result<ResponseValue<GetUserFiatAccountsResponse>, Error<()>>
pub async fn get_user_fiat_accounts<'a>( &'a self, user_id: &'a str, provider: GetUserFiatAccountsProvider, ) -> Result<ResponseValue<GetUserFiatAccountsResponse>, Error<()>>
Get user’s fiat accounts
Returns the IDs of all external fiat accounts (used for offramping) for the user
Sends a GET request to /v1/users/{user_id}/fiat/accounts
Sourcepub async fn create_user_fiat_account<'a>(
&'a self,
user_id: &'a str,
body: &'a CreateUserFiatAccountBody,
) -> Result<ResponseValue<CreateUserFiatAccountResponse>, Error<()>>
pub async fn create_user_fiat_account<'a>( &'a self, user_id: &'a str, body: &'a CreateUserFiatAccountBody, ) -> Result<ResponseValue<CreateUserFiatAccountResponse>, Error<()>>
Create a fiat account
Sets up external bank account object for the user through the configured default provider. Requires the user to already be KYC’ed.
Sends a POST request to /v1/users/{user_id}/fiat/accounts
Sourcepub async fn initiate_user_fiat_offramp<'a>(
&'a self,
user_id: &'a str,
body: &'a InitiateUserFiatOfframpBody,
) -> Result<ResponseValue<InitiateUserFiatOfframpResponse>, Error<()>>
pub async fn initiate_user_fiat_offramp<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatOfframpBody, ) -> Result<ResponseValue<InitiateUserFiatOfframpResponse>, Error<()>>
Initiate an offramp transaction
Triggers the offramp flow and gets the on-chain address to send funds to
Sends a POST request to /v1/users/{user_id}/fiat/offramp
Sourcepub async fn initiate_user_fiat_onramp<'a>(
&'a self,
user_id: &'a str,
body: &'a InitiateUserFiatOnrampBody,
) -> Result<ResponseValue<InitiateUserFiatOnrampResponse>, Error<()>>
pub async fn initiate_user_fiat_onramp<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatOnrampBody, ) -> Result<ResponseValue<InitiateUserFiatOnrampResponse>, Error<()>>
Initiate an onramp transaction
Triggers an onramp to the specified recipient blockchain address, returns the bank deposit instructions
Sends a POST request to /v1/users/{user_id}/fiat/onramp
Sourcepub async fn configure_app_for_fiat_on_off_ramping<'a>(
&'a self,
app_id: &'a str,
body: &'a ConfigureAppForFiatOnOffRampingBody,
) -> Result<ResponseValue<ConfigureAppForFiatOnOffRampingResponse>, Error<()>>
pub async fn configure_app_for_fiat_on_off_ramping<'a>( &'a self, app_id: &'a str, body: &'a ConfigureAppForFiatOnOffRampingBody, ) -> Result<ResponseValue<ConfigureAppForFiatOnOffRampingResponse>, Error<()>>
Configure app for fiat onramping and offramping
Updates the app configuration for the specified onramp provider. This is used to set up the app for fiat onramping and offramping.
Sends a POST request to /v1/apps/{app_id}/fiat