how to get transactions in v4 wallet?
di-sukharev opened this issue · 5 comments
di-sukharev commented
this is code i run:
import { withCronAuth } from "@/app/api/middlewares/withCronAuth";
import TonWeb from "tonweb";
async function getBalanceAndHistory() {
const tonweb = new TonWeb(
new TonWeb.HttpProvider("https://toncenter.com/api/v2/jsonRPC", {
apiKey: process.env.MAINNET_TONCENTER_API_KEY,
})
);
const Address = TonWeb.utils.Address;
const address = new Address(process.env.MY_ADDRESS!);
const history = await tonweb.getTransactions(address);
// failing here
const balance = await tonweb.getBalance(address);
return Response.json({ success: true });
}
export const GET = withCronAuth(assignIncomingDonatesToBalances);
assignIncomingDonatesToBalances();
this is error i get: LITE_SERVER_UNKNOWN: cannot locate transaction in block with specified logical time
node v20.10.0, bun v1.0.25, both fail
di-sukharev commented
it fails with the same error if i remove TonWeb.HttpProvider
di-sukharev commented
guess its due to wallet v4 r2
which tonscan shows for my wallet
di-sukharev commented
wallet v3 addresses work good, for example this one: EQDjVXa_oltdBP64Nc__p397xLCvGm2IcZ1ba7anSW0NAkeP
895268679long commented
May I ask how to convert mnemonics into public and private keys?
Ajabgolaqajani commented
UQD1FRXPKFNFXRgmR7JZatrDWUMHFLU7kzzRrM7AiQaYrlsD