Anchor-Protocol / anchor-earn

The Earn JavaScript SDK for Anchor Protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AnchorEarn is not a constructor

ExordiumX opened this issue · comments

I'm importing the SDK like this
const AnchorEarn = require("@anchor-protocol/anchor-earn");

and then I initialize a new instance as per the guide

const anchorEarn = new AnchorEarn({
  chain: "terra",
  network: "columbus-5",
  address: "MY_ADDRESS",

But I get this error
AnchorEarn is not a constructor

What am I doing wrong?

Try const {AnchorEarn} = require("@anchor-protocol/anchor-earn");