network/one.yaml
file of the zbox github repo which we will copy to a new config.yaml
file in our local system . The config.yaml file and all the other Zbox component information will be stored in a .zcn
folder located in the home directory of the file system.config.yaml
file located at $HOME/.zcn
path of your system.block_worker
field. 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_worker
field for the desired network of the organization. In this case we will change it to 0chain beta network i.e beta.0chain.net
. After changes it should look similar to the file below:wallet.json
located in the .zcn folder of the linux home directory../zwallet
command will output a help section.newallocation
command. To understand the syntax typenewallocation
command.Here are the parameters :lock float
. We will add a float value of 0.5
which will lock 0.5 tokens with the allocation. The complete command for creating an allocation would be:zbox
functionalities../zbox listallocations
show active storage allocations on dStorage. If you have not created any storage allocation we would suggest creating a storage allocation following this guide../zbox newallocation
command with customized parameters. If you are creating your first allocation we would suggest reading Creating a Storage Allocation section first../zbox newallocation --help
./zbox listallocations
command./zbox updateallocation
command is used to update the existing allocation for various parameters, Parameters for updating the allocation can be viewed by using the./zbox updateallocation --help
command.*
only required if free_storage not set.updateallocation
command and provide the new size .addcurator
command , following parameters are required :addcurator
command./zbox get
allocation command. To view the list of curators using the get
command , following parameters are required :get
command and pass the allocation ID of the allocation for which you want the list of curators .removecurator
command ,
Following parameters are required to remove a curator :removecurator
commandtransferallocation
changes 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.transferallocation
does not move any funds, only changes the owner, and the owner's public key.transferallocation
command, following parameters are requiredtransferallocation command.
updateallocation
command.updateallocation
command , following parameters are required.updateallocation
command../zbox get
command is used to get detailed information about the allocation such as total size ,used size, number of challenges, etc ../zbox list-all
command is used to list all the files stored with an allocation. Additional Parameters can be viewed using the ./zbox list-all --help
command../zbox alloc-cancel
immediately 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-fini
command 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.getwallet
command to get additional wallet information including Public Key, Client ID , Encryption Public Key required for Proxy Re-Encryption../zbox version
command../zbox upload
command 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.
local
variable and the remote directory is mapped to a remote
variable which is myfiles/info.txt.
owner
.export LOOKUPHASH=f15383a1130bd2fae1e52a7a15c432269eeb7def555f1f8b9b9a28bd9611362c
--encrypt
flag with the command.info.txt
file the command would be:IS ENCRYPTED
section, it will say YES
if the file is encrypted../zbox update
command 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 share
command 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
auth ticket
expires./zbox download
can be used to download the file in two ways from dStorage. Using the Allocation ID or Authticket../zbox download --help
authticket
must be valid, true = sender pays, false = allocation owner paysAUTH
variable for the file we shared in sharing a file on dStorage section ../zbox delete
command. Parameters for deleting the contents of the file on dStorage can be seen by typing ./zbox delete --help