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
- Host: GitHub
- URL: https://github.com/threefoldtech/pkid_node_client
- Owner: threefoldtech
- License: apache-2.0
- Created: 2019-08-28T13:27:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-15T02:18:05.000Z (10 months ago)
- Last Synced: 2025-04-09T17:09:58.501Z (9 months ago)
- Language: TypeScript
- Size: 173 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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