Install

First, install both bsv and loggeru; loggeru has a dependency on bsv.

npm install --save bsv

npm install -g loggeru

Configure

Next, run the following command

loggeru

The system will respond with help information, a new BSV address with private key, and a sample AES 256 key. You can use these credentials or different credentials generated elsewhere.

Please make sure you write down your BSV address, private key and AES 256 encryption key. We do not store this data.

Run

Once you have funds in the Bitcoin SV wallet you plan to use, pass the following arguments in a new command.

loggeru -t tagForYourCompany -k bsvPrivateKey -r regexExpression -f filePath

-t: a tag for your organization so you can index the data later -f: the absolute file path of the file which should be monitored for changes. For example; /home/ec2-user/my-log.txt -r: regex expression that the text of line of the file must match in order to be added to the blockchain. Use .* to add all data. -k: the private key of the bitcoin address you would like to use to fund this account.



You can optionally pass an encryption key if you would like to obfuscate the data on chain

loggeru -t tagForYourCompany -k bsvPrivateKey -r regexExpression -f filePath -e encryptionKey

-e (optional): the encryption key to be used to encrypt the new text; must be 16 bytes of b64 code in hexcidecimal format.