How to get account transactions?
import { L1XProvider, GetTransactionsByAccountArg } from "@l1x/l1x-wallet-sdk";
let l1xProvider = new L1XProvider({
clusterType: "mainnet",
endpoint: "https://v2-mainnet-rpc.l1x.foundation",
});
const query: GetTransactionsByAccountArg = {
address: "6e371a05d5766c692172744f4907940ef324fcb9",
number_of_transactions: 10,
starting_from: 0,
};
l1xProvider.core
.getTransactionsByAccount(query)
.then((response) => console.log(response)) // log response
.catch((err) => console.error(err)); // log error
Last updated