decryptPost
Decrypts the content of an encrypted post.
How to use?
content can be obtained using getPosts or getPost methods.
const res = await orbis.decryptPost(content);Parameters
content- object containing post's encrypted contentsencryptedBody-objectJSON object containing the encryption detailsencryptedString-stringEncrypted string generated by Lit ProtocolencryptedSymmetricKey-stringEncrypted symmetric key generated by Lit ProtocolaccessControlConditions-stringArray of access control conditions stored as a string
Returns
{
result: "Content of the decrypted post"
}Examples
Fetch a post and decrypt it
const { data, error } = await orbis.getPost("k...")
if(error) throw error
const unencryptedPost = await orbis.decryptPost(data.content)
console.log("Unencrypted content:", unencryptedPost.result)