Class: Privy::Models::SwapQuoteResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Privy::Models::SwapQuoteResponse
- Defined in:
- lib/privy/models/swap_quote_response.rb
Instance Attribute Summary collapse
-
#caip2 ⇒ String
Chain identifier.
-
#destination_caip2 ⇒ String?
Destination chain CAIP-2 identifier for cross-chain swaps.
-
#est_output_amount ⇒ String
Estimated amount of output token in base units.
-
#estimated_fees ⇒ Array<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>?
Estimated fees for the swap.
-
#estimated_gas ⇒ Privy::Models::Gas?
Gas cost for a blockchain action.
-
#expires_at ⇒ Float?
Quote expiry as Unix timestamp (seconds).
-
#gas_estimate ⇒ String
Estimated gas cost in base units of the native token.
-
#input_amount ⇒ String
Amount of input token in base units.
-
#input_token ⇒ String
Token address being sold.
-
#minimum_output_amount ⇒ String
Minimum output amount accounting for slippage, in base units.
-
#output_token ⇒ String
Token address being bought.
Instance Method Summary collapse
-
#initialize(caip2:, est_output_amount:, gas_estimate:, input_amount:, input_token:, minimum_output_amount:, output_token:, destination_caip2: nil, estimated_fees: nil, estimated_gas: nil, expires_at: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see SwapQuoteResponse for more details.
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(caip2:, est_output_amount:, gas_estimate:, input_amount:, input_token:, minimum_output_amount:, output_token:, destination_caip2: nil, estimated_fees: nil, estimated_gas: nil, expires_at: nil) ⇒ Object
Some parameter documentations has been truncated, see Privy::Models::SwapQuoteResponse for more details.
Pricing data for a token swap.
|
|
# File 'lib/privy/models/swap_quote_response.rb', line 74
|
Instance Attribute Details
#caip2 ⇒ String
Chain identifier.
10 |
# File 'lib/privy/models/swap_quote_response.rb', line 10 required :caip2, String |
#destination_caip2 ⇒ String?
Destination chain CAIP-2 identifier for cross-chain swaps.
53 |
# File 'lib/privy/models/swap_quote_response.rb', line 53 optional :destination_caip2, String |
#est_output_amount ⇒ String
Estimated amount of output token in base units.
16 |
# File 'lib/privy/models/swap_quote_response.rb', line 16 required :est_output_amount, String |
#estimated_fees ⇒ Array<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>?
Estimated fees for the swap. Only present for cross-chain swaps.
59 |
# File 'lib/privy/models/swap_quote_response.rb', line 59 optional :estimated_fees, -> { Privy::Internal::Type::ArrayOf[union: Privy::FeeLineItem] } |
#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.
66 |
# File 'lib/privy/models/swap_quote_response.rb', line 66 optional :estimated_gas, -> { Privy::Gas } |
#expires_at ⇒ Float?
Quote expiry as Unix timestamp (seconds). Present for cross-chain quotes.
72 |
# File 'lib/privy/models/swap_quote_response.rb', line 72 optional :expires_at, Float |
#gas_estimate ⇒ String
Estimated gas cost in base units of the native token. @deprecated For cross-chain swaps, use estimated_gas instead.
23 |
# File 'lib/privy/models/swap_quote_response.rb', line 23 required :gas_estimate, String |
#input_amount ⇒ String
Amount of input token in base units.
29 |
# File 'lib/privy/models/swap_quote_response.rb', line 29 required :input_amount, String |
#input_token ⇒ String
Token address being sold.
35 |
# File 'lib/privy/models/swap_quote_response.rb', line 35 required :input_token, String |
#minimum_output_amount ⇒ String
Minimum output amount accounting for slippage, in base units.
41 |
# File 'lib/privy/models/swap_quote_response.rb', line 41 required :minimum_output_amount, String |
#output_token ⇒ String
Token address being bought.
47 |
# File 'lib/privy/models/swap_quote_response.rb', line 47 required :output_token, String |