Class: Privy::Models::EarnWithdrawRequestBody

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/earn_withdraw_request_body.rb

Direct Known Subclasses

Wallets::Earn::EthereumWithdrawParams

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(vault_id:, amount: nil, raw_amount: nil) ⇒ Object

Some parameter documentations has been truncated, see Privy::Models::EarnWithdrawRequestBody for more details.

Input for withdrawing assets from an ERC-4626 vault. Exactly one of ‘amount` or `raw_amount` must be provided.

Parameters:

  • vault_id (String)

    The ID of the vault to withdraw from.

  • amount (String) (defaults to: nil)

    Human-readable decimal amount to withdraw (e.g. “1.5” for 1.5 USDC). Exactly one

  • raw_amount (String) (defaults to: nil)

    Amount in smallest unit to withdraw (e.g. “1500000” for 1.5 USDC with 6 decimals



# File 'lib/privy/models/earn_withdraw_request_body.rb', line 26

Instance Attribute Details

#amountString?

Human-readable decimal amount to withdraw (e.g. “1.5” for 1.5 USDC). Exactly one of ‘amount` or `raw_amount` must be provided.

Returns:

  • (String, nil)


17
# File 'lib/privy/models/earn_withdraw_request_body.rb', line 17

optional :amount, String

#raw_amountString?

Amount in smallest unit to withdraw (e.g. “1500000” for 1.5 USDC with 6 decimals). Exactly one of ‘amount` or `raw_amount` must be provided.

Returns:

  • (String, nil)


24
# File 'lib/privy/models/earn_withdraw_request_body.rb', line 24

optional :raw_amount, String

#vault_idString

The ID of the vault to withdraw from.

Returns:

  • (String)


10
# File 'lib/privy/models/earn_withdraw_request_body.rb', line 10

required :vault_id, String