CLI tools for KevaCoin blockchain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.5 KiB

# kevacoin-cli
12 months ago
5 months ago
CLI tools for KevaCoin
12 months ago
### put
12 months ago
export FS object to blockchain
12 months ago
5 months ago
#### 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
12 months ago
```
5 months ago
php src/put.php processor filename [delay]
12 months ago
```
5 months ago
#### arguments
1. `processor` - path to `kevacoin-cli`
2. `filename` - path to source file
3. `delay` - _optional_ delay in seconds for pieces pool to prevent `too-long-mempool-chain` reject, default `60`
12 months ago
11 months ago
### fix
5 months ago
check (validate) existing namespace and fix missed FS pieces in blockchain
5 months ago
#### logic
5 months ago
similar to the [put](#put) logic but using namespace provided as the additional argument
5 months ago
#### example
11 months ago
```
5 months ago
php src/fix.php processor namespace filename [delay]
11 months ago
```
5 months ago
#### arguments
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`
11 months ago
12 months ago
### get
5 months ago
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
12 months ago
```
5 months ago
php src/get.php processor namespace [filename]
12 months ago
```
5 months ago
#### arguments
1. `processor` - path to `kevacoin-cli`
2. `namespace` - hash of namespace where object was stored
3. `filename` - path to the file