Class: Privy::Models::Wallets::EarnDepositActionResponse

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

Defined Under Namespace

Modules: Type

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(id:, asset_address:, caip2:, created_at:, raw_amount:, share_amount:, status:, type:, vault_address:, vault_id:, wallet_id:, amount: nil, asset: nil, decimals: nil, failure_reason: nil, steps: nil) ⇒ Object

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

Response for an earn deposit action.

Parameters:



# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 105

Instance Attribute Details

#amountString?

Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when the token is known in the asset registry.

Parameters:

  • (String)

Returns:

  • (String, nil)


77
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 77

optional :amount, String

#assetString?

Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in the asset registry.

Parameters:

  • (String)

Returns:

  • (String, nil)


84
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 84

optional :asset, String

#asset_addressString

Underlying asset token address.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :asset_address, String

#caip2String

CAIP-2 chain identifier.

Parameters:

  • value (String)

Returns:

  • (String)


23
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 23

required :caip2, String

#created_atTime

ISO 8601 timestamp of when the wallet action was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


29
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 29

required :created_at, Time

#decimalsInteger?

Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only present when the token is known in the asset registry.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


91
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 91

optional :decimals, Integer

#failure_reasonPrivy::Models::Wallets::FailureReason?

A description of why a wallet action (or a step within a wallet action) failed.



97
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 97

optional :failure_reason, -> { Privy::Wallets::FailureReason }

#idString

The ID of the wallet action.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#raw_amountString

Base-unit amount of asset deposited (e.g. "1500000").

Parameters:

  • value (String)

Returns:

  • (String)


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

required :raw_amount, String

#share_amountString?

Vault shares received in base units. Populated after on-chain confirmation.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


41
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 41

required :share_amount, String, nil?: true

#statusSymbol, Privy::Models::Wallets::WalletActionStatus

Status of a wallet action.

Parameters:

  • value (Privy::Models::Wallets::wallet_action_status)

Returns:



47
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 47

required :status, enum: -> { Privy::Wallets::WalletActionStatus }

#typeSymbol, Privy::Models::Wallets::EarnDepositActionResponse::Type

Parameters:

  • value (Privy::Models::Wallets::EarnDepositActionResponse::type_)

Returns:



52
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 52

required :type, enum: -> { Privy::Wallets::EarnDepositActionResponse::Type }

#vault_addressString

ERC-4626 vault contract address.

Parameters:

  • value (String)

Returns:

  • (String)


58
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 58

required :vault_address, String

#vault_idString

The vault ID.

Parameters:

  • value (String)

Returns:

  • (String)


64
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 64

required :vault_id, String

#wallet_idString

The ID of the wallet involved in the action.

Parameters:

  • value (String)

Returns:

  • (String)


70
# File 'lib/privy/models/wallets/earn_deposit_action_response.rb', line 70

required :wallet_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


90
# File 'sig/privy/models/wallets/earn_deposit_action_response.rbs', line 90

def to_hash: -> {