pub struct EarnDepositRequestBody {
pub amount: Option<EarnDepositRequestBodyAmount>,
pub raw_amount: Option<EarnDepositRequestBodyRawAmount>,
pub vault_id: String,
}Expand description
Input for depositing assets into an ERC-4626 vault. Exactly one of
amount or raw_amount must be provided.
JSON schema
{
"title": "EarnDepositRequestBody",
"description": "Input for depositing assets into an ERC-4626 vault.
Exactly one of `amount` or `raw_amount` must be provided.",
"examples": [
{
"amount": "1.5",
"vault_id": "cm7oxq1el000e11o8iwp7d0d0"
}
],
"type": "object",
"required": [
"vault_id"
],
"properties": {
"amount": {
"description": "Human-readable decimal amount to deposit (e.g.
\"1.5\" for 1.5 USDC). Exactly one of `amount` or `raw_amount` must be
provided.",
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^\\d+(\\.\\d+)?$"
},
"raw_amount": {
"description": "Amount in smallest unit to deposit (e.g.
\"1500000\" for 1.5 USDC with 6 decimals). Exactly one of `amount` or
`raw_amount` must be provided.",
"type": "string",
"maxLength": 78,
"minLength": 1,
"pattern": "^\\d+$"
},
"vault_id": {
"description": "The ID of the vault to deposit into.",
"type": "string"
}
},
"x-stainless-model": "wallet_actions.earn_deposit_request_body"
}Fields§
§amount: Option<EarnDepositRequestBodyAmount>Human-readable decimal amount to deposit (e.g. “1.5” for 1.5 USDC).
Exactly one of amount or raw_amount must be provided.
raw_amount: Option<EarnDepositRequestBodyRawAmount>Amount in smallest unit to deposit (e.g. “1500000” for 1.5 USDC with
6 decimals). Exactly one of amount or raw_amount must be
provided.
vault_id: StringThe ID of the vault to deposit into.
Trait Implementations§
Source§impl Clone for EarnDepositRequestBody
impl Clone for EarnDepositRequestBody
Source§fn clone(&self) -> EarnDepositRequestBody
fn clone(&self) -> EarnDepositRequestBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EarnDepositRequestBody
impl Debug for EarnDepositRequestBody
Source§impl<'de> Deserialize<'de> for EarnDepositRequestBody
impl<'de> Deserialize<'de> for EarnDepositRequestBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&EarnDepositRequestBody> for EarnDepositRequestBody
impl From<&EarnDepositRequestBody> for EarnDepositRequestBody
Source§fn from(value: &EarnDepositRequestBody) -> Self
fn from(value: &EarnDepositRequestBody) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EarnDepositRequestBody
impl RefUnwindSafe for EarnDepositRequestBody
impl Send for EarnDepositRequestBody
impl Sync for EarnDepositRequestBody
impl Unpin for EarnDepositRequestBody
impl UnsafeUnpin for EarnDepositRequestBody
impl UnwindSafe for EarnDepositRequestBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more