Data uploaded to Irys is stored permanently on Arweave. Once on Arweave, this data becomes publicly accessible, anyone can view or retrieve it. For projects where privacy is a concern, you can use LitProtocol to encrypt data before storing it on Irys.
This repository teaches you how to:
- Encrypt data before storing it on-chain
- Establish a set of rules determining who can decrypt the data
- Decrypt data
There are three steps to encrypting data
- Obtain a wallet signature (AuthSig), which proves you own a wallet
- Define access control conditions for who can decrypt your data
- Connect to a Lit node and request that it encrypt your data
Once encrypted, use Irys to store your data on Arweave.
There are three steps to decrypting data:
- Obtain a wallet signature (AuthSig), which proves you own a wallet
- Retrieve data stored on Arweave via the Irys gateway
- Connect to a Lit node and request it decrypt your data
For a deeper dive, check out our docs:
- Clone this repository
- Rename
.env.example
to.env
and add a private key cd irys-lit
yarn
Install with yarn only. There is currently a bug in the Lit Protocol npm install script, it will be fixed soon
node scripts/lit-irys.js