sks-lib
develop | ||
master |
sks-lib
is a Typescript library for interacting with SKS keyservers. Currently there's support for looking up keys, uploading keys and retrieving statistics of a keyserver.
Please note that keyservers never return verified data. Do not trust the retrieved keys and always verify them.
Installation
Just add it with yarn install sks-lib
(or npm install sks-lib
) to your project. It ships the generated Javascript code along with Typescript's declaration files. The Typescript code itself lives in lib/
.
Usage
// Create a new keyserver object to query on; ; // Lookup the key for "vsund" and then print itkeyserver.lookup'vsund'.then; // Upload the previously fetched key and print the server's responsekeyserver.uploadpublicKey.then; // Get stats and then print some informationkeyserver.getStats.then;
See examples/
for some more examples.
Documentation
Code documentation lives in docs/code/
, the generated HTML version is available at https://ntzwrk.github.io/sks-lib/code/.
Development
Run tests
$ yarn test
Generate documentation
$ yarn document
License
This code is published under the GNU General Public License v3.0.