Cherry
Search…
Application Programming Interface

Cherry Node IPFS Features

Ownerships

Share your files with other peers through OwnershipLayers (Owner, Editor, Reader). You can give and/or revoke the OwnershipLayer of any peer as long as your are the Owner of the IPFS asset.
  • Owners can read, edit and delete an IPFS asset.
  • Editors can read and edit an IPFS asset.
  • Readers can only read an IPFS asset.
Change the OwnershipLayer you have given to any peer, as long as you are the Owner of the asset.
Pin any IPFS asset that someone shared with you.
Files you upload are automatically pinned. Pinning an IPFS asset allows you to tell the IPFS to always keep the pinned asset in your local node. Also, by pinning an IPFS asset, you are able to share it with other peers.
Unpin any IPFS asset that you do not want to share anymore.

Callable functions in Cherry

  1. 1.
    create_ipfs_asset : Create the file you want to upload.
  2. 2.
    pin_ipfs_asset : Pin

pin_ipfs_asset(origin, address, cid)

Pins an IPFS asset.
The IPFS assets you upload, are automatically pinned on creation.
You need to be the asset's owner to pin it.

unpin_ipfs_asset(origin, address, cid)

Unpins an IPFS asset you own.
You need to be the asset's owner to unpin it.

delete_ipfs_asset(origin, address, cid)

Inserts the file you want to delete in a data queue. The actual IPFS deletion is done in the submit_ipfs_delete_results function.
You need to be the asset's owner to delete it. Only unpinned assets can be deleted.

read_file(origin, address, cid)

Reads an IPFS asset.
You need to have an OwnershipLayer to read a file.

submit_ipfs_identity(origin, public_key, multiaddress)

submit_ipfs_add_results(origin, admin, cid)

Creates and pins an IPFS asset.

submit_ipfs_pin_results( )

Returns Ok if the IPFS asset was pinned successfully.

submit_ipfs_unpin_results( )

Returns Ok if the IPFS asset was unpinned successfully.

submit_ipfs_delete_results(origin, admin, cid)

Deletes an unpinned IPFS asset that you own.

add_owner(origin, cid, add_acct, ownership_layer)

Gives an ownership layer to another user.
You need to be the owner of the asset to give ownership layers to other users.

remove_owner(origin, cid, remove_acct)

Removes the ownership layer from a user.
You need to be the owner of the asset to give ownership layers to other users.

change_ownership(origin, cid, acct_to_change, ownership_layer)

Changes the ownership layer of a user.
You need to be the owner of the asset to give ownership layers to other users.