I got email Live Streams API today and so happy to implement new this feature.I follow sample code on Moralis Doc but got error :
{"name":"Moralis SDK Core Error","source":"server","message":"[C0008] Default instance of MoralisCore is not set","stack":"Moralis SDK Core Error: [C0008] Default instance of MoralisCore is not set\\n at Function.MoralisCoreProvider.getDefault }
/api/addStream.js
My code :
import Moralis from 'moralis';
import { EvmChain } from "@moralisweb3/evm-utils";
Moralis.start({
apiKey: process.env.MORALIS_API_KEY,
});
const stream = {
chains: [EvmChain.GOERLI], // list of blockchains to monitor
description: "monitor Bobs wallet", // your description
tag: "bob", // give it a tag
webhookUrl: "mystite.com", // webhook url to receive events,
}
How to fix issues? thanks for reading