So the goal is to send NFTs from a wallet, which has been generated by the ethers.js library.
I want to use this method https://docs.moralis.io/moralis-server/sending-assets#transferring-erc721-tokens-non-fungible
But before that, I have to connect my ethers.js generated wallet with Moralis (or Moralis could generate a new one, which is also totally fine). I am using require('moralis/node');
However, I canโt run
await Moralis.authenticate();
or
await Moralis.enableWeb3();
because
...InjectedWeb3Connector.js:66
if (!((_window = window) !== null && _window !== void 0 && _window.ethereum)) {
^
ReferenceError: window is not defined
Which makes sense, since there is now window
on NodeJS.
So how do I proceed? Is there a way to send NFTs from the serverside wallet with Moralis or do I have to use another library?