Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ton-crypto

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ton-crypto - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

1

dist/index.d.ts

@@ -9,1 +9,2 @@ export { sha256 } from './primitives/sha256';

export { KeyPair } from './primitives/nacl';
export { keyPairFromSecretKey, sign } from './primitives/nacl';

5

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mnemonicWordList = exports.mnemonicToWalletKey = exports.mnemonicToPrivateKey = exports.mnemonicValidate = exports.mnemonicNew = exports.getSecureRandomWords = exports.getSecureRandomBytes = exports.hmac_sha512 = exports.pbkdf2_sha512 = exports.sha512 = exports.sha256 = void 0;
exports.sign = exports.keyPairFromSecretKey = exports.mnemonicWordList = exports.mnemonicToWalletKey = exports.mnemonicToPrivateKey = exports.mnemonicValidate = exports.mnemonicNew = exports.getSecureRandomWords = exports.getSecureRandomBytes = exports.hmac_sha512 = exports.pbkdf2_sha512 = exports.sha512 = exports.sha256 = void 0;
var sha256_1 = require("./primitives/sha256");

@@ -22,1 +22,4 @@ Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return sha256_1.sha256; } });

Object.defineProperty(exports, "mnemonicWordList", { enumerable: true, get: function () { return wordlist_1.wordlist; } });
var nacl_1 = require("./primitives/nacl");
Object.defineProperty(exports, "keyPairFromSecretKey", { enumerable: true, get: function () { return nacl_1.keyPairFromSecretKey; } });
Object.defineProperty(exports, "sign", { enumerable: true, get: function () { return nacl_1.sign; } });

@@ -6,1 +6,3 @@ /// <reference types="node" />

};
export declare function keyPairFromSecretKey(secretKey: Buffer): KeyPair;
export declare function sign(data: Buffer, secretKey: Buffer): Buffer;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.sign = exports.keyPairFromSecretKey = void 0;
const tweetnacl_1 = __importDefault(require("tweetnacl"));
function keyPairFromSecretKey(secretKey) {
let res = tweetnacl_1.default.sign.keyPair.fromSecretKey(new Uint8Array(secretKey));
return {
publicKey: Buffer.from(res.publicKey),
secretKey: Buffer.from(res.secretKey),
};
}
exports.keyPairFromSecretKey = keyPairFromSecretKey;
function sign(data, secretKey) {
return Buffer.from(tweetnacl_1.default.sign.detached(new Uint8Array(data), new Uint8Array(secretKey)));
}
exports.sign = sign;
{
"name": "ton-crypto",
"version": "1.1.0",
"version": "1.2.0",
"repository": "https://github.com/ex3ndr/ton-crypto.git",

@@ -18,2 +18,3 @@ "author": "Steve Korshakov <steve@korshakov.com>",

"@types/node": "^16.7.10",
"buffer": "^6.0.3",
"expect": "^27.1.0",

@@ -30,4 +31,3 @@ "jest": "^27.1.0",

"typescript": "^4.4.2",
"webpack": "^5.51.2",
"buffer": "^6.0.3"
"webpack": "^5.51.2"
},

@@ -37,2 +37,2 @@ "dependencies": {

}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc