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

How can I get transaction data by hash? #77

Open
0xBeycan opened this issue Jan 8, 2025 · 2 comments
Open

How can I get transaction data by hash? #77

0xBeycan opened this issue Jan 8, 2025 · 2 comments

Comments

@0xBeycan
Copy link

0xBeycan commented Jan 8, 2025

I tried with TonClient but I get an invalid hash error when I try the hash from the TonKeeper wallet that shows up in the scanner.

Also what exactly is logical time (lt)? Is there any way to get the transaction data with just transaction hash without using lt and address?

https://testnet.tonscan.org/tx/6f97ca02d8f20151210ca2bef32340804214e4f74eebf6a9edf13b727ac2527e

// get tx data
;(async () => {
    const lt = String(1)
    const senderAddress = Address.parse('0QBh14OFHZqXqMyAHUio8EZ9FAf5smnkcmb0j533aHtFNcsF')

    const tonTransferTx = '6f97ca02d8f20151210ca2bef32340804214e4f74eebf6a9edf13b727ac2527e'
    const transactionData = await client.getTransaction(senderAddress, lt, tonTransferTx)

    console.log('Transaction Data:', transactionData)
})()

returning error

    data: { ok: false, error: 'Invalid hash', code: 503 }
  },
  status: 503
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

3 participants
@0xBeycan and others