Class: Privy::Models::SwapActionResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Privy::Models::SwapActionResponse
- Defined in:
- lib/privy/models/swap_action_response.rb
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#caip2 ⇒ String
CAIP-2 chain identifier for the swap.
-
#created_at ⇒ Time
ISO 8601 timestamp of when the wallet action was created.
-
#failure_reason ⇒ Privy::Models::FailureReason?
A description of why a wallet action (or a step within a wallet action) failed.
-
#id ⇒ String
The ID of the wallet action.
-
#input_amount ⇒ String?
Exact base-unit amount of input token.
-
#input_token ⇒ String
Token address or “native” for the token being sold.
-
#output_amount ⇒ String?
Exact base-unit amount of output token.
-
#output_token ⇒ String
Token address or “native” for the token being bought.
-
#status ⇒ Symbol, Privy::Models::WalletActionStatus
Status of a wallet action.
-
#steps ⇒ Array<Privy::Models::EvmTransactionWalletActionStep, Privy::Models::EvmUserOperationWalletActionStep, Privy::Models::SvmTransactionWalletActionStep, Privy::Models::ExternalTransactionWalletActionStep>?
The steps of the wallet action.
- #type ⇒ Symbol, Privy::Models::SwapActionResponse::Type
-
#wallet_id ⇒ String
The ID of the wallet involved in the action.
Instance Method Summary collapse
-
#initialize(id:, caip2:, created_at:, input_amount:, input_token:, output_amount:, output_token:, status:, type:, wallet_id:, failure_reason: nil, steps: nil) ⇒ Object
constructor
Response for a swap action.
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:, caip2:, created_at:, input_amount:, input_token:, output_amount:, output_token:, status:, type:, wallet_id:, failure_reason: nil, steps: nil) ⇒ Object
Response for a swap action.
|
|
# File 'lib/privy/models/swap_action_response.rb', line 77
|
Instance Attribute Details
#caip2 ⇒ String
CAIP-2 chain identifier for the swap.
16 |
# File 'lib/privy/models/swap_action_response.rb', line 16 required :caip2, String |
#created_at ⇒ Time
ISO 8601 timestamp of when the wallet action was created.
22 |
# File 'lib/privy/models/swap_action_response.rb', line 22 required :created_at, Time |
#failure_reason ⇒ Privy::Models::FailureReason?
A description of why a wallet action (or a step within a wallet action) failed.
69 |
# File 'lib/privy/models/swap_action_response.rb', line 69 optional :failure_reason, -> { Privy::FailureReason } |
#id ⇒ String
The ID of the wallet action.
10 |
# File 'lib/privy/models/swap_action_response.rb', line 10 required :id, String |
#input_amount ⇒ String?
Exact base-unit amount of input token. Populated after on-chain confirmation.
28 |
# File 'lib/privy/models/swap_action_response.rb', line 28 required :input_amount, String, nil?: true |
#input_token ⇒ String
Token address or “native” for the token being sold.
34 |
# File 'lib/privy/models/swap_action_response.rb', line 34 required :input_token, String |
#output_amount ⇒ String?
Exact base-unit amount of output token. Populated after on-chain confirmation.
40 |
# File 'lib/privy/models/swap_action_response.rb', line 40 required :output_amount, String, nil?: true |
#output_token ⇒ String
Token address or “native” for the token being bought.
46 |
# File 'lib/privy/models/swap_action_response.rb', line 46 required :output_token, String |
#status ⇒ Symbol, Privy::Models::WalletActionStatus
Status of a wallet action.
52 |
# File 'lib/privy/models/swap_action_response.rb', line 52 required :status, enum: -> { Privy::WalletActionStatus } |
#steps ⇒ Array<Privy::Models::EvmTransactionWalletActionStep, Privy::Models::EvmUserOperationWalletActionStep, Privy::Models::SvmTransactionWalletActionStep, Privy::Models::ExternalTransactionWalletActionStep>?
The steps of the wallet action. Only returned if ‘?include=steps` is provided.
75 |
# File 'lib/privy/models/swap_action_response.rb', line 75 optional :steps, -> { Privy::Internal::Type::ArrayOf[union: Privy::WalletActionStep] } |
#type ⇒ Symbol, Privy::Models::SwapActionResponse::Type
57 |
# File 'lib/privy/models/swap_action_response.rb', line 57 required :type, enum: -> { Privy::SwapActionResponse::Type } |
#wallet_id ⇒ String
The ID of the wallet involved in the action.
63 |
# File 'lib/privy/models/swap_action_response.rb', line 63 required :wallet_id, String |