Class: Privy::Resources::Wallets::Transactions

Inherits:
Object
  • Object
show all
Defined in:
lib/privy/resources/wallets/transactions.rb

Overview

Operations related to wallets

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Transactions

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Transactions.

Parameters:



49
50
51
# File 'lib/privy/resources/wallets/transactions.rb', line 49

def initialize(client:)
  @client = client
end

Instance Method Details

#get(wallet_id, chain:, token: nil, asset: nil, cursor: nil, limit: nil, tx_hash: nil, request_options: {}) ⇒ Privy::Models::Wallets::TransactionGetResponse

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

Get incoming and outgoing transactions of a wallet by wallet ID.

Parameters:

Returns:

See Also:



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/privy/resources/wallets/transactions.rb', line 34

def get(wallet_id, params)
  parsed, options = Privy::Wallets::TransactionGetParams.dump_request(params)
  query = Privy::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["v1/wallets/%1$s/transactions", wallet_id],
    query: query,
    model: Privy::Models::Wallets::TransactionGetResponse,
    options: options
  )
end