Class: Privy::Models::EarnAsset

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

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(address:, decimals:, symbol:) ⇒ Object

Asset metadata for an earn vault position.

Parameters:

  • address (String)

    Token contract address.

  • decimals (Integer)

    Number of decimals for the asset (e.g. 6 for USDC).

  • symbol (String)

    Lowercase token symbol (e.g. “usdc”).



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

Instance Attribute Details

#addressString

Token contract address.

Returns:

  • (String)


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

required :address, String

#decimalsInteger

Number of decimals for the asset (e.g. 6 for USDC).

Returns:

  • (Integer)


16
# File 'lib/privy/models/earn_asset.rb', line 16

required :decimals, Integer

#symbolString

Lowercase token symbol (e.g. “usdc”).

Returns:

  • (String)


22
# File 'lib/privy/models/earn_asset.rb', line 22

required :symbol, String