I'm trying to get the balance of an account with this code (dfuse example):
global.fetch = require("node-fetch");
global.WebSocket = require("ws");
const { createDfuseClient } = require("@dfuse/client")
const client = createDfuseClient({
apiKey: "myKey", network: "mainnet"
});
const resp = await client.stateTable("eosio.token", "myaccount", "accounts")
const { balance } = resp.rows[0].json
const message = `Balance: ${balance} (#${resp.up_to_block_num})`
However, I need to specify a proxy agent to connect to the endpoint, since I go via a proxy server. Anybody knows how to do this?
Thanks