Class: Privy::Models::TransferActionResponse

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

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:, source_chain:, status:, type:, wallet_id:, destination_amount: nil, destination_asset: nil, destination_chain: nil, failure_reason: nil, fees: 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::TransferActionResponse for more details.

Response for a transfer action.

Parameters:

  • id (String)

    The ID of the wallet action.

  • created_at (Time)

    ISO 8601 timestamp of when the wallet action was created.

  • destination_address (String)

    Recipient address.

  • source_chain (String)

    Chain name (e.g. “base”, “ethereum”).

  • status (Symbol, Privy::Models::WalletActionStatus)

    Status of a wallet action.

  • type (Symbol, Privy::Models::TransferActionResponse::Type)
  • wallet_id (String)

    The ID of the wallet involved in the action.

  • destination_amount (String) (defaults to: nil)

    Amount received on the destination chain. Populated immediately for exact_output

  • destination_asset (String) (defaults to: nil)

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

  • destination_chain (String) (defaults to: nil)

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

  • failure_reason (Privy::Models::FailureReason) (defaults to: nil)

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

  • fees (Array<Privy::Models::RelayerFee, Privy::Models::PrivyFee, Privy::Models::DeveloperFee>) (defaults to: nil)

    Fees paid for the transfer.

  • source_amount (String) (defaults to: nil)

    Decimal amount sent on the source chain (e.g. “1.5”). Omitted for exact_output c

  • source_asset (String) (defaults to: nil)

    Asset identifier (e.g. “usdc”, “eth”). Present when the transfer was initiated w

  • source_asset_address (String) (defaults to: nil)

    Token contract address (EVM) or mint address (Solana). Present when the transfer

  • source_asset_decimals (Integer) (defaults to: nil)

    Number of decimals for the transferred token. Present when the transfer was init

  • steps (Array<Privy::Models::EvmTransactionWalletActionStep, Privy::Models::EvmUserOperationWalletActionStep, Privy::Models::SvmTransactionWalletActionStep, Privy::Models::ExternalTransactionWalletActionStep>) (defaults to: nil)

    The steps of the wallet action. Only returned if ‘?include=steps` is provided.



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

Instance Attribute Details

#created_atTime

ISO 8601 timestamp of when the wallet action was created.

Returns:

  • (Time)


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

required :created_at, Time

#destination_addressString

Recipient address.

Returns:

  • (String)


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

required :destination_address, String

#destination_amountString?

Amount received on the destination chain. Populated immediately for exact_output transfers, or after fill confirmation for exact_input transfers.

Returns:

  • (String, nil)


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

optional :destination_amount, String

#destination_assetString?

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

Returns:

  • (String, nil)


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

optional :destination_asset, String

#destination_chainString?

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

Returns:

  • (String, nil)


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

optional :destination_chain, String

#failure_reasonPrivy::Models::FailureReason?

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



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

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

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

Fees paid for the transfer.



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

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

#idString

The ID of the wallet action.

Returns:

  • (String)


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

required :id, String

#source_amountString?

Decimal amount sent on the source chain (e.g. “1.5”). Omitted for exact_output cross-chain transfers until the source amount is determined.

Returns:

  • (String, nil)


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

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.

Returns:

  • (String, nil)


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

optional :source_asset, String

#source_asset_addressString?

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

Returns:

  • (String, nil)


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

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.

Returns:

  • (Integer, nil)


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

optional :source_asset_decimals, Integer

#source_chainString

Chain name (e.g. “base”, “ethereum”).

Returns:

  • (String)


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

required :source_chain, String

#statusSymbol, Privy::Models::WalletActionStatus

Status of a wallet action.



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

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

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



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

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

#wallet_idString

The ID of the wallet involved in the action.

Returns:

  • (String)


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

required :wallet_id, String