network/one.yamlfile of the zbox github repo which we will copy to a new
config.yamlfile in our local system . The config.yaml file and all the other Zbox component information will be stored in a
.zcnfolder located in the home directory of the file system.
config.yamlfile located at
$HOME/.zcnpath of your system. The
config.yamlfile contents should be similar to the code snippet below :
block_workerfield. These network details are automatically fetched from the blockWorker's network API. Preferred Blobbers are also present which you can uncomment for using specified storage providers for handling your files.
block_workerfield for the desired network. In this case we will change it to
beta.0chain.net. After changes it should look similar to the file below:
wallet.jsonlocated in the .zcn folder of the linux home directory.
./zwalletcommand will output a help section.
newallocationcommand. To understand the syntax type
newallocationcommand.Here are the parameters :
lock float. We will add a float value of
0.5which will lock 0.5 tokens with the allocation. The complete command for creating an allocation would be:
./zbox newallocationcommand with customized parameters. If you are creating your first allocation we would suggest reading Creating a Storage Allocation section first.
./zbox newallocation --help
./zbox updateallocationcommand is used to update the existing allocation for various parameters, Parameters for updating the allocation can be viewed by using the
./zbox updateallocation --helpcommand.
*only required if free_storage not set.
updateallocationcommand and provide the new size .
addcuratorcommand , following parameters are required :
./zbox getallocation command. To view the list of curators using the
getcommand , following parameters are required :
getcommand and pass the allocation ID of the allocation for which you want the list of curators .
removecuratorcommand , Following parameters are required to remove a curator :
transferallocationchanges the owner of an allocation. Only a curator, previously added through addcurator command can change an allocation's ownership. If the current owner wants to transfer ownership they have to first add themselves as a curator using addcurator.
transferallocationdoes not move any funds, only changes the owner, and the owner's public key.
transferallocationcommand, following parameters are required
updateallocationcommand , following parameters are required.
./zbox getcommand is used to get detailed information about the allocation such as total size ,used size, number of challenges, etc .
./zbox list-allcommand is used to list all the files stored with an allocation. Additional Parameters can be viewed using the
./zbox list-all --helpcommand.
./zbox alloc-cancelimmediately return all remaining tokens from challenge pool back to the allocation's owner and cancels the allocation. If blobbers already got some tokens, the tokens will not be returned. Remaining min lock payment to the blobber will be funded from the allocation's write pools.
./zbox alloc-finicommand is used to finalize an allocation after it is expired. An allocation becomes expired when the expiry time has passed followed by a period equal to the challenge completion period. Any remaining min lock payment to the blobber will be funded from the allocation's write pools. Any available money in the challenge pool returns to the allocation's owner.
getwalletcommand to get additional wallet information including Public Key, Client ID , Encryption Public Key required for Proxy Re-Encryption.
./zbox uploadcommand is used to upload a file on dStorage. Parameters for uploading a file to dStorage can be viewed by using the
./zbox upload --help command.
localvariable and the remote directory is mapped to a
remotevariable which is
info.txtfile the command would be:
IS ENCRYPTEDsection, it will say
YESif the file is encrypted.
./zbox updatecommand to update the content of an existing file in the remote path. Like upload command. Only the owner of the allocation or a collaborator can update a file. To add collaborators to an allocation, check File Collaboration.
./zbox update --help
./zbox sharecommand is used to generate an authtoken that provides authorization to the holder to the specified file on the remotepath. Parameters for sharing the file can be viewed using the
./zbox share --help