Dfinity/agent @0.6.16/17

Hey @bengo -

I’m struggling to figure out how to replace the injected agent. My naive approach was as follows.

// index.js
const agentOptions = {
  identity: new AnonymousIdentity(),
};
agent = new HttpAgent(agentOptions);
agent.addTransform(makeNonceTransform());
agent.addTransform(makeExpiryTransform(5 * 60 * 1000));
window.ic.agent = agent;

I noticed the injected ic.agent is a ProxyAgent class, which I can’t find anywhere.

I have deployed an app here https://rndfa-pyaaa-aaaab-qadua-cai.ic0.app/

window.anotherAgent is set to the above code, and window.ic.agent is naturally the default

Any thoughts?