Skip to content

packages.valory.skills.abstract_round_abci.io_.ipfs

This module contains all the interaction operations of the behaviours with IPFS.

IPFSInteractionError Objects

class IPFSInteractionError(Exception)

A custom exception for IPFS interaction errors.

IPFSInteract Objects

class IPFSInteract()

Class for interacting with IPFS.

__init__

def __init__(domain: str, loader_cls: Type = Loader, storer_cls: Type = Storer)

Initialize an IPFSInteract.

Arguments:

  • domain: the IPFS domain name.

store_and_send

def store_and_send(filepath: str, obj: SupportedObjectType, multiple: bool, filetype: Optional[SupportedFiletype] = None, custom_storer: Optional[CustomStorerType] = None, **kwargs: Any, ,) -> str

Temporarily store a file locally, in order to send it to IPFS and retrieve a hash, and then delete it.

get_and_read

def get_and_read(hash_: str, target_dir: str, multiple: bool = False, filename: Optional[str] = None, filetype: Optional[SupportedFiletype] = None, custom_loader: CustomLoaderType = None) -> SupportedObjectType

Get, store and read a file from IPFS.

Back to top