python-proxy-scraper-client
Version:
A TypeScript client for interacting with a Python proxy scraper service
35 lines (34 loc) • 1.11 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.SolscanClient = void 0;
const base_client_1 = require("../../shared/base-client");
class SolscanClient extends base_client_1.BaseClient {
constructor(config = { baseUrl: 'http://localhost:8000' }) {
super(config);
}
/**
* Get account data from Solscan
* @param address The wallet address to get data for
* @returns Account data
*/
async getAccount(address) {
const params = new URLSearchParams({
address
});
const endpoint = `/solscan/account?${params.toString()}`;
return this.get(endpoint);
}
/**
* Get token balances for an account from Solscan
* @param address The wallet address to get token balances for
* @returns Token balances data
*/
async getAccountTokens(address) {
const params = new URLSearchParams({
address
});
const endpoint = `/solscan/account/tokens?${params.toString()}`;
return this.get(endpoint);
}
}
exports.SolscanClient = SolscanClient;
;