Browse Source

update readme

main
ghost 4 months ago
parent
commit
edd826d63f
  1. 62
      README.md

62
README.md

@ -1,40 +1,70 @@
# kevacoin-cli # kevacoin-cli
CLI tools for KevaCoin blockchain CLI tools for KevaCoin
### put ### put
export FS object to blockchain export FS object to blockchain
#### logic
* create separated namespace with file basename as `_KEVA_NS_`
* append protocol version as `_CLITOR_IS_`
* encode file content to base64 string
* split encoded string to `3072` byte pieces
* save pieces as indexed record values
#### example
``` ```
php cli/put.php processor filename [length] [delay] php cli/put.php processor filename [delay]
``` ```
* `processor` - path to `kevacoin-cli` #### arguments
* `filename` - local file path to store
* `length` - optional split size, `3072` bytes [max](https://kevacoin.org/faq.html) 1. `processor` - path to `kevacoin-cli`
* `delay` - optional seconds of parts sending delay to prevent `too-long-mempool-chain` reject, default `60` 2. `filename` - path to source file
3. `delay` - _optional_ delay in seconds for pieces pool to prevent `too-long-mempool-chain` reject, default `60`
### fix ### fix
check and fix FS object in blockchain check and fix missed FS segments in blockchain
#### logic
similar to the [put](#put) logic but using namespace provided as second argument
#### example
``` ```
php cli/fix.php processor filename [delay] php cli/fix.php processor namespace filename [delay]
``` ```
* `processor` - path to `kevacoin-cli` #### arguments
* `filename` - local file path to store
* `delay` - optional seconds of parts sending delay to prevent `too-long-mempool-chain` reject, default `60` 1. `processor` - path to `kevacoin-cli`
2. `namespace` - hash of namespace where object was stored
3. `filename` - path to source file
4. `delay` - _optional_ delay in seconds for pieces pool to prevent `too-long-mempool-chain` reject, default `60`
### get ### get
import from blockchain to FS location import stored object from blockchain to FS location
#### logic
* check namespace for `_CLITOR_IS_` record
* merge indexed records to base64 string
* decode merged string to original file and save to FS
#### example
``` ```
php cli/get.php processor namespace [destination] php cli/get.php processor namespace [filename]
``` ```
* `processor` - path to `kevacoin-cli` #### arguments
* `namespace` - hash received from the `put` command
* `destination` - optional FS location, `data/import` by default 1. `processor` - path to `kevacoin-cli`
2. `namespace` - hash of namespace where object was stored
3. `filename` - path to the file
Loading…
Cancel
Save