Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Source #1

Merged
merged 23 commits into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
package-lock.json
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# onlykey-sea
Get a Key: http://onlykey.io/sea

------

This is a 3rd Party API for onlykey
---

Supports
* NACL
* ECDH and ECDSA (p256)
* CURVE25519


API
----

```js
var ok = require("./onlykey-api.js");
```


Events
-----

```js
ok.on(event,function() {})
```

List of events

* `"status"` outputs current operation in english
* `"error"` emits any errors during operations
* `"debug"` outpus any debug and status in english, _like `status` but more details_


Methods
-----

```js
ok.connect(function() {})
```
_connect sets onlykey time_


```js
ok.derive_public_key(AdditionalData, keyType, press_required, function(error, jwk_epub) {})
ok.derive_shared_secret(AdditionalData, jwk_epub, keyType, press_required, function(error, shared_secret) {})
```

* `additional_d` = `string` or `buffer` to point to a derived key
* `jwk_epub` = public key in jwk format
* `keyType` = key generation type
* `shared_secret` = shared AES-GCM key

`KEYTYPE`
* KEYTYPE_NACL = `0`
* KEYTYPE_P256R1 = `1`
* KEYTYPE_P256K1 = `2`
* KEYTYPE_CURVE25519 = `3`



API Authors
-----------
* Tim ~ onlykey.io
* Brad ~ bmatusiak.us
Loading