Class: Privy::Models::SwapRequestBody
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Privy::Models::SwapRequestBody
- Defined in:
- lib/privy/models/swap_request_body.rb
Instance Attribute Summary collapse
-
#amount_type ⇒ Symbol, ...
Whether the amount refers to the input token or output token.
-
#base_amount ⇒ String
Amount in base units (e.g., wei for ETH).
-
#destination ⇒ Privy::Models::SwapDestination
The output side of a swap execution request.
-
#slippage_bps ⇒ Float?
Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
-
#source ⇒ Privy::Models::SwapSource
The input side of a swap request, including token and chain.
Instance Method Summary collapse
-
#initialize(base_amount:, destination:, source:, amount_type: nil, slippage_bps: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see SwapRequestBody 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(base_amount:, destination:, source:, amount_type: nil, slippage_bps: nil) ⇒ Object
Some parameter documentations has been truncated, see Privy::Models::SwapRequestBody for more details.
Input for executing a token swap.
|
|
# File 'lib/privy/models/swap_request_body.rb', line 36
|
Instance Attribute Details
#amount_type ⇒ Symbol, ...
Whether the amount refers to the input token or output token.
28 |
# File 'lib/privy/models/swap_request_body.rb', line 28 optional :amount_type, enum: -> { Privy::AmountType } |
#base_amount ⇒ String
Amount in base units (e.g., wei for ETH). Must be a non-negative integer string.
10 |
# File 'lib/privy/models/swap_request_body.rb', line 10 required :base_amount, String |
#destination ⇒ Privy::Models::SwapDestination
The output side of a swap execution request.
16 |
# File 'lib/privy/models/swap_request_body.rb', line 16 required :destination, -> { Privy::SwapDestination } |
#slippage_bps ⇒ Float?
Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
34 |
# File 'lib/privy/models/swap_request_body.rb', line 34 optional :slippage_bps, Float |
#source ⇒ Privy::Models::SwapSource
The input side of a swap request, including token and chain.
22 |
# File 'lib/privy/models/swap_request_body.rb', line 22 required :source, -> { Privy::SwapSource } |