async function postMessageToIPFS(message) {
  console.log("Posting to IPFS");
  const ipfs = window.IpfsHttpClient({
    host: 'ipfs.infura.io',
    port: 5001,
    protocol: 'https'
  });  

  // stores the message in IPFS
  const response = await ipfs.add(message);

  console.log("IPFS path:", response.path);
  return response.path;
}
/**
 * Stores a message in IPFS
 * 
 * @param {string} message The message to store in IPFS
 * @returns the path in IPFS where the message was stored
 */
Stores a message in IPFS

@param {string} message The message to store in IPFS
@returns the path in IPFS where the message was stored
Stores a message in IPFS @param { string } message The message to store in IPFS @returns the path in IPFS where the message was stored
async function postMessageToIPFS(message) {
  console.log("Posting to IPFS");
  const ipfs = window.IpfsHttpClient({
    host: 'ipfs.infura.io',
    port: 5001,
    protocol: 'https'
  });  
  const response = await ipfs.add(message);
  console.log("IPFS path:", response.path);
  return response.path;
}
async function postMessageToIPFS ( message ) { console . log ( "Posting to IPFS" ) ; const ipfs = window . IpfsHttpClient ( { host : 'ipfs.infura.io' , port : 5001 , protocol : 'https' } ) ; const response = await ipfs . add ( message ) ; console . log ( "IPFS path:" , response . path ) ; return response . path ; }
Stores a message in IPFS
Stores a message in IPFS
// stores the message in IPFS