Class: Privy::Models::EthereumVaultPosition

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

Defined Under Namespace

Classes: Asset

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(asset:, assets_in_vault:, shares_in_vault:, total_deposited:, total_withdrawn:) ⇒ Object

A user’s position in a DeFi vault.

Parameters:

  • asset (Privy::Models::EthereumVaultPosition::Asset)
  • assets_in_vault (String)

    Current asset value in the vault (realtime from ERC4626), in smallest unit.

  • shares_in_vault (String)

    Current vault shares held (realtime from ERC4626).

  • total_deposited (String)

    Total amount deposited into the vault, in smallest unit.

  • total_withdrawn (String)

    Total amount withdrawn from the vault, in smallest unit.



# File 'lib/privy/models/ethereum_vault_position.rb', line 35

Instance Attribute Details

#assetPrivy::Models::EthereumVaultPosition::Asset



9
# File 'lib/privy/models/ethereum_vault_position.rb', line 9

required :asset, -> { Privy::EthereumVaultPosition::Asset }

#assets_in_vaultString

Current asset value in the vault (realtime from ERC4626), in smallest unit.

Returns:

  • (String)


15
# File 'lib/privy/models/ethereum_vault_position.rb', line 15

required :assets_in_vault, String

#shares_in_vaultString

Current vault shares held (realtime from ERC4626).

Returns:

  • (String)


21
# File 'lib/privy/models/ethereum_vault_position.rb', line 21

required :shares_in_vault, String

#total_depositedString

Total amount deposited into the vault, in smallest unit.

Returns:

  • (String)


27
# File 'lib/privy/models/ethereum_vault_position.rb', line 27

required :total_deposited, String

#total_withdrawnString

Total amount withdrawn from the vault, in smallest unit.

Returns:

  • (String)


33
# File 'lib/privy/models/ethereum_vault_position.rb', line 33

required :total_withdrawn, String