An open API service indexing awesome lists of open source software.

https://github.com/threefoldtech/pkid_node_client

Lightweight node client for pkid
https://github.com/threefoldtech/pkid_node_client

Last synced: 9 months ago
JSON representation

Lightweight node client for pkid

Awesome Lists containing this project

README

          

# PKID

## Concept
PKID is a public Key Indexed Datastore. You can save plain or encrypted data in a public key index; as long as you are the owner of the secret corresponding to that public key.

# install

```
npm install @jimber/pkid
```

# initialize

```
const pkid = require('pkid')
const client = new pkid(url, publicKey, privateKey)
```

# Routes

## Document storage
### Set document

```
client.setDoc(key, document)
```

Set the value of a document corresponding to {key} indexed by the public key {pk}.

### Get document

```
client.getDoc(pk, key)
```

Get the value of a document corresponding to {key} indexed by the public key {pk}. There is no requirement for a security header