Delete DWN Records
You can delete a record stored in the user's DWN, or another party's DWN (if permission has been granted).
The following snippets allow you to delete from a DWN:
Delete record from the user's local DWN​
const deleteResult = await web5.dwn.records.delete({
message: {
recordId: recordId
},
});
Delete record from a remote DWN​
const response = await web5.dwn.records.delete({
from: did,
message: {
recordId: record.id,
},
});
The value for from
is the target DID that you wish to delete the record from.
Was this page helpful?
Connect with us on Discord
Submit feedback: Open a GitHub issue
Edit this page: GitHub Repo
Contribute: Contributing Guide