2024-06-03 22:47:01 +03:00
2024-06-03 22:46:52 +03:00
2023-11-16 13:26:01 +02:00
2023-11-16 13:26:01 +02:00
2023-11-16 13:04:51 +02:00
2024-06-03 22:47:01 +03:00

kevacoin-cli

CLI tools for KevaCoin

put

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 [delay]

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

fix

check and fix missed FS segments in blockchain

logic

similar to the put logic but using namespace provided as second argument

example

php cli/fix.php processor namespace filename [delay]

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

get

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 [filename]

arguments

  1. processor - path to kevacoin-cli
  2. namespace - hash of namespace where object was stored
  3. filename - path to the file
Languages
PHP 100%