interface Collect {
from: string;
to: string;
amount: string;
amount2: string;
}
app.post(’/webhook’, async (req: { body: any; headers: any; }, res: { status: any }) => {
const {body, headers} = req;
console.log(body)
Moralis.Streams.verifySignature({
body,
signature: headers['x-signature']
})
let decodedLogs = Moralis.Streams.parsedLogs<Collect>({webhookData: body, tag: "Swap"});
console.log(decodedLogs)
return res.status(200).json();
})