Comparing version 1.0.0-9 to 1.0.1-1
## Community Code of Conduct | ||
NATS follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). | ||
NATS follows the | ||
[CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -46,3 +46,3 @@ "use strict"; | ||
const sd = codec_1.Codec.decodeSeed(this.seed); | ||
const kp = helper_1.getEd25519Helper().fromSeed(this.getRawSeed()); | ||
const kp = (0, helper_1.getEd25519Helper)().fromSeed(this.getRawSeed()); | ||
const buf = codec_1.Codec.encode(sd.prefix, kp.publicKey); | ||
@@ -55,3 +55,3 @@ return new TextDecoder().decode(buf); | ||
} | ||
const kp = helper_1.getEd25519Helper().fromSeed(this.getRawSeed()); | ||
const kp = (0, helper_1.getEd25519Helper)().fromSeed(this.getRawSeed()); | ||
return codec_1.Codec.encode(nkeys_1.Prefix.Private, kp.secretKey); | ||
@@ -63,4 +63,4 @@ } | ||
} | ||
const kp = helper_1.getEd25519Helper().fromSeed(this.getRawSeed()); | ||
return helper_1.getEd25519Helper().sign(input, kp.secretKey); | ||
const kp = (0, helper_1.getEd25519Helper)().fromSeed(this.getRawSeed()); | ||
return (0, helper_1.getEd25519Helper)().sign(input, kp.secretKey); | ||
} | ||
@@ -71,4 +71,4 @@ verify(input, sig) { | ||
} | ||
const kp = helper_1.getEd25519Helper().fromSeed(this.getRawSeed()); | ||
return helper_1.getEd25519Helper().verify(input, sig, kp.publicKey); | ||
const kp = (0, helper_1.getEd25519Helper)().fromSeed(this.getRawSeed()); | ||
return (0, helper_1.getEd25519Helper)().verify(input, sig, kp.publicKey); | ||
} | ||
@@ -75,0 +75,0 @@ clear() { |
@@ -56,6 +56,6 @@ /** | ||
/** | ||
* Returns the PrivateKey's seed. | ||
* @returns Uint8Array | ||
* @throws NKeysError | ||
*/ | ||
* Returns the PrivateKey's seed. | ||
* @returns Uint8Array | ||
* @throws NKeysError | ||
*/ | ||
getSeed(): Uint8Array; | ||
@@ -62,0 +62,0 @@ /** |
@@ -26,3 +26,3 @@ "use strict"; | ||
function createPair(prefix) { | ||
const rawSeed = helper_1.getEd25519Helper().randomBytes(32); | ||
const rawSeed = (0, helper_1.getEd25519Helper)().randomBytes(32); | ||
let str = codec_1.Codec.encodeSeed(prefix, new Uint8Array(rawSeed)); | ||
@@ -29,0 +29,0 @@ return new kp_1.KP(str); |
@@ -57,3 +57,3 @@ "use strict"; | ||
let buf = codec_1.Codec._decode(this.publicKey); | ||
return helper_1.getEd25519Helper().verify(input, sig, buf.slice(1)); | ||
return (0, helper_1.getEd25519Helper)().verify(input, sig, buf.slice(1)); | ||
} | ||
@@ -60,0 +60,0 @@ clear() { |
@@ -6,4 +6,6 @@ # Maintainers | ||
### Maintainers | ||
- Alberto Ricart <alberto@nats.io> [@aricart](https://github.com/aricart) | ||
- Derek Collison <derek@nats.io> [@derekcollison](https://github.com/derekcollison) | ||
- Ivan Kozlovic <ivan@nats.io> [@kozlovic](https://github.com/kozlovic) | ||
- Alberto Ricart <alberto@nats.io> [@aricart](https://github.com/aricart) | ||
- Derek Collison <derek@nats.io> | ||
[@derekcollison](https://github.com/derekcollison) | ||
- Ivan Kozlovic <ivan@nats.io> [@kozlovic](https://github.com/kozlovic) |
{ | ||
"name": "nkeys.js", | ||
"version": "1.0.0-9", | ||
"version": "1.0.1-1", | ||
"description": "A public-key signature system based on Ed25519 for the NATS ecosystem in javascript", | ||
@@ -12,6 +12,7 @@ "main": "lib/index.js", | ||
"cjs": "deno run --allow-all bin/cjs-fix-imports.ts -o build/ src/ modules/cjs/ node_test/", | ||
"stage": "npm run init && npm run cjs && tsc", | ||
"generate": "deno run -A --unstable ./bin/tweetnacl-esm.ts", | ||
"stage": "npm run init && npm run cjs && npm run generate && tsc", | ||
"prepare": "npm run stage && deno bundle modules/esm/mod.ts nkeys.mjs && tsc", | ||
"test": "npm run prepare && ava --verbose && deno test test/", | ||
"doc": "node_modules/.bin/typedoc --options ./typedoc.json && touch ./docs/.nojekyll" | ||
"test": "npm run prepare && ava --verbose && deno test --allow-env test/", | ||
"doc": "npm run clean && rm -Rf docs && npm run stage && node_modules/.bin/typedoc --out docs/ && touch ./docs/.nojekyll" | ||
}, | ||
@@ -23,3 +24,3 @@ "engines": { | ||
"type": "git", | ||
"url": "https://github.com//nats-io/ts-nkeys" | ||
"url": "https://github.com//nats-io/nkeys.js" | ||
}, | ||
@@ -34,9 +35,9 @@ "keywords": [ | ||
"dependencies": { | ||
"@types/node": "^14.0.26", | ||
"tweetnacl": "^1.0.3" | ||
"tweetnacl": "1.0.3" | ||
}, | ||
"devDependencies": { | ||
"ava": "^3.12.1", | ||
"typedoc": "^0.19.1", | ||
"typescript": "^4.0.2" | ||
"@types/node": "^18.0.0", | ||
"ava": "^4.2.0", | ||
"typedoc": "^0.23.x", | ||
"typescript": "^4.7.x" | ||
}, | ||
@@ -43,0 +44,0 @@ "ava": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
1475639
1
269
20841
4
233095
14
4
- Removed@types/node@^14.0.26
- Removed@types/node@14.18.63(transitive)
Updatedtweetnacl@1.0.3