anchor-earn
anchor-earn copied to clipboard
AnchorEarn is not a constructor
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");