Encrypt a string or file using the LIT network public key and serialise all the metadata required to decrypt i.e. accessControlConditions, evmContractConditions, solRpcConditions, unifiedAccessControlConditions & chain to JSON

Useful for encrypting/decrypting data in IPFS or other storage without compressing it in a file.

  • Parameters

    • params: EncryptToJsonProps

      { EncryptToJsonProps } - The params required to encrypt either a file or string and serialise it to JSON

    Returns Promise<string>

    • JSON serialised string of the encrypted data and associated metadata necessary to decrypt it later