plugins.aea-cli-ipfs.aea_
cli_
ipfs.registry
Module with methods for ipfs registry.
validate_
registry
def validate_registry(registry_data: LocalRegistry) -> None
Validate local registry data.
Arguments:
registry_data
: json like object containing registry data.
write_
local_
registry
def write_local_registry(registry_data: LocalRegistry,
registry_path: str = LOCAL_REGISTRY_PATH) -> None
Write registry data to file.
Arguments:
registry_data
: json like object containing registry data.registry_path
: local registry path.
load_
local_
registry
def load_local_registry(
registry_path: str = LOCAL_REGISTRY_PATH) -> LocalRegistry
Returns local registry data.
get_
ipfs_
hash_
from_
public_
id
def get_ipfs_hash_from_public_id(
item_type: str,
public_id: PublicId,
registry_path: str = LOCAL_REGISTRY_PATH) -> Optional[str]
Get IPFS hash from local registry.
register_
item_
to_
local_
registry
def register_item_to_local_registry(
item_type: str,
public_id: Union[str, PublicId],
package_hash: str,
registry_path: str = LOCAL_REGISTRY_PATH) -> None
Add PublicId to hash mapping in the local registry.
Arguments:
item_type
: item type.public_id
: public id of package.package_hash
: hash of package.registry_path
: local registry path.
fetch_
ipfs
def fetch_ipfs(item_type: str,
public_id: PublicId,
dest: str,
remote: bool = True) -> Optional[Path]
Fetch a package from IPFS node.