https://github.com/doodzik/semantic-internet-protocol
https://github.com/doodzik/semantic-internet-protocol
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/doodzik/semantic-internet-protocol
- Owner: doodzik
- License: gpl-3.0
- Created: 2015-11-12T17:44:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-28T12:22:33.000Z (over 10 years ago)
- Last Synced: 2025-03-03T19:48:24.706Z (over 1 year ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# semantic-internet-protocol
[](https://travis-ci.org/doodzik/semantic-internet-protocol)
This Repo contains the spec for the semantic-internet-protocol and serialize/deserialize functions.
It is written in [JSON-Schema](http://json-schema.org)
You can find the spec in the source directory
# installation
```bash
$ npm install semantic-internet-protocol
```
# usage
```javascript
import { header, knowledge, interest } from 'semantic-internet-protocol'
```
# API
### \# header.serialize({ version: Float, command: INTEREST|EXPOSE,
#contentLength: Int }) -> string
### \# header.deserialize(string) -> object
### knowledge.serialize(Object) -> msgpack string
### knowledge.deserialize(msgpack string) -> object
### interest.serialize(Object) -> msgpack string
### interest.deserialize(msgpack string) -> object