Class: Privy::Models::Wallets::TransferActionResponse

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

Defined Under Namespace

Modules: Type

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(id:, created_at:, destination_address:, destination_amount:, source_chain:, status:, type:, wallet_id:, amount_type: nil, destination_asset: nil, destination_chain: nil, estimated_fees: nil, estimated_gas: nil, failure_reason: nil, fees: nil, gas: nil, source_amount: nil, source_asset: nil, source_asset_address: nil, source_asset_decimals: nil, steps: nil) ⇒ Object

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

Response for a transfer action.

Parameters:



# File 'lib/privy/models/wallets/transfer_action_response.rb', line 142

Instance Attribute Details

#amount_typeSymbol, ...

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

Returns:



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

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

#created_atTime

ISO 8601 timestamp of when the wallet action was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#destination_addressString

Recipient address.

Parameters:

  • value (String)

Returns:

  • (String)


23
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 23

required :destination_address, String

#destination_amountString?

Amount received on the destination chain. For exact_output cross-chain transfers, set at creation (the guaranteed exact amount). For exact_input cross-chain transfers, null until fill confirmation.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


31
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 31

required :destination_amount, String, nil?: true

#destination_assetString?

Destination asset for cross-asset transfers. Omitted for same-asset transfers.

Parameters:

  • (String)

Returns:

  • (String, nil)


66
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 66

optional :destination_asset, String

#destination_chainString?

Destination chain for cross-chain transfers. Omitted for same-chain transfers.

Parameters:

  • (String)

Returns:

  • (String, nil)


72
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 72

optional :destination_chain, String

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

Estimated fee breakdown from the provider quote. Only present for cross-chain or cross-asset transfers. Populated after on-chain confirmation.

Parameters:

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

Returns:



79
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 79

optional :estimated_fees, -> { Privy::Internal::Type::ArrayOf[union: Privy::FeeLineItem] }, nil?: true

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



86
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 86

optional :estimated_gas, -> { Privy::Gas }, nil?: true

#failure_reasonPrivy::Models::Wallets::FailureReason?

A description of why a wallet action (or a step within a wallet action) failed.



92
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 92

optional :failure_reason, -> { Privy::Wallets::FailureReason }

#feesArray<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>?

Actual fees paid for the transfer. Populated after on-chain confirmation. Only present for cross-chain transfers.

Parameters:

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

Returns:



99
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 99

optional :fees, -> { Privy::Internal::Type::ArrayOf[union: Privy::FeeLineItem] }, nil?: true

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



106
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 106

optional :gas, -> { Privy::Gas }, nil?: true

#idString

The ID of the wallet action.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#source_amountString?

Decimal amount sent on the source chain (e.g. "1.5"). For exact_output cross-chain transfers, null until fill confirmation.

Parameters:

  • (String)

Returns:

  • (String, nil)


113
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 113

optional :source_amount, String

#source_assetString?

Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated with a named asset; omitted for custom-token transfers.

Parameters:

  • (String)

Returns:

  • (String, nil)


120
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 120

optional :source_asset, String

#source_asset_addressString?

Token contract address (EVM) or mint address (Solana). Present when the transfer was initiated with asset_address.

Parameters:

  • (String)

Returns:

  • (String, nil)


127
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 127

optional :source_asset_address, String

#source_asset_decimalsInteger?

Number of decimals for the transferred token. Present when the transfer was initiated with asset_address and the decimals were resolved on-chain.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


134
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 134

optional :source_asset_decimals, Integer

#source_chainString

Chain name (e.g. "base", "ethereum").

Parameters:

  • value (String)

Returns:

  • (String)


37
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 37

required :source_chain, String

#statusSymbol, Privy::Models::Wallets::WalletActionStatus

Status of a wallet action.

Parameters:

  • value (Privy::Models::Wallets::wallet_action_status)

Returns:



43
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 43

required :status, enum: -> { Privy::Wallets::WalletActionStatus }

#typeSymbol, Privy::Models::Wallets::TransferActionResponse::Type

Parameters:

  • value (Privy::Models::Wallets::TransferActionResponse::type_)

Returns:



48
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 48

required :type, enum: -> { Privy::Wallets::TransferActionResponse::Type }

#wallet_idString

The ID of the wallet involved in the action.

Parameters:

  • value (String)

Returns:

  • (String)


54
# File 'lib/privy/models/wallets/transfer_action_response.rb', line 54

required :wallet_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


120
# File 'sig/privy/models/wallets/transfer_action_response.rbs', line 120

def to_hash: -> {