Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting a transaction does not include the input addresses #5000

Closed
3 tasks done
Melraidin opened this issue Feb 25, 2025 · 4 comments
Closed
3 tasks done

Getting a transaction does not include the input addresses #5000

Melraidin opened this issue Feb 25, 2025 · 4 comments

Comments

@Melraidin
Copy link

Just checking...

  • This is a cardano-wallet bug.
  • I am using the latest cardano-wallet release.
  • I am using the correct cardano-node version for that release of cardano-wallet.

Version

v2025-02-19 (git revision: 0000000000000000000000000000000000000000)

Platform

Linux 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Installation method

Built from source

Network configuration

Preview testnet

Context

Retrieving details of transactions from external addresses.

Description

Steps to Reproduce

  1. Make a request to https://cardano-foundation.github.io/cardano-wallet/api/edge/#operation/getTransaction
    curl -H"Content-Type: application/json" 'http://localhost:8090/v2/wallets/[...]/transactions/[...]' | j
  2. Note that the inputs map does not include an address element for each input.
    ...

Expected behavior

Each input contains an address string element containing the source address as shown in the example response.

Actual behavior

The inputs do not include addresses.

@paolino
Copy link
Collaborator

paolino commented Feb 26, 2025

Hello.

If the inspected transaction is an incoming one, the following applies. If not, this could be a bug.

The wallet database contains only transactions involving the wallet addresses.
One of the consequences is that only inputs pointing to one of those transactions can be resolved, or, to put it in another way, only spending transactions will have inputs resolved to addresses.

Being able to resolve any input requires access to the global transaction history, which is information we do not store.

I get from the context, that resolving external addresses is probably what you are aiming at and so that transaction is incoming. In that case there is nothing we can do to fix it.

@HeinrichApfelmus
Copy link
Contributor

Indeed. The transaction data on the Cardano blockchain does not record addresses or coins for inputs — these inputs need to be resolved. Cardano-wallet currently does not attempt to resolve and store inputs that are external. (The returned fields are marked as optional in the GET /wallets/{walletId}/transactions request.) For a fully general solution, you probably need a chain-indexer.

I would classify this issue as a feature request.

Could you provide us with more context of how you would be using the data (incoming addresses) in the hypothetical scenario that cardano-wallet were able to provide it?

@Melraidin
Copy link
Author

We need the incoming addresses to display in our UI. Without being able to get this from cardano-wallet we either need to rely on an external service, e.g., Blockfrost, or run another service against our own cardano-node, e.g., cardano-rosetta-java, to be able to get this data.

@abailly
Copy link
Collaborator

abailly commented Mar 4, 2025

Unfortunately we don't have a good solution within cardano-wallet and don't plan on providing one. This is something that could possibly be addressed as part of the deposit wallet.

@abailly abailly closed this as completed Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants