Error saving on IPFS

I used this code now and I didn’t get any error:

Moralis = require("moralis").default

r = async () => {
  await Moralis.start({
    apiKey: "API_KEY_HERE"
  });


  const result = await Moralis.Auth.requestMessage({
      address: "0x347a96a5bd06d2e15199b032f46fb724d6c73047",
      chain: "0x1",
      network: "evm",
      domain: "google.com",
      statement: "google",
      uri: "https://google.com",
      expirationTime: "2024-01-01T00:00:00.000Z",
      timeout: 55,
    });

  console.log(result);
}

r()

I used "version": "2.16.1", for Moralis SDK

in the latest version of the sdk you have to comment this line:

as in this works:

  const result = await Moralis.Auth.requestMessage({
      address: "0x347a96a5bd06d2e15199b032f46fb724d6c73047",
      chain: "0x1",
      //network: "evm",
      domain: "google.com",
      statement: "google",
      uri: "https://google.com",
      expirationTime: "2024-01-01T00:00:00.000Z",
      timeout: 55,
    });

This is my error if I comment network line as you suggested with Moralis 2.18.1

MoralisError [Moralis SDK Core Error]: [C0005] Invalid address provided
at Function.EvmAddress.parse (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\common-evm-utils\lib\cjs\index.cjs:107:19)
at new EvmAddress (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\common-evm-utils\lib\cjs\index.cjs:75:34)
at Function.EvmAddress.create (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\common-evm-utils\lib\cjs\index.cjs:103:16)
at makeEvmRequestMessage (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:113:209)
at C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:138:43
at step (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:98:23)
at Object.next (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:79:53)
at C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:72:71
at new Promise ()
at __awaiter (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:68:12)
at C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:127:79
at Auth._this.requestMessage (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules@moralisweb3\auth\lib\cjs\index.cjs:233:90)
at exports.request (C:\PROGETTI\PERSONALI\DC3Land\Api\moralis\moralis.controller.js:30:39)
at Layer.handle [as handle_request] (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules\express\lib\router\layer.js:95:5)
at next (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules\express\lib\router\route.js:144:13)
at Route.dispatch (C:\PROGETTI\PERSONALI\DC3Land\Api\node_modules\express\lib\router\route.js:114:3) {
isMoralisError: true,
code: ‘C0005’,
details: undefined,
[cause]: undefined
}

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.