1.0.2 • Published 5 years ago

hawksender v1.0.2

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
5 years ago

<1.0.2>Simple code edit, no change to performance. Removed an unused variable. <1.0.1> Fixed README.md issues. No change to the code

HawkSender

Sends / recieves encrypted JSON data to the Hawkwhisper Server.

WARNING

This is still extremely expiremental and is currently in its earliest testing phase. The server will not always be on just yet and this NPM is mostly used for testing until the final product is ready. Hawkwhisper JSON Database is a free, encrypted online and accountless database system and still requires a bit of work. At the moment, I'm using a pretty basic firewall with a static I.P <107.144.87.211> for the server.

Non-Node methods If you want to send information to the server to store/read/delete JSON data, send post request to 107.144.87.211:62312 from what ever service you're using. Be sure to include the options posted below.

const { jHawk, jHawkDecrypt } = require('hawksender');
  • jHawk(options, callback);
    • options: method|String, item|Object{name|String,key|Object{level|Number,value|String},data|Object{any}}
    • callback|Function(data)
  • jHawkDecrypt(data, key, callback)
    • data|Encrypted String
    • key|Object{level|Number,value|String}
    • callback|Function(err,data)

STORING DATA To store data, use the method "WRITE". Include item name, key and the data you want to store.

jHawk({
    method: 'WRITE',
    item: {
        name: 'sampleBase',
        key: {
            level: 4,
            value: 'onionsandrobots'
        },
        data: {
            can: true,
            enumerable: true
        }
    }
}, (data) => {
    console.log('Data sent to server.\n');
    //Use the jHawkDecrypt method to save our own file.
    jHawkDecrypt(
        data,
        {
            level: 4,
            value: 'onionsandrobots'
        },
        (err, data) => {
           console.log(err, data)
        })
})

DELETING DATA To delete data, use the method "DELETE". Include the item name and key.

jHawk({
    method: 'DELETE',
    item: {
        name: 'sampleBase',
        key: {
            level: 4,
            value: 'onionsandrobots'
        }
    }
}, (deleted) => {
    console.log(deleted)
})

READING DATA To read data from the server, use the method "READ". Include the item name and key.

FEATURES This is just a script to send post data to the server, but you can use what ever form you want to send/recieve data to the json server. Important; you need to include the following items in your post data.

  • method

    • READ,WRITE,DELETE
  • item {

    • name
      • String, the name of the item you're trying to store. This is critical for obtaining the data later.
    • key: { - level - 0-8 - value: - String (32 char limit) }
    • data: { - your_json_here - the JSON you want to store. } }
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago