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 get_custodial_wallets<'a>(
&'a self,
privy_idempotency_key: Option<&'a str>,
body: &'a GetCustodialWalletsBody,
) -> Result<ResponseValue<CustodialWallet>, Error<()>>
pub async fn get_custodial_wallets<'a>( &'a self, privy_idempotency_key: Option<&'a str>, body: &'a GetCustodialWalletsBody, ) -> 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>,
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>,
tx_hash: Option<&'a WalletTransactionsTxHash>,
) -> 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>, tx_hash: Option<&'a WalletTransactionsTxHash>, ) -> 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 export_wallet<'a>(
&'a self,
wallet_id: &'a str,
privy_authorization_signature: 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>, 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_rule<'a>(
&'a self,
policy_id: &'a CreateRulePolicyId,
privy_authorization_signature: 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>, 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>,
) -> Result<ResponseValue<DeleteRuleResponse>, Error<()>>
pub async fn delete_rule<'a>( &'a self, policy_id: &'a DeleteRulePolicyId, rule_id: &'a DeleteRuleRuleId, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeleteRuleResponse>, 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>,
body: &'a PolicyRuleRequestBody,
) -> Result<ResponseValue<UpdateRuleResponse>, Error<()>>
pub async fn update_rule<'a>( &'a self, policy_id: &'a UpdateRulePolicyId, rule_id: &'a UpdateRuleRuleId, privy_authorization_signature: Option<&'a str>, body: &'a PolicyRuleRequestBody, ) -> Result<ResponseValue<UpdateRuleResponse>, 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<'a>(
&'a self,
body: &'a ConditionSetRequestBody,
) -> Result<ResponseValue<ConditionSet>, Error<()>>
pub async fn create<'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<'a>(
&'a self,
condition_set_id: &'a GetConditionSetId,
) -> Result<ResponseValue<ConditionSet>, Error<()>>
pub async fn get<'a>( &'a self, condition_set_id: &'a GetConditionSetId, ) -> 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<'a>(
&'a self,
condition_set_id: &'a DeleteConditionSetId,
privy_authorization_signature: Option<&'a str>,
) -> Result<ResponseValue<DeleteResponse>, Error<()>>
pub async fn delete<'a>( &'a self, condition_set_id: &'a DeleteConditionSetId, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeleteResponse>, 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<'a>(
&'a self,
condition_set_id: &'a UpdateConditionSetId,
privy_authorization_signature: Option<&'a str>,
body: &'a UpdateConditionSetInput,
) -> Result<ResponseValue<ConditionSet>, Error<()>>
pub async fn update<'a>( &'a self, condition_set_id: &'a UpdateConditionSetId, privy_authorization_signature: Option<&'a str>, body: &'a UpdateConditionSetInput, ) -> 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_items<'a>(
&'a self,
condition_set_id: &'a GetItemsConditionSetId,
) -> Result<ResponseValue<ConditionSetItemsResponse>, Error<()>>
pub async fn get_items<'a>( &'a self, condition_set_id: &'a GetItemsConditionSetId, ) -> 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_items<'a>(
&'a self,
condition_set_id: &'a UpdateItemsConditionSetId,
privy_authorization_signature: Option<&'a str>,
body: &'a ConditionSetItemsRequestBody,
) -> Result<ResponseValue<ConditionSetItems>, Error<()>>
pub async fn update_items<'a>( &'a self, condition_set_id: &'a UpdateItemsConditionSetId, privy_authorization_signature: 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_items<'a>(
&'a self,
condition_set_id: &'a CreateItemsConditionSetId,
privy_authorization_signature: Option<&'a str>,
body: &'a ConditionSetItemsRequestBody,
) -> Result<ResponseValue<ConditionSetItems>, Error<()>>
pub async fn create_items<'a>( &'a self, condition_set_id: &'a CreateItemsConditionSetId, privy_authorization_signature: 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_item<'a>(
&'a self,
condition_set_id: &'a GetItemConditionSetId,
condition_set_item_id: &'a GetItemConditionSetItemId,
privy_authorization_signature: Option<&'a str>,
) -> Result<ResponseValue<ConditionSetItem>, Error<()>>
pub async fn get_item<'a>( &'a self, condition_set_id: &'a GetItemConditionSetId, condition_set_item_id: &'a GetItemConditionSetItemId, privy_authorization_signature: Option<&'a str>, ) -> 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_item<'a>(
&'a self,
condition_set_id: &'a DeleteItemConditionSetId,
condition_set_item_id: &'a DeleteItemConditionSetItemId,
privy_authorization_signature: Option<&'a str>,
) -> Result<ResponseValue<DeleteItemResponse>, Error<()>>
pub async fn delete_item<'a>( &'a self, condition_set_id: &'a DeleteItemConditionSetId, condition_set_item_id: &'a DeleteItemConditionSetItemId, privy_authorization_signature: Option<&'a str>, ) -> Result<ResponseValue<DeleteItemResponse>, 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 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
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_protfolio_history_for_user<'a>(
&'a self,
user_id: &'a str,
cursor: Option<&'a str>,
end_date: Option<&'a str>,
include_assets: Option<&'a GetProtfolioHistoryForUserIncludeAssets>,
include_total_balance: Option<GetProtfolioHistoryForUserIncludeTotalBalance>,
include_total_pnl: Option<GetProtfolioHistoryForUserIncludeTotalPnl>,
quote: Option<&'a GetProtfolioHistoryForUserQuote>,
resolution: Option<u64>,
start_date: Option<&'a str>,
) -> 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 str>, include_assets: Option<&'a GetProtfolioHistoryForUserIncludeAssets>, include_total_balance: Option<GetProtfolioHistoryForUserIncludeTotalBalance>, include_total_pnl: Option<GetProtfolioHistoryForUserIncludeTotalPnl>, quote: Option<&'a GetProtfolioHistoryForUserQuote>, resolution: Option<u64>, start_date: Option<&'a str>, ) -> 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