anchor-earn icon indicating copy to clipboard operation
anchor-earn copied to clipboard

AnchorEarn is not a constructor

Open ExordiumX opened this issue 3 years ago • 1 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?

ExordiumX avatar Feb 08 '22 14:02 ExordiumX

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

xapss avatar Feb 09 '22 15:02 xapss