pub struct Client { /* private fields */ }Expand description
Client for Privy API
REST API for Privy’s wallet infrastructure — provision and manage wallets across EVM, Solana, and Bitcoin, authenticate users, sign transactions, and configure programmable policies and authorization intents.
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,
authorization_key: Option<&'a GetWalletsAuthorizationKey>,
chain_type: Option<WalletChainType>,
cursor: Option<&'a GetWalletsCursor>,
external_id: Option<&'a str>,
limit: Option<f64>,
user_id: Option<&'a str>,
) -> Result<ResponseValue<GetWalletsResponse>, Error<()>>
pub async fn get_wallets<'a>( &'a self, authorization_key: Option<&'a GetWalletsAuthorizationKey>, chain_type: Option<WalletChainType>, cursor: Option<&'a GetWalletsCursor>, external_id: Option<&'a str>, 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
Creates a new wallet on the requested chain and for the requested owner.
Sends a POST request to /v1/wallets
Sourcepub async fn create_wallets_batch<'a>(
&'a self,
body: &'a WalletBatchCreateInput,
) -> Result<ResponseValue<WalletBatchCreateResponse>, Error<()>>
pub async fn create_wallets_batch<'a>( &'a self, body: &'a WalletBatchCreateInput, ) -> Result<ResponseValue<WalletBatchCreateResponse>, Error<()>>
Create wallets in batch
Creates multiple wallets in a single request. Each wallet creation is independent; failures for one wallet do not affect others. Maximum batch size is 100 wallets.
Sends a POST request to /v1/wallets/batch
Sourcepub async fn get_custodial_wallets<'a>(
&'a self,
privy_idempotency_key: Option<&'a str>,
body: &'a CustodialWalletCreateInput,
) -> Result<ResponseValue<CustodialWallet>, Error<()>>
pub async fn get_custodial_wallets<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a CustodialWalletCreateInput, ) -> Result<ResponseValue<CustodialWallet>, Error<()>>
Create custodial wallet
Create a new wallet custodied by a third-party provider.
Sends a POST request to /v1/custodial_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>,
privy_request_expiry: Option<&'a str>,
body: &'a WalletRpcRequestBody,
) -> 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>, privy_request_expiry: Option<&'a str>, body: &'a WalletRpcRequestBody, ) -> 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>,
privy_request_expiry: Option<&'a str>,
body: &'a WalletUpdateRequestBody,
) -> Result<ResponseValue<Wallet>, Error<()>>
pub async fn update_wallet<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a WalletUpdateRequestBody, ) -> 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>,
privy_request_expiry: Option<&'a str>,
body: &'a RawSignInput,
) -> 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>, privy_request_expiry: Option<&'a str>, body: &'a RawSignInput, ) -> 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: Option<&'a GetWalletBalanceAsset>,
chain: Option<&'a GetWalletBalanceChain>,
include_currency: Option<GetWalletBalanceIncludeCurrency>,
token: Option<&'a GetWalletBalanceToken>,
) -> Result<ResponseValue<GetWalletBalanceResponse>, Error<()>>
pub async fn get_wallet_balance<'a>( &'a self, wallet_id: &'a str, asset: Option<&'a GetWalletBalanceAsset>, chain: Option<&'a GetWalletBalanceChain>, include_currency: Option<GetWalletBalanceIncludeCurrency>, token: Option<&'a GetWalletBalanceToken>, ) -> 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: Option<&'a WalletTransactionsAsset>,
chain: WalletTransactionsChain,
cursor: Option<&'a WalletTransactionsCursor>,
limit: Option<f64>,
token: Option<&'a WalletTransactionsToken>,
tx_hash: Option<&'a str>,
) -> Result<ResponseValue<WalletTransactionsResponse>, Error<()>>
pub async fn wallet_transactions<'a>( &'a self, wallet_id: &'a str, asset: Option<&'a WalletTransactionsAsset>, chain: WalletTransactionsChain, cursor: Option<&'a WalletTransactionsCursor>, limit: Option<f64>, token: Option<&'a WalletTransactionsToken>, tx_hash: Option<&'a str>, ) -> 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 WalletAuthenticateRequestBody,
) -> Result<ResponseValue<WalletAuthenticateWithJwtResponse>, Error<()>>
pub async fn authenticate<'a>( &'a self, body: &'a WalletAuthenticateRequestBody, ) -> Result<ResponseValue<WalletAuthenticateWithJwtResponse>, Error<()>>
Authenticate wallet session
Exchange a user JWT for a session key authorized to act on the user’s wallets. Returns the encrypted authorization key and the list of wallets it can access.
Sends a POST request to /v1/wallets/authenticate
Sourcepub async fn authenticate_intents<'a>(
&'a self,
body: &'a WalletAuthenticateBoundRequestBody,
) -> Result<ResponseValue<WalletAuthenticateIntentsResponse>, Error<()>>
pub async fn authenticate_intents<'a>( &'a self, body: &'a WalletAuthenticateBoundRequestBody, ) -> Result<ResponseValue<WalletAuthenticateIntentsResponse>, Error<()>>
Authenticate wallet session scoped to intents
Exchange a user JWT for a session key scoped to specific intents. The returned USK can only authorize the bound intents and cannot sign other RPC requests.
Sends a POST request to /v1/wallets/authenticate/intents
Sourcepub async fn wallet_import_init<'a>(
&'a self,
body: &'a WalletImportInitBody,
) -> Result<ResponseValue<WalletImportInitializationResponse>, Error<()>>
pub async fn wallet_import_init<'a>( &'a self, body: &'a WalletImportInitBody, ) -> 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 export_wallet<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a WalletExportRequestBody,
) -> Result<ResponseValue<WalletExportResponseBody>, Error<()>>
pub async fn export_wallet<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_request_expiry: 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_wallet_by_address<'a>(
&'a self,
body: &'a GetByWalletAddressRequestBody,
) -> Result<ResponseValue<Wallet>, Error<()>>
pub async fn get_wallet_by_address<'a>( &'a self, body: &'a GetByWalletAddressRequestBody, ) -> Result<ResponseValue<Wallet>, Error<()>>
Get wallet by address
Look up a wallet by its blockchain address. Returns the wallet object if found.
Sends a POST request to /v1/wallets/address
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<()>>
pub async fn delete_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<()>, Error<()>>
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 patch_user_custom_metadata<'a>(
&'a self,
user_id: &'a str,
body: &'a PatchUsersCustomMetadata,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn patch_user_custom_metadata<'a>( &'a self, user_id: &'a str, body: &'a PatchUsersCustomMetadata, ) -> Result<ResponseValue<User>, Error<()>>
Update Custom Metadata
Partially updates custom metadata for a user by user ID. Only top-level keys provided in the request are updated; unspecified keys are preserved.
Sends a PATCH 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 update_user_instagram_username<'a>(
&'a self,
body: &'a UpdateUserInstagramUsernameBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn update_user_instagram_username<'a>( &'a self, body: &'a UpdateUserInstagramUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Instagram Username
Looks up a user by their Instagram username.
Sends a POST request to /v1/users/instagram/username
Sourcepub async fn update_user_twitch_username<'a>(
&'a self,
body: &'a UpdateUserTwitchUsernameBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn update_user_twitch_username<'a>( &'a self, body: &'a UpdateUserTwitchUsernameBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Twitch Username
Looks up a user by their Twitch username.
Sends a POST request to /v1/users/twitch/username
Sourcepub async fn update_user_spotify_subject<'a>(
&'a self,
body: &'a UpdateUserSpotifySubjectBody,
) -> Result<ResponseValue<User>, Error<()>>
pub async fn update_user_spotify_subject<'a>( &'a self, body: &'a UpdateUserSpotifySubjectBody, ) -> Result<ResponseValue<User>, Error<()>>
Lookup User by Spotify Subject
Looks up a user by their Spotify subject (user ID).
Sends a POST request to /v1/users/spotify/subject
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>,
privy_request_expiry: Option<&'a str>,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn delete_policy<'a>( &'a self, policy_id: &'a DeletePolicyPolicyId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, ) -> Result<ResponseValue<SuccessResponse>, 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>,
privy_request_expiry: 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>, privy_request_expiry: 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_rule<'a>(
&'a self,
policy_id: &'a CreateRulePolicyId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a PolicyRuleRequestBody,
) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>
pub async fn create_rule<'a>( &'a self, policy_id: &'a CreateRulePolicyId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: 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_rule<'a>(
&'a self,
policy_id: &'a GetRulePolicyId,
rule_id: &'a GetRuleRuleId,
) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>
pub async fn get_rule<'a>( &'a self, policy_id: &'a GetRulePolicyId, rule_id: &'a GetRuleRuleId, ) -> 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_rule<'a>(
&'a self,
policy_id: &'a DeleteRulePolicyId,
rule_id: &'a DeleteRuleRuleId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn delete_rule<'a>( &'a self, policy_id: &'a DeleteRulePolicyId, rule_id: &'a DeleteRuleRuleId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, ) -> Result<ResponseValue<SuccessResponse>, 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_rule<'a>(
&'a self,
policy_id: &'a UpdateRulePolicyId,
rule_id: &'a UpdateRuleRuleId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a PolicyRuleRequestBody,
) -> Result<ResponseValue<PolicyRuleResponse>, Error<()>>
pub async fn update_rule<'a>( &'a self, policy_id: &'a UpdateRulePolicyId, rule_id: &'a UpdateRuleRuleId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<PolicyRuleResponse>, 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 create_condition_set<'a>(
&'a self,
body: &'a ConditionSetRequestBody,
) -> Result<ResponseValue<ConditionSet>, Error<()>>
pub async fn create_condition_set<'a>( &'a self, body: &'a ConditionSetRequestBody, ) -> Result<ResponseValue<ConditionSet>, Error<()>>
Create Condition Set
Create a new condition set. You must provide either “owner” or “owner_id” (but not both) to specify ownership.
Sends a POST request to /v1/condition_sets
Sourcepub async fn get_condition_set<'a>(
&'a self,
condition_set_id: &'a GetConditionSetConditionSetId,
) -> Result<ResponseValue<ConditionSet>, Error<()>>
pub async fn get_condition_set<'a>( &'a self, condition_set_id: &'a GetConditionSetConditionSetId, ) -> Result<ResponseValue<ConditionSet>, Error<()>>
Get Condition Set
Get a condition set by condition set ID.
Sends a GET request to /v1/condition_sets/{condition_set_id}
Sourcepub async fn delete_condition_set<'a>(
&'a self,
condition_set_id: &'a DeleteConditionSetConditionSetId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn delete_condition_set<'a>( &'a self, condition_set_id: &'a DeleteConditionSetConditionSetId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, ) -> Result<ResponseValue<SuccessResponse>, Error<()>>
Delete Condition Set
Delete a condition set by condition set ID.
Sends a DELETE request to /v1/condition_sets/{condition_set_id}
Sourcepub async fn update_condition_set<'a>(
&'a self,
condition_set_id: &'a UpdateConditionSetConditionSetId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a UpdateConditionSetRequestBody,
) -> Result<ResponseValue<ConditionSet>, Error<()>>
pub async fn update_condition_set<'a>( &'a self, condition_set_id: &'a UpdateConditionSetConditionSetId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a UpdateConditionSetRequestBody, ) -> Result<ResponseValue<ConditionSet>, Error<()>>
Update Condition Set
Update a condition set by condition set ID.
Sends a PATCH request to /v1/condition_sets/{condition_set_id}
Sourcepub async fn get_condition_set_items<'a>(
&'a self,
condition_set_id: &'a GetConditionSetItemsConditionSetId,
cursor: Option<&'a GetConditionSetItemsCursor>,
limit: Option<f64>,
query: Option<&'a str>,
) -> Result<ResponseValue<ConditionSetItemsResponse>, Error<()>>
pub async fn get_condition_set_items<'a>( &'a self, condition_set_id: &'a GetConditionSetItemsConditionSetId, cursor: Option<&'a GetConditionSetItemsCursor>, limit: Option<f64>, query: Option<&'a str>, ) -> Result<ResponseValue<ConditionSetItemsResponse>, Error<()>>
Get Condition Set Items
Get all items in a condition set with pagination support.
Sends a GET request to
/v1/condition_sets/{condition_set_id}/condition_set_items
Sourcepub async fn update_condition_set_items<'a>(
&'a self,
condition_set_id: &'a UpdateConditionSetItemsConditionSetId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a ConditionSetItemsRequestBody,
) -> Result<ResponseValue<ConditionSetItems>, Error<()>>
pub async fn update_condition_set_items<'a>( &'a self, condition_set_id: &'a UpdateConditionSetItemsConditionSetId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a ConditionSetItemsRequestBody, ) -> Result<ResponseValue<ConditionSetItems>, Error<()>>
Create Condition Set Items
Replace all items in a condition set by condition set ID. Can add up to 100 items at once.
Sends a PUT request to
/v1/condition_sets/{condition_set_id}/condition_set_items
Sourcepub async fn create_condition_set_items<'a>(
&'a self,
condition_set_id: &'a CreateConditionSetItemsConditionSetId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a ConditionSetItemsRequestBody,
) -> Result<ResponseValue<ConditionSetItems>, Error<()>>
pub async fn create_condition_set_items<'a>( &'a self, condition_set_id: &'a CreateConditionSetItemsConditionSetId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a ConditionSetItemsRequestBody, ) -> Result<ResponseValue<ConditionSetItems>, Error<()>>
Create Condition Set Items
Add new items to a condition set. Can add up to 100 items at once.
Sends a POST request to
/v1/condition_sets/{condition_set_id}/condition_set_items
Sourcepub async fn get_condition_set_item<'a>(
&'a self,
condition_set_id: &'a GetConditionSetItemConditionSetId,
condition_set_item_id: &'a GetConditionSetItemConditionSetItemId,
) -> Result<ResponseValue<ConditionSetItem>, Error<()>>
pub async fn get_condition_set_item<'a>( &'a self, condition_set_id: &'a GetConditionSetItemConditionSetId, condition_set_item_id: &'a GetConditionSetItemConditionSetItemId, ) -> Result<ResponseValue<ConditionSetItem>, Error<()>>
Get Condition Set Item
Get an item from a condition set by condition set ID and item ID.
Sends a GET request to
/v1/condition_sets/{condition_set_id}/condition_set_items/ {condition_set_item_id}
Sourcepub async fn delete_condition_set_item<'a>(
&'a self,
condition_set_id: &'a DeleteConditionSetItemConditionSetId,
condition_set_item_id: &'a DeleteConditionSetItemConditionSetItemId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn delete_condition_set_item<'a>( &'a self, condition_set_id: &'a DeleteConditionSetItemConditionSetId, condition_set_item_id: &'a DeleteConditionSetItemConditionSetItemId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, ) -> Result<ResponseValue<SuccessResponse>, Error<()>>
Delete Condition Set Item
Delete an item from a condition set by condition set ID and item ID.
Sends a DELETE request to
/v1/condition_sets/{condition_set_id}/condition_set_items/ {condition_set_item_id}
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_transaction_by_reference_id<'a>(
&'a self,
reference_id: &'a str,
) -> Result<ResponseValue<TransactionList>, Error<()>>
pub async fn get_transaction_by_reference_id<'a>( &'a self, reference_id: &'a str, ) -> Result<ResponseValue<TransactionList>, Error<()>>
List Transactions
List transactions by reference ID.
Sends a GET request to /v1/transactions
Sourcepub async fn get_key_quorum<'a>(
&'a self,
key_quorum_id: &'a KeyQuorumId,
) -> Result<ResponseValue<KeyQuorum>, Error<()>>
pub async fn get_key_quorum<'a>( &'a self, key_quorum_id: &'a KeyQuorumId, ) -> 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 KeyQuorumId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn delete_key_quorum<'a>( &'a self, key_quorum_id: &'a KeyQuorumId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, ) -> Result<ResponseValue<SuccessResponse>, 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 KeyQuorumId,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a KeyQuorumUpdateRequestBody,
) -> Result<ResponseValue<KeyQuorum>, Error<()>>
pub async fn update_key_quorum<'a>( &'a self, key_quorum_id: &'a KeyQuorumId, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a KeyQuorumUpdateRequestBody, ) -> 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 KeyQuorumCreateRequestBody,
) -> Result<ResponseValue<KeyQuorum>, Error<()>>
pub async fn create_key_quorum<'a>( &'a self, body: &'a KeyQuorumCreateRequestBody, ) -> Result<ResponseValue<KeyQuorum>, Error<()>>
Create key quorum
Create a new key quorum.
Sends a POST request to /v1/key_quorums
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: OnrampProvider,
) -> Result<ResponseValue<GetUserFiatKycStatusResponse>, Error<()>>
pub async fn get_user_fiat_kyc_status<'a>( &'a self, user_id: &'a str, provider: OnrampProvider, ) -> 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<OnrampKycResponse>, Error<()>>
pub async fn initiate_user_fiat_kyc<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatKycBody, ) -> Result<ResponseValue<OnrampKycResponse>, 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<OnrampKycResponse>, Error<()>>
pub async fn update_user_fiat_kyc_status<'a>( &'a self, user_id: &'a str, body: &'a UpdateUserFiatKycStatusBody, ) -> Result<ResponseValue<OnrampKycResponse>, 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: OnrampProvider,
) -> Result<ResponseValue<GetUserFiatAccountsResponse>, Error<()>>
pub async fn get_user_fiat_accounts<'a>( &'a self, user_id: &'a str, provider: OnrampProvider, ) -> 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<OfframpResponse>, Error<()>>
pub async fn initiate_user_fiat_offramp<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatOfframpBody, ) -> Result<ResponseValue<OfframpResponse>, 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<OnrampResponse>, Error<()>>
pub async fn initiate_user_fiat_onramp<'a>( &'a self, user_id: &'a str, body: &'a InitiateUserFiatOnrampBody, ) -> Result<ResponseValue<OnrampResponse>, 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<SuccessResponse>, Error<()>>
pub async fn configure_app_for_fiat_on_off_ramping<'a>( &'a self, app_id: &'a str, body: &'a ConfigureAppForFiatOnOffRampingBody, ) -> Result<ResponseValue<SuccessResponse>, 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
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 list_intents<'a>(
&'a self,
created_by_id: Option<&'a str>,
current_user_has_signed: Option<ListIntentsCurrentUserHasSigned>,
cursor: Option<&'a ListIntentsCursor>,
intent_type: Option<IntentType>,
limit: Option<f64>,
pending_member_id: Option<&'a str>,
resource_id: Option<&'a str>,
sort_by: Option<ListIntentsSortBy>,
status: Option<IntentStatus>,
) -> Result<ResponseValue<ListIntentsResponse>, Error<()>>
pub async fn list_intents<'a>( &'a self, created_by_id: Option<&'a str>, current_user_has_signed: Option<ListIntentsCurrentUserHasSigned>, cursor: Option<&'a ListIntentsCursor>, intent_type: Option<IntentType>, limit: Option<f64>, pending_member_id: Option<&'a str>, resource_id: Option<&'a str>, sort_by: Option<ListIntentsSortBy>, status: Option<IntentStatus>, ) -> Result<ResponseValue<ListIntentsResponse>, Error<()>>
List intents
List intents for an app. Returns a paginated list of intents with their current status and details.
Sends a GET request to /v1/intents
Sourcepub async fn get_intent<'a>(
&'a self,
intent_id: &'a str,
) -> Result<ResponseValue<IntentResponse>, Error<()>>
pub async fn get_intent<'a>( &'a self, intent_id: &'a str, ) -> Result<ResponseValue<IntentResponse>, Error<()>>
Get intent
Retrieve an intent by ID. Returns the intent details including its current status, authorization details, and execution result if applicable.
Sends a GET request to /v1/intents/{intent_id}
Sourcepub async fn create_rpc_intent<'a>(
&'a self,
wallet_id: &'a str,
privy_request_expiry: Option<&'a str>,
body: &'a WalletRpcRequestBody,
) -> Result<ResponseValue<RpcIntentResponse>, Error<()>>
pub async fn create_rpc_intent<'a>( &'a self, wallet_id: &'a str, privy_request_expiry: Option<&'a str>, body: &'a WalletRpcRequestBody, ) -> Result<ResponseValue<RpcIntentResponse>, Error<()>>
Create RPC intent
Create an intent to execute an RPC method on a wallet. The intent must be authorized by either the wallet owner or signers before it can be executed.
Sends a POST request to /v1/intents/wallets/{wallet_id}/rpc
Sourcepub async fn create_transfer_intent<'a>(
&'a self,
wallet_id: &'a str,
privy_request_expiry: Option<&'a str>,
body: &'a TransferRequestBody,
) -> Result<ResponseValue<TransferIntentResponse>, Error<()>>
pub async fn create_transfer_intent<'a>( &'a self, wallet_id: &'a str, privy_request_expiry: Option<&'a str>, body: &'a TransferRequestBody, ) -> Result<ResponseValue<TransferIntentResponse>, Error<()>>
Create transfer intent
Create an intent to execute a token transfer via a wallet. The intent must be authorized by either the wallet owner or signers before it can be executed.
Sends a POST request to /v1/intents/wallets/{wallet_id}/transfer
Sourcepub async fn create_wallet_update_intent<'a>(
&'a self,
wallet_id: &'a str,
privy_request_expiry: Option<&'a str>,
body: &'a WalletUpdateRequestBody,
) -> Result<ResponseValue<WalletIntentResponse>, Error<()>>
pub async fn create_wallet_update_intent<'a>( &'a self, wallet_id: &'a str, privy_request_expiry: Option<&'a str>, body: &'a WalletUpdateRequestBody, ) -> Result<ResponseValue<WalletIntentResponse>, Error<()>>
Create wallet update intent
Create an intent to update a wallet. The intent must be authorized by the wallet owner before it can be executed.
Sends a PATCH request to /v1/intents/wallets/{wallet_id}
Sourcepub async fn create_policy_update_intent<'a>(
&'a self,
policy_id: &'a str,
privy_request_expiry: Option<&'a str>,
body: &'a CreatePolicyUpdateIntentBody,
) -> Result<ResponseValue<PolicyIntentResponse>, Error<()>>
pub async fn create_policy_update_intent<'a>( &'a self, policy_id: &'a str, privy_request_expiry: Option<&'a str>, body: &'a CreatePolicyUpdateIntentBody, ) -> Result<ResponseValue<PolicyIntentResponse>, Error<()>>
Create policy update intent
Create an intent to update a policy. The intent must be authorized by the policy owner before it can be executed.
Sends a PATCH request to /v1/intents/policies/{policy_id}
Sourcepub async fn create_policy_rule_intent<'a>(
&'a self,
policy_id: &'a str,
privy_request_expiry: Option<&'a str>,
body: &'a PolicyRuleRequestBody,
) -> Result<ResponseValue<RuleMutateIntentResponse>, Error<()>>
pub async fn create_policy_rule_intent<'a>( &'a self, policy_id: &'a str, privy_request_expiry: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<RuleMutateIntentResponse>, Error<()>>
Create policy rule intent
Create an intent to add a rule to a policy. The intent must be authorized by the policy owner before it can be executed.
Sends a POST request to /v1/intents/policies/{policy_id}/rules
Sourcepub async fn create_policy_rule_delete_intent<'a>(
&'a self,
policy_id: &'a str,
rule_id: &'a str,
privy_request_expiry: Option<&'a str>,
) -> Result<ResponseValue<RuleDeleteIntentResponse>, Error<()>>
pub async fn create_policy_rule_delete_intent<'a>( &'a self, policy_id: &'a str, rule_id: &'a str, privy_request_expiry: Option<&'a str>, ) -> Result<ResponseValue<RuleDeleteIntentResponse>, Error<()>>
Create policy rule delete intent
Create an intent to delete a rule from a policy. The intent must be authorized by the policy owner before it can be executed.
Sends a DELETE request to
/v1/intents/policies/{policy_id}/rules/{rule_id}
Sourcepub async fn create_policy_rule_update_intent<'a>(
&'a self,
policy_id: &'a str,
rule_id: &'a str,
privy_request_expiry: Option<&'a str>,
body: &'a PolicyRuleRequestBody,
) -> Result<ResponseValue<RuleMutateIntentResponse>, Error<()>>
pub async fn create_policy_rule_update_intent<'a>( &'a self, policy_id: &'a str, rule_id: &'a str, privy_request_expiry: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<RuleMutateIntentResponse>, Error<()>>
Create policy rule update intent
Create an intent to update a rule on a policy. The intent must be authorized by the policy owner before it can be executed.
Sends a PATCH request to
/v1/intents/policies/{policy_id}/rules/{rule_id}
Sourcepub async fn create_key_quorum_update_intent<'a>(
&'a self,
key_quorum_id: &'a str,
privy_request_expiry: Option<&'a str>,
body: &'a KeyQuorumUpdateRequestBody,
) -> Result<ResponseValue<KeyQuorumIntentResponse>, Error<()>>
pub async fn create_key_quorum_update_intent<'a>( &'a self, key_quorum_id: &'a str, privy_request_expiry: Option<&'a str>, body: &'a KeyQuorumUpdateRequestBody, ) -> Result<ResponseValue<KeyQuorumIntentResponse>, Error<()>>
Create key quorum update intent
Create an intent to update a key quorum. The intent must be authorized by the key quorum members before it can be executed.
Sends a PATCH request to /v1/intents/key_quorums/{key_quorum_id}
Authorize intent
Authorize a pending intent by providing a signature. Can be called by the wallet owner (via user token) or with the app secret.
Sends a POST request to /v1/intents/{intent_id}/authorize
Sourcepub async fn create_aggregation<'a>(
&'a self,
privy_idempotency_key: Option<&'a str>,
body: &'a AggregationInput,
) -> Result<ResponseValue<Aggregation>, Error<()>>
pub async fn create_aggregation<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a AggregationInput, ) -> Result<ResponseValue<Aggregation>, Error<()>>
Create aggregation
Create a new aggregation to track and measure metrics over a time window.
Sends a POST request to /v1/aggregations
Sourcepub async fn get_aggregation<'a>(
&'a self,
aggregation_id: &'a GetAggregationAggregationId,
) -> Result<ResponseValue<Aggregation>, Error<()>>
pub async fn get_aggregation<'a>( &'a self, aggregation_id: &'a GetAggregationAggregationId, ) -> Result<ResponseValue<Aggregation>, Error<()>>
Get aggregation
Get an aggregation by aggregation ID.
Sends a GET request to /v1/aggregations/{aggregation_id}
Sourcepub async fn delete_aggregation<'a>(
&'a self,
aggregation_id: &'a DeleteAggregationAggregationId,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn delete_aggregation<'a>( &'a self, aggregation_id: &'a DeleteAggregationAggregationId, ) -> Result<ResponseValue<SuccessResponse>, Error<()>>
Delete aggregation
Delete an aggregation by aggregation ID.
Sends a DELETE request to /v1/aggregations/{aggregation_id}
Sourcepub async fn get_app<'a>(
&'a self,
app_id: &'a str,
) -> Result<ResponseValue<AppResponse>, Error<()>>
pub async fn get_app<'a>( &'a self, app_id: &'a str, ) -> Result<ResponseValue<AppResponse>, Error<()>>
Get app settings
Get the settings and configuration for an app.
Sends a GET request to /v1/apps/{app_id}
Sourcepub async fn list_allowlist_entries<'a>(
&'a self,
app_id: &'a str,
) -> Result<ResponseValue<Vec<AllowlistEntry>>, Error<()>>
pub async fn list_allowlist_entries<'a>( &'a self, app_id: &'a str, ) -> Result<ResponseValue<Vec<AllowlistEntry>>, Error<()>>
List allowlist entries
Get all allowlist entries for an app. Returns the list of users allowed to access the app when the allowlist is enabled.
Sends a GET request to /v1/apps/{app_id}/allowlist
Sourcepub async fn create_allowlist_entry<'a>(
&'a self,
app_id: &'a str,
body: &'a UserInviteInput,
) -> Result<ResponseValue<AllowlistEntry>, Error<()>>
pub async fn create_allowlist_entry<'a>( &'a self, app_id: &'a str, body: &'a UserInviteInput, ) -> Result<ResponseValue<AllowlistEntry>, Error<()>>
Add to allowlist
Add a new entry to the allowlist for an app. The allowlist must be enabled.
Sends a POST request to /v1/apps/{app_id}/allowlist
Sourcepub async fn delete_allowlist_entry<'a>(
&'a self,
app_id: &'a str,
body: &'a UserInviteInput,
) -> Result<ResponseValue<AllowlistDeletionResponse>, Error<()>>
pub async fn delete_allowlist_entry<'a>( &'a self, app_id: &'a str, body: &'a UserInviteInput, ) -> Result<ResponseValue<AllowlistDeletionResponse>, Error<()>>
Remove from allowlist
Remove an entry from the allowlist for an app. The allowlist must be enabled.
Sends a DELETE request to /v1/apps/{app_id}/allowlist
Sourcepub async fn get_test_credentials<'a>(
&'a self,
app_id: &'a str,
) -> Result<ResponseValue<TestAccountsResponse>, Error<()>>
pub async fn get_test_credentials<'a>( &'a self, app_id: &'a str, ) -> Result<ResponseValue<TestAccountsResponse>, Error<()>>
Get test credentials
Get the test accounts and credentials for an app.
Sends a GET request to /v1/apps/{app_id}/test_credentials
Sourcepub async fn get_gas_spend<'a>(
&'a self,
end_timestamp: f64,
start_timestamp: f64,
wallet_ids: &'a Vec<String>,
) -> Result<ResponseValue<GasSpendResponseBody>, Error<()>>
pub async fn get_gas_spend<'a>( &'a self, end_timestamp: f64, start_timestamp: f64, wallet_ids: &'a Vec<String>, ) -> Result<ResponseValue<GasSpendResponseBody>, Error<()>>
Get gas spend
Get aggregated Privy gas credits charged for a set of wallets over a time range. Maximum 100 wallet IDs and 30-day range per request.
Sends a GET request to /v1/apps/gas_spend
Sourcepub async fn list_organization_secrets<'a>(
&'a self,
account_id: &'a ListOrganizationSecretsAccountId,
) -> Result<ResponseValue<OrganizationSecretsListResponse>, Error<()>>
pub async fn list_organization_secrets<'a>( &'a self, account_id: &'a ListOrganizationSecretsAccountId, ) -> Result<ResponseValue<OrganizationSecretsListResponse>, Error<()>>
List organization secrets
List organization secrets for an account. This endpoint is intended for dashboard-admin use.
Sends a GET request to /v1/organizations/{account_id}/secrets
Sourcepub async fn create_organization_secret<'a>(
&'a self,
account_id: &'a CreateOrganizationSecretAccountId,
) -> Result<ResponseValue<CreateOrganizationSecretResponse>, Error<()>>
pub async fn create_organization_secret<'a>( &'a self, account_id: &'a CreateOrganizationSecretAccountId, ) -> Result<ResponseValue<CreateOrganizationSecretResponse>, Error<()>>
Create organization secret
Create an organization secret for an account. This endpoint is intended for dashboard-admin use.
Sends a POST request to /v1/organizations/{account_id}/secrets
Sourcepub async fn revoke_organization_secret<'a>(
&'a self,
account_id: &'a RevokeOrganizationSecretAccountId,
body: &'a OrganizationSecretIdInput,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn revoke_organization_secret<'a>( &'a self, account_id: &'a RevokeOrganizationSecretAccountId, body: &'a OrganizationSecretIdInput, ) -> Result<ResponseValue<SuccessResponse>, Error<()>>
Revoke organization secret
Revoke an organization secret for an account. This endpoint is intended for dashboard-admin use.
Sends a DELETE request to /v1/organizations/{account_id}/secrets
Sourcepub async fn update_organization_secret_signing_key<'a>(
&'a self,
account_id: &'a UpdateOrganizationSecretSigningKeyAccountId,
body: &'a UpdateOrganizationSecretSigningKeyInput,
) -> Result<ResponseValue<SuccessResponse>, Error<()>>
pub async fn update_organization_secret_signing_key<'a>( &'a self, account_id: &'a UpdateOrganizationSecretSigningKeyAccountId, body: &'a UpdateOrganizationSecretSigningKeyInput, ) -> Result<ResponseValue<SuccessResponse>, Error<()>>
Update organization secret signing key
Update or clear the signing public key on an organization secret. This endpoint is intended for dashboard-admin use.
Sends a PATCH request to /v1/organizations/{account_id}/secrets
Sourcepub async fn device_verify<'a>(
&'a self,
body: &'a DeviceVerifyRequestBody,
) -> Result<ResponseValue<DeviceVerifyResponse>, Error<()>>
pub async fn device_verify<'a>( &'a self, body: &'a DeviceVerifyRequestBody, ) -> Result<ResponseValue<DeviceVerifyResponse>, Error<()>>
Approve or deny a device authorization request
User-facing endpoint for the device authorization flow. After a CLI displays a user code, the authenticated user visits the verification page and calls this endpoint to approve or deny the request. Requires user authentication via the Privy SDK.
Sends a POST request to /api/oauth/v2/device_verify
Sourcepub async fn request_quote<'a>(
&'a self,
body: &'a RequestQuoteBody,
) -> Result<ResponseValue<RequestQuoteResponse>, Error<()>>
pub async fn request_quote<'a>( &'a self, body: &'a RequestQuoteBody, ) -> Result<ResponseValue<RequestQuoteResponse>, Error<()>>
Request Quote
Request a price quote for an asset that may be used to execute a trade later on. The quote will be valid for a limited time as specified in the response.
Sends a POST request to /v1/kraken_embed/quotes
Sourcepub async fn get_quote<'a>(
&'a self,
quote_id: &'a str,
user_id: &'a GetQuoteUserId,
) -> Result<ResponseValue<GetQuoteResponse>, Error<()>>
pub async fn get_quote<'a>( &'a self, quote_id: &'a str, user_id: &'a GetQuoteUserId, ) -> Result<ResponseValue<GetQuoteResponse>, Error<()>>
Get Quote
Gets the status of a quote that was previously requested.
Sends a GET request to /v1/kraken_embed/quotes/{quote_id}
Sourcepub async fn execute_quote<'a>(
&'a self,
quote_id: &'a str,
body: &'a ExecuteQuoteBody,
) -> Result<ResponseValue<ExecuteQuoteResponse>, Error<()>>
pub async fn execute_quote<'a>( &'a self, quote_id: &'a str, body: &'a ExecuteQuoteBody, ) -> Result<ResponseValue<ExecuteQuoteResponse>, Error<()>>
Execute Quote
Execute a previously requested quote to complete the trade. The quote must be in “new” status and not expired.
Sends a PUT request to /v1/kraken_embed/quotes/{quote_id}
Sourcepub async fn get_kraken_user<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<GetKrakenUserResponse>, Error<()>>
pub async fn get_kraken_user<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<GetKrakenUserResponse>, Error<()>>
Get Kraken User
Retrieve information about a Kraken Embed user including their status and required actions.
Sends a GET request to /v1/kraken_embed/users/{user_id}
Sourcepub async fn create_kraken_user<'a>(
&'a self,
user_id: &'a str,
body: &'a CreateKrakenUserBody,
) -> Result<ResponseValue<CreateKrakenUserResponse>, Error<()>>
pub async fn create_kraken_user<'a>( &'a self, user_id: &'a str, body: &'a CreateKrakenUserBody, ) -> Result<ResponseValue<CreateKrakenUserResponse>, Error<()>>
Create Kraken User
Create a new Kraken Embed user associated with a Privy user. This establishes the mapping between the Privy user and the Kraken IIBAN.
Sends a POST request to /v1/kraken_embed/users/{user_id}
Sourcepub async fn submit_user_verification<'a>(
&'a self,
user_id: &'a str,
) -> Result<ResponseValue<Map<String, Value>>, Error<()>>
pub async fn submit_user_verification<'a>( &'a self, user_id: &'a str, ) -> Result<ResponseValue<Map<String, Value>>, Error<()>>
Submit User Verification
Submit identity verification details for a Kraken Embed user. Supports various verification types including identity documents, residence documents, tax IDs, selfies, watchlists, and KYC reports.
Sends a POST request to
/v1/kraken_embed/users/{user_id}/verifications
Sourcepub async fn submit_user_verification_from_url<'a>(
&'a self,
user_id: &'a str,
body: &'a SubmitUserVerificationFromUrlBody,
) -> Result<ResponseValue<SubmitUserVerificationFromUrlResponse>, Error<()>>
pub async fn submit_user_verification_from_url<'a>( &'a self, user_id: &'a str, body: &'a SubmitUserVerificationFromUrlBody, ) -> Result<ResponseValue<SubmitUserVerificationFromUrlResponse>, Error<()>>
Submit User Verification from URLs
Submit identity verification details for a Kraken Embed user using presigned URLs to documents. This endpoint accepts JSON payloads with URLs to verification documents instead of multipart file uploads. Supports identity documents, residence documents, tax IDs, selfies, and watchlists.
Sends a POST request to
/v1/kraken_embed/users/{user_id}/verification_urls
Sourcepub async fn list_assets<'a>(
&'a self,
filter_assets: Option<&'a Vec<ListAssetsFilterAssetsItem>>,
filter_platform_statuses: Option<&'a Vec<ListAssetsFilterPlatformStatusesItem>>,
filter_tradable_only: Option<bool>,
filter_user: Option<&'a str>,
lang: Option<&'a ListAssetsLang>,
page_number: Option<NonZeroU64>,
page_size: Option<NonZeroU64>,
quote: Option<&'a ListAssetsQuote>,
sort: Option<ListAssetsSort>,
) -> Result<ResponseValue<ListAssetsResponse>, Error<()>>
pub async fn list_assets<'a>( &'a self, filter_assets: Option<&'a Vec<ListAssetsFilterAssetsItem>>, filter_platform_statuses: Option<&'a Vec<ListAssetsFilterPlatformStatusesItem>>, filter_tradable_only: Option<bool>, filter_user: Option<&'a str>, lang: Option<&'a ListAssetsLang>, page_number: Option<NonZeroU64>, page_size: Option<NonZeroU64>, quote: Option<&'a ListAssetsQuote>, sort: Option<ListAssetsSort>, ) -> Result<ResponseValue<ListAssetsResponse>, Error<()>>
List Assets
Get a list of all available assets for trading on Kraken Embed, with optional filtering and pagination.
Sends a GET request to /v1/kraken_embed/assets
Sourcepub async fn get_kraken_embed_assets<'a>(
&'a self,
asset_id: &'a GetKrakenEmbedAssetsAssetId,
lang: Option<&'a GetKrakenEmbedAssetsLang>,
quote: Option<&'a GetKrakenEmbedAssetsQuote>,
) -> Result<ResponseValue<GetKrakenEmbedAssetsResponse>, Error<()>>
pub async fn get_kraken_embed_assets<'a>( &'a self, asset_id: &'a GetKrakenEmbedAssetsAssetId, lang: Option<&'a GetKrakenEmbedAssetsLang>, quote: Option<&'a GetKrakenEmbedAssetsQuote>, ) -> Result<ResponseValue<GetKrakenEmbedAssetsResponse>, Error<()>>
Get Asset Details
Get detailed information about a specific asset including pricing, market data, and trading capabilities.
Sends a GET request to /v1/kraken_embed/assets/{asset_id}
Sourcepub async fn list_asset_rates<'a>(
&'a self,
asset_id: &'a ListAssetRatesAssetId,
end_time: Option<&'a DateTime<Utc>>,
interval: Option<&'a str>,
quote: Option<&'a ListAssetRatesQuote>,
start_time: Option<&'a DateTime<Utc>>,
) -> Result<ResponseValue<ListAssetRatesResponse>, Error<()>>
pub async fn list_asset_rates<'a>( &'a self, asset_id: &'a ListAssetRatesAssetId, end_time: Option<&'a DateTime<Utc>>, interval: Option<&'a str>, quote: Option<&'a ListAssetRatesQuote>, start_time: Option<&'a DateTime<Utc>>, ) -> Result<ResponseValue<ListAssetRatesResponse>, Error<()>>
Get Asset Historical Rates
Get historical price rates for a specific asset with optional time range and interval filtering.
Sends a GET request to /v1/kraken_embed/assets/{asset_id}/rates
Sourcepub async fn get_portfolio_details<'a>(
&'a self,
user_id: &'a str,
quote: Option<&'a GetPortfolioDetailsQuote>,
) -> Result<ResponseValue<GetPortfolioDetailsResponse>, Error<()>>
pub async fn get_portfolio_details<'a>( &'a self, user_id: &'a str, quote: Option<&'a GetPortfolioDetailsQuote>, ) -> Result<ResponseValue<GetPortfolioDetailsResponse>, Error<()>>
Get Portfolio Details
Get detailed portfolio information for a user including asset balances, values, and positions.
Sends a GET request to /v1/kraken_embed/users/{user_id}/details
Sourcepub async fn get_portfolio_summary<'a>(
&'a self,
user_id: &'a str,
include_current_day_pnl: Option<GetPortfolioSummaryIncludeCurrentDayPnl>,
quote: Option<&'a GetPortfolioSummaryQuote>,
) -> Result<ResponseValue<KrakenEmbedGetPortfolioSummaryResponse>, Error<()>>
pub async fn get_portfolio_summary<'a>( &'a self, user_id: &'a str, include_current_day_pnl: Option<GetPortfolioSummaryIncludeCurrentDayPnl>, quote: Option<&'a GetPortfolioSummaryQuote>, ) -> Result<ResponseValue<KrakenEmbedGetPortfolioSummaryResponse>, Error<()>>
Get Portfolio Summary
Get a high-level summary of a user’s portfolio including total value, available balance, and unrealized P&L.
Sends a GET request to /v1/kraken_embed/users/{user_id}/summary
Sourcepub async fn get_master_account_portfolio_summary<'a>(
&'a self,
include_current_day_pnl: Option<GetMasterAccountPortfolioSummaryIncludeCurrentDayPnl>,
quote: Option<&'a GetMasterAccountPortfolioSummaryQuote>,
) -> Result<ResponseValue<KrakenEmbedGetPortfolioSummaryResponse>, Error<()>>
pub async fn get_master_account_portfolio_summary<'a>( &'a self, include_current_day_pnl: Option<GetMasterAccountPortfolioSummaryIncludeCurrentDayPnl>, quote: Option<&'a GetMasterAccountPortfolioSummaryQuote>, ) -> Result<ResponseValue<KrakenEmbedGetPortfolioSummaryResponse>, Error<()>>
Get Master Account Portfolio Summary
Get a high-level summary of the master account’s portfolio including total value, available balance, and unrealized P&L.
Sends a GET request to /v1/kraken_embed/master_account/summary
Sourcepub async fn get_master_account_portfolio_details<'a>(
&'a self,
quote: Option<&'a GetMasterAccountPortfolioDetailsQuote>,
) -> Result<ResponseValue<GetMasterAccountPortfolioDetailsResponse>, Error<()>>
pub async fn get_master_account_portfolio_details<'a>( &'a self, quote: Option<&'a GetMasterAccountPortfolioDetailsQuote>, ) -> Result<ResponseValue<GetMasterAccountPortfolioDetailsResponse>, Error<()>>
Get Master Account Portfolio Details
Get detailed portfolio information for the master account including asset balances, values, and positions.
Sends a GET request to /v1/kraken_embed/master_account/details
Sourcepub async fn get_master_account_portfolio_history<'a>(
&'a self,
cursor: Option<&'a str>,
end_date: Option<&'a NaiveDate>,
include_assets: Option<&'a GetMasterAccountPortfolioHistoryIncludeAssets>,
include_total_balance: Option<GetMasterAccountPortfolioHistoryIncludeTotalBalance>,
include_total_pnl: Option<GetMasterAccountPortfolioHistoryIncludeTotalPnl>,
interval: Option<GetMasterAccountPortfolioHistoryInterval>,
quote: Option<&'a GetMasterAccountPortfolioHistoryQuote>,
resolution: Option<u64>,
start_date: Option<&'a NaiveDate>,
) -> Result<ResponseValue<GetMasterAccountPortfolioHistoryResponse>, Error<()>>
pub async fn get_master_account_portfolio_history<'a>( &'a self, cursor: Option<&'a str>, end_date: Option<&'a NaiveDate>, include_assets: Option<&'a GetMasterAccountPortfolioHistoryIncludeAssets>, include_total_balance: Option<GetMasterAccountPortfolioHistoryIncludeTotalBalance>, include_total_pnl: Option<GetMasterAccountPortfolioHistoryIncludeTotalPnl>, interval: Option<GetMasterAccountPortfolioHistoryInterval>, quote: Option<&'a GetMasterAccountPortfolioHistoryQuote>, resolution: Option<u64>, start_date: Option<&'a NaiveDate>, ) -> Result<ResponseValue<GetMasterAccountPortfolioHistoryResponse>, Error<()>>
Get Master Account Portfolio History
Get historical balances and valuations over time for the master account’s portfolio with optional filtering by assets and date range.
Sends a GET request to /v1/kraken_embed/master_account/history
Sourcepub async fn get_master_account_portfolio_transactions<'a>(
&'a self,
assets: Option<&'a Vec<GetMasterAccountPortfolioTransactionsAssetsItem>>,
cursor: Option<&'a str>,
from_time: Option<&'a DateTime<Utc>>,
ids: Option<&'a Vec<String>>,
page_size: Option<NonZeroU64>,
quote: Option<&'a GetMasterAccountPortfolioTransactionsQuote>,
ref_ids: Option<&'a Vec<GetMasterAccountPortfolioTransactionsRefIdsItem>>,
sorting: Option<GetMasterAccountPortfolioTransactionsSorting>,
statuses: Option<&'a Vec<GetMasterAccountPortfolioTransactionsStatusesItem>>,
types: Option<&'a Vec<GetMasterAccountPortfolioTransactionsTypesItem>>,
until_time: Option<&'a DateTime<Utc>>,
) -> Result<ResponseValue<GetMasterAccountPortfolioTransactionsResponse>, Error<()>>
pub async fn get_master_account_portfolio_transactions<'a>( &'a self, assets: Option<&'a Vec<GetMasterAccountPortfolioTransactionsAssetsItem>>, cursor: Option<&'a str>, from_time: Option<&'a DateTime<Utc>>, ids: Option<&'a Vec<String>>, page_size: Option<NonZeroU64>, quote: Option<&'a GetMasterAccountPortfolioTransactionsQuote>, ref_ids: Option<&'a Vec<GetMasterAccountPortfolioTransactionsRefIdsItem>>, sorting: Option<GetMasterAccountPortfolioTransactionsSorting>, statuses: Option<&'a Vec<GetMasterAccountPortfolioTransactionsStatusesItem>>, types: Option<&'a Vec<GetMasterAccountPortfolioTransactionsTypesItem>>, until_time: Option<&'a DateTime<Utc>>, ) -> Result<ResponseValue<GetMasterAccountPortfolioTransactionsResponse>, Error<()>>
Get Master Account Portfolio Transactions
Get transaction history for the master account’s portfolio with filtering and pagination options.
Sends a GET request to /v1/kraken_embed/master_account/transactions
Sourcepub async fn initiate_master_account_withdrawal<'a>(
&'a self,
body: &'a InitiateMasterAccountWithdrawalBody,
) -> Result<ResponseValue<InitiateMasterAccountWithdrawalResponse>, Error<()>>
pub async fn initiate_master_account_withdrawal<'a>( &'a self, body: &'a InitiateMasterAccountWithdrawalBody, ) -> Result<ResponseValue<InitiateMasterAccountWithdrawalResponse>, Error<()>>
Initiate Master Account Fiat Withdrawal
Initiate a withdrawal of funds from the master account.
Sends a POST request to
/v1/kraken_embed/master_account/funds/withdrawals
Sourcepub async fn get_protfolio_history_for_user<'a>(
&'a self,
user_id: &'a str,
cursor: Option<&'a str>,
end_date: Option<&'a NaiveDate>,
include_assets: Option<&'a GetProtfolioHistoryForUserIncludeAssets>,
include_total_balance: Option<GetProtfolioHistoryForUserIncludeTotalBalance>,
include_total_pnl: Option<GetProtfolioHistoryForUserIncludeTotalPnl>,
interval: Option<GetProtfolioHistoryForUserInterval>,
quote: Option<&'a GetProtfolioHistoryForUserQuote>,
resolution: Option<u64>,
start_date: Option<&'a NaiveDate>,
) -> Result<ResponseValue<GetProtfolioHistoryForUserResponse>, Error<()>>
pub async fn get_protfolio_history_for_user<'a>( &'a self, user_id: &'a str, cursor: Option<&'a str>, end_date: Option<&'a NaiveDate>, include_assets: Option<&'a GetProtfolioHistoryForUserIncludeAssets>, include_total_balance: Option<GetProtfolioHistoryForUserIncludeTotalBalance>, include_total_pnl: Option<GetProtfolioHistoryForUserIncludeTotalPnl>, interval: Option<GetProtfolioHistoryForUserInterval>, quote: Option<&'a GetProtfolioHistoryForUserQuote>, resolution: Option<u64>, start_date: Option<&'a NaiveDate>, ) -> Result<ResponseValue<GetProtfolioHistoryForUserResponse>, Error<()>>
Get Portfolio History
Get historical balances and valuations over time for a user’s portfolio with optional filtering by assets and date range.
Sends a GET request to /v1/kraken_embed/users/{user_id}/history
Sourcepub async fn get_portfolio_transactions<'a>(
&'a self,
user_id: &'a str,
assets: Option<&'a Vec<GetPortfolioTransactionsAssetsItem>>,
cursor: Option<&'a str>,
from_time: Option<&'a DateTime<Utc>>,
ids: Option<&'a Vec<String>>,
page_size: Option<NonZeroU64>,
quote: Option<&'a GetPortfolioTransactionsQuote>,
ref_ids: Option<&'a Vec<GetPortfolioTransactionsRefIdsItem>>,
sorting: Option<GetPortfolioTransactionsSorting>,
statuses: Option<&'a Vec<GetPortfolioTransactionsStatusesItem>>,
types: Option<&'a Vec<GetPortfolioTransactionsTypesItem>>,
until_time: Option<&'a DateTime<Utc>>,
) -> Result<ResponseValue<GetPortfolioTransactionsResponse>, Error<()>>
pub async fn get_portfolio_transactions<'a>( &'a self, user_id: &'a str, assets: Option<&'a Vec<GetPortfolioTransactionsAssetsItem>>, cursor: Option<&'a str>, from_time: Option<&'a DateTime<Utc>>, ids: Option<&'a Vec<String>>, page_size: Option<NonZeroU64>, quote: Option<&'a GetPortfolioTransactionsQuote>, ref_ids: Option<&'a Vec<GetPortfolioTransactionsRefIdsItem>>, sorting: Option<GetPortfolioTransactionsSorting>, statuses: Option<&'a Vec<GetPortfolioTransactionsStatusesItem>>, types: Option<&'a Vec<GetPortfolioTransactionsTypesItem>>, until_time: Option<&'a DateTime<Utc>>, ) -> Result<ResponseValue<GetPortfolioTransactionsResponse>, Error<()>>
Get Portfolio Transactions
Get transaction history for a user’s portfolio with filtering and pagination options.
Sends a GET request to /v1/kraken_embed/users/{user_id}/transactions
Sourcepub async fn withdraw_funds<'a>(
&'a self,
body: &'a WithdrawFundsBody,
) -> Result<ResponseValue<WithdrawFundsResponse>, Error<()>>
pub async fn withdraw_funds<'a>( &'a self, body: &'a WithdrawFundsBody, ) -> Result<ResponseValue<WithdrawFundsResponse>, Error<()>>
Withdraw funds
Currently, this is a master-only operation. Therefore, no User parameter exists.
Sends a POST request to /v1/kraken_embed/funds/withdrawals
Sourcepub async fn start_verification_from_url<'a>(
&'a self,
user_id: &'a str,
body: &'a KrakenEmbedStartVerificationUrlInput,
) -> Result<ResponseValue<StartVerificationFromUrlResponse>, Error<()>>
pub async fn start_verification_from_url<'a>( &'a self, user_id: &'a str, body: &'a KrakenEmbedStartVerificationUrlInput, ) -> Result<ResponseValue<StartVerificationFromUrlResponse>, Error<()>>
Start Verification from URL
Start KYC verification for a user by submitting documents via presigned URLs. Unlike the submit verification endpoints which allow partners to submit already-trusted verification results, this endpoint initiates Kraken-side verification checks to validate the user.
Sends a POST request to
/v1/kraken_embed/users/{user_id}/start_verification_urls
Sourcepub async fn list_custom_orders<'a>(
&'a self,
cursor: Option<&'a str>,
statuses: Option<&'a str>,
user_id: &'a str,
) -> Result<ResponseValue<ListCustomOrdersResponse>, Error<()>>
pub async fn list_custom_orders<'a>( &'a self, cursor: Option<&'a str>, statuses: Option<&'a str>, user_id: &'a str, ) -> Result<ResponseValue<ListCustomOrdersResponse>, Error<()>>
List Custom Orders
Get a list of custom orders that were previously submitted.
Sends a GET request to /v1/kraken_embed/custom_orders
Sourcepub async fn create_custom_order<'a>(
&'a self,
body: &'a KrakenEmbedCreateCustomOrderInput,
) -> Result<ResponseValue<CreateCustomOrderResponse>, Error<()>>
pub async fn create_custom_order<'a>( &'a self, body: &'a KrakenEmbedCreateCustomOrderInput, ) -> Result<ResponseValue<CreateCustomOrderResponse>, Error<()>>
Create Custom Order
Submit a custom order with a specified trigger condition. The order will execute automatically when the trigger condition is met.
Sends a POST request to /v1/kraken_embed/custom_orders
Sourcepub async fn get_custom_order<'a>(
&'a self,
order_id: &'a str,
user_id: &'a str,
) -> Result<ResponseValue<GetCustomOrderResponse>, Error<()>>
pub async fn get_custom_order<'a>( &'a self, order_id: &'a str, user_id: &'a str, ) -> Result<ResponseValue<GetCustomOrderResponse>, Error<()>>
Get Custom Order
Get a single custom order by ID.
Sends a GET request to /v1/kraken_embed/custom_orders/{order_id}
Sourcepub async fn cancel_custom_order<'a>(
&'a self,
order_id: &'a str,
body: &'a KrakenEmbedCancelCustomOrderInput,
) -> Result<ResponseValue<CancelCustomOrderResponse>, Error<()>>
pub async fn cancel_custom_order<'a>( &'a self, order_id: &'a str, body: &'a KrakenEmbedCancelCustomOrderInput, ) -> Result<ResponseValue<CancelCustomOrderResponse>, Error<()>>
Cancel Custom Order
Cancel an active custom order. Once cancelled, the order cannot be reactivated.
Sends a POST request to
/v1/kraken_embed/custom_orders/{order_id}/cancel
Sourcepub async fn get_custom_order_history<'a>(
&'a self,
order_id: &'a str,
user_id: &'a str,
) -> Result<ResponseValue<GetCustomOrderHistoryResponse>, Error<()>>
pub async fn get_custom_order_history<'a>( &'a self, order_id: &'a str, user_id: &'a str, ) -> Result<ResponseValue<GetCustomOrderHistoryResponse>, Error<()>>
Get Custom Order History
Get execution history for a single custom order.
Sends a GET request to
/v1/kraken_embed/custom_orders/{order_id}/history
Sourcepub async fn get_earn_summary<'a>(
&'a self,
user_id: &'a str,
currency: &'a GetEarnSummaryCurrency,
) -> Result<ResponseValue<KrakenEmbedGetEarnSummaryResponse>, Error<()>>
pub async fn get_earn_summary<'a>( &'a self, user_id: &'a str, currency: &'a GetEarnSummaryCurrency, ) -> Result<ResponseValue<KrakenEmbedGetEarnSummaryResponse>, Error<()>>
Get Earn Summary
Get Earn summary of a user including Auto-Earn status, total rewards, and upcoming payouts. For per-asset granularity, use GET /v1/kraken_embed/earn/assets.
Sends a GET request to /v1/kraken_embed/users/{user_id}/earn_summary
Sourcepub async fn list_earn_assets<'a>(
&'a self,
assets: Option<&'a Vec<ListEarnAssetsAssetsItem>>,
currency: Option<&'a ListEarnAssetsCurrency>,
user: Option<&'a ListEarnAssetsUser>,
) -> Result<ResponseValue<KrakenEmbedGetEarnAssetsResponse>, Error<()>>
pub async fn list_earn_assets<'a>( &'a self, assets: Option<&'a Vec<ListEarnAssetsAssetsItem>>, currency: Option<&'a ListEarnAssetsCurrency>, user: Option<&'a ListEarnAssetsUser>, ) -> Result<ResponseValue<KrakenEmbedGetEarnAssetsResponse>, Error<()>>
List Earn Assets
List Earn Assets with APR estimates. Optionally filter by asset or user to include active allocations.
Sends a GET request to /v1/kraken_embed/earn/assets
Sourcepub async fn toggle_auto_earn<'a>(
&'a self,
user_id: &'a str,
want_enabled: bool,
) -> Result<ResponseValue<KrakenEmbedToggleAutoEarnResponse>, Error<()>>
pub async fn toggle_auto_earn<'a>( &'a self, user_id: &'a str, want_enabled: bool, ) -> Result<ResponseValue<KrakenEmbedToggleAutoEarnResponse>, Error<()>>
Toggle Auto-Earn
Toggle Auto-Earn of a user. This is an async operation. To fetch the current status, use GET /v1/kraken_embed/users/{user_id}/earn_summary.
Sends a PUT request to /v1/kraken_embed/users/{user_id}/auto_earn
Sourcepub async fn ethereum_yield_deposit<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a EthereumYieldDepositInput,
) -> Result<ResponseValue<EthereumYieldSweepResponse>, Error<()>>
pub async fn ethereum_yield_deposit<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a EthereumYieldDepositInput, ) -> Result<ResponseValue<EthereumYieldSweepResponse>, Error<()>>
Deposit into Vault
Deposit assets from a wallet into an ERC-4626 vault. This endpoint generates and broadcasts the necessary approval and deposit transactions.
Sends a POST request to
/v1/wallets/{wallet_id}/ethereum_yield_deposit
Sourcepub async fn ethereum_yield_withdraw<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a EthereumYieldWithdrawInput,
) -> Result<ResponseValue<EthereumYieldSweepResponse>, Error<()>>
pub async fn ethereum_yield_withdraw<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a EthereumYieldWithdrawInput, ) -> Result<ResponseValue<EthereumYieldSweepResponse>, Error<()>>
Withdraw from Vault
Withdraw assets from an ERC-4626 vault back to a wallet. This endpoint generates and broadcasts the withdrawal transaction.
Sends a POST request to
/v1/wallets/{wallet_id}/ethereum_yield_withdraw
Sourcepub async fn get_ethereum_yield_position<'a>(
&'a self,
wallet_id: &'a str,
vault_id: &'a str,
) -> Result<ResponseValue<EthereumYieldPositionResponse>, Error<()>>
pub async fn get_ethereum_yield_position<'a>( &'a self, wallet_id: &'a str, vault_id: &'a str, ) -> Result<ResponseValue<EthereumYieldPositionResponse>, Error<()>>
Get Ethereum Yield Vault Position
Retrieve a wallet’s current position in a specific ethereum yield vault. Returns the vault shares and asset values.
Sends a GET request to /v1/wallets/{wallet_id}/ethereum_yield_vault
Sourcepub async fn get_ethereum_yield_vault<'a>(
&'a self,
vault_id: &'a str,
) -> Result<ResponseValue<EthereumVaultDetailsResponse>, Error<()>>
pub async fn get_ethereum_yield_vault<'a>( &'a self, vault_id: &'a str, ) -> Result<ResponseValue<EthereumVaultDetailsResponse>, Error<()>>
Get Ethereum Vault Details
Retrieve detailed information about an ethereum yield vault, including current APY and liquidity.
Sends a GET request to /v1/ethereum_yield_vault/{vault_id}
Sourcepub async fn get_ethereum_yield_sweep<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<EthereumYieldSweepResponse>, Error<()>>
pub async fn get_ethereum_yield_sweep<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<EthereumYieldSweepResponse>, Error<()>>
Get Yield Sweep
Retrieve a yield sweep (deposit or withdrawal) by its ID.
Sends a GET request to /v1/ethereum_yield_sweep/{id}
Sourcepub async fn ethereum_yield_claim<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a EthereumYieldClaimInput,
) -> Result<ResponseValue<EthereumYieldClaimResponse>, Error<()>>
pub async fn ethereum_yield_claim<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a EthereumYieldClaimInput, ) -> Result<ResponseValue<EthereumYieldClaimResponse>, Error<()>>
Claim Yield Rewards
Claim incentive rewards accrued from vault participation on the specified chain via Merkl.
Sends a POST request to /v1/wallets/{wallet_id}/ethereum_yield_claim
Sourcepub async fn get_ethereum_yield_claim<'a>(
&'a self,
id: &'a str,
) -> Result<ResponseValue<EthereumYieldClaimResponse>, Error<()>>
pub async fn get_ethereum_yield_claim<'a>( &'a self, id: &'a str, ) -> Result<ResponseValue<EthereumYieldClaimResponse>, Error<()>>
Get Yield Reward Claim
Retrieve a yield reward claim transaction by its ID.
Sends a GET request to /v1/ethereum_yield_claim/{id}
Sourcepub async fn list_accounts<'a>(
&'a self,
cursor: Option<&'a ListAccountsCursor>,
limit: Option<f64>,
search: Option<&'a str>,
) -> Result<ResponseValue<AccountsListResponse>, Error<()>>
pub async fn list_accounts<'a>( &'a self, cursor: Option<&'a ListAccountsCursor>, limit: Option<f64>, search: Option<&'a str>, ) -> Result<ResponseValue<AccountsListResponse>, Error<()>>
List accounts
List all accounts in your app.
Sends a GET request to /v1/accounts
Sourcepub async fn create_account<'a>(
&'a self,
privy_idempotency_key: Option<&'a str>,
body: &'a CreateAccountInput,
) -> Result<ResponseValue<AccountResponse>, Error<()>>
pub async fn create_account<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a CreateAccountInput, ) -> Result<ResponseValue<AccountResponse>, Error<()>>
Create account
Creates a new account with associated wallets.
Sends a POST request to /v1/accounts
Sourcepub async fn get_account<'a>(
&'a self,
account_id: &'a GetAccountAccountId,
) -> Result<ResponseValue<AccountResponse>, Error<()>>
pub async fn get_account<'a>( &'a self, account_id: &'a GetAccountAccountId, ) -> Result<ResponseValue<AccountResponse>, Error<()>>
Get account
Get an account by account ID.
Sends a GET request to /v1/accounts/{account_id}
Sourcepub async fn update_account<'a>(
&'a self,
account_id: &'a UpdateAccountAccountId,
body: &'a UpdateAccountInput,
) -> Result<ResponseValue<AccountResponse>, Error<()>>
pub async fn update_account<'a>( &'a self, account_id: &'a UpdateAccountAccountId, body: &'a UpdateAccountInput, ) -> Result<ResponseValue<AccountResponse>, Error<()>>
Update account
Update an account by account ID. Supports updating the display name and adding new wallets.
Sends a PATCH request to /v1/accounts/{account_id}
Sourcepub async fn get_account_balance<'a>(
&'a self,
account_id: &'a GetAccountBalanceAccountId,
testnet_mode: Option<GetAccountBalanceTestnetMode>,
) -> Result<ResponseValue<AccountBalanceResponse>, Error<()>>
pub async fn get_account_balance<'a>( &'a self, account_id: &'a GetAccountBalanceAccountId, testnet_mode: Option<GetAccountBalanceTestnetMode>, ) -> Result<ResponseValue<AccountBalanceResponse>, Error<()>>
Get account balance
Get the balance of an account, aggregated across all wallets and supported chains.
Sends a GET request to /v1/accounts/{account_id}/balance
Sourcepub async fn swap_quote<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
body: &'a SwapQuoteRequestBody,
) -> Result<ResponseValue<SwapQuoteResponse>, Error<()>>
pub async fn swap_quote<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, body: &'a SwapQuoteRequestBody, ) -> Result<ResponseValue<SwapQuoteResponse>, Error<()>>
Get Swap Quote
Get a price quote for swapping tokens within a wallet.
Sends a POST request to /v1/wallets/{wallet_id}/swap/quote
Sourcepub async fn swap_tokens<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
body: &'a SwapRequestBody,
) -> Result<ResponseValue<SwapActionResponse>, Error<()>>
pub async fn swap_tokens<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, body: &'a SwapRequestBody, ) -> Result<ResponseValue<SwapActionResponse>, Error<()>>
Swap Tokens
Execute a token swap within a wallet.
Sends a POST request to /v1/wallets/{wallet_id}/swap
Sourcepub async fn get_wallet_action<'a>(
&'a self,
wallet_id: &'a str,
action_id: &'a Uuid,
privy_authorization_signature: Option<&'a str>,
) -> Result<ResponseValue<WalletActionResponse>, Error<()>>
pub async fn get_wallet_action<'a>( &'a self, wallet_id: &'a str, action_id: &'a Uuid, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<WalletActionResponse>, Error<()>>
Get wallet action
Get the current status of a wallet action by its ID. Use
?include=steps to include step-level details.
Sends a GET request to /v1/wallets/{wallet_id}/actions/{action_id}
Sourcepub async fn transfer<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a TransferRequestBody,
) -> Result<ResponseValue<TransferActionResponse>, Error<()>>
pub async fn transfer<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a TransferRequestBody, ) -> Result<ResponseValue<TransferActionResponse>, Error<()>>
Transfer
Transfer tokens from a wallet to a destination address.
Sends a POST request to /v1/wallets/{wallet_id}/transfer
Sourcepub async fn transfer_quote<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a TransferQuoteRequestBody,
) -> Result<ResponseValue<TransferQuoteResponse>, Error<()>>
pub async fn transfer_quote<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a TransferQuoteRequestBody, ) -> Result<ResponseValue<TransferQuoteResponse>, Error<()>>
Get Transfer Quote
Get a price quote for a cross-asset or cross-chain (DADC) transfer. Only available for named-asset transfers where the source and destination asset or chain differ.
Sends a POST request to /v1/wallets/{wallet_id}/transfer/quote
Sourcepub async fn ethereum_earn_deposit<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a EarnDepositRequestBody,
) -> Result<ResponseValue<EarnDepositActionResponse>, Error<()>>
pub async fn ethereum_earn_deposit<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a EarnDepositRequestBody, ) -> Result<ResponseValue<EarnDepositActionResponse>, Error<()>>
Earn deposit
Deposit assets into an ERC-4626 vault.
Sends a POST request to
/v1/wallets/{wallet_id}/earn/ethereum/deposit
Sourcepub async fn ethereum_earn_withdraw<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a EarnWithdrawRequestBody,
) -> Result<ResponseValue<EarnWithdrawActionResponse>, Error<()>>
pub async fn ethereum_earn_withdraw<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a EarnWithdrawRequestBody, ) -> Result<ResponseValue<EarnWithdrawActionResponse>, Error<()>>
Earn withdraw
Withdraw assets from an ERC-4626 vault.
Sends a POST request to
/v1/wallets/{wallet_id}/earn/ethereum/withdraw
Sourcepub async fn get_ethereum_earn_incentive_rewards<'a>(
&'a self,
wallet_id: &'a str,
chain: &'a str,
) -> Result<ResponseValue<EarnIncentiveRewardsResponse>, Error<()>>
pub async fn get_ethereum_earn_incentive_rewards<'a>( &'a self, wallet_id: &'a str, chain: &'a str, ) -> Result<ResponseValue<EarnIncentiveRewardsResponse>, Error<()>>
Get incentive rewards
Retrieve all incentive rewards for a wallet on a given chain, with claimed and claimable amounts per token.
Sends a GET request to
/v1/wallets/{wallet_id}/earn/ethereum/incentive/claim
Sourcepub async fn ethereum_earn_incentive_claim<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: Option<&'a str>,
privy_idempotency_key: Option<&'a str>,
privy_request_expiry: Option<&'a str>,
body: &'a EarnIncentiveClaimRequestBody,
) -> Result<ResponseValue<EarnIncentiveClaimActionResponse>, Error<()>>
pub async fn ethereum_earn_incentive_claim<'a>( &'a self, wallet_id: &'a str, privy_authorization_signature: Option<&'a str>, privy_idempotency_key: Option<&'a str>, privy_request_expiry: Option<&'a str>, body: &'a EarnIncentiveClaimRequestBody, ) -> Result<ResponseValue<EarnIncentiveClaimActionResponse>, Error<()>>
Earn incentive claim
Claim incentive rewards for a wallet.
Sends a POST request to
/v1/wallets/{wallet_id}/earn/ethereum/incentive/claim
Sourcepub async fn get_ethereum_earn_position<'a>(
&'a self,
wallet_id: &'a str,
vault_id: &'a str,
) -> Result<ResponseValue<EthereumEarnPositionResponse>, Error<()>>
pub async fn get_ethereum_earn_position<'a>( &'a self, wallet_id: &'a str, vault_id: &'a str, ) -> Result<ResponseValue<EthereumEarnPositionResponse>, Error<()>>
Get earn vault position
Retrieve a wallet’s current position in a specific earn vault, including deposit/withdraw totals and current onchain vault shares.
Sends a GET request to /v1/wallets/{wallet_id}/earn/ethereum/vaults
Sourcepub async fn get_ethereum_earn_vault_details<'a>(
&'a self,
vault_id: &'a str,
) -> Result<ResponseValue<EthereumEarnVaultDetailsResponse>, Error<()>>
pub async fn get_ethereum_earn_vault_details<'a>( &'a self, vault_id: &'a str, ) -> Result<ResponseValue<EthereumEarnVaultDetailsResponse>, Error<()>>
Get earn vault details
Retrieve detailed information about an earn vault, including current APY and liquidity.
Sends a GET request to /v1/earn/ethereum/vaults/{vault_id}