Class: Privy::Models::Wallets::SwapActionResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Privy::Models::Wallets::SwapActionResponse
- Defined in:
- lib/privy/models/wallets/swap_action_response.rb,
sig/privy/models/wallets/swap_action_response.rbs
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.
-
#destination_address ⇒ String?
Recipient address on the destination chain.
-
#destination_caip2 ⇒ String?
Destination chain CAIP-2 identifier.
-
#estimated_fees ⇒ Array<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>?
Estimated fee breakdown from the provider quote.
-
#estimated_gas ⇒ Privy::Models::Gas?
Gas cost for a blockchain action.
-
#failure_reason ⇒ Privy::Models::Wallets::FailureReason?
A description of why a wallet action (or a step within a wallet action) failed.
-
#fees ⇒ Array<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>?
Actual fees paid for the swap.
-
#gas ⇒ Privy::Models::Gas?
Gas cost for a blockchain action.
-
#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::Wallets::WalletActionStatus
Status of a wallet action.
-
#steps ⇒ Array<Privy::Models::Wallets::EvmTransactionWalletActionStep, Privy::Models::Wallets::EvmUserOperationWalletActionStep, Privy::Models::Wallets::SvmTransactionWalletActionStep, Privy::Models::Wallets::TvmTransactionWalletActionStep, Privy::Models::Wallets::ExternalTransactionWalletActionStep, Privy::Models::Wallets::CustodianTransactionWalletActionStep>?
The steps of the wallet action.
- #type ⇒ Symbol, Privy::Models::Wallets::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:, destination_address: nil, destination_caip2: nil, estimated_fees: nil, estimated_gas: nil, failure_reason: nil, fees: nil, gas: nil, steps: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see SwapActionResponse for more details.
- #to_hash ⇒ {
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:, destination_address: nil, destination_caip2: nil, estimated_fees: nil, estimated_gas: nil, failure_reason: nil, fees: nil, gas: nil, steps: nil) ⇒ Object
Some parameter documentations has been truncated, see Privy::Models::Wallets::SwapActionResponse for more details.
Response for a swap action.
|
|
# File 'lib/privy/models/wallets/swap_action_response.rb', line 120
|
Instance Attribute Details
#caip2 ⇒ String
CAIP-2 chain identifier for the swap.
17 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 17 required :caip2, String |
#created_at ⇒ Time
ISO 8601 timestamp of when the wallet action was created.
23 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 23 required :created_at, Time |
#destination_address ⇒ String?
Recipient address on the destination chain. Present for cross-chain swaps. May differ from the source wallet address when swapping between chain types (e.g. EVM to Solana).
72 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 72 optional :destination_address, String |
#destination_caip2 ⇒ String?
Destination chain CAIP-2 identifier. Present for cross-chain swaps.
78 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 78 optional :destination_caip2, String |
#estimated_fees ⇒ Array<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>?
Estimated fee breakdown from the provider quote. Only present for cross-chain swaps. Populated after on-chain confirmation.
85 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 85 optional :estimated_fees, -> { Privy::Internal::Type::ArrayOf[union: Privy::FeeLineItem] }, nil?: true |
#estimated_gas ⇒ Privy::Models::Gas?
Gas cost for a blockchain action. Includes both raw base-unit amount and a human-readable decimal string, plus the gas token symbol.
92 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 92 optional :estimated_gas, -> { Privy::Gas }, nil?: true |
#failure_reason ⇒ Privy::Models::Wallets::FailureReason?
A description of why a wallet action (or a step within a wallet action) failed.
98 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 98 optional :failure_reason, -> { Privy::Wallets::FailureReason } |
#fees ⇒ Array<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>?
Actual fees paid for the swap. Populated after on-chain confirmation. Only present for cross-chain swaps.
105 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 105 optional :fees, -> { Privy::Internal::Type::ArrayOf[union: Privy::FeeLineItem] }, nil?: true |
#gas ⇒ Privy::Models::Gas?
Gas cost for a blockchain action. Includes both raw base-unit amount and a human-readable decimal string, plus the gas token symbol.
112 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 112 optional :gas, -> { Privy::Gas }, nil?: true |
#id ⇒ String
The ID of the wallet action.
11 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 11 required :id, String |
#input_amount ⇒ String?
Exact base-unit amount of input token. Populated after on-chain confirmation.
29 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 29 required :input_amount, String, nil?: true |
#input_token ⇒ String
Token address or "native" for the token being sold.
35 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 35 required :input_token, String |
#output_amount ⇒ String?
Exact base-unit amount of output token. Populated after on-chain confirmation.
41 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 41 required :output_amount, String, nil?: true |
#output_token ⇒ String
Token address or "native" for the token being bought.
47 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 47 required :output_token, String |
#status ⇒ Symbol, Privy::Models::Wallets::WalletActionStatus
Status of a wallet action.
53 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 53 required :status, enum: -> { Privy::Wallets::WalletActionStatus } |
#steps ⇒ Array<Privy::Models::Wallets::EvmTransactionWalletActionStep, Privy::Models::Wallets::EvmUserOperationWalletActionStep, Privy::Models::Wallets::SvmTransactionWalletActionStep, Privy::Models::Wallets::TvmTransactionWalletActionStep, Privy::Models::Wallets::ExternalTransactionWalletActionStep, Privy::Models::Wallets::CustodianTransactionWalletActionStep>?
The steps of the wallet action. Only returned if ?include=steps is provided.
118 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 118 optional :steps, -> { Privy::Internal::Type::ArrayOf[union: Privy::Wallets::WalletActionStep] } |
#type ⇒ Symbol, Privy::Models::Wallets::SwapActionResponse::Type
58 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 58 required :type, enum: -> { Privy::Wallets::SwapActionResponse::Type } |
#wallet_id ⇒ String
The ID of the wallet involved in the action.
64 |
# File 'lib/privy/models/wallets/swap_action_response.rb', line 64 required :wallet_id, String |
Instance Method Details
#to_hash ⇒ {
96 |
# File 'sig/privy/models/wallets/swap_action_response.rbs', line 96
def to_hash: -> {
|