New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@helium/crypto-react-native

Package Overview
Dependencies
Maintainers
7
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@helium/crypto-react-native - npm Package Compare versions

Comparing version 4.8.1 to 4.8.3-next.22

6

build/index.js

@@ -9,3 +9,7 @@ "use strict";

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) {

@@ -12,0 +16,0 @@ if (k2 === undefined) k2 = k;

4

build/Keypair.d.ts
/// <reference types="node" />
import Address, { KeyTypes, NetTypes } from '@helium/address';
import Mnemonic from './Mnemonic';
declare type KeyType = KeyTypes.KeyType;
declare type NetType = NetTypes.NetType;
type KeyType = KeyTypes.KeyType;
type NetType = NetTypes.NetType;
interface SodiumKeyPair {

@@ -7,0 +7,0 @@ keyType?: KeyType;

"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;

/// <reference types="node" />
export declare type MnemonicLength = 12 | 24;
export type MnemonicLength = 12 | 24;
export default class Mnemonic {

@@ -4,0 +4,0 @@ words: Array<string>;

@@ -17,3 +17,3 @@ "use strict";

const entropyBytes = (16 / 12) * length;
const entropy = await utils_1.randomBytes(entropyBytes);
const entropy = await (0, utils_1.randomBytes)(entropyBytes);
return Mnemonic.fromEntropy(entropy);

@@ -29,7 +29,7 @@ }

}
const entropyBits = utils_1.bytesToBinary([].slice.call(entropy));
const checksumBits = utils_1.deriveChecksumBits(entropy);
const entropyBits = (0, utils_1.bytesToBinary)([].slice.call(entropy));
const checksumBits = (0, utils_1.deriveChecksumBits)(entropy);
const bits = entropyBits + checksumBits;
const chunks = bits.match(/(.{1,11})/g) || [];
const words = chunks.map((binary) => english_json_1.default[utils_1.binaryToByte(binary)]);
const words = chunks.map((binary) => english_json_1.default[(0, utils_1.binaryToByte)(binary)]);
return new Mnemonic(words);

@@ -42,3 +42,3 @@ }

const index = english_json_1.default.indexOf(word);
return utils_1.lpad(index.toString(2), '0', 11);
return (0, utils_1.lpad)(index.toString(2), '0', 11);
})

@@ -59,3 +59,3 @@ .join('');

const entropy = Buffer.from(entropyBytes);
const newChecksum = utils_1.deriveChecksumBits(entropy);
const newChecksum = (0, utils_1.deriveChecksumBits)(entropy);
if (checksumBits !== '0000' && newChecksum !== checksumBits)

@@ -62,0 +62,0 @@ throw new Error('invalid checksum');

@@ -24,3 +24,3 @@ "use strict";

const bytesToBinary = (bytes) => bytes
.map((x) => exports.lpad(x.toString(2), '0', 8))
.map((x) => (0, exports.lpad)(x.toString(2), '0', 8))
.join('');

@@ -34,3 +34,3 @@ exports.bytesToBinary = bytesToBinary;

const hash = js_sha256_1.sha256.digest(entropyBuffer);
return exports.bytesToBinary(Array.from(hash)).slice(0, CS);
return (0, exports.bytesToBinary)(Array.from(hash)).slice(0, CS);
};

@@ -37,0 +37,0 @@ exports.deriveChecksumBits = deriveChecksumBits;

{
"name": "@helium/crypto-react-native",
"version": "4.8.1",
"version": "4.8.3-next.22+edc7086",
"description": "Cryptography utilities including mnemonics, keypairs and base58-check encoding for React Native",

@@ -30,3 +30,3 @@ "keywords": [

"dependencies": {
"@helium/address": "^4.8.1",
"@helium/address": "^4.8.3-next.22+edc7086",
"js-sha256": "^0.9.0",

@@ -36,3 +36,3 @@ "react-native-sodium": "^0.4.0",

},
"gitHead": "aae8f759f7a563f32e8d7b48cb3372114d6a93a2"
"gitHead": "edc708603ff5a3e140db15b32023ab7fbb85cb81"
}

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

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

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