Web5

Create a Decentralized Identifier (DID)


          let web5;
          let myDid;
          ({ web5, did: myDid } = await Web5.connect());
          
Hit "Run" above to create DID

Write some data


          let result = await web5.dwn.records.create({
            data,
            message: {
              dataFormat: 'text/plain',
            },
          });
        
...

Read the data


          const readResult = await record.data.text();
      

Update the message


          const updateResult = await record.update({data: "Hello, I'm updated!"});
        

Delete the message


          const deleteResult = await record.delete();
        
...