Class: Privy::Models::AdvancedSwapRequestBody
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Privy::Models::AdvancedSwapRequestBody
- Defined in:
- lib/privy/models/advanced_swap_request_body.rb,
sig/privy/models/advanced_swap_request_body.rbs
Defined Under Namespace
Modules: SlippageBps
Instance Attribute Summary collapse
-
#amount ⇒ String
Amount in the smallest unit of the input token (e.g. lamports for SOL).
-
#caip2 ⇒ String?
CAIP-2 chain identifier.
-
#dry_run ⇒ Boolean?
When true, skip transaction submission (quote + sign only).
-
#fee_recipient ⇒ String?
Token account (base58) to receive the platform fee.
-
#input_token ⇒ String
Input token address (base58 mint address).
-
#output_token ⇒ String
Output token address (base58 mint address).
-
#platform_fee_bps ⇒ Integer?
Platform fee in basis points, taken from the output token.
-
#slippage_bps ⇒ Integer, ...
Max slippage tolerance in basis points (0-10000), or "auto" for provider-determined.
Instance Method Summary collapse
-
#initialize(amount:, input_token:, output_token:, caip2: nil, dry_run: nil, fee_recipient: nil, platform_fee_bps: nil, slippage_bps: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see AdvancedSwapRequestBody 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(amount:, input_token:, output_token:, caip2: nil, dry_run: nil, fee_recipient: nil, platform_fee_bps: nil, slippage_bps: nil) ⇒ Object
Some parameter documentations has been truncated, see Privy::Models::AdvancedSwapRequestBody for more details.
Request body for initiating a synchronous Solana token swap through an embedded wallet.
|
|
# File 'lib/privy/models/advanced_swap_request_body.rb', line 58
|
Instance Attribute Details
#amount ⇒ String
Amount in the smallest unit of the input token (e.g. lamports for SOL).
10 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 10 required :amount, String |
#caip2 ⇒ String?
CAIP-2 chain identifier. Defaults to Solana mainnet.
28 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 28 optional :caip2, String |
#dry_run ⇒ Boolean?
When true, skip transaction submission (quote + sign only). The signed transaction is still returned.
35 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 35 optional :dry_run, Privy::Internal::Type::Boolean |
#fee_recipient ⇒ String?
Token account (base58) to receive the platform fee. Must exist on-chain for the output token.
42 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 42 optional :fee_recipient, String |
#input_token ⇒ String
Input token address (base58 mint address).
16 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 16 required :input_token, String |
#output_token ⇒ String
Output token address (base58 mint address).
22 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 22 required :output_token, String |
#platform_fee_bps ⇒ Integer?
Platform fee in basis points, taken from the output token. Requires fee_recipient when > 0.
49 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 49 optional :platform_fee_bps, Integer |
#slippage_bps ⇒ Integer, ...
Max slippage tolerance in basis points (0-10000), or "auto" for provider-determined. Defaults to "auto".
56 |
# File 'lib/privy/models/advanced_swap_request_body.rb', line 56 optional :slippage_bps, union: -> { Privy::AdvancedSwapRequestBody::SlippageBps } |
Instance Method Details
#to_hash ⇒ {
55 |
# File 'sig/privy/models/advanced_swap_request_body.rbs', line 55
def to_hash: -> {
|