Comparing version 4.0.4 to 4.0.6
@@ -29,3 +29,3 @@ 'use strict'; | ||
// const pub = 'PUB_K1_859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2Ht7beeX' | ||
var pub = 'EOS859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM'; | ||
var pub = 'TTMC859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM'; | ||
assert.equal(ecc.privateToPublic(wif), pub); | ||
@@ -35,3 +35,3 @@ }); | ||
it('isValidPublic', function () { | ||
var keys = [[true, 'PUB_K1_859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2Ht7beeX'], [true, 'EOS859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM'], [false, 'MMM859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM'], [false, 'EOS859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVm', 'EOS'], [true, 'PUB859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM', 'PUB'], [false, 'PUB859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVm', 'PUB']]; | ||
var keys = [[true, 'PUB_K1_859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2Ht7beeX'], [true, 'TTMC859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM'], [false, 'MMM859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM'], [false, 'TTMC859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVm', 'TTMC'], [true, 'PUB859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM', 'PUB'], [false, 'PUB859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVm', 'PUB']]; | ||
var _iteratorNormalCompletion = true; | ||
@@ -38,0 +38,0 @@ var _didIteratorError = false; |
@@ -26,3 +26,3 @@ 'use strict'; | ||
// 'PUB_K1_6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5BoDq63', | ||
'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV', 'pub.toString'); | ||
'TTMC6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV', 'pub.toString'); | ||
}); | ||
@@ -29,0 +29,0 @@ |
{ | ||
"name": "ttmcjs-ecc", | ||
"version": "4.0.4", | ||
"version": "4.0.6", | ||
"description": "Elliptic curve cryptography functions", | ||
@@ -5,0 +5,0 @@ "keywords": "ECC, Private Key, Public Key, Signature, AES, Encryption, Decryption", |
@@ -100,3 +100,3 @@ [![NPM](https://img.shields.io/npm/v/eosjs-ecc.svg)](https://www.npmjs.org/package/eosjs-ecc) | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** | ||
@@ -122,7 +122,7 @@ ### unsafeRandomKey | ||
console.log('Private Key:\t', privateKey) // wif | ||
console.log('Public Key:\t', ecc.privateToPublic(privateKey)) // VKTkey... | ||
console.log('Public Key:\t', ecc.privateToPublic(privateKey)) // TTMCkey... | ||
}) | ||
``` | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[wif](#wif)>** | ||
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[wif](#wif)>** | ||
@@ -143,3 +143,3 @@ ### seedPrivate | ||
Returns **[wif](#wif)** | ||
Returns **[wif](#wif)** | ||
@@ -150,4 +150,4 @@ ### privateToPublic | ||
- `wif` **[wif](#wif)** | ||
- `pubkey_prefix` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** public key prefix (optional, default `'VKT'`) | ||
- `wif` **[wif](#wif)** | ||
- `pubkey_prefix` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** public key prefix (optional, default `'TTMC'`) | ||
@@ -160,3 +160,3 @@ #### Examples | ||
Returns **[pubkey](#pubkey)** | ||
Returns **[pubkey](#pubkey)** | ||
@@ -167,4 +167,4 @@ ### isValidPublic | ||
- `pubkey` **[pubkey](#pubkey)** like VKTKey.. | ||
- `pubkey_prefix` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (optional, default `'VKT'`) | ||
- `pubkey` **[pubkey](#pubkey)** like TTMCKey.. | ||
- `pubkey_prefix` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (optional, default `'TTMC'`) | ||
@@ -183,3 +183,3 @@ #### Examples | ||
- `wif` **[wif](#wif)** | ||
- `wif` **[wif](#wif)** | ||
@@ -200,4 +200,4 @@ #### Examples | ||
- `data` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** | ||
- `privateKey` **([wif](#wif) | PrivateKey)** | ||
- `data` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** | ||
- `privateKey` **([wif](#wif) | PrivateKey)** | ||
- `encoding` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** data encoding (if string) (optional, default `'utf8'`) | ||
@@ -218,3 +218,3 @@ | ||
- `dataSha256` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** sha256 hash 32 byte buffer or string | ||
- `privateKey` **([wif](#wif) | PrivateKey)** | ||
- `privateKey` **([wif](#wif) | PrivateKey)** | ||
- `encoding` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** dataSha256 encoding (if string) (optional, default `'hex'`) | ||
@@ -231,4 +231,4 @@ | ||
- `signature` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** buffer or hex string | ||
- `data` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** | ||
- `pubkey` **([pubkey](#pubkey) | PublicKey)** | ||
- `data` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** | ||
- `pubkey` **([pubkey](#pubkey) | PublicKey)** | ||
- `encoding` (optional, default `'utf8'`) | ||
@@ -243,3 +243,3 @@ - `hashData` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** sha256 hash data before verify (optional, default `true`) | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | ||
@@ -252,3 +252,3 @@ ### recover | ||
- `signature` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** (VKTbase58sig.., Hex, Buffer) | ||
- `signature` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** (TTMCbase58sig.., Hex, Buffer) | ||
- `data` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** full data | ||
@@ -263,3 +263,3 @@ - `encoding` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** data encoding (if data is a string) (optional, default `'utf8'`) | ||
Returns **[pubkey](#pubkey)** | ||
Returns **[pubkey](#pubkey)** | ||
@@ -270,7 +270,7 @@ ### recoverHash | ||
- `signature` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** (VKTbase58sig.., Hex, Buffer) | ||
- `signature` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** (TTMCbase58sig.., Hex, Buffer) | ||
- `dataSha256` **([String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** sha256 hash 32 byte buffer or hex string | ||
- `encoding` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** dataSha256 encoding (if dataSha256 is a string) (optional, default `'hex'`) | ||
Returns **PublicKey** | ||
Returns **PublicKey** | ||
@@ -299,3 +299,3 @@ ### sha256 | ||
VKTKey.. | ||
TTMCKey.. | ||
@@ -302,0 +302,0 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1235824
20
2
6