Class: Privy::Models::EarnDepositActionResponse

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

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::EarnDepositActionResponse for more details.

Response for an earn deposit action.

Parameters:

  • id (String)

    The ID of the wallet action.

  • asset_address (String)

    Underlying asset token address.

  • caip2 (String)

    CAIP-2 chain identifier.

  • created_at (Time)

    ISO 8601 timestamp of when the wallet action was created.

  • raw_amount (String)

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

  • share_amount (String, nil)

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

  • status (Symbol, Privy::Models::WalletActionStatus)

    Status of a wallet action.

  • type (Symbol, Privy::Models::EarnDepositActionResponse::Type)
  • vault_address (String)

    ERC-4626 vault contract address.

  • vault_id (String)

    The vault ID.

  • wallet_id (String)

    The ID of the wallet involved in the action.

  • amount (String) (defaults to: nil)

    Human-readable decimal amount of asset deposited (e.g. “1.5”). Only present when

  • asset (String) (defaults to: nil)

    Asset identifier (e.g. “usdc”, “eth”). Only present when the token is known in t

  • decimals (Integer) (defaults to: nil)

    Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only

  • failure_reason (Privy::Models::FailureReason) (defaults to: nil)

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

  • steps (Array<Privy::Models::EvmTransactionWalletActionStep, Privy::Models::EvmUserOperationWalletActionStep, Privy::Models::SvmTransactionWalletActionStep, Privy::Models::ExternalTransactionWalletActionStep>) (defaults to: nil)

    The steps of the wallet action. Only returned if ‘?include=steps` is provided.



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

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.

Returns:

  • (String, nil)


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

optional :amount, String

#assetString?

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

Returns:

  • (String, nil)


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

optional :asset, String

#asset_addressString

Underlying asset token address.

Returns:

  • (String)


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

required :asset_address, String

#caip2String

CAIP-2 chain identifier.

Returns:

  • (String)


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

required :caip2, String

#created_atTime

ISO 8601 timestamp of when the wallet action was created.

Returns:

  • (Time)


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

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.

Returns:

  • (Integer, nil)


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

optional :decimals, Integer

#failure_reasonPrivy::Models::FailureReason?

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



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

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

#idString

The ID of the wallet action.

Returns:

  • (String)


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

required :id, String

#raw_amountString

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

Returns:

  • (String)


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

required :raw_amount, String

#share_amountString?

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

Returns:

  • (String, nil)


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

required :share_amount, String, nil?: true

#statusSymbol, Privy::Models::WalletActionStatus

Status of a wallet action.



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

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

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



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

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

#vault_addressString

ERC-4626 vault contract address.

Returns:

  • (String)


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

required :vault_address, String

#vault_idString

The vault ID.

Returns:

  • (String)


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

required :vault_id, String

#wallet_idString

The ID of the wallet involved in the action.

Returns:

  • (String)


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

required :wallet_id, String