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

dashkeys

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dashkeys - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2-0

7

dashkeys.js

@@ -32,2 +32,3 @@ /** @typedef {import('./base-x.types.js').BaseX} BaseX */

* @prop {EncodeKeyUint8Array} encodeKey
* @prop {DashKeysUtils} utils
*/

@@ -370,3 +371,3 @@

//@ts-ignore
let key = parts.pubKeyHash || parts.privateKey;
let key = parts.pubKeyHash || parts.privateKey || parts.xprv || parts.xpub;
let compression = "";

@@ -1015,3 +1016,3 @@ //@ts-ignore

if (78 === keyBytes.length) {
if (74 === keyBytes.length) {
return await _DashKeys._encodeXKey(keyBytes, opts);

@@ -1021,3 +1022,3 @@ }

throw new Error(
"key bytes length must be 20 (PubKeyHash), 32 (PrivateKey), or 78 (Extended Key)",
`invalid key bytes length '${keyBytes.length}': must be 20 (PubKeyHash), 32 (PrivateKey), or 74 (Extended Key)`,
);

@@ -1024,0 +1025,0 @@ };

{
"name": "dashkeys",
"version": "0.9.1",
"version": "0.9.2-0",
"description": "Generate, validate, create, and convert WIFs and PayAddress.",

@@ -5,0 +5,0 @@ "main": "dashkeys.js",

@@ -100,3 +100,3 @@ # [DashKeys.js][dashkeys-js]

```js
let wif = await DashKeys.generateWifNonHd();
let wif = await DashKeys.utils.generateWifNonHd();
// ex: "XCGKuZcKDjNhx8DaNKK4xwMMNzspaoToT6CafJAbBfQTi57buhLK"

@@ -108,4 +108,3 @@

You can use `DashKeys.privateKeyToWif(privateKey)` to encode Private Keys to
WIFs:
You can use `DashKeys.privKeyToWif(privateKey)` to encode Private Keys to WIFs:

@@ -116,3 +115,3 @@ ```js

);
let wif = await DashKeys.privateKeyToWif(privateKey);
let wif = await DashKeys.privKeyToWif(privateKey);
let addr = await DashKeys.wifToAddr(wif);

@@ -311,7 +310,7 @@ ```

`verisonBytes` is added as a prefix (before encoding). \
Some _metadata_ may come before the data. \
Some _metadata_ may come after the data. \
`checkBytes` are added as a suffix (before encoding). \
```js
Base58(`${versionBytes}${metaBytes}${dataBytes}${checkBytes}`);
Base58(`${versionBytes}${dataBytes}${metaBytes}${checkBytes}`);
```

@@ -334,3 +333,3 @@

A private key always starts with `0x01`, the compression flag. \
A Base58Check private key has the suffix `0x01`, the compression flag. \
This indicates that Pub Key Hashes must not include the Y value.

@@ -484,4 +483,4 @@

- Private Key (32 bytes)
- Checksum is 4 bytes of SHA-256(concat(coin, compression, pubkey))
- Base58Check is Base85(concat(coin, compression, pubkey, checksum))
- Checksum is 4 bytes of SHA-256(concat(coin, privkey, compression))
- Base58Check is Base85(concat(coin, privkey, compression, checksum))

@@ -488,0 +487,0 @@ ```text

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