Pinning allows you to add and remove streams from the permanent pinset in your Ceramic node.
By default Ceramic will garbage collect any stream that has been created, modified, or loaded after some period of time. In order to prevent the loss of streams due to garbage collection, you need to pin the streams that you wish to persist. Pinning instructs the Ceramic node to keep them around in persistent storage until they are unpinned.
Pinning requires having installed a Ceramic client in your project.
Add to pinset¶
pin.add() method to add a stream to your permanent pinset.
const streamId = 'kjzl6cwe1jw14...' await ceramic.pin.add(streamId)
Remove from pinset¶
pin.rm() method to remove a stream from your permanent pinset.
const streamId = 'kjzl6cwe1jw14...' await ceramic.pin.rm(streamId)
List streamss in pinset¶
pin.ls() method to list streams currently in your permanent pinset.
const streamIds = await ceramic.pin.ls()