Class: Privy::Models::Wallets::EarnWithdrawRequestBody

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

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::Wallets::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/wallets/earn_withdraw_request_body.rb', line 27

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :raw_amount, String

#vault_idString

The ID of the vault to withdraw from.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :vault_id, String

Instance Method Details

#to_hash{ vault_id: String, amount: String, raw_amount: String }

Returns:

  • ({ vault_id: String, amount: String, raw_amount: String })


24
# File 'sig/privy/models/wallets/earn_withdraw_request_body.rbs', line 24

def to_hash: -> { vault_id: String, amount: String, raw_amount: String }