Comparing version 1.0.4 to 1.0.5
@@ -5,11 +5,11 @@ # External Dependencies | ||
| Dependency | License | | ||
|-|-| | ||
| @types/node - 14.0.26 | MIT | | ||
| tweetnacl@1.0.3 | Unilicense | | ||
| https://deno.land/std@0.75.0 | MIT License | | ||
| https://github.com/dr-useless/tweetnacl-deno | Unilicense | | ||
| Dev Dependencies Fanout (267) | | | ||
| ava@3.12.1 | MIT | | ||
| typedoc@0.19.1 | Apache-2.0 | | ||
| typescript@4.0.2 | Apache-2.0 | | ||
| Dependency | License | | ||
| -------------------------------------------- | ----------- | | ||
| @types/node - 14.0.26 | MIT | | ||
| tweetnacl@1.0.3 | Unilicense | | ||
| https://deno.land/std@0.75.0 | MIT License | | ||
| https://github.com/dr-useless/tweetnacl-deno | Unilicense | | ||
| Dev Dependencies Fanout (267) | | | ||
| ava@3.12.1 | MIT | | ||
| typedoc@0.19.1 | Apache-2.0 | | ||
| typescript@4.0.2 | Apache-2.0 | |
export type { KeyPair } from "./nkeys"; | ||
export { createAccount, createOperator, createPair, createUser, fromPublic, fromSeed, NKeysError, NKeysErrorCode, Prefix, } from "./nkeys"; | ||
export { createAccount, createCluster, createOperator, createPair, createServer, createUser, fromPublic, fromSeed, NKeysError, NKeysErrorCode, Prefix, } from "./nkeys"; | ||
export { decode, encode } from "./util"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.encode = exports.decode = exports.Prefix = exports.NKeysErrorCode = exports.NKeysError = exports.fromSeed = exports.fromPublic = exports.createUser = exports.createPair = exports.createOperator = exports.createAccount = void 0; | ||
exports.encode = exports.decode = exports.Prefix = exports.NKeysErrorCode = exports.NKeysError = exports.fromSeed = exports.fromPublic = exports.createUser = exports.createServer = exports.createPair = exports.createOperator = exports.createCluster = exports.createAccount = void 0; | ||
var nkeys_1 = require("./nkeys"); | ||
Object.defineProperty(exports, "createAccount", { enumerable: true, get: function () { return nkeys_1.createAccount; } }); | ||
Object.defineProperty(exports, "createCluster", { enumerable: true, get: function () { return nkeys_1.createCluster; } }); | ||
Object.defineProperty(exports, "createOperator", { enumerable: true, get: function () { return nkeys_1.createOperator; } }); | ||
Object.defineProperty(exports, "createPair", { enumerable: true, get: function () { return nkeys_1.createPair; } }); | ||
Object.defineProperty(exports, "createServer", { enumerable: true, get: function () { return nkeys_1.createServer; } }); | ||
Object.defineProperty(exports, "createUser", { enumerable: true, get: function () { return nkeys_1.createUser; } }); | ||
@@ -9,0 +11,0 @@ Object.defineProperty(exports, "fromPublic", { enumerable: true, get: function () { return nkeys_1.fromPublic; } }); |
@@ -16,3 +16,3 @@ /** | ||
/** | ||
* Creates a KeyPair with an user prefix | ||
* Creates a KeyPair with a user prefix | ||
* @returns {KeyPair} Returns the created KeyPair. | ||
@@ -31,3 +31,3 @@ */ | ||
* Creates a KeyPair from a specified public key | ||
* @param {string} Public key in string format | ||
* @param {string} src of the public key in string format. | ||
* @returns {KeyPair} Returns the created KeyPair. | ||
@@ -39,3 +39,3 @@ * @see KeyPair#getPublicKey | ||
* Creates a KeyPair from a specified seed. | ||
* @param {Uint8Array} The seed key in Uint8Array | ||
* @param {Uint8Array} src of the seed key as Uint8Array | ||
* @returns {KeyPair} Returns the created KeyPair. | ||
@@ -42,0 +42,0 @@ * @see KeyPair#getSeed |
@@ -5,3 +5,3 @@ "use strict"; | ||
/* | ||
* Copyright 2018-2020 The NATS Authors | ||
* Copyright 2018-2023 The NATS Authors | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
@@ -49,3 +49,3 @@ * you may not use this file except in compliance with the License. | ||
/** | ||
* Creates a KeyPair with an user prefix | ||
* Creates a KeyPair with a user prefix | ||
* @returns {KeyPair} Returns the created KeyPair. | ||
@@ -73,3 +73,3 @@ */ | ||
* Creates a KeyPair from a specified public key | ||
* @param {string} Public key in string format | ||
* @param {string} src of the public key in string format. | ||
* @returns {KeyPair} Returns the created KeyPair. | ||
@@ -90,3 +90,3 @@ * @see KeyPair#getPublicKey | ||
* Creates a KeyPair from a specified seed. | ||
* @param {Uint8Array} The seed key in Uint8Array | ||
* @param {Uint8Array} src of the seed key as Uint8Array | ||
* @returns {KeyPair} Returns the created KeyPair. | ||
@@ -93,0 +93,0 @@ * @see KeyPair#getSeed |
{ | ||
"name": "nkeys.js", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A public-key signature system based on Ed25519 for the NATS ecosystem in javascript", | ||
@@ -36,5 +36,5 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@types/node": "^18.11.17", | ||
"ava": "^5.1.0", | ||
"typedoc": "^0.23.23", | ||
"@types/node": "^18.11.x", | ||
"ava": "^5.1.x", | ||
"typedoc": "^0.23.x", | ||
"typescript": "^4.9.x" | ||
@@ -41,0 +41,0 @@ }, |
# nkeys.js | ||
A public-key signature system based on Ed25519 for the | ||
[NATS ecosystem system](https://nats.io) for JavaScript. | ||
A public-key signature system based on Ed25519 for the [NATS ecosystem system](https://nats.io) for JavaScript. | ||
[![license](https://img.shields.io/github/license/nats-io/ts-nats.svg)](https://www.apache.org/licenses/LICENSE-2.0) | ||
@@ -14,8 +14,15 @@ [![nkeys.js](https://github.com/aricart/nkeys.js/workflows/nkeys.js/badge.svg)](https://github.com/aricart/nkeys.js/actions) | ||
## Installation | ||
For your Deno projects: | ||
```javascript | ||
import { createUser, fromPublic, fromSeed } from "https://deno.land/x/nkeys.js/modules/esm/mod.ts"; | ||
import { | ||
createUser, | ||
fromPublic, | ||
fromSeed, | ||
} from "https://deno.land/x/nkeys.js/modules/esm/mod.ts"; | ||
``` | ||
On node, and browsers you can get a build from npm: | ||
```bash | ||
@@ -26,18 +33,15 @@ npm install nkeys.js | ||
In your node projects: | ||
```javascript | ||
const {createUser, fromSeed, fromPublic} = require("nkeys.js"); | ||
const { createUser, fromSeed, fromPublic } = require("nkeys.js"); | ||
``` | ||
On your browser projects, make available the `node/nkeys.js/nkeys.mjs`, and then | ||
```javascript | ||
import { | ||
createUser, | ||
fromPublic, | ||
fromSeed, | ||
} from "https://host/path/nkeys.mjs"; | ||
import { createUser, fromPublic, fromSeed } from "https://host/path/nkeys.mjs"; | ||
``` | ||
## Basic Usage | ||
## Basic Usage | ||
The [documentation is here](https://nats-io.github.io/nkeys.js/) | ||
@@ -100,7 +104,9 @@ | ||
Our support policy for Nodejs versions follows [Nodejs release support](https://github.com/nodejs/Release). | ||
We will support and build nkeys.js on even-numbered Nodejs versions that are current or in LTS. | ||
Our support policy for Nodejs versions follows | ||
[Nodejs release support](https://github.com/nodejs/Release). We will support and | ||
build nkeys.js on even-numbered Nodejs versions that are current or in LTS. | ||
## License | ||
Unless otherwise noted, the NATS source files are distributed under the Apache Version 2.0 license found in the LICENSE file. | ||
Unless otherwise noted, the NATS source files are distributed under the Apache | ||
Version 2.0 license found in the LICENSE file. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109577
3178
110