Class: Privy::Models::TransferQuoteResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/transfer_quote_response.rb,
sig/privy/models/transfer_quote_response.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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(destination:, estimated_fees:, estimated_input_amount:, estimated_output_amount:, expires_at:, source:, amount_type: nil, estimated_gas: nil) ⇒ Object

Some parameter documentations has been truncated, see Privy::Models::TransferQuoteResponse for more details.

Response containing a quote for a cross-asset or cross-chain (DADC) transfer.

Parameters:



# File 'lib/privy/models/transfer_quote_response.rb', line 60

Instance Attribute Details

#amount_typeSymbol, ...

Whether the amount refers to the input token or output token.

Returns:



51
# File 'lib/privy/models/transfer_quote_response.rb', line 51

optional :amount_type, enum: -> { Privy::AmountType }

#destinationPrivy::Models::TokenTransferDestination

The destination address for a token transfer. Optionally specify a different asset or chain for cross-asset or cross-chain transfers.



11
# File 'lib/privy/models/transfer_quote_response.rb', line 11

required :destination, -> { Privy::TokenTransferDestination }

#estimated_feesArray<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>

Estimated fees in USD for the transfer. Only present for cross-chain transfers.

Parameters:

  • value (::Array[Privy::Models::fee_line_item])

Returns:



17
# File 'lib/privy/models/transfer_quote_response.rb', line 17

required :estimated_fees, -> { Privy::Internal::Type::ArrayOf[union: Privy::FeeLineItem] }

#estimated_gasPrivy::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.

Parameters:

Returns:



58
# File 'lib/privy/models/transfer_quote_response.rb', line 58

optional :estimated_gas, -> { Privy::Gas }

#estimated_input_amountString

Estimated input amount in decimals. For exact_input, this equals source.amount. For exact_output, this is the estimated amount the sender needs to provide.

Parameters:

  • value (String)

Returns:

  • (String)


24
# File 'lib/privy/models/transfer_quote_response.rb', line 24

required :estimated_input_amount, String

#estimated_output_amountString

Estimated output amount in decimals. For exact_input, this is an estimate subject to slippage. For exact_output, this is the guaranteed exact amount to be received.

Parameters:

  • value (String)

Returns:

  • (String)


32
# File 'lib/privy/models/transfer_quote_response.rb', line 32

required :estimated_output_amount, String

#expires_atFloat

Quote expiry as Unix timestamp (seconds).

Parameters:

  • value (Float)

Returns:

  • (Float)


38
# File 'lib/privy/models/transfer_quote_response.rb', line 38

required :expires_at, Float

#sourcePrivy::Models::NamedTokenTransferSource, Privy::Models::CustomTokenTransferSource

The source asset, amount, and chain for a token transfer. Specify either asset (named) or asset_address (custom), not both.

Parameters:

  • value (Privy::Models::token_transfer_source)

Returns:



45
# File 'lib/privy/models/transfer_quote_response.rb', line 45

required :source, union: -> { Privy::TokenTransferSource }

Instance Method Details

#to_hash{

Returns:

  • ({)


49
# File 'sig/privy/models/transfer_quote_response.rbs', line 49

def to_hash: -> {